File tree Expand file tree Collapse file tree
compiler/rustc_query_impl/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -164,10 +164,10 @@ where
164164 let mut this = ManuallyDrop :: new ( self ) ;
165165
166166 // Drop everything without poisoning the query.
167- this. drop_and_maybe_poison ( /* poison */ false ) ;
167+ this. drop_and_maybe_poison :: < false > ( ) ;
168168 }
169169
170- fn drop_and_maybe_poison ( & mut self , poison : bool ) {
170+ fn drop_and_maybe_poison < const POISON : bool > ( & mut self ) {
171171 let status = {
172172 let mut shard = self . state . active . lock_shard_by_hash ( self . key_hash ) ;
173173 match shard. find_entry ( self . key_hash , equivalent_key ( self . key ) ) {
@@ -179,7 +179,7 @@ where
179179 }
180180 Ok ( occupied) => {
181181 let ( ( key, status) , vacant) = occupied. remove ( ) ;
182- if poison {
182+ if POISON {
183183 vacant. insert ( ( key, ActiveKeyStatus :: Poisoned ) ) ;
184184 }
185185 status
@@ -203,7 +203,7 @@ where
203203 #[ cold]
204204 fn drop ( & mut self ) {
205205 // Poison the query so jobs waiting on it panic.
206- self . drop_and_maybe_poison ( /* poison */ true ) ;
206+ self . drop_and_maybe_poison :: < true > ( ) ;
207207 }
208208}
209209
You can’t perform that action at this time.
0 commit comments