2024-04-03 22:27:13 +01:00
|
|
|
//@ revisions: current next
|
|
|
|
|
//@[next] compile-flags: -Znext-solver
|
2024-07-10 14:13:16 +02:00
|
|
|
//@[current] check-pass
|
2024-04-03 22:27:13 +01:00
|
|
|
|
|
|
|
|
// cc #119820
|
|
|
|
|
|
|
|
|
|
trait Trait<'a, 'b> {}
|
|
|
|
|
|
|
|
|
|
trait OtherTrait<'b> {}
|
|
|
|
|
impl<'a, 'b, T: OtherTrait<'b>> Trait<'a, 'b> for T {}
|
|
|
|
|
|
|
|
|
|
fn impl_hr<'b, T: for<'a> Trait<'a, 'b>>() {}
|
|
|
|
|
|
|
|
|
|
fn not_hr<'a, T: for<'b> Trait<'a, 'b> + OtherTrait<'static>>() {
|
|
|
|
|
impl_hr::<T>();
|
|
|
|
|
//[next]~^ ERROR the trait bound `for<'a> T: Trait<'a, '_>` is not satisfied
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|