patternrustCritical
Is there some way to not show a warning for non snake case identifiers?
Viewed 0 times
warningsomeidentifierssnakefornonwaynotshowcase
Problem
I'm writing my first tests in Rust and I find this:
warning: function
after searching, I found this style guide.
I understand it is a convention, but is there some way to not show this warning?
warning: function
testCall should have a snake case name such astest_call, #[warn(non_snake_case)] on by defaultafter searching, I found this style guide.
I understand it is a convention, but is there some way to not show this warning?
Solution
You can use the
More on attributes here.
allow attribute as such:#[allow(non_snake_case)]
fn nonSnakeCase() {}More on attributes here.
Code Snippets
#[allow(non_snake_case)]
fn nonSnakeCase() {}Context
Stack Overflow Q#36344415, score: 111
Revisions (0)
No revisions yet.