diff options
| author | bors <bors@rust-lang.org> | 2023-05-06 14:16:55 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-05-06 14:16:55 +0000 |
| commit | 905d5a38d69328385ce9963c65c385734c60322d (patch) | |
| tree | 0a9c58202e335237689a8590698a501a41806116 /compiler/rustc_codegen_ssa/src | |
| parent | 333b920feeb136d35fac804d51310df1a35c399e (diff) | |
| parent | 3cb1a4676a62eaa60c74a56c5e389aa1b258b3aa (diff) | |
| download | rust-905d5a38d69328385ce9963c65c385734c60322d.tar.gz rust-905d5a38d69328385ce9963c65c385734c60322d.zip | |
Auto merge of #111287 - matthiaskrgr:rollup-9lzax2c, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #110577 (Use fulfillment to check `Drop` impl compatibility) - #110610 (Add Terminator conversion from MIR to SMIR, part #1) - #110985 (Fix spans in LLVM-generated inline asm errors) - #110989 (Make the BUG_REPORT_URL configurable by tools ) - #111167 (debuginfo: split method declaration and definition) - #111230 (add hint for =< as <=) - #111279 (More robust debug assertions for `Instance::resolve` on built-in traits with non-standard trait items) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/write.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/write.rs b/compiler/rustc_codegen_ssa/src/back/write.rs index c42d59bd51c..c323372bda4 100644 --- a/compiler/rustc_codegen_ssa/src/back/write.rs +++ b/compiler/rustc_codegen_ssa/src/back/write.rs @@ -1821,9 +1821,15 @@ impl SharedEmitterMain { let source = sess .source_map() .new_source_file(FileName::inline_asm_source_code(&buffer), buffer); - let source_span = Span::with_root_ctxt(source.start_pos, source.end_pos); - let spans: Vec<_> = - spans.iter().map(|sp| source_span.from_inner(*sp)).collect(); + let spans: Vec<_> = spans + .iter() + .map(|sp| { + Span::with_root_ctxt( + source.normalized_byte_pos(sp.start as u32), + source.normalized_byte_pos(sp.end as u32), + ) + }) + .collect(); err.span_note(spans, "instantiated into assembly here"); } |
