Skip to content

Commit e7ed997

Browse files
committed
extract type_relate into the inference context as nll_relate
The name is not great. Nor is the existence of this code great. It should be merged with the main "type relating code" at some point.
1 parent b6a080e commit e7ed997

File tree

3 files changed

+681
-651
lines changed

3 files changed

+681
-651
lines changed

src/librustc/infer/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ mod higher_ranked;
6262
pub mod lattice;
6363
mod lexical_region_resolve;
6464
mod lub;
65+
pub mod nll_relate;
6566
pub mod opaque_types;
6667
pub mod outlives;
6768
pub mod region_constraints;
@@ -1239,7 +1240,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
12391240
/// sidesteps a number of important checks, such as the "occurs
12401241
/// check" that prevents cyclic types, so it is important not to
12411242
/// use this method during regular type-check.
1242-
pub fn force_instantiate_unchecked(&self, var: Ty<'tcx>, value: Ty<'tcx>) {
1243+
fn force_instantiate_unchecked(&self, var: Ty<'tcx>, value: Ty<'tcx>) {
12431244
match (&var.sty, &value.sty) {
12441245
(&ty::Infer(ty::TyVar(vid)), _) => {
12451246
let mut type_variables = self.type_variables.borrow_mut();

0 commit comments

Comments
 (0)