about summary refs log tree commit diff
path: root/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds-trait-objects.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds-trait-objects.rs')
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds-trait-objects.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds-trait-objects.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds-trait-objects.rs
new file mode 100644
index 00000000000..86706671316
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-trait-bounds-trait-objects.rs
@@ -0,0 +1,9 @@
+#![feature(const_trait_impl)]
+// edition: 2021
+
+#[const_trait]
+trait Trait {}
+
+fn main() {
+    let _: &dyn const Trait; //~ ERROR const trait bounds are not allowed in trait object types
+}