about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/query/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-07-20 18:45:09 +0000
committerbors <bors@rust-lang.org>2023-07-20 18:45:09 +0000
commit1554942cdc0099e081d5cd673d45f8a09cfd0eb0 (patch)
treeae16e2a99a1b565ca2d6a8e95daa08b6a373f76b /compiler/rustc_middle/src/query/mod.rs
parent092e4f46be168ab24d53e4141086b2cf04822b8e (diff)
parenta4a5e5b4ae2431c09b228bfb3e2930a1c38b9e45 (diff)
downloadrust-1554942cdc0099e081d5cd673d45f8a09cfd0eb0.tar.gz
rust-1554942cdc0099e081d5cd673d45f8a09cfd0eb0.zip
Auto merge of #113546 - cjgillot:unused-query, r=compiler-errors
Querify unused trait check.

This code transitively loads information for all bodies, and from resolutions. As it does not return a value, it should be beneficial to have it as a query.
Diffstat (limited to 'compiler/rustc_middle/src/query/mod.rs')
-rw-r--r--compiler/rustc_middle/src/query/mod.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs
index 062adc9ec54..b36f0df78f1 100644
--- a/compiler/rustc_middle/src/query/mod.rs
+++ b/compiler/rustc_middle/src/query/mod.rs
@@ -898,6 +898,10 @@ rustc_queries! {
         desc { |tcx| "linting {}", describe_as_module(key, tcx) }
     }
 
+    query check_unused_traits(_: ()) -> () {
+        desc { "checking unused trait imports in crate" }
+    }
+
     /// Checks the attributes in the module.
     query check_mod_attrs(key: LocalDefId) -> () {
         desc { |tcx| "checking attributes in {}", describe_as_module(key, tcx) }