Skip to content

Commit 38b7742

Browse files
committed
Add tests for resolution changes
1 parent d829e40 commit 38b7742

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
::foo() //~ cannot find external crate `foo` in the crate root
3+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
error[E0425]: cannot find external crate `foo` in the crate root
2+
--> $DIR/crate-called-as-function.rs:2:7
3+
|
4+
LL | ::foo()
5+
| ^^^ not found in the crate root
6+
7+
error: aborting due to previous error
8+
9+
For more information about this error, try `rustc --explain E0425`.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
fn main() {
2+
let _map = std::hahmap::HashMap::new();
3+
//~^ ERROR failed to resolve: could not find `hahmap` in `std
4+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
error[E0433]: failed to resolve: could not find `hahmap` in `std`
2+
--> $DIR/missing-in-namespace.rs:2:29
3+
|
4+
LL | let _map = std::hahmap::HashMap::new();
5+
| ^^^^^^^ not found in `std::hahmap`
6+
|
7+
help: consider importing this struct
8+
|
9+
LL | use std::collections::HashMap;
10+
|
11+
12+
error: aborting due to previous error
13+
14+
For more information about this error, try `rustc --explain E0433`.

0 commit comments

Comments
 (0)