mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
31 lines
461 B
Rust
31 lines
461 B
Rust
struct Wrapper<T>(T);
|
|
|
|
fn foo<T>(foo: Wrapper<T>)
|
|
//~^ ERROR the size for values of type `T` cannot be known at compilation time
|
|
where
|
|
T
|
|
:
|
|
?
|
|
Sized
|
|
{
|
|
//
|
|
}
|
|
|
|
fn bar<T>(foo: Wrapper<T>)
|
|
//~^ ERROR the size for values of type `T` cannot be known at compilation time
|
|
where T: ?Sized
|
|
{
|
|
//
|
|
}
|
|
|
|
fn qux<T>(foo: Wrapper<T>)
|
|
//~^ ERROR the size for values of type `T` cannot be known at compilation time
|
|
where
|
|
T: ?Sized
|
|
{
|
|
//
|
|
}
|
|
|
|
|
|
fn main() {}
|