about summary refs log tree commit diff
path: root/tests/ui/impl-trait/precise-capturing/dyn-use.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/impl-trait/precise-capturing/dyn-use.rs')
-rw-r--r--tests/ui/impl-trait/precise-capturing/dyn-use.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/ui/impl-trait/precise-capturing/dyn-use.rs b/tests/ui/impl-trait/precise-capturing/dyn-use.rs
index fb2f83e2d21..0b6a9467ff7 100644
--- a/tests/ui/impl-trait/precise-capturing/dyn-use.rs
+++ b/tests/ui/impl-trait/precise-capturing/dyn-use.rs
@@ -1,2 +1,10 @@
+//@revisions: edition2015 edition2024
+//@[edition2015] edition:2015
+//@[edition2024] edition:2024
 fn dyn() -> &'static dyn use<> { &() }
-//~^ ERROR expected one of `!`, `(`, `::`, `<`, `where`, or `{`, found keyword `use`
+//[edition2015]~^ ERROR expected one of `!`, `(`, `::`, `<`, `where`, or `{`, found keyword `use`
+//[edition2024]~^^ ERROR expected identifier, found keyword `dyn`
+//[edition2024]~| ERROR `use<...>` precise capturing syntax not allowed in `dyn` trait object bounds
+//[edition2024]~| ERROR at least one trait is required for an object type
+
+fn main() {}