// Tests that using fulfillment in the trait solver means that we detect that a // method is impossible, leading to no ambiguity. //@ check-pass //@ revisions: current next //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver struct W(Option, Option); impl<'a> W { fn method(&self) {} } trait Leak {} impl Leak for T {} impl W { fn method(&self) {} } fn test<'a>() { let x: W = W(None, None); x.method(); } fn main() {}