Lint against misplaced where-clauses on associated types in traits#113560
Merged
bors merged 1 commit intorust-lang:masterfrom Jul 11, 2023
Merged
Lint against misplaced where-clauses on associated types in traits#113560bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
Collaborator
|
r? @cjgillot (rustbot has picked a reviewer for you, use r? to override) |
Contributor
|
This makes sense, and given that it only affects nightly feature-gated code and just extends this lint to a position where it was forgotten, I'm gonna approve it. r? @compiler-errors @bors r+ rollup |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jul 11, 2023
…iaskrgr Rollup of 4 pull requests Successful merges: - rust-lang#112717 (Implement a few more rvalue translation to smir) - rust-lang#113310 (Don't suggest `impl Trait` in path position) - rust-lang#113497 (Support explicit 32-bit MIPS ABI for the synthetic object) - rust-lang#113560 (Lint against misplaced where-clauses on associated types in traits) r? `@ghost` `@rustbot` modify labels: rollup
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.
Extends the scope of the lint
deprecated_where_clause_location(#89122) from associated types in impls to associated types in any location (impl or trait). This is only relevant for#![feature(associated_type_defaults)]. Previously we didn't warn on the following code for example:Personally I would've preferred to emit a hard error here instead of a lint warning since the feature is unstable but unfortunately we are constrained by back compat as associated type defaults won't necessarily trigger the feature-gate error if they are inside of a macro call (since they use a post-expansion feature-gate due to historical reasons, see also #66004).
I've renamed and moved related preexisting tests: 1. They test AST validation passes not the parser & thus shouldn't live in
parser/(historical reasons?). 2. One test file was named after type aliases even though it tests assoc tys.@rustbot label A-lint