Skip to content

Commit f7a93f0

Browse files
committed
Apply suggestion from code review
1 parent cd201f5 commit f7a93f0

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

clippy_lints/src/attrs.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ declare_clippy_lint! {
187187
/// ```
188188
pub DEPRECATED_CFG_ATTR,
189189
complexity,
190-
"usage of `cfg_attr(rustfmt)` instead of `tool_attributes`"
190+
"usage of `cfg_attr(rustfmt)` instead of tool attributes"
191191
}
192192

193193
declare_lint_pass!(Attributes => [
@@ -520,7 +520,7 @@ impl EarlyLintPass for DeprecatedCfgAttribute {
520520
cx,
521521
DEPRECATED_CFG_ATTR,
522522
attr.span,
523-
"`cfg_attr` is deprecated for rustfmt and got replaced by `tool_attributes`",
523+
"`cfg_attr` is deprecated for rustfmt and got replaced by tool attributes",
524524
"use",
525525
"#[rustfmt::skip]".to_string(),
526526
Applicability::MachineApplicable,

clippy_lints/src/missing_const_for_fn.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingConstForFn {
113113
cx.tcx.sess.span_err(span, &err);
114114
}
115115
} else {
116-
span_lint(cx, MISSING_CONST_FOR_FN, span, "this could be a `const_fn`");
116+
span_lint(cx, MISSING_CONST_FOR_FN, span, "this could be a `const fn`");
117117
}
118118
}
119119
}

src/lintlist/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ pub const ALL_LINTS: [Lint; 345] = [
318318
Lint {
319319
name: "deprecated_cfg_attr",
320320
group: "complexity",
321-
desc: "usage of `cfg_attr(rustfmt)` instead of `tool_attributes`",
321+
desc: "usage of `cfg_attr(rustfmt)` instead of tool attributes",
322322
deprecation: None,
323323
module: "attrs",
324324
},

tests/ui/cfg_attr_rustfmt.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
error: `cfg_attr` is deprecated for rustfmt and got replaced by `tool_attributes`
1+
error: `cfg_attr` is deprecated for rustfmt and got replaced by tool attributes
22
--> $DIR/cfg_attr_rustfmt.rs:18:5
33
|
44
LL | #[cfg_attr(rustfmt, rustfmt::skip)]
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `#[rustfmt::skip]`
66
|
77
= note: `-D clippy::deprecated-cfg-attr` implied by `-D warnings`
88

9-
error: `cfg_attr` is deprecated for rustfmt and got replaced by `tool_attributes`
9+
error: `cfg_attr` is deprecated for rustfmt and got replaced by tool attributes
1010
--> $DIR/cfg_attr_rustfmt.rs:22:1
1111
|
1212
LL | #[cfg_attr(rustfmt, rustfmt_skip)]

tests/ui/missing_const_for_fn/could_be_const.stderr

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: this could be a `const_fn`
1+
error: this could be a `const fn`
22
--> $DIR/could_be_const.rs:12:5
33
|
44
LL | / pub fn new() -> Self {
@@ -8,15 +8,15 @@ LL | | }
88
|
99
= note: `-D clippy::missing-const-for-fn` implied by `-D warnings`
1010

11-
error: this could be a `const_fn`
11+
error: this could be a `const fn`
1212
--> $DIR/could_be_const.rs:18:1
1313
|
1414
LL | / fn one() -> i32 {
1515
LL | | 1
1616
LL | | }
1717
| |_^
1818

19-
error: this could be a `const_fn`
19+
error: this could be a `const fn`
2020
--> $DIR/could_be_const.rs:23:1
2121
|
2222
LL | / fn two() -> i32 {
@@ -25,39 +25,39 @@ LL | | abc
2525
LL | | }
2626
| |_^
2727

28-
error: this could be a `const_fn`
28+
error: this could be a `const fn`
2929
--> $DIR/could_be_const.rs:30:1
3030
|
3131
LL | / fn string() -> String {
3232
LL | | String::new()
3333
LL | | }
3434
| |_^
3535

36-
error: this could be a `const_fn`
36+
error: this could be a `const fn`
3737
--> $DIR/could_be_const.rs:35:1
3838
|
3939
LL | / unsafe fn four() -> i32 {
4040
LL | | 4
4141
LL | | }
4242
| |_^
4343

44-
error: this could be a `const_fn`
44+
error: this could be a `const fn`
4545
--> $DIR/could_be_const.rs:40:1
4646
|
4747
LL | / fn generic<T>(t: T) -> T {
4848
LL | | t
4949
LL | | }
5050
| |_^
5151

52-
error: this could be a `const_fn`
52+
error: this could be a `const fn`
5353
--> $DIR/could_be_const.rs:44:1
5454
|
5555
LL | / fn sub(x: u32) -> usize {
5656
LL | | unsafe { transmute(&x) }
5757
LL | | }
5858
| |_^
5959

60-
error: this could be a `const_fn`
60+
error: this could be a `const fn`
6161
--> $DIR/could_be_const.rs:63:9
6262
|
6363
LL | / pub fn b(self, a: &A) -> B {

0 commit comments

Comments
 (0)