Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/next_solver/infer/mod.rs')
| -rw-r--r-- | crates/hir-ty/src/next_solver/infer/mod.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/hir-ty/src/next_solver/infer/mod.rs b/crates/hir-ty/src/next_solver/infer/mod.rs index ce6c941287..8e922abacb 100644 --- a/crates/hir-ty/src/next_solver/infer/mod.rs +++ b/crates/hir-ty/src/next_solver/infer/mod.rs @@ -2,6 +2,7 @@ use std::cell::{Cell, RefCell}; use std::fmt; +use std::ops::Range; use std::sync::Arc; pub use BoundRegionConversionTime::*; @@ -55,6 +56,7 @@ mod opaque_types; pub mod region_constraints; pub mod relate; pub mod resolve; +pub(crate) mod select; pub(crate) mod snapshot; pub(crate) mod traits; mod type_variable; @@ -81,6 +83,10 @@ pub(crate) type UnificationTable<'a, 'db, T> = ut::UnificationTable< ut::InPlace<T, &'a mut ut::UnificationStorage<T>, &'a mut InferCtxtUndoLogs<'db>>, >; +fn iter_idx_range<T: From<u32> + Into<u32>>(range: Range<T>) -> impl Iterator<Item = T> { + (range.start.into()..range.end.into()).map(Into::into) +} + /// This type contains all the things within `InferCtxt` that sit within a /// `RefCell` and are involved with taking/rolling back snapshots. Snapshot /// operations are hot enough that we want only one call to `borrow_mut` per |