about summary refs log tree commit diff
path: root/tests/ui/traits/const-traits/conditionally-const-in-struct-args.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/traits/const-traits/conditionally-const-in-struct-args.rs')
-rw-r--r--tests/ui/traits/const-traits/conditionally-const-in-struct-args.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/ui/traits/const-traits/conditionally-const-in-struct-args.rs b/tests/ui/traits/const-traits/conditionally-const-in-struct-args.rs
new file mode 100644
index 00000000000..0c644694585
--- /dev/null
+++ b/tests/ui/traits/const-traits/conditionally-const-in-struct-args.rs
@@ -0,0 +1,21 @@
+//@ compile-flags: -Znext-solver
+//@ known-bug: #132067
+//@ check-pass
+
+#![feature(const_trait_impl)]
+
+struct S;
+#[const_trait]
+trait Trait<const N: u32> {}
+
+const fn f<
+    T: Trait<
+        {
+            struct I<U: [const] Trait<0>>(U);
+            0
+        },
+    >,
+>() {
+}
+
+pub fn main() {}