mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-03 12:13:43 +00:00
18 lines
286 B
Rust
18 lines
286 B
Rust
// Test that specializing on two type parameters being equal is not allowed.
|
|
|
|
#![feature(min_specialization)]
|
|
|
|
trait X {
|
|
fn f();
|
|
}
|
|
|
|
impl<T> X for T {
|
|
default fn f() {}
|
|
}
|
|
impl<T> X for (T, T) {
|
|
//~^ ERROR specializing impl repeats parameter `T`
|
|
fn f() {}
|
|
}
|
|
|
|
fn main() {}
|