rust icon indicating copy to clipboard operation
rust copied to clipboard

Add diagnostic for calling a function with the same name with unresolved Macro

Open chenyukang opened this issue 3 years ago • 1 comments

Fixes #103112

chenyukang avatar Oct 17 '22 08:10 chenyukang

r? @fee1-dead

(rust-highfive has picked a reviewer for you, use r? to override)

rust-highfive avatar Oct 17 '22 08:10 rust-highfive

Will merge after PR: #103185

chenyukang avatar Oct 18 '22 11:10 chenyukang

The job x86_64-gnu-llvm-13 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

6    |
7 help: std::process::abort is not a macro, but a function, try to remove `!`
8    |
- LL -     std::process::abort!();
- LL +     std::process::abort();
+ LL |     std::process::abort!();
12 
13 error: aborting due to previous error



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/suggestions/issue-103112/issue-103112.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args suggestions/issue-103112.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/suggestions/issue-103112.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/suggestions/issue-103112" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/suggestions/issue-103112/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0433]: failed to resolve: could not find `abort` in `process`
   |
LL |     std::process::abort!();
Some tests failed in compiletest suite=ui mode=ui host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu
   |                   ^^^^^ could not find `abort` in `process`

rust-log-analyzer avatar Oct 18 '22 12:10 rust-log-analyzer

r=me after https://github.com/rust-lang/rust/pull/103185 lands and this is rebased

estebank avatar Oct 19 '22 22:10 estebank

r? @estebank

chenyukang avatar Oct 20 '22 14:10 chenyukang

@bors r+

estebank avatar Oct 22 '22 02:10 estebank

:pushpin: Commit f90bf50d475eb9240c5bdeef3102c235335180c4 has been approved by estebank

It is now in the queue for this repository.

bors avatar Oct 22 '22 02:10 bors