mirror of
https://github.com/rust-lang/rust
synced 2024-09-05 16:57:03 +00:00
20 lines
264 B
Rust
20 lines
264 B
Rust
pub trait Array {
|
|
type Element;
|
|
}
|
|
|
|
pub trait Visit {
|
|
fn visit() {}
|
|
}
|
|
|
|
impl Array for () {
|
|
type Element = ();
|
|
}
|
|
|
|
impl<'a> Visit for () where
|
|
(): Array<Element=&'a ()>,
|
|
{}
|
|
|
|
fn main() {
|
|
<() as Visit>::visit(); //~ ERROR: type mismatch resolving
|
|
}
|