Avoid some rustc_errors:: qualifiers.

These are misleading, because the mixture of `Level` and
`rustc_errors::Level` makes it look like there are two different types
involved.
This commit is contained in:
Nicholas Nethercote 2024-01-04 11:43:19 +11:00
parent 1e92223925
commit 9560c58c2a

View File

@ -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 { lint: false } => Level::Error { lint: false },
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();