about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAndrew Cann <shum@canndrew.org>2018-03-14 12:36:58 +0800
committerAndrew Cann <shum@canndrew.org>2018-03-14 12:45:14 +0800
commitb1526ca384028bb1ca52dc58eb4d47f930afae62 (patch)
tree128925571868fb536d72705324a32c8dec78eade /src
parent81ae93e3390aa686c09c5ae3a2e25274ad1fdab2 (diff)
downloadrust-b1526ca384028bb1ca52dc58eb4d47f930afae62.tar.gz
rust-b1526ca384028bb1ca52dc58eb4d47f930afae62.zip
Fixes after rebase
Diffstat (limited to 'src')
-rw-r--r--src/librustc/infer/canonical.rs8
-rw-r--r--src/librustc/traits/query/dropck_outlives.rs2
-rw-r--r--src/librustc_traits/dropck_outlives.rs2
-rw-r--r--src/test/ui/feature-gate-never_type.stderr43
4 files changed, 3 insertions, 52 deletions
diff --git a/src/librustc/infer/canonical.rs b/src/librustc/infer/canonical.rs
index 9519baa3ff7..4e0cf59e8a7 100644
--- a/src/librustc/infer/canonical.rs
+++ b/src/librustc/infer/canonical.rs
@@ -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(..)
@@ -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(..)
diff --git a/src/librustc/traits/query/dropck_outlives.rs b/src/librustc/traits/query/dropck_outlives.rs
index 0fe4daa36ed..1caab6fd89e 100644
--- a/src/librustc/traits/query/dropck_outlives.rs
+++ b/src/librustc/traits/query/dropck_outlives.rs
@@ -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)),
diff --git a/src/librustc_traits/dropck_outlives.rs b/src/librustc_traits/dropck_outlives.rs
index 2274f3942bd..2a8cfe5cc06 100644
--- a/src/librustc_traits/dropck_outlives.rs
+++ b/src/librustc_traits/dropck_outlives.rs
@@ -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(),
 
diff --git a/src/test/ui/feature-gate-never_type.stderr b/src/test/ui/feature-gate-never_type.stderr
deleted file mode 100644
index 187be6d8291..00000000000
--- a/src/test/ui/feature-gate-never_type.stderr
+++ /dev/null
@@ -1,43 +0,0 @@
-error[E0658]: The `!` type is experimental (see issue #35121)
-  --> $DIR/feature-gate-never_type.rs:17:17
-   |
-LL | type Ma = (u32, !, i32); //~ ERROR type is experimental
-   |                 ^
-   |
-   = help: add #![feature(never_type)] to the crate attributes to enable
-
-error[E0658]: The `!` type is experimental (see issue #35121)
-  --> $DIR/feature-gate-never_type.rs:18:20
-   |
-LL | type Meeshka = Vec<!>; //~ ERROR type is experimental
-   |                    ^
-   |
-   = help: add #![feature(never_type)] to the crate attributes to enable
-
-error[E0658]: The `!` type is experimental (see issue #35121)
-  --> $DIR/feature-gate-never_type.rs:19:16
-   |
-LL | type Mow = &fn(!) -> !; //~ ERROR type is experimental
-   |                ^
-   |
-   = help: add #![feature(never_type)] to the crate attributes to enable
-
-error[E0658]: The `!` type is experimental (see issue #35121)
-  --> $DIR/feature-gate-never_type.rs:20:19
-   |
-LL | type Skwoz = &mut !; //~ ERROR type is experimental
-   |                   ^
-   |
-   = help: add #![feature(never_type)] to the crate attributes to enable
-
-error[E0658]: The `!` type is experimental (see issue #35121)
-  --> $DIR/feature-gate-never_type.rs:23:16
-   |
-LL |     type Wub = !; //~ ERROR type is experimental
-   |                ^
-   |
-   = help: add #![feature(never_type)] to the crate attributes to enable
-
-error: aborting due to 5 previous errors
-
-For more information about this error, try `rustc --explain E0658`.