]> git.lizzy.rs Git - rust.git/commitdiff
Reword unused variable warning
authorAlex Tokarev <aleksator@gmail.com>
Mon, 23 Mar 2020 08:02:46 +0000 (11:02 +0300)
committerAlex Tokarev <aleksator@gmail.com>
Mon, 23 Mar 2020 09:14:45 +0000 (12:14 +0300)
22 files changed:
src/doc/rustc/src/json.md
src/librustc_passes/liveness.rs
src/test/ui/const-generics/issues/issue-62187-encountered-polymorphic-const.stderr
src/test/ui/issues/issue-17999.stderr
src/test/ui/issues/issue-22599.stderr
src/test/ui/issues/issue-56685.stderr
src/test/ui/lint/issue-47390-unused-variable-in-struct-pattern.stderr
src/test/ui/lint/lint-match-arms.stderr
src/test/ui/lint/lint-removed-allow.stderr
src/test/ui/lint/lint-removed-cmdline.stderr
src/test/ui/lint/lint-removed.stderr
src/test/ui/lint/lint-renamed-allow.stderr
src/test/ui/lint/lint-renamed-cmdline.stderr
src/test/ui/lint/lint-renamed.stderr
src/test/ui/lint/lint-unused-variables.stderr
src/test/ui/lint/lint-uppercase-variables.stderr
src/test/ui/liveness/liveness-unused.stderr
src/test/ui/never_type/never-assign-dead-code.stderr
src/test/ui/proc-macro/attributes-included.stderr
src/test/ui/rfc-2565-param-attrs/param-attrs-cfg.stderr
src/test/ui/span/issue-24690.stderr
src/test/ui/suggestions/unused-closure-argument.stderr

index b737849516310478fbfad3cfa86224b9c380e13d..c46380f1505dfe14a886d6bc46a5ad89b4055d88 100644 (file)
@@ -168,7 +168,7 @@ Diagnostics have the following format:
             "rendered": null
         },
         {
-            "message": "consider prefixing with an underscore",
+            "message": "if this is intentional, prefix it with an underscore",
             "code": null,
             "level": "help",
             "spans": [
@@ -201,7 +201,7 @@ Diagnostics have the following format:
     /* Optional string of the rendered version of the diagnostic as displayed
        by rustc. Note that this may be influenced by the `--json` flag.
     */
-    "rendered": "warning: unused variable: `x`\n --> lib.rs:2:9\n  |\n2 |     let x = 123;\n  |         ^ help: consider prefixing with an underscore: `_x`\n  |\n  = note: `#[warn(unused_variables)]` on by default\n\n"
+    "rendered": "warning: unused variable: `x`\n --> lib.rs:2:9\n  |\n2 |     let x = 123;\n  |         ^ help: if this is intentional, prefix it with an underscore: `_x`\n  |\n  = note: `#[warn(unused_variables)]` on by default\n\n"
 }
 ```
 
index bf577d26b0fed870dcdad0bab25f400ba63c98e6..97f6457d397367b37d1553f5721abdd32bc6d11d 100644 (file)
@@ -1565,7 +1565,7 @@ fn report_unused(&self, spans: Vec<Span>, hir_id: HirId, ln: LiveNode, var: Vari
                             }
                         } else {
                             err.multipart_suggestion(
-                                "consider prefixing with an underscore",
+                                "if this is intentional, prefix it with an underscore",
                                 spans.iter().map(|span| (*span, format!("_{}", name))).collect(),
                                 Applicability::MachineApplicable,
                             );
index 20347ac4b7dacfb2e7241fa8626b78aec62ab661..72f0b333c5a356046d36276eea0c4b49e0089caf 100644 (file)
@@ -10,7 +10,7 @@ warning: unused variable: `foo`
   --> $DIR/issue-62187-encountered-polymorphic-const.rs:15:9
    |
 LL |     let foo = <[u8; 2]>::BIT_LEN;
-   |         ^^^ help: consider prefixing with an underscore: `_foo`
+   |         ^^^ help: if this is intentional, prefix it with an underscore: `_foo`
    |
    = note: `#[warn(unused_variables)]` on by default
 
index 448208ef033f71a54b609f4341216db42d531b05..4a1ef7350b8cbacd97e03fce85cce75e239e9d06 100644 (file)
@@ -2,7 +2,7 @@ error: unused variable: `x`
   --> $DIR/issue-17999.rs:5:13
    |
 LL |         let x = ();
-   |             ^ help: consider prefixing with an underscore: `_x`
+   |             ^ help: if this is intentional, prefix it with an underscore: `_x`
    |
 note: the lint level is defined here
   --> $DIR/issue-17999.rs:1:9
@@ -14,7 +14,7 @@ error: unused variable: `a`
   --> $DIR/issue-17999.rs:7:13
    |
 LL |             a => {}
-   |             ^ help: consider prefixing with an underscore: `_a`
+   |             ^ help: if this is intentional, prefix it with an underscore: `_a`
 
 error: aborting due to 2 previous errors
 
index 9c3b2cbe6c79680982cd7a0c3a3d995fa8423f3a..2b34830d08427c9235701b00d7ce3af983d9c8b4 100644 (file)
@@ -2,7 +2,7 @@ error: unused variable: `a`
   --> $DIR/issue-22599.rs:8:19
    |
 LL |     v = match 0 { a => 0 };
-   |                   ^ help: consider prefixing with an underscore: `_a`
+   |                   ^ help: if this is intentional, prefix it with an underscore: `_a`
    |
 note: the lint level is defined here
   --> $DIR/issue-22599.rs:1:9
index 2cef3126b9ee0a7adbd1f71672a04a23ff9fb416..eccb71095acc70df351051d1c8fb00f0b18543df 100644 (file)
@@ -9,7 +9,7 @@ note: the lint level is defined here
    |
 LL | #![deny(unused_variables)]
    |         ^^^^^^^^^^^^^^^^
-help: consider prefixing with an underscore
+help: if this is intentional, prefix it with an underscore
    |
 LL |         E::A(_x) | E::B(_x) => {}
    |              ^^         ^^
@@ -20,7 +20,7 @@ error: unused variable: `x`
 LL |         F::A(x, y) | F::B(x, y) => { y },
    |              ^            ^
    |
-help: consider prefixing with an underscore
+help: if this is intentional, prefix it with an underscore
    |
 LL |         F::A(_x, y) | F::B(_x, y) => { y },
    |              ^^            ^^
@@ -29,13 +29,13 @@ error: unused variable: `a`
   --> $DIR/issue-56685.rs:27:14
    |
 LL |         F::C(a, b) => { 3 }
-   |              ^ help: consider prefixing with an underscore: `_a`
+   |              ^ help: if this is intentional, prefix it with an underscore: `_a`
 
 error: unused variable: `b`
   --> $DIR/issue-56685.rs:27:17
    |
 LL |         F::C(a, b) => { 3 }
-   |                 ^ help: consider prefixing with an underscore: `_b`
+   |                 ^ help: if this is intentional, prefix it with an underscore: `_b`
 
 error: unused variable: `x`
   --> $DIR/issue-56685.rs:32:25
@@ -43,7 +43,7 @@ error: unused variable: `x`
 LL |     let _ = if let F::A(x, y) | F::B(x, y) = F::A(1, 2) {
    |                         ^            ^
    |
-help: consider prefixing with an underscore
+help: if this is intentional, prefix it with an underscore
    |
 LL |     let _ = if let F::A(_x, y) | F::B(_x, y) = F::A(1, 2) {
    |                         ^^            ^^
@@ -54,7 +54,7 @@ error: unused variable: `x`
 LL |     while let F::A(x, y) | F::B(x, y) = F::A(1, 2) {
    |                    ^            ^
    |
-help: consider prefixing with an underscore
+help: if this is intentional, prefix it with an underscore
    |
 LL |     while let F::A(_x, y) | F::B(_x, y) = F::A(1, 2) {
    |                    ^^            ^^
index b07474bb48673774ba80bd58182699eb4f88d808..cc675a709a2c6a90d5634c85e88015f510ce4984 100644 (file)
@@ -2,7 +2,7 @@ warning: unused variable: `i_think_continually`
   --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:26:9
    |
 LL |     let i_think_continually = 2;
-   |         ^^^^^^^^^^^^^^^^^^^ help: consider prefixing with an underscore: `_i_think_continually`
+   |         ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_i_think_continually`
    |
 note: the lint level is defined here
   --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:5:9
@@ -15,19 +15,19 @@ warning: unused variable: `mut_unused_var`
   --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:33:13
    |
 LL |     let mut mut_unused_var = 1;
-   |             ^^^^^^^^^^^^^^ help: consider prefixing with an underscore: `_mut_unused_var`
+   |             ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_mut_unused_var`
 
 warning: unused variable: `var`
   --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:37:14
    |
 LL |     let (mut var, unused_var) = (1, 2);
-   |              ^^^ help: consider prefixing with an underscore: `_var`
+   |              ^^^ help: if this is intentional, prefix it with an underscore: `_var`
 
 warning: unused variable: `unused_var`
   --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:37:19
    |
 LL |     let (mut var, unused_var) = (1, 2);
-   |                   ^^^^^^^^^^ help: consider prefixing with an underscore: `_unused_var`
+   |                   ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_unused_var`
 
 warning: unused variable: `corridors_of_light`
   --> $DIR/issue-47390-unused-variable-in-struct-pattern.rs:45:26
index b124971f90512622f089a9db0f135782021c70ed..1bc0e41fd550c2318c764bc1735859f73a0b16cc 100644 (file)
@@ -2,7 +2,7 @@ error: unused variable: `y`
   --> $DIR/lint-match-arms.rs:5:9
    |
 LL |         y => (),
-   |         ^ help: consider prefixing with an underscore: `_y`
+   |         ^ help: if this is intentional, prefix it with an underscore: `_y`
    |
 note: the lint level is defined here
   --> $DIR/lint-match-arms.rs:3:16
index 5ab95c89b9c7ee932b5fbfb3970d56d99cb06f5e..029334c2eb67c3cb283b79bc53f82b77bfcf6f08 100644 (file)
@@ -2,7 +2,7 @@ error: unused variable: `unused`
   --> $DIR/lint-removed-allow.rs:8:17
    |
 LL | fn main() { let unused = (); }
-   |                 ^^^^^^ help: consider prefixing with an underscore: `_unused`
+   |                 ^^^^^^ help: if this is intentional, prefix it with an underscore: `_unused`
    |
 note: the lint level is defined here
   --> $DIR/lint-removed-allow.rs:7:8
index a9ebd3e32712cd64c04744f6a84fb46fde19eaa8..4adc18cc2ce5d70b5d4d1234a1fc69d91b963a8e 100644 (file)
@@ -18,7 +18,7 @@ error: unused variable: `unused`
   --> $DIR/lint-removed-cmdline.rs:12:17
    |
 LL | fn main() { let unused = (); }
-   |                 ^^^^^^ help: consider prefixing with an underscore: `_unused`
+   |                 ^^^^^^ help: if this is intentional, prefix it with an underscore: `_unused`
    |
 note: the lint level is defined here
   --> $DIR/lint-removed-cmdline.rs:11:8
index 2c043392f098ca31dec48c06473624f3276227d5..190e10c8a9944c9dc023e9c6ca83def0cbbf9ecd 100644 (file)
@@ -10,7 +10,7 @@ error: unused variable: `unused`
   --> $DIR/lint-removed.rs:8:17
    |
 LL | fn main() { let unused = (); }
-   |                 ^^^^^^ help: consider prefixing with an underscore: `_unused`
+   |                 ^^^^^^ help: if this is intentional, prefix it with an underscore: `_unused`
    |
 note: the lint level is defined here
   --> $DIR/lint-removed.rs:7:8
index 9da74f61b7569c9ef5fe261b76113b06333e852f..46f6a10de2743c291a6cfb5dbbcc846e38059d86 100644 (file)
@@ -2,7 +2,7 @@ error: unused variable: `unused`
   --> $DIR/lint-renamed-allow.rs:8:17
    |
 LL | fn main() { let unused = (); }
-   |                 ^^^^^^ help: consider prefixing with an underscore: `_unused`
+   |                 ^^^^^^ help: if this is intentional, prefix it with an underscore: `_unused`
    |
 note: the lint level is defined here
   --> $DIR/lint-renamed-allow.rs:7:8
index 235215598a2bdbe06d5deb02e33091fb00eab88e..ef617dfe31f025b27c3e74b9b51990a49a130da0 100644 (file)
@@ -18,7 +18,7 @@ error: unused variable: `unused`
   --> $DIR/lint-renamed-cmdline.rs:8:17
    |
 LL | fn main() { let unused = (); }
-   |                 ^^^^^^ help: consider prefixing with an underscore: `_unused`
+   |                 ^^^^^^ help: if this is intentional, prefix it with an underscore: `_unused`
    |
 note: the lint level is defined here
   --> $DIR/lint-renamed-cmdline.rs:7:8
index dc43f2e4c46da701aa2454e5898593a1e951d9a2..0225e22623424c4ee861e6587860fd79cc91b212 100644 (file)
@@ -10,7 +10,7 @@ error: unused variable: `unused`
   --> $DIR/lint-renamed.rs:4:17
    |
 LL | fn main() { let unused = (); }
-   |                 ^^^^^^ help: consider prefixing with an underscore: `_unused`
+   |                 ^^^^^^ help: if this is intentional, prefix it with an underscore: `_unused`
    |
 note: the lint level is defined here
   --> $DIR/lint-renamed.rs:3:8
index 57389f8d12010325fc104a29ff33204979be5fa9..d6e684e83065177f280897ecd9db7ebaef900ccc 100644 (file)
@@ -2,7 +2,7 @@ error: unused variable: `a`
   --> $DIR/lint-unused-variables.rs:8:5
    |
 LL |     a: i32,
-   |     ^ help: consider prefixing with an underscore: `_a`
+   |     ^ help: if this is intentional, prefix it with an underscore: `_a`
    |
 note: the lint level is defined here
   --> $DIR/lint-unused-variables.rs:5:9
@@ -14,61 +14,61 @@ error: unused variable: `b`
   --> $DIR/lint-unused-variables.rs:14:5
    |
 LL |     b: i32,
-   |     ^ help: consider prefixing with an underscore: `_b`
+   |     ^ help: if this is intentional, prefix it with an underscore: `_b`
 
 error: unused variable: `a`
   --> $DIR/lint-unused-variables.rs:68:9
    |
 LL |         a: i32,
-   |         ^ help: consider prefixing with an underscore: `_a`
+   |         ^ help: if this is intentional, prefix it with an underscore: `_a`
 
 error: unused variable: `b`
   --> $DIR/lint-unused-variables.rs:74:9
    |
 LL |         b: i32,
-   |         ^ help: consider prefixing with an underscore: `_b`
+   |         ^ help: if this is intentional, prefix it with an underscore: `_b`
 
 error: unused variable: `b`
   --> $DIR/lint-unused-variables.rs:42:9
    |
 LL |         b: i32,
-   |         ^ help: consider prefixing with an underscore: `_b`
+   |         ^ help: if this is intentional, prefix it with an underscore: `_b`
 
 error: unused variable: `b`
   --> $DIR/lint-unused-variables.rs:47:9
    |
 LL |         b: i32,
-   |         ^ help: consider prefixing with an underscore: `_b`
+   |         ^ help: if this is intentional, prefix it with an underscore: `_b`
 
 error: unused variable: `a`
   --> $DIR/lint-unused-variables.rs:22:9
    |
 LL |         a: i32,
-   |         ^ help: consider prefixing with an underscore: `_a`
+   |         ^ help: if this is intentional, prefix it with an underscore: `_a`
 
 error: unused variable: `b`
   --> $DIR/lint-unused-variables.rs:29:9
    |
 LL |         b: i32,
-   |         ^ help: consider prefixing with an underscore: `_b`
+   |         ^ help: if this is intentional, prefix it with an underscore: `_b`
 
 error: unused variable: `b`
   --> $DIR/lint-unused-variables.rs:34:9
    |
 LL |         b: i32,
-   |         ^ help: consider prefixing with an underscore: `_b`
+   |         ^ help: if this is intentional, prefix it with an underscore: `_b`
 
 error: unused variable: `b`
   --> $DIR/lint-unused-variables.rs:55:9
    |
 LL |         b: i32,
-   |         ^ help: consider prefixing with an underscore: `_b`
+   |         ^ help: if this is intentional, prefix it with an underscore: `_b`
 
 error: unused variable: `b`
   --> $DIR/lint-unused-variables.rs:60:9
    |
 LL |         b: i32,
-   |         ^ help: consider prefixing with an underscore: `_b`
+   |         ^ help: if this is intentional, prefix it with an underscore: `_b`
 
 error: aborting due to 11 previous errors
 
index 7c2497758d95521dd225ac5ecb1720bebd179dd7..1d7e0909e40abdb260aafcf8ebcf5f51698f6f3a 100644 (file)
@@ -22,7 +22,7 @@ warning: unused variable: `Foo`
   --> $DIR/lint-uppercase-variables.rs:22:9
    |
 LL |         Foo => {}
-   |         ^^^ help: consider prefixing with an underscore: `_Foo`
+   |         ^^^ help: if this is intentional, prefix it with an underscore: `_Foo`
    |
 note: the lint level is defined here
   --> $DIR/lint-uppercase-variables.rs:1:9
@@ -35,13 +35,13 @@ warning: unused variable: `Foo`
   --> $DIR/lint-uppercase-variables.rs:28:9
    |
 LL |     let Foo = foo::Foo::Foo;
-   |         ^^^ help: consider prefixing with an underscore: `_Foo`
+   |         ^^^ help: if this is intentional, prefix it with an underscore: `_Foo`
 
 warning: unused variable: `Foo`
   --> $DIR/lint-uppercase-variables.rs:33:17
    |
 LL |     fn in_param(Foo: foo::Foo) {}
-   |                 ^^^ help: consider prefixing with an underscore: `_Foo`
+   |                 ^^^ help: if this is intentional, prefix it with an underscore: `_Foo`
 
 error: structure field `X` should have a snake case name
   --> $DIR/lint-uppercase-variables.rs:10:5
index 7adb6a3295b0ea20041860868947210a1e3eb3a1..42187330a3eb1ef88569e6f3d2e6b4e4626d6cf6 100644 (file)
@@ -17,7 +17,7 @@ error: unused variable: `x`
   --> $DIR/liveness-unused.rs:8:7
    |
 LL | fn f1(x: isize) {
-   |       ^ help: consider prefixing with an underscore: `_x`
+   |       ^ help: if this is intentional, prefix it with an underscore: `_x`
    |
 note: the lint level is defined here
   --> $DIR/liveness-unused.rs:2:9
@@ -29,19 +29,19 @@ error: unused variable: `x`
   --> $DIR/liveness-unused.rs:12:8
    |
 LL | fn f1b(x: &mut isize) {
-   |        ^ help: consider prefixing with an underscore: `_x`
+   |        ^ help: if this is intentional, prefix it with an underscore: `_x`
 
 error: unused variable: `x`
   --> $DIR/liveness-unused.rs:20:9
    |
 LL |     let x: isize;
-   |         ^ help: consider prefixing with an underscore: `_x`
+   |         ^ help: if this is intentional, prefix it with an underscore: `_x`
 
 error: unused variable: `x`
   --> $DIR/liveness-unused.rs:25:9
    |
 LL |     let x = 3;
-   |         ^ help: consider prefixing with an underscore: `_x`
+   |         ^ help: if this is intentional, prefix it with an underscore: `_x`
 
 error: variable `x` is assigned to, but never used
   --> $DIR/liveness-unused.rs:30:13
@@ -76,25 +76,25 @@ error: unused variable: `i`
   --> $DIR/liveness-unused.rs:59:12
    |
 LL |       Some(i) => {
-   |            ^ help: consider prefixing with an underscore: `_i`
+   |            ^ help: if this is intentional, prefix it with an underscore: `_i`
 
 error: unused variable: `x`
   --> $DIR/liveness-unused.rs:79:9
    |
 LL |     for x in 1..10 { }
-   |         ^ help: consider prefixing with an underscore: `_x`
+   |         ^ help: if this is intentional, prefix it with an underscore: `_x`
 
 error: unused variable: `x`
   --> $DIR/liveness-unused.rs:84:10
    |
 LL |     for (x, _) in [1, 2, 3].iter().enumerate() { }
-   |          ^ help: consider prefixing with an underscore: `_x`
+   |          ^ help: if this is intentional, prefix it with an underscore: `_x`
 
 error: unused variable: `x`
   --> $DIR/liveness-unused.rs:89:13
    |
 LL |     for (_, x) in [1, 2, 3].iter().enumerate() {
-   |             ^ help: consider prefixing with an underscore: `_x`
+   |             ^ help: if this is intentional, prefix it with an underscore: `_x`
 
 error: variable `x` is assigned to, but never used
   --> $DIR/liveness-unused.rs:112:9
index 6002f8e1eb75e0be447a88a1355e94ae36ed90ef..5525802c2511a59047f24d1bfa13bc5769bcd0aa 100644 (file)
@@ -25,7 +25,7 @@ warning: unused variable: `x`
   --> $DIR/never-assign-dead-code.rs:9:9
    |
 LL |     let x: ! = panic!("aah");
-   |         ^ help: consider prefixing with an underscore: `_x`
+   |         ^ help: if this is intentional, prefix it with an underscore: `_x`
    |
 note: the lint level is defined here
   --> $DIR/never-assign-dead-code.rs:6:9
index 27a215de032aa436c8b5228b8a40ea8c867a9c14..bfbcf68b6c7e6bab1d15914f6cbf6ee2919d7dd6 100644 (file)
@@ -2,7 +2,7 @@ warning: unused variable: `a`
   --> $DIR/attributes-included.rs:17:9
    |
 LL |     let a: i32 = "foo";
-   |         ^ help: consider prefixing with an underscore: `_a`
+   |         ^ help: if this is intentional, prefix it with an underscore: `_a`
    |
 note: the lint level is defined here
   --> $DIR/attributes-included.rs:4:9
index 82099066a89d2dbcd9a7f9653ea42d6f152c3d93..1ced8d8a14a53e1c2430455510c162bf8048f6de 100644 (file)
@@ -2,7 +2,7 @@ error: unused variable: `a`
   --> $DIR/param-attrs-cfg.rs:24:23
    |
 LL |     #[cfg(something)] a: i32,
-   |                       ^ help: consider prefixing with an underscore: `_a`
+   |                       ^ help: if this is intentional, prefix it with an underscore: `_a`
    |
 note: the lint level is defined here
   --> $DIR/param-attrs-cfg.rs:5:9
@@ -14,109 +14,109 @@ error: unused variable: `b`
   --> $DIR/param-attrs-cfg.rs:30:23
    |
 LL |     #[cfg(something)] b: i32,
-   |                       ^ help: consider prefixing with an underscore: `_b`
+   |                       ^ help: if this is intentional, prefix it with an underscore: `_b`
 
 error: unused variable: `c`
   --> $DIR/param-attrs-cfg.rs:32:40
    |
 LL |     #[cfg_attr(nothing, cfg(nothing))] c: i32,
-   |                                        ^ help: consider prefixing with an underscore: `_c`
+   |                                        ^ help: if this is intentional, prefix it with an underscore: `_c`
 
 error: unused variable: `a`
   --> $DIR/param-attrs-cfg.rs:107:27
    |
 LL |         #[cfg(something)] a: i32,
-   |                           ^ help: consider prefixing with an underscore: `_a`
+   |                           ^ help: if this is intentional, prefix it with an underscore: `_a`
 
 error: unused variable: `b`
   --> $DIR/param-attrs-cfg.rs:113:27
    |
 LL |         #[cfg(something)] b: i32,
-   |                           ^ help: consider prefixing with an underscore: `_b`
+   |                           ^ help: if this is intentional, prefix it with an underscore: `_b`
 
 error: unused variable: `c`
   --> $DIR/param-attrs-cfg.rs:115:44
    |
 LL |         #[cfg_attr(nothing, cfg(nothing))] c: i32,
-   |                                            ^ help: consider prefixing with an underscore: `_c`
+   |                                            ^ help: if this is intentional, prefix it with an underscore: `_c`
 
 error: unused variable: `b`
   --> $DIR/param-attrs-cfg.rs:67:27
    |
 LL |         #[cfg(something)] b: i32,
-   |                           ^ help: consider prefixing with an underscore: `_b`
+   |                           ^ help: if this is intentional, prefix it with an underscore: `_b`
 
 error: unused variable: `c`
   --> $DIR/param-attrs-cfg.rs:69:44
    |
 LL |         #[cfg_attr(nothing, cfg(nothing))] c: i32,
-   |                                            ^ help: consider prefixing with an underscore: `_c`
+   |                                            ^ help: if this is intentional, prefix it with an underscore: `_c`
 
 error: unused variable: `b`
   --> $DIR/param-attrs-cfg.rs:75:27
    |
 LL |         #[cfg(something)] b: i32,
-   |                           ^ help: consider prefixing with an underscore: `_b`
+   |                           ^ help: if this is intentional, prefix it with an underscore: `_b`
 
 error: unused variable: `c`
   --> $DIR/param-attrs-cfg.rs:77:44
    |
 LL |         #[cfg_attr(nothing, cfg(nothing))] c: i32,
-   |                                            ^ help: consider prefixing with an underscore: `_c`
+   |                                            ^ help: if this is intentional, prefix it with an underscore: `_c`
 
 error: unused variable: `a`
   --> $DIR/param-attrs-cfg.rs:41:27
    |
 LL |         #[cfg(something)] a: i32,
-   |                           ^ help: consider prefixing with an underscore: `_a`
+   |                           ^ help: if this is intentional, prefix it with an underscore: `_a`
 
 error: unused variable: `b`
   --> $DIR/param-attrs-cfg.rs:48:27
    |
 LL |         #[cfg(something)] b: i32,
-   |                           ^ help: consider prefixing with an underscore: `_b`
+   |                           ^ help: if this is intentional, prefix it with an underscore: `_b`
 
 error: unused variable: `c`
   --> $DIR/param-attrs-cfg.rs:50:44
    |
 LL |         #[cfg_attr(nothing, cfg(nothing))] c: i32,
-   |                                            ^ help: consider prefixing with an underscore: `_c`
+   |                                            ^ help: if this is intentional, prefix it with an underscore: `_c`
 
 error: unused variable: `b`
   --> $DIR/param-attrs-cfg.rs:56:27
    |
 LL |         #[cfg(something)] b: i32,
-   |                           ^ help: consider prefixing with an underscore: `_b`
+   |                           ^ help: if this is intentional, prefix it with an underscore: `_b`
 
 error: unused variable: `c`
   --> $DIR/param-attrs-cfg.rs:58:44
    |
 LL |         #[cfg_attr(nothing, cfg(nothing))] c: i32,
-   |                                            ^ help: consider prefixing with an underscore: `_c`
+   |                                            ^ help: if this is intentional, prefix it with an underscore: `_c`
 
 error: unused variable: `b`
   --> $DIR/param-attrs-cfg.rs:86:27
    |
 LL |         #[cfg(something)] b: i32,
-   |                           ^ help: consider prefixing with an underscore: `_b`
+   |                           ^ help: if this is intentional, prefix it with an underscore: `_b`
 
 error: unused variable: `c`
   --> $DIR/param-attrs-cfg.rs:88:44
    |
 LL |         #[cfg_attr(nothing, cfg(nothing))] c: i32,
-   |                                            ^ help: consider prefixing with an underscore: `_c`
+   |                                            ^ help: if this is intentional, prefix it with an underscore: `_c`
 
 error: unused variable: `b`
   --> $DIR/param-attrs-cfg.rs:94:27
    |
 LL |         #[cfg(something)] b: i32,
-   |                           ^ help: consider prefixing with an underscore: `_b`
+   |                           ^ help: if this is intentional, prefix it with an underscore: `_b`
 
 error: unused variable: `c`
   --> $DIR/param-attrs-cfg.rs:96:44
    |
 LL |         #[cfg_attr(nothing, cfg(nothing))] c: i32,
-   |                                            ^ help: consider prefixing with an underscore: `_c`
+   |                                            ^ help: if this is intentional, prefix it with an underscore: `_c`
 
 error: aborting due to 19 previous errors
 
index 69d1150abba4755c4d55ed85e1d134d3fed8eeb6..2a090f442cc5f66930357aa86aebafcb23b54a6b 100644 (file)
@@ -2,7 +2,7 @@ warning: unused variable: `theOtherTwo`
   --> $DIR/issue-24690.rs:13:9
    |
 LL |     let theOtherTwo = 2;
-   |         ^^^^^^^^^^^ help: consider prefixing with an underscore: `_theOtherTwo`
+   |         ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_theOtherTwo`
    |
 note: the lint level is defined here
   --> $DIR/issue-24690.rs:8:9
index d83ab08e71efcc4f74e190e048a420ba0a794629..55195ce50a13ec364fe6b74250652e9b0f671ecc 100644 (file)
@@ -14,7 +14,7 @@ error: unused variable: `x`
   --> $DIR/unused-closure-argument.rs:17:15
    |
 LL |         .map(|x| 4)
-   |               ^ help: consider prefixing with an underscore: `_x`
+   |               ^ help: if this is intentional, prefix it with an underscore: `_x`
 
 error: aborting due to 2 previous errors