Rust: reword macro expansion error

This commit is contained in:
Paolo Tranquilli
2025-08-26 13:58:47 +02:00
parent 999920c968
commit 42a40c14ac
5 changed files with 5 additions and 5 deletions

View File

@@ -514,7 +514,7 @@ impl<'a> Translator<'a> {
mcall,
&SyntaxError::new(
format!(
"macro expansion failed: could not resolve macro '{}'",
"macro expansion failed for '{}'",
mcall.path().map(|p| p.to_string()).unwrap_or_default()
),
range.unwrap_or_else(|| TextRange::empty(TextSize::from(0))),

View File

@@ -1,2 +1,2 @@
extractionWarning
| macro_expansion.rs:56:9:56:31 | macro expansion failed: could not resolve macro 'concat' |
| macro_expansion.rs:56:9:56:31 | macro expansion failed for 'concat' |

View File

@@ -51,4 +51,4 @@ unexpanded_macro_calls
| macro_expansion.rs:56:9:56:31 | concat!... |
| macro_expansion.rs:63:9:63:32 | include_str!... |
warnings
| macro_expansion.rs:56:9:56:31 | macro expansion failed: could not resolve macro 'concat' |
| macro_expansion.rs:56:9:56:31 | macro expansion failed for 'concat' |

View File

@@ -5,4 +5,4 @@ extractionWarning
| does_not_compile.rs:2:21:2:20 | expected SEMICOLON |
| does_not_compile.rs:2:26:2:25 | expected SEMICOLON |
| error.rs:2:5:2:17 | An error! |
| my_macro.rs:17:9:17:27 | macro expansion failed: could not resolve macro 'myUndefinedMacro' |
| my_macro.rs:17:9:17:27 | macro expansion failed for 'myUndefinedMacro' |

View File

@@ -4,4 +4,4 @@
| does_not_compile.rs:2:21:2:20 | expected SEMICOLON | Extraction warning in does_not_compile.rs with message expected SEMICOLON | 1 |
| does_not_compile.rs:2:26:2:25 | expected SEMICOLON | Extraction warning in does_not_compile.rs with message expected SEMICOLON | 1 |
| error.rs:2:5:2:17 | An error! | Extraction warning in error.rs with message An error! | 1 |
| my_macro.rs:17:9:17:27 | macro expansion failed: could not resolve macro 'myUndefinedMacro' | Extraction warning in my_macro.rs with message macro expansion failed: could not resolve macro 'myUndefinedMacro' | 1 |
| my_macro.rs:17:9:17:27 | macro expansion failed for 'myUndefinedMacro' | Extraction warning in my_macro.rs with message macro expansion failed for 'myUndefinedMacro' | 1 |