Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/librustc_typeck/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@ Erroneous code example:

```compile_fail
#[repr(i32)]
enum NightWatch {} // error: unsupported representation for zero-variant enum
enum NightsWatch {} // error: unsupported representation for zero-variant enum
```

It is impossible to define an integer type to be used to represent zero-variant
Expand All @@ -1184,16 +1184,16 @@ two solutions. Either you add variants in your enum:

```
#[repr(i32)]
enum NightWatch {
JohnSnow,
enum NightsWatch {
JonSnow,
Commander,
}
```

or you remove the integer represention of your enum:

```
enum NightWatch {}
enum NightsWatch {}
```
"##,

Expand Down