You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#![crate_type = "lib"]traitBound{}traitTrait{fna<T>(&self,T)whereT:Bound;fnb<T>(&self,T)whereT:Bound;fnc<T:Bound>(&self,T);fnd<T:Bound>(&self,T);}implTraitforbool{fna<T:Bound>(&self, _:T){}//~ This gets rejected but should be acceptedfnb<T>(&self, _:T)whereT:Bound{}fnc<T:Bound>(&self, _:T){}fnd<T>(&self, _:T)whereT:Bound{}}
Output
where.rs:13:5:13:35 error:in method `a`,type parameter 0 requires bound `Bound`, which is not required by the corresponding type parameter in the trait declaration[E0052]
where.rs:13fna<T:Bound>(&self, _:T){}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to previous error
These 4 formms are equivalent and should continue to be accepted. Some changes to the where clause parser landed yesterday (#20073), perhaps that caused the regression?