fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.8 KiB63 linesraw
1error[E0308]: mismatched types
2  --> $DIR/issue-71676-1.rs:43:24
3   |
4LL |     let _: *const u8 = &a;
5   |            ---------   ^^ expected `*const u8`, found `&Emm`
6   |            |
7   |            expected due to this
8   |
9   = note: expected raw pointer `*const u8`
10                found reference `&Emm`
11help: consider dereferencing
12   |
13LL |     let _: *const u8 = &***a;
14   |                         +++
15
16error[E0308]: mismatched types
17  --> $DIR/issue-71676-1.rs:46:22
18   |
19LL |     let _: *mut u8 = &a;
20   |            -------   ^^ types differ in mutability
21   |            |
22   |            expected due to this
23   |
24   = note: expected raw pointer `*mut u8`
25                found reference `&Emm`
26help: consider dereferencing
27   |
28LL |     let _: *mut u8 = &mut ***a;
29   |                       +++++++
30
31error[E0308]: mismatched types
32  --> $DIR/issue-71676-1.rs:49:24
33   |
34LL |     let _: *const u8 = &mut a;
35   |            ---------   ^^^^^^ expected `*const u8`, found `&mut Emm`
36   |            |
37   |            expected due to this
38   |
39   = note:    expected raw pointer `*const u8`
40           found mutable reference `&mut Emm`
41help: consider dereferencing
42   |
43LL |     let _: *const u8 = &***a;
44   |                         ~~~
45
46error[E0308]: mismatched types
47  --> $DIR/issue-71676-1.rs:52:22
48   |
49LL |     let _: *mut u8 = &mut a;
50   |            -------   ^^^^^^ expected `*mut u8`, found `&mut Emm`
51   |            |
52   |            expected due to this
53   |
54   = note:    expected raw pointer `*mut u8`
55           found mutable reference `&mut Emm`
56help: consider dereferencing
57   |
58LL |     let _: *mut u8 = &mut ***a;
59   |                           +++
60
61error: aborting due to 4 previous errors
62
63For more information about this error, try `rustc --explain E0308`.