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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
error: expected one of `!`, `.`, `::`, `;`, `?`, `const`, `else`, `mut`, `{`, or an operator, found `1`
--> $DIR/raw-no-const-mut.rs:2:18
|
LL | let x = &raw 1;
| ^ expected one of 10 possible tokens
|
help: `&raw` must be followed by `const` or `mut` to be a raw reference expression
|
LL | let x = &raw const 1;
| +++++
LL | let x = &raw mut 1;
| +++
error: expected one of `!`, `,`, `.`, `::`, `?`, `]`, `const`, `mut`, `{`, or an operator, found `2`
--> $DIR/raw-no-const-mut.rs:7:25
|
LL | [&raw const 1, &raw 2]
| ^ expected one of 10 possible tokens
|
help: `&raw` must be followed by `const` or `mut` to be a raw reference expression
|
LL | [&raw const 1, &raw const 2]
| +++++
LL | [&raw const 1, &raw mut 2]
| +++
help: missing `,`
|
LL | [&raw const 1, &raw, 2]
| +
error: expected `{`, found `z`
--> $DIR/raw-no-const-mut.rs:14:18
|
LL | if x == &raw z {}
| ^ expected `{`
|
note: the `if` expression is missing a block after this condition
--> $DIR/raw-no-const-mut.rs:14:8
|
LL | if x == &raw z {}
| ^^^^^^^^^
help: `&raw` must be followed by `const` or `mut` to be a raw reference expression
|
LL | if x == &raw const z {}
| +++++
LL | if x == &raw mut z {}
| +++
error: expected one of `!`, `)`, `,`, `.`, `::`, `?`, `const`, `mut`, `{`, or an operator, found `2`
--> $DIR/raw-no-const-mut.rs:19:12
|
LL | f(&raw 2);
| ^ expected one of 10 possible tokens
|
help: `&raw` must be followed by `const` or `mut` to be a raw reference expression
|
LL | f(&raw const 2);
| +++++
LL | f(&raw mut 2);
| +++
help: missing `,`
|
LL | f(&raw, 2);
| +
error: expected one of `!`, `.`, `::`, `;`, `?`, `const`, `mut`, `{`, `}`, or an operator, found `1`
--> $DIR/raw-no-const-mut.rs:27:14
|
LL | x = &raw 1;
| ^ expected one of 10 possible tokens
|
help: `&raw` must be followed by `const` or `mut` to be a raw reference expression
|
LL | x = &raw const 1;
| +++++
LL | x = &raw mut 1;
| +++
error[E0425]: cannot find value `raw` in this scope
--> $DIR/raw-no-const-mut.rs:7:21
|
LL | [&raw const 1, &raw 2]
| ^^^ not found in this scope
error[E0425]: cannot find value `raw` in this scope
--> $DIR/raw-no-const-mut.rs:19:8
|
LL | f(&raw 2);
| ^^^ not found in this scope
error[E0745]: cannot take address of a temporary
--> $DIR/raw-no-const-mut.rs:7:17
|
LL | [&raw const 1, &raw 2]
| ^ temporary value
error[E0425]: cannot find function `f` in this scope
--> $DIR/raw-no-const-mut.rs:19:5
|
LL | fn a() {
| ------ similarly named function `a` defined here
...
LL | f(&raw 2);
| ^ help: a function with a similar name exists: `a`
error: aborting due to 9 previous errors
Some errors have detailed explanations: E0425, E0745.
For more information about an error, try `rustc --explain E0425`.
|