@@ -30,7 +30,7 @@ pub fn provide(providers: &mut Providers) {
30
30
/// Determine which generic parameters are used by the function/method/closure represented by
31
31
/// `def_id`. Returns a bitset where bits representing unused parameters are set (`is_empty`
32
32
/// indicates all parameters are used).
33
- #[ instrument( skip( tcx) ) ]
33
+ #[ instrument( level = "debug" , skip( tcx) ) ]
34
34
fn unused_generic_params ( tcx : TyCtxt < ' _ > , def_id : DefId ) -> FiniteBitSet < u32 > {
35
35
if !tcx. sess . opts . debugging_opts . polymorphize {
36
36
// If polymorphization disabled, then all parameters are used.
@@ -100,7 +100,7 @@ fn unused_generic_params(tcx: TyCtxt<'_>, def_id: DefId) -> FiniteBitSet<u32> {
100
100
/// Some parameters are considered used-by-default, such as non-generic parameters and the dummy
101
101
/// generic parameters from closures, this function marks them as used. `leaf_is_closure` should
102
102
/// 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) ) ]
104
104
fn mark_used_by_default_parameters < ' tcx > (
105
105
tcx : TyCtxt < ' tcx > ,
106
106
def_id : DefId ,
@@ -158,7 +158,7 @@ fn mark_used_by_default_parameters<'tcx>(
158
158
159
159
/// Search the predicates on used generic parameters for any unused generic parameters, and mark
160
160
/// those as used.
161
- #[ instrument( skip( tcx, def_id) ) ]
161
+ #[ instrument( level = "debug" , skip( tcx, def_id) ) ]
162
162
fn mark_used_by_predicates < ' tcx > (
163
163
tcx : TyCtxt < ' tcx > ,
164
164
def_id : DefId ,
@@ -196,7 +196,7 @@ fn mark_used_by_predicates<'tcx>(
196
196
197
197
/// Emit errors for the function annotated by `#[rustc_polymorphize_error]`, labelling each generic
198
198
/// parameter which was unused.
199
- #[ instrument( skip( tcx, generics) ) ]
199
+ #[ instrument( level = "debug" , skip( tcx, generics) ) ]
200
200
fn emit_unused_generic_params_error < ' tcx > (
201
201
tcx : TyCtxt < ' tcx > ,
202
202
def_id : DefId ,
@@ -241,7 +241,7 @@ struct MarkUsedGenericParams<'a, 'tcx> {
241
241
impl < ' a , ' tcx > MarkUsedGenericParams < ' a , ' tcx > {
242
242
/// Invoke `unused_generic_params` on a body contained within the current item (e.g.
243
243
/// a closure, generator or constant).
244
- #[ instrument( skip( self , def_id, substs) ) ]
244
+ #[ instrument( level = "debug" , skip( self , def_id, substs) ) ]
245
245
fn visit_child_body ( & mut self , def_id : DefId , substs : SubstsRef < ' tcx > ) {
246
246
let unused = self . tcx . unused_generic_params ( def_id) ;
247
247
debug ! ( ?self . unused_parameters, ?unused) ;
@@ -256,7 +256,7 @@ impl<'a, 'tcx> MarkUsedGenericParams<'a, 'tcx> {
256
256
}
257
257
258
258
impl < ' a , ' tcx > Visitor < ' tcx > for MarkUsedGenericParams < ' a , ' tcx > {
259
- #[ instrument( skip( self , local) ) ]
259
+ #[ instrument( level = "debug" , skip( self , local) ) ]
260
260
fn visit_local_decl ( & mut self , local : Local , local_decl : & LocalDecl < ' tcx > ) {
261
261
if local == Local :: from_usize ( 1 ) {
262
262
let def_kind = self . tcx . def_kind ( self . def_id ) ;
@@ -286,7 +286,7 @@ impl<'a, 'tcx> TypeVisitor<'tcx> for MarkUsedGenericParams<'a, 'tcx> {
286
286
fn tcx_for_anon_const_substs ( & self ) -> Option < TyCtxt < ' tcx > > {
287
287
Some ( self . tcx )
288
288
}
289
- #[ instrument( skip( self ) ) ]
289
+ #[ instrument( level = "debug" , skip( self ) ) ]
290
290
fn visit_const ( & mut self , c : & ' tcx Const < ' tcx > ) -> ControlFlow < Self :: BreakTy > {
291
291
if !c. potentially_has_param_types_or_consts ( ) {
292
292
return ControlFlow :: CONTINUE ;
@@ -319,7 +319,7 @@ impl<'a, 'tcx> TypeVisitor<'tcx> for MarkUsedGenericParams<'a, 'tcx> {
319
319
}
320
320
}
321
321
322
- #[ instrument( skip( self ) ) ]
322
+ #[ instrument( level = "debug" , skip( self ) ) ]
323
323
fn visit_ty ( & mut self , ty : Ty < ' tcx > ) -> ControlFlow < Self :: BreakTy > {
324
324
if !ty. potentially_has_param_types_or_consts ( ) {
325
325
return ControlFlow :: CONTINUE ;
@@ -361,7 +361,7 @@ impl<'a, 'tcx> TypeVisitor<'tcx> for HasUsedGenericParams<'a, 'tcx> {
361
361
Some ( self . tcx )
362
362
}
363
363
364
- #[ instrument( skip( self ) ) ]
364
+ #[ instrument( level = "debug" , skip( self ) ) ]
365
365
fn visit_const ( & mut self , c : & ' tcx Const < ' tcx > ) -> ControlFlow < Self :: BreakTy > {
366
366
if !c. potentially_has_param_types_or_consts ( ) {
367
367
return ControlFlow :: CONTINUE ;
@@ -379,7 +379,7 @@ impl<'a, 'tcx> TypeVisitor<'tcx> for HasUsedGenericParams<'a, 'tcx> {
379
379
}
380
380
}
381
381
382
- #[ instrument( skip( self ) ) ]
382
+ #[ instrument( level = "debug" , skip( self ) ) ]
383
383
fn visit_ty ( & mut self , ty : Ty < ' tcx > ) -> ControlFlow < Self :: BreakTy > {
384
384
if !ty. potentially_has_param_types_or_consts ( ) {
385
385
return ControlFlow :: CONTINUE ;
0 commit comments