Skip to content

Cannot compile compiler docs #42866

Closed
Closed
@mcarton

Description

@mcarton

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`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.P-mediumMedium priorityT-infraRelevant to the infrastructure team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions