Add ErrorGuaranteed to ast::LitKind::Err, token::LitKind::Err.
This mostly works well, and eliminates a couple of delayed bugs. One annoying thing is that we should really also add an `ErrorGuaranteed` to `proc_macro::bridge::LitKind::Err`. But that's difficult because `proc_macro` doesn't have access to `ErrorGuaranteed`, so we have to fake it.
This commit is contained in:
@@ -254,7 +254,7 @@ fn literal_to_string(lit: token::Lit) -> String {
|
||||
token::CStrRaw(n) => {
|
||||
format!("cr{delim}\"{symbol}\"{delim}", delim = "#".repeat(n as usize))
|
||||
}
|
||||
token::Integer | token::Float | token::Bool | token::Err => symbol.to_string(),
|
||||
token::Integer | token::Float | token::Bool | token::Err(_) => symbol.to_string(),
|
||||
};
|
||||
|
||||
if let Some(suffix) = suffix {
|
||||
|
||||
Reference in New Issue
Block a user