@@ -36,7 +36,7 @@ use rustc_span::InnerSpan;
36
36
use rustc_target:: spec:: { CodeModel , RelocModel , SanitizerSet , SplitDebuginfo , TlsModel } ;
37
37
38
38
use crate :: llvm:: diagnostic:: OptimizationDiagnosticKind ;
39
- use libc:: { c_char, c_int, c_uint , c_void, size_t} ;
39
+ use libc:: { c_char, c_int, c_void, size_t} ;
40
40
use std:: ffi:: CString ;
41
41
use std:: fs;
42
42
use std:: io:: { self , Write } ;
@@ -406,7 +406,7 @@ fn report_inline_asm(
406
406
cgcx : & CodegenContext < LlvmCodegenBackend > ,
407
407
msg : String ,
408
408
level : llvm:: DiagnosticLevel ,
409
- mut cookie : c_uint ,
409
+ mut cookie : u64 ,
410
410
source : Option < ( String , Vec < InnerSpan > ) > ,
411
411
) {
412
412
// In LTO build we may get srcloc values from other crates which are invalid
@@ -420,7 +420,7 @@ fn report_inline_asm(
420
420
llvm:: DiagnosticLevel :: Warning => Level :: Warning ,
421
421
llvm:: DiagnosticLevel :: Note | llvm:: DiagnosticLevel :: Remark => Level :: Note ,
422
422
} ;
423
- cgcx. diag_emitter . inline_asm_error ( cookie as u32 , msg, level, source) ;
423
+ cgcx. diag_emitter . inline_asm_error ( cookie. try_into ( ) . unwrap ( ) , msg, level, source) ;
424
424
}
425
425
426
426
unsafe extern "C" fn diagnostic_handler ( info : & DiagnosticInfo , user : * mut c_void ) {
0 commit comments