update identifier naming warnings to give an example#14740
Merged
bors merged 1 commit intorust-lang:masterfrom Jun 9, 2014
Merged
update identifier naming warnings to give an example#14740bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
src/librustc/middle/lint.rs
Outdated
Contributor
There was a problem hiding this comment.
I think this can actually just be
buf.extend(words.chars().enumerate().map(...));i.e. no collect or as_slice.
In fact, the whole function can probably be
s.split('_').flat_map(|word| word.chars().enumerate().map(...)).collect::<String>()(Could you also rename v to c?)
This updates identifier warnings such as ``struct `foo_bar` should have a camel case identifier`` to provide an example. Closes rust-lang#14738.
Contributor
Author
There was a problem hiding this comment.
Is dedenting the right way of doing this? (The line was over 100 chars long).
bors
added a commit
that referenced
this pull request
Jun 9, 2014
This updates identifier warnings such as ``struct `foo_bar` should have a camel case identifier`` to provide an example. Closes #14738.
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
May 15, 2025
…ang#14740) When a `non_std_lazy_statics` warning is generated about an item type which can be replaced by a standard library one, ensure that the lint happens on the item HIR node so that it can be expected. changelog: [`non_std_lazy_statics`]: generate the warning onto the right node Fixes rust-lang/rust-clippy#14729 Note that this doesn't change anything on lints generated for the `lazy_static::lazy_static` macro because the `expect` attribute cannot be applied to a macro.
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.
This updates identifier warnings such as
structfoo_barshould have a camel case identifierto provide an example.Closes #14738.