Rollup merge of #99353 - compiler-errors:gat-where-clause-mismatch, r=cjgillot

Slightly improve mismatched GAT where clause error

This makes the error reporting a bit more standardized between `where` on GATs and functions.

cc #99206 (`@BoxyUwU),` don't want to mark this as as "fixed" because they're still not perfect, but this is still an improvement IMO so I want to land it incrementally.

regarding "consider adding where clause to trait definition", we don't actually do that for methods as far as i can tell? i could file an issue to look into that maybe.
This commit is contained in:
Yuki Okushi
2022-07-26 13:12:19 +09:00
committed by GitHub
22 changed files with 126 additions and 208 deletions

View File

@@ -224,6 +224,7 @@ TrivialTypeTraversalAndLiftImpls! {
// general `Region`.
crate::ty::BoundRegionKind,
crate::ty::AssocItem,
crate::ty::AssocKind,
crate::ty::Placeholder<crate::ty::BoundRegionKind>,
crate::ty::ClosureKind,
crate::ty::FreeRegion,