1 error[E0433]: failed to resolve: use of undeclared type `TryFrom`
2 --> $DIR/suggest-tryinto-edition-change.rs:11:19
4 LL | let _i: i16 = TryFrom::try_from(0_i32).unwrap();
5 | ^^^^^^^ not found in this scope
7 = note: 'std::convert::TryFrom' is included in the prelude starting in Edition 2021
8 = note: 'core::convert::TryFrom' is included in the prelude starting in Edition 2021
9 help: consider importing one of these items
11 LL | use core::convert::TryFrom;
13 LL | use std::convert::TryFrom;
16 error[E0433]: failed to resolve: use of undeclared type `TryInto`
17 --> $DIR/suggest-tryinto-edition-change.rs:17:19
19 LL | let _i: i16 = TryInto::try_into(0_i32).unwrap();
20 | ^^^^^^^ not found in this scope
22 = note: 'std::convert::TryInto' is included in the prelude starting in Edition 2021
23 = note: 'core::convert::TryInto' is included in the prelude starting in Edition 2021
24 help: consider importing one of these items
26 LL | use core::convert::TryInto;
28 LL | use std::convert::TryInto;
31 error[E0433]: failed to resolve: use of undeclared type `FromIterator`
32 --> $DIR/suggest-tryinto-edition-change.rs:23:22
34 LL | let _v: Vec<_> = FromIterator::from_iter(&[1]);
37 ::: $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
39 LL | pub trait IntoIterator {
40 | ---------------------- similarly named trait `IntoIterator` defined here
42 = note: 'std::iter::FromIterator' is included in the prelude starting in Edition 2021
43 = note: 'core::iter::FromIterator' is included in the prelude starting in Edition 2021
44 help: a trait with a similar name exists
46 LL | let _v: Vec<_> = IntoIterator::from_iter(&[1]);
48 help: consider importing one of these items
50 LL | use core::iter::FromIterator;
52 LL | use std::iter::FromIterator;
55 error[E0599]: no method named `try_into` found for type `i32` in the current scope
56 --> $DIR/suggest-tryinto-edition-change.rs:6:25
58 LL | let _i: i16 = 0_i32.try_into().unwrap();
59 | ^^^^^^^^ method not found in `i32`
61 ::: $SRC_DIR/core/src/convert/mod.rs:LL:COL
63 LL | fn try_into(self) -> Result<T, Self::Error>;
64 | -------- the method is available for `i32` here
66 = help: items from traits can only be used if the trait is in scope
67 = note: 'std::convert::TryInto' is included in the prelude starting in Edition 2021
68 help: the following trait is implemented but not in scope; perhaps add a `use` for it:
70 LL | use std::convert::TryInto;
73 error: aborting due to 4 previous errors
75 Some errors have detailed explanations: E0433, E0599.
76 For more information about an error, try `rustc --explain E0433`.