about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2018-10-31 13:20:48 -0400
committerNiko Matsakis <niko@alum.mit.edu>2019-01-02 17:35:05 -0500
commit0b03b9bbcfbac0765d79efbd83b36e9970c56b49 (patch)
tree984007c4ed2ed60fc38bfcda649ae9b075d37a37
parenta2d917989c527f6ec27e32411300888c2934611a (diff)
downloadrust-0b03b9bbcfbac0765d79efbd83b36e9970c56b49.tar.gz
rust-0b03b9bbcfbac0765d79efbd83b36e9970c56b49.zip
remove outdated `rustc_driver` tests
they are subsumed by `hr-subtype/hr-subtype.rs` and other tests
-rw-r--r--src/librustc_driver/test.rs51
1 files changed, 0 insertions, 51 deletions
diff --git a/src/librustc_driver/test.rs b/src/librustc_driver/test.rs
index a5f7d676862..9c027f110eb 100644
--- a/src/librustc_driver/test.rs
+++ b/src/librustc_driver/test.rs
@@ -7,7 +7,6 @@ use errors::{DiagnosticBuilder, Level};
 use rustc::hir;
 use rustc::hir::map as hir_map;
 use rustc::infer::outlives::env::OutlivesEnvironment;
-use rustc::infer::type_variable::TypeVariableOrigin;
 use rustc::infer::{self, InferOk, InferResult, SuppressRegionErrors};
 use rustc::middle::region;
 use rustc::session::config::{OutputFilenames, OutputTypes};
@@ -26,7 +25,6 @@ use syntax::ast;
 use syntax::feature_gate::UnstableFeatures;
 use syntax::source_map::{FileName, FilePathMapping, SourceMap};
 use syntax::symbol::Symbol;
-use syntax_pos::DUMMY_SP;
 
 use std::path::PathBuf;
 use std::sync::mpsc;
@@ -431,17 +429,6 @@ impl<'a, 'gcx, 'tcx> Env<'a, 'gcx, 'tcx> {
             }
         }
     }
-
-    /// Checks that `t1 <: t2` is false (this may register additional
-    /// region checks).
-    pub fn check_not_sub(&self, t1: Ty<'tcx>, t2: Ty<'tcx>) {
-        match self.sub(t1, t2) {
-            Err(_) => {}
-            Ok(_) => {
-                panic!("unexpected success computing sub({:?},{:?})", t1, t2);
-            }
-        }
-    }
 }
 
 #[test]
@@ -471,25 +458,6 @@ fn contravariant_region_ptr_err() {
 }
 
 #[test]
-fn sub_free_bound_false() {
-    //! Test that:
-    //!
-    //!     fn(&'a isize) <: for<'b> fn(&'b isize)
-    //!
-    //! *does not* hold.
-
-    test_env(EMPTY_SOURCE_STR, errors(&[]), |mut env| {
-        env.create_simple_region_hierarchy();
-        let t_rptr_free1 = env.t_rptr_free(1);
-        let t_rptr_bound1 = env.t_rptr_late_bound(1);
-        env.check_not_sub(
-            env.t_fn(&[t_rptr_free1], env.tcx().types.isize),
-            env.t_fn(&[t_rptr_bound1], env.tcx().types.isize),
-        );
-    })
-}
-
-#[test]
 fn sub_bound_free_true() {
     //! Test that:
     //!
@@ -508,25 +476,6 @@ fn sub_bound_free_true() {
     })
 }
 
-#[test]
-fn sub_free_bound_false_infer() {
-    //! Test that:
-    //!
-    //!     fn(_#1) <: for<'b> fn(&'b isize)
-    //!
-    //! does NOT hold for any instantiation of `_#1`.
-
-    test_env(EMPTY_SOURCE_STR, errors(&[]), |env| {
-        let t_infer1 = env.infcx
-            .next_ty_var(TypeVariableOrigin::MiscVariable(DUMMY_SP));
-        let t_rptr_bound1 = env.t_rptr_late_bound(1);
-        env.check_not_sub(
-            env.t_fn(&[t_infer1], env.tcx().types.isize),
-            env.t_fn(&[t_rptr_bound1], env.tcx().types.isize),
-        );
-    })
-}
-
 /// Test substituting a bound region into a function, which introduces another level of binding.
 /// This requires adjusting the Debruijn index.
 #[test]