Rollup merge of #152164 - mu001999-contrib:lint/unused_features, r=JonathanBrouwer

Lint unused features

*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/152164)*

Fixes rust-lang/rust#44232
Fixes rust-lang/rust#151752

---

This PR records used features through query side effect, then reports unsued features finally.
This commit is contained in:
Jonathan Brouwer
2026-03-04 19:30:36 +01:00
committed by GitHub
111 changed files with 386 additions and 141 deletions
@@ -40,7 +40,7 @@ pub(crate) fn SideEffect<'tcx>() -> DepKindVTable<'tcx> {
is_eval_always: false,
key_fingerprint_style: KeyFingerprintStyle::Unit,
force_from_dep_node_fn: Some(|tcx, _, prev_index| {
tcx.dep_graph.force_diagnostic_node(tcx, prev_index);
tcx.dep_graph.force_side_effect(tcx, prev_index);
true
}),
promote_from_disk_fn: None,