2017-02-25 15:16:27 -06:00
|
|
|
trait Foo { fn foo() {} }
|
2015-12-01 13:26:47 -06:00
|
|
|
|
2015-12-29 23:18:24 -06:00
|
|
|
impl<T> Foo for T {}
|
2018-12-28 17:11:13 -06:00
|
|
|
impl<U> Foo for U {}
|
2019-10-26 10:28:02 -05:00
|
|
|
//~^ ERROR E0119
|
2018-12-28 17:11:13 -06:00
|
|
|
|
2015-12-01 13:26:47 -06:00
|
|
|
|
2017-02-25 15:16:27 -06:00
|
|
|
trait Bar { fn bar() {} }
|
2015-12-01 13:26:47 -06:00
|
|
|
|
2015-12-29 23:18:24 -06:00
|
|
|
impl<T> Bar for (T, u8) {}
|
2018-12-28 17:11:13 -06:00
|
|
|
impl<T> Bar for (u8, T) {}
|
2019-10-26 10:28:02 -05:00
|
|
|
//~^ ERROR E0119
|
2015-12-01 13:26:47 -06:00
|
|
|
|
2017-02-25 15:16:27 -06:00
|
|
|
trait Baz<T> { fn baz() {} }
|
2015-12-01 13:26:47 -06:00
|
|
|
|
2015-12-29 23:18:24 -06:00
|
|
|
impl<T> Baz<u8> for T {}
|
2018-12-28 17:11:13 -06:00
|
|
|
impl<T> Baz<T> for u8 {}
|
2019-10-26 10:28:02 -05:00
|
|
|
//~^ ERROR E0119
|
2015-12-01 13:26:47 -06:00
|
|
|
|
2017-02-25 15:16:27 -06:00
|
|
|
trait Quux<U, V> { fn quux() {} }
|
2015-12-01 13:26:47 -06:00
|
|
|
|
2015-12-29 23:18:24 -06:00
|
|
|
impl<T, U, V> Quux<U, V> for T {}
|
2018-12-28 17:11:13 -06:00
|
|
|
impl<T, U> Quux<U, U> for T {}
|
2019-10-26 10:28:02 -05:00
|
|
|
//~^ ERROR E0119
|
2018-12-28 17:11:13 -06:00
|
|
|
impl<T, V> Quux<T, V> for T {}
|
2019-10-26 10:28:02 -05:00
|
|
|
//~^ ERROR E0119
|
2015-12-01 13:26:47 -06:00
|
|
|
|
|
|
|
fn main() {}
|