tidy: error if a lang feature is already present#102971
Merged
bors merged 1 commit intorust-lang:masterfrom Oct 13, 2022
Merged
tidy: error if a lang feature is already present#102971bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
Contributor
|
r? @jyn514 (rust-highfive has picked a reviewer for you, use r? to override) |
jyn514
approved these changes
Oct 12, 2022
Member
jyn514
left a comment
There was a problem hiding this comment.
Thanks! This looks good to me with one nit :)
src/tools/tidy/src/features.rs
Outdated
Member
There was a problem hiding this comment.
"level" is a weird thing to call this IMO.
Suggested change
| "{}:{} feature {name} already specified with level '{}'", | |
| "{}:{} feature {name} already specified with status '{}'", |
Member
Author
There was a problem hiding this comment.
I guess it comes from "stabilization level" or something, and the variable names already exist in the code, but I will change it.
This comment has been minimized.
This comment has been minimized.
If a lang feature gets declared twice, like for example as a result of a mistake during stabilization, emit an error in tidy. Library features already have this logic.
6f0bed1 to
c278700
Compare
Member
|
@bors r+ Thanks! |
Collaborator
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this pull request
Oct 12, 2022
…, r=jyn514 tidy: error if a lang feature is already present If a lang feature gets declared twice, like for example as a result of a mistake during stabilization, emit an error in tidy. Library features already have this logic. Inspired by a mistake done during `half_open_range_patterns` stabilization: https://github.com/rust-lang/rust/pull/102275/files#r991292215 The PR requires rust-lang#102883 to be merged before CI turns green because the check is doing its job. For reviewers, I suggest [turning off whitespace changes](https://github.com/rust-lang/rust/pull/102971/files?w=1) in the diff by adding `?w=1` to the url, as a large part of the diff is just about removing one level of indentation.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Oct 13, 2022
Rollup of 7 pull requests Successful merges: - rust-lang#102641 (Support casting boxes to dyn*) - rust-lang#102836 (rustc_target: Fix json target specs using LLD linker flavors in link args) - rust-lang#102949 (should-skip-this: add missing backslash) - rust-lang#102967 (Add test for issue 102964) - rust-lang#102971 (tidy: error if a lang feature is already present) - rust-lang#102974 (Fix small word dupe typos) - rust-lang#102980 (rustdoc: merge separate `.item-info` CSS) Failed merges: 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.
If a lang feature gets declared twice, like for example as a result of a mistake during stabilization, emit an error in tidy. Library features already have this logic.
Inspired by a mistake done during
half_open_range_patternsstabilization: https://github.com/rust-lang/rust/pull/102275/files#r991292215The PR requires #102883 to be merged before CI turns green because the check is doing its job.
For reviewers, I suggest turning off whitespace changes in the diff by adding
?w=1to the url, as a large part of the diff is just about removing one level of indentation.