about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGeorge Bateman <george.bateman16@gmail.com>2024-01-19 20:29:40 +0000
committerGeorge Bateman <george.bateman16@gmail.com>2024-01-19 21:13:11 +0000
commit7924c9bcdfa0ec5980474ac680439d7fc2a4690f (patch)
tree1d3aed69d47b149f65a48512eb33ed85738fb274
parent803b810eac520c11c7f1ea0a81af535ee9bddd61 (diff)
downloadrust-7924c9bcdfa0ec5980474ac680439d7fc2a4690f.tar.gz
rust-7924c9bcdfa0ec5980474ac680439d7fc2a4690f.zip
Split remaining offset_of features into new tracking issues
-rw-r--r--compiler/rustc_feature/src/unstable.rs4
-rw-r--r--compiler/rustc_hir_typeck/src/expr.rs2
-rw-r--r--tests/ui/feature-gates/feature-gate-offset-of-enum.stderr4
-rw-r--r--tests/ui/feature-gates/feature-gate-offset-of-nested.stderr15
4 files changed, 15 insertions, 10 deletions
diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs
index c512ccc90db..371b651f5e8 100644
--- a/compiler/rustc_feature/src/unstable.rs
+++ b/compiler/rustc_feature/src/unstable.rs
@@ -549,9 +549,9 @@ declare_features! (
     /// casts in safe Rust to `dyn Trait` for such a `Trait` is also forbidden.
     (unstable, object_safe_for_dispatch, "1.40.0", Some(43561)),
     /// 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!
-    (unstable, offset_of_nested, "CURRENT_RUSTC_VERSION", Some(106655)),
+    (unstable, offset_of_nested, "CURRENT_RUSTC_VERSION", Some(120140)),
     /// Allows using `#[optimize(X)]`.
     (unstable, optimize_attribute, "1.34.0", Some(54882)),
     /// Allows macro attributes on expressions, statements and non-inline modules.
diff --git a/compiler/rustc_hir_typeck/src/expr.rs b/compiler/rustc_hir_typeck/src/expr.rs
index 242e8dc95e2..33d7ba6268a 100644
--- a/compiler/rustc_hir_typeck/src/expr.rs
+++ b/compiler/rustc_hir_typeck/src/expr.rs
@@ -3250,7 +3250,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
             && !self.tcx.features().offset_of_nested
         {
             rustc_session::parse::feature_err(
-                &self.tcx.sess.parse_sess,
+                &self.tcx.sess,
                 sym::offset_of_nested,
                 ident_2.span,
                 "only a single ident or integer is stable as the field in offset_of",
diff --git a/tests/ui/feature-gates/feature-gate-offset-of-enum.stderr b/tests/ui/feature-gates/feature-gate-offset-of-enum.stderr
index 02ee54e8607..fc7dd7923f7 100644
--- a/tests/ui/feature-gates/feature-gate-offset-of-enum.stderr
+++ b/tests/ui/feature-gates/feature-gate-offset-of-enum.stderr
@@ -13,7 +13,7 @@ error[E0658]: using enums in offset_of is experimental
 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
    = 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);
    |                       ^^^
    |
-   = 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
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
diff --git a/tests/ui/feature-gates/feature-gate-offset-of-nested.stderr b/tests/ui/feature-gates/feature-gate-offset-of-nested.stderr
index ebc251fd663..f367fc9fa0d 100644
--- a/tests/ui/feature-gates/feature-gate-offset-of-nested.stderr
+++ b/tests/ui/feature-gates/feature-gate-offset-of-nested.stderr
@@ -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);
    |                           ^
    |
-   = 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
+   = 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
   --> $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);
 ...  |
    |
-   = 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
+   = 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)
 
 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);
    |                     ^
    |
-   = 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
+   = 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
   --> $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);
    |                           ^
    |
-   = 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
+   = 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
   --> $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);
    |                     ^
    |
-   = 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
+   = 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