summaryrefslogtreecommitdiffstats
path: root/tests/ui/higher-rank-trait-bounds/hrtb-exists-forall-fn.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/higher-rank-trait-bounds/hrtb-exists-forall-fn.rs')
-rw-r--r--tests/ui/higher-rank-trait-bounds/hrtb-exists-forall-fn.rs18
1 files changed, 0 insertions, 18 deletions
diff --git a/tests/ui/higher-rank-trait-bounds/hrtb-exists-forall-fn.rs b/tests/ui/higher-rank-trait-bounds/hrtb-exists-forall-fn.rs
deleted file mode 100644
index 567802376..000000000
--- a/tests/ui/higher-rank-trait-bounds/hrtb-exists-forall-fn.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Test an `exists<'a> { forall<'b> { 'a = 'b } }` pattern -- which should not compile!
-//
-// In particular, we test this pattern in trait solving, where it is not connected
-// to any part of the source code.
-
-fn foo<'a>() -> fn(&'a u32) {
- panic!()
-}
-
-fn main() {
- // Here, proving that `fn(&'a u32) <: for<'b> fn(&'b u32)`:
- //
- // - instantiates `'b` with a placeholder `!b`,
- // - requires that `&!b u32 <: &'a u32` and hence that `!b: 'a`,
- // - but we can never know this.
-
- let _: for<'b> fn(&'b u32) = foo(); //~ ERROR mismatched types
-}