mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
18 lines
268 B
Rust
18 lines
268 B
Rust
// Check that writing an overlapping impl is not allow unless specialization is ungated.
|
|
|
|
// gate-test-specialization
|
|
|
|
trait Foo {
|
|
fn foo(&self);
|
|
}
|
|
|
|
impl<T> Foo for T {
|
|
fn foo(&self) {}
|
|
}
|
|
|
|
impl Foo for u8 { //~ ERROR E0119
|
|
fn foo(&self) {}
|
|
}
|
|
|
|
fn main() {}
|