]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unsized/unsized-enum.rs
Auto merge of #75936 - sdroege:chunks-exact-construction-bounds-check, r=nagisa
[rust.git] / src / test / ui / unsized / unsized-enum.rs
1 fn is_sized<T:Sized>() { }
2 fn not_sized<T: ?Sized>() { }
3
4 enum Foo<U> { FooSome(U), FooNone }
5 fn foo1<T>() { not_sized::<Foo<T>>() } // Hunky dory.
6 fn foo2<T: ?Sized>() { not_sized::<Foo<T>>() }
7 //~^ ERROR the size for values of type
8 //
9 // Not OK: `T` is not sized.
10
11 fn main() { }