rust/src/test/ui/lint/suggestions.stderr

110 lines
3.4 KiB
Plaintext
Raw Normal View History

warning: denote infinite loops with `loop { ... }`
2020-02-28 19:58:09 +00:00
--> $DIR/suggestions.rs:42:5
|
LL | while true {
| ^^^^^^^^^^ help: use `loop`
|
= note: `#[warn(while_true)]` on by default
warning: unnecessary parentheses around assigned value
2020-02-28 19:58:09 +00:00
--> $DIR/suggestions.rs:45:31
|
LL | let mut registry_no = (format!("NX-{}", 74205));
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses
|
2020-01-22 23:57:38 +00:00
note: the lint level is defined here
2018-12-25 15:56:47 +00:00
--> $DIR/suggestions.rs:3:21
|
2018-02-23 00:42:32 +00:00
LL | #![warn(unused_mut, unused_parens)] // UI tests pass `-A unused`—see Issue #43896
| ^^^^^^^^^^^^^
warning: variable does not need to be mutable
2020-02-28 19:58:09 +00:00
--> $DIR/suggestions.rs:45:13
|
LL | let mut registry_no = (format!("NX-{}", 74205));
| ----^^^^^^^^^^^
| |
| help: remove this `mut`
|
2020-01-22 23:57:38 +00:00
note: the lint level is defined here
2018-12-25 15:56:47 +00:00
--> $DIR/suggestions.rs:3:9
|
2018-02-23 00:42:32 +00:00
LL | #![warn(unused_mut, unused_parens)] // UI tests pass `-A unused`—see Issue #43896
| ^^^^^^^^^^
warning: variable does not need to be mutable
2020-02-28 19:58:09 +00:00
--> $DIR/suggestions.rs:51:13
|
2018-02-23 00:42:32 +00:00
LL | let mut
| _____________^
| |_____________|
| ||
2018-02-23 00:42:32 +00:00
LL | || b = 1;
| ||____________-^
| |____________|
| help: remove this `mut`
error: const items should never be `#[no_mangle]`
2020-02-28 19:58:09 +00:00
--> $DIR/suggestions.rs:5:14
|
LL | #[no_mangle] const DISCOVERY: usize = 1;
| -----^^^^^^^^^^^^^^^^^^^^^^
| |
| help: try a static value: `pub static`
|
= note: `#[deny(no_mangle_const_items)]` on by default
warning: functions generic over types or consts must be mangled
2020-02-28 19:58:09 +00:00
--> $DIR/suggestions.rs:11:1
|
LL | #[no_mangle]
| ------------ help: remove this attribute
2019-03-09 12:03:44 +00:00
LL |
2018-02-23 00:42:32 +00:00
LL | pub fn defiant<T>(_t: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(no_mangle_generic_items)]` on by default
2019-03-13 01:55:37 +00:00
warning: the `warp_factor:` in this pattern is redundant
2020-02-28 19:58:09 +00:00
--> $DIR/suggestions.rs:57:23
2019-03-13 01:55:37 +00:00
|
LL | Equinox { warp_factor: warp_factor } => {}
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: use shorthand field pattern: `warp_factor`
2019-03-13 01:55:37 +00:00
|
= note: `#[warn(non_shorthand_field_patterns)]` on by default
2019-03-13 01:55:37 +00:00
error: const items should never be `#[no_mangle]`
2020-02-28 19:58:09 +00:00
--> $DIR/suggestions.rs:21:18
|
LL | #[no_mangle] pub const DAUNTLESS: bool = true;
| ---------^^^^^^^^^^^^^^^^^^^^^^^^
| |
| help: try a static value: `pub static`
warning: functions generic over types or consts must be mangled
2020-02-28 19:58:09 +00:00
--> $DIR/suggestions.rs:24:18
|
LL | #[no_mangle] pub fn val_jean<T>() {}
| ------------ ^^^^^^^^^^^^^^^^^^^^^^^
| |
| help: remove this attribute
error: const items should never be `#[no_mangle]`
2020-02-28 19:58:09 +00:00
--> $DIR/suggestions.rs:29:18
|
LL | #[no_mangle] pub(crate) const VETAR: bool = true;
| ----------------^^^^^^^^^^^^^^^^^^^^
| |
| help: try a static value: `pub static`
warning: functions generic over types or consts must be mangled
2020-02-28 19:58:09 +00:00
--> $DIR/suggestions.rs:32:18
|
LL | #[no_mangle] pub(crate) fn crossfield<T>() {}
| ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| help: remove this attribute
error: aborting due to 3 previous errors; 8 warnings emitted