Skip to content

Commit ee3a729

Browse files
committed
enable feature gate in E0795.md
1 parent a723b01 commit ee3a729

File tree

1 file changed

+2
-2
lines changed
  • compiler/rustc_error_codes/src/error_codes

1 file changed

+2
-2
lines changed

Diff for: compiler/rustc_error_codes/src/error_codes/E0795.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Invalid argument for the `offset_of!` macro.
33
Erroneous code example:
44

55
```compile_fail,E0795
6-
#![feature(offset_of)]
6+
#![feature(offset_of, offset_of_enum)]
77
88
let x = std::mem::offset_of!(Option<u8>, Some);
99
```
@@ -16,7 +16,7 @@ The offset of the contained `u8` in the `Option<u8>` can be found by specifying
1616
the field name `0`:
1717

1818
```
19-
#![feature(offset_of)]
19+
#![feature(offset_of, offset_of_enum)]
2020
2121
let x: usize = std::mem::offset_of!(Option<u8>, Some.0);
2222
```

0 commit comments

Comments
 (0)