Rollup merge of #103140 - chenyukang:yukang/fix-103112, r=estebank
Add diagnostic for calling a function with the same name with unresolved Macro Fixes #103112
This commit is contained in:
commit
3df030d441
3 changed files with 33 additions and 2 deletions
4
src/test/ui/suggestions/issue-103112.rs
Normal file
4
src/test/ui/suggestions/issue-103112.rs
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
fn main() {
|
||||
std::process::abort!();
|
||||
//~^ ERROR: failed to resolve
|
||||
}
|
||||
15
src/test/ui/suggestions/issue-103112.stderr
Normal file
15
src/test/ui/suggestions/issue-103112.stderr
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
error[E0433]: failed to resolve: could not find `abort` in `process`
|
||||
--> $DIR/issue-103112.rs:2:19
|
||||
|
|
||||
LL | std::process::abort!();
|
||||
| ^^^^^ could not find `abort` in `process`
|
||||
|
|
||||
help: std::process::abort is not a macro, but a function, try to remove `!`
|
||||
|
|
||||
LL - std::process::abort!();
|
||||
LL + std::process::abort();
|
||||
|
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0433`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue