Skip to content

Commit 95906be

Browse files
committed
Fix errors caused by nonstandard_macro_braces in other lint tests
1 parent 605292e commit 95906be

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

clippy_lints/src/utils/conf.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ define_Conf! {
182182
(vec_box_size_threshold: u64 = 4096),
183183
/// Lint: TYPE_REPETITION_IN_BOUNDS. The maximum number of bounds a trait can have to be linted
184184
(max_trait_bounds: u64 = 3),
185-
/// Lint: STRUCT_EXCESSIVE_BOOLS. The maximum number of bools a struct can have
185+
/// Lint: STRUCT_EXCESSIVE_BOOLS. The maximum number of bool fields a struct can have
186186
(max_struct_bools: u64 = 3),
187-
/// Lint: FN_PARAMS_EXCESSIVE_BOOLS. The maximum number of bools function parameters can have
187+
/// Lint: FN_PARAMS_EXCESSIVE_BOOLS. The maximum number of bool parameters a function can have
188188
(max_fn_params_bools: u64 = 3),
189189
/// Lint: WILDCARD_IMPORTS. Whether to allow certain wildcard imports (prelude, super in tests).
190190
(warn_on_all_wildcard_imports: bool = false),
@@ -198,8 +198,9 @@ define_Conf! {
198198
(cargo_ignore_publish: bool = false),
199199
/// Lint: NONSTANDARD_MACRO_BRACES. Enforce the named macros always use the braces specified.
200200
///
201-
/// A `MacroMatcher` looks like this in toml `{ name = "macro_name", brace = "(" }`. If the macro is always going to be used
202-
/// with a full path it should named as such `crate_name::macro_name`.
201+
/// A `MacroMatcher` can be added like so `{ name = "macro_name", brace = "(" }`.
202+
/// If the macro is could be used with a full path two `MacroMatcher`s have to be added one
203+
/// with the full path `crate_name::macro_name` and one with just the macro name.
203204
(standard_macro_braces: Vec<crate::nonstandard_macro_braces::MacroMatcher> = Vec::new()),
204205
}
205206

tests/ui/unnecessary_cast_fixable.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// run-rustfix
22

33
#![warn(clippy::unnecessary_cast)]
4-
#![allow(clippy::no_effect, clippy::unnecessary_operation)]
4+
#![allow(clippy::no_effect, clippy::unnecessary_operation, clippy::nonstandard_macro_braces)]
55

66
fn main() {
77
// casting integer literal to float is unnecessary

tests/ui/unnecessary_cast_fixable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// run-rustfix
22

33
#![warn(clippy::unnecessary_cast)]
4-
#![allow(clippy::no_effect, clippy::unnecessary_operation)]
4+
#![allow(clippy::no_effect, clippy::unnecessary_operation, clippy::nonstandard_macro_braces)]
55

66
fn main() {
77
// casting integer literal to float is unnecessary

tests/ui/vec.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-rustfix
2-
2+
#![allow(clippy::nonstandard_macro_braces)]
33
#![warn(clippy::useless_vec)]
44

55
#[derive(Debug)]

tests/ui/vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-rustfix
2-
2+
#![allow(clippy::nonstandard_macro_braces)]
33
#![warn(clippy::useless_vec)]
44

55
#[derive(Debug)]

0 commit comments

Comments
 (0)