Split remaining offset_of features into new tracking issues

This commit is contained in:
George Bateman 2024-01-19 20:29:40 +00:00
parent 803b810eac
commit 7924c9bcdf
No known key found for this signature in database
GPG Key ID: C417AA9C4039EFCF
4 changed files with 15 additions and 10 deletions

View File

@ -549,9 +549,9 @@ pub fn internal(&self, feature: Symbol) -> bool {
/// casts in safe Rust to `dyn Trait` for such a `Trait` is also forbidden. /// casts in safe Rust to `dyn Trait` for such a `Trait` is also forbidden.
(unstable, object_safe_for_dispatch, "1.40.0", Some(43561)), (unstable, object_safe_for_dispatch, "1.40.0", Some(43561)),
/// Allows using enums in offset_of! /// Allows using enums in offset_of!
(unstable, offset_of_enum, "1.75.0", Some(106655)), (unstable, offset_of_enum, "1.75.0", Some(120141)),
/// Allows using multiple nested field accesses in offset_of! /// Allows using multiple nested field accesses in offset_of!
(unstable, offset_of_nested, "CURRENT_RUSTC_VERSION", Some(106655)), (unstable, offset_of_nested, "CURRENT_RUSTC_VERSION", Some(120140)),
/// Allows using `#[optimize(X)]`. /// Allows using `#[optimize(X)]`.
(unstable, optimize_attribute, "1.34.0", Some(54882)), (unstable, optimize_attribute, "1.34.0", Some(54882)),
/// Allows macro attributes on expressions, statements and non-inline modules. /// Allows macro attributes on expressions, statements and non-inline modules.

View File

@ -3250,7 +3250,7 @@ fn check_offset_of(
&& !self.tcx.features().offset_of_nested && !self.tcx.features().offset_of_nested
{ {
rustc_session::parse::feature_err( rustc_session::parse::feature_err(
&self.tcx.sess.parse_sess, &self.tcx.sess,
sym::offset_of_nested, sym::offset_of_nested,
ident_2.span, ident_2.span,
"only a single ident or integer is stable as the field in offset_of", "only a single ident or integer is stable as the field in offset_of",

View File

@ -13,7 +13,7 @@ error[E0658]: using enums in offset_of is experimental
LL | offset_of!(Alpha, One); LL | offset_of!(Alpha, One);
| ^^^ | ^^^
| |
= note: see issue #106655 <https://github.com/rust-lang/rust/issues/106655> for more information = note: see issue #120141 <https://github.com/rust-lang/rust/issues/120141> for more information
= help: add `#![feature(offset_of_enum)]` to the crate attributes to enable = help: add `#![feature(offset_of_enum)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
@ -29,7 +29,7 @@ error[E0658]: using enums in offset_of is experimental
LL | offset_of!(Alpha, Two.0); LL | offset_of!(Alpha, Two.0);
| ^^^ | ^^^
| |
= note: see issue #106655 <https://github.com/rust-lang/rust/issues/106655> for more information = note: see issue #120141 <https://github.com/rust-lang/rust/issues/120141> for more information
= help: add `#![feature(offset_of_enum)]` to the crate attributes to enable = help: add `#![feature(offset_of_enum)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

View File

@ -4,8 +4,9 @@ error[E0658]: only a single ident or integer is stable as the field in offset_of
LL | offset_of!(Alpha, Two.0); LL | offset_of!(Alpha, Two.0);
| ^ | ^
| |
= note: see issue #106655 <https://github.com/rust-lang/rust/issues/106655> for more information = note: see issue #120140 <https://github.com/rust-lang/rust/issues/120140> for more information
= help: add `#![feature(offset_of_nested)]` to the crate attributes to enable = help: add `#![feature(offset_of_nested)]` 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[E0658]: only a single ident or integer is stable as the field in offset_of error[E0658]: only a single ident or integer is stable as the field in offset_of
--> $DIR/feature-gate-offset-of-nested.rs:24:33 --> $DIR/feature-gate-offset-of-nested.rs:24:33
@ -19,8 +20,9 @@ LL | | offset_of!((S, ()), 0.c);
LL | | offset_of!(S, c.t); LL | | offset_of!(S, c.t);
... | ... |
| |
= note: see issue #106655 <https://github.com/rust-lang/rust/issues/106655> for more information = note: see issue #120140 <https://github.com/rust-lang/rust/issues/120140> for more information
= help: add `#![feature(offset_of_nested)]` to the crate attributes to enable = help: add `#![feature(offset_of_nested)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
= note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: only a single ident or integer is stable as the field in offset_of error[E0658]: only a single ident or integer is stable as the field in offset_of
@ -29,8 +31,9 @@ error[E0658]: only a single ident or integer is stable as the field in offset_of
LL | offset_of!(S, b.0); LL | offset_of!(S, b.0);
| ^ | ^
| |
= note: see issue #106655 <https://github.com/rust-lang/rust/issues/106655> for more information = note: see issue #120140 <https://github.com/rust-lang/rust/issues/120140> for more information
= help: add `#![feature(offset_of_nested)]` to the crate attributes to enable = help: add `#![feature(offset_of_nested)]` 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[E0658]: only a single ident or integer is stable as the field in offset_of error[E0658]: only a single ident or integer is stable as the field in offset_of
--> $DIR/feature-gate-offset-of-nested.rs:26:27 --> $DIR/feature-gate-offset-of-nested.rs:26:27
@ -38,8 +41,9 @@ error[E0658]: only a single ident or integer is stable as the field in offset_of
LL | offset_of!((S, ()), 0.c); LL | offset_of!((S, ()), 0.c);
| ^ | ^
| |
= note: see issue #106655 <https://github.com/rust-lang/rust/issues/106655> for more information = note: see issue #120140 <https://github.com/rust-lang/rust/issues/120140> for more information
= help: add `#![feature(offset_of_nested)]` to the crate attributes to enable = help: add `#![feature(offset_of_nested)]` 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[E0658]: only a single ident or integer is stable as the field in offset_of error[E0658]: only a single ident or integer is stable as the field in offset_of
--> $DIR/feature-gate-offset-of-nested.rs:27:21 --> $DIR/feature-gate-offset-of-nested.rs:27:21
@ -47,8 +51,9 @@ error[E0658]: only a single ident or integer is stable as the field in offset_of
LL | offset_of!(S, c.t); LL | offset_of!(S, c.t);
| ^ | ^
| |
= note: see issue #106655 <https://github.com/rust-lang/rust/issues/106655> for more information = note: see issue #120140 <https://github.com/rust-lang/rust/issues/120140> for more information
= help: add `#![feature(offset_of_nested)]` to the crate attributes to enable = help: add `#![feature(offset_of_nested)]` 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: aborting due to 5 previous errors error: aborting due to 5 previous errors