Repository navigation
Conversation
|
r? @beetrees rustbot has assigned @beetrees. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
8425e6b to
db5181f
Compare
This comment has been minimized.
This comment has been minimized.
ff47213 to
668b5c9
Compare
This comment has been minimized.
This comment has been minimized.
668b5c9 to
3dbebfe
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
ceccfbd to
724c67c
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
588a7d9 to
082df29
Compare
Previously they were separate because they each contained a fatal parse error. However, by introducing "barrier functions" we give the parser synchronization points to successfully recover from these syntax errors allowing us to put both test cases into the same file. We call the combined file `where-clause-predicates.rs` because it took me a while to realize that this test mainly means to test where clause predicates themselves and not *type aliases with where clauses*. See also PR RUST-39158 which introduced these files and which is about "bound parsing" in general. This makes it alot clearer which UI tests actually concern where clauses on type aliases *specifically* allowing me to more easily find an existing test file I can extend with test cases covering "double where clauses", namely `tests/ui/where-clauses/where-clause-placement-type-alias.rs`.
There's no reason to return a large tuple that the caller then has to convert into an `ItemKind`. None of the callers care about the concrete fields. In the case of `parse_const_item` it's likely a remnant of the time when it was used to parse (or rather finish parsing) const (`ItemKind::Const`) *and* static items (`ItemKind::Static`).
…less type aliases / associated types.
…uses on bodiless associated types
|
Does this leads to any stable code not compiling when it does today? If so, does that need a FCP or is it ok given that it's essentially a bug fix? r? @BoxyUwU |
|
|
Precisely the opposite, it makes more code compile on stable. I consider it a bug fix that doesn't need an FCP because this code would've compiled if we hadn't introduced that overzealous parse error recovery in the linked PR (error recovery should obviously never influence / dictate syntax). (As alluded to in the PR description (see the dates I posted), this was most likely missed because of incredibly unfortunate timing: The error recovery was added when type aliases couldn't have two where clauses yet and the PR extending type aliases was opened long before the error recovery was added but only merged a while after it, so this was most likely just missed during a rebase) |
|
I'm not quite sure why you assigned Boxy specifically, this can be reviewed by anybody roughly familiar with parsing. Given the fact that she's pretty busy and already assigned to 3 other PRs of mine, I'm gonna reroll. @rustbot reroll |
whereclause #93571 (submitted & merged: Feb 2022) at basically the same time as trailing where clauses for type aliases were introduced in PR Change location of where clause on GATs #90076 (submitted: Oct 2021, merged: Mar 2022)where where(i.e., duplicate empty where clauses) on const items (unstable featuregeneric_const_items). See commit for details.Best reviewed commit by commit.
(No LLM was or will be used by me during the entire creation process of this PR)