mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
23 lines
316 B
Rust
23 lines
316 B
Rust
trait Foo {
|
|
fn foo<T: Default>(x: T) -> Self;
|
|
}
|
|
|
|
struct Bar;
|
|
|
|
impl Foo for Bar {
|
|
fn foo(x: bool) -> Self { Bar } //~ ERROR E0049
|
|
}
|
|
|
|
trait Fuzz {
|
|
fn fuzz<A: Default, B>(x: A, y: B) -> Self;
|
|
}
|
|
|
|
struct Baz;
|
|
|
|
impl Fuzz for Baz {
|
|
fn fuzz(x: bool, y: bool) -> Self { Baz } //~ ERROR E0049
|
|
}
|
|
|
|
fn main() {
|
|
}
|