@@ -4,48 +4,48 @@ error[E0433]: failed to resolve: use of undeclared type `TryFrom`
4
4
LL | let _i: i16 = TryFrom::try_from(0_i32).unwrap();
5
5
| ^^^^^^^ use of undeclared type `TryFrom`
6
6
|
7
- = note: 'core::convert::TryFrom' is included in the prelude starting in Edition 2021
8
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
9
help: consider importing one of these items
10
10
|
11
- LL + use core::convert::TryFrom;
12
- |
13
11
LL + use std::convert::TryFrom;
14
12
|
13
+ LL + use core::convert::TryFrom;
14
+ |
15
15
16
16
error[E0433]: failed to resolve: use of undeclared type `TryInto`
17
17
--> $DIR/suggest-tryinto-edition-change.rs:16:19
18
18
|
19
19
LL | let _i: i16 = TryInto::try_into(0_i32).unwrap();
20
20
| ^^^^^^^ use of undeclared type `TryInto`
21
21
|
22
- = note: 'core::convert::TryInto' is included in the prelude starting in Edition 2021
23
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
24
help: consider importing one of these items
25
25
|
26
- LL + use core::convert::TryInto;
27
- |
28
26
LL + use std::convert::TryInto;
29
27
|
28
+ LL + use core::convert::TryInto;
29
+ |
30
30
31
31
error[E0433]: failed to resolve: use of undeclared type `FromIterator`
32
32
--> $DIR/suggest-tryinto-edition-change.rs:22:22
33
33
|
34
34
LL | let _v: Vec<_> = FromIterator::from_iter(&[1]);
35
35
| ^^^^^^^^^^^^ use of undeclared type `FromIterator`
36
36
|
37
- = note: 'core::iter::FromIterator' is included in the prelude starting in Edition 2021
38
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
39
39
help: a trait with a similar name exists
40
40
|
41
41
LL | let _v: Vec<_> = IntoIterator::from_iter(&[1]);
42
42
| ~~~~~~~~~~~~
43
43
help: consider importing one of these items
44
44
|
45
- LL + use core::iter::FromIterator;
46
- |
47
45
LL + use std::iter::FromIterator;
48
46
|
47
+ LL + use core::iter::FromIterator;
48
+ |
49
49
50
50
error[E0599]: no method named `try_into` found for type `i32` in the current scope
51
51
--> $DIR/suggest-tryinto-edition-change.rs:6:25
0 commit comments