summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/suggest-tryinto-edition-change.stderr
blob: 671f5efddd979d34b29bc4e5605a33fe81128331 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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();
   |                   ^^^^^^^ 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
help: consider importing one of these items
   |
LL + use core::convert::TryFrom;
   |
LL + use std::convert::TryFrom;
   |

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();
   |                   ^^^^^^^ 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
help: consider importing one of these items
   |
LL + use core::convert::TryInto;
   |
LL + use std::convert::TryInto;
   |

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]);
   |                      ^^^^^^^^^^^^ 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
help: a trait with a similar name exists
   |
LL |     let _v: Vec<_> = IntoIterator::from_iter(&[1]);
   |                      ~~~~~~~~~~~~
help: consider importing one of these items
   |
LL + use core::iter::FromIterator;
   |
LL + use std::iter::FromIterator;
   |

error[E0599]: no method named `try_into` found for type `i32` in the current scope
  --> $DIR/suggest-tryinto-edition-change.rs:6:25
   |
LL |     let _i: i16 = 0_i32.try_into().unwrap();
   |                         ^^^^^^^^ method not found in `i32`
  --> $SRC_DIR/core/src/convert/mod.rs:LL:COL
   |
   = note: the method is available for `i32` here
   |
   = help: items from traits can only be used if the trait is in scope
   = note: 'std::convert::TryInto' is included in the prelude starting in Edition 2021
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
   |
LL + use std::convert::TryInto;
   |

error: aborting due to 4 previous errors

Some errors have detailed explanations: E0433, E0599.
For more information about an error, try `rustc --explain E0433`.