summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_typeck/src/outlives/test.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--compiler/rustc_typeck/src/outlives/test.rs21
1 files changed, 0 insertions, 21 deletions
diff --git a/compiler/rustc_typeck/src/outlives/test.rs b/compiler/rustc_typeck/src/outlives/test.rs
deleted file mode 100644
index eb0e12034..000000000
--- a/compiler/rustc_typeck/src/outlives/test.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-use rustc_errors::struct_span_err;
-use rustc_middle::ty::TyCtxt;
-use rustc_span::symbol::sym;
-
-pub fn test_inferred_outlives(tcx: TyCtxt<'_>) {
- for id in tcx.hir().items() {
- // For unit testing: check for a special "rustc_outlives"
- // attribute and report an error with various results if found.
- if tcx.has_attr(id.def_id.to_def_id(), sym::rustc_outlives) {
- let inferred_outlives_of = tcx.inferred_outlives_of(id.def_id);
- struct_span_err!(
- tcx.sess,
- tcx.def_span(id.def_id),
- E0640,
- "{:?}",
- inferred_outlives_of
- )
- .emit();
- }
- }
-}