Rust: Cannot compile compiler docs

Created on 23 Jun 2017  路  3Comments  路  Source: rust-lang/rust

This seems to be reported, and fixed and rebroken quite often 馃槄
The current problem is:

 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

Most helpful comment

We discussed this during the meeting, and we think that adding compiler docs to a short builder is a good way to solve this. Working out the specifics will take some time, though.

All 3 comments

We discussed this during the meeting, and we think that adding compiler docs to a short builder is a good way to solve this. Working out the specifics will take some time, though.

Related issue: #44629

Compiler docs can no longer be broken with #46278.
I think this issue can be closed.

Was this page helpful?
0 / 5 - 0 ratings