Don't check for alias bounds in liveness when aliases have escaping bound vars
This commit is contained in:
parent
46455dc650
commit
4d5d763e05
4 changed files with 64 additions and 1 deletions
|
@ -1,4 +1,6 @@
|
|||
use rustc_middle::ty::{self, Ty, TyCtxt, TypeSuperVisitable, TypeVisitable, TypeVisitor};
|
||||
use rustc_middle::ty::{
|
||||
self, Ty, TyCtxt, TypeSuperVisitable, TypeVisitable, TypeVisitableExt, TypeVisitor,
|
||||
};
|
||||
|
||||
use std::ops::ControlFlow;
|
||||
|
||||
|
@ -49,6 +51,12 @@ where
|
|||
return ControlFlow::Continue(());
|
||||
}
|
||||
|
||||
// FIXME: Don't consider alias bounds on types that have escaping bound
|
||||
// vars. See #117455.
|
||||
if ty.has_escaping_bound_vars() {
|
||||
return ty.super_visit_with(self);
|
||||
}
|
||||
|
||||
match ty.kind() {
|
||||
// We can prove that an alias is live two ways:
|
||||
// 1. All the components are live.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue