Skip to content

Support cfg and cfg_attr on generic parameters - #61547

Merged
bors merged 1 commit into
rust-lang:masterfrom
petrochenkov:cfgen
Jun 19, 2019
Merged

Support cfg and cfg_attr on generic parameters#61547
bors merged 1 commit into
rust-lang:masterfrom
petrochenkov:cfgen

Conversation

@petrochenkov

Copy link
Copy Markdown
Contributor

cfg attributes are supported in all other positions where attributes are accepted at all.

They were previously prohibited in #51283 because they weren't implemented correctly before that and were simply ignored.

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @pnkfelix

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 5, 2019
Comment threadsrc/libsyntax/config.rs Outdated
@CentrilCentril added relnotes Marks issues that should be documented in the release notes of the next release. T-lang Relevant to the language team labels Jun 5, 2019
@Centril

Copy link
Copy Markdown
Contributor

I don't know whether we have any lint check attributes that affect generic parameters, but how does the language interact with those before / after this PR?

@Centril

Copy link
Copy Markdown
Contributor

I see no reason not to do this and every reason to both in terms of consistency and usability. That said, since it is a language change, let's formally approve this change...

@rfcbot merge

@rfcbot

rfcbot commented Jun 5, 2019

Copy link
Copy Markdown

Team member @Centril has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbotrfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Jun 5, 2019
@Centril

Copy link
Copy Markdown
Contributor

N.B. Aaron is on leave so I've checked their box.

@petrochenkov

Copy link
Copy Markdown
ContributorAuthor

@Centril

I don't know whether we have any lint check attributes that affect generic parameters, but how does the language interact with those before / after this PR?

This change is orthogonal to lint checking attributes.
allow/deny and friends still don't work on generic parameters (which is a bug, but low priority).

fnf<#[allow(warnings)]foo>(){}// warning: type parameter `foo` should have an upper camel case name

@Centril

Copy link
Copy Markdown
Contributor

This change is orthogonal to lint checking attributes.

Thanks! Would you mind filing an issue if there isn't one already?

@petrochenkov

Copy link
Copy Markdown
ContributorAuthor

Would you mind filing an issue if there isn't one already?

#61552

@CentrilCentril added this to the 1.37 milestone Jun 7, 2019
@rfcbotrfcbot added the final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. label Jun 9, 2019
@rfcbot

Copy link
Copy Markdown

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbotrfcbot removed the proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. label Jun 9, 2019
@CentrilCentril added S-waiting-on-team and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 10, 2019
@Centril

Copy link
Copy Markdown
Contributor

r? @Centril

r=me rollup on the implementation when FCP completes.

@bors

bors commented Jun 12, 2019

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #60669) made this pull request unmergeable. Please resolve the merge conflicts.

@CentrilCentril added S-waiting-on-fcp Status: PR is in FCP and is awaiting for FCP to complete. and removed S-waiting-on-team labels Jun 13, 2019
@petrochenkov

Copy link
Copy Markdown
ContributorAuthor

@bors r=Centril rollup

@bors

bors commented Jun 19, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 0b58bb3 has been approved by Centril

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 19, 2019
Centril added a commit to Centril/rust that referenced this pull request Jun 19, 2019
Support `cfg` and `cfg_attr` on generic parameters
`cfg` attributes are supported in all other positions where attributes are accepted at all.
They were previously prohibited in rust-lang#51283 because they weren't implemented correctly before that and were simply ignored.
@CentrilCentril mentioned this pull request Jun 19, 2019
Centril added a commit to Centril/rust that referenced this pull request Jun 19, 2019
Support `cfg` and `cfg_attr` on generic parameters
`cfg` attributes are supported in all other positions where attributes are accepted at all.
They were previously prohibited in rust-lang#51283 because they weren't implemented correctly before that and were simply ignored.
@CentrilCentril mentioned this pull request Jun 19, 2019
bors added a commit that referenced this pull request Jun 19, 2019
Rollup of 4 pull requests
Successful merges:
- #60667 ( Add functions for building raw slices to libcore )
- #61547 (Support `cfg` and `cfg_attr` on generic parameters)
- #61861 (Update rustfmt and rls)
- #61940 (Make Place::ty iterate)
Failed merges:
r? @ghost
@bors
bors merged commit 0b58bb3 into rust-lang:masterJun 19, 2019
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Aug 29, 2019
Pkgsrc changes:
* Add a patch to llvm to deal with const dli_saddr.
* Adapt two other patches.
* Cross-build currently fails, so i386, powerpc and sparc64 bootstrap
kits for 1.37.0 are built natively. Missing aarch64 hardware, so that's
not available yet.
* Bump bootstrap requirements to 1.36.0 except for armv7-unknown-netbsd-eabihf
which I've not managed to cross-build.
Upstream changes:
Version 1.37.0 (2019-08-15)
==========================
Language
--------
- `#[must_use]` will now warn if the type is contained in a [tuple][61100],
[`Box`][62228], or an [array][62235] and unused.
- [You can now use the `cfg` and `cfg_attr` attributes on
generic parameters.][61547]
- [You can now use enum variants through type alias.][61682] e.g. You can
write the following:
```rust
type MyOption = Option<u8>;
fn increment_or_zero(x: MyOption) -> u8 {
match x {
MyOption::Some(y) => y + 1,
MyOption::None => 0,
}
}
```
- [You can now use `_` as an identifier for consts.][61347] e.g. You can write
`const _: u32 = 5;`.
- [You can now use `#[repr(align(X)]` on enums.][61229]
- [The `?`/_"Kleene"_ macro operator is now available in the
2015 edition.][60932]
Compiler
--------
- [You can now enable Profile-Guided Optimization with the `-C profile-generate`
and `-C profile-use` flags.][61268] For more information on how to use profile
guided optimization, please refer to the [rustc book][rustc-book-pgo].
- [The `rust-lldb` wrapper script should now work again.][61827]
Libraries
---------
- [`mem::MaybeUninit<T>` is now ABI-compatible with `T`.][61802]
Stabilized APIs
---------------
- [`BufReader::buffer`]
- [`BufWriter::buffer`]
- [`Cell::from_mut`]
- [`Cell<[T]>::as_slice_of_cells`][`Cell<slice>::as_slice_of_cells`]
- [`DoubleEndedIterator::nth_back`]
- [`Option::xor`]
- [`Wrapping::reverse_bits`]
- [`i128::reverse_bits`]
- [`i16::reverse_bits`]
- [`i32::reverse_bits`]
- [`i64::reverse_bits`]
- [`i8::reverse_bits`]
- [`isize::reverse_bits`]
- [`slice::copy_within`]
- [`u128::reverse_bits`]
- [`u16::reverse_bits`]
- [`u32::reverse_bits`]
- [`u64::reverse_bits`]
- [`u8::reverse_bits`]
- [`usize::reverse_bits`]
Cargo
-----
- [`Cargo.lock` files are now included by default when publishing executable crates
with executables.][cargo/7026]
- [You can now specify `default-run="foo"` in `[package]` to specify the
default executable to use for `cargo run`.][cargo/7056]
Misc
----
Compatibility Notes
-------------------
- [Using `...` for inclusive range patterns will now warn by default.][61342]
Please transition your code to using the `..=` syntax for inclusive
ranges instead.
- [Using a trait object without the `dyn` will now warn by default.][61203]
Please transition your code to use `dyn Trait` for trait objects instead.
[62228]: rust-lang/rust#62228
[62235]: rust-lang/rust#62235
[61802]: rust-lang/rust#61802
[61827]: rust-lang/rust#61827
[61547]: rust-lang/rust#61547
[61682]: rust-lang/rust#61682
[61268]: rust-lang/rust#61268
[61342]: rust-lang/rust#61342
[61347]: rust-lang/rust#61347
[61100]: rust-lang/rust#61100
[61203]: rust-lang/rust#61203
[61229]: rust-lang/rust#61229
[60932]: rust-lang/rust#60932
[cargo/7026]: rust-lang/cargo#7026
[cargo/7056]: rust-lang/cargo#7056
[`BufReader::buffer`]: https://doc.rust-lang.org/std/io/struct.BufReader.html#method.buffer
[`BufWriter::buffer`]: https://doc.rust-lang.org/std/io/struct.BufWriter.html#method.buffer
[`Cell::from_mut`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.from_mut
[`Cell<slice>::as_slice_of_cells`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.as_slice_of_cells
[`DoubleEndedIterator::nth_back`]: https://doc.rust-lang.org/std/iter/trait.DoubleEndedIterator.html#method.nth_back
[`Option::xor`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.xor
[`RefCell::try_borrow_unguarded`]: https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.try_borrow_unguarded
[`Wrapping::reverse_bits`]: https://doc.rust-lang.org/std/num/struct.Wrapping.html#method.reverse_bits
[`i128::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i128.html#method.reverse_bits
[`i16::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i16.html#method.reverse_bits
[`i32::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i32.html#method.reverse_bits
[`i64::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i64.html#method.reverse_bits
[`i8::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i8.html#method.reverse_bits
[`isize::reverse_bits`]: https://doc.rust-lang.org/std/primitive.isize.html#method.reverse_bits
[`slice::copy_within`]: https://doc.rust-lang.org/std/primitive.slice.html#method.copy_within
[`u128::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u128.html#method.reverse_bits
[`u16::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u16.html#method.reverse_bits
[`u32::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u32.html#method.reverse_bits
[`u64::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u64.html#method.reverse_bits
[`u8::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u8.html#method.reverse_bits
[`usize::reverse_bits`]: https://doc.rust-lang.org/std/primitive.usize.html#method.reverse_bits
[rustc-book-pgo]: https://doc.rust-lang.org/rustc/profile-guided-optimization.html
@petrochenkov
petrochenkov deleted the cfgen branch February 22, 2025 18:34
ehuss added a commit to ehuss/reference that referenced this pull request Mar 10, 2026
This was stabilized in 1.37 (via
rust-lang/rust#61547), but the documentation
here was never updated.
There is a longer history of these being stabilized and then `cfg` being
removed and then added again, see
rust-lang/rust#48848rust-lang/rust#51279rust-lang/rust#51283.
ehuss added a commit to ehuss/reference that referenced this pull request Mar 10, 2026
This was stabilized in 1.37 (via
rust-lang/rust#61547), but the documentation
here was never updated.
There is a longer history of these being stabilized and then `cfg` being
removed and then added again, see
rust-lang/rust#48848rust-lang/rust#51279rust-lang/rust#51283.
ehuss added a commit to ehuss/reference that referenced this pull request Mar 11, 2026
This was stabilized in 1.37 (via
rust-lang/rust#61547), but the documentation
here was never updated.
There is a longer history of these being stabilized and then `cfg` being
removed and then added again, see
rust-lang/rust#48848rust-lang/rust#51279rust-lang/rust#51283.
ehuss added a commit to ehuss/reference that referenced this pull request Apr 29, 2026
This was stabilized in 1.37 (via
rust-lang/rust#61547), but the documentation
here was never updated.
There is a longer history of these being stabilized and then `cfg` being
removed and then added again, see
rust-lang/rust#48848rust-lang/rust#51279rust-lang/rust#51283.
ehuss added a commit to ehuss/reference that referenced this pull request May 2, 2026
This was stabilized in 1.37 (via
rust-lang/rust#61547), but the documentation
here was never updated.
There is a longer history of these being stabilized and then `cfg` being
removed and then added again, see
rust-lang/rust#48848rust-lang/rust#51279rust-lang/rust#51283.
ehuss added a commit to ehuss/reference that referenced this pull request May 4, 2026
This was stabilized in 1.37 (via
rust-lang/rust#61547), but the documentation
here was never updated.
There is a longer history of these being stabilized and then `cfg` being
removed and then added again, see
rust-lang/rust#48848rust-lang/rust#51279rust-lang/rust#51283.
ehuss added a commit to ehuss/reference that referenced this pull request May 4, 2026
This was stabilized in 1.37 (via
rust-lang/rust#61547), but the documentation
here was never updated.
There is a longer history of these being stabilized and then `cfg` being
removed and then added again, see
rust-lang/rust#48848rust-lang/rust#51279rust-lang/rust#51283.
ehuss added a commit to ehuss/reference that referenced this pull request May 5, 2026
This was stabilized in 1.37 (via
rust-lang/rust#61547), but the documentation
here was never updated.
There is a longer history of these being stabilized and then `cfg` being
removed and then added again, see
rust-lang/rust#48848rust-lang/rust#51279rust-lang/rust#51283.
ehuss added a commit to ehuss/reference that referenced this pull request May 6, 2026
This was stabilized in 1.37 (via
rust-lang/rust#61547), but the documentation
here was never updated.
There is a longer history of these being stabilized and then `cfg` being
removed and then added again, see
rust-lang/rust#48848rust-lang/rust#51279rust-lang/rust#51283.
msk pushed a commit to msk/pkgsrc that referenced this pull request May 11, 2026
Pkgsrc changes:
* Add a patch to llvm to deal with const dli_saddr.
* Adapt two other patches.
* Cross-build currently fails, so i386, powerpc and sparc64 bootstrap
kits for 1.37.0 are built natively. Missing aarch64 hardware, so that's
not available yet.
* Bump bootstrap requirements to 1.36.0 except for armv7-unknown-netbsd-eabihf
which I've not managed to cross-build.
Upstream changes:
Version 1.37.0 (2019-08-15)
==========================
Language
--------
- `#[must_use]` will now warn if the type is contained in a [tuple][61100],
[`Box`][62228], or an [array][62235] and unused.
- [You can now use the `cfg` and `cfg_attr` attributes on
generic parameters.][61547]
- [You can now use enum variants through type alias.][61682] e.g. You can
write the following:
```rust
type MyOption = Option<u8>;
fn increment_or_zero(x: MyOption) -> u8 {
match x {
MyOption::Some(y) => y + 1,
MyOption::None => 0,
}
}
```
- [You can now use `_` as an identifier for consts.][61347] e.g. You can write
`const _: u32 = 5;`.
- [You can now use `#[repr(align(X)]` on enums.][61229]
- [The `?`/_"Kleene"_ macro operator is now available in the
2015 edition.][60932]
Compiler
--------
- [You can now enable Profile-Guided Optimization with the `-C profile-generate`
and `-C profile-use` flags.][61268] For more information on how to use profile
guided optimization, please refer to the [rustc book][rustc-book-pgo].
- [The `rust-lldb` wrapper script should now work again.][61827]
Libraries
---------
- [`mem::MaybeUninit<T>` is now ABI-compatible with `T`.][61802]
Stabilized APIs
---------------
- [`BufReader::buffer`]
- [`BufWriter::buffer`]
- [`Cell::from_mut`]
- [`Cell<[T]>::as_slice_of_cells`][`Cell<slice>::as_slice_of_cells`]
- [`DoubleEndedIterator::nth_back`]
- [`Option::xor`]
- [`Wrapping::reverse_bits`]
- [`i128::reverse_bits`]
- [`i16::reverse_bits`]
- [`i32::reverse_bits`]
- [`i64::reverse_bits`]
- [`i8::reverse_bits`]
- [`isize::reverse_bits`]
- [`slice::copy_within`]
- [`u128::reverse_bits`]
- [`u16::reverse_bits`]
- [`u32::reverse_bits`]
- [`u64::reverse_bits`]
- [`u8::reverse_bits`]
- [`usize::reverse_bits`]
Cargo
-----
- [`Cargo.lock` files are now included by default when publishing executable crates
with executables.][cargo/7026]
- [You can now specify `default-run="foo"` in `[package]` to specify the
default executable to use for `cargo run`.][cargo/7056]
Misc
----
Compatibility Notes
-------------------
- [Using `...` for inclusive range patterns will now warn by default.][61342]
Please transition your code to using the `..=` syntax for inclusive
ranges instead.
- [Using a trait object without the `dyn` will now warn by default.][61203]
Please transition your code to use `dyn Trait` for trait objects instead.
[62228]: rust-lang/rust#62228
[62235]: rust-lang/rust#62235
[61802]: rust-lang/rust#61802
[61827]: rust-lang/rust#61827
[61547]: rust-lang/rust#61547
[61682]: rust-lang/rust#61682
[61268]: rust-lang/rust#61268
[61342]: rust-lang/rust#61342
[61347]: rust-lang/rust#61347
[61100]: rust-lang/rust#61100
[61203]: rust-lang/rust#61203
[61229]: rust-lang/rust#61229
[60932]: rust-lang/rust#60932
[cargo/7026]: rust-lang/cargo#7026
[cargo/7056]: rust-lang/cargo#7056
[`BufReader::buffer`]: https://doc.rust-lang.org/std/io/struct.BufReader.html#method.buffer
[`BufWriter::buffer`]: https://doc.rust-lang.org/std/io/struct.BufWriter.html#method.buffer
[`Cell::from_mut`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.from_mut
[`Cell<slice>::as_slice_of_cells`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.as_slice_of_cells
[`DoubleEndedIterator::nth_back`]: https://doc.rust-lang.org/std/iter/trait.DoubleEndedIterator.html#method.nth_back
[`Option::xor`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.xor
[`RefCell::try_borrow_unguarded`]: https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.try_borrow_unguarded
[`Wrapping::reverse_bits`]: https://doc.rust-lang.org/std/num/struct.Wrapping.html#method.reverse_bits
[`i128::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i128.html#method.reverse_bits
[`i16::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i16.html#method.reverse_bits
[`i32::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i32.html#method.reverse_bits
[`i64::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i64.html#method.reverse_bits
[`i8::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i8.html#method.reverse_bits
[`isize::reverse_bits`]: https://doc.rust-lang.org/std/primitive.isize.html#method.reverse_bits
[`slice::copy_within`]: https://doc.rust-lang.org/std/primitive.slice.html#method.copy_within
[`u128::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u128.html#method.reverse_bits
[`u16::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u16.html#method.reverse_bits
[`u32::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u32.html#method.reverse_bits
[`u64::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u64.html#method.reverse_bits
[`u8::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u8.html#method.reverse_bits
[`usize::reverse_bits`]: https://doc.rust-lang.org/std/primitive.usize.html#method.reverse_bits
[rustc-book-pgo]: https://doc.rust-lang.org/rustc/profile-guided-optimization.html
ehuss added a commit to ehuss/reference that referenced this pull request May 11, 2026
This was stabilized in 1.37 (via
rust-lang/rust#61547), but the documentation
here was never updated.
There is a longer history of these being stabilized and then `cfg` being
removed and then added again, see
rust-lang/rust#48848rust-lang/rust#51279rust-lang/rust#51283.
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this pull request May 14, 2026
Pkgsrc changes:
* Add a patch to llvm to deal with const dli_saddr.
* Adapt two other patches.
* Cross-build currently fails, so i386, powerpc and sparc64 bootstrap
kits for 1.37.0 are built natively. Missing aarch64 hardware, so that's
not available yet.
* Bump bootstrap requirements to 1.36.0 except for armv7-unknown-netbsd-eabihf
which I've not managed to cross-build.
Upstream changes:
Version 1.37.0 (2019-08-15)
==========================
Language
--------
- `#[must_use]` will now warn if the type is contained in a [tuple][61100],
[`Box`][62228], or an [array][62235] and unused.
- [You can now use the `cfg` and `cfg_attr` attributes on
generic parameters.][61547]
- [You can now use enum variants through type alias.][61682] e.g. You can
write the following:
```rust
type MyOption = Option<u8>;
fn increment_or_zero(x: MyOption) -> u8 {
match x {
MyOption::Some(y) => y + 1,
MyOption::None => 0,
}
}
```
- [You can now use `_` as an identifier for consts.][61347] e.g. You can write
`const _: u32 = 5;`.
- [You can now use `#[repr(align(X)]` on enums.][61229]
- [The `?`/_"Kleene"_ macro operator is now available in the
2015 edition.][60932]
Compiler
--------
- [You can now enable Profile-Guided Optimization with the `-C profile-generate`
and `-C profile-use` flags.][61268] For more information on how to use profile
guided optimization, please refer to the [rustc book][rustc-book-pgo].
- [The `rust-lldb` wrapper script should now work again.][61827]
Libraries
---------
- [`mem::MaybeUninit<T>` is now ABI-compatible with `T`.][61802]
Stabilized APIs
---------------
- [`BufReader::buffer`]
- [`BufWriter::buffer`]
- [`Cell::from_mut`]
- [`Cell<[T]>::as_slice_of_cells`][`Cell<slice>::as_slice_of_cells`]
- [`DoubleEndedIterator::nth_back`]
- [`Option::xor`]
- [`Wrapping::reverse_bits`]
- [`i128::reverse_bits`]
- [`i16::reverse_bits`]
- [`i32::reverse_bits`]
- [`i64::reverse_bits`]
- [`i8::reverse_bits`]
- [`isize::reverse_bits`]
- [`slice::copy_within`]
- [`u128::reverse_bits`]
- [`u16::reverse_bits`]
- [`u32::reverse_bits`]
- [`u64::reverse_bits`]
- [`u8::reverse_bits`]
- [`usize::reverse_bits`]
Cargo
-----
- [`Cargo.lock` files are now included by default when publishing executable crates
with executables.][cargo/7026]
- [You can now specify `default-run="foo"` in `[package]` to specify the
default executable to use for `cargo run`.][cargo/7056]
Misc
----
Compatibility Notes
-------------------
- [Using `...` for inclusive range patterns will now warn by default.][61342]
Please transition your code to using the `..=` syntax for inclusive
ranges instead.
- [Using a trait object without the `dyn` will now warn by default.][61203]
Please transition your code to use `dyn Trait` for trait objects instead.
[62228]: rust-lang/rust#62228
[62235]: rust-lang/rust#62235
[61802]: rust-lang/rust#61802
[61827]: rust-lang/rust#61827
[61547]: rust-lang/rust#61547
[61682]: rust-lang/rust#61682
[61268]: rust-lang/rust#61268
[61342]: rust-lang/rust#61342
[61347]: rust-lang/rust#61347
[61100]: rust-lang/rust#61100
[61203]: rust-lang/rust#61203
[61229]: rust-lang/rust#61229
[60932]: rust-lang/rust#60932
[cargo/7026]: rust-lang/cargo#7026
[cargo/7056]: rust-lang/cargo#7056
[`BufReader::buffer`]: https://doc.rust-lang.org/std/io/struct.BufReader.html#method.buffer
[`BufWriter::buffer`]: https://doc.rust-lang.org/std/io/struct.BufWriter.html#method.buffer
[`Cell::from_mut`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.from_mut
[`Cell<slice>::as_slice_of_cells`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.as_slice_of_cells
[`DoubleEndedIterator::nth_back`]: https://doc.rust-lang.org/std/iter/trait.DoubleEndedIterator.html#method.nth_back
[`Option::xor`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.xor
[`RefCell::try_borrow_unguarded`]: https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.try_borrow_unguarded
[`Wrapping::reverse_bits`]: https://doc.rust-lang.org/std/num/struct.Wrapping.html#method.reverse_bits
[`i128::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i128.html#method.reverse_bits
[`i16::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i16.html#method.reverse_bits
[`i32::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i32.html#method.reverse_bits
[`i64::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i64.html#method.reverse_bits
[`i8::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i8.html#method.reverse_bits
[`isize::reverse_bits`]: https://doc.rust-lang.org/std/primitive.isize.html#method.reverse_bits
[`slice::copy_within`]: https://doc.rust-lang.org/std/primitive.slice.html#method.copy_within
[`u128::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u128.html#method.reverse_bits
[`u16::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u16.html#method.reverse_bits
[`u32::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u32.html#method.reverse_bits
[`u64::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u64.html#method.reverse_bits
[`u8::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u8.html#method.reverse_bits
[`usize::reverse_bits`]: https://doc.rust-lang.org/std/primitive.usize.html#method.reverse_bits
[rustc-book-pgo]: https://doc.rust-lang.org/rustc/profile-guided-optimization.html
ehuss added a commit to ehuss/reference that referenced this pull request Jun 20, 2026
This was stabilized in 1.37 (via
rust-lang/rust#61547), but the documentation
here was never updated.
There is a longer history of these being stabilized and then `cfg` being
removed and then added again, see
rust-lang/rust#48848rust-lang/rust#51279rust-lang/rust#51283.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.relnotesMarks issues that should be documented in the release notes of the next release.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-langRelevant to the language team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@petrochenkov@rust-highfive@Centril@rfcbot@bors@pnkfelix