blob: 45f3c5549f7ef3b5c85c3b7663c8d9c2a02da4d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
error: `->` is not valid syntax for field accesses and method calls
--> $DIR/expr-rarrow-call-on-a-raw-pointer.rs:13:10
|
LL | named->foo += 1;
| ^^
|
= help: the `.` operator will automatically dereference the value, except if the value is a raw pointer
help: try using `.` instead
|
LL - named->foo += 1;
LL + named.foo += 1;
|
error: `->` is not valid syntax for field accesses and method calls
--> $DIR/expr-rarrow-call-on-a-raw-pointer.rs:18:12
|
LL | unnamed->0 += 1;
| ^^
|
= help: the `.` operator will automatically dereference the value, except if the value is a raw pointer
help: try using `.` instead
|
LL - unnamed->0 += 1;
LL + unnamed.0 += 1;
|
error[E0609]: no field `foo` on type `*mut Named`
--> $DIR/expr-rarrow-call-on-a-raw-pointer.rs:13:12
|
LL | named->foo += 1;
| ^^^ unknown field
|
help: `named` is a raw pointer; try dereferencing it
|
LL - named->foo += 1;
LL + (*named).foo += 1;
|
error[E0609]: no field `0` on type `*mut Unnamed`
--> $DIR/expr-rarrow-call-on-a-raw-pointer.rs:18:14
|
LL | unnamed->0 += 1;
| ^ unknown field
|
help: `unnamed` is a raw pointer; try dereferencing it
|
LL - unnamed->0 += 1;
LL + (*unnamed).0 += 1;
|
error: aborting due to 4 previous errors
For more information about this error, try `rustc --explain E0609`.
|