Skip to content

Commit

Permalink
Fixes after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
canndrew committed Mar 14, 2018
1 parent 81ae93e commit b1526ca
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 52 deletions.
8 changes: 1 addition & 7 deletions src/librustc/infer/canonical.rs
Expand Up @@ -609,12 +609,6 @@ impl<'cx, 'gcx, 'tcx> TypeFolder<'gcx, 'tcx> for Canonicalizer<'cx, 'gcx, 'tcx>
bug!("encountered a canonical type during canonicalization")
}

// Replace a `()` that "would've fallen back" to `!` with just `()`.
ty::TyTuple(ref tys, true) => {
assert!(tys.is_empty());
self.tcx().mk_nil()
}

ty::TyClosure(..)
| ty::TyGenerator(..)
| ty::TyGeneratorWitness(..)
Expand All @@ -634,7 +628,7 @@ impl<'cx, 'gcx, 'tcx> TypeFolder<'gcx, 'tcx> for Canonicalizer<'cx, 'gcx, 'tcx>
| ty::TyFnPtr(_)
| ty::TyDynamic(..)
| ty::TyNever
| ty::TyTuple(_, false)
| ty::TyTuple(..)
| ty::TyProjection(..)
| ty::TyForeign(..)
| ty::TyParam(..)
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/traits/query/dropck_outlives.rs
Expand Up @@ -236,7 +236,7 @@ fn trivial_dropck_outlives<'cx, 'tcx>(tcx: TyCtxt<'cx, '_, 'tcx>, ty: Ty<'tcx>)

// (T1..Tn) and closures have same properties as T1..Tn --
// check if *any* of those are trivial.
ty::TyTuple(ref tys, _) => tys.iter().cloned().all(|t| trivial_dropck_outlives(tcx, t)),
ty::TyTuple(ref tys) => tys.iter().cloned().all(|t| trivial_dropck_outlives(tcx, t)),
ty::TyClosure(def_id, ref substs) => substs
.upvar_tys(def_id, tcx)
.all(|t| trivial_dropck_outlives(tcx, t)),
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_traits/dropck_outlives.rs
Expand Up @@ -184,7 +184,7 @@ fn dtorck_constraint_for_ty<'a, 'gcx, 'tcx>(
dtorck_constraint_for_ty(tcx, span, for_ty, depth + 1, ety)
}

ty::TyTuple(tys, _) => tys.iter()
ty::TyTuple(tys) => tys.iter()
.map(|ty| dtorck_constraint_for_ty(tcx, span, for_ty, depth + 1, ty))
.collect(),

Expand Down
43 changes: 0 additions & 43 deletions src/test/ui/feature-gate-never_type.stderr

This file was deleted.

0 comments on commit b1526ca

Please sign in to comment.