2021-10-26 00:04:35 +00:00
|
|
|
error[E0433]: failed to resolve: use of undeclared type `TryFrom`
|
2021-10-26 03:14:48 +00:00
|
|
|
--> $DIR/suggest-tryinto-edition-change.rs:16:30
|
2021-10-26 00:04:35 +00:00
|
|
|
|
|
2021-10-26 02:56:18 +00:00
|
|
|
LL | let _i: Result<i16, _> = TryFrom::try_from(0_i32);
|
|
|
|
| ^^^^^^^ not found in this scope
|
2021-10-26 00:04:35 +00:00
|
|
|
|
|
|
|
|
= note: 'core::convert::TryFrom' is included in the prelude starting in Edition 2021
|
2021-10-26 02:56:18 +00:00
|
|
|
help: consider importing this trait
|
2021-10-26 00:04:35 +00:00
|
|
|
|
|
|
|
|
LL | use core::convert::TryFrom;
|
|
|
|
|
|
|
|
|
|
|
|
|
error[E0433]: failed to resolve: use of undeclared type `TryInto`
|
2021-10-26 03:14:48 +00:00
|
|
|
--> $DIR/suggest-tryinto-edition-change.rs:21:30
|
2021-10-26 00:04:35 +00:00
|
|
|
|
|
2021-10-26 02:56:18 +00:00
|
|
|
LL | let _i: Result<i16, _> = TryInto::try_into(0_i32);
|
|
|
|
| ^^^^^^^ not found in this scope
|
2021-10-26 00:04:35 +00:00
|
|
|
|
|
|
|
|
= note: 'core::convert::TryInto' is included in the prelude starting in Edition 2021
|
2021-10-26 02:56:18 +00:00
|
|
|
help: consider importing this trait
|
2021-10-26 00:04:35 +00:00
|
|
|
|
|
|
|
|
LL | use core::convert::TryInto;
|
|
|
|
|
|
|
|
|
|
|
|
|
error[E0433]: failed to resolve: use of undeclared type `FromIterator`
|
2021-10-26 03:14:48 +00:00
|
|
|
--> $DIR/suggest-tryinto-edition-change.rs:26:18
|
2021-10-26 00:04:35 +00:00
|
|
|
|
|
2021-10-26 02:56:18 +00:00
|
|
|
LL | let _i: () = FromIterator::from_iter(core::iter::empty());
|
|
|
|
| ^^^^^^^^^^^^
|
2021-10-26 00:04:35 +00:00
|
|
|
|
|
|
|
|
::: $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
|
|
|
|
|
|
|
|
|
LL | pub trait IntoIterator {
|
|
|
|
| ---------------------- similarly named trait `IntoIterator` defined here
|
|
|
|
|
|
|
|
|
= note: 'core::iter::FromIterator' is included in the prelude starting in Edition 2021
|
|
|
|
help: a trait with a similar name exists
|
|
|
|
|
|
2021-10-26 02:56:18 +00:00
|
|
|
LL | let _i: () = IntoIterator::from_iter(core::iter::empty());
|
|
|
|
| ~~~~~~~~~~~~
|
|
|
|
help: consider importing this trait
|
2021-10-26 00:04:35 +00:00
|
|
|
|
|
|
|
|
LL | use core::iter::FromIterator;
|
|
|
|
|
|
|
|
|
|
2021-10-25 01:09:52 +00:00
|
|
|
error[E0599]: no method named `try_into` found for type `i32` in the current scope
|
2021-10-26 03:14:48 +00:00
|
|
|
--> $DIR/suggest-tryinto-edition-change.rs:11:36
|
2021-10-25 01:09:52 +00:00
|
|
|
|
|
2021-10-26 02:56:18 +00:00
|
|
|
LL | let _i: Result<i16, _> = 0_i32.try_into();
|
|
|
|
| ^^^^^^^^ method not found in `i32`
|
2021-10-25 01:09:52 +00:00
|
|
|
|
|
|
|
|
::: $SRC_DIR/core/src/convert/mod.rs:LL:COL
|
|
|
|
|
|
|
|
|
LL | fn try_into(self) -> Result<T, Self::Error>;
|
|
|
|
| -------- the method is available for `i32` here
|
|
|
|
|
|
|
|
|
= help: items from traits can only be used if the trait is in scope
|
2021-10-26 02:56:18 +00:00
|
|
|
= note: 'core::convert::TryInto' is included in the prelude starting in Edition 2021
|
2021-10-25 01:09:52 +00:00
|
|
|
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
|
|
|
|
|
2021-10-26 02:56:18 +00:00
|
|
|
LL | use core::convert::TryInto;
|
2021-10-25 01:09:52 +00:00
|
|
|
|
|
|
|
|
|
2021-10-26 00:04:35 +00:00
|
|
|
error: aborting due to 4 previous errors
|
2021-10-25 01:09:52 +00:00
|
|
|
|
2021-10-26 00:04:35 +00:00
|
|
|
Some errors have detailed explanations: E0433, E0599.
|
|
|
|
For more information about an error, try `rustc --explain E0433`.
|