diff options
Diffstat (limited to 'tests/ui/associated-types/defaults-wf.rs')
-rw-r--r-- | tests/ui/associated-types/defaults-wf.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/associated-types/defaults-wf.rs b/tests/ui/associated-types/defaults-wf.rs new file mode 100644 index 000000000..99b512503 --- /dev/null +++ b/tests/ui/associated-types/defaults-wf.rs @@ -0,0 +1,11 @@ +// Check that associated type defaults are wf checked. + +#![feature(associated_type_defaults)] + +// Default types must always be wf +trait Tr3 { + type Ty = Vec<[u8]>; + //~^ ERROR the size for values of type `[u8]` cannot be known at compilation time +} + +fn main() {} |