diff options
| author | George Bateman <george.bateman16@gmail.com> | 2023-11-03 17:08:32 +0000 |
|---|---|---|
| committer | George Bateman <george.bateman16@gmail.com> | 2023-11-03 17:08:32 +0000 |
| commit | ee3a729cc440e5dbc589acc4c19e92d6e0f305c9 (patch) | |
| tree | 6f9690fef0dc025bc6c634f8303ee9070565f2ff /compiler/rustc_error_codes/src | |
| parent | a723b01ae2d73a43efd445b054a65c75afa5fcba (diff) | |
| download | rust-ee3a729cc440e5dbc589acc4c19e92d6e0f305c9.tar.gz rust-ee3a729cc440e5dbc589acc4c19e92d6e0f305c9.zip | |
enable feature gate in E0795.md
Diffstat (limited to 'compiler/rustc_error_codes/src')
| -rw-r--r-- | compiler/rustc_error_codes/src/error_codes/E0795.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0795.md b/compiler/rustc_error_codes/src/error_codes/E0795.md index 8b4b2dc87fd..20f51441c29 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0795.md +++ b/compiler/rustc_error_codes/src/error_codes/E0795.md @@ -3,7 +3,7 @@ Invalid argument for the `offset_of!` macro. Erroneous code example: ```compile_fail,E0795 -#![feature(offset_of)] +#![feature(offset_of, offset_of_enum)] let x = std::mem::offset_of!(Option<u8>, Some); ``` @@ -16,7 +16,7 @@ The offset of the contained `u8` in the `Option<u8>` can be found by specifying the field name `0`: ``` -#![feature(offset_of)] +#![feature(offset_of, offset_of_enum)] let x: usize = std::mem::offset_of!(Option<u8>, Some.0); ``` |
