mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
21 lines
272 B
Rust
21 lines
272 B
Rust
// check-pass
|
|
#![feature(auto_traits)]
|
|
#![feature(negative_impls)]
|
|
|
|
auto trait NotSame {}
|
|
|
|
impl<A> !NotSame for (A, A) {}
|
|
|
|
trait OneOfEach {}
|
|
|
|
impl<A> OneOfEach for (A,) {}
|
|
|
|
impl<A, B> OneOfEach for (A, B)
|
|
where
|
|
(B,): OneOfEach,
|
|
(A, B): NotSame,
|
|
{
|
|
}
|
|
|
|
fn main() {}
|