Correct inconsistent error messages in tests
This commit is contained in:
parent
c0472a5450
commit
545702e432
9 changed files with 15 additions and 19 deletions
|
|
@ -2,7 +2,7 @@ error[E0433]: failed to resolve: use of undeclared type `IntoIter`
|
|||
--> $DIR/issue-82956.rs:25:24
|
||||
|
|
||||
LL | let mut iter = IntoIter::new(self);
|
||||
| ^^^^^^^^ not found in this scope
|
||||
| ^^^^^^^^ use of undeclared type `IntoIter`
|
||||
|
|
||||
help: consider importing one of these items
|
||||
|
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error[E0433]: failed to resolve: use of undeclared type `HashMap`
|
|||
--> $DIR/issue-31997-1.rs:20:19
|
||||
|
|
||||
LL | let mut map = HashMap::new();
|
||||
| ^^^^^^^ not found in this scope
|
||||
| ^^^^^^^ use of undeclared type `HashMap`
|
||||
|
|
||||
help: consider importing this struct
|
||||
|
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ LL | fn f() { ::bar::m!(); }
|
|||
| ----------- in this macro invocation
|
||||
...
|
||||
LL | Vec::new();
|
||||
| ^^^ not found in this scope
|
||||
| ^^^ use of undeclared type `Vec`
|
||||
|
|
||||
= note: this error originates in the macro `::bar::m` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: consider importing this struct
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error[E0433]: failed to resolve: use of undeclared type `Command`
|
|||
--> $DIR/amputate-span.rs:49:5
|
||||
|
|
||||
LL | Command::new("git");
|
||||
| ^^^^^^^ not found in this scope
|
||||
| ^^^^^^^ use of undeclared type `Command`
|
||||
|
|
||||
help: consider importing this struct
|
||||
|
|
||||
|
|
@ -13,7 +13,7 @@ error[E0433]: failed to resolve: use of undeclared type `Command`
|
|||
--> $DIR/amputate-span.rs:63:9
|
||||
|
|
||||
LL | Command::new("git");
|
||||
| ^^^^^^^ not found in this scope
|
||||
| ^^^^^^^ use of undeclared type `Command`
|
||||
|
|
||||
help: consider importing this struct
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
error[E0433]: failed to resolve: could not find `hahmap` in `std`
|
||||
--> $DIR/missing-in-namespace.rs:2:29
|
||||
--> $DIR/missing-in-namespace.rs:2:21
|
||||
|
|
||||
LL | let _map = std::hahmap::HashMap::new();
|
||||
| ^^^^^^^ not found in `std::hahmap`
|
||||
| ^^^^^^ could not find `hahmap` in `std`
|
||||
|
|
||||
help: consider importing this struct
|
||||
|
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ error[E0433]: failed to resolve: use of undeclared type `HashMap`
|
|||
--> $DIR/use_suggestion.rs:2:14
|
||||
|
|
||||
LL | let x1 = HashMap::new();
|
||||
| ^^^^^^^ not found in this scope
|
||||
| ^^^^^^^ use of undeclared type `HashMap`
|
||||
|
|
||||
help: consider importing this struct
|
||||
|
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error[E0433]: failed to resolve: use of undeclared type `NonZeroU32`
|
|||
--> $DIR/core-std-import-order-issue-83564.rs:8:14
|
||||
|
|
||||
LL | let _x = NonZeroU32::new(5).unwrap();
|
||||
| ^^^^^^^^^^ not found in this scope
|
||||
| ^^^^^^^^^^ use of undeclared type `NonZeroU32`
|
||||
|
|
||||
help: consider importing one of these items
|
||||
|
|
||||
|
|
|
|||
|
|
@ -10,18 +10,19 @@ fn test() {
|
|||
|
||||
let _i: i16 = TryFrom::try_from(0_i32).unwrap();
|
||||
//~^ ERROR failed to resolve: use of undeclared type
|
||||
//~| NOTE not found in this scope
|
||||
//~| NOTE use of undeclared type
|
||||
//~| NOTE 'std::convert::TryFrom' is included in the prelude starting in Edition 2021
|
||||
//~| NOTE 'core::convert::TryFrom' is included in the prelude starting in Edition 2021
|
||||
|
||||
let _i: i16 = TryInto::try_into(0_i32).unwrap();
|
||||
//~^ ERROR failed to resolve: use of undeclared type
|
||||
//~| NOTE not found in this scope
|
||||
//~| NOTE use of undeclared type
|
||||
//~| NOTE 'std::convert::TryInto' is included in the prelude starting in Edition 2021
|
||||
//~| NOTE 'core::convert::TryInto' is included in the prelude starting in Edition 2021
|
||||
|
||||
let _v: Vec<_> = FromIterator::from_iter(&[1]);
|
||||
//~^ ERROR failed to resolve: use of undeclared type
|
||||
//~| NOTE use of undeclared type
|
||||
//~| NOTE 'std::iter::FromIterator' is included in the prelude starting in Edition 2021
|
||||
//~| NOTE 'core::iter::FromIterator' is included in the prelude starting in Edition 2021
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error[E0433]: failed to resolve: use of undeclared type `TryFrom`
|
|||
--> $DIR/suggest-tryinto-edition-change.rs:11:19
|
||||
|
|
||||
LL | let _i: i16 = TryFrom::try_from(0_i32).unwrap();
|
||||
| ^^^^^^^ not found in this scope
|
||||
| ^^^^^^^ use of undeclared type `TryFrom`
|
||||
|
|
||||
= note: 'std::convert::TryFrom' is included in the prelude starting in Edition 2021
|
||||
= 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`
|
|||
--> $DIR/suggest-tryinto-edition-change.rs:17:19
|
||||
|
|
||||
LL | let _i: i16 = TryInto::try_into(0_i32).unwrap();
|
||||
| ^^^^^^^ not found in this scope
|
||||
| ^^^^^^^ use of undeclared type `TryInto`
|
||||
|
|
||||
= note: 'std::convert::TryInto' is included in the prelude starting in Edition 2021
|
||||
= 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`
|
|||
--> $DIR/suggest-tryinto-edition-change.rs:23:22
|
||||
|
|
||||
LL | let _v: Vec<_> = FromIterator::from_iter(&[1]);
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
||||
::: $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
|
||||
|
|
||||
LL | pub trait IntoIterator {
|
||||
| ---------------------- similarly named trait `IntoIterator` defined here
|
||||
| ^^^^^^^^^^^^ use of undeclared type `FromIterator`
|
||||
|
|
||||
= note: 'std::iter::FromIterator' is included in the prelude starting in Edition 2021
|
||||
= note: 'core::iter::FromIterator' is included in the prelude starting in Edition 2021
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue