1
Fork 0
This commit is contained in:
b-naber 2022-09-15 22:27:41 +02:00
parent 6af8fb7936
commit d77248e6d2
5 changed files with 9 additions and 19 deletions

View file

@ -307,9 +307,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
// Promoteds must lint and not error as the user didn't ask for them
true
}
ConstantKind::Unevaluated(_, ty) | ConstantKind::Val(_, ty) => {
ty.needs_subst()
}
ConstantKind::Unevaluated(..) | ConstantKind::Val(..) => c.needs_subst(),
};
if lint_only {
// Out of backwards compatibility we cannot report hard errors in unused