]> git.lizzy.rs Git - rust.git/blob - src/test/ui/ptr-coercion.stderr
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / ui / ptr-coercion.stderr
1 error[E0308]: mismatched types
2   --> $DIR/ptr-coercion.rs:17:25
3    |
4 LL |     let x: *mut isize = x; //~  ERROR mismatched types
5    |                         ^ types differ in mutability
6    |
7    = note: expected type `*mut isize`
8               found type `*const isize`
9
10 error[E0308]: mismatched types
11   --> $DIR/ptr-coercion.rs:23:25
12    |
13 LL |     let x: *mut isize = &42; //~  ERROR mismatched types
14    |                         ^^^ types differ in mutability
15    |
16    = note: expected type `*mut isize`
17               found type `&isize`
18
19 error[E0308]: mismatched types
20   --> $DIR/ptr-coercion.rs:29:25
21    |
22 LL |     let x: *mut isize = x; //~  ERROR mismatched types
23    |                         ^ types differ in mutability
24    |
25    = note: expected type `*mut isize`
26               found type `*const isize`
27
28 error: aborting due to 3 previous errors
29
30 For more information about this error, try `rustc --explain E0308`.