rust/compiler/rustc_passes/src
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
..
liveness Match unmatched backticks in compiler/ that are part of rustdoc 2023-03-03 08:39:00 +01:00
abi_test.rs Remove extern crate rustc_middle from numerous crates. 2024-04-29 14:50:45 +10:00
check_attr.rs Fix formatting 2024-06-06 20:27:25 -05:00
check_const.rs Revert "Create const block DefIds in typeck instead of ast lowering" 2024-06-07 08:33:58 +00:00
dead.rs Rollup merge of #125572 - mu001999-contrib:dead/enhance, r=pnkfelix 2024-06-07 20:14:28 +02:00
debugger_visualizer.rs Avoid using feed_unit_query from within queries 2024-03-05 10:02:39 +00:00
diagnostic_items.rs Revert "Rollup merge of #124976 - petrochenkov:usedcrates, r=oli-obk" 2024-06-06 10:06:28 +00:00
entry.rs Various improvements to entrypoint code 2024-05-04 14:48:42 +02:00
errors.rs Error on unsafe on non-unsafe attribute 2024-06-06 20:26:28 -05:00
hir_id_validator.rs Actually create ranged int types in the type system. 2024-04-08 12:02:19 +00:00
hir_stats.rs Rollup merge of #125635 - fmease:mv-type-binding-assoc-item-constraint, r=compiler-errors 2024-05-31 08:50:22 +02:00
lang_items.rs Minor pub and whitespace cleanups. 2024-05-21 14:56:57 +10:00
layout_test.rs Opt-in diagnostics reporting to avoid doing extra work in the new solver 2024-06-03 09:27:52 -04:00
lib_features.rs Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
lib.rs Remove #[macro_use] extern crate tracing from rustc_passes. 2024-05-23 18:02:17 +10:00
liveness.rs Revert "Create const block DefIds in typeck instead of ast lowering" 2024-06-07 08:33:58 +00:00
loops.rs Revert "Create const block DefIds in typeck instead of ast lowering" 2024-06-07 08:33:58 +00:00
naked_functions.rs Rename BindingAnnotation to BindingMode 2024-04-17 09:34:39 -04:00
reachable.rs Also support generic constants 2024-06-05 15:40:11 +00:00
stability.rs Revert "Rollup merge of #124976 - petrochenkov:usedcrates, r=oli-obk" 2024-06-06 10:06:28 +00:00
upvars.rs Make body_owned_by return the body directly. 2024-05-29 10:04:08 +00:00
weak_lang_items.rs Revert "Rollup merge of #124976 - petrochenkov:usedcrates, r=oli-obk" 2024-06-06 10:06:28 +00:00