fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0433]: failed to resolve: use of undeclared type `TryFrom` 2 --> $DIR/suggest-tryinto-edition-change.rs:11:19 3 | 4LL | let _i: i16 = TryFrom::try_from(0_i32).unwrap(); 5 | ^^^^^^^ use of undeclared type `TryFrom` 6 | 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 9help: consider importing one of these items 10 | 11LL + use core::convert::TryFrom; 12 | 13LL + use std::convert::TryFrom; 14 | 15 16error[E0433]: failed to resolve: use of undeclared type `TryInto` 17 --> $DIR/suggest-tryinto-edition-change.rs:17:19 18 | 19LL | let _i: i16 = TryInto::try_into(0_i32).unwrap(); 20 | ^^^^^^^ use of undeclared type `TryInto` 21 | 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 24help: consider importing one of these items 25 | 26LL + use core::convert::TryInto; 27 | 28LL + use std::convert::TryInto; 29 | 30 31error[E0433]: failed to resolve: use of undeclared type `FromIterator` 32 --> $DIR/suggest-tryinto-edition-change.rs:23:22 33 | 34LL | let _v: Vec<_> = FromIterator::from_iter(&[1]); 35 | ^^^^^^^^^^^^ use of undeclared type `FromIterator` 36 | 37 = note: 'std::iter::FromIterator' is included in the prelude starting in Edition 2021 38 = note: 'core::iter::FromIterator' is included in the prelude starting in Edition 2021 39help: a trait with a similar name exists 40 | 41LL | let _v: Vec<_> = IntoIterator::from_iter(&[1]); 42 | ~~~~~~~~~~~~ 43help: consider importing one of these items 44 | 45LL + use core::iter::FromIterator; 46 | 47LL + use std::iter::FromIterator; 48 | 49 50error[E0599]: no method named `try_into` found for type `i32` in the current scope 51 --> $DIR/suggest-tryinto-edition-change.rs:6:25 52 | 53LL | let _i: i16 = 0_i32.try_into().unwrap(); 54 | ^^^^^^^^ method not found in `i32` 55 --> $SRC_DIR/core/src/convert/mod.rs:LL:COL 56 | 57 = note: the method is available for `i32` here 58 | 59 = help: items from traits can only be used if the trait is in scope 60 = note: 'std::convert::TryInto' is included in the prelude starting in Edition 2021 61help: the following trait is implemented but not in scope; perhaps add a `use` for it: 62 | 63LL + use std::convert::TryInto; 64 | 65 66error: aborting due to 4 previous errors 67 68Some errors have detailed explanations: E0433, E0599. 69For more information about an error, try `rustc --explain E0433`.