rust/tests/ui/where-clauses/issue-50825-1.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
343 B
Rust
Raw Normal View History

// run-pass
// regression test for issue #50825
2018-06-08 16:00:49 +00:00
// Make sure that the `impl` bound (): X<T = ()> is preferred over
// the (): X bound in the where clause.
trait X {
type T;
}
trait Y<U>: X {
fn foo(x: &Self::T);
}
impl X for () {
type T = ();
}
impl<T> Y<Vec<T>> for () where (): Y<T> {
fn foo(_x: &()) {}
}
fn main () {}