Make trait/impl where clause mismatch on region error a bit more actionable#106208
Make trait/impl where clause mismatch on region error a bit more actionable#106208bors merged 3 commits intorust-lang:masterfrom
where clause mismatch on region error a bit more actionable#106208Conversation
|
r? @estebank (rustbot has picked a reviewer for you, use r? to override) |
src/test/ui/generic-associated-types/missing-where-clause-on-trait.stderr
Outdated
Show resolved
Hide resolved
src/test/ui/generic-associated-types/mismatched-where-clause-regions.stderr
Outdated
Show resolved
Hide resolved
|
☔ The latest upstream changes (presumably #106129) made this pull request unmergeable. Please resolve the merge conflicts. |
There was a problem hiding this comment.
you have a few unwraps that I'd be more comfortable turning to else { return; };s if possible, but don't care that much either way (it protects users from weird ICEs in the face of broken invariants, but we would still want to know about them, right?)
There was a problem hiding this comment.
Regarding your concern with spaces:
There are two things we could do: change generics.where_clause_span to include the previous spaces, or get the whole item instead of just the generics and do ty.span.to(where_clause_span) to include the space.
estebank
left a comment
There was a problem hiding this comment.
r=me with whatever nitpicks you want to address
c649d7e to
358b871
Compare
358b871 to
6e794dc
Compare
|
@bors r=estebank |
…n-err, r=estebank Make trait/impl `where` clause mismatch on region error a bit more actionable Improve `where` clause suggestions for GATs/methods that have incompatible region predicates in their `where` clauses. Also addresses this diagnostic that went away rust-lang#106129 (comment)
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#106208 (Make trait/impl `where` clause mismatch on region error a bit more actionable) - rust-lang#106216 (Powershell: Use `WaitForExit` instead of `-Wait`) - rust-lang#106217 (rustdoc: remove unnecessary `.tooltip::after { text-align: center }`) - rust-lang#106218 (Migrate css var scraped examples) - rust-lang#106221 (Rename `Rptr` to `Ref` in AST and HIR) - rust-lang#106223 (On unsized locals with explicit types suggest `&`) - rust-lang#106225 (Remove CraftSpider from review rotation) - rust-lang#106229 (update Miri) - rust-lang#106242 (Detect diff markers in the parser) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#106208 (Make trait/impl `where` clause mismatch on region error a bit more actionable) - rust-lang#106216 (Powershell: Use `WaitForExit` instead of `-Wait`) - rust-lang#106217 (rustdoc: remove unnecessary `.tooltip::after { text-align: center }`) - rust-lang#106218 (Migrate css var scraped examples) - rust-lang#106221 (Rename `Rptr` to `Ref` in AST and HIR) - rust-lang#106223 (On unsized locals with explicit types suggest `&`) - rust-lang#106225 (Remove CraftSpider from review rotation) - rust-lang#106229 (update Miri) - rust-lang#106242 (Detect diff markers in the parser) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Improve
whereclause suggestions for GATs/methods that have incompatible region predicates in theirwhereclauses.Also addresses this diagnostic that went away #106129 (comment)