File: unnamed-enum-field-issue-121757.stderr

package info (click to toggle)
rustc-web 1.78.0%2Bdfsg1-2~deb11u3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,245,360 kB
  • sloc: xml: 147,985; javascript: 18,022; sh: 11,083; python: 10,265; ansic: 6,172; cpp: 5,023; asm: 4,390; makefile: 4,269
file content (45 lines) | stat: -rw-r--r-- 1,460 bytes parent folder | download | duplicates (2)
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
error[E0658]: unnamed fields are not yet fully implemented
  --> $DIR/unnamed-enum-field-issue-121757.rs:9:5
   |
LL |     _: AstKind<'ast>
   |     ^
   |
   = note: see issue #49804 <https://github.com/rust-lang/rust/issues/49804> for more information
   = help: add `#![feature(unnamed_fields)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error: struct with unnamed fields must have `#[repr(C)]` representation
  --> $DIR/unnamed-enum-field-issue-121757.rs:6:1
   |
LL | struct AstStructure<'ast> {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^ struct `AstStructure` defined here
   |
note: unnamed field defined here
  --> $DIR/unnamed-enum-field-issue-121757.rs:9:5
   |
LL |     _: AstKind<'ast>
   |     ^^^^^^^^^^^^^^^^
help: add `#[repr(C)]` to this struct
   |
LL + #[repr(C)]
LL | struct AstStructure<'ast> {
   |

error: unnamed fields can only have struct or union types
  --> $DIR/unnamed-enum-field-issue-121757.rs:9:5
   |
LL |     _: AstKind<'ast>
   |     ^^^^^^^^^^^^^^^^

error[E0609]: no field `kind` on type `&'ast AstStructure<'ast>`
  --> $DIR/unnamed-enum-field-issue-121757.rs:21:15
   |
LL |     match ast.kind {}
   |               ^^^^ unknown field
   |
   = note: available fields are: `id`, `_`

error: aborting due to 4 previous errors

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