Unlock trailing where-clauses for lazy type aliases#114662
Merged
bors merged 1 commit intorust-lang:masterfrom Aug 11, 2023
Merged
Unlock trailing where-clauses for lazy type aliases#114662bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
fmease
commented
Aug 9, 2023
Comment on lines
1333
to
1338
Member
Author
There was a problem hiding this comment.
This is a bit awkward. Sadly I couldn't find an obvious way to deduplicate the error diagnostic WhereClauseBeforeTypeAlias & the lint diagnostic for DEPRECATED_WHERE_CLAUSE_LOCATION, the code of the latter is spread across two crates (rustc_ast_passes & rustc_lint_defs).
This comment has been minimized.
This comment has been minimized.
76faf05 to
fe22afa
Compare
fe22afa to
051eb7c
Compare
Contributor
|
@bors r+ |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 11, 2023
…mpiler-errors Rollup of 7 pull requests Successful merges: - rust-lang#114599 (Add impl trait declarations to SMIR) - rust-lang#114622 (rustc: Move `crate_types` and `stable_crate_id` from `Session` to `GlobalCtxt`) - rust-lang#114662 (Unlock trailing where-clauses for lazy type aliases) - rust-lang#114693 (Remove myself from the review rotation) - rust-lang#114694 (make the provisional cache slightly less broken) - rust-lang#114705 (Add spastorino to mailmap) - rust-lang#114712 (Fix a couple of bad comments) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 27, 2023
…lebcartwright Amend style guide section for formatting where clauses in type aliases This PR has two parts: 1. Amend wording about breaking before or after the `=`, which is a style guide bugfix to align it with current rustfmt behavior. 2. Explain how to format trailing (rust-lang#89122) where clauses, which are preferred in both GATs (rust-lang#90076) and type aliases (rust-lang#114662). r? `@joshtriplett`
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allows trailing where-clauses on lazy type aliases and forbids1 leading ones.
Completes #89122 (see section Top-level type aliases).
@rustbot label F-lazy_type_alias
r? @oli-obk
Footnotes
This is absolutely fine since lazy type aliases are only meant to be stabilized as part of a new edition. ↩