diff options
| author | Oli Scherer <github333195615777966@oli-obk.de> | 2025-05-30 15:06:51 +0000 |
|---|---|---|
| committer | Oli Scherer <github333195615777966@oli-obk.de> | 2025-05-30 15:07:36 +0000 |
| commit | 685d1c9e2904813876f233622148838d3575b518 (patch) | |
| tree | 8563e3e17c86590828e5ec96bad3bc4e8fc825a4 /compiler/rustc_middle/src | |
| parent | 7f50020e6b1cd6646738ab05ffe89fbc4d8f5d9e (diff) | |
| download | rust-685d1c9e2904813876f233622148838d3575b518.tar.gz rust-685d1c9e2904813876f233622148838d3575b518.zip | |
Change a per-module query to just run on the items it internally filters for
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/hooks/mod.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/query/mod.rs | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/compiler/rustc_middle/src/hooks/mod.rs b/compiler/rustc_middle/src/hooks/mod.rs index c5ce6efcb81..12110c36044 100644 --- a/compiler/rustc_middle/src/hooks/mod.rs +++ b/compiler/rustc_middle/src/hooks/mod.rs @@ -102,6 +102,11 @@ declare_hooks! { /// Ensure the given scalar is valid for the given type. /// This checks non-recursive runtime validity. hook validate_scalar_in_layout(scalar: crate::ty::ScalarInt, ty: Ty<'tcx>) -> bool; + + /// Naked fns can only have trivial binding patterns in arguments, + /// may not actually use those arguments, and the body must consist of just + /// a single asm statement. + hook typeck_naked_fn(def_id: LocalDefId, body: &'tcx rustc_hir::Body<'tcx>) -> (); } #[cold] diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs index 279033ee072..bb0b0a41d5a 100644 --- a/compiler/rustc_middle/src/query/mod.rs +++ b/compiler/rustc_middle/src/query/mod.rs @@ -1119,10 +1119,6 @@ rustc_queries! { desc { |tcx| "checking loops in {}", describe_as_module(key, tcx) } } - query check_mod_naked_functions(key: LocalModDefId) { - desc { |tcx| "checking naked functions in {}", describe_as_module(key, tcx) } - } - query check_mod_privacy(key: LocalModDefId) { desc { |tcx| "checking privacy in {}", describe_as_module(key.to_local_def_id(), tcx) } } |
