about summary refs log tree commit diff
path: root/tests/ui/structs/struct-path-alias-bounds.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/structs/struct-path-alias-bounds.rs')
-rw-r--r--tests/ui/structs/struct-path-alias-bounds.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/structs/struct-path-alias-bounds.rs b/tests/ui/structs/struct-path-alias-bounds.rs
new file mode 100644
index 00000000000..1e2c4b836a1
--- /dev/null
+++ b/tests/ui/structs/struct-path-alias-bounds.rs
@@ -0,0 +1,11 @@
+// issue #36286
+
+struct S<T: Clone> { a: T }
+
+struct NoClone;
+type A = S<NoClone>;
+
+fn main() {
+    let s = A { a: NoClone };
+    //~^ ERROR the trait bound `NoClone: Clone` is not satisfied
+}