Rollup merge of #158343 - obi1kenobi:pg/item-const-stability, r=GuillaumeGomez Include `Item::const_stability` info in rustdoc JSON. Include a parallel `Item::const_stability` item in rustdoc JSON, sibling to `Item::stability` from rust-lang/rust#158230, intended for the same purpose of catching accidental breaking changes in the Rust standard library. I aimed to include `Item::const_stability` judiciously, when it would be genuinely useful without needlessly bloating the JSON. For example, if an item is already unstable, we do not duplicate the `Item::stability` value into `Item::const_stability` as the const-instability is clearly implied. I've covered all such cases in the test suite and documented my reasoning inline. r? @GuillaumeGomez **AI disclosure:** This PR is the product of a combination of manual work and AI tools. I secured approval in advance from the designated reviewer. I stand behind the quality of the code I'm submitting, and I vouch it's as good or better compared to if I had written every line by my own hand. (In particular, local AI review flagged several missing test cases, one of which caught a bug I would have missed otherwise.)
Website | Getting started | Learn | Documentation | Contributing
This is the main source code repository for Rust. It contains the compiler, standard library, and documentation.
Performance: Fast and memory-efficient, suitable for critical services, embedded devices, and easily integrated with other languages.
Reliability: Our rich type system and ownership model ensure memory and thread safety, reducing bugs at compile-time.
Productivity: Comprehensive documentation, a compiler committed to providing great diagnostics, and advanced tooling including package manager and build tool (Cargo), auto-formatter (rustfmt), linter (Clippy) and editor support (rust-analyzer).
Read “Installation” from The Book.
If you really want to install from source (though this is not recommended), see INSTALL.md.
See https://www.rust-lang.org/community for a list of chat platforms and forums.
See CONTRIBUTING.md.
For a detailed explanation of the compiler's architecture and how to begin contributing, see the rustc-dev-guide.
Rust is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.
See LICENSE-APACHE, LICENSE-MIT, and COPYRIGHT for details.
The Rust Foundation owns and protects the Rust and Cargo trademarks and logos (the “Rust Trademarks”).
If you want to use these names or brands, please read the Rust language trademark policy.
Third-party logos may be subject to third-party copyrights and trademarks. See Licenses for details.