Skip to content

Commit 7924c9b

Browse files
committed
Split remaining offset_of features into new tracking issues
1 parent 803b810 commit 7924c9b

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

compiler/rustc_feature/src/unstable.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -549,9 +549,9 @@ declare_features! (
549549
/// casts in safe Rust to `dyn Trait` for such a `Trait` is also forbidden.
550550
(unstable, object_safe_for_dispatch, "1.40.0", Some(43561)),
551551
/// Allows using enums in offset_of!
552-
(unstable, offset_of_enum, "1.75.0", Some(106655)),
552+
(unstable, offset_of_enum, "1.75.0", Some(120141)),
553553
/// Allows using multiple nested field accesses in offset_of!
554-
(unstable, offset_of_nested, "CURRENT_RUSTC_VERSION", Some(106655)),
554+
(unstable, offset_of_nested, "CURRENT_RUSTC_VERSION", Some(120140)),
555555
/// Allows using `#[optimize(X)]`.
556556
(unstable, optimize_attribute, "1.34.0", Some(54882)),
557557
/// Allows macro attributes on expressions, statements and non-inline modules.

compiler/rustc_hir_typeck/src/expr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3250,7 +3250,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
32503250
&& !self.tcx.features().offset_of_nested
32513251
{
32523252
rustc_session::parse::feature_err(
3253-
&self.tcx.sess.parse_sess,
3253+
&self.tcx.sess,
32543254
sym::offset_of_nested,
32553255
ident_2.span,
32563256
"only a single ident or integer is stable as the field in offset_of",

tests/ui/feature-gates/feature-gate-offset-of-enum.stderr

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

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

tests/ui/feature-gates/feature-gate-offset-of-nested.stderr

+10-5
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ error[E0658]: only a single ident or integer is stable as the field in offset_of
44
LL | offset_of!(Alpha, Two.0);
55
| ^
66
|
7-
= note: see issue #106655 <https://github.com/rust-lang/rust/issues/106655> for more information
7+
= note: see issue #120140 <https://github.com/rust-lang/rust/issues/120140> for more information
88
= help: add `#![feature(offset_of_nested)]` to the crate attributes to enable
9+
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
910

1011
error[E0658]: only a single ident or integer is stable as the field in offset_of
1112
--> $DIR/feature-gate-offset-of-nested.rs:24:33
@@ -19,8 +20,9 @@ LL | | offset_of!((S, ()), 0.c);
1920
LL | | offset_of!(S, c.t);
2021
... |
2122
|
22-
= note: see issue #106655 <https://github.com/rust-lang/rust/issues/106655> for more information
23+
= note: see issue #120140 <https://github.com/rust-lang/rust/issues/120140> for more information
2324
= help: add `#![feature(offset_of_nested)]` to the crate attributes to enable
25+
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
2426
= note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
2527

2628
error[E0658]: only a single ident or integer is stable as the field in offset_of
@@ -29,26 +31,29 @@ error[E0658]: only a single ident or integer is stable as the field in offset_of
2931
LL | offset_of!(S, b.0);
3032
| ^
3133
|
32-
= note: see issue #106655 <https://github.com/rust-lang/rust/issues/106655> for more information
34+
= note: see issue #120140 <https://github.com/rust-lang/rust/issues/120140> for more information
3335
= help: add `#![feature(offset_of_nested)]` to the crate attributes to enable
36+
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
3437

3538
error[E0658]: only a single ident or integer is stable as the field in offset_of
3639
--> $DIR/feature-gate-offset-of-nested.rs:26:27
3740
|
3841
LL | offset_of!((S, ()), 0.c);
3942
| ^
4043
|
41-
= note: see issue #106655 <https://github.com/rust-lang/rust/issues/106655> for more information
44+
= note: see issue #120140 <https://github.com/rust-lang/rust/issues/120140> for more information
4245
= help: add `#![feature(offset_of_nested)]` to the crate attributes to enable
46+
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
4347

4448
error[E0658]: only a single ident or integer is stable as the field in offset_of
4549
--> $DIR/feature-gate-offset-of-nested.rs:27:21
4650
|
4751
LL | offset_of!(S, c.t);
4852
| ^
4953
|
50-
= note: see issue #106655 <https://github.com/rust-lang/rust/issues/106655> for more information
54+
= note: see issue #120140 <https://github.com/rust-lang/rust/issues/120140> for more information
5155
= help: add `#![feature(offset_of_nested)]` to the crate attributes to enable
56+
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
5257

5358
error: aborting due to 5 previous errors
5459

0 commit comments

Comments
 (0)