Skip to content

Commit 545702e

Browse files
committed
Correct inconsistent error messages in tests
1 parent c0472a5 commit 545702e

File tree

9 files changed

+15
-19
lines changed

9 files changed

+15
-19
lines changed

src/test/ui/const-generics/issues/issue-82956.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0433]: failed to resolve: use of undeclared type `IntoIter`
22
--> $DIR/issue-82956.rs:25:24
33
|
44
LL | let mut iter = IntoIter::new(self);
5-
| ^^^^^^^^ not found in this scope
5+
| ^^^^^^^^ use of undeclared type `IntoIter`
66
|
77
help: consider importing one of these items
88
|

src/test/ui/derived-errors/issue-31997-1.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0433]: failed to resolve: use of undeclared type `HashMap`
22
--> $DIR/issue-31997-1.rs:20:19
33
|
44
LL | let mut map = HashMap::new();
5-
| ^^^^^^^ not found in this scope
5+
| ^^^^^^^ use of undeclared type `HashMap`
66
|
77
help: consider importing this struct
88
|

src/test/ui/hygiene/no_implicit_prelude.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | fn f() { ::bar::m!(); }
55
| ----------- in this macro invocation
66
...
77
LL | Vec::new();
8-
| ^^^ not found in this scope
8+
| ^^^ use of undeclared type `Vec`
99
|
1010
= note: this error originates in the macro `::bar::m` (in Nightly builds, run with -Z macro-backtrace for more info)
1111
help: consider importing this struct

src/test/ui/proc-macro/amputate-span.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0433]: failed to resolve: use of undeclared type `Command`
22
--> $DIR/amputate-span.rs:49:5
33
|
44
LL | Command::new("git");
5-
| ^^^^^^^ not found in this scope
5+
| ^^^^^^^ use of undeclared type `Command`
66
|
77
help: consider importing this struct
88
|
@@ -13,7 +13,7 @@ error[E0433]: failed to resolve: use of undeclared type `Command`
1313
--> $DIR/amputate-span.rs:63:9
1414
|
1515
LL | Command::new("git");
16-
| ^^^^^^^ not found in this scope
16+
| ^^^^^^^ use of undeclared type `Command`
1717
|
1818
help: consider importing this struct
1919
|

src/test/ui/resolve/missing-in-namespace.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
error[E0433]: failed to resolve: could not find `hahmap` in `std`
2-
--> $DIR/missing-in-namespace.rs:2:29
2+
--> $DIR/missing-in-namespace.rs:2:21
33
|
44
LL | let _map = std::hahmap::HashMap::new();
5-
| ^^^^^^^ not found in `std::hahmap`
5+
| ^^^^^^ could not find `hahmap` in `std`
66
|
77
help: consider importing this struct
88
|

src/test/ui/resolve/use_suggestion.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ error[E0433]: failed to resolve: use of undeclared type `HashMap`
88
--> $DIR/use_suggestion.rs:2:14
99
|
1010
LL | let x1 = HashMap::new();
11-
| ^^^^^^^ not found in this scope
11+
| ^^^^^^^ use of undeclared type `HashMap`
1212
|
1313
help: consider importing this struct
1414
|

src/test/ui/suggestions/core-std-import-order-issue-83564.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0433]: failed to resolve: use of undeclared type `NonZeroU32`
22
--> $DIR/core-std-import-order-issue-83564.rs:8:14
33
|
44
LL | let _x = NonZeroU32::new(5).unwrap();
5-
| ^^^^^^^^^^ not found in this scope
5+
| ^^^^^^^^^^ use of undeclared type `NonZeroU32`
66
|
77
help: consider importing one of these items
88
|

src/test/ui/suggestions/suggest-tryinto-edition-change.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,19 @@ fn test() {
1010

1111
let _i: i16 = TryFrom::try_from(0_i32).unwrap();
1212
//~^ ERROR failed to resolve: use of undeclared type
13-
//~| NOTE not found in this scope
13+
//~| NOTE use of undeclared type
1414
//~| NOTE 'std::convert::TryFrom' is included in the prelude starting in Edition 2021
1515
//~| NOTE 'core::convert::TryFrom' is included in the prelude starting in Edition 2021
1616

1717
let _i: i16 = TryInto::try_into(0_i32).unwrap();
1818
//~^ ERROR failed to resolve: use of undeclared type
19-
//~| NOTE not found in this scope
19+
//~| NOTE use of undeclared type
2020
//~| NOTE 'std::convert::TryInto' is included in the prelude starting in Edition 2021
2121
//~| NOTE 'core::convert::TryInto' is included in the prelude starting in Edition 2021
2222

2323
let _v: Vec<_> = FromIterator::from_iter(&[1]);
2424
//~^ ERROR failed to resolve: use of undeclared type
25+
//~| NOTE use of undeclared type
2526
//~| NOTE 'std::iter::FromIterator' is included in the prelude starting in Edition 2021
2627
//~| NOTE 'core::iter::FromIterator' is included in the prelude starting in Edition 2021
2728
}

src/test/ui/suggestions/suggest-tryinto-edition-change.stderr

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0433]: failed to resolve: use of undeclared type `TryFrom`
22
--> $DIR/suggest-tryinto-edition-change.rs:11:19
33
|
44
LL | let _i: i16 = TryFrom::try_from(0_i32).unwrap();
5-
| ^^^^^^^ not found in this scope
5+
| ^^^^^^^ use of undeclared type `TryFrom`
66
|
77
= note: 'std::convert::TryFrom' is included in the prelude starting in Edition 2021
88
= note: 'core::convert::TryFrom' is included in the prelude starting in Edition 2021
@@ -17,7 +17,7 @@ error[E0433]: failed to resolve: use of undeclared type `TryInto`
1717
--> $DIR/suggest-tryinto-edition-change.rs:17:19
1818
|
1919
LL | let _i: i16 = TryInto::try_into(0_i32).unwrap();
20-
| ^^^^^^^ not found in this scope
20+
| ^^^^^^^ use of undeclared type `TryInto`
2121
|
2222
= note: 'std::convert::TryInto' is included in the prelude starting in Edition 2021
2323
= note: 'core::convert::TryInto' is included in the prelude starting in Edition 2021
@@ -32,12 +32,7 @@ error[E0433]: failed to resolve: use of undeclared type `FromIterator`
3232
--> $DIR/suggest-tryinto-edition-change.rs:23:22
3333
|
3434
LL | let _v: Vec<_> = FromIterator::from_iter(&[1]);
35-
| ^^^^^^^^^^^^
36-
|
37-
::: $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
38-
|
39-
LL | pub trait IntoIterator {
40-
| ---------------------- similarly named trait `IntoIterator` defined here
35+
| ^^^^^^^^^^^^ use of undeclared type `FromIterator`
4136
|
4237
= note: 'std::iter::FromIterator' is included in the prelude starting in Edition 2021
4338
= note: 'core::iter::FromIterator' is included in the prelude starting in Edition 2021

0 commit comments

Comments
 (0)