Rust: 无法编译编译器文档

创建于 2017-06-23  ·  3评论  ·  资料来源: rust-lang/rust

这似乎被报告了,并且经常被修复和重新破坏😅
目前的问题是:

 Documenting rustc_trans v0.0.0 (file:///home/martin/programs/rust/src/librustc_trans)
error[E0308]: mismatched types
   --> src/librustc_trans/back/write.rs:377:55
    |
377 |     llvm::LLVMRustSetInlineAsmDiagnosticHandler(llcx, inline_asm_handler, fv);
    |                                                       ^^^^^^^^^^^^^^^^^^ expected enum `libc::c_void`, found a different enum `libc::c_void`
    |
    = note: expected type `unsafe extern "C" fn(*mut llvm::SMDiagnostic_opaque, *const libc::c_void, u32)`
               found type `unsafe extern "C" fn(*mut llvm::SMDiagnostic_opaque, *const libc::c_void, u32) {back::write::inline_asm_handler}`
note: Perhaps two different versions of crate `libc` are being used?
   --> src/librustc_trans/back/write.rs:377:55
    |
377 |     llvm::LLVMRustSetInlineAsmDiagnosticHandler(llcx, inline_asm_handler, fv);
    |                                                       ^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
   --> src/librustc_trans/back/write.rs:377:75
    |
377 |     llvm::LLVMRustSetInlineAsmDiagnosticHandler(llcx, inline_asm_handler, fv);
    |                                                                           ^^ expected enum `libc::c_void`, found a different enum `libc::c_void`
    |
    = note: expected type `*mut libc::c_void` (enum `libc::c_void`)
               found type `*mut libc::c_void` (enum `libc::c_void`)
note: Perhaps two different versions of crate `libc` are being used?
   --> src/librustc_trans/back/write.rs:377:75
    |
377 |     llvm::LLVMRustSetInlineAsmDiagnosticHandler(llcx, inline_asm_handler, fv);
    |                                                                           ^^
    = help: here are some functions which might fulfill your needs:
            - .offset(...)
            - .wrapping_offset(...)

error[E0308]: mismatched types
   --> src/librustc_trans/back/write.rs:378:49
    |
378 |     llvm::LLVMContextSetDiagnosticHandler(llcx, diagnostic_handler, fv);
    |                                                 ^^^^^^^^^^^^^^^^^^ expected enum `libc::c_void`, found a different enum `libc::c_void`
    |
    = note: expected type `unsafe extern "C" fn(*mut llvm::DiagnosticInfo_opaque, *mut libc::c_void)`
               found type `unsafe extern "C" fn(*mut llvm::DiagnosticInfo_opaque, *mut libc::c_void) {back::write::diagnostic_handler}`
note: Perhaps two different versions of crate `libc` are being used?
   --> src/librustc_trans/back/write.rs:378:49
    |
378 |     llvm::LLVMContextSetDiagnosticHandler(llcx, diagnostic_handler, fv);
    |                                                 ^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
   --> src/librustc_trans/back/write.rs:378:69
    |
378 |     llvm::LLVMContextSetDiagnosticHandler(llcx, diagnostic_handler, fv);
    |                                                                     ^^ expected enum `libc::c_void`, found a different enum `libc::c_void`
    |
    = note: expected type `*mut libc::c_void` (enum `libc::c_void`)
               found type `*mut libc::c_void` (enum `libc::c_void`)
note: Perhaps two different versions of crate `libc` are being used?
   --> src/librustc_trans/back/write.rs:378:69
    |
378 |     llvm::LLVMContextSetDiagnosticHandler(llcx, diagnostic_handler, fv);
    |                                                                     ^^
    = help: here are some functions which might fulfill your needs:
            - .offset(...)
            - .wrapping_offset(...)

error: Compilation failed, aborting rustdoc

error: Could not document `rustc_trans`.
C-bug P-medium T-infra

最有用的评论

我们在会议期间讨论了这个问题,我们认为将编译器文档添加到一个简短的构建器中是解决这个问题的好方法。 不过,确定具体细节需要一些时间。

所有3条评论

我们在会议期间讨论了这个问题,我们认为将编译器文档添加到一个简短的构建器中是解决这个问题的好方法。 不过,确定具体细节需要一些时间。

相关问题:#44629

#46278 无法再破坏编译器文档。
我认为这个问题可以关闭。

此页面是否有帮助?
0 / 5 - 0 等级