Merged
Conversation
Collaborator
|
rustbot has assigned @petrochenkov. Use r? to explicitly pick a reviewer |
This comment has been minimized.
This comment has been minimized.
8245e40 to
bcb8768
Compare
Member
Author
|
Fixed format. |
Contributor
|
I'm on vacation. |
Urgau
reviewed
Feb 17, 2024
| /// level as that would require a [`LintExpectationId`] | ||
| pub fn from_str(x: &str) -> Option<Level> { | ||
| /// level as that would require a [`LintExpectationId`]. | ||
| pub fn from_str(x: &str) -> Option<Self> { |
Member
There was a problem hiding this comment.
Suggested change
| pub fn from_str(x: &str) -> Option<Self> { | |
| pub fn from_str(x: &str) -> Option<Level> { |
| sym::warn => Some(Level::Warn), | ||
| sym::deny => Some(Level::Deny), | ||
| sym::forbid => Some(Level::Forbid), | ||
| pub fn from_attr(attr: &Attribute) -> Option<Self> { |
Member
There was a problem hiding this comment.
Suggested change
| pub fn from_attr(attr: &Attribute) -> Option<Self> { | |
| pub fn from_attr(attr: &Attribute) -> Option<Level> { |
| Self::from_symbol(attr.name_or_empty(), Some(attr.id)) | ||
| } | ||
|
|
||
| pub fn from_symbol(s: Symbol, id: Option<AttrId>) -> Option<Self> { |
Member
There was a problem hiding this comment.
Suggested change
| pub fn from_symbol(s: Symbol, id: Option<AttrId>) -> Option<Self> { | |
| pub fn from_symbol(s: Symbol, id: Option<AttrId>) -> Option<Level> { |
bcb8768 to
c17539c
Compare
Member
|
I have no opinion on |
Member
|
@bors rollup=always |
Member
Author
|
@bors r=Nadrieril |
Collaborator
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
Feb 18, 2024
…=Nadrieril Extend Level API I need this API for rust-lang/rust-clippy#12303: I have a nested `cfg` attribute (so a `MetaItem`) and I'd like to still be able to match against all possible kind of `Level`s.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 18, 2024
…llaumeGomez Rollup of 5 pull requests Successful merges: - rust-lang#121067 (make "invalid fragment specifier" translatable) - rust-lang#121079 (distribute tool documentations and avoid file conflicts on `x install`) - rust-lang#121230 (Extend Level API) - rust-lang#121241 (Implement `NonZero` traits generically.) - rust-lang#121247 (Add help to `hir_analysis_unrecognized_intrinsic_function`) r? `@ghost` `@rustbot` modify labels: rollup
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Feb 19, 2024
…=Nadrieril Extend Level API I need this API for rust-lang/rust-clippy#12303: I have a nested `cfg` attribute (so a `MetaItem`) and I'd like to still be able to match against all possible kind of `Level`s.
This was referenced Feb 19, 2024
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 19, 2024
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#119808 (Store core::str::CharSearcher::utf8_size as u8) - rust-lang#121032 (Continue reporting remaining errors instead of silently dropping them) - rust-lang#121041 (Add `Future` and `IntoFuture` to the 2024 prelude) - rust-lang#121230 (Extend Level API) - rust-lang#121272 (Add diagnostic items for legacy numeric constants) - rust-lang#121275 (add test for panicking attribute macros) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 19, 2024
Rollup merge of rust-lang#121230 - GuillaumeGomez:extend-level-api, r=Nadrieril Extend Level API I need this API for rust-lang/rust-clippy#12303: I have a nested `cfg` attribute (so a `MetaItem`) and I'd like to still be able to match against all possible kind of `Level`s.
bors
added a commit
to rust-lang/rust-clippy
that referenced
this pull request
Feb 28, 2024
Improve `is_lint_level` code Since rust-lang/rust#121230 was merged, we can now rely on `Level` directly instead of keeping the list of symbols to check in clippy. changelog: Improve `is_lint_level` code
bors
added a commit
to rust-lang/rust-clippy
that referenced
this pull request
Feb 28, 2024
Improve `is_lint_level` code Since rust-lang/rust#121230 was merged, we can now rely on `Level` directly instead of keeping the list of symbols to check in clippy. changelog: Improve `is_lint_level` code
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.
I need this API for rust-lang/rust-clippy#12303: I have a nested
cfgattribute (so aMetaItem) and I'd like to still be able to match against all possible kind ofLevels.