mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-30 20:17:50 +00:00
14 lines
296 B
Rust
14 lines
296 B
Rust
#![feature(impl_trait_in_bindings)]
|
|
|
|
trait Foo {}
|
|
|
|
struct W<T>(T);
|
|
impl<T> Foo for W<T> where T: Foo {}
|
|
|
|
fn main() {
|
|
let x: impl Foo = W(());
|
|
//~^ ERROR the trait bound `(): Foo` is not satisfied
|
|
let x: W<impl Foo> = W(());
|
|
//~^ ERROR the trait bound `(): Foo` is not satisfied
|
|
}
|