blob: 46a0dccb441efa52b5d4b938c9248b0d8c23b2ca [file] [log] [blame]
//@ run-pass
//@ revisions: old next
//@[next] compile-flags: -Znext-solver
#![allow(coherence_leak_check)]
trait Trait: Sized {
fn is_higher_ranked(self) -> bool;
}
impl Trait for for<'a> fn(&'a ()) {
fn is_higher_ranked(self) -> bool {
true
}
}
impl<'a> Trait for fn(&'a ()) {
fn is_higher_ranked(self) -> bool {
false
}
}
fn main() {
let x: for<'a> fn(&'a ()) = |&()| ();
assert!(x.is_higher_ranked());
}