Skip to content

Commit 0b03b9b

Browse files
committed
remove outdated rustc_driver tests
they are subsumed by `hr-subtype/hr-subtype.rs` and other tests
1 parent a2d9179 commit 0b03b9b

File tree

1 file changed

+0
-51
lines changed

1 file changed

+0
-51
lines changed

src/librustc_driver/test.rs

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ use errors::{DiagnosticBuilder, Level};
77
use rustc::hir;
88
use rustc::hir::map as hir_map;
99
use rustc::infer::outlives::env::OutlivesEnvironment;
10-
use rustc::infer::type_variable::TypeVariableOrigin;
1110
use rustc::infer::{self, InferOk, InferResult, SuppressRegionErrors};
1211
use rustc::middle::region;
1312
use rustc::session::config::{OutputFilenames, OutputTypes};
@@ -26,7 +25,6 @@ use syntax::ast;
2625
use syntax::feature_gate::UnstableFeatures;
2726
use syntax::source_map::{FileName, FilePathMapping, SourceMap};
2827
use syntax::symbol::Symbol;
29-
use syntax_pos::DUMMY_SP;
3028

3129
use std::path::PathBuf;
3230
use std::sync::mpsc;
@@ -431,17 +429,6 @@ impl<'a, 'gcx, 'tcx> Env<'a, 'gcx, 'tcx> {
431429
}
432430
}
433431
}
434-
435-
/// Checks that `t1 <: t2` is false (this may register additional
436-
/// region checks).
437-
pub fn check_not_sub(&self, t1: Ty<'tcx>, t2: Ty<'tcx>) {
438-
match self.sub(t1, t2) {
439-
Err(_) => {}
440-
Ok(_) => {
441-
panic!("unexpected success computing sub({:?},{:?})", t1, t2);
442-
}
443-
}
444-
}
445432
}
446433

447434
#[test]
@@ -470,25 +457,6 @@ fn contravariant_region_ptr_err() {
470457
})
471458
}
472459

473-
#[test]
474-
fn sub_free_bound_false() {
475-
//! Test that:
476-
//!
477-
//! fn(&'a isize) <: for<'b> fn(&'b isize)
478-
//!
479-
//! *does not* hold.
480-
481-
test_env(EMPTY_SOURCE_STR, errors(&[]), |mut env| {
482-
env.create_simple_region_hierarchy();
483-
let t_rptr_free1 = env.t_rptr_free(1);
484-
let t_rptr_bound1 = env.t_rptr_late_bound(1);
485-
env.check_not_sub(
486-
env.t_fn(&[t_rptr_free1], env.tcx().types.isize),
487-
env.t_fn(&[t_rptr_bound1], env.tcx().types.isize),
488-
);
489-
})
490-
}
491-
492460
#[test]
493461
fn sub_bound_free_true() {
494462
//! Test that:
@@ -508,25 +476,6 @@ fn sub_bound_free_true() {
508476
})
509477
}
510478

511-
#[test]
512-
fn sub_free_bound_false_infer() {
513-
//! Test that:
514-
//!
515-
//! fn(_#1) <: for<'b> fn(&'b isize)
516-
//!
517-
//! does NOT hold for any instantiation of `_#1`.
518-
519-
test_env(EMPTY_SOURCE_STR, errors(&[]), |env| {
520-
let t_infer1 = env.infcx
521-
.next_ty_var(TypeVariableOrigin::MiscVariable(DUMMY_SP));
522-
let t_rptr_bound1 = env.t_rptr_late_bound(1);
523-
env.check_not_sub(
524-
env.t_fn(&[t_infer1], env.tcx().types.isize),
525-
env.t_fn(&[t_rptr_bound1], env.tcx().types.isize),
526-
);
527-
})
528-
}
529-
530479
/// Test substituting a bound region into a function, which introduces another level of binding.
531480
/// This requires adjusting the Debruijn index.
532481
#[test]

0 commit comments

Comments
 (0)