Use Binder<Vec<T>> instead of Vec<Binder<T>> in new solver
This commit is contained in:
parent
4ecd70ddd1
commit
8282181e42
8 changed files with 70 additions and 75 deletions
|
@ -2,6 +2,7 @@
|
|||
//! the end of the file for details.
|
||||
|
||||
use rustc_middle::ty::fold::FnMutDelegate;
|
||||
use rustc_middle::ty::visit::TypeVisitableExt;
|
||||
use rustc_middle::ty::{self, Ty, TyCtxt, TypeFoldable};
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
|
@ -26,8 +27,9 @@ impl<'tcx> InferCtxt<'tcx> {
|
|||
where
|
||||
T: TypeFoldable<TyCtxt<'tcx>>,
|
||||
{
|
||||
if let Some(inner) = binder.clone().no_bound_vars() {
|
||||
return inner;
|
||||
// Inlined `no_bound_vars`.
|
||||
if !binder.as_ref().skip_binder().has_escaping_bound_vars() {
|
||||
return binder.skip_binder();
|
||||
}
|
||||
|
||||
let next_universe = self.create_next_universe();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue