File: offset-of-self.stderr

package info (click to toggle)
rustc 1.85.0%2Bdfsg3-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, sid, trixie
  • size: 893,396 kB
  • sloc: xml: 158,127; python: 35,830; javascript: 19,497; cpp: 19,002; sh: 17,245; ansic: 13,127; asm: 4,376; makefile: 1,051; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (63 lines) | stat: -rw-r--r-- 1,747 bytes parent folder | download | duplicates (3)
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
error: offset_of expects dot-separated field and variant names
  --> $DIR/offset-of-self.rs:18:26
   |
LL |         offset_of!(Self, Self::v);
   |                          ^^^^^^^

error[E0412]: cannot find type `S` in module `self`
  --> $DIR/offset-of-self.rs:32:26
   |
LL |         offset_of!(self::S, v);
   |                          ^ not found in `self`
   |
help: consider importing this struct
   |
LL +     use S;
   |
help: if you import `S`, refer to it directly
   |
LL -         offset_of!(self::S, v);
LL +         offset_of!(S, v);
   |

error[E0411]: cannot find type `Self` in this scope
  --> $DIR/offset-of-self.rs:49:16
   |
LL | fn main() {
   |    ---- `Self` not allowed in a function
LL |     offset_of!(self::S, v);
LL |     offset_of!(Self, v);
   |                ^^^^ `Self` is only available in impls, traits, and type definitions

error[E0609]: no field `Self` on type `S`
  --> $DIR/offset-of-self.rs:19:23
   |
LL |         offset_of!(S, Self);
   |                       ^^^^
   |
   = note: available fields are: `v`, `w`

error[E0616]: field `v` of struct `T` is private
  --> $DIR/offset-of-self.rs:38:30
   |
LL |             offset_of!(Self, v)
   |                              ^ private field

error[E0609]: no field `self` on type `S`
  --> $DIR/offset-of-self.rs:51:19
   |
LL |     offset_of!(S, self);
   |                   ^^^^
   |
   = note: available fields are: `v`, `w`

error[E0609]: no field `self` on type `u8`
  --> $DIR/offset-of-self.rs:52:21
   |
LL |     offset_of!(S, v.self);
   |                     ^^^^

error: aborting due to 7 previous errors

Some errors have detailed explanations: E0411, E0412, E0609, E0616.
For more information about an error, try `rustc --explain E0411`.