Skip to content

Commit 55171e4

Browse files
authoredMar 30, 2021
Rollup merge of #83656 - JohnTitor:resolve-test, r=petrochenkov
Add a regression test for issue-82865 Closes #82865 r? `@petrochenkov`
2 parents 9f9577c + edacd0f commit 55171e4

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed
 

‎src/test/ui/resolve/issue-82865.rs

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Regression test for #82865.
2+
3+
#![feature(decl_macro)]
4+
5+
use x::y::z; //~ ERROR: failed to resolve: maybe a missing crate `x`?
6+
7+
macro mac () {
8+
Box::z //~ ERROR: no function or associated item
9+
}
10+
11+
fn main() {
12+
mac!();
13+
}
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
error[E0433]: failed to resolve: maybe a missing crate `x`?
2+
--> $DIR/issue-82865.rs:5:5
3+
|
4+
LL | use x::y::z;
5+
| ^ maybe a missing crate `x`?
6+
7+
error[E0599]: no function or associated item named `z` found for struct `Box<_, _>` in the current scope
8+
--> $DIR/issue-82865.rs:8:10
9+
|
10+
LL | Box::z
11+
| ^ function or associated item not found in `Box<_, _>`
12+
...
13+
LL | mac!();
14+
| ------- in this macro invocation
15+
|
16+
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
17+
18+
error: aborting due to 2 previous errors
19+
20+
Some errors have detailed explanations: E0433, E0599.
21+
For more information about an error, try `rustc --explain E0433`.

0 commit comments

Comments
 (0)