rust/compiler/rustc_passes
Matthias Krüger 13314df21b
Rollup merge of #125572 - mu001999-contrib:dead/enhance, r=pnkfelix
Detect pub structs never constructed and unused associated constants

<!--
If this PR is related to an unstable feature or an otherwise tracked effort,
please link to the relevant tracking issue here. If you don't know of a related
tracking issue or there are none, feel free to ignore this.

This PR will get automatically assigned to a reviewer. In case you would like
a specific user to review your work, you can assign it to them by using

    r​? <reviewer name>
-->

Lints never constructed public structs.

If we don't provide public methods to construct public structs with private fields, and don't construct them in the local crate. They would be never constructed. So that we can detect such public structs.

---
Update:

Also lints unused associated constants in traits.
2024-06-07 20:14:28 +02:00
..
src Rollup merge of #125572 - mu001999-contrib:dead/enhance, r=pnkfelix 2024-06-07 20:14:28 +02:00
Cargo.toml Test and implement reachability for trait objects and generic parameters of functions 2024-03-14 14:10:45 +00:00
messages.ftl Error on unsafe on non-unsafe attribute 2024-06-06 20:26:28 -05:00