1
Fork 0

Pacify tidy.

This commit is contained in:
Camille GILLOT 2023-01-21 10:12:11 +00:00
parent 65c3c90f3e
commit de110f9208
3 changed files with 8 additions and 8 deletions

View file

@ -216,11 +216,11 @@ impl<'cx, 'tcx> FallibleTypeFolder<'tcx> for QueryNormalizer<'cx, 'tcx> {
let substs = substs.try_fold_with(self)?; let substs = substs.try_fold_with(self)?;
let recursion_limit = self.tcx().recursion_limit(); let recursion_limit = self.tcx().recursion_limit();
if !recursion_limit.value_within_limit(self.anon_depth) { if !recursion_limit.value_within_limit(self.anon_depth) {
// A closure or generator may have itself as in its upvars. This // A closure or generator may have itself as in its upvars.
// should be checked handled by the recursion check for opaque types, // This should be checked handled by the recursion check for opaque
// but we may end up here before that check can happen. In that case, // types, but we may end up here before that check can happen.
// we delay a bug to mark the trip, and continue without revealing the // In that case, we delay a bug to mark the trip, and continue without
// opaque. // revealing the opaque.
self.infcx self.infcx
.err_ctxt() .err_ctxt()
.build_overflow_error(&ty, self.cause.span, true) .build_overflow_error(&ty, self.cause.span, true)

View file

@ -110,8 +110,8 @@ where
for component in components { for component in components {
match *component.kind() { match *component.kind() {
// The information required to determine whether a generator has drop is // The information required to determine whether a generator has drop is
// computed on MIR, while this very method is used to build MIR. To avoid // computed on MIR, while this very method is used to build MIR.
// cycles, we consider that generators always require drop. // To avoid cycles, we consider that generators always require drop.
ty::Generator(..) if tcx.sess.opts.unstable_opts.drop_tracking_mir => { ty::Generator(..) if tcx.sess.opts.unstable_opts.drop_tracking_mir => {
return Some(Err(AlwaysRequiresDrop)); return Some(Err(AlwaysRequiresDrop));
} }