Allow trailing self in more contexts#155137
Conversation
|
@rustbot review |
|
Reminder, once the PR becomes ready for a review, use |
Description for lang teamThis PR implements the last part of the lang team guidance from #146972 (comment). Concretely, after this PR
And technically, this PR will not break existing code. |
|
@rustbot review |
|
Team member @traviscross has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. |
|
@rfcbot reviewed |
This comment has been minimized.
This comment has been minimized.
|
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. |
|
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. |
This comment has been minimized.
This comment has been minimized.
|
@bors r+ |
…trochenkov Allow trailing `self` in more contexts Reference PR: - rust-lang/reference#2237 As a follow-up PR to rust-lang#152996, after this PR: 1. Trailing `self` can appear in paths 2. [E0429](https://doc.rust-lang.org/stable/error_codes/E0429.html#error-code-e0429) will be no longer emitted, `use ...::self [as target];` will be equivalent to `use ...::{self [as target]};` r? petrochenkov
…uwer Rollup of 9 pull requests Successful merges: - #155760 (Remove `AttributeLintKind`) - #154510 (Partially stabilize LoongArch target features) - #155137 (Allow trailing `self` in more contexts) - #155433 (Rip out rustc_layout_scalar_valid_range_* attribute support) - #155702 (Change `ItemKind::Trait` to a field variant.) - #154896 (Fix ICE: Scalar layout for non-primitive non-enum type unsafe binder) - #155675 (Disallow non_exhaustive structs and enums with non_exhaustive variants from implementing `ConstParamTy`) - #155874 (Avoid misleading closure return type note) - #155876 (CI: rfl: move job forward to Linux v7.1-rc1)
…uwer Rollup of 8 pull requests Successful merges: - #154510 (Partially stabilize LoongArch target features) - #155137 (Allow trailing `self` in more contexts) - #155513 (rustc_public: implement `Pattern` type) - #155702 (Change `ItemKind::Trait` to a field variant.) - #154896 (Fix ICE: Scalar layout for non-primitive non-enum type unsafe binder) - #155675 (Disallow non_exhaustive structs and enums with non_exhaustive variants from implementing `ConstParamTy`) - #155874 (Avoid misleading closure return type note) - #155876 (CI: rfl: move job forward to Linux v7.1-rc1)
Rollup merge of #155137 - mu001999-contrib:self-at-end, r=petrochenkov Allow trailing `self` in more contexts Reference PR: - rust-lang/reference#2237 As a follow-up PR to #152996, after this PR: 1. Trailing `self` can appear in paths 2. [E0429](https://doc.rust-lang.org/stable/error_codes/E0429.html#error-code-e0429) will be no longer emitted, `use ...::self [as target];` will be equivalent to `use ...::{self [as target]};` r? petrochenkov
Reference PR:
selfin paths reference#2237View all comments
As a follow-up PR to #152996, after this PR:
selfcan appear in pathsuse ...::self [as target];will be equivalent touse ...::{self [as target]};r? petrochenkov