]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rust-2021/future-prelude-collision-shadow.stderr
track_caller for slice length assertions
[rust.git] / src / test / ui / rust-2021 / future-prelude-collision-shadow.stderr
1 error[E0599]: no method named `try_into` found for type `u8` in the current scope
2   --> $DIR/future-prelude-collision-shadow.rs:27:26
3    |
4 LL |         let _: u32 = 3u8.try_into().unwrap();
5    |                          ^^^^^^^^ method not found in `u8`
6    |
7   ::: $SRC_DIR/core/src/convert/mod.rs:LL:COL
8    |
9 LL |     fn try_into(self) -> Result<T, Self::Error>;
10    |        --------
11    |        |
12    |        the method is available for `Box<u8>` here
13    |        the method is available for `Pin<u8>` here
14    |        the method is available for `Arc<u8>` here
15    |        the method is available for `Rc<u8>` here
16    |
17    = help: items from traits can only be used if the trait is in scope
18 help: consider wrapping the receiver expression with the appropriate type
19    |
20 LL |         let _: u32 = Box::new(3u8).try_into().unwrap();
21    |                      +++++++++   +
22 help: consider wrapping the receiver expression with the appropriate type
23    |
24 LL |         let _: u32 = Pin::new(3u8).try_into().unwrap();
25    |                      +++++++++   +
26 help: consider wrapping the receiver expression with the appropriate type
27    |
28 LL |         let _: u32 = Arc::new(3u8).try_into().unwrap();
29    |                      +++++++++   +
30 help: consider wrapping the receiver expression with the appropriate type
31    |
32 LL |         let _: u32 = Rc::new(3u8).try_into().unwrap();
33    |                      ++++++++   +
34 help: the following traits are implemented but not in scope; perhaps add a `use` for one of them:
35    |
36 LL |     use crate::m::TryIntoU32;
37    |
38 LL |     use std::convert::TryInto;
39    |
40
41 error: aborting due to previous error
42
43 For more information about this error, try `rustc --explain E0599`.