Skip to content

Commit

Permalink
Fix rebase issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sgrif committed Mar 19, 2018
1 parent 725eeb0 commit 3f599ad
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 0 additions & 2 deletions src/librustc/infer/canonical.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,6 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
let ty = match ty_kind {
CanonicalTyVarKind::General => {
self.next_ty_var(
// FIXME(#48696) this handling of universes is not right.
ty::UniverseIndex::ROOT,
TypeVariableOrigin::MiscVariable(span),
)
}
Expand Down
2 changes: 2 additions & 0 deletions src/librustc/infer/region_constraints/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,8 @@ pub fn region_universe(var_infos: &VarInfos, region: Region<'_>) -> ty::Universe
ty::ReVar(vid) => var_infos[vid].universe,
ty::ReLateBound(..) =>
bug!("region_universe(): encountered bound region {:?}", region),
ty::ReCanonical(..) =>
bug!("region_universe(): encountered canonical region {:?}", region),
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/librustc/traits/select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1514,7 +1514,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
assert!(!skol_trait_ref.has_escaping_regions());
match self.infcx.at(&obligation.cause, obligation.param_env)
.sup(ty::Binder(skol_trait_ref), trait_bound) {
Ok(InferOk { obligations, .. }) => true,
Ok(InferOk { .. }) => true,
Err(_) => false,
}
}
Expand Down
9 changes: 4 additions & 5 deletions src/librustc/ty/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,7 @@ impl<'tcx> ParamEnv<'tcx> {
/// Trait`) are left hidden, so this is suitable for ordinary
/// type-checking.
pub fn empty() -> Self {
Self::new(ty::Slice::empty(), Reveal::UserFacing, ty::UniverseIndex::ROOT)
Self::new(ty::Slice::empty(), Reveal::UserFacing)
}

/// Construct a trait environment with no where clauses in scope
Expand All @@ -1405,15 +1405,14 @@ impl<'tcx> ParamEnv<'tcx> {
/// NB. If you want to have predicates in scope, use `ParamEnv::new`,
/// or invoke `param_env.with_reveal_all()`.
pub fn reveal_all() -> Self {
Self::new(ty::Slice::empty(), Reveal::All, ty::UniverseIndex::ROOT)
Self::new(ty::Slice::empty(), Reveal::All)
}

/// Construct a trait environment with the given set of predicates.
pub fn new(caller_bounds: &'tcx ty::Slice<ty::Predicate<'tcx>>,
reveal: Reveal,
universe: ty::UniverseIndex)
reveal: Reveal)
-> Self {
ty::ParamEnv { caller_bounds, reveal, universe }
ty::ParamEnv { caller_bounds, reveal }
}

/// Returns a new parameter environment with the same clauses, but
Expand Down

0 comments on commit 3f599ad

Please sign in to comment.