mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 14:01:51 +00:00
15 lines
261 B
Rust
15 lines
261 B
Rust
trait Hello {}
|
|
|
|
struct Foo<'a, T: ?Sized>(&'a T);
|
|
|
|
impl<'a, T: ?Sized> Hello for Foo<'a, &'a T> where Foo<'a, T>: Hello {}
|
|
|
|
impl Hello for Foo<'static, i32> {}
|
|
|
|
fn hello<T: ?Sized + Hello>() {}
|
|
|
|
fn main() {
|
|
hello();
|
|
//~^ ERROR type annotations needed
|
|
}
|