about summary refs log tree commit diff
path: root/tests/ui/impl-trait/impl-fn-hrtb-bounds-2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/impl-trait/impl-fn-hrtb-bounds-2.rs')
-rw-r--r--tests/ui/impl-trait/impl-fn-hrtb-bounds-2.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/ui/impl-trait/impl-fn-hrtb-bounds-2.rs b/tests/ui/impl-trait/impl-fn-hrtb-bounds-2.rs
index b0aeded0ef7..f4bfbdeb9f3 100644
--- a/tests/ui/impl-trait/impl-fn-hrtb-bounds-2.rs
+++ b/tests/ui/impl-trait/impl-fn-hrtb-bounds-2.rs
@@ -1,8 +1,11 @@
+//@revisions: edition2015 edition2024
+//@[edition2015] edition:2015
+//@[edition2024] edition:2024
 #![feature(impl_trait_in_fn_trait_return)]
 use std::fmt::Debug;
 
-fn a() -> impl Fn(&u8) -> impl Debug {
-    |x| x //~ ERROR hidden type for `impl Debug` captures lifetime that does not appear in bounds
+fn a() -> impl Fn(&u8) -> impl Debug { //[edition2024]~ ERROR `impl Trait` cannot capture higher-ranked lifetime from outer `impl Trait`
+    |x| x //[edition2015]~ ERROR hidden type for `impl Debug` captures lifetime that does not appear in bounds
 }
 
 fn main() {}