diff --git a/src/test/ui/lint/dead-code/issue-85255.stderr b/src/test/ui/lint/dead-code/issue-85255.stderr index 736b1a2042276..0c74aa020074d 100644 --- a/src/test/ui/lint/dead-code/issue-85255.stderr +++ b/src/test/ui/lint/dead-code/issue-85255.stderr @@ -2,8 +2,11 @@ warning: field is never read: `a` --> $DIR/issue-85255.rs:8:5 | LL | a: i32, - | ^^^^^^ + | -^^^^^ + | | + | help: if this is intentional, prefix it with an underscore: `_a` | + = note: the leading underscore signals that this field serves some other purpose even if it isn't used in a way that we can detect. (e.g. for its effect when dropped or in foreign code) note: the lint level is defined here --> $DIR/issue-85255.rs:4:9 | @@ -14,67 +17,99 @@ warning: field is never read: `b` --> $DIR/issue-85255.rs:9:5 | LL | pub b: i32, - | ^^^^^^^^^^ + | ^^^^-^^^^^ + | | + | help: if this is intentional, prefix it with an underscore: `_b` + | + = note: the leading underscore signals that this field serves some other purpose even if it isn't used in a way that we can detect. (e.g. for its effect when dropped or in foreign code) warning: associated function is never used: `a` --> $DIR/issue-85255.rs:15:8 | LL | fn a(&self) -> i32 { 5 } - | ^ + | ^ help: if this is intentional, prefix it with an underscore: `_a` + | + = note: the leading underscore signals that this associated function serves some other purpose even if it isn't used in a way that we can detect. warning: associated function is never used: `b` --> $DIR/issue-85255.rs:16:12 | LL | pub fn b(&self) -> i32 { 6 } - | ^ + | ^ help: if this is intentional, prefix it with an underscore: `_b` + | + = note: the leading underscore signals that this associated function serves some other purpose even if it isn't used in a way that we can detect. warning: field is never read: `a` --> $DIR/issue-85255.rs:20:5 | LL | a: i32, - | ^^^^^^ + | -^^^^^ + | | + | help: if this is intentional, prefix it with an underscore: `_a` + | + = note: the leading underscore signals that this field serves some other purpose even if it isn't used in a way that we can detect. (e.g. for its effect when dropped or in foreign code) warning: field is never read: `b` --> $DIR/issue-85255.rs:21:5 | LL | pub b: i32, - | ^^^^^^^^^^ + | ^^^^-^^^^^ + | | + | help: if this is intentional, prefix it with an underscore: `_b` + | + = note: the leading underscore signals that this field serves some other purpose even if it isn't used in a way that we can detect. (e.g. for its effect when dropped or in foreign code) warning: associated function is never used: `a` --> $DIR/issue-85255.rs:27:8 | LL | fn a(&self) -> i32 { 5 } - | ^ + | ^ help: if this is intentional, prefix it with an underscore: `_a` + | + = note: the leading underscore signals that this associated function serves some other purpose even if it isn't used in a way that we can detect. warning: associated function is never used: `b` --> $DIR/issue-85255.rs:28:12 | LL | pub fn b(&self) -> i32 { 6 } - | ^ + | ^ help: if this is intentional, prefix it with an underscore: `_b` + | + = note: the leading underscore signals that this associated function serves some other purpose even if it isn't used in a way that we can detect. warning: field is never read: `a` --> $DIR/issue-85255.rs:32:5 | LL | a: i32, - | ^^^^^^ + | -^^^^^ + | | + | help: if this is intentional, prefix it with an underscore: `_a` + | + = note: the leading underscore signals that this field serves some other purpose even if it isn't used in a way that we can detect. (e.g. for its effect when dropped or in foreign code) warning: field is never read: `b` --> $DIR/issue-85255.rs:33:5 | LL | pub b: i32, - | ^^^^^^^^^^ + | ^^^^-^^^^^ + | | + | help: if this is intentional, prefix it with an underscore: `_b` + | + = note: the leading underscore signals that this field serves some other purpose even if it isn't used in a way that we can detect. (e.g. for its effect when dropped or in foreign code) warning: associated function is never used: `a` --> $DIR/issue-85255.rs:39:8 | LL | fn a(&self) -> i32 { 5 } - | ^ + | ^ help: if this is intentional, prefix it with an underscore: `_a` + | + = note: the leading underscore signals that this associated function serves some other purpose even if it isn't used in a way that we can detect. warning: associated function is never used: `b` --> $DIR/issue-85255.rs:40:12 | LL | pub fn b(&self) -> i32 { 6 } - | ^ + | ^ help: if this is intentional, prefix it with an underscore: `_b` + | + = note: the leading underscore signals that this associated function serves some other purpose even if it isn't used in a way that we can detect. warning: 12 warnings emitted diff --git a/src/test/ui/lint/force-warn/force-allowed-warning.stderr b/src/test/ui/lint/force-warn/force-allowed-warning.stderr index 145798a32a9ef..501d708d223aa 100644 --- a/src/test/ui/lint/force-warn/force-allowed-warning.stderr +++ b/src/test/ui/lint/force-warn/force-allowed-warning.stderr @@ -2,8 +2,9 @@ warning: function is never used: `dead_function` --> $DIR/force-allowed-warning.rs:6:4 | LL | fn dead_function() {} - | ^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_dead_function` | + = note: the leading underscore signals that this function serves some other purpose even if it isn't used in a way that we can detect. = note: warning forced by `force-warns` commandline option warning: 1 warning emitted diff --git a/src/test/ui/lint/force-warn/force-lint-allow-all-warnings.stderr b/src/test/ui/lint/force-warn/force-lint-allow-all-warnings.stderr index 577dbe1fea8df..323b4e55e5300 100644 --- a/src/test/ui/lint/force-warn/force-lint-allow-all-warnings.stderr +++ b/src/test/ui/lint/force-warn/force-lint-allow-all-warnings.stderr @@ -2,8 +2,9 @@ warning: function is never used: `dead_function` --> $DIR/force-lint-allow-all-warnings.rs:6:4 | LL | fn dead_function() {} - | ^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_dead_function` | + = note: the leading underscore signals that this function serves some other purpose even if it isn't used in a way that we can detect. = note: warning forced by `force-warns` commandline option warning: 1 warning emitted