diff options
| author | Michael Goulet <michael@errs.io> | 2024-01-05 10:57:21 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-05 10:57:21 -0500 |
| commit | f361b591efb7c05b9f498f2b4eb6381d522094ce (patch) | |
| tree | f30250ff9558573c6cb58bf439d3f05c46ccde2e /compiler/rustc_codegen_ssa/src/back | |
| parent | f41ad1bc9c54824073142cc19c5eafef4893d86b (diff) | |
| parent | 8388112970288c79ddb217949070cfb04c2798a5 (diff) | |
| download | rust-f361b591efb7c05b9f498f2b4eb6381d522094ce.tar.gz rust-f361b591efb7c05b9f498f2b4eb6381d522094ce.zip | |
Rollup merge of #119538 - nnethercote:cleanup-errors-5, r=compiler-errors
Cleanup error handlers: round 5 More rustc_errors cleanups. A sequel to https://github.com/rust-lang/rust/pull/119171. r? ````@compiler-errors````
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/back')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/write.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/write.rs b/compiler/rustc_codegen_ssa/src/back/write.rs index 5a8db7bbf2d..d2c6b6e0c7b 100644 --- a/compiler/rustc_codegen_ssa/src/back/write.rs +++ b/compiler/rustc_codegen_ssa/src/back/write.rs @@ -1848,9 +1848,9 @@ impl SharedEmitterMain { } Ok(SharedEmitterMessage::InlineAsmError(cookie, msg, level, source)) => { let err_level = match level { - Level::Error { lint: false } => rustc_errors::Level::Error { lint: false }, - Level::Warning(_) => rustc_errors::Level::Warning(None), - Level::Note => rustc_errors::Level::Note, + Level::Error => Level::Error, + Level::Warning(_) => Level::Warning(None), + Level::Note => Level::Note, _ => bug!("Invalid inline asm diagnostic level"), }; let msg = msg.strip_prefix("error: ").unwrap_or(&msg).to_string(); @@ -1860,7 +1860,7 @@ impl SharedEmitterMain { if cookie != 0 { let pos = BytePos::from_u32(cookie); let span = Span::with_root_ctxt(pos, pos); - err.set_span(span); + err.span(span); }; // Point to the generated assembly if it is available. |
