1
Fork 0

fixes/working version

This commit is contained in:
b-naber 2022-06-30 11:14:39 +02:00
parent 2554fa1c8e
commit a7735cd329
5 changed files with 36 additions and 23 deletions

View file

@ -313,7 +313,7 @@ impl<'a, 'tcx> TypeVisitor<'tcx> for MarkUsedGenericParams<'a, 'tcx> {
}
match constant {
ConstantKind::Ty(_) => constant.super_visit_with(self),
ConstantKind::Ty(ct) => ct.visit_with(self),
ConstantKind::Unevaluated(ty::Unevaluated { def, substs: _, promoted: Some(p) }, _)
// Avoid considering `T` unused when constants are of the form:
// `<Self as Foo<T>>::foo::promoted[p]`