diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/generics/generic-non-trailing-defaults.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/generics/generic-non-trailing-defaults.rs b/src/test/ui/generics/generic-non-trailing-defaults.rs new file mode 100644 index 000000000..16ea71d48 --- /dev/null +++ b/src/test/ui/generics/generic-non-trailing-defaults.rs @@ -0,0 +1,10 @@ +struct Heap; + +struct Vec<A = Heap, T>(A, T); +//~^ ERROR generic parameters with a default must be trailing + +struct Foo<A, B = Vec<C>, C>(A, B, C); +//~^ ERROR generic parameters with a default must be trailing +//~| ERROR generic parameters with a default cannot use + +fn main() {} |