@@ -317,7 +317,7 @@ impl<'ctx, 'gen> UsedTemplateParameters<'ctx, 'gen> {
317
317
fn constrain_instantiation_of_blacklisted_template ( & self ,
318
318
used_by_this_id : & mut ItemSet ,
319
319
instantiation : & TemplateInstantiation ) {
320
- debug ! ( " instantiation of blacklisted template, uses all template \
320
+ trace ! ( " instantiation of blacklisted template, uses all template \
321
321
arguments") ;
322
322
323
323
let args = instantiation. template_arguments ( )
@@ -331,7 +331,7 @@ impl<'ctx, 'gen> UsedTemplateParameters<'ctx, 'gen> {
331
331
fn constrain_instantiation ( & self ,
332
332
used_by_this_id : & mut ItemSet ,
333
333
instantiation : & TemplateInstantiation ) {
334
- debug ! ( " template instantiation" ) ;
334
+ trace ! ( " template instantiation" ) ;
335
335
336
336
let decl = self . ctx . resolve_type ( instantiation. template_definition ( ) ) ;
337
337
let args = instantiation. template_arguments ( ) ;
@@ -344,20 +344,20 @@ impl<'ctx, 'gen> UsedTemplateParameters<'ctx, 'gen> {
344
344
. unwrap ( ) ;
345
345
346
346
for ( arg, param) in args. iter ( ) . zip ( params. iter ( ) ) {
347
- debug ! ( " instantiation's argument {:?} is used if definition's \
347
+ trace ! ( " instantiation's argument {:?} is used if definition's \
348
348
parameter {:?} is used",
349
349
arg,
350
350
param) ;
351
351
352
352
if used_by_def. contains ( param) {
353
- debug ! ( " param is used by template definition" ) ;
353
+ trace ! ( " param is used by template definition" ) ;
354
354
355
355
let arg = arg. into_resolver ( )
356
356
. through_type_refs ( )
357
357
. through_type_aliases ( )
358
358
. resolve ( self . ctx ) ;
359
359
if let Some ( named) = arg. as_named ( self . ctx , & ( ) ) {
360
- debug ! ( " arg is a type parameter, marking used" ) ;
360
+ trace ! ( " arg is a type parameter, marking used" ) ;
361
361
used_by_this_id. insert ( named) ;
362
362
}
363
363
}
@@ -367,7 +367,7 @@ impl<'ctx, 'gen> UsedTemplateParameters<'ctx, 'gen> {
367
367
/// The join operation on our lattice: the set union of all of this id's
368
368
/// successors.
369
369
fn constrain_join ( & self , used_by_this_id : & mut ItemSet , item : & Item ) {
370
- debug ! ( " other item: join with successors' usage" ) ;
370
+ trace ! ( " other item: join with successors' usage" ) ;
371
371
372
372
item. trace ( self . ctx , & mut |sub_id, edge_kind| {
373
373
// Ignore ourselves, since union with ourself is a
@@ -388,7 +388,7 @@ impl<'ctx, 'gen> UsedTemplateParameters<'ctx, 'gen> {
388
388
. iter ( )
389
389
. cloned ( ) ;
390
390
391
- debug ! ( " union with {:?}'s usage: {:?}" ,
391
+ trace ! ( " union with {:?}'s usage: {:?}" ,
392
392
sub_id,
393
393
used_by_sub_id. clone( ) . collect:: <Vec <_>>( ) ) ;
394
394
@@ -508,8 +508,8 @@ impl<'ctx, 'gen> MonotoneFramework for UsedTemplateParameters<'ctx, 'gen> {
508
508
// an analog to slice::split_at_mut.
509
509
let mut used_by_this_id = self . take_this_id_usage_set ( id) ;
510
510
511
- debug ! ( "constrain {:?}" , id) ;
512
- debug ! ( " initially, used set is {:?}" , used_by_this_id) ;
511
+ trace ! ( "constrain {:?}" , id) ;
512
+ trace ! ( " initially, used set is {:?}" , used_by_this_id) ;
513
513
514
514
let original_len = used_by_this_id. len ( ) ;
515
515
@@ -518,7 +518,7 @@ impl<'ctx, 'gen> MonotoneFramework for UsedTemplateParameters<'ctx, 'gen> {
518
518
match ty_kind {
519
519
// Named template type parameters trivially use themselves.
520
520
Some ( & TypeKind :: Named ) => {
521
- debug ! ( " named type, trivially uses itself" ) ;
521
+ trace ! ( " named type, trivially uses itself" ) ;
522
522
used_by_this_id. insert ( id) ;
523
523
}
524
524
// Template instantiations only use their template arguments if the
@@ -536,7 +536,7 @@ impl<'ctx, 'gen> MonotoneFramework for UsedTemplateParameters<'ctx, 'gen> {
536
536
_ => self . constrain_join ( & mut used_by_this_id, item) ,
537
537
}
538
538
539
- debug ! ( " finally, used set is {:?}" , used_by_this_id) ;
539
+ trace ! ( " finally, used set is {:?}" , used_by_this_id) ;
540
540
541
541
let new_len = used_by_this_id. len ( ) ;
542
542
assert ! ( new_len >= original_len,
@@ -556,7 +556,7 @@ impl<'ctx, 'gen> MonotoneFramework for UsedTemplateParameters<'ctx, 'gen> {
556
556
{
557
557
if let Some ( edges) = self . dependencies . get ( & item) {
558
558
for item in edges {
559
- debug ! ( "enqueue {:?} into worklist" , item) ;
559
+ trace ! ( "enqueue {:?} into worklist" , item) ;
560
560
f ( * item) ;
561
561
}
562
562
}
0 commit comments