Provide more context when denying invalid type params #97471
Provide more context when denying invalid type params #97471bors merged 7 commits intorust-lang:masterfrom
Conversation
|
r? @cjgillot (rust-highfive has picked a reviewer for you, use r? to override) |
This comment was marked as resolved.
This comment was marked as resolved.
cjgillot
left a comment
There was a problem hiding this comment.
The logic does not seem straightforward, so I have a lot of questions.
There was a problem hiding this comment.
I don't understand the relation between this comment and the match above which defines is_self.
There was a problem hiding this comment.
Expanded the comment
There was a problem hiding this comment.
Isn't T always a slice &[&hir::PathSegment<'_>]? Can't we just take this?
There was a problem hiding this comment.
I tried doing that. It isn't, there are a couple of callers that pass in an Iterator after skipping a few things. I think at least one uses filter_map, which isn't amenable to a direct subslicing approach.
There was a problem hiding this comment.
Nit (pre-existing): an explicit slice may be easier to read.
This comment was marked as resolved.
This comment was marked as resolved.
9b4436d to
6fdd7e7
Compare
* Confirm the path segment being modified is an `enum` * Check whether type has type param before suggesting changing `Self` * Wording changes * Add clarifying comments * Suggest removing args from `Self` if the type doesn't have type params
6fdd7e7 to
9d9acff
Compare
This comment was marked as resolved.
This comment was marked as resolved.
9d9acff to
da126eb
Compare
da126eb to
ad63f90
Compare
01fa151 to
31e557b
Compare
31e557b to
cd8cfbf
Compare
|
@bors r+ |
|
📌 Commit cd8cfbf has been approved by |
Provide more context when denying invalid type params
Rollup of 3 pull requests Successful merges: - rust-lang#97415 (Compute `is_late_bound_map` query separately from lifetime resolution) - rust-lang#97471 (Provide more context when denying invalid type params ) - rust-lang#97681 (Add more eslint checks) Failed merges: - rust-lang#97446 (Make hir().get_generics and generics_of consistent.) r? `@ghost` `@rustbot` modify labels: rollup
No description provided.