@@ -30,7 +30,7 @@ pub fn provide(providers: &mut Providers) {
3030/// Determine which generic parameters are used by the function/method/closure represented by
3131/// `def_id`. Returns a bitset where bits representing unused parameters are set (`is_empty`
3232/// indicates all parameters are used).
33- #[ instrument( skip( tcx) ) ]
33+ #[ instrument( level = "debug" , skip( tcx) ) ]
3434fn unused_generic_params ( tcx : TyCtxt < ' _ > , def_id : DefId ) -> FiniteBitSet < u32 > {
3535 if !tcx. sess . opts . debugging_opts . polymorphize {
3636 // If polymorphization disabled, then all parameters are used.
@@ -100,7 +100,7 @@ fn unused_generic_params(tcx: TyCtxt<'_>, def_id: DefId) -> FiniteBitSet<u32> {
100100/// Some parameters are considered used-by-default, such as non-generic parameters and the dummy
101101/// generic parameters from closures, this function marks them as used. `leaf_is_closure` should
102102/// be `true` if the item that `unused_generic_params` was invoked on is a closure.
103- #[ instrument( skip( tcx, def_id, generics, unused_parameters) ) ]
103+ #[ instrument( level = "debug" , skip( tcx, def_id, generics, unused_parameters) ) ]
104104fn mark_used_by_default_parameters < ' tcx > (
105105 tcx : TyCtxt < ' tcx > ,
106106 def_id : DefId ,
@@ -158,7 +158,7 @@ fn mark_used_by_default_parameters<'tcx>(
158158
159159/// Search the predicates on used generic parameters for any unused generic parameters, and mark
160160/// those as used.
161- #[ instrument( skip( tcx, def_id) ) ]
161+ #[ instrument( level = "debug" , skip( tcx, def_id) ) ]
162162fn mark_used_by_predicates < ' tcx > (
163163 tcx : TyCtxt < ' tcx > ,
164164 def_id : DefId ,
@@ -196,7 +196,7 @@ fn mark_used_by_predicates<'tcx>(
196196
197197/// Emit errors for the function annotated by `#[rustc_polymorphize_error]`, labelling each generic
198198/// parameter which was unused.
199- #[ instrument( skip( tcx, generics) ) ]
199+ #[ instrument( level = "debug" , skip( tcx, generics) ) ]
200200fn emit_unused_generic_params_error < ' tcx > (
201201 tcx : TyCtxt < ' tcx > ,
202202 def_id : DefId ,
@@ -241,7 +241,7 @@ struct MarkUsedGenericParams<'a, 'tcx> {
241241impl < ' a , ' tcx > MarkUsedGenericParams < ' a , ' tcx > {
242242 /// Invoke `unused_generic_params` on a body contained within the current item (e.g.
243243 /// a closure, generator or constant).
244- #[ instrument( skip( self , def_id, substs) ) ]
244+ #[ instrument( level = "debug" , skip( self , def_id, substs) ) ]
245245 fn visit_child_body ( & mut self , def_id : DefId , substs : SubstsRef < ' tcx > ) {
246246 let unused = self . tcx . unused_generic_params ( def_id) ;
247247 debug ! ( ?self . unused_parameters, ?unused) ;
@@ -256,7 +256,7 @@ impl<'a, 'tcx> MarkUsedGenericParams<'a, 'tcx> {
256256}
257257
258258impl < ' a , ' tcx > Visitor < ' tcx > for MarkUsedGenericParams < ' a , ' tcx > {
259- #[ instrument( skip( self , local) ) ]
259+ #[ instrument( level = "debug" , skip( self , local) ) ]
260260 fn visit_local_decl ( & mut self , local : Local , local_decl : & LocalDecl < ' tcx > ) {
261261 if local == Local :: from_usize ( 1 ) {
262262 let def_kind = self . tcx . def_kind ( self . def_id ) ;
@@ -286,7 +286,7 @@ impl<'a, 'tcx> TypeVisitor<'tcx> for MarkUsedGenericParams<'a, 'tcx> {
286286 fn tcx_for_anon_const_substs ( & self ) -> Option < TyCtxt < ' tcx > > {
287287 Some ( self . tcx )
288288 }
289- #[ instrument( skip( self ) ) ]
289+ #[ instrument( level = "debug" , skip( self ) ) ]
290290 fn visit_const ( & mut self , c : & ' tcx Const < ' tcx > ) -> ControlFlow < Self :: BreakTy > {
291291 if !c. potentially_has_param_types_or_consts ( ) {
292292 return ControlFlow :: CONTINUE ;
@@ -319,7 +319,7 @@ impl<'a, 'tcx> TypeVisitor<'tcx> for MarkUsedGenericParams<'a, 'tcx> {
319319 }
320320 }
321321
322- #[ instrument( skip( self ) ) ]
322+ #[ instrument( level = "debug" , skip( self ) ) ]
323323 fn visit_ty ( & mut self , ty : Ty < ' tcx > ) -> ControlFlow < Self :: BreakTy > {
324324 if !ty. potentially_has_param_types_or_consts ( ) {
325325 return ControlFlow :: CONTINUE ;
@@ -361,7 +361,7 @@ impl<'a, 'tcx> TypeVisitor<'tcx> for HasUsedGenericParams<'a, 'tcx> {
361361 Some ( self . tcx )
362362 }
363363
364- #[ instrument( skip( self ) ) ]
364+ #[ instrument( level = "debug" , skip( self ) ) ]
365365 fn visit_const ( & mut self , c : & ' tcx Const < ' tcx > ) -> ControlFlow < Self :: BreakTy > {
366366 if !c. potentially_has_param_types_or_consts ( ) {
367367 return ControlFlow :: CONTINUE ;
@@ -379,7 +379,7 @@ impl<'a, 'tcx> TypeVisitor<'tcx> for HasUsedGenericParams<'a, 'tcx> {
379379 }
380380 }
381381
382- #[ instrument( skip( self ) ) ]
382+ #[ instrument( level = "debug" , skip( self ) ) ]
383383 fn visit_ty ( & mut self , ty : Ty < ' tcx > ) -> ControlFlow < Self :: BreakTy > {
384384 if !ty. potentially_has_param_types_or_consts ( ) {
385385 return ControlFlow :: CONTINUE ;
0 commit comments