]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rust-2021/future-prelude-collision.stderr
Auto merge of #98051 - davidtwco:split-dwarf-stabilization, r=wesleywiser
[rust.git] / src / test / ui / rust-2021 / future-prelude-collision.stderr
1 warning: trait method `try_into` will become ambiguous in Rust 2021
2   --> $DIR/future-prelude-collision.rs:56:18
3    |
4 LL |     let _: u32 = 3u8.try_into().unwrap();
5    |                  ^^^^^^^^^^^^^^ help: disambiguate the associated function: `TryIntoU32::try_into(3u8)`
6    |
7 note: the lint level is defined here
8   --> $DIR/future-prelude-collision.rs:4:9
9    |
10 LL | #![warn(rust_2021_prelude_collisions)]
11    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
13    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
14
15 warning: trait-associated function `try_from` will become ambiguous in Rust 2021
16   --> $DIR/future-prelude-collision.rs:61:13
17    |
18 LL |     let _ = u32::try_from(3u8).unwrap();
19    |             ^^^^^^^^^^^^^ help: disambiguate the associated function: `<u32 as TryFromU8>::try_from`
20    |
21    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
22    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
23
24 warning: trait-associated function `from_iter` will become ambiguous in Rust 2021
25   --> $DIR/future-prelude-collision.rs:66:13
26    |
27 LL |     let _ = <Vec<u8>>::from_iter(vec![1u8, 2, 3, 4, 5, 6].into_iter());
28    |             ^^^^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `<Vec<u8> as FromByteIterator>::from_iter`
29    |
30    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
31    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
32
33 warning: trait-associated function `try_from` will become ambiguous in Rust 2021
34   --> $DIR/future-prelude-collision.rs:74:18
35    |
36 LL |     let _: u32 = <_>::try_from(3u8).unwrap();
37    |                  ^^^^^^^^^^^^^ help: disambiguate the associated function: `<_ as TryFromU8>::try_from`
38    |
39    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
40    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
41
42 warning: trait method `try_into` will become ambiguous in Rust 2021
43   --> $DIR/future-prelude-collision.rs:79:18
44    |
45 LL |     let _: u32 = (&3u8).try_into().unwrap();
46    |                  ^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `TryIntoU32::try_into(*(&3u8))`
47    |
48    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
49    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
50
51 warning: trait method `try_into` will become ambiguous in Rust 2021
52   --> $DIR/future-prelude-collision.rs:84:18
53    |
54 LL |     let _: u32 = 3.0.try_into().unwrap();
55    |                  ^^^^^^^^^^^^^^ help: disambiguate the associated function: `TryIntoU32::try_into(&3.0)`
56    |
57    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
58    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
59
60 warning: trait method `try_into` will become ambiguous in Rust 2021
61   --> $DIR/future-prelude-collision.rs:90:18
62    |
63 LL |     let _: u32 = mut_ptr.try_into().unwrap();
64    |                  ^^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `TryIntoU32::try_into(mut_ptr as *const _)`
65    |
66    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
67    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
68
69 warning: trait-associated function `try_from` will become ambiguous in Rust 2021
70   --> $DIR/future-prelude-collision.rs:95:13
71    |
72 LL |     let _ = U32Alias::try_from(3u8).unwrap();
73    |             ^^^^^^^^^^^^^^^^^^ help: disambiguate the associated function: `<U32Alias as TryFromU8>::try_from`
74    |
75    = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
76    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/prelude.html>
77
78 warning: 8 warnings emitted
79