diff options
Diffstat (limited to 'tests/ui/structs/struct-path-alias-bounds.rs')
-rw-r--r-- | tests/ui/structs/struct-path-alias-bounds.rs | 11 |
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 000000000..1e2c4b836 --- /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 +} |