diff options
Diffstat (limited to 'tests/ui/traits/bad-sized.rs')
| -rw-r--r-- | tests/ui/traits/bad-sized.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/traits/bad-sized.rs b/tests/ui/traits/bad-sized.rs new file mode 100644 index 00000000000..a1521967978 --- /dev/null +++ b/tests/ui/traits/bad-sized.rs @@ -0,0 +1,9 @@ +trait Trait {} + +pub fn main() { + let x: Vec<dyn Trait + Sized> = Vec::new(); + //~^ ERROR only auto traits can be used as additional traits in a trait object + //~| ERROR the size for values of type + //~| ERROR the size for values of type + //~| ERROR the size for values of type +} |
