]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/into-convert.stderr
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
[rust.git] / tests / ui / suggestions / into-convert.stderr
1 error[E0308]: mismatched types
2   --> $DIR/into-convert.rs:6:16
3    |
4 LL |     let x: A = B;
5    |            -   ^ expected struct `A`, found struct `B`
6    |            |
7    |            expected due to this
8    |
9 help: call `Into::into` on this expression to convert `B` into `A`
10    |
11 LL |     let x: A = B.into();
12    |                 +++++++
13
14 error[E0308]: mismatched types
15   --> $DIR/into-convert.rs:10:24
16    |
17 LL |     let y: Arc<Path> = PathBuf::new();
18    |            ---------   ^^^^^^^^^^^^^^ expected struct `Arc`, found struct `PathBuf`
19    |            |
20    |            expected due to this
21    |
22    = note: expected struct `Arc<Path>`
23               found struct `PathBuf`
24 help: call `Into::into` on this expression to convert `PathBuf` into `Arc<Path>`
25    |
26 LL |     let y: Arc<Path> = PathBuf::new().into();
27    |                                      +++++++
28
29 error[E0308]: mismatched types
30   --> $DIR/into-convert.rs:14:24
31    |
32 LL |     let z: AtomicU32 = 1;
33    |            ---------   ^ expected struct `AtomicU32`, found integer
34    |            |
35    |            expected due to this
36    |
37 help: call `Into::into` on this expression to convert `{integer}` into `AtomicU32`
38    |
39 LL |     let z: AtomicU32 = 1.into();
40    |                         +++++++
41
42 error: aborting due to 3 previous errors
43
44 For more information about this error, try `rustc --explain E0308`.