diff options
| author | Jakob Degen <jakob@degen.com> | 2021-10-25 20:45:46 -0400 |
|---|---|---|
| committer | Jakob Degen <jakob@degen.com> | 2021-10-25 20:45:46 -0400 |
| commit | aff37f8f7b0a14493e17bc9fd7844f4392d08241 (patch) | |
| tree | 51bdf4d0cf9bb2e324cd2d99bbc0ee8c51145ad3 /compiler/rustc_ty_utils/src | |
| parent | eae42fd9d0d6e568282a4c782405058b64f1ef0b (diff) | |
| download | rust-aff37f8f7b0a14493e17bc9fd7844f4392d08241.tar.gz rust-aff37f8f7b0a14493e17bc9fd7844f4392d08241.zip | |
Clean up debug statements in needs_drop
Diffstat (limited to 'compiler/rustc_ty_utils/src')
| -rw-r--r-- | compiler/rustc_ty_utils/src/needs_drop.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/compiler/rustc_ty_utils/src/needs_drop.rs b/compiler/rustc_ty_utils/src/needs_drop.rs index dca93aff0cd..3f66e5b4ebf 100644 --- a/compiler/rustc_ty_utils/src/needs_drop.rs +++ b/compiler/rustc_ty_utils/src/needs_drop.rs @@ -136,7 +136,6 @@ where // `ManuallyDrop`. If it's a struct or enum without a `Drop` // impl then check whether the field types need `Drop`. ty::Adt(adt_def, substs) => { - debug!("Got value {:?} with substs {:?}", adt_def, substs); let tys = match (self.adt_components)(adt_def, substs) { Err(e) => return Some(Err(e)), Ok(tys) => tys, @@ -190,16 +189,16 @@ fn drop_tys_helper<'tcx>( ) -> impl Iterator<Item = NeedsDropResult<Ty<'tcx>>> { let adt_components = move |adt_def: &ty::AdtDef, substs: SubstsRef<'tcx>| { if adt_def.is_manually_drop() { - debug!("adt_drop_tys: `{:?}` is manually drop", adt_def); + debug!("drop_tys_helper: `{:?}` is manually drop", adt_def); return Ok(Vec::new().into_iter()); } else if let Some(dtor_info) = adt_has_dtor(adt_def) { match dtor_info { DtorType::Significant => { - debug!("adt_drop_tys: `{:?}` implements `Drop`", adt_def); + debug!("drop_tys_helper: `{:?}` implements `Drop`", adt_def); return Err(AlwaysRequiresDrop); } DtorType::Insignificant => { - debug!("adt_drop_tys: `{:?}` drop is insignificant", adt_def); + debug!("drop_tys_helper: `{:?}` drop is insignificant", adt_def); // Since the destructor is insignificant, we just want to make sure all of // the passed in type parameters are also insignificant. @@ -208,15 +207,14 @@ fn drop_tys_helper<'tcx>( } } } else if adt_def.is_union() { - debug!("adt_drop_tys: `{:?}` is a union", adt_def); + debug!("drop_tys_helper: `{:?}` is a union", adt_def); return Ok(Vec::new().into_iter()); } - debug!("Path"); Ok(adt_def .all_fields() .map(|field| { let r = tcx.type_of(field.did).subst(tcx, substs); - debug!("Subst into {:?} with {:?} gettng {:?}", field, substs, r); + debug!("drop_tys_helper: Subst into {:?} with {:?} gettng {:?}", field, substs, r); r }) .collect::<Vec<_>>() |
