Fix uninlined_format_args
for some compiler crates
Convert all the crates that have had their diagnostic migration completed (except save_analysis because that will be deleted soon and apfloat because of the licensing problem).
This commit is contained in:
parent
1d284af117
commit
fd7a159710
91 changed files with 287 additions and 329 deletions
|
@ -134,7 +134,7 @@ fn symbols_with_errors(input: TokenStream) -> (TokenStream, Vec<syn::Error>) {
|
|||
|
||||
let mut check_dup = |span: Span, str: &str, errors: &mut Errors| {
|
||||
if let Some(prev_span) = keys.get(str) {
|
||||
errors.error(span, format!("Symbol `{}` is duplicated", str));
|
||||
errors.error(span, format!("Symbol `{str}` is duplicated"));
|
||||
errors.error(*prev_span, "location of previous definition".to_string());
|
||||
} else {
|
||||
keys.insert(str.to_string(), span);
|
||||
|
@ -144,8 +144,8 @@ fn symbols_with_errors(input: TokenStream) -> (TokenStream, Vec<syn::Error>) {
|
|||
let mut check_order = |span: Span, str: &str, errors: &mut Errors| {
|
||||
if let Some((prev_span, ref prev_str)) = prev_key {
|
||||
if str < prev_str {
|
||||
errors.error(span, format!("Symbol `{}` must precede `{}`", str, prev_str));
|
||||
errors.error(prev_span, format!("location of previous symbol `{}`", prev_str));
|
||||
errors.error(span, format!("Symbol `{str}` must precede `{prev_str}`"));
|
||||
errors.error(prev_span, format!("location of previous symbol `{prev_str}`"));
|
||||
}
|
||||
}
|
||||
prev_key = Some((span, str.to_string()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue