Skip to content

Commit be500b0

Browse files
committed
add new test
1 parent 31a4239 commit be500b0

File tree

4 files changed

+35
-0
lines changed

4 files changed

+35
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
//@ edition: 2021
2+
3+
pub fn foo() {}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
//@ edition: 2021
2+
//@ aux-crate:issue_127011_a_1=issue-127011-a-1.rs
3+
4+
pub use issue_127011_a_1::foo;

tests/ui/issues/issue-127011-1.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//@ edition: 2021
2+
//@ aux-crate:issue_127011_a_1=issue-127011-a-1.rs
3+
//@ aux-crate:issue_127011_b_1=issue-127011-b-1.rs
4+
5+
use issue_127011_b_1;
6+
7+
fn main() {
8+
foo();
9+
//~^ ERROR: cannot find function `foo` in this scope [E0425]
10+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
error[E0425]: cannot find function `foo` in this scope
2+
--> $DIR/issue-127011-1.rs:8:5
3+
|
4+
LL | foo();
5+
| ^^^ not found in this scope
6+
|
7+
help: consider importing one of these functions
8+
|
9+
LL + use crate::issue_127011_b_1::foo;
10+
|
11+
LL + use issue_127011_a_1::foo;
12+
|
13+
LL + use issue_127011_b_1::foo;
14+
|
15+
16+
error: aborting due to 1 previous error
17+
18+
For more information about this error, try `rustc --explain E0425`.

0 commit comments

Comments
 (0)