Open
Description
This doesn't compile:
trait Trait {
fn get();
}
impl<'a, 'b> Trait for &'a &'b () { // There is an implied bound 'b: 'a
fn get() where 'b: 'a, {}
//~^ ERROR impl has stricter requirements than trait
}
Although it should for the same reason it compiles with the following change:
- impl<'a, 'b> Trait for &'a &'b () {
+ impl<'a, 'b> Trait for &'a &'b () where 'b: 'a, {
There should be no difference in behavior between implied and explicit bounds on impl header.
This is because we're not adding sufficient implied bounds in compare_predicate_entailment()
here:
@rustbot label T-types A-implied-bounds A-associated-items C-bug