|
| 1 | +error: expected one of `!`, `.`, `::`, `;`, `?`, `const`, `else`, `mut`, `{`, or an operator, found `1` |
| 2 | + --> $DIR/raw-no-const-mut.rs:2:18 |
| 3 | + | |
| 4 | +LL | let x = &raw 1; |
| 5 | + | ^ expected one of 10 possible tokens |
| 6 | + | |
| 7 | +help: `&raw` must be followed by `const` or `mut` to be a raw reference expression |
| 8 | + | |
| 9 | +LL | let x = &raw const 1; |
| 10 | + | +++++ |
| 11 | +LL | let x = &raw mut 1; |
| 12 | + | +++ |
| 13 | + |
| 14 | +error: expected one of `!`, `,`, `.`, `::`, `?`, `]`, `const`, `mut`, `{`, or an operator, found `2` |
| 15 | + --> $DIR/raw-no-const-mut.rs:7:25 |
| 16 | + | |
| 17 | +LL | [&raw const 1, &raw 2] |
| 18 | + | ^ expected one of 10 possible tokens |
| 19 | + | |
| 20 | +help: `&raw` must be followed by `const` or `mut` to be a raw reference expression |
| 21 | + | |
| 22 | +LL | [&raw const 1, &raw const 2] |
| 23 | + | +++++ |
| 24 | +LL | [&raw const 1, &raw mut 2] |
| 25 | + | +++ |
| 26 | +help: missing `,` |
| 27 | + | |
| 28 | +LL | [&raw const 1, &raw, 2] |
| 29 | + | + |
| 30 | + |
| 31 | +error: expected `{`, found `z` |
| 32 | + --> $DIR/raw-no-const-mut.rs:14:18 |
| 33 | + | |
| 34 | +LL | if x == &raw z {} |
| 35 | + | ^ expected `{` |
| 36 | + | |
| 37 | +note: the `if` expression is missing a block after this condition |
| 38 | + --> $DIR/raw-no-const-mut.rs:14:8 |
| 39 | + | |
| 40 | +LL | if x == &raw z {} |
| 41 | + | ^^^^^^^^^ |
| 42 | +help: `&raw` must be followed by `const` or `mut` to be a raw reference expression |
| 43 | + | |
| 44 | +LL | if x == &raw const z {} |
| 45 | + | +++++ |
| 46 | +LL | if x == &raw mut z {} |
| 47 | + | +++ |
| 48 | + |
| 49 | +error: expected one of `!`, `)`, `,`, `.`, `::`, `?`, `const`, `mut`, `{`, or an operator, found `2` |
| 50 | + --> $DIR/raw-no-const-mut.rs:19:12 |
| 51 | + | |
| 52 | +LL | f(&raw 2); |
| 53 | + | ^ expected one of 10 possible tokens |
| 54 | + | |
| 55 | +help: `&raw` must be followed by `const` or `mut` to be a raw reference expression |
| 56 | + | |
| 57 | +LL | f(&raw const 2); |
| 58 | + | +++++ |
| 59 | +LL | f(&raw mut 2); |
| 60 | + | +++ |
| 61 | +help: missing `,` |
| 62 | + | |
| 63 | +LL | f(&raw, 2); |
| 64 | + | + |
| 65 | + |
| 66 | +error: expected one of `!`, `.`, `::`, `;`, `?`, `const`, `mut`, `{`, `}`, or an operator, found `1` |
| 67 | + --> $DIR/raw-no-const-mut.rs:27:14 |
| 68 | + | |
| 69 | +LL | x = &raw 1; |
| 70 | + | ^ expected one of 10 possible tokens |
| 71 | + | |
| 72 | +help: `&raw` must be followed by `const` or `mut` to be a raw reference expression |
| 73 | + | |
| 74 | +LL | x = &raw const 1; |
| 75 | + | +++++ |
| 76 | +LL | x = &raw mut 1; |
| 77 | + | +++ |
| 78 | + |
| 79 | +error[E0425]: cannot find value `raw` in this scope |
| 80 | + --> $DIR/raw-no-const-mut.rs:7:21 |
| 81 | + | |
| 82 | +LL | [&raw const 1, &raw 2] |
| 83 | + | ^^^ not found in this scope |
| 84 | + |
| 85 | +error[E0425]: cannot find value `raw` in this scope |
| 86 | + --> $DIR/raw-no-const-mut.rs:19:8 |
| 87 | + | |
| 88 | +LL | f(&raw 2); |
| 89 | + | ^^^ not found in this scope |
| 90 | + |
| 91 | +error[E0745]: cannot take address of a temporary |
| 92 | + --> $DIR/raw-no-const-mut.rs:7:17 |
| 93 | + | |
| 94 | +LL | [&raw const 1, &raw 2] |
| 95 | + | ^ temporary value |
| 96 | + |
| 97 | +error[E0425]: cannot find function `f` in this scope |
| 98 | + --> $DIR/raw-no-const-mut.rs:19:5 |
| 99 | + | |
| 100 | +LL | fn a() { |
| 101 | + | ------ similarly named function `a` defined here |
| 102 | +... |
| 103 | +LL | f(&raw 2); |
| 104 | + | ^ help: a function with a similar name exists: `a` |
| 105 | + |
| 106 | +error: aborting due to 9 previous errors |
| 107 | + |
| 108 | +Some errors have detailed explanations: E0425, E0745. |
| 109 | +For more information about an error, try `rustc --explain E0425`. |
0 commit comments