1
Fork 0

Address unused tuple struct fields in the compiler

This commit is contained in:
Jake Goulding 2023-11-25 15:45:44 -05:00
parent 9f15a889f0
commit 87380cbc0c
4 changed files with 8 additions and 9 deletions

View file

@ -223,7 +223,7 @@ impl<'a, 'b, 'tcx> visit::Visitor<'a> for DefCollector<'a, 'b, 'tcx> {
// ```
//
// In that case, the impl-trait is lowered as an additional generic parameter.
self.with_impl_trait(ImplTraitContext::Universal(self.parent_def), |this| {
self.with_impl_trait(ImplTraitContext::Universal, |this| {
visit::walk_generic_param(this, param)
});
}
@ -310,9 +310,7 @@ impl<'a, 'b, 'tcx> visit::Visitor<'a> for DefCollector<'a, 'b, 'tcx> {
if p.is_placeholder {
self.visit_macro_invoc(p.id)
} else {
self.with_impl_trait(ImplTraitContext::Universal(self.parent_def), |this| {
visit::walk_param(this, p)
})
self.with_impl_trait(ImplTraitContext::Universal, |this| visit::walk_param(this, p))
}
}

View file

@ -172,7 +172,7 @@ impl<'a> ParentScope<'a> {
#[derive(Copy, Debug, Clone)]
enum ImplTraitContext {
Existential,
Universal(LocalDefId),
Universal,
}
#[derive(Debug)]