about summary refs log tree commit diff
path: root/compiler/rustc_error_codes
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-11-05 13:44:59 +0000
committerbors <bors@rust-lang.org>2023-11-05 13:44:59 +0000
commit992943dbaeee9d9829e82a95b788ab845ad38d0c (patch)
tree58557fc9acb43fe01f96020691e1beee5a86af32 /compiler/rustc_error_codes
parent04817ff00cfa1ec00a9babcb2ade1e3f2874d9bd (diff)
parent00a9ed34b1afad45c13c58acc8441ab9442d2cdd (diff)
downloadrust-992943dbaeee9d9829e82a95b788ab845ad38d0c.tar.gz
rust-992943dbaeee9d9829e82a95b788ab845ad38d0c.zip
Auto merge of #117537 - GKFX:offset-of-enum-feature, r=cjgillot
Feature gate enums in offset_of

As requested at https://github.com/rust-lang/rust/issues/106655#issuecomment-1790815262, put enums in offset_of behind their own feature gate.

`@rustbot` label F-offset_of
Diffstat (limited to 'compiler/rustc_error_codes')
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0795.md4
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);
 ```