2016-05-19 14:00:43 +02:00
|
|
|
trait Foo {
|
2017-12-11 00:12:25 +03:00
|
|
|
fn foo<T: Default>(x: T) -> Self;
|
2016-05-19 14:00:43 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
struct Bar;
|
|
|
|
|
|
|
|
impl Foo for Bar {
|
|
|
|
fn foo(x: bool) -> Self { Bar } //~ ERROR E0049
|
|
|
|
}
|
|
|
|
|
2019-06-01 10:35:31 -07:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2016-05-19 14:00:43 +02:00
|
|
|
fn main() {
|
|
|
|
}
|