fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: no rules expected the token `::` 2 --> $DIR/offset-of-self.rs:20:30 3 | 4LL | offset_of!(Self, Self::v); 5 | ^^ no rules expected this token in macro call 6 | 7 = note: while trying to match sequence start 8 9error: expected identifier, found keyword `Self` 10 --> $DIR/offset-of-self.rs:21:23 11 | 12LL | offset_of!(S, Self); 13 | ^^^^ expected identifier, found keyword 14 15error: expected identifier, found keyword `self` 16 --> $DIR/offset-of-self.rs:54:19 17 | 18LL | offset_of!(S, self); 19 | ^^^^ expected identifier, found keyword 20 21error: expected identifier, found keyword `self` 22 --> $DIR/offset-of-self.rs:56:21 23 | 24LL | offset_of!(S, v.self); 25 | ^^^^ expected identifier, found keyword 26 27error[E0412]: cannot find type `S` in module `self` 28 --> $DIR/offset-of-self.rs:35:26 29 | 30LL | offset_of!(self::S, v); 31 | ^ not found in `self` 32 | 33help: consider importing this struct 34 | 35LL + use S; 36 | 37help: if you import `S`, refer to it directly 38 | 39LL - offset_of!(self::S, v); 40LL + offset_of!(S, v); 41 | 42 43error[E0411]: cannot find type `Self` in this scope 44 --> $DIR/offset-of-self.rs:52:16 45 | 46LL | fn main() { 47 | ---- `Self` not allowed in a function 48LL | offset_of!(self::S, v); 49LL | offset_of!(Self, v); 50 | ^^^^ `Self` is only available in impls, traits, and type definitions 51 52error[E0609]: no field `Self` on type `S` 53 --> $DIR/offset-of-self.rs:21:23 54 | 55LL | offset_of!(S, Self); 56 | ^^^^ 57 58error[E0616]: field `v` of struct `T` is private 59 --> $DIR/offset-of-self.rs:41:30 60 | 61LL | offset_of!(Self, v) 62 | ^ private field 63 64error[E0609]: no field `self` on type `S` 65 --> $DIR/offset-of-self.rs:54:19 66 | 67LL | offset_of!(S, self); 68 | ^^^^ 69 70error[E0609]: no field `self` on type `u8` 71 --> $DIR/offset-of-self.rs:56:21 72 | 73LL | offset_of!(S, v.self); 74 | ^^^^ 75 76error: aborting due to 10 previous errors 77 78Some errors have detailed explanations: E0411, E0412, E0609, E0616. 79For more information about an error, try `rustc --explain E0411`.