Skip to content

Instantly share code, notes, and snippets.

@jyn514
Last active January 3, 2023 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jyn514/4f06698335549e0075c3390100839aaa to your computer and use it in GitHub Desktop.
Save jyn514/4f06698335549e0075c3390100839aaa to your computer and use it in GitHub Desktop.
All warnings clippy emits on rust-lang/rust
This file has been truncated, but you can view the full file.
Building rustbuild
Finished dev [unoptimized] target(s) in 0.04s
Building stage0 library artifacts (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)
Finished release [optimized] target(s) in 38.39s
Copying stage0 library from stage0 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu / aarch64-unknown-linux-gnu)
Building stage0 compiler artifacts (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)
Finished release [optimized] target(s) in 2m 46s
Copying stage0 rustc from stage0 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu / aarch64-unknown-linux-gnu)
Assembling stage1 compiler (aarch64-unknown-linux-gnu)
Building stage0 tool clippy-driver (aarch64-unknown-linux-gnu)
Finished release [optimized] target(s) in 54.48s
Building stage0 tool cargo-clippy (aarch64-unknown-linux-gnu)
Finished release [optimized] target(s) in 0.16s
Checking stage1 library artifacts (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)
Checking core v0.0.0 (/home/gh-jyn514/rust3/library/core)
Compiling std v0.0.0 (/home/gh-jyn514/rust3/library/std)
Compiling unwind v0.0.0 (/home/gh-jyn514/rust3/library/unwind)
warning: `cfg_attr` is deprecated for rustfmt and got replaced by tool attributes
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:4259:9
|
4259 | #[cfg_attr(rustfmt, skip)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `#[rustfmt::skip]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_cfg_attr
= note: `#[warn(clippy::deprecated_cfg_attr)]` on by default
warning: `cfg_attr` is deprecated for rustfmt and got replaced by tool attributes
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:4261:9
|
4261 | #[cfg_attr(rustfmt, skip)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `#[rustfmt::skip]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_cfg_attr
warning: `cfg_attr` is deprecated for rustfmt and got replaced by tool attributes
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:4263:9
|
4263 | #[cfg_attr(rustfmt, skip)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `#[rustfmt::skip]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_cfg_attr
warning: `cfg_attr` is deprecated for rustfmt and got replaced by tool attributes
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:4289:9
|
4289 | #[cfg_attr(rustfmt, skip)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `#[rustfmt::skip]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_cfg_attr
warning: `cfg_attr` is deprecated for rustfmt and got replaced by tool attributes
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:4291:9
|
4291 | #[cfg_attr(rustfmt, skip)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `#[rustfmt::skip]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_cfg_attr
warning: `cfg_attr` is deprecated for rustfmt and got replaced by tool attributes
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:4293:9
|
4293 | #[cfg_attr(rustfmt, skip)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `#[rustfmt::skip]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_cfg_attr
warning: `cfg_attr` is deprecated for rustfmt and got replaced by tool attributes
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:4337:9
|
4337 | #[cfg_attr(rustfmt, skip)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `#[rustfmt::skip]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_cfg_attr
warning: `cfg_attr` is deprecated for rustfmt and got replaced by tool attributes
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:4339:9
|
4339 | #[cfg_attr(rustfmt, skip)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `#[rustfmt::skip]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_cfg_attr
warning: `cfg_attr` is deprecated for rustfmt and got replaced by tool attributes
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:4341:9
|
4341 | #[cfg_attr(rustfmt, skip)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `#[rustfmt::skip]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_cfg_attr
warning: `cfg_attr` is deprecated for rustfmt and got replaced by tool attributes
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:4367:9
|
4367 | #[cfg_attr(rustfmt, skip)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `#[rustfmt::skip]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_cfg_attr
warning: `cfg_attr` is deprecated for rustfmt and got replaced by tool attributes
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:4369:9
|
4369 | #[cfg_attr(rustfmt, skip)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `#[rustfmt::skip]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_cfg_attr
warning: `cfg_attr` is deprecated for rustfmt and got replaced by tool attributes
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:4371:9
|
4371 | #[cfg_attr(rustfmt, skip)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `#[rustfmt::skip]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_cfg_attr
warning: this `else { if .. }` block can be collapsed
--> library/core/src/num/flt2dec/strategy/grisu.rs:151:12
|
151 | } else {
| ____________^
152 | | if x < X6 {
153 | | if x < X5 { (4, X4) } else { (5, X5) }
154 | | } else if x < X8 {
... |
158 | | }
159 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
= note: `#[warn(clippy::collapsible_else_if)]` on by default
help: collapse nested if block
|
151 ~ } else if x < X6 {
152 + if x < X5 { (4, X4) } else { (5, X5) }
153 + } else if x < X8 {
154 + if x < X7 { (6, X6) } else { (7, X7) }
155 + } else {
156 + if x < X9 { (8, X8) } else { (9, X9) }
157 + }
|
warning: this `else { if .. }` block can be collapsed
--> library/core/src/num/flt2dec/strategy/grisu.rs:148:16
|
148 | } else {
| ________________^
149 | | if x < X3 { (2, X2) } else { (3, X3) }
150 | | }
| |_________^ help: collapse nested if block: `if x < X3 { (2, X2) } else { (3, X3) }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
warning: this `else { if .. }` block can be collapsed
--> library/core/src/num/flt2dec/strategy/grisu.rs:156:16
|
156 | } else {
| ________________^
157 | | if x < X9 { (8, X8) } else { (9, X9) }
158 | | }
| |_________^ help: collapse nested if block: `if x < X9 { (8, X8) } else { (9, X9) }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
warning: this `else { if .. }` block can be collapsed
--> library/core/src/num/fmt.rs:34:24
|
34 | } else {
| ________________________^
35 | | if v < 10_000 { 4 } else { 5 }
36 | | }
| |_________________^ help: collapse nested if block: `if v < 10_000 { 4 } else { 5 }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
warning: digits of hex or binary literal not grouped by four
--> library/core/src/num/int_log10.rs:13:21
|
13 | const C1: u32 = 0b11_00000000 - 10; // 758
| ^^^^^^^^^^^^^ help: consider: `0b11_0000_0000`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings
= note: `#[warn(clippy::unusual_byte_groupings)]` on by default
warning: digits of hex or binary literal not grouped by four
--> library/core/src/num/int_log10.rs:15:21
|
15 | const C2: u32 = 0b10_00000000 - 100; // 412
| ^^^^^^^^^^^^^ help: consider: `0b10_0000_0000`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings
warning: digits of hex or binary literal not grouped by four
--> library/core/src/num/int_log10.rs:31:21
|
31 | const C1: u32 = 0b011_00000000000000000 - 10; // 393206
| ^^^^^^^^^^^^^^^^^^^^^^^ help: consider: `0b0110_0000_0000_0000_0000`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings
warning: digits of hex or binary literal not grouped by four
--> library/core/src/num/int_log10.rs:32:21
|
32 | const C2: u32 = 0b100_00000000000000000 - 100; // 524188
| ^^^^^^^^^^^^^^^^^^^^^^^ help: consider: `0b1000_0000_0000_0000_0000`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings
warning: digits of hex or binary literal not grouped by four
--> library/core/src/num/int_log10.rs:33:21
|
33 | const C3: u32 = 0b111_00000000000000000 - 1000; // 916504
| ^^^^^^^^^^^^^^^^^^^^^^^ help: consider: `0b1110_0000_0000_0000_0000`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings
warning: digits of hex or binary literal not grouped by four
--> library/core/src/num/int_log10.rs:34:21
|
34 | const C4: u32 = 0b100_00000000000000000 - 10000; // 514288
| ^^^^^^^^^^^^^^^^^^^^^^^ help: consider: `0b1000_0000_0000_0000_0000`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings
warning: try not to call a closure in the expression where it is declared
--> library/core/src/str/pattern.rs:706:13
|
700 | / macro_rules! pattern_methods {
701 | | ($t:ty, $pmap:expr, $smap:expr) => {
702 | | type Searcher = $t;
703 | |
... |
706 | | ($smap)(($pmap)(self).into_searcher(haystack))
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
... |
739 | | };
740 | | }
| |_- in this expansion of `pattern_methods!`
...
919 | pattern_methods!(StrSearcher<'a, 'b>, |&s| s, |s| s);
| ---------------------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
= note: `#[warn(clippy::redundant_closure_call)]` on by default
warning: try not to call a closure in the expression where it is declared
--> library/core/src/str/pattern.rs:706:21
|
700 | / macro_rules! pattern_methods {
701 | | ($t:ty, $pmap:expr, $smap:expr) => {
702 | | type Searcher = $t;
703 | |
... |
706 | | ($smap)(($pmap)(self).into_searcher(haystack))
| | ^^^^^^^^^^^^^
... |
739 | | };
740 | | }
| |_- in this expansion of `pattern_methods!`
...
919 | pattern_methods!(StrSearcher<'a, 'b>, |&s| s, |s| s);
| ---------------------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
warning: try not to call a closure in the expression where it is declared
--> library/core/src/str/pattern.rs:711:13
|
700 | / macro_rules! pattern_methods {
701 | | ($t:ty, $pmap:expr, $smap:expr) => {
702 | | type Searcher = $t;
703 | |
... |
711 | | ($pmap)(self).is_contained_in(haystack)
| | ^^^^^^^^^^^^^
... |
739 | | };
740 | | }
| |_- in this expansion of `pattern_methods!`
...
919 | pattern_methods!(StrSearcher<'a, 'b>, |&s| s, |s| s);
| ---------------------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
warning: try not to call a closure in the expression where it is declared
--> library/core/src/str/pattern.rs:716:13
|
700 | / macro_rules! pattern_methods {
701 | | ($t:ty, $pmap:expr, $smap:expr) => {
702 | | type Searcher = $t;
703 | |
... |
716 | | ($pmap)(self).is_prefix_of(haystack)
| | ^^^^^^^^^^^^^
... |
739 | | };
740 | | }
| |_- in this expansion of `pattern_methods!`
...
919 | pattern_methods!(StrSearcher<'a, 'b>, |&s| s, |s| s);
| ---------------------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
warning: try not to call a closure in the expression where it is declared
--> library/core/src/str/pattern.rs:721:13
|
700 | / macro_rules! pattern_methods {
701 | | ($t:ty, $pmap:expr, $smap:expr) => {
702 | | type Searcher = $t;
703 | |
... |
721 | | ($pmap)(self).strip_prefix_of(haystack)
| | ^^^^^^^^^^^^^
... |
739 | | };
740 | | }
| |_- in this expansion of `pattern_methods!`
...
919 | pattern_methods!(StrSearcher<'a, 'b>, |&s| s, |s| s);
| ---------------------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
warning: try not to call a closure in the expression where it is declared
--> library/core/src/str/pattern.rs:729:13
|
700 | / macro_rules! pattern_methods {
701 | | ($t:ty, $pmap:expr, $smap:expr) => {
702 | | type Searcher = $t;
703 | |
... |
729 | | ($pmap)(self).is_suffix_of(haystack)
| | ^^^^^^^^^^^^^
... |
739 | | };
740 | | }
| |_- in this expansion of `pattern_methods!`
...
919 | pattern_methods!(StrSearcher<'a, 'b>, |&s| s, |s| s);
| ---------------------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
warning: try not to call a closure in the expression where it is declared
--> library/core/src/str/pattern.rs:737:13
|
700 | / macro_rules! pattern_methods {
701 | | ($t:ty, $pmap:expr, $smap:expr) => {
702 | | type Searcher = $t;
703 | |
... |
737 | | ($pmap)(self).strip_suffix_of(haystack)
| | ^^^^^^^^^^^^^
738 | | }
739 | | };
740 | | }
| |_- in this expansion of `pattern_methods!`
...
919 | pattern_methods!(StrSearcher<'a, 'b>, |&s| s, |s| s);
| ---------------------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
warning: constants have by default a `'static` lifetime
--> library/core/src/unicode/unicode_data.rs:329:31
|
329 | const BITSET_CHUNKS_MAP: &'static [u8; 123] = &[
| -^^^^^^^---------- help: consider removing `'static`: `&[u8; 123]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
= note: `#[warn(clippy::redundant_static_lifetimes)]` on by default
warning: constants have by default a `'static` lifetime
--> library/core/src/unicode/unicode_data.rs:336:33
|
336 | const BITSET_INDEX_CHUNKS: &'static [[u8; 16]; 20] = &[
| -^^^^^^^--------------- help: consider removing `'static`: `&[[u8; 16]; 20]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
warning: constants have by default a `'static` lifetime
--> library/core/src/unicode/unicode_data.rs:358:30
|
358 | const BITSET_CANONICAL: &'static [u64; 55] = &[
| -^^^^^^^---------- help: consider removing `'static`: `&[u64; 55]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
warning: constants have by default a `'static` lifetime
--> library/core/src/unicode/unicode_data.rs:415:28
|
415 | const BITSET_MAPPING: &'static [(u8, u8); 21] = &[
| -^^^^^^^--------------- help: consider removing `'static`: `&[(u8, u8); 21]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
warning: constants have by default a `'static` lifetime
--> library/core/src/unicode/unicode_data.rs:467:31
|
467 | const BITSET_CHUNKS_MAP: &'static [u8; 125] = &[
| -^^^^^^^---------- help: consider removing `'static`: `&[u8; 125]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
warning: constants have by default a `'static` lifetime
--> library/core/src/unicode/unicode_data.rs:474:33
|
474 | const BITSET_INDEX_CHUNKS: &'static [[u8; 16]; 17] = &[
| -^^^^^^^--------------- help: consider removing `'static`: `&[[u8; 16]; 17]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
warning: constants have by default a `'static` lifetime
--> library/core/src/unicode/unicode_data.rs:493:30
|
493 | const BITSET_CANONICAL: &'static [u64; 43] = &[
| -^^^^^^^---------- help: consider removing `'static`: `&[u64; 43]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
warning: constants have by default a `'static` lifetime
--> library/core/src/unicode/unicode_data.rs:538:28
|
538 | const BITSET_MAPPING: &'static [(u8, u8); 25] = &[
| -^^^^^^^--------------- help: consider removing `'static`: `&[(u8, u8); 25]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
warning: unneeded unit return type
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/tme.rs:24:25
|
24 | fn aarch64_tcommit() -> ();
| ^^^^^^ help: remove the `-> ()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit
= note: `#[warn(clippy::unused_unit)]` on by default
warning: unneeded unit return type
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/tme.rs:26:34
|
26 | fn aarch64_tcancel(imm0: u64) -> ();
| ^^^^^^ help: remove the `-> ()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit
warning: float has excessive precision
--> library/core/src/num/f32.rs:272:25
|
272 | pub const PI: f32 = 3.14159265358979323846264338327950288_f32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `3.141_592_7_f32`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
= note: `#[warn(clippy::excessive_precision)]` on by default
warning: float has excessive precision
--> library/core/src/num/f32.rs:278:26
|
278 | pub const TAU: f32 = 6.28318530717958647692528676655900577_f32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `6.283_185_5_f32`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f32.rs:282:32
|
282 | pub const FRAC_PI_2: f32 = 1.57079632679489661923132169163975144_f32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `1.570_796_4_f32`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f32.rs:286:32
|
286 | pub const FRAC_PI_3: f32 = 1.04719755119659774615421446109316763_f32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `1.047_197_6_f32`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f32.rs:290:32
|
290 | pub const FRAC_PI_4: f32 = 0.785398163397448309615660845819875721_f32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `0.785_398_2_f32`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f32.rs:294:32
|
294 | pub const FRAC_PI_6: f32 = 0.52359877559829887307710723054658381_f32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `0.523_598_8_f32`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f32.rs:298:32
|
298 | pub const FRAC_PI_8: f32 = 0.39269908169872415480783042290993786_f32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `0.392_699_1_f32`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f32.rs:302:32
|
302 | pub const FRAC_1_PI: f32 = 0.318309886183790671537767526745028724_f32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `0.318_309_87_f32`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f32.rs:306:32
|
306 | pub const FRAC_2_PI: f32 = 0.636619772367581343075535053490057448_f32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `0.636_619_75_f32`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f32.rs:310:37
|
310 | pub const FRAC_2_SQRT_PI: f32 = 1.12837916709551257389615890312154517_f32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `1.128_379_2_f32`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f32.rs:314:29
|
314 | pub const SQRT_2: f32 = 1.41421356237309504880168872420969808_f32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `1.414_213_5_f32`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f32.rs:318:36
|
318 | pub const FRAC_1_SQRT_2: f32 = 0.707106781186547524400844362104849039_f32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `0.707_106_77_f32`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f32.rs:322:24
|
322 | pub const E: f32 = 2.71828182845904523536028747135266250_f32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `2.718_281_7_f32`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f32.rs:326:29
|
326 | pub const LOG2_E: f32 = 1.44269504088896340735992468100189214_f32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `1.442_695_f32`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f32.rs:330:30
|
330 | pub const LOG2_10: f32 = 3.32192809488736234787031942948939018_f32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `3.321_928_f32`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f32.rs:334:30
|
334 | pub const LOG10_E: f32 = 0.434294481903251827651128918916605082_f32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `0.434_294_5_f32`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f32.rs:338:30
|
338 | pub const LOG10_2: f32 = 0.301029995663981195213738894724493027_f32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `0.301_03_f32`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f32.rs:342:27
|
342 | pub const LN_2: f32 = 0.693147180559945309417232121458176568_f32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `0.693_147_2_f32`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f32.rs:346:28
|
346 | pub const LN_10: f32 = 2.30258509299404568401799145468436421_f32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `2.302_585_1_f32`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f32.rs:369:30
|
369 | pub const EPSILON: f32 = 1.19209290e-07_f32;
| ^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `1.192_092_9e-7_f32`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f32.rs:373:27
|
373 | pub const MIN: f32 = -3.40282347e+38_f32;
| ^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `3.402_823_5e38_f32`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f32.rs:376:35
|
376 | pub const MIN_POSITIVE: f32 = 1.17549435e-38_f32;
| ^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `1.175_494_4e-38_f32`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f32.rs:379:26
|
379 | pub const MAX: f32 = 3.40282347e+38_f32;
| ^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `3.402_823_5e38_f32`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: constant division of `0.0` with `0.0` will always result in NaN
--> library/core/src/num/f32.rs:406:26
|
406 | pub const NAN: f32 = 0.0_f32 / 0.0_f32;
| ^^^^^^^^^^^^^^^^^
|
= help: consider using `f32::NAN` if you would like a constant representing NaN
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_divided_by_zero
= note: `#[warn(clippy::zero_divided_by_zero)]` on by default
warning: equal expressions as operands to `/`
--> library/core/src/num/f32.rs:406:26
|
406 | pub const NAN: f32 = 0.0_f32 / 0.0_f32;
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#eq_op
= note: `#[warn(clippy::eq_op)]` on by default
warning: equal expressions as operands to `!=`
--> library/core/src/num/f32.rs:428:9
|
428 | self != self
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#eq_op
warning: float has excessive precision
--> library/core/src/num/f32.rs:811:33
|
811 | const PIS_IN_180: f32 = 57.2957795130823208767981548141051703_f32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `57.295_78_f32`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: transmute from a `f32` to a `u32`
--> library/core/src/num/f32.rs:1042:22
|
1042 | unsafe { mem::transmute(x) }
| ^^^^^^^^^^^^^^^^^ help: consider using: `x.to_bits()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#transmute_float_to_int
= note: `#[warn(clippy::transmute_float_to_int)]` on by default
warning: transmute from a `u32` to a `f32`
--> library/core/src/num/f32.rs:1134:22
|
1134 | unsafe { mem::transmute(x) }
| ^^^^^^^^^^^^^^^^^ help: consider using: `f32::from_bits(x)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#transmute_int_to_float
= note: `#[warn(clippy::transmute_int_to_float)]` on by default
warning: the use of negated comparison operators on partially ordered types produces code that is hard to read and refactor, please consider using the `partial_cmp` method instead, to make it clear that the two values could be incomparable
--> library/core/src/num/f32.rs:1394:9
|
1394 | assert!(min <= max);
| ^^^^^^^^^^^^^^^^^^^ in this macro invocation
|
::: library/core/src/macros/mod.rs:1413:5
|
1413 | / macro_rules! assert {
1414 | | ($cond:expr $(,)?) => {{ /* compiler built-in */ }};
1415 | | ($cond:expr, $($arg:tt)+) => {{ /* compiler built-in */ }};
1416 | | }
| |_____- in this expansion of `assert!`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_cmp_op_on_partial_ord
= note: `#[warn(clippy::neg_cmp_op_on_partial_ord)]` on by default
warning: float has excessive precision
--> library/core/src/num/f64.rs:272:25
|
272 | pub const PI: f64 = 3.14159265358979323846264338327950288_f64;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `3.141_592_653_589_793_f64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f64.rs:278:26
|
278 | pub const TAU: f64 = 6.28318530717958647692528676655900577_f64;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `6.283_185_307_179_586_f64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f64.rs:282:32
|
282 | pub const FRAC_PI_2: f64 = 1.57079632679489661923132169163975144_f64;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `1.570_796_326_794_896_6_f64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f64.rs:286:32
|
286 | pub const FRAC_PI_3: f64 = 1.04719755119659774615421446109316763_f64;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `1.047_197_551_196_597_9_f64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f64.rs:290:32
|
290 | pub const FRAC_PI_4: f64 = 0.785398163397448309615660845819875721_f64;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `0.785_398_163_397_448_3_f64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f64.rs:294:32
|
294 | pub const FRAC_PI_6: f64 = 0.52359877559829887307710723054658381_f64;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `0.523_598_775_598_298_9_f64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f64.rs:298:32
|
298 | pub const FRAC_PI_8: f64 = 0.39269908169872415480783042290993786_f64;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `0.392_699_081_698_724_14_f64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f64.rs:302:32
|
302 | pub const FRAC_1_PI: f64 = 0.318309886183790671537767526745028724_f64;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `0.318_309_886_183_790_7_f64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f64.rs:306:32
|
306 | pub const FRAC_2_PI: f64 = 0.636619772367581343075535053490057448_f64;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `0.636_619_772_367_581_4_f64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f64.rs:310:37
|
310 | pub const FRAC_2_SQRT_PI: f64 = 1.12837916709551257389615890312154517_f64;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `1.128_379_167_095_512_6_f64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f64.rs:314:29
|
314 | pub const SQRT_2: f64 = 1.41421356237309504880168872420969808_f64;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `1.414_213_562_373_095_1_f64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f64.rs:318:36
|
318 | pub const FRAC_1_SQRT_2: f64 = 0.707106781186547524400844362104849039_f64;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `0.707_106_781_186_547_6_f64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f64.rs:322:24
|
322 | pub const E: f64 = 2.71828182845904523536028747135266250_f64;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `2.718_281_828_459_045_f64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f64.rs:326:30
|
326 | pub const LOG2_10: f64 = 3.32192809488736234787031942948939018_f64;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `3.321_928_094_887_362_f64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f64.rs:330:29
|
330 | pub const LOG2_E: f64 = 1.44269504088896340735992468100189214_f64;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `1.442_695_040_888_963_4_f64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f64.rs:334:30
|
334 | pub const LOG10_2: f64 = 0.301029995663981195213738894724493027_f64;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `0.301_029_995_663_981_2_f64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f64.rs:338:30
|
338 | pub const LOG10_E: f64 = 0.434294481903251827651128918916605082_f64;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `0.434_294_481_903_251_8_f64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f64.rs:342:27
|
342 | pub const LN_2: f64 = 0.693147180559945309417232121458176568_f64;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `0.693_147_180_559_945_3_f64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f64.rs:346:28
|
346 | pub const LN_10: f64 = 2.30258509299404568401799145468436421_f64;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `2.302_585_092_994_046_f64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f64.rs:368:30
|
368 | pub const EPSILON: f64 = 2.2204460492503131e-16_f64;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `2.220_446_049_250_313e-16_f64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f64.rs:372:27
|
372 | pub const MIN: f64 = -1.7976931348623157e+308_f64;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `1.797_693_134_862_315_7e308_f64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: float has excessive precision
--> library/core/src/num/f64.rs:378:26
|
378 | pub const MAX: f64 = 1.7976931348623157e+308_f64;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the type or truncating it to: `1.797_693_134_862_315_7e308_f64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#excessive_precision
warning: constant division of `0.0` with `0.0` will always result in NaN
--> library/core/src/num/f64.rs:405:26
|
405 | pub const NAN: f64 = 0.0_f64 / 0.0_f64;
| ^^^^^^^^^^^^^^^^^
|
= help: consider using `f64::NAN` if you would like a constant representing NaN
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_divided_by_zero
warning: equal expressions as operands to `/`
--> library/core/src/num/f64.rs:405:26
|
405 | pub const NAN: f64 = 0.0_f64 / 0.0_f64;
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#eq_op
warning: equal expressions as operands to `!=`
--> library/core/src/num/f64.rs:427:9
|
427 | self != self
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#eq_op
warning: transmute from a `f64` to a `u64`
--> library/core/src/num/f64.rs:1035:22
|
1035 | unsafe { mem::transmute::<f64, u64>(rt) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `rt.to_bits()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#transmute_float_to_int
warning: transmute from a `u64` to a `f64`
--> library/core/src/num/f64.rs:1132:22
|
1132 | unsafe { mem::transmute::<u64, f64>(rt) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `f64::from_bits(rt)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#transmute_int_to_float
warning: the use of negated comparison operators on partially ordered types produces code that is hard to read and refactor, please consider using the `partial_cmp` method instead, to make it clear that the two values could be incomparable
--> library/core/src/num/f64.rs:1392:9
|
1392 | assert!(min <= max);
| ^^^^^^^^^^^^^^^^^^^ in this macro invocation
|
::: library/core/src/macros/mod.rs:1413:5
|
1413 | / macro_rules! assert {
1414 | | ($cond:expr $(,)?) => {{ /* compiler built-in */ }};
1415 | | ($cond:expr, $($arg:tt)+) => {{ /* compiler built-in */ }};
1416 | | }
| |_____- in this expansion of `assert!`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_cmp_op_on_partial_ord
warning: accessing first element with `s.get(0)`
--> library/core/src/num/dec2flt/common.rs:173:26
|
173 | while let Some(&c) = s.get(0) {
| ^^^^^^^^ help: try: `s.first()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
= note: `#[warn(clippy::get_first)]` on by default
warning: manual `RangeInclusive::contains` implementation
--> library/core/src/num/dec2flt/lemire.rs:58:36
|
58 | let inside_safe_exponent = (q >= -27) && (q <= 55);
| ^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-27..=55).contains(&q)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
= note: `#[warn(clippy::manual_range_contains)]` on by default
warning: this let-binding has unit value
--> library/core/src/num/dec2flt/number.rs:58:9
|
58 | let _cw = set_precision::<F>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `set_precision::<F>();`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
= note: `#[warn(clippy::let_unit_value)]` on by default
warning: accessing first element with `s.as_ref().get(0)`
--> library/core/src/num/dec2flt/parse.rs:83:23
|
83 | if let Some(&c) = s.as_ref().get(0) {
| ^^^^^^^^^^^^^^^^^ help: try: `s.as_ref().first()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
warning: you are trying to use classic C underflow conditions that will fail in Rust
--> library/core/src/num/flt2dec/strategy/grisu.rs:698:12
|
698 | if ten_kappa - remainder > remainder && ten_kappa - 2 * remainder >= 2 * ulp {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#overflow_check_conditional
= note: `#[warn(clippy::overflow_check_conditional)]` on by default
warning: the loop variable `j` is only used to index `d`
--> library/core/src/num/flt2dec/mod.rs:154:22
|
154 | for j in i + 1..d.len() {
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
= note: `#[warn(clippy::needless_range_loop)]` on by default
help: consider using an iterator
|
154 | for <item> in d.iter_mut().skip(i + 1) {
| ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~
warning: length comparison to zero
--> library/core/src/num/flt2dec/mod.rs:159:17
|
159 | None if d.len() > 0 => {
| ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!d.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
= note: `#[warn(clippy::len_zero)]` on by default
warning: the loop variable `j` is only used to index `d`
--> library/core/src/num/flt2dec/mod.rs:162:22
|
162 | for j in 1..d.len() {
| ^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator
|
162 | for <item> in d.iter_mut().skip(1) {
| ~~~~~~ ~~~~~~~~~~~~~~~~~~~~
warning: enum `Part` has a public `len` method, but no `is_empty` method
--> library/core/src/num/fmt.rs:22:5
|
22 | pub fn len(&self) -> usize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty
= note: `#[warn(clippy::len_without_is_empty)]` on by default
warning: struct `Formatted` has a public `len` method, but no `is_empty` method
--> library/core/src/num/fmt.rs:84:5
|
84 | pub fn len(&self) -> usize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty
warning: suspicious use of `&` in `Shl` impl
--> library/core/src/num/wrapping.rs:154:53
|
145 | / macro_rules! sh_impl_unsigned {
146 | | ($t:ident, $f:ident) => {
147 | | #[stable(feature = "rust1", since = "1.0.0")]
148 | | #[rustc_const_unstable(feature = "const_ops", issue = "90080")]
... |
154 | | Wrapping(self.0.wrapping_shl((other & self::shift_max::$t as $f) as u32))
| | ^
... |
192 | | };
193 | | }
| |_- in this expansion of `sh_impl_unsigned!` (#2)
...
196 | / macro_rules! sh_impl_all {
197 | | ($($t:ident)*) => ($(
198 | | //sh_impl_unsigned! { $t, u8 }
199 | | //sh_impl_unsigned! { $t, u16 }
... |
203 | | sh_impl_unsigned! { $t, usize }
| | ------------------------------- in this macro invocation (#2)
... |
211 | | )*)
212 | | }
| |_- in this expansion of `sh_impl_all!` (#1)
213 |
214 | sh_impl_all! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 i128 isize }
| -------------------------------------------------------------------- in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_arithmetic_impl
= note: `#[warn(clippy::suspicious_arithmetic_impl)]` on by default
warning: suspicious use of `&` in `Shr` impl
--> library/core/src/num/wrapping.rs:177:53
|
145 | / macro_rules! sh_impl_unsigned {
146 | | ($t:ident, $f:ident) => {
147 | | #[stable(feature = "rust1", since = "1.0.0")]
148 | | #[rustc_const_unstable(feature = "const_ops", issue = "90080")]
... |
177 | | Wrapping(self.0.wrapping_shr((other & self::shift_max::$t as $f) as u32))
| | ^
... |
192 | | };
193 | | }
| |_- in this expansion of `sh_impl_unsigned!` (#2)
...
196 | / macro_rules! sh_impl_all {
197 | | ($($t:ident)*) => ($(
198 | | //sh_impl_unsigned! { $t, u8 }
199 | | //sh_impl_unsigned! { $t, u16 }
... |
203 | | sh_impl_unsigned! { $t, usize }
| | ------------------------------- in this macro invocation (#2)
... |
211 | | )*)
212 | | }
| |_- in this expansion of `sh_impl_all!` (#1)
213 |
214 | sh_impl_all! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 i128 isize }
| -------------------------------------------------------------------- in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_arithmetic_impl
warning: suspicious use of `&` in `Shl` impl
--> library/core/src/num/wrapping.rs:154:53
|
145 | / macro_rules! sh_impl_unsigned {
146 | | ($t:ident, $f:ident) => {
147 | | #[stable(feature = "rust1", since = "1.0.0")]
148 | | #[rustc_const_unstable(feature = "const_ops", issue = "90080")]
... |
154 | | Wrapping(self.0.wrapping_shl((other & self::shift_max::$t as $f) as u32))
| | ^
... |
192 | | };
193 | | }
| |_- in this expansion of `sh_impl_unsigned!` (#2)
...
196 | / macro_rules! sh_impl_all {
197 | | ($($t:ident)*) => ($(
198 | | //sh_impl_unsigned! { $t, u8 }
199 | | //sh_impl_unsigned! { $t, u16 }
... |
203 | | sh_impl_unsigned! { $t, usize }
| | ------------------------------- in this macro invocation (#2)
... |
211 | | )*)
212 | | }
| |_- in this expansion of `sh_impl_all!` (#1)
213 |
214 | sh_impl_all! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 i128 isize }
| -------------------------------------------------------------------- in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_arithmetic_impl
warning: manual implementation of an assign operation
--> library/core/src/num/int_macros.rs:1992:21
|
1 | / macro_rules! int_impl {
2 | | ($SelfT:ty, $ActualT:ident, $UnsignedT:ty, $BITS:expr, $BITS_MINUS_ONE:expr, $Min:expr, $Max:expr,
3 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
4 | | $reversed:expr, $le_bytes:expr, $be_bytes:expr,
... |
1992 | | acc = acc * base;
| | ^^^^^^^^^^^^^^^^ help: replace it with: `acc *= base`
... |
2784 | | }
2785 | | }
| |__- in this expansion of `int_impl!`
|
::: library/core/src/num/mod.rs:241:5
|
241 | / int_impl! { i8, i8, u8, 8, 7, -128, 127, 2, "-0x7e", "0xa", "0x12", "0x12", "0x48",
242 | | "[0x12]", "[0x12]", "", "", "" }
| |____________________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
= note: `#[warn(clippy::assign_op_pattern)]` on by default
warning: transmute from a `i8` to a `[u8; 1]`
--> library/core/src/num/int_macros.rs:2655:22
|
1 | / macro_rules! int_impl {
2 | | ($SelfT:ty, $ActualT:ident, $UnsignedT:ty, $BITS:expr, $BITS_MINUS_ONE:expr, $Min:expr, $Max:expr,
3 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
4 | | $reversed:expr, $le_bytes:expr, $be_bytes:expr,
... |
2655 | | unsafe { mem::transmute(self) }
| | ^^^^^^^^^^^^^^^^^^^^ help: consider using `to_ne_bytes()`: `self.to_ne_bytes()`
... |
2784 | | }
2785 | | }
| |__- in this expansion of `int_impl!`
|
::: library/core/src/num/mod.rs:241:5
|
241 | / int_impl! { i8, i8, u8, 8, 7, -128, 127, 2, "-0x7e", "0xa", "0x12", "0x12", "0x48",
242 | | "[0x12]", "[0x12]", "", "", "" }
| |____________________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#transmute_num_to_bytes
= note: `#[warn(clippy::transmute_num_to_bytes)]` on by default
warning: manual implementation of an assign operation
--> library/core/src/num/int_macros.rs:1992:21
|
1 | / macro_rules! int_impl {
2 | | ($SelfT:ty, $ActualT:ident, $UnsignedT:ty, $BITS:expr, $BITS_MINUS_ONE:expr, $Min:expr, $Max:expr,
3 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
4 | | $reversed:expr, $le_bytes:expr, $be_bytes:expr,
... |
1992 | | acc = acc * base;
| | ^^^^^^^^^^^^^^^^ help: replace it with: `acc *= base`
... |
2784 | | }
2785 | | }
| |__- in this expansion of `int_impl!`
|
::: library/core/src/num/mod.rs:246:5
|
246 | / int_impl! { i16, i16, u16, 16, 15, -32768, 32767, 4, "-0x5ffd", "0x3a", "0x1234", "0x3412",
247 | | "0x2c48", "[0x34, 0x12]", "[0x12, 0x34]", "", "", "" }
| |__________________________________________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
warning: transmute from a `i16` to a `[u8; 2]`
--> library/core/src/num/int_macros.rs:2655:22
|
1 | / macro_rules! int_impl {
2 | | ($SelfT:ty, $ActualT:ident, $UnsignedT:ty, $BITS:expr, $BITS_MINUS_ONE:expr, $Min:expr, $Max:expr,
3 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
4 | | $reversed:expr, $le_bytes:expr, $be_bytes:expr,
... |
2655 | | unsafe { mem::transmute(self) }
| | ^^^^^^^^^^^^^^^^^^^^ help: consider using `to_ne_bytes()`: `self.to_ne_bytes()`
... |
2784 | | }
2785 | | }
| |__- in this expansion of `int_impl!`
|
::: library/core/src/num/mod.rs:246:5
|
246 | / int_impl! { i16, i16, u16, 16, 15, -32768, 32767, 4, "-0x5ffd", "0x3a", "0x1234", "0x3412",
247 | | "0x2c48", "[0x34, 0x12]", "[0x12, 0x34]", "", "", "" }
| |__________________________________________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#transmute_num_to_bytes
warning: manual implementation of an assign operation
--> library/core/src/num/int_macros.rs:1992:21
|
1 | / macro_rules! int_impl {
2 | | ($SelfT:ty, $ActualT:ident, $UnsignedT:ty, $BITS:expr, $BITS_MINUS_ONE:expr, $Min:expr, $Max:expr,
3 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
4 | | $reversed:expr, $le_bytes:expr, $be_bytes:expr,
... |
1992 | | acc = acc * base;
| | ^^^^^^^^^^^^^^^^ help: replace it with: `acc *= base`
... |
2784 | | }
2785 | | }
| |__- in this expansion of `int_impl!`
|
::: library/core/src/num/mod.rs:251:5
|
251 | / int_impl! { i32, i32, u32, 32, 31, -2147483648, 2147483647, 8, "0x10000b3", "0xb301",
252 | | "0x12345678", "0x78563412", "0x1e6a2c48", "[0x78, 0x56, 0x34, 0x12]",
253 | | "[0x12, 0x34, 0x56, 0x78]", "", "", "" }
| |____________________________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
warning: transmute from a `i32` to a `[u8; 4]`
--> library/core/src/num/int_macros.rs:2655:22
|
1 | / macro_rules! int_impl {
2 | | ($SelfT:ty, $ActualT:ident, $UnsignedT:ty, $BITS:expr, $BITS_MINUS_ONE:expr, $Min:expr, $Max:expr,
3 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
4 | | $reversed:expr, $le_bytes:expr, $be_bytes:expr,
... |
2655 | | unsafe { mem::transmute(self) }
| | ^^^^^^^^^^^^^^^^^^^^ help: consider using `to_ne_bytes()`: `self.to_ne_bytes()`
... |
2784 | | }
2785 | | }
| |__- in this expansion of `int_impl!`
|
::: library/core/src/num/mod.rs:251:5
|
251 | / int_impl! { i32, i32, u32, 32, 31, -2147483648, 2147483647, 8, "0x10000b3", "0xb301",
252 | | "0x12345678", "0x78563412", "0x1e6a2c48", "[0x78, 0x56, 0x34, 0x12]",
253 | | "[0x12, 0x34, 0x56, 0x78]", "", "", "" }
| |____________________________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#transmute_num_to_bytes
warning: manual implementation of an assign operation
--> library/core/src/num/int_macros.rs:1992:21
|
1 | / macro_rules! int_impl {
2 | | ($SelfT:ty, $ActualT:ident, $UnsignedT:ty, $BITS:expr, $BITS_MINUS_ONE:expr, $Min:expr, $Max:expr,
3 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
4 | | $reversed:expr, $le_bytes:expr, $be_bytes:expr,
... |
1992 | | acc = acc * base;
| | ^^^^^^^^^^^^^^^^ help: replace it with: `acc *= base`
... |
2784 | | }
2785 | | }
| |__- in this expansion of `int_impl!`
|
::: library/core/src/num/mod.rs:257:5
|
257 | / int_impl! { i64, i64, u64, 64, 63, -9223372036854775808, 9223372036854775807, 12,
258 | | "0xaa00000000006e1", "0x6e10aa", "0x1234567890123456", "0x5634129078563412",
259 | | "0x6a2c48091e6a2c48", "[0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]",
260 | | "[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]", "", "", "" }
| |____________________________________________________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
warning: transmute from a `i64` to a `[u8; 8]`
--> library/core/src/num/int_macros.rs:2655:22
|
1 | / macro_rules! int_impl {
2 | | ($SelfT:ty, $ActualT:ident, $UnsignedT:ty, $BITS:expr, $BITS_MINUS_ONE:expr, $Min:expr, $Max:expr,
3 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
4 | | $reversed:expr, $le_bytes:expr, $be_bytes:expr,
... |
2655 | | unsafe { mem::transmute(self) }
| | ^^^^^^^^^^^^^^^^^^^^ help: consider using `to_ne_bytes()`: `self.to_ne_bytes()`
... |
2784 | | }
2785 | | }
| |__- in this expansion of `int_impl!`
|
::: library/core/src/num/mod.rs:257:5
|
257 | / int_impl! { i64, i64, u64, 64, 63, -9223372036854775808, 9223372036854775807, 12,
258 | | "0xaa00000000006e1", "0x6e10aa", "0x1234567890123456", "0x5634129078563412",
259 | | "0x6a2c48091e6a2c48", "[0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]",
260 | | "[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]", "", "", "" }
| |____________________________________________________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#transmute_num_to_bytes
warning: manual implementation of an assign operation
--> library/core/src/num/int_macros.rs:1992:21
|
1 | / macro_rules! int_impl {
2 | | ($SelfT:ty, $ActualT:ident, $UnsignedT:ty, $BITS:expr, $BITS_MINUS_ONE:expr, $Min:expr, $Max:expr,
3 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
4 | | $reversed:expr, $le_bytes:expr, $be_bytes:expr,
... |
1992 | | acc = acc * base;
| | ^^^^^^^^^^^^^^^^ help: replace it with: `acc *= base`
... |
2784 | | }
2785 | | }
| |__- in this expansion of `int_impl!`
|
::: library/core/src/num/mod.rs:264:5
|
264 | / int_impl! { i128, i128, u128, 128, 127, -170141183460469231731687303715884105728,
265 | | 170141183460469231731687303715884105727, 16,
266 | | "0x13f40000000000000000000000004f76", "0x4f7613f4", "0x12345678901234567890123456789012",
267 | | "0x12907856341290785634129078563412", "0x48091e6a2c48091e6a2c48091e6a2c48",
... |
270 | | "[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, \
271 | | 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]", "", "", "" }
| |____________________________________________________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
warning: transmute from a `i128` to a `[u8; 16]`
--> library/core/src/num/int_macros.rs:2655:22
|
1 | / macro_rules! int_impl {
2 | | ($SelfT:ty, $ActualT:ident, $UnsignedT:ty, $BITS:expr, $BITS_MINUS_ONE:expr, $Min:expr, $Max:expr,
3 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
4 | | $reversed:expr, $le_bytes:expr, $be_bytes:expr,
... |
2655 | | unsafe { mem::transmute(self) }
| | ^^^^^^^^^^^^^^^^^^^^ help: consider using `to_ne_bytes()`: `self.to_ne_bytes()`
... |
2784 | | }
2785 | | }
| |__- in this expansion of `int_impl!`
|
::: library/core/src/num/mod.rs:264:5
|
264 | / int_impl! { i128, i128, u128, 128, 127, -170141183460469231731687303715884105728,
265 | | 170141183460469231731687303715884105727, 16,
266 | | "0x13f40000000000000000000000004f76", "0x4f7613f4", "0x12345678901234567890123456789012",
267 | | "0x12907856341290785634129078563412", "0x48091e6a2c48091e6a2c48091e6a2c48",
... |
270 | | "[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, \
271 | | 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]", "", "", "" }
| |____________________________________________________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#transmute_num_to_bytes
warning: manual implementation of an assign operation
--> library/core/src/num/int_macros.rs:1992:21
|
1 | / macro_rules! int_impl {
2 | | ($SelfT:ty, $ActualT:ident, $UnsignedT:ty, $BITS:expr, $BITS_MINUS_ONE:expr, $Min:expr, $Max:expr,
3 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
4 | | $reversed:expr, $le_bytes:expr, $be_bytes:expr,
... |
1992 | | acc = acc * base;
| | ^^^^^^^^^^^^^^^^ help: replace it with: `acc *= base`
... |
2784 | | }
2785 | | }
| |__- in this expansion of `int_impl!`
|
::: library/core/src/num/mod.rs:293:5
|
293 | / int_impl! { isize, i64, usize, 64, 63, -9223372036854775808, 9223372036854775807,
294 | | 12, "0xaa00000000006e1", "0x6e10aa", "0x1234567890123456", "0x5634129078563412",
295 | | "0x6a2c48091e6a2c48", "[0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]",
296 | | "[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]",
297 | | usize_isize_to_xe_bytes_doc!(), usize_isize_from_xe_bytes_doc!(),
298 | | " on 64-bit targets" }
| |__________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
warning: transmute from a `isize` to a `[u8; 8]`
--> library/core/src/num/int_macros.rs:2655:22
|
1 | / macro_rules! int_impl {
2 | | ($SelfT:ty, $ActualT:ident, $UnsignedT:ty, $BITS:expr, $BITS_MINUS_ONE:expr, $Min:expr, $Max:expr,
3 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
4 | | $reversed:expr, $le_bytes:expr, $be_bytes:expr,
... |
2655 | | unsafe { mem::transmute(self) }
| | ^^^^^^^^^^^^^^^^^^^^ help: consider using `to_ne_bytes()`: `self.to_ne_bytes()`
... |
2784 | | }
2785 | | }
| |__- in this expansion of `int_impl!`
|
::: library/core/src/num/mod.rs:293:5
|
293 | / int_impl! { isize, i64, usize, 64, 63, -9223372036854775808, 9223372036854775807,
294 | | 12, "0xaa00000000006e1", "0x6e10aa", "0x1234567890123456", "0x5634129078563412",
295 | | "0x6a2c48091e6a2c48", "[0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]",
296 | | "[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]",
297 | | usize_isize_to_xe_bytes_doc!(), usize_isize_from_xe_bytes_doc!(),
298 | | " on 64-bit targets" }
| |__________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#transmute_num_to_bytes
warning: manual implementation of an assign operation
--> library/core/src/num/uint_macros.rs:1943:21
|
1 | / macro_rules! uint_impl {
2 | | ($SelfT:ty, $ActualT:ident, $SignedT:ident, $NonZeroT:ident,
3 | | $BITS:expr, $MaxV:expr,
4 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
... |
1943 | | acc = acc * base;
| | ^^^^^^^^^^^^^^^^ help: replace it with: `acc *= base`
... |
2441 | | }
2442 | | }
| |__- in this expansion of `uint_impl!`
|
::: library/core/src/num/mod.rs:305:5
|
305 | / uint_impl! { u8, u8, i8, NonZeroU8, 8, 255, 2, "0x82", "0xa", "0x12", "0x12", "0x48", "[0x12]",
306 | | "[0x12]", "", "", "" }
| |__________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
warning: transmute from a `u8` to a `[u8; 1]`
--> library/core/src/num/uint_macros.rs:2316:22
|
1 | / macro_rules! uint_impl {
2 | | ($SelfT:ty, $ActualT:ident, $SignedT:ident, $NonZeroT:ident,
3 | | $BITS:expr, $MaxV:expr,
4 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
... |
2316 | | unsafe { mem::transmute(self) }
| | ^^^^^^^^^^^^^^^^^^^^ help: consider using `to_ne_bytes()`: `self.to_ne_bytes()`
... |
2441 | | }
2442 | | }
| |__- in this expansion of `uint_impl!`
|
::: library/core/src/num/mod.rs:305:5
|
305 | / uint_impl! { u8, u8, i8, NonZeroU8, 8, 255, 2, "0x82", "0xa", "0x12", "0x12", "0x48", "[0x12]",
306 | | "[0x12]", "", "", "" }
| |__________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#transmute_num_to_bytes
warning: manual check for common ascii range
--> library/core/src/num/mod.rs:486:9
|
486 | matches!(*self, b'A'..=b'Z' | b'a'..=b'z')
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*self.is_ascii_alphabetic()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check
= note: `#[warn(clippy::manual_is_ascii_check)]` on by default
warning: manual check for common ascii range
--> library/core/src/num/mod.rs:520:9
|
520 | matches!(*self, b'A'..=b'Z')
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*self.is_ascii_uppercase()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check
warning: manual check for common ascii range
--> library/core/src/num/mod.rs:554:9
|
554 | matches!(*self, b'a'..=b'z')
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*self.is_ascii_lowercase()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check
warning: manual check for common ascii range
--> library/core/src/num/mod.rs:625:9
|
625 | matches!(*self, b'0'..=b'9')
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*self.is_ascii_digit()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check
warning: manual implementation of an assign operation
--> library/core/src/num/uint_macros.rs:1943:21
|
1 | / macro_rules! uint_impl {
2 | | ($SelfT:ty, $ActualT:ident, $SignedT:ident, $NonZeroT:ident,
3 | | $BITS:expr, $MaxV:expr,
4 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
... |
1943 | | acc = acc * base;
| | ^^^^^^^^^^^^^^^^ help: replace it with: `acc *= base`
... |
2441 | | }
2442 | | }
| |__- in this expansion of `uint_impl!`
|
::: library/core/src/num/mod.rs:890:5
|
890 | / uint_impl! { u16, u16, i16, NonZeroU16, 16, 65535, 4, "0xa003", "0x3a", "0x1234", "0x3412", "0x2c48",
891 | | "[0x34, 0x12]", "[0x12, 0x34]", "", "", "" }
| |________________________________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
warning: transmute from a `u16` to a `[u8; 2]`
--> library/core/src/num/uint_macros.rs:2316:22
|
1 | / macro_rules! uint_impl {
2 | | ($SelfT:ty, $ActualT:ident, $SignedT:ident, $NonZeroT:ident,
3 | | $BITS:expr, $MaxV:expr,
4 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
... |
2316 | | unsafe { mem::transmute(self) }
| | ^^^^^^^^^^^^^^^^^^^^ help: consider using `to_ne_bytes()`: `self.to_ne_bytes()`
... |
2441 | | }
2442 | | }
| |__- in this expansion of `uint_impl!`
|
::: library/core/src/num/mod.rs:890:5
|
890 | / uint_impl! { u16, u16, i16, NonZeroU16, 16, 65535, 4, "0xa003", "0x3a", "0x1234", "0x3412", "0x2c48",
891 | | "[0x34, 0x12]", "[0x12, 0x34]", "", "", "" }
| |________________________________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#transmute_num_to_bytes
warning: manual implementation of an assign operation
--> library/core/src/num/uint_macros.rs:1943:21
|
1 | / macro_rules! uint_impl {
2 | | ($SelfT:ty, $ActualT:ident, $SignedT:ident, $NonZeroT:ident,
3 | | $BITS:expr, $MaxV:expr,
4 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
... |
1943 | | acc = acc * base;
| | ^^^^^^^^^^^^^^^^ help: replace it with: `acc *= base`
... |
2441 | | }
2442 | | }
| |__- in this expansion of `uint_impl!`
|
::: library/core/src/num/mod.rs:921:5
|
921 | / uint_impl! { u32, u32, i32, NonZeroU32, 32, 4294967295, 8, "0x10000b3", "0xb301", "0x12345678",
922 | | "0x78563412", "0x1e6a2c48", "[0x78, 0x56, 0x34, 0x12]", "[0x12, 0x34, 0x56, 0x78]", "", "", "" }
| |____________________________________________________________________________________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
warning: transmute from a `u32` to a `[u8; 4]`
--> library/core/src/num/uint_macros.rs:2316:22
|
1 | / macro_rules! uint_impl {
2 | | ($SelfT:ty, $ActualT:ident, $SignedT:ident, $NonZeroT:ident,
3 | | $BITS:expr, $MaxV:expr,
4 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
... |
2316 | | unsafe { mem::transmute(self) }
| | ^^^^^^^^^^^^^^^^^^^^ help: consider using `to_ne_bytes()`: `self.to_ne_bytes()`
... |
2441 | | }
2442 | | }
| |__- in this expansion of `uint_impl!`
|
::: library/core/src/num/mod.rs:921:5
|
921 | / uint_impl! { u32, u32, i32, NonZeroU32, 32, 4294967295, 8, "0x10000b3", "0xb301", "0x12345678",
922 | | "0x78563412", "0x1e6a2c48", "[0x78, 0x56, 0x34, 0x12]", "[0x12, 0x34, 0x56, 0x78]", "", "", "" }
| |____________________________________________________________________________________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#transmute_num_to_bytes
warning: manual implementation of an assign operation
--> library/core/src/num/uint_macros.rs:1943:21
|
1 | / macro_rules! uint_impl {
2 | | ($SelfT:ty, $ActualT:ident, $SignedT:ident, $NonZeroT:ident,
3 | | $BITS:expr, $MaxV:expr,
4 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
... |
1943 | | acc = acc * base;
| | ^^^^^^^^^^^^^^^^ help: replace it with: `acc *= base`
... |
2441 | | }
2442 | | }
| |__- in this expansion of `uint_impl!`
|
::: library/core/src/num/mod.rs:927:5
|
927 | / uint_impl! { u64, u64, i64, NonZeroU64, 64, 18446744073709551615, 12, "0xaa00000000006e1", "0x6e10aa",
928 | | "0x1234567890123456", "0x5634129078563412", "0x6a2c48091e6a2c48",
929 | | "[0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]",
930 | | "[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]",
931 | | "", "", ""}
| |_______________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
warning: transmute from a `u64` to a `[u8; 8]`
--> library/core/src/num/uint_macros.rs:2316:22
|
1 | / macro_rules! uint_impl {
2 | | ($SelfT:ty, $ActualT:ident, $SignedT:ident, $NonZeroT:ident,
3 | | $BITS:expr, $MaxV:expr,
4 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
... |
2316 | | unsafe { mem::transmute(self) }
| | ^^^^^^^^^^^^^^^^^^^^ help: consider using `to_ne_bytes()`: `self.to_ne_bytes()`
... |
2441 | | }
2442 | | }
| |__- in this expansion of `uint_impl!`
|
::: library/core/src/num/mod.rs:927:5
|
927 | / uint_impl! { u64, u64, i64, NonZeroU64, 64, 18446744073709551615, 12, "0xaa00000000006e1", "0x6e10aa",
928 | | "0x1234567890123456", "0x5634129078563412", "0x6a2c48091e6a2c48",
929 | | "[0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]",
930 | | "[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]",
931 | | "", "", ""}
| |_______________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#transmute_num_to_bytes
warning: manual implementation of an assign operation
--> library/core/src/num/uint_macros.rs:1943:21
|
1 | / macro_rules! uint_impl {
2 | | ($SelfT:ty, $ActualT:ident, $SignedT:ident, $NonZeroT:ident,
3 | | $BITS:expr, $MaxV:expr,
4 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
... |
1943 | | acc = acc * base;
| | ^^^^^^^^^^^^^^^^ help: replace it with: `acc *= base`
... |
2441 | | }
2442 | | }
| |__- in this expansion of `uint_impl!`
|
::: library/core/src/num/mod.rs:936:5
|
936 | / uint_impl! { u128, u128, i128, NonZeroU128, 128, 340282366920938463463374607431768211455, 16,
937 | | "0x13f40000000000000000000000004f76", "0x4f7613f4", "0x12345678901234567890123456789012",
938 | | "0x12907856341290785634129078563412", "0x48091e6a2c48091e6a2c48091e6a2c48",
939 | | "[0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, \
... |
942 | | 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]",
943 | | "", "", ""}
| |________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
warning: transmute from a `u128` to a `[u8; 16]`
--> library/core/src/num/uint_macros.rs:2316:22
|
1 | / macro_rules! uint_impl {
2 | | ($SelfT:ty, $ActualT:ident, $SignedT:ident, $NonZeroT:ident,
3 | | $BITS:expr, $MaxV:expr,
4 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
... |
2316 | | unsafe { mem::transmute(self) }
| | ^^^^^^^^^^^^^^^^^^^^ help: consider using `to_ne_bytes()`: `self.to_ne_bytes()`
... |
2441 | | }
2442 | | }
| |__- in this expansion of `uint_impl!`
|
::: library/core/src/num/mod.rs:936:5
|
936 | / uint_impl! { u128, u128, i128, NonZeroU128, 128, 340282366920938463463374607431768211455, 16,
937 | | "0x13f40000000000000000000000004f76", "0x4f7613f4", "0x12345678901234567890123456789012",
938 | | "0x12907856341290785634129078563412", "0x48091e6a2c48091e6a2c48091e6a2c48",
939 | | "[0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, \
... |
942 | | 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]",
943 | | "", "", ""}
| |________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#transmute_num_to_bytes
warning: manual implementation of an assign operation
--> library/core/src/num/uint_macros.rs:1943:21
|
1 | / macro_rules! uint_impl {
2 | | ($SelfT:ty, $ActualT:ident, $SignedT:ident, $NonZeroT:ident,
3 | | $BITS:expr, $MaxV:expr,
4 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
... |
1943 | | acc = acc * base;
| | ^^^^^^^^^^^^^^^^ help: replace it with: `acc *= base`
... |
2441 | | }
2442 | | }
| |__- in this expansion of `uint_impl!`
|
::: library/core/src/num/mod.rs:965:5
|
965 | / uint_impl! { usize, u64, isize, NonZeroUsize, 64, 18446744073709551615, 12, "0xaa00000000006e1", "0x6e10aa",
966 | | "0x1234567890123456", "0x5634129078563412", "0x6a2c48091e6a2c48",
967 | | "[0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]",
968 | | "[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]",
969 | | usize_isize_to_xe_bytes_doc!(), usize_isize_from_xe_bytes_doc!(),
970 | | " on 64-bit targets" }
| |__________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
warning: transmute from a `usize` to a `[u8; 8]`
--> library/core/src/num/uint_macros.rs:2316:22
|
1 | / macro_rules! uint_impl {
2 | | ($SelfT:ty, $ActualT:ident, $SignedT:ident, $NonZeroT:ident,
3 | | $BITS:expr, $MaxV:expr,
4 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
... |
2316 | | unsafe { mem::transmute(self) }
| | ^^^^^^^^^^^^^^^^^^^^ help: consider using `to_ne_bytes()`: `self.to_ne_bytes()`
... |
2441 | | }
2442 | | }
| |__- in this expansion of `uint_impl!`
|
::: library/core/src/num/mod.rs:965:5
|
965 | / uint_impl! { usize, u64, isize, NonZeroUsize, 64, 18446744073709551615, 12, "0xaa00000000006e1", "0x6e10aa",
966 | | "0x1234567890123456", "0x5634129078563412", "0x6a2c48091e6a2c48",
967 | | "[0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]",
968 | | "[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]",
969 | | usize_isize_to_xe_bytes_doc!(), usize_isize_from_xe_bytes_doc!(),
970 | | " on 64-bit targets" }
| |__________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#transmute_num_to_bytes
warning: variables can be used directly in the `format!` string
--> library/core/src/num/mod.rs:1119:5
|
1119 | / assert!(
1120 | | (2..=36).contains(&radix),
1121 | | "from_str_radix_int: must lie in the range `[2, 36]` - found {}",
1122 | | radix
1123 | | );
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
warning: the loop variable `i` is used to index `src`
--> library/core/src/mem/maybe_uninit.rs:1153:18
|
1153 | for i in 0..len {
| ^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator
|
1153 | for (i, <item>) in src.iter().enumerate().take(len) {
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
--> library/core/src/mem/mod.rs:839:5
|
839 | replace(dest, T::default())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(dest)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default
= note: `#[warn(clippy::mem_replace_with_default)]` on by default
warning: you are implementing `Hash` explicitly but have derived `PartialEq`
--> library/core/src/ptr/alignment.rs:190:1
|
190 | / impl hash::Hash for Alignment {
191 | | #[inline]
192 | | fn hash<H: hash::Hasher>(&self, state: &mut H) {
193 | | self.as_nonzero().hash(state)
194 | | }
195 | | }
| |_^
|
note: `PartialEq` implemented here
--> library/core/src/ptr/alignment.rs:13:16
|
13 | #[derive_const(PartialEq)]
| ^^^^^^^^^ in this derive macro expansion
|
::: library/core/src/cmp.rs:236:1
|
236 | / pub macro PartialEq($item:item) {
237 | | /* compiler built-in */
238 | | }
| |_- in this expansion of `#[derive(PartialEq)]`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_hash_xor_eq
= note: `#[warn(clippy::derive_hash_xor_eq)]` on by default
warning: unneeded `return` statement
--> library/core/src/ptr/metadata.rs:200:9
|
200 | / return unsafe {
201 | | crate::intrinsics::vtable_size(self.vtable_ptr as *const VTable as *const ())
202 | | };
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
= help: remove `return`
warning: unneeded `return` statement
--> library/core/src/ptr/metadata.rs:209:9
|
209 | / return unsafe {
210 | | crate::intrinsics::vtable_align(self.vtable_ptr as *const VTable as *const ())
211 | | };
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= help: remove `return`
warning: this public function might dereference a raw pointer but is not marked `unsafe`
--> library/core/src/ptr/non_null.rs:225:47
|
225 | Some(unsafe { Self::new_unchecked(ptr) })
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref
= note: `#[warn(clippy::not_unsafe_ptr_arg_deref)]` on by default
warning: struct `NonNull` has a public `len` method, but no `is_empty` method
--> library/core/src/ptr/non_null.rs:517:5
|
517 | pub const fn len(self) -> usize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty
warning: this public function might dereference a raw pointer but is not marked `unsafe`
--> library/core/src/ptr/const_ptr.rs:212:33
|
212 | unsafe { mem::transmute(self) }
| ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref
warning: transmute from `*const T` to `usize` which could be expressed as a pointer cast instead
--> library/core/src/ptr/const_ptr.rs:212:18
|
212 | unsafe { mem::transmute(self) }
| ^^^^^^^^^^^^^^^^^^^^ help: try: `self as usize`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#transmutes_expressible_as_ptr_casts
= note: `#[warn(clippy::transmutes_expressible_as_ptr_casts)]` on by default
warning: this public function might dereference a raw pointer but is not marked `unsafe`
--> library/core/src/ptr/const_ptr.rs:567:43
|
567 | unsafe { intrinsics::arith_offset(self, count) }
| ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref
warning: use of `offset` with a `usize` casted to an `isize`
--> library/core/src/ptr/const_ptr.rs:944:18
|
944 | unsafe { self.offset(count as isize) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.add(count)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast
= note: `#[warn(clippy::ptr_offset_with_cast)]` on by default
warning: use of `wrapping_offset` with a `usize` casted to an `isize`
--> library/core/src/ptr/const_ptr.rs:1112:9
|
1112 | self.wrapping_offset(count as isize)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.wrapping_add(count)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast
warning: this public function might dereference a raw pointer but is not marked `unsafe`
--> library/core/src/ptr/const_ptr.rs:1366:35
|
1366 | unsafe { align_offset(self, align) }
| ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref
warning: `if` chain can be rewritten with `match`
--> library/core/src/ptr/const_ptr.rs:1762:9
|
1762 | / if self < other {
1763 | | Less
1764 | | } else if self == other {
1765 | | Equal
1766 | | } else {
1767 | | Greater
1768 | | }
| |_________^
|
= help: consider rewriting the `if` chain to use `cmp` and `match`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_chain
= note: `#[warn(clippy::comparison_chain)]` on by default
warning: this public function might dereference a raw pointer but is not marked `unsafe`
--> library/core/src/ptr/mut_ptr.rs:218:33
|
218 | unsafe { mem::transmute(self) }
| ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref
warning: transmute from `*mut T` to `usize` which could be expressed as a pointer cast instead
--> library/core/src/ptr/mut_ptr.rs:218:18
|
218 | unsafe { mem::transmute(self) }
| ^^^^^^^^^^^^^^^^^^^^ help: try: `self as usize`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#transmutes_expressible_as_ptr_casts
warning: this public function might dereference a raw pointer but is not marked `unsafe`
--> library/core/src/ptr/mut_ptr.rs:580:43
|
580 | unsafe { intrinsics::arith_offset(self, count) as *mut T }
| ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref
warning: use of `offset` with a `usize` casted to an `isize`
--> library/core/src/ptr/mut_ptr.rs:1046:18
|
1046 | unsafe { self.offset(count as isize) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.add(count)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast
warning: use of `wrapping_offset` with a `usize` casted to an `isize`
--> library/core/src/ptr/mut_ptr.rs:1214:9
|
1214 | self.wrapping_offset(count as isize)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.wrapping_add(count)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast
warning: this public function might dereference a raw pointer but is not marked `unsafe`
--> library/core/src/ptr/mut_ptr.rs:1634:35
|
1634 | unsafe { align_offset(self, align) }
| ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref
warning: `if` chain can be rewritten with `match`
--> library/core/src/ptr/mut_ptr.rs:2204:9
|
2204 | / if self < other {
2205 | | Less
2206 | | } else if self == other {
2207 | | Equal
2208 | | } else {
2209 | | Greater
2210 | | }
| |_________^
|
= help: consider rewriting the `if` chain to use `cmp` and `match`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_chain
warning: parameter is only used in recursion
--> library/core/src/ptr/mod.rs:490:40
|
490 | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
| ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_to_drop`
|
note: parameter used here
--> library/core/src/ptr/mod.rs:495:28
|
495 | unsafe { drop_in_place(to_drop) }
| ^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion
= note: `#[warn(clippy::only_used_in_recursion)]` on by default
warning: transmute from an integer to a pointer
--> library/core/src/ptr/mod.rs:568:14
|
568 | unsafe { mem::transmute(addr) }
| ^^^^^^^^^^^^^^^^^^^^ help: try: `addr as *const T`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
= note: `#[warn(clippy::useless_transmute)]` on by default
warning: transmute from an integer to a pointer
--> library/core/src/ptr/mod.rs:599:14
|
599 | unsafe { mem::transmute(addr) }
| ^^^^^^^^^^^^^^^^^^^^ help: try: `addr as *mut T`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: call to `core::mem::swap` with a parameter derived from a raw pointer
--> library/core/src/ptr/mod.rs:1023:9
|
1023 | mem::swap(&mut *dst, &mut src); // cannot overlap
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use ptr::swap: `core::ptr::swap(dst, &mut src)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#swap_ptr_to_ref
= note: `#[warn(clippy::swap_ptr_to_ref)]` on by default
warning: transmute from `*const T` to `usize` which could be expressed as a pointer cast instead
--> library/core/src/ptr/mod.rs:1683:32
|
1683 | let addr: usize = unsafe { mem::transmute(p) };
| ^^^^^^^^^^^^^^^^^ help: try: `p as usize`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#transmutes_expressible_as_ptr_casts
warning: deref which would be done by auto-deref
--> library/core/src/borrow.rs:230:9
|
230 | &**self
| ^^^^^^^ help: try this: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
= note: `#[warn(clippy::explicit_auto_deref)]` on by default
warning: deref which would be done by auto-deref
--> library/core/src/borrow.rs:238:9
|
238 | &**self
| ^^^^^^^ help: try this: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: deref which would be done by auto-deref
--> library/core/src/borrow.rs:246:9
|
246 | &mut **self
| ^^^^^^^^^^^ help: try this: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: needless `fn main` in doctest
--> library/core/src/clone.rs:25:4
|
25 | //! #[derive(Clone)] // we add the Clone trait to Morpheus struct
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
= note: `#[warn(clippy::needless_doctest_main)]` on by default
warning: deref which would be done by auto-deref
--> library/core/src/clone.rs:237:13
|
237 | *self
| ^^^^^ help: try this: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/core/src/cmp.rs:1361:9
|
1361 | / fn ne(&self, _other: &()) -> bool {
1362 | | false
1363 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
= note: `#[warn(clippy::partialeq_ne_impl)]` on by default
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/core/src/cmp.rs:1348:17
|
1340 | / macro_rules! partial_eq_impl {
1341 | | ($($t:ty)*) => ($(
1342 | | #[stable(feature = "rust1", since = "1.0.0")]
1343 | | #[rustc_const_unstable(feature = "const_cmp", issue = "92391")]
... |
1348 | | fn ne(&self, other: &$t) -> bool { (*self) != (*other) }
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1349 | | }
1350 | | )*)
1351 | | }
| |_____- in this expansion of `partial_eq_impl!`
...
1366 | / partial_eq_impl! {
1367 | | bool char usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64
1368 | | }
| |_____- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/core/src/cmp.rs:1528:9
|
1528 | / fn ne(&self, other: &&B) -> bool {
1529 | | PartialEq::ne(*self, *other)
1530 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/core/src/cmp.rs:1583:9
|
1583 | / fn ne(&self, other: &&mut B) -> bool {
1584 | | PartialEq::ne(*self, *other)
1585 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/core/src/cmp.rs:1636:9
|
1636 | / fn ne(&self, other: &&mut B) -> bool {
1637 | | PartialEq::ne(*self, *other)
1638 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/core/src/cmp.rs:1651:9
|
1651 | / fn ne(&self, other: &&B) -> bool {
1652 | | PartialEq::ne(*self, *other)
1653 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> library/core/src/convert/mod.rs:717:1
|
717 | / impl<T, U> const Into<U> for T
718 | | where
719 | | U: ~const From<T>,
720 | | {
... |
727 | | }
728 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
= note: `#[warn(clippy::from_over_into)]` on by default
help: replace the `Into` implentation with `From<T>`
|
717 ~ impl<T, U> const From<T> for U
718 | where
...
724 | /// <code>[From]&lt;T&gt; for U</code> chooses to do.
725 ~ fn from(val: T) -> Self {
726 ~ U::from(val)
|
warning: needless `fn main` in doctest
--> library/core/src/default.rs:144:4
|
144 | /// #![feature(default_free_fn)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: needless `fn main` in doctest
--> library/core/src/error.rs:131:8
|
131 | /// #![feature(provide_any)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: deref which would be done by auto-deref
--> library/core/src/ops/deref.rs:86:9
|
86 | *self
| ^^^^^ help: try this: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: deref which would be done by auto-deref
--> library/core/src/ops/deref.rs:99:9
|
99 | *self
| ^^^^^ help: try this: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: deref which would be done by auto-deref
--> library/core/src/ops/deref.rs:183:9
|
183 | *self
| ^^^^^ help: try this: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: needless `fn main` in doctest
--> library/core/src/ops/drop.rs:29:4
|
29 | /// struct HasDrop;
| ^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: needless `fn main` in doctest
--> library/core/src/ops/drop.rs:96:4
|
96 | /// struct Foo;
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: needless `fn main` in doctest
--> library/core/src/ops/generator.rs:42:4
|
42 | /// #![feature(generators, generator_trait)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: the use of negated comparison operators on partially ordered types produces code that is hard to read and refactor, please consider using the `partial_cmp` method instead, to make it clear that the two values could be incomparable
--> library/core/src/ops/range.rs:146:9
|
146 | !(self.start < self.end)
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_cmp_op_on_partial_ord
warning: the use of negated comparison operators on partially ordered types produces code that is hard to read and refactor, please consider using the `partial_cmp` method instead, to make it clear that the two values could be incomparable
--> library/core/src/ops/range.rs:540:27
|
540 | self.exhausted || !(self.start <= self.end)
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_cmp_op_on_partial_ord
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/core/src/array/equality.rs:15:5
|
15 | / fn ne(&self, other: &[B; N]) -> bool {
16 | | SpecArrayEq::spec_ne(self, other)
17 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/core/src/array/equality.rs:34:5
|
34 | / fn ne(&self, other: &[B]) -> bool {
35 | | let b: Result<&[B; N], _> = other.try_into();
36 | | match b {
37 | | Ok(b) => *self != *b,
38 | | Err(_) => true,
39 | | }
40 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/core/src/array/equality.rs:57:5
|
57 | / fn ne(&self, other: &[A; N]) -> bool {
58 | | let b: Result<&[B; N], _> = self.try_into();
59 | | match b {
60 | | Ok(b) => *b != *other,
61 | | Err(_) => true,
62 | | }
63 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/core/src/array/equality.rs:76:5
|
76 | / fn ne(&self, other: &&[B]) -> bool {
77 | | *self != **other
78 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/core/src/array/equality.rs:91:5
|
91 | / fn ne(&self, other: &[A; N]) -> bool {
92 | | **self != *other
93 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/core/src/array/equality.rs:106:5
|
106 | / fn ne(&self, other: &&mut [B]) -> bool {
107 | | *self != **other
108 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/core/src/array/equality.rs:121:5
|
121 | / fn ne(&self, other: &[A; N]) -> bool {
122 | | **self != *other
123 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: this expression borrows a value the compiler would automatically borrow
--> library/core/src/array/mod.rs:698:9
|
698 | (&self[..]).split_array_ref::<M>()
| ^^^^^^^^^^^ help: change this to: `self[..]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
warning: this expression borrows a value the compiler would automatically borrow
--> library/core/src/array/mod.rs:731:9
|
731 | (&mut self[..]).split_array_mut::<M>()
| ^^^^^^^^^^^^^^^ help: change this to: `self[..]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression borrows a value the compiler would automatically borrow
--> library/core/src/array/mod.rs:776:9
|
776 | (&self[..]).rsplit_array_ref::<M>()
| ^^^^^^^^^^^ help: change this to: `self[..]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression borrows a value the compiler would automatically borrow
--> library/core/src/array/mod.rs:809:9
|
809 | (&mut self[..]).rsplit_array_mut::<M>()
| ^^^^^^^^^^^^^^^ help: change this to: `self[..]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/core/src/array/mod.rs:957:17
|
957 | &mut self.array_mut.get_unchecked_mut(..self.initialized),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.array_mut.get_unchecked_mut(..self.initialized)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: unneeded `return` statement
--> library/core/src/ascii.rs:107:5
|
107 | return EscapeDefault { range: 0..len, data };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= help: remove `return`
warning: module has the same name as its containing module
--> library/core/src/async_iter/mod.rs:124:1
|
124 | mod async_iter;
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception
= note: `#[warn(clippy::module_inception)]` on by default
warning: needless `fn main` in doctest
--> library/core/src/cell.rs:69:4
|
69 | //! use std::cell::{RefCell, RefMut};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: method `clone` can be confused for the standard trait method `std::clone::Clone::clone`
--> library/core/src/cell.rs:1363:5
|
1363 | / pub fn clone(orig: &Ref<'b, T>) -> Ref<'b, T> {
1364 | | Ref { value: orig.value, borrow: orig.borrow.clone() }
1365 | | }
| |_____^
|
= help: consider implementing the trait `std::clone::Clone` or choosing a less ambiguous method name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
= note: `#[warn(clippy::should_implement_trait)]` on by default
warning: manual `!RangeInclusive::contains` implementation
--> library/core/src/char/decode.rs:62:16
|
62 | if u2 < 0xDC00 || u2 > 0xDFFF {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(0xDC00..=0xDFFF).contains(&u2)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
warning: use of `.to_digit(..).is_some()`
--> library/core/src/char/methods.rs:294:9
|
294 | self.to_digit(radix).is_some()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `self.is_digit(radix)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_digit_is_some
= note: `#[warn(clippy::to_digit_is_some)]` on by default
warning: manual check for common ascii range
--> library/core/src/char/methods.rs:1310:9
|
1310 | matches!(*self, 'A'..='Z' | 'a'..='z')
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*self.is_ascii_alphabetic()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check
warning: manual check for common ascii range
--> library/core/src/char/methods.rs:1344:9
|
1344 | matches!(*self, 'A'..='Z')
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*self.is_ascii_uppercase()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check
warning: manual check for common ascii range
--> library/core/src/char/methods.rs:1378:9
|
1378 | matches!(*self, 'a'..='z')
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*self.is_ascii_lowercase()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check
warning: manual check for common ascii range
--> library/core/src/char/methods.rs:1449:9
|
1449 | matches!(*self, '0'..='9')
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*self.is_ascii_digit()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check
warning: you are deriving `Hash` but have implemented `PartialEq` explicitly
--> library/core/src/ffi/c_str.rs:80:10
|
80 | #[derive(Hash)]
| ^^^^ in this derive macro expansion
|
::: library/core/src/hash/mod.rs:267:5
|
267 | / pub macro Hash($item:item) {
268 | | /* compiler built-in */
269 | | }
| |_____- in this expansion of `#[derive(Hash)]`
|
note: `PartialEq` implemented here
--> library/core/src/ffi/c_str.rs:618:1
|
618 | impl PartialEq for CStr {
| ^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_hash_xor_eq
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/core/src/ffi/c_str.rs:628:37
|
628 | self.to_bytes().partial_cmp(&other.to_bytes())
| ^^^^^^^^^^^^^^^^^ help: change this to: `other.to_bytes()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/core/src/ffi/c_str.rs:634:29
|
634 | self.to_bytes().cmp(&other.to_bytes())
| ^^^^^^^^^^^^^^^^^ help: change this to: `other.to_bytes()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/core/src/ffi/mod.rs:478:9
|
478 | &self.inner
| ^^^^^^^^^^^ help: change this to: `self.inner`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/core/src/ffi/mod.rs:491:9
|
491 | &mut self.inner
| ^^^^^^^^^^^^^^^ help: change this to: `self.inner`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: you are using an explicit closure for copying elements
--> library/core/src/iter/adapters/copied.rs:195:37
|
195 | array::iter_next_chunk(&mut self.map(|e| *e))
| ^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `self.copied()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone
= note: `#[warn(clippy::map_clone)]` on by default
warning: using `clone` on type `bool` which implements the `Copy` trait
--> library/core/src/iter/adapters/intersperse.rs:101:24
|
101 | needs_sep: self.needs_sep.clone(),
| ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.needs_sep`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `#[warn(clippy::clone_on_copy)]` on by default
warning: manual implementation of `Option::map`
--> library/core/src/iter/adapters/skip.rs:89:21
|
89 | let upper = match upper {
| _____________________^
90 | | Some(x) => Some(x.saturating_sub(self.n)),
91 | | None => None,
92 | | };
| |_________^ help: try this: `upper.map(|x| x.saturating_sub(self.n))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map
= note: `#[warn(clippy::manual_map)]` on by default
warning: unneeded `return` statement
--> library/core/src/iter/adapters/take.rs:240:9
|
240 | return if advanced < n { Err(advanced) } else { Ok(()) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= help: remove `return`
warning: empty `loop {}` wastes CPU cycles
--> library/core/src/iter/sources/repeat.rs:96:9
|
96 | loop {}
| ^^^^^^^
|
= help: you should either use `panic!()` or add `std::thread::sleep(..);` to the loop body
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_loop
= note: `#[warn(clippy::empty_loop)]` on by default
warning: empty `loop {}` wastes CPU cycles
--> library/core/src/iter/sources/repeat.rs:100:9
|
100 | loop {}
| ^^^^^^^
|
= help: you should either use `panic!()` or add `std::thread::sleep(..);` to the loop body
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_loop
warning: the function `A::clone` doesn't need a mutable reference
--> library/core/src/iter/sources/repeat_n.rs:129:22
|
129 | A::clone(&mut self.element)
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
= note: `#[warn(clippy::unnecessary_mut_passed)]` on by default
warning: `ref` directly on a function argument is ignored. Consider using a reference type instead
--> library/core/src/iter/traits/iterator.rs:2086:51
|
2086 | fn partition_in_place<'a, T: 'a, P>(mut self, ref mut predicate: P) -> usize
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg
= note: `#[warn(clippy::toplevel_ref_arg)]` on by default
warning: this loop could be written as a `for` loop
--> library/core/src/iter/traits/iterator.rs:2244:9
|
2244 | while let Some(x) = self.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in self.by_ref()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
= note: `#[warn(clippy::while_let_on_iterator)]` on by default
warning: this loop could be written as a `for` loop
--> library/core/src/iter/traits/iterator.rs:2420:9
|
2420 | while let Some(x) = self.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/core/src/iter/traits/iterator.rs:3785:65
|
3785 | if let Some(Ordering::Greater) | None = compare(&last, &curr) {
| ^^^^^ help: change this to: `last`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: you are deriving `Hash` but have implemented `PartialEq` explicitly
--> library/core/src/option.rs:559:44
|
559 | #[derive(Copy, PartialOrd, Eq, Ord, Debug, Hash)]
| ^^^^ in this derive macro expansion
|
::: library/core/src/hash/mod.rs:267:5
|
267 | / pub macro Hash($item:item) {
268 | | /* compiler built-in */
269 | | }
| |_____- in this expansion of `#[derive(Hash)]`
|
note: `PartialEq` implemented here
--> library/core/src/option.rs:2085:1
|
2085 | impl<T: PartialEq> PartialEq for Option<T> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_hash_xor_eq
warning: use `as_ref()` instead
--> library/core/src/option.rs:674:9
|
674 | / match *self {
675 | | Some(ref x) => Some(x),
676 | | None => None,
677 | | }
| |_________^ help: try this: `*self.as_ref()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_as_ref
= note: `#[warn(clippy::match_as_ref)]` on by default
warning: use `as_mut()` instead
--> library/core/src/option.rs:696:9
|
696 | / match *self {
697 | | Some(ref mut x) => Some(x),
698 | | None => None,
699 | | }
| |_________^ help: try this: `*self.as_mut()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_as_ref
warning: redundant pattern matching, consider using `is_none()`
--> library/core/src/option.rs:1520:16
|
1520 | if let None = *self {
| -------^^^^-------- help: try this: `if self.is_none()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
= note: `#[warn(clippy::redundant_pattern_matching)]` on by default
warning: redundant pattern matching, consider using `is_none()`
--> library/core/src/option.rs:1587:16
|
1587 | if let None = *self {
| -------^^^^-------- help: try this: `if self.is_none()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
warning: replacing an `Option` with `None`
--> library/core/src/option.rs:1622:9
|
1622 | mem::replace(self, None)
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider `Option::take()` instead: `self.take()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_option_with_none
= note: `#[warn(clippy::mem_replace_option_with_none)]` on by default
warning: manual implementation of `Option::map`
--> library/core/src/option.rs:1938:9
|
1938 | / match self {
1939 | | Some(x) => Some(x.clone()),
1940 | | None => None,
1941 | | }
| |_________^ help: try this: `self.as_ref().map(|x| x.clone())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map
warning: unnecessary closure used to substitute value for `Option::None`
--> library/core/src/option.rs:2143:9
|
2143 | l.map(Self::as_ptr).unwrap_or_else(|| crate::ptr::null_mut())
| ^^^^^^^^^^^^^^^^^^^^-----------------------------------------
| |
| help: use `unwrap_or(..)` instead: `unwrap_or(crate::ptr::null_mut())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
= note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default
warning: unnecessary closure used to substitute value for `Option::None`
--> library/core/src/option.rs:2144:16
|
2144 | == r.map(Self::as_ptr).unwrap_or_else(|| crate::ptr::null_mut())
| ^^^^^^^^^^^^^^^^^^^^-----------------------------------------
| |
| help: use `unwrap_or(..)` instead: `unwrap_or(crate::ptr::null_mut())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/core/src/panic/panic_info.rs:130:14
|
130 | Some(&self.location)
| ^^^^^^^^^^^^^^ help: change this to: `self.location`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> library/core/src/panic/panic_info.rs:155:13
|
155 | write!(formatter, "'{}', ", message)?
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
155 - write!(formatter, "'{}', ", message)?
155 + write!(formatter, "'{message}', ")?
|
warning: variables can be used directly in the `format!` string
--> library/core/src/panic/panic_info.rs:157:13
|
157 | write!(formatter, "'{}', ", payload)?
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
157 - write!(formatter, "'{}', ", payload)?
157 + write!(formatter, "'{payload}', ")?
|
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/core/src/pin.rs:434:5
|
434 | / fn ne(&self, other: &Pin<Q>) -> bool {
435 | | P::Target::ne(self, other)
436 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: deref on an immutable reference
--> library/core/src/pin.rs:776:23
|
776 | let pointer = &*self.pointer;
| ^^^^^^^^^^^^^^ help: if you would like to reborrow, try removing `&*`: `self.pointer`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref
= note: `#[warn(clippy::borrow_deref_ref)]` on by default
warning: needless `fn main` in doctest
--> library/core/src/sync/atomic.rs:87:4
|
87 | //! use std::sync::Arc;
| ^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: a `const` item should never be interior mutable
--> library/core/src/sync/atomic.rs:286:1
|
286 | pub const ATOMIC_BOOL_INIT: AtomicBool = AtomicBool::new(false);
| -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| make this a static item (maybe with lazy_static)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const
= note: `#[warn(clippy::declare_interior_mutable_const)]` on by default
warning: this public function might dereference a raw pointer but is not marked `unsafe`
--> library/core/src/sync/atomic.rs:1221:40
|
1221 | atomic_store(self.p.get(), ptr, order);
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref
warning: this public function might dereference a raw pointer but is not marked `unsafe`
--> library/core/src/sync/atomic.rs:1253:44
|
1253 | unsafe { atomic_swap(self.p.get(), ptr, order) }
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref
warning: this public function might dereference a raw pointer but is not marked `unsafe`
--> library/core/src/sync/atomic.rs:1355:56
|
1355 | unsafe { atomic_compare_exchange(self.p.get(), current, new, success, failure) }
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref
warning: this public function might dereference a raw pointer but is not marked `unsafe`
--> library/core/src/sync/atomic.rs:1355:65
|
1355 | unsafe { atomic_compare_exchange(self.p.get(), current, new, success, failure) }
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref
warning: this public function might dereference a raw pointer but is not marked `unsafe`
--> library/core/src/sync/atomic.rs:1407:61
|
1407 | unsafe { atomic_compare_exchange_weak(self.p.get(), current, new, success, failure) }
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref
warning: this public function might dereference a raw pointer but is not marked `unsafe`
--> library/core/src/sync/atomic.rs:1407:70
|
1407 | unsafe { atomic_compare_exchange_weak(self.p.get(), current, new, success, failure) }
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref
warning: a `const` item should never be interior mutable
--> library/core/src/sync/atomic.rs:1876:9
|
1829 | / macro_rules! atomic_int {
1830 | | ($cfg_cas:meta,
1831 | | $cfg_align:meta,
1832 | | $stable:meta,
... |
1876 | | pub const $atomic_init: $atomic_type = $atomic_type::new(0);
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
... |
2697 | | }
2698 | | }
| |_- in this expansion of `atomic_int!`
...
2701 | / atomic_int! {
2702 | | cfg(target_has_atomic = "8"),
2703 | | cfg(target_has_atomic_equal_alignment = "8"),
2704 | | stable(feature = "integer_atomics_stable", since = "1.34.0"),
... |
2718 | | i8 AtomicI8 ATOMIC_I8_INIT
2719 | | }
| |_- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const
warning: a `const` item should never be interior mutable
--> library/core/src/sync/atomic.rs:1876:9
|
1829 | / macro_rules! atomic_int {
1830 | | ($cfg_cas:meta,
1831 | | $cfg_align:meta,
1832 | | $stable:meta,
... |
1876 | | pub const $atomic_init: $atomic_type = $atomic_type::new(0);
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
... |
2697 | | }
2698 | | }
| |_- in this expansion of `atomic_int!`
...
2721 | / atomic_int! {
2722 | | cfg(target_has_atomic = "8"),
2723 | | cfg(target_has_atomic_equal_alignment = "8"),
2724 | | stable(feature = "integer_atomics_stable", since = "1.34.0"),
... |
2738 | | u8 AtomicU8 ATOMIC_U8_INIT
2739 | | }
| |_- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const
warning: a `const` item should never be interior mutable
--> library/core/src/sync/atomic.rs:1876:9
|
1829 | / macro_rules! atomic_int {
1830 | | ($cfg_cas:meta,
1831 | | $cfg_align:meta,
1832 | | $stable:meta,
... |
1876 | | pub const $atomic_init: $atomic_type = $atomic_type::new(0);
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
... |
2697 | | }
2698 | | }
| |_- in this expansion of `atomic_int!`
...
2741 | / atomic_int! {
2742 | | cfg(target_has_atomic = "16"),
2743 | | cfg(target_has_atomic_equal_alignment = "16"),
2744 | | stable(feature = "integer_atomics_stable", since = "1.34.0"),
... |
2758 | | i16 AtomicI16 ATOMIC_I16_INIT
2759 | | }
| |_- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const
warning: a `const` item should never be interior mutable
--> library/core/src/sync/atomic.rs:1876:9
|
1829 | / macro_rules! atomic_int {
1830 | | ($cfg_cas:meta,
1831 | | $cfg_align:meta,
1832 | | $stable:meta,
... |
1876 | | pub const $atomic_init: $atomic_type = $atomic_type::new(0);
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
... |
2697 | | }
2698 | | }
| |_- in this expansion of `atomic_int!`
...
2761 | / atomic_int! {
2762 | | cfg(target_has_atomic = "16"),
2763 | | cfg(target_has_atomic_equal_alignment = "16"),
2764 | | stable(feature = "integer_atomics_stable", since = "1.34.0"),
... |
2778 | | u16 AtomicU16 ATOMIC_U16_INIT
2779 | | }
| |_- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const
warning: a `const` item should never be interior mutable
--> library/core/src/sync/atomic.rs:1876:9
|
1829 | / macro_rules! atomic_int {
1830 | | ($cfg_cas:meta,
1831 | | $cfg_align:meta,
1832 | | $stable:meta,
... |
1876 | | pub const $atomic_init: $atomic_type = $atomic_type::new(0);
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
... |
2697 | | }
2698 | | }
| |_- in this expansion of `atomic_int!`
...
2781 | / atomic_int! {
2782 | | cfg(target_has_atomic = "32"),
2783 | | cfg(target_has_atomic_equal_alignment = "32"),
2784 | | stable(feature = "integer_atomics_stable", since = "1.34.0"),
... |
2798 | | i32 AtomicI32 ATOMIC_I32_INIT
2799 | | }
| |_- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const
warning: a `const` item should never be interior mutable
--> library/core/src/sync/atomic.rs:1876:9
|
1829 | / macro_rules! atomic_int {
1830 | | ($cfg_cas:meta,
1831 | | $cfg_align:meta,
1832 | | $stable:meta,
... |
1876 | | pub const $atomic_init: $atomic_type = $atomic_type::new(0);
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
... |
2697 | | }
2698 | | }
| |_- in this expansion of `atomic_int!`
...
2801 | / atomic_int! {
2802 | | cfg(target_has_atomic = "32"),
2803 | | cfg(target_has_atomic_equal_alignment = "32"),
2804 | | stable(feature = "integer_atomics_stable", since = "1.34.0"),
... |
2818 | | u32 AtomicU32 ATOMIC_U32_INIT
2819 | | }
| |_- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const
warning: a `const` item should never be interior mutable
--> library/core/src/sync/atomic.rs:1876:9
|
1829 | / macro_rules! atomic_int {
1830 | | ($cfg_cas:meta,
1831 | | $cfg_align:meta,
1832 | | $stable:meta,
... |
1876 | | pub const $atomic_init: $atomic_type = $atomic_type::new(0);
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
... |
2697 | | }
2698 | | }
| |_- in this expansion of `atomic_int!`
...
2821 | / atomic_int! {
2822 | | cfg(target_has_atomic = "64"),
2823 | | cfg(target_has_atomic_equal_alignment = "64"),
2824 | | stable(feature = "integer_atomics_stable", since = "1.34.0"),
... |
2838 | | i64 AtomicI64 ATOMIC_I64_INIT
2839 | | }
| |_- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const
warning: a `const` item should never be interior mutable
--> library/core/src/sync/atomic.rs:1876:9
|
1829 | / macro_rules! atomic_int {
1830 | | ($cfg_cas:meta,
1831 | | $cfg_align:meta,
1832 | | $stable:meta,
... |
1876 | | pub const $atomic_init: $atomic_type = $atomic_type::new(0);
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
... |
2697 | | }
2698 | | }
| |_- in this expansion of `atomic_int!`
...
2841 | / atomic_int! {
2842 | | cfg(target_has_atomic = "64"),
2843 | | cfg(target_has_atomic_equal_alignment = "64"),
2844 | | stable(feature = "integer_atomics_stable", since = "1.34.0"),
... |
2858 | | u64 AtomicU64 ATOMIC_U64_INIT
2859 | | }
| |_- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const
warning: a `const` item should never be interior mutable
--> library/core/src/sync/atomic.rs:1876:9
|
1829 | / macro_rules! atomic_int {
1830 | | ($cfg_cas:meta,
1831 | | $cfg_align:meta,
1832 | | $stable:meta,
... |
1876 | | pub const $atomic_init: $atomic_type = $atomic_type::new(0);
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
... |
2697 | | }
2698 | | }
| |_- in this expansion of `atomic_int!`
...
2861 | / atomic_int! {
2862 | | cfg(target_has_atomic = "128"),
2863 | | cfg(target_has_atomic_equal_alignment = "128"),
2864 | | unstable(feature = "integer_atomics", issue = "99069"),
... |
2878 | | i128 AtomicI128 ATOMIC_I128_INIT
2879 | | }
| |_- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const
warning: a `const` item should never be interior mutable
--> library/core/src/sync/atomic.rs:1876:9
|
1829 | / macro_rules! atomic_int {
1830 | | ($cfg_cas:meta,
1831 | | $cfg_align:meta,
1832 | | $stable:meta,
... |
1876 | | pub const $atomic_init: $atomic_type = $atomic_type::new(0);
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
... |
2697 | | }
2698 | | }
| |_- in this expansion of `atomic_int!`
...
2881 | / atomic_int! {
2882 | | cfg(target_has_atomic = "128"),
2883 | | cfg(target_has_atomic_equal_alignment = "128"),
2884 | | unstable(feature = "integer_atomics", issue = "99069"),
... |
2898 | | u128 AtomicU128 ATOMIC_U128_INIT
2899 | | }
| |_- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const
warning: a `const` item should never be interior mutable
--> library/core/src/sync/atomic.rs:1876:9
|
1829 | / macro_rules! atomic_int {
1830 | | ($cfg_cas:meta,
1831 | | $cfg_align:meta,
1832 | | $stable:meta,
... |
1876 | | pub const $atomic_init: $atomic_type = $atomic_type::new(0);
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
... |
2697 | | }
2698 | | }
| |_- in this expansion of `atomic_int!` (#2)
...
2901 | / macro_rules! atomic_int_ptr_sized {
2902 | | ( $($target_pointer_width:literal $align:literal)* ) => { $(
2903 | | #[cfg(target_has_atomic_load_store = "ptr")]
2904 | | #[cfg(target_pointer_width = $target_pointer_width)]
2905 | / atomic_int! {
2906 | cfg(target_has_atomic = "ptr"),
2907 | cfg(target_has_atomic_equal_alignment = "ptr"),
2908 | stable(feature = "rust1", since = "1.0.0"),
...
2922 | isize AtomicIsize ATOMIC_ISIZE_INIT
2923 | | }
| |_________- in this macro invocation (#2)
...
2945 | | )* };
2946 | | }
| |_- in this expansion of `atomic_int_ptr_sized!` (#1)
2947 |
2948 | / atomic_int_ptr_sized! {
2949 | | "16" 2
2950 | | "32" 4
2951 | | "64" 8
2952 | | }
| |_- in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const
warning: a `const` item should never be interior mutable
--> library/core/src/sync/atomic.rs:1876:9
|
1829 | / macro_rules! atomic_int {
1830 | | ($cfg_cas:meta,
1831 | | $cfg_align:meta,
1832 | | $stable:meta,
... |
1876 | | pub const $atomic_init: $atomic_type = $atomic_type::new(0);
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
... |
2697 | | }
2698 | | }
| |_- in this expansion of `atomic_int!` (#2)
...
2901 | / macro_rules! atomic_int_ptr_sized {
2902 | | ( $($target_pointer_width:literal $align:literal)* ) => { $(
2903 | | #[cfg(target_has_atomic_load_store = "ptr")]
2904 | | #[cfg(target_pointer_width = $target_pointer_width)]
... |
2926 | / atomic_int! {
2927 | cfg(target_has_atomic = "ptr"),
2928 | cfg(target_has_atomic_equal_alignment = "ptr"),
2929 | stable(feature = "rust1", since = "1.0.0"),
...
2943 | usize AtomicUsize ATOMIC_USIZE_INIT
2944 | | }
| |_________- in this macro invocation (#2)
2945 | | )* };
2946 | | }
| |_- in this expansion of `atomic_int_ptr_sized!` (#1)
2947 |
2948 | / atomic_int_ptr_sized! {
2949 | | "16" 2
2950 | | "32" 4
2951 | | "64" 8
2952 | | }
| |_- in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const
warning: this operation has no effect
--> library/core/src/fmt/num.rs:508:76
|
508 | ptr::copy_nonoverlapping(lut_ptr.add(d1 as usize), buf_ptr.add(*curr + 0), 2);
| ^^^^^^^^^ help: consider reducing it to: `*curr`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op
= note: `#[warn(clippy::identity_op)]` on by default
warning: this operation has no effect
--> library/core/src/fmt/num.rs:528:76
|
528 | ptr::copy_nonoverlapping(lut_ptr.add(d1 as usize), buf_ptr.add(*curr + 0), 2);
| ^^^^^^^^^ help: consider reducing it to: `*curr`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op
warning: this operation has no effect
--> library/core/src/fmt/num.rs:543:76
|
543 | ptr::copy_nonoverlapping(lut_ptr.add(d1 as usize), buf_ptr.add(*curr + 0), 2);
| ^^^^^^^^^ help: consider reducing it to: `*curr`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op
warning: empty `loop {}` wastes CPU cycles
--> library/core/src/fmt/mod.rs:314:5
|
314 | loop {}
| ^^^^^^^
|
= help: you should either use `panic!()` or add `std::thread::sleep(..);` to the loop body
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_loop
warning: deref which would be done by auto-deref
--> library/core/src/fmt/mod.rs:1206:45
|
1206 | formatter.buf.write_str(*piece)?;
| ^^^^^^ help: try this: `piece`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: deref which would be done by auto-deref
--> library/core/src/fmt/mod.rs:1220:45
|
1220 | formatter.buf.write_str(*piece)?;
| ^^^^^^ help: try this: `piece`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: deref which would be done by auto-deref
--> library/core/src/fmt/mod.rs:1232:33
|
1232 | formatter.buf.write_str(*piece)?;
| ^^^^^^ help: try this: `piece`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/core/src/fmt/mod.rs:1472:17
|
1472 | &s
| ^^ help: change this to: `s`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/core/src/fmt/mod.rs:1475:13
|
1475 | &s
| ^^ help: change this to: `s`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: deref on an immutable reference
--> library/core/src/fmt/mod.rs:2655:20
|
2655 | Debug::fmt(&*(self.deref()), f)
| ^^^^^^^^^^^^^^^^ help: if you would like to reborrow, try removing `&*`: `(self.deref())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/core/src/slice/cmp.rs:29:5
|
29 | / fn ne(&self, other: &[B]) -> bool {
30 | | SlicePartialEq::not_equal(self, other)
31 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/core/src/slice/iter.rs:420:41
|
420 | if self.finished { &[] } else { &self.v }
| ^^^^^^^ help: change this to: `self.v`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
--> library/core/src/slice/iter.rs:694:18
|
694 | Some(mem::replace(&mut self.v, &mut []))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut self.v)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
--> library/core/src/slice/iter.rs:758:27
|
758 | let tmp = mem::replace(&mut self.v, &mut []);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut self.v)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
--> library/core/src/slice/iter.rs:839:19
|
839 | let tmp = mem::replace(&mut self.v, &mut []);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut self.v)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
--> library/core/src/slice/iter.rs:885:19
|
885 | let tmp = mem::replace(&mut self.v, &mut []);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut self.v)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
--> library/core/src/slice/iter.rs:2103:42
|
2103 | let (temp, _tail) = unsafe { mem::replace(&mut self.v, &mut []).split_at_mut(end) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut self.v)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default
warning: this pattern reimplements `Option::unwrap_or`
--> library/core/src/slice/iter.rs:2592:25
|
2592 | let start = match end.checked_sub(self.chunk_size) {
| _________________________^
2593 | | Some(sum) => sum,
2594 | | None => 0,
2595 | | };
| |_____________^ help: replace with: `end.checked_sub(self.chunk_size).unwrap_or(0)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or
= note: `#[warn(clippy::manual_unwrap_or)]` on by default
warning: this pattern reimplements `Option::unwrap_or`
--> library/core/src/slice/iter.rs:2615:21
|
2615 | let start = match end.checked_sub(self.chunk_size) {
| _____________________^
2616 | | None => 0,
2617 | | Some(start) => start,
2618 | | };
| |_________^ help: replace with: `end.checked_sub(self.chunk_size).unwrap_or(0)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or
warning: this pattern reimplements `Option::unwrap_or`
--> library/core/src/slice/iter.rs:2765:25
|
2765 | let start = match end.checked_sub(self.chunk_size) {
| _________________________^
2766 | | Some(sum) => sum,
2767 | | None => 0,
2768 | | };
| |_____________^ help: replace with: `end.checked_sub(self.chunk_size).unwrap_or(0)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or
warning: this pattern reimplements `Option::unwrap_or`
--> library/core/src/slice/iter.rs:2795:21
|
2795 | let start = match end.checked_sub(self.chunk_size) {
| _____________________^
2796 | | None => 0,
2797 | | Some(start) => start,
2798 | | };
| |_________^ help: replace with: `end.checked_sub(self.chunk_size).unwrap_or(0)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or
warning: this operation has no effect
--> library/core/src/slice/sort.rs:663:17
|
663 | let mut a = len / 4 * 1;
| ^^^^^^^^^^^ help: consider reducing it to: `len / 4`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op
warning: manual implementation of an assign operation
--> library/core/src/slice/sort.rs:859:17
|
859 | index = index - mid;
| ^^^^^^^^^^^^^^^^^^^ help: replace it with: `index -= mid`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
warning: `if` chain can be rewritten with `match`
--> library/core/src/slice/sort.rs:872:9
|
872 | / if mid < index {
873 | | v = right;
874 | | index = index - mid - 1;
875 | | pred = Some(pivot);
... |
881 | | return;
882 | | }
| |_________^
|
= help: consider rewriting the `if` chain to use `cmp` and `match`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_chain
warning: call to `core::mem::swap` with a parameter derived from a raw pointer
--> library/core/src/slice/mod.rs:2990:25
|
2990 | mem::swap(&mut *ptr_read, &mut *ptr_write);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use ptr::swap: `core::ptr::swap(ptr_read, ptr_write)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#swap_ptr_to_ref
warning: manual implementation of an assign operation
--> library/core/src/slice/mod.rs:3456:17
|
3456 | b = b - a;
| ^^^^^^^^^ help: replace it with: `b -= a`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
warning: transmute from a `&[u8]` to a `&str`
--> library/core/src/str/converts.rs:173:14
|
173 | unsafe { mem::transmute(v) }
| ^^^^^^^^^^^^^^^^^ help: consider using: `std::str::from_utf8_unchecked(v)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#transmute_bytes_to_str
= note: `#[warn(clippy::transmute_bytes_to_str)]` on by default
warning: `assert!(true)` will be optimized out by the compiler
--> library/core/src/str/count.rs:53:19
|
53 | const _: () = assert!(CHUNK_SIZE < 256);
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: remove it
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants
= note: `#[warn(clippy::assertions_on_constants)]` on by default
warning: `assert!(true)` will be optimized out by the compiler
--> library/core/src/str/count.rs:54:19
|
54 | const _: () = assert!(CHUNK_SIZE % UNROLL_INNER == 0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: remove it
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/core/src/str/iter.rs:1318:50
|
1318 | unsafe { crate::str::from_utf8_unchecked(&self.inner.iter.iter.v) }
| ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.inner.iter.iter.v`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/core/src/str/traits.rs:32:5
|
32 | / fn ne(&self, other: &str) -> bool {
33 | | !(*self).eq(other)
34 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: length comparison to zero
--> library/core/src/str/pattern.rs:953:12
|
953 | if self.len() == 0 {
| ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
warning: variables can be used directly in the `format!` string
--> library/core/src/str/lossy.rs:103:17
|
103 | write!(f, "\\x{:02X}", b)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
103 - write!(f, "\\x{:02X}", b)?;
103 + write!(f, "\\x{b:02X}")?;
|
warning: variables can be used directly in the `format!` string
--> library/core/src/str/mod.rs:113:5
|
113 | / assert!(
114 | | begin <= end,
115 | | "begin <= end ({} <= {}) when slicing `{}`{}",
116 | | begin,
... |
119 | | ellipsis
120 | | );
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
warning: manual implementation of an assign operation
--> library/core/src/time.rs:1009:9
|
988 | / macro_rules! sum_durations {
989 | | ($iter:expr) => {{
990 | | let mut total_secs: u64 = 0;
991 | | let mut total_nanos: u64 = 0;
... |
1009 | | total_nanos = total_nanos % NANOS_PER_SEC as u64;
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `total_nanos %= NANOS_PER_SEC as u64`
1010 | | Duration::new(total_secs, total_nanos as u32)
1011 | | }};
1012 | | }
| |_- in this expansion of `sum_durations!`
...
1017 | sum_durations!(iter)
| -------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
warning: manual implementation of an assign operation
--> library/core/src/time.rs:1009:9
|
988 | / macro_rules! sum_durations {
989 | | ($iter:expr) => {{
990 | | let mut total_secs: u64 = 0;
991 | | let mut total_nanos: u64 = 0;
... |
1009 | | total_nanos = total_nanos % NANOS_PER_SEC as u64;
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `total_nanos %= NANOS_PER_SEC as u64`
1010 | | Duration::new(total_secs, total_nanos as u32)
1011 | | }};
1012 | | }
| |_- in this expansion of `sum_durations!`
...
1024 | sum_durations!(iter)
| -------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
warning: variables can be used directly in the `format!` string
--> library/core/src/time.rs:1124:21
|
1124 | write!(f, "{}{}", prefix, integer_part)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
1124 - write!(f, "{}{}", prefix, integer_part)?;
1124 + write!(f, "{prefix}{integer_part}")?;
|
warning: variables can be used directly in the `format!` string
--> library/core/src/time.rs:1127:21
|
1127 | write!(f, "{}18446744073709551616", prefix)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
1127 - write!(f, "{}18446744073709551616", prefix)?;
1127 + write!(f, "{prefix}18446744073709551616")?;
|
warning: variables can be used directly in the `format!` string
--> library/core/src/time.rs:1138:21
|
1138 | write!(f, ".{:0<width$}", s, width = w)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
1138 - write!(f, ".{:0<width$}", s, width = w)?;
1138 + write!(f, ".{s:0<w$}")?;
|
warning: variables can be used directly in the `format!` string
--> library/core/src/time.rs:1141:17
|
1141 | write!(f, "{}", postfix)
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
1141 - write!(f, "{}", postfix)
1141 + write!(f, "{postfix}")
|
warning: `if` chain can be rewritten with `match`
--> library/core/src/unicode/printable.rs:9:9
|
9 | / if xupper == upper {
10 | | for &lower in &singletonlowers[lowerstart..lowerend] {
11 | | if lower == x as u8 {
12 | | return false;
... |
16 | | break;
17 | | }
| |_________^
|
= help: consider rewriting the `if` chain to use `cmp` and `match`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_chain
warning: manual `Range::contains` implementation
--> library/core/src/unicode/printable.rs:54:12
|
54 | if 0x2a6e0 <= x && x < 0x2a700 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0x2a6e0..0x2a700).contains(&x)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
warning: manual `Range::contains` implementation
--> library/core/src/unicode/printable.rs:57:12
|
57 | if 0x2b73a <= x && x < 0x2b740 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0x2b73a..0x2b740).contains(&x)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
warning: manual `Range::contains` implementation
--> library/core/src/unicode/printable.rs:60:12
|
60 | if 0x2b81e <= x && x < 0x2b820 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0x2b81e..0x2b820).contains(&x)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
warning: manual `Range::contains` implementation
--> library/core/src/unicode/printable.rs:63:12
|
63 | if 0x2cea2 <= x && x < 0x2ceb0 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0x2cea2..0x2ceb0).contains(&x)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
warning: manual `Range::contains` implementation
--> library/core/src/unicode/printable.rs:66:12
|
66 | if 0x2ebe1 <= x && x < 0x2f800 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0x2ebe1..0x2f800).contains(&x)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
warning: manual `Range::contains` implementation
--> library/core/src/unicode/printable.rs:69:12
|
69 | if 0x2fa1e <= x && x < 0x30000 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0x2fa1e..0x30000).contains(&x)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
warning: manual `Range::contains` implementation
--> library/core/src/unicode/printable.rs:72:12
|
72 | if 0x3134b <= x && x < 0x31350 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0x3134b..0x31350).contains(&x)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
warning: manual `Range::contains` implementation
--> library/core/src/unicode/printable.rs:75:12
|
75 | if 0x323b0 <= x && x < 0xe0100 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0x323b0..0xe0100).contains(&x)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
warning: manual `Range::contains` implementation
--> library/core/src/unicode/printable.rs:78:12
|
78 | if 0xe01f0 <= x && x < 0x110000 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(0xe01f0..0x110000).contains(&x)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/core/src/unicode/unicode_data.rs:425:13
|
425 | &BITSET_CHUNKS_MAP,
| ^^^^^^^^^^^^^^^^^^ help: change this to: `BITSET_CHUNKS_MAP`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/core/src/unicode/unicode_data.rs:426:13
|
426 | &BITSET_INDEX_CHUNKS,
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `BITSET_INDEX_CHUNKS`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/core/src/unicode/unicode_data.rs:427:13
|
427 | &BITSET_CANONICAL,
| ^^^^^^^^^^^^^^^^^ help: change this to: `BITSET_CANONICAL`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/core/src/unicode/unicode_data.rs:428:13
|
428 | &BITSET_MAPPING,
| ^^^^^^^^^^^^^^^ help: change this to: `BITSET_MAPPING`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/core/src/unicode/unicode_data.rs:548:13
|
548 | &BITSET_CHUNKS_MAP,
| ^^^^^^^^^^^^^^^^^^ help: change this to: `BITSET_CHUNKS_MAP`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/core/src/unicode/unicode_data.rs:549:13
|
549 | &BITSET_INDEX_CHUNKS,
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `BITSET_INDEX_CHUNKS`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/core/src/unicode/unicode_data.rs:550:13
|
550 | &BITSET_CANONICAL,
| ^^^^^^^^^^^^^^^^^ help: change this to: `BITSET_CANONICAL`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/core/src/unicode/unicode_data.rs:551:13
|
551 | &BITSET_MAPPING,
| ^^^^^^^^^^^^^^^ help: change this to: `BITSET_MAPPING`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: module has the same name as its containing module
--> library/core/src/future/mod.rs:15:1
|
15 | mod future;
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/core/src/task/wake.rs:202:9
|
202 | &self.waker
| ^^^^^^^^^^^ help: change this to: `self.waker`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/core/src/tuple.rs:35:17
|
10 | / macro_rules! tuple_impls {
11 | | // Stopping criteria (1-ary tuple)
12 | | ($T:ident) => {
13 | | tuple_impls!(@impl $T);
| | ---------------------- in this macro invocation (#4)
... |
17 | | tuple_impls!($( $U )+);
| | ----------------------
| | |
| | in this macro invocation (#2)
| | in this macro invocation (#3)
... |
35 | |/ fn ne(&self, other: &($($T,)+)) -> bool {
36 | || $( ${ignore(T)} self.${index()} != other.${index()} )||+
37 | || }
| ||_________________^
... |
107 | | }
108 | | }
| | -
| | |
| | in this expansion of `tuple_impls!` (#1)
| | in this expansion of `tuple_impls!` (#2)
| |__in this expansion of `tuple_impls!` (#3)
| in this expansion of `tuple_impls!` (#4)
...
163 | tuple_impls!(E D C B A Z Y X W V U T);
| ------------------------------------- in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/core/src/tuple.rs:35:17
|
10 | / macro_rules! tuple_impls {
11 | | // Stopping criteria (1-ary tuple)
12 | | ($T:ident) => {
13 | | tuple_impls!(@impl $T);
... |
17 | | tuple_impls!($( $U )+);
| | ----------------------
| | |
| | in this macro invocation (#2)
| | in this macro invocation (#3)
18 | | tuple_impls!(@impl $T $( $U )+);
| | ------------------------------- in this macro invocation (#4)
... |
35 | |/ fn ne(&self, other: &($($T,)+)) -> bool {
36 | || $( ${ignore(T)} self.${index()} != other.${index()} )||+
37 | || }
| ||_________________^
... |
107 | | }
108 | | }
| | -
| | |
| | in this expansion of `tuple_impls!` (#1)
| | in this expansion of `tuple_impls!` (#2)
| |__in this expansion of `tuple_impls!` (#3)
| in this expansion of `tuple_impls!` (#4)
...
163 | tuple_impls!(E D C B A Z Y X W V U T);
| ------------------------------------- in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/core/src/tuple.rs:35:17
|
10 | / macro_rules! tuple_impls {
11 | | // Stopping criteria (1-ary tuple)
12 | | ($T:ident) => {
13 | | tuple_impls!(@impl $T);
... |
17 | | tuple_impls!($( $U )+);
| | ---------------------- in this macro invocation (#2)
18 | | tuple_impls!(@impl $T $( $U )+);
| | ------------------------------- in this macro invocation (#3)
... |
35 | |/ fn ne(&self, other: &($($T,)+)) -> bool {
36 | || $( ${ignore(T)} self.${index()} != other.${index()} )||+
37 | || }
| ||_________________^
... |
107 | | }
108 | | }
| | -
| | |
| | in this expansion of `tuple_impls!` (#1)
| |__in this expansion of `tuple_impls!` (#2)
| in this expansion of `tuple_impls!` (#3)
...
163 | tuple_impls!(E D C B A Z Y X W V U T);
| ------------------------------------- in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/core/src/tuple.rs:35:17
|
10 | / macro_rules! tuple_impls {
11 | | // Stopping criteria (1-ary tuple)
12 | | ($T:ident) => {
13 | | tuple_impls!(@impl $T);
... |
18 | | tuple_impls!(@impl $T $( $U )+);
| | ------------------------------- in this macro invocation (#2)
... |
35 | |/ fn ne(&self, other: &($($T,)+)) -> bool {
36 | || $( ${ignore(T)} self.${index()} != other.${index()} )||+
37 | || }
| ||_________________^
... |
107 | | }
108 | | }
| | -
| | |
| |__in this expansion of `tuple_impls!` (#1)
| in this expansion of `tuple_impls!` (#2)
...
163 | tuple_impls!(E D C B A Z Y X W V U T);
| ------------------------------------- in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: transmute from a type (`core_arch::arm_shared::neon::int8x8_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:2309:5
|
2309 | transmute(vcls_s8(transmute(a)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::int8x16_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:2322:5
|
2322 | transmute(vclsq_s8(transmute(a)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::int16x4_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:2335:5
|
2335 | transmute(vcls_s16(transmute(a)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::int16x8_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:2348:5
|
2348 | transmute(vclsq_s16(transmute(a)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::int32x2_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:2361:5
|
2361 | transmute(vcls_s32(transmute(a)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::int32x4_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:2374:5
|
2374 | transmute(vclsq_s32(transmute(a)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14523:5
|
14523 | transmute(vst2_s8(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
= note: `#[warn(clippy::unit_arg)]` on by default
help: move the expression in front of the call and replace it with the unit literal `()`
|
14523 ~ vst2_s8(transmute(a), transmute(b));
14524 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14523:5
|
14523 | transmute(vst2_s8(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14536:5
|
14536 | transmute(vst2_s16(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
14536 ~ vst2_s16(transmute(a), transmute(b));
14537 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14536:5
|
14536 | transmute(vst2_s16(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14549:5
|
14549 | transmute(vst2_s32(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
14549 ~ vst2_s32(transmute(a), transmute(b));
14550 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14549:5
|
14549 | transmute(vst2_s32(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14562:5
|
14562 | transmute(vst2q_s8(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
14562 ~ vst2q_s8(transmute(a), transmute(b));
14563 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14562:5
|
14562 | transmute(vst2q_s8(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14575:5
|
14575 | transmute(vst2q_s16(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
14575 ~ vst2q_s16(transmute(a), transmute(b));
14576 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14575:5
|
14575 | transmute(vst2q_s16(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14588:5
|
14588 | transmute(vst2q_s32(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
14588 ~ vst2q_s32(transmute(a), transmute(b));
14589 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14588:5
|
14588 | transmute(vst2q_s32(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14601:5
|
14601 | transmute(vst2_s8(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
14601 ~ vst2_s8(transmute(a), transmute(b));
14602 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14601:5
|
14601 | transmute(vst2_s8(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14614:5
|
14614 | transmute(vst2_s16(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
14614 ~ vst2_s16(transmute(a), transmute(b));
14615 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14614:5
|
14614 | transmute(vst2_s16(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14627:5
|
14627 | transmute(vst2q_s8(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
14627 ~ vst2q_s8(transmute(a), transmute(b));
14628 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14627:5
|
14627 | transmute(vst2q_s8(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14640:5
|
14640 | transmute(vst2q_s16(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
14640 ~ vst2q_s16(transmute(a), transmute(b));
14641 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14640:5
|
14640 | transmute(vst2q_s16(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14653:5
|
14653 | transmute(vst2_s64(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
14653 ~ vst2_s64(transmute(a), transmute(b));
14654 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14653:5
|
14653 | transmute(vst2_s64(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14666:5
|
14666 | transmute(vst2_s64(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
14666 ~ vst2_s64(transmute(a), transmute(b));
14667 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14666:5
|
14666 | transmute(vst2_s64(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14932:5
|
14932 | transmute(vst2_lane_s8::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
14932 ~ vst2_lane_s8::<LANE>(transmute(a), transmute(b));
14933 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14932:5
|
14932 | transmute(vst2_lane_s8::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14947:5
|
14947 | transmute(vst2_lane_s16::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
14947 ~ vst2_lane_s16::<LANE>(transmute(a), transmute(b));
14948 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14947:5
|
14947 | transmute(vst2_lane_s16::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14962:5
|
14962 | transmute(vst2_lane_s32::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
14962 ~ vst2_lane_s32::<LANE>(transmute(a), transmute(b));
14963 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14962:5
|
14962 | transmute(vst2_lane_s32::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14977:5
|
14977 | transmute(vst2q_lane_s16::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
14977 ~ vst2q_lane_s16::<LANE>(transmute(a), transmute(b));
14978 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14977:5
|
14977 | transmute(vst2q_lane_s16::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14992:5
|
14992 | transmute(vst2q_lane_s32::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
14992 ~ vst2q_lane_s32::<LANE>(transmute(a), transmute(b));
14993 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:14992:5
|
14992 | transmute(vst2q_lane_s32::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15007:5
|
15007 | transmute(vst2_lane_s8::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
15007 ~ vst2_lane_s8::<LANE>(transmute(a), transmute(b));
15008 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15007:5
|
15007 | transmute(vst2_lane_s8::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15022:5
|
15022 | transmute(vst2_lane_s16::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
15022 ~ vst2_lane_s16::<LANE>(transmute(a), transmute(b));
15023 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15022:5
|
15022 | transmute(vst2_lane_s16::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15037:5
|
15037 | transmute(vst2q_lane_s16::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
15037 ~ vst2q_lane_s16::<LANE>(transmute(a), transmute(b));
15038 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15037:5
|
15037 | transmute(vst2q_lane_s16::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15355:5
|
15355 | transmute(vst3_s8(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
15355 ~ vst3_s8(transmute(a), transmute(b));
15356 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15355:5
|
15355 | transmute(vst3_s8(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15368:5
|
15368 | transmute(vst3_s16(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
15368 ~ vst3_s16(transmute(a), transmute(b));
15369 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15368:5
|
15368 | transmute(vst3_s16(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15381:5
|
15381 | transmute(vst3_s32(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
15381 ~ vst3_s32(transmute(a), transmute(b));
15382 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15381:5
|
15381 | transmute(vst3_s32(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15394:5
|
15394 | transmute(vst3q_s8(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
15394 ~ vst3q_s8(transmute(a), transmute(b));
15395 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15394:5
|
15394 | transmute(vst3q_s8(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15407:5
|
15407 | transmute(vst3q_s16(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
15407 ~ vst3q_s16(transmute(a), transmute(b));
15408 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15407:5
|
15407 | transmute(vst3q_s16(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15420:5
|
15420 | transmute(vst3q_s32(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
15420 ~ vst3q_s32(transmute(a), transmute(b));
15421 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15420:5
|
15420 | transmute(vst3q_s32(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15433:5
|
15433 | transmute(vst3_s8(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
15433 ~ vst3_s8(transmute(a), transmute(b));
15434 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15433:5
|
15433 | transmute(vst3_s8(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15446:5
|
15446 | transmute(vst3_s16(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
15446 ~ vst3_s16(transmute(a), transmute(b));
15447 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15446:5
|
15446 | transmute(vst3_s16(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15459:5
|
15459 | transmute(vst3q_s8(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
15459 ~ vst3q_s8(transmute(a), transmute(b));
15460 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15459:5
|
15459 | transmute(vst3q_s8(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15472:5
|
15472 | transmute(vst3q_s16(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
15472 ~ vst3q_s16(transmute(a), transmute(b));
15473 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15472:5
|
15472 | transmute(vst3q_s16(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15485:5
|
15485 | transmute(vst3_s64(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
15485 ~ vst3_s64(transmute(a), transmute(b));
15486 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15485:5
|
15485 | transmute(vst3_s64(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15498:5
|
15498 | transmute(vst3_s64(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
15498 ~ vst3_s64(transmute(a), transmute(b));
15499 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15498:5
|
15498 | transmute(vst3_s64(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15764:5
|
15764 | transmute(vst3_lane_s8::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
15764 ~ vst3_lane_s8::<LANE>(transmute(a), transmute(b));
15765 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15764:5
|
15764 | transmute(vst3_lane_s8::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15779:5
|
15779 | transmute(vst3_lane_s16::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
15779 ~ vst3_lane_s16::<LANE>(transmute(a), transmute(b));
15780 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15779:5
|
15779 | transmute(vst3_lane_s16::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15794:5
|
15794 | transmute(vst3_lane_s32::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
15794 ~ vst3_lane_s32::<LANE>(transmute(a), transmute(b));
15795 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15794:5
|
15794 | transmute(vst3_lane_s32::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15809:5
|
15809 | transmute(vst3q_lane_s16::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
15809 ~ vst3q_lane_s16::<LANE>(transmute(a), transmute(b));
15810 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15809:5
|
15809 | transmute(vst3q_lane_s16::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15824:5
|
15824 | transmute(vst3q_lane_s32::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
15824 ~ vst3q_lane_s32::<LANE>(transmute(a), transmute(b));
15825 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15824:5
|
15824 | transmute(vst3q_lane_s32::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15839:5
|
15839 | transmute(vst3_lane_s8::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
15839 ~ vst3_lane_s8::<LANE>(transmute(a), transmute(b));
15840 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15839:5
|
15839 | transmute(vst3_lane_s8::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15854:5
|
15854 | transmute(vst3_lane_s16::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
15854 ~ vst3_lane_s16::<LANE>(transmute(a), transmute(b));
15855 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15854:5
|
15854 | transmute(vst3_lane_s16::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15869:5
|
15869 | transmute(vst3q_lane_s16::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
15869 ~ vst3q_lane_s16::<LANE>(transmute(a), transmute(b));
15870 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:15869:5
|
15869 | transmute(vst3q_lane_s16::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16187:5
|
16187 | transmute(vst4_s8(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
16187 ~ vst4_s8(transmute(a), transmute(b));
16188 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16187:5
|
16187 | transmute(vst4_s8(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16200:5
|
16200 | transmute(vst4_s16(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
16200 ~ vst4_s16(transmute(a), transmute(b));
16201 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16200:5
|
16200 | transmute(vst4_s16(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16213:5
|
16213 | transmute(vst4_s32(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
16213 ~ vst4_s32(transmute(a), transmute(b));
16214 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16213:5
|
16213 | transmute(vst4_s32(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16226:5
|
16226 | transmute(vst4q_s8(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
16226 ~ vst4q_s8(transmute(a), transmute(b));
16227 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16226:5
|
16226 | transmute(vst4q_s8(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16239:5
|
16239 | transmute(vst4q_s16(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
16239 ~ vst4q_s16(transmute(a), transmute(b));
16240 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16239:5
|
16239 | transmute(vst4q_s16(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16252:5
|
16252 | transmute(vst4q_s32(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
16252 ~ vst4q_s32(transmute(a), transmute(b));
16253 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16252:5
|
16252 | transmute(vst4q_s32(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16265:5
|
16265 | transmute(vst4_s8(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
16265 ~ vst4_s8(transmute(a), transmute(b));
16266 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16265:5
|
16265 | transmute(vst4_s8(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16278:5
|
16278 | transmute(vst4_s16(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
16278 ~ vst4_s16(transmute(a), transmute(b));
16279 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16278:5
|
16278 | transmute(vst4_s16(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16291:5
|
16291 | transmute(vst4q_s8(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
16291 ~ vst4q_s8(transmute(a), transmute(b));
16292 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16291:5
|
16291 | transmute(vst4q_s8(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16304:5
|
16304 | transmute(vst4q_s16(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
16304 ~ vst4q_s16(transmute(a), transmute(b));
16305 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16304:5
|
16304 | transmute(vst4q_s16(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16317:5
|
16317 | transmute(vst4_s64(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
16317 ~ vst4_s64(transmute(a), transmute(b));
16318 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16317:5
|
16317 | transmute(vst4_s64(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16330:5
|
16330 | transmute(vst4_s64(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
16330 ~ vst4_s64(transmute(a), transmute(b));
16331 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16330:5
|
16330 | transmute(vst4_s64(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16596:5
|
16596 | transmute(vst4_lane_s8::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
16596 ~ vst4_lane_s8::<LANE>(transmute(a), transmute(b));
16597 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16596:5
|
16596 | transmute(vst4_lane_s8::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16611:5
|
16611 | transmute(vst4_lane_s16::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
16611 ~ vst4_lane_s16::<LANE>(transmute(a), transmute(b));
16612 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16611:5
|
16611 | transmute(vst4_lane_s16::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16626:5
|
16626 | transmute(vst4_lane_s32::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
16626 ~ vst4_lane_s32::<LANE>(transmute(a), transmute(b));
16627 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16626:5
|
16626 | transmute(vst4_lane_s32::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16641:5
|
16641 | transmute(vst4q_lane_s16::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
16641 ~ vst4q_lane_s16::<LANE>(transmute(a), transmute(b));
16642 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16641:5
|
16641 | transmute(vst4q_lane_s16::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16656:5
|
16656 | transmute(vst4q_lane_s32::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
16656 ~ vst4q_lane_s32::<LANE>(transmute(a), transmute(b));
16657 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16656:5
|
16656 | transmute(vst4q_lane_s32::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16671:5
|
16671 | transmute(vst4_lane_s8::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
16671 ~ vst4_lane_s8::<LANE>(transmute(a), transmute(b));
16672 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16671:5
|
16671 | transmute(vst4_lane_s8::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16686:5
|
16686 | transmute(vst4_lane_s16::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
16686 ~ vst4_lane_s16::<LANE>(transmute(a), transmute(b));
16687 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16686:5
|
16686 | transmute(vst4_lane_s16::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16701:5
|
16701 | transmute(vst4q_lane_s16::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
16701 ~ vst4q_lane_s16::<LANE>(transmute(a), transmute(b));
16702 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:16701:5
|
16701 | transmute(vst4q_lane_s16::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: casting to the same type is unnecessary (`i32` -> `i32`)
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:21535:28
|
21535 | vqshlu_n_s32_(a, int32x2_t(N as i32, N as i32))
| ^^^^^^^^ help: try: `N`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default
warning: casting to the same type is unnecessary (`i32` -> `i32`)
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:21535:38
|
21535 | vqshlu_n_s32_(a, int32x2_t(N as i32, N as i32))
| ^^^^^^^^ help: try: `N`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: casting to the same type is unnecessary (`i32` -> `i32`)
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:21683:29
|
21683 | vqshluq_n_s32_(a, int32x4_t(N as i32, N as i32, N as i32, N as i32))
| ^^^^^^^^ help: try: `N`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: casting to the same type is unnecessary (`i32` -> `i32`)
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:21683:39
|
21683 | vqshluq_n_s32_(a, int32x4_t(N as i32, N as i32, N as i32, N as i32))
| ^^^^^^^^ help: try: `N`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: casting to the same type is unnecessary (`i32` -> `i32`)
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:21683:49
|
21683 | vqshluq_n_s32_(a, int32x4_t(N as i32, N as i32, N as i32, N as i32))
| ^^^^^^^^ help: try: `N`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: casting to the same type is unnecessary (`i32` -> `i32`)
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/generated.rs:21683:59
|
21683 | vqshluq_n_s32_(a, int32x4_t(N as i32, N as i32, N as i32, N as i32))
| ^^^^^^^^ help: try: `N`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x8_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/mod.rs:3889:5
|
3889 | / transmute(simd_or(
3890 | | simd_and(a, transmute(b)),
3891 | | simd_and(simd_xor(a, transmute(not)), transmute(c)),
3892 | | ))
| |______^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x8_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/mod.rs:3890:21
|
3890 | simd_and(a, transmute(b)),
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x8_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/mod.rs:3891:47
|
3891 | simd_and(simd_xor(a, transmute(not)), transmute(c)),
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint16x4_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/mod.rs:3907:5
|
3907 | / transmute(simd_or(
3908 | | simd_and(a, transmute(b)),
3909 | | simd_and(simd_xor(a, transmute(not)), transmute(c)),
3910 | | ))
| |______^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint16x4_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/mod.rs:3908:21
|
3908 | simd_and(a, transmute(b)),
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint16x4_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/mod.rs:3909:47
|
3909 | simd_and(simd_xor(a, transmute(not)), transmute(c)),
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint32x2_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/mod.rs:3925:5
|
3925 | / transmute(simd_or(
3926 | | simd_and(a, transmute(b)),
3927 | | simd_and(simd_xor(a, transmute(not)), transmute(c)),
3928 | | ))
| |______^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint32x2_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/mod.rs:3926:21
|
3926 | simd_and(a, transmute(b)),
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint32x2_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/mod.rs:3927:47
|
3927 | simd_and(simd_xor(a, transmute(not)), transmute(c)),
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint64x1_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/mod.rs:3943:5
|
3943 | / transmute(simd_or(
3944 | | simd_and(a, transmute(b)),
3945 | | simd_and(simd_xor(a, transmute(not)), transmute(c)),
3946 | | ))
| |______^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint64x1_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/mod.rs:3944:21
|
3944 | simd_and(a, transmute(b)),
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint64x1_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/mod.rs:3945:47
|
3945 | simd_and(simd_xor(a, transmute(not)), transmute(c)),
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x16_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/mod.rs:4091:5
|
4091 | / transmute(simd_or(
4092 | | simd_and(a, transmute(b)),
4093 | | simd_and(simd_xor(a, transmute(not)), transmute(c)),
4094 | | ))
| |______^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x16_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/mod.rs:4092:21
|
4092 | simd_and(a, transmute(b)),
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x16_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/mod.rs:4093:47
|
4093 | simd_and(simd_xor(a, transmute(not)), transmute(c)),
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint16x8_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/mod.rs:4109:5
|
4109 | / transmute(simd_or(
4110 | | simd_and(a, transmute(b)),
4111 | | simd_and(simd_xor(a, transmute(not)), transmute(c)),
4112 | | ))
| |______^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint16x8_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/mod.rs:4110:21
|
4110 | simd_and(a, transmute(b)),
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint16x8_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/mod.rs:4111:47
|
4111 | simd_and(simd_xor(a, transmute(not)), transmute(c)),
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint32x4_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/mod.rs:4127:5
|
4127 | / transmute(simd_or(
4128 | | simd_and(a, transmute(b)),
4129 | | simd_and(simd_xor(a, transmute(not)), transmute(c)),
4130 | | ))
| |______^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint32x4_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/mod.rs:4128:21
|
4128 | simd_and(a, transmute(b)),
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint32x4_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/mod.rs:4129:47
|
4129 | simd_and(simd_xor(a, transmute(not)), transmute(c)),
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint64x2_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/mod.rs:4145:5
|
4145 | / transmute(simd_or(
4146 | | simd_and(a, transmute(b)),
4147 | | simd_and(simd_xor(a, transmute(not)), transmute(c)),
4148 | | ))
| |______^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint64x2_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/mod.rs:4146:21
|
4146 | simd_and(a, transmute(b)),
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint64x2_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/arm_shared/neon/mod.rs:4147:47
|
4147 | simd_and(simd_xor(a, transmute(not)), transmute(c)),
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: casting to the same type is unnecessary (`u64` -> `u64`)
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/v8.rs:15:5
|
15 | x.swap_bytes() as u64
| ^^^^^^^^^^^^^^^^^^^^^ help: try: `x.swap_bytes()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: casting to the same type is unnecessary (`u32` -> `u32`)
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/v8.rs:39:5
|
39 | u32::leading_zeros((((((x as i32) >> 31) as u32) ^ x) << 1) | 1) as u32
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `u32::leading_zeros((((((x as i32) >> 31) as u32) ^ x) << 1) | 1)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:7666:5
|
7666 | transmute(vst2q_s64(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
7666 ~ vst2q_s64(transmute(a), transmute(b));
7667 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:7666:5
|
7666 | transmute(vst2q_s64(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:7677:5
|
7677 | transmute(vst2q_s64(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
7677 ~ vst2q_s64(transmute(a), transmute(b));
7678 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:7677:5
|
7677 | transmute(vst2q_s64(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:7776:5
|
7776 | transmute(vst2q_lane_s8::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
7776 ~ vst2q_lane_s8::<LANE>(transmute(a), transmute(b));
7777 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:7776:5
|
7776 | transmute(vst2q_lane_s8::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:7789:5
|
7789 | transmute(vst2_lane_s64::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
7789 ~ vst2_lane_s64::<LANE>(transmute(a), transmute(b));
7790 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:7789:5
|
7789 | transmute(vst2_lane_s64::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:7802:5
|
7802 | transmute(vst2q_lane_s64::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
7802 ~ vst2q_lane_s64::<LANE>(transmute(a), transmute(b));
7803 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:7802:5
|
7802 | transmute(vst2q_lane_s64::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:7815:5
|
7815 | transmute(vst2q_lane_s8::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
7815 ~ vst2q_lane_s8::<LANE>(transmute(a), transmute(b));
7816 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:7815:5
|
7815 | transmute(vst2q_lane_s8::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:7828:5
|
7828 | transmute(vst2_lane_s64::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
7828 ~ vst2_lane_s64::<LANE>(transmute(a), transmute(b));
7829 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:7828:5
|
7828 | transmute(vst2_lane_s64::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:7841:5
|
7841 | transmute(vst2q_lane_s64::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
7841 ~ vst2q_lane_s64::<LANE>(transmute(a), transmute(b));
7842 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:7841:5
|
7841 | transmute(vst2q_lane_s64::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:7904:5
|
7904 | transmute(vst3q_s64(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
7904 ~ vst3q_s64(transmute(a), transmute(b));
7905 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:7904:5
|
7904 | transmute(vst3q_s64(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:7915:5
|
7915 | transmute(vst3q_s64(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
7915 ~ vst3q_s64(transmute(a), transmute(b));
7916 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:7915:5
|
7915 | transmute(vst3q_s64(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:8014:5
|
8014 | transmute(vst3q_lane_s8::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
8014 ~ vst3q_lane_s8::<LANE>(transmute(a), transmute(b));
8015 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:8014:5
|
8014 | transmute(vst3q_lane_s8::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:8027:5
|
8027 | transmute(vst3_lane_s64::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
8027 ~ vst3_lane_s64::<LANE>(transmute(a), transmute(b));
8028 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:8027:5
|
8027 | transmute(vst3_lane_s64::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:8040:5
|
8040 | transmute(vst3q_lane_s64::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
8040 ~ vst3q_lane_s64::<LANE>(transmute(a), transmute(b));
8041 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:8040:5
|
8040 | transmute(vst3q_lane_s64::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:8053:5
|
8053 | transmute(vst3q_lane_s8::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
8053 ~ vst3q_lane_s8::<LANE>(transmute(a), transmute(b));
8054 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:8053:5
|
8053 | transmute(vst3q_lane_s8::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:8066:5
|
8066 | transmute(vst3_lane_s64::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
8066 ~ vst3_lane_s64::<LANE>(transmute(a), transmute(b));
8067 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:8066:5
|
8066 | transmute(vst3_lane_s64::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:8079:5
|
8079 | transmute(vst3q_lane_s64::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
8079 ~ vst3q_lane_s64::<LANE>(transmute(a), transmute(b));
8080 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:8079:5
|
8079 | transmute(vst3q_lane_s64::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:8142:5
|
8142 | transmute(vst4q_s64(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
8142 ~ vst4q_s64(transmute(a), transmute(b));
8143 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:8142:5
|
8142 | transmute(vst4q_s64(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:8153:5
|
8153 | transmute(vst4q_s64(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
8153 ~ vst4q_s64(transmute(a), transmute(b));
8154 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:8153:5
|
8153 | transmute(vst4q_s64(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:8252:5
|
8252 | transmute(vst4q_lane_s8::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
8252 ~ vst4q_lane_s8::<LANE>(transmute(a), transmute(b));
8253 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:8252:5
|
8252 | transmute(vst4q_lane_s8::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:8265:5
|
8265 | transmute(vst4_lane_s64::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
8265 ~ vst4_lane_s64::<LANE>(transmute(a), transmute(b));
8266 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:8265:5
|
8265 | transmute(vst4_lane_s64::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:8278:5
|
8278 | transmute(vst4q_lane_s64::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
8278 ~ vst4q_lane_s64::<LANE>(transmute(a), transmute(b));
8279 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:8278:5
|
8278 | transmute(vst4q_lane_s64::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:8291:5
|
8291 | transmute(vst4q_lane_s8::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
8291 ~ vst4q_lane_s8::<LANE>(transmute(a), transmute(b));
8292 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:8291:5
|
8291 | transmute(vst4q_lane_s8::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:8304:5
|
8304 | transmute(vst4_lane_s64::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
8304 ~ vst4_lane_s64::<LANE>(transmute(a), transmute(b));
8305 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:8304:5
|
8304 | transmute(vst4_lane_s64::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: passing a unit value to a function
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:8317:5
|
8317 | transmute(vst4q_lane_s64::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
8317 ~ vst4q_lane_s64::<LANE>(transmute(a), transmute(b));
8318 + transmute(())
|
warning: transmute from a type (`()`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/generated.rs:8317:5
|
8317 | transmute(vst4q_lane_s64::<LANE>(transmute(a), transmute(b)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::poly64x1_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:1075:5
|
1075 | / transmute(simd_or(
1076 | | simd_and(a, transmute(b)),
1077 | | simd_and(simd_xor(a, transmute(not)), transmute(c)),
1078 | | ))
| |______^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::poly64x1_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:1076:21
|
1076 | simd_and(a, transmute(b)),
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::poly64x1_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:1077:47
|
1077 | simd_and(simd_xor(a, transmute(not)), transmute(c)),
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::poly64x2_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:1099:5
|
1099 | / transmute(simd_or(
1100 | | simd_and(a, transmute(b)),
1101 | | simd_and(simd_xor(a, transmute(not)), transmute(c)),
1102 | | ))
| |______^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::poly64x2_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:1100:21
|
1100 | simd_and(a, transmute(b)),
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::poly64x2_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:1101:47
|
1101 | simd_and(simd_xor(a, transmute(not)), transmute(c)),
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`u64`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:1313:5
|
1313 | transmute(vaddvq_u64_(transmute(a)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint64x2_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:1313:27
|
1313 | transmute(vaddvq_u64_(transmute(a)))
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x8_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:2557:36
|
2557 | transmute(vqtbl1(transmute(t), transmute(idx)))
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x16_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:2567:37
|
2567 | transmute(vqtbl1q(transmute(t), transmute(idx)))
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x8_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:2577:36
|
2577 | transmute(vqtbl1(transmute(t), transmute(idx)))
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x16_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:2587:37
|
2587 | transmute(vqtbl1q(transmute(t), transmute(idx)))
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x8_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:2617:50
|
2617 | transmute(vqtbx1(transmute(a), transmute(t), transmute(idx)))
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x16_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:2627:51
|
2627 | transmute(vqtbx1q(transmute(a), transmute(t), transmute(idx)))
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x8_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:2637:50
|
2637 | transmute(vqtbx1(transmute(a), transmute(t), transmute(idx)))
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x16_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:2647:51
|
2647 | transmute(vqtbx1q(transmute(a), transmute(t), transmute(idx)))
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x8_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:2677:54
|
2677 | transmute(vqtbl2(transmute(t.0), transmute(t.1), transmute(idx)))
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x16_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:2687:55
|
2687 | transmute(vqtbl2q(transmute(t.0), transmute(t.1), transmute(idx)))
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x8_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:2697:54
|
2697 | transmute(vqtbl2(transmute(t.0), transmute(t.1), transmute(idx)))
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x16_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:2707:55
|
2707 | transmute(vqtbl2q(transmute(t.0), transmute(t.1), transmute(idx)))
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x8_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:2741:9
|
2741 | transmute(idx),
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x16_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:2756:9
|
2756 | transmute(idx),
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x8_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:2771:9
|
2771 | transmute(idx),
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x16_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:2786:9
|
2786 | transmute(idx),
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x8_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:2821:9
|
2821 | transmute(idx),
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x16_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:2836:9
|
2836 | transmute(idx),
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x8_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:2851:9
|
2851 | transmute(idx),
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x16_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:2866:9
|
2866 | transmute(idx),
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x8_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:2902:9
|
2902 | transmute(idx),
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x16_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:2918:9
|
2918 | transmute(idx),
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x8_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:2934:9
|
2934 | transmute(idx),
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x16_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:2950:9
|
2950 | transmute(idx),
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x8_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:2986:9
|
2986 | transmute(idx),
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x16_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:3002:9
|
3002 | transmute(idx),
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x8_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:3018:9
|
3018 | transmute(idx),
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x16_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:3034:9
|
3034 | transmute(idx),
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x8_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:3071:9
|
3071 | transmute(idx),
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x16_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:3088:9
|
3088 | transmute(idx),
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x8_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:3105:9
|
3105 | transmute(idx),
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: transmute from a type (`core_arch::arm_shared::neon::uint8x16_t`) to itself
--> library/core/src/../../stdarch/crates/core_arch/src/aarch64/neon/mod.rs:3122:9
|
3122 | transmute(idx),
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/i128.rs:9:5
|
9 | since = "TBD",
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
= note: `#[warn(clippy::deprecated_semver)]` on by default
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/i16.rs:9:5
|
9 | since = "TBD",
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/i32.rs:9:5
|
9 | since = "TBD",
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/i64.rs:9:5
|
9 | since = "TBD",
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/i8.rs:9:5
|
9 | since = "TBD",
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/isize.rs:9:5
|
9 | since = "TBD",
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/u128.rs:9:5
|
9 | since = "TBD",
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/u16.rs:9:5
|
9 | since = "TBD",
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/u32.rs:9:5
|
9 | since = "TBD",
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/u64.rs:9:5
|
9 | since = "TBD",
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/u8.rs:9:5
|
9 | since = "TBD",
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/usize.rs:9:5
|
9 | since = "TBD",
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/f32.rs:34:14
|
34 | #[deprecated(since = "TBD", note = "replaced by the `RADIX` associated constant on `f32`")]
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/f32.rs:52:5
|
52 | since = "TBD",
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/f32.rs:71:14
|
71 | #[deprecated(since = "TBD", note = "replaced by the `DIGITS` associated constant on `f32`")]
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/f32.rs:92:14
|
92 | #[deprecated(since = "TBD", note = "replaced by the `EPSILON` associated constant on `f32`")]
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/f32.rs:109:14
|
109 | #[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on `f32`")]
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/f32.rs:126:14
|
126 | #[deprecated(since = "TBD", note = "replaced by the `MIN_POSITIVE` associated constant on `f32`")]
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/f32.rs:143:14
|
143 | #[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on `f32`")]
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/f32.rs:160:14
|
160 | #[deprecated(since = "TBD", note = "replaced by the `MIN_EXP` associated constant on `f32`")]
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/f32.rs:177:14
|
177 | #[deprecated(since = "TBD", note = "replaced by the `MAX_EXP` associated constant on `f32`")]
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/f32.rs:194:14
|
194 | #[deprecated(since = "TBD", note = "replaced by the `MIN_10_EXP` associated constant on `f32`")]
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/f32.rs:211:14
|
211 | #[deprecated(since = "TBD", note = "replaced by the `MAX_10_EXP` associated constant on `f32`")]
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/f32.rs:228:14
|
228 | #[deprecated(since = "TBD", note = "replaced by the `NAN` associated constant on `f32`")]
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/f32.rs:245:14
|
245 | #[deprecated(since = "TBD", note = "replaced by the `INFINITY` associated constant on `f32`")]
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/f32.rs:262:14
|
262 | #[deprecated(since = "TBD", note = "replaced by the `NEG_INFINITY` associated constant on `f32`")]
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/f64.rs:34:14
|
34 | #[deprecated(since = "TBD", note = "replaced by the `RADIX` associated constant on `f64`")]
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/f64.rs:52:5
|
52 | since = "TBD",
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/f64.rs:71:14
|
71 | #[deprecated(since = "TBD", note = "replaced by the `DIGITS` associated constant on `f64`")]
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/f64.rs:92:14
|
92 | #[deprecated(since = "TBD", note = "replaced by the `EPSILON` associated constant on `f64`")]
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/f64.rs:109:14
|
109 | #[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on `f64`")]
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/f64.rs:126:14
|
126 | #[deprecated(since = "TBD", note = "replaced by the `MIN_POSITIVE` associated constant on `f64`")]
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/f64.rs:143:14
|
143 | #[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on `f64`")]
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/f64.rs:160:14
|
160 | #[deprecated(since = "TBD", note = "replaced by the `MIN_EXP` associated constant on `f64`")]
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/f64.rs:177:14
|
177 | #[deprecated(since = "TBD", note = "replaced by the `MAX_EXP` associated constant on `f64`")]
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/f64.rs:194:14
|
194 | #[deprecated(since = "TBD", note = "replaced by the `MIN_10_EXP` associated constant on `f64`")]
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/f64.rs:211:14
|
211 | #[deprecated(since = "TBD", note = "replaced by the `MAX_10_EXP` associated constant on `f64`")]
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/f64.rs:228:14
|
228 | #[deprecated(since = "TBD", note = "replaced by the `NAN` associated constant on `f64`")]
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/f64.rs:245:14
|
245 | #[deprecated(since = "TBD", note = "replaced by the `INFINITY` associated constant on `f64`")]
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/f64.rs:262:14
|
262 | #[deprecated(since = "TBD", note = "replaced by the `NEG_INFINITY` associated constant on `f64`")]
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/ptr/const_ptr.rs:137:9
|
137 | since = "1.67",
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/ptr/const_ptr.rs:166:9
|
166 | since = "1.67",
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/ptr/mut_ptr.rs:143:9
|
143 | since = "1.67",
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/ptr/mut_ptr.rs:172:9
|
172 | since = "1.67",
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/int_macros.rs:22:22
|
3 | / macro_rules! int_module {
4 | | ($T:ident) => (int_module!($T, #[stable(feature = "rust1", since = "1.0.0")]););
5 | | ($T:ident, #[$attr:meta]) => (
6 | | #[doc = concat!(
... |
22 | | #[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")]
| | ^^^^^^^^^^^^^
... |
43 | | )
44 | | }
| |_- in this expansion of `int_module!`
|
::: library/core/src/num/shells/i128.rs:13:1
|
13 | int_module! { i128, #[stable(feature = "i128", since="1.26.0")] }
| ----------------------------------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/int_macros.rs:41:22
|
3 | / macro_rules! int_module {
4 | | ($T:ident) => (int_module!($T, #[stable(feature = "rust1", since = "1.0.0")]););
5 | | ($T:ident, #[$attr:meta]) => (
6 | | #[doc = concat!(
... |
41 | | #[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")]
| | ^^^^^^^^^^^^^
42 | | pub const MAX: $T = $T::MAX;
43 | | )
44 | | }
| |_- in this expansion of `int_module!`
|
::: library/core/src/num/shells/i128.rs:13:1
|
13 | int_module! { i128, #[stable(feature = "i128", since="1.26.0")] }
| ----------------------------------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/int_macros.rs:22:22
|
3 | / macro_rules! int_module {
4 | | ($T:ident) => (int_module!($T, #[stable(feature = "rust1", since = "1.0.0")]););
| | -------------------------------------------------------------- in this macro invocation (#2)
5 | | ($T:ident, #[$attr:meta]) => (
6 | | #[doc = concat!(
... |
22 | | #[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")]
| | ^^^^^^^^^^^^^
... |
43 | | )
44 | | }
| | -
| | |
| |_in this expansion of `int_module!` (#1)
| in this expansion of `int_module!` (#2)
|
::: library/core/src/num/shells/i16.rs:13:1
|
13 | int_module! { i16 }
| ------------------- in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/int_macros.rs:41:22
|
3 | / macro_rules! int_module {
4 | | ($T:ident) => (int_module!($T, #[stable(feature = "rust1", since = "1.0.0")]););
| | -------------------------------------------------------------- in this macro invocation (#2)
5 | | ($T:ident, #[$attr:meta]) => (
6 | | #[doc = concat!(
... |
41 | | #[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")]
| | ^^^^^^^^^^^^^
42 | | pub const MAX: $T = $T::MAX;
43 | | )
44 | | }
| | -
| | |
| |_in this expansion of `int_module!` (#1)
| in this expansion of `int_module!` (#2)
|
::: library/core/src/num/shells/i16.rs:13:1
|
13 | int_module! { i16 }
| ------------------- in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/int_macros.rs:22:22
|
3 | / macro_rules! int_module {
4 | | ($T:ident) => (int_module!($T, #[stable(feature = "rust1", since = "1.0.0")]););
| | -------------------------------------------------------------- in this macro invocation (#2)
5 | | ($T:ident, #[$attr:meta]) => (
6 | | #[doc = concat!(
... |
22 | | #[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")]
| | ^^^^^^^^^^^^^
... |
43 | | )
44 | | }
| | -
| | |
| |_in this expansion of `int_module!` (#1)
| in this expansion of `int_module!` (#2)
|
::: library/core/src/num/shells/i32.rs:13:1
|
13 | int_module! { i32 }
| ------------------- in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/int_macros.rs:41:22
|
3 | / macro_rules! int_module {
4 | | ($T:ident) => (int_module!($T, #[stable(feature = "rust1", since = "1.0.0")]););
| | -------------------------------------------------------------- in this macro invocation (#2)
5 | | ($T:ident, #[$attr:meta]) => (
6 | | #[doc = concat!(
... |
41 | | #[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")]
| | ^^^^^^^^^^^^^
42 | | pub const MAX: $T = $T::MAX;
43 | | )
44 | | }
| | -
| | |
| |_in this expansion of `int_module!` (#1)
| in this expansion of `int_module!` (#2)
|
::: library/core/src/num/shells/i32.rs:13:1
|
13 | int_module! { i32 }
| ------------------- in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/int_macros.rs:22:22
|
3 | / macro_rules! int_module {
4 | | ($T:ident) => (int_module!($T, #[stable(feature = "rust1", since = "1.0.0")]););
| | -------------------------------------------------------------- in this macro invocation (#2)
5 | | ($T:ident, #[$attr:meta]) => (
6 | | #[doc = concat!(
... |
22 | | #[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")]
| | ^^^^^^^^^^^^^
... |
43 | | )
44 | | }
| | -
| | |
| |_in this expansion of `int_module!` (#1)
| in this expansion of `int_module!` (#2)
|
::: library/core/src/num/shells/i64.rs:13:1
|
13 | int_module! { i64 }
| ------------------- in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/int_macros.rs:41:22
|
3 | / macro_rules! int_module {
4 | | ($T:ident) => (int_module!($T, #[stable(feature = "rust1", since = "1.0.0")]););
| | -------------------------------------------------------------- in this macro invocation (#2)
5 | | ($T:ident, #[$attr:meta]) => (
6 | | #[doc = concat!(
... |
41 | | #[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")]
| | ^^^^^^^^^^^^^
42 | | pub const MAX: $T = $T::MAX;
43 | | )
44 | | }
| | -
| | |
| |_in this expansion of `int_module!` (#1)
| in this expansion of `int_module!` (#2)
|
::: library/core/src/num/shells/i64.rs:13:1
|
13 | int_module! { i64 }
| ------------------- in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/int_macros.rs:22:22
|
3 | / macro_rules! int_module {
4 | | ($T:ident) => (int_module!($T, #[stable(feature = "rust1", since = "1.0.0")]););
| | -------------------------------------------------------------- in this macro invocation (#2)
5 | | ($T:ident, #[$attr:meta]) => (
6 | | #[doc = concat!(
... |
22 | | #[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")]
| | ^^^^^^^^^^^^^
... |
43 | | )
44 | | }
| | -
| | |
| |_in this expansion of `int_module!` (#1)
| in this expansion of `int_module!` (#2)
|
::: library/core/src/num/shells/i8.rs:13:1
|
13 | int_module! { i8 }
| ------------------ in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/int_macros.rs:41:22
|
3 | / macro_rules! int_module {
4 | | ($T:ident) => (int_module!($T, #[stable(feature = "rust1", since = "1.0.0")]););
| | -------------------------------------------------------------- in this macro invocation (#2)
5 | | ($T:ident, #[$attr:meta]) => (
6 | | #[doc = concat!(
... |
41 | | #[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")]
| | ^^^^^^^^^^^^^
42 | | pub const MAX: $T = $T::MAX;
43 | | )
44 | | }
| | -
| | |
| |_in this expansion of `int_module!` (#1)
| in this expansion of `int_module!` (#2)
|
::: library/core/src/num/shells/i8.rs:13:1
|
13 | int_module! { i8 }
| ------------------ in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/int_macros.rs:22:22
|
3 | / macro_rules! int_module {
4 | | ($T:ident) => (int_module!($T, #[stable(feature = "rust1", since = "1.0.0")]););
| | -------------------------------------------------------------- in this macro invocation (#2)
5 | | ($T:ident, #[$attr:meta]) => (
6 | | #[doc = concat!(
... |
22 | | #[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")]
| | ^^^^^^^^^^^^^
... |
43 | | )
44 | | }
| | -
| | |
| |_in this expansion of `int_module!` (#1)
| in this expansion of `int_module!` (#2)
|
::: library/core/src/num/shells/isize.rs:13:1
|
13 | int_module! { isize }
| --------------------- in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/int_macros.rs:41:22
|
3 | / macro_rules! int_module {
4 | | ($T:ident) => (int_module!($T, #[stable(feature = "rust1", since = "1.0.0")]););
| | -------------------------------------------------------------- in this macro invocation (#2)
5 | | ($T:ident, #[$attr:meta]) => (
6 | | #[doc = concat!(
... |
41 | | #[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")]
| | ^^^^^^^^^^^^^
42 | | pub const MAX: $T = $T::MAX;
43 | | )
44 | | }
| | -
| | |
| |_in this expansion of `int_module!` (#1)
| in this expansion of `int_module!` (#2)
|
::: library/core/src/num/shells/isize.rs:13:1
|
13 | int_module! { isize }
| --------------------- in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/int_macros.rs:22:22
|
3 | / macro_rules! int_module {
4 | | ($T:ident) => (int_module!($T, #[stable(feature = "rust1", since = "1.0.0")]););
5 | | ($T:ident, #[$attr:meta]) => (
6 | | #[doc = concat!(
... |
22 | | #[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")]
| | ^^^^^^^^^^^^^
... |
43 | | )
44 | | }
| |_- in this expansion of `int_module!`
|
::: library/core/src/num/shells/u128.rs:13:1
|
13 | int_module! { u128, #[stable(feature = "i128", since="1.26.0")] }
| ----------------------------------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/int_macros.rs:41:22
|
3 | / macro_rules! int_module {
4 | | ($T:ident) => (int_module!($T, #[stable(feature = "rust1", since = "1.0.0")]););
5 | | ($T:ident, #[$attr:meta]) => (
6 | | #[doc = concat!(
... |
41 | | #[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")]
| | ^^^^^^^^^^^^^
42 | | pub const MAX: $T = $T::MAX;
43 | | )
44 | | }
| |_- in this expansion of `int_module!`
|
::: library/core/src/num/shells/u128.rs:13:1
|
13 | int_module! { u128, #[stable(feature = "i128", since="1.26.0")] }
| ----------------------------------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/int_macros.rs:22:22
|
3 | / macro_rules! int_module {
4 | | ($T:ident) => (int_module!($T, #[stable(feature = "rust1", since = "1.0.0")]););
| | -------------------------------------------------------------- in this macro invocation (#2)
5 | | ($T:ident, #[$attr:meta]) => (
6 | | #[doc = concat!(
... |
22 | | #[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")]
| | ^^^^^^^^^^^^^
... |
43 | | )
44 | | }
| | -
| | |
| |_in this expansion of `int_module!` (#1)
| in this expansion of `int_module!` (#2)
|
::: library/core/src/num/shells/u16.rs:13:1
|
13 | int_module! { u16 }
| ------------------- in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/int_macros.rs:41:22
|
3 | / macro_rules! int_module {
4 | | ($T:ident) => (int_module!($T, #[stable(feature = "rust1", since = "1.0.0")]););
| | -------------------------------------------------------------- in this macro invocation (#2)
5 | | ($T:ident, #[$attr:meta]) => (
6 | | #[doc = concat!(
... |
41 | | #[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")]
| | ^^^^^^^^^^^^^
42 | | pub const MAX: $T = $T::MAX;
43 | | )
44 | | }
| | -
| | |
| |_in this expansion of `int_module!` (#1)
| in this expansion of `int_module!` (#2)
|
::: library/core/src/num/shells/u16.rs:13:1
|
13 | int_module! { u16 }
| ------------------- in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/int_macros.rs:22:22
|
3 | / macro_rules! int_module {
4 | | ($T:ident) => (int_module!($T, #[stable(feature = "rust1", since = "1.0.0")]););
| | -------------------------------------------------------------- in this macro invocation (#2)
5 | | ($T:ident, #[$attr:meta]) => (
6 | | #[doc = concat!(
... |
22 | | #[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")]
| | ^^^^^^^^^^^^^
... |
43 | | )
44 | | }
| | -
| | |
| |_in this expansion of `int_module!` (#1)
| in this expansion of `int_module!` (#2)
|
::: library/core/src/num/shells/u32.rs:13:1
|
13 | int_module! { u32 }
| ------------------- in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/int_macros.rs:41:22
|
3 | / macro_rules! int_module {
4 | | ($T:ident) => (int_module!($T, #[stable(feature = "rust1", since = "1.0.0")]););
| | -------------------------------------------------------------- in this macro invocation (#2)
5 | | ($T:ident, #[$attr:meta]) => (
6 | | #[doc = concat!(
... |
41 | | #[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")]
| | ^^^^^^^^^^^^^
42 | | pub const MAX: $T = $T::MAX;
43 | | )
44 | | }
| | -
| | |
| |_in this expansion of `int_module!` (#1)
| in this expansion of `int_module!` (#2)
|
::: library/core/src/num/shells/u32.rs:13:1
|
13 | int_module! { u32 }
| ------------------- in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/int_macros.rs:22:22
|
3 | / macro_rules! int_module {
4 | | ($T:ident) => (int_module!($T, #[stable(feature = "rust1", since = "1.0.0")]););
| | -------------------------------------------------------------- in this macro invocation (#2)
5 | | ($T:ident, #[$attr:meta]) => (
6 | | #[doc = concat!(
... |
22 | | #[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")]
| | ^^^^^^^^^^^^^
... |
43 | | )
44 | | }
| | -
| | |
| |_in this expansion of `int_module!` (#1)
| in this expansion of `int_module!` (#2)
|
::: library/core/src/num/shells/u64.rs:13:1
|
13 | int_module! { u64 }
| ------------------- in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/int_macros.rs:41:22
|
3 | / macro_rules! int_module {
4 | | ($T:ident) => (int_module!($T, #[stable(feature = "rust1", since = "1.0.0")]););
| | -------------------------------------------------------------- in this macro invocation (#2)
5 | | ($T:ident, #[$attr:meta]) => (
6 | | #[doc = concat!(
... |
41 | | #[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")]
| | ^^^^^^^^^^^^^
42 | | pub const MAX: $T = $T::MAX;
43 | | )
44 | | }
| | -
| | |
| |_in this expansion of `int_module!` (#1)
| in this expansion of `int_module!` (#2)
|
::: library/core/src/num/shells/u64.rs:13:1
|
13 | int_module! { u64 }
| ------------------- in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/int_macros.rs:22:22
|
3 | / macro_rules! int_module {
4 | | ($T:ident) => (int_module!($T, #[stable(feature = "rust1", since = "1.0.0")]););
| | -------------------------------------------------------------- in this macro invocation (#2)
5 | | ($T:ident, #[$attr:meta]) => (
6 | | #[doc = concat!(
... |
22 | | #[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")]
| | ^^^^^^^^^^^^^
... |
43 | | )
44 | | }
| | -
| | |
| |_in this expansion of `int_module!` (#1)
| in this expansion of `int_module!` (#2)
|
::: library/core/src/num/shells/u8.rs:13:1
|
13 | int_module! { u8 }
| ------------------ in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/int_macros.rs:41:22
|
3 | / macro_rules! int_module {
4 | | ($T:ident) => (int_module!($T, #[stable(feature = "rust1", since = "1.0.0")]););
| | -------------------------------------------------------------- in this macro invocation (#2)
5 | | ($T:ident, #[$attr:meta]) => (
6 | | #[doc = concat!(
... |
41 | | #[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")]
| | ^^^^^^^^^^^^^
42 | | pub const MAX: $T = $T::MAX;
43 | | )
44 | | }
| | -
| | |
| |_in this expansion of `int_module!` (#1)
| in this expansion of `int_module!` (#2)
|
::: library/core/src/num/shells/u8.rs:13:1
|
13 | int_module! { u8 }
| ------------------ in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/int_macros.rs:22:22
|
3 | / macro_rules! int_module {
4 | | ($T:ident) => (int_module!($T, #[stable(feature = "rust1", since = "1.0.0")]););
| | -------------------------------------------------------------- in this macro invocation (#2)
5 | | ($T:ident, #[$attr:meta]) => (
6 | | #[doc = concat!(
... |
22 | | #[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")]
| | ^^^^^^^^^^^^^
... |
43 | | )
44 | | }
| | -
| | |
| |_in this expansion of `int_module!` (#1)
| in this expansion of `int_module!` (#2)
|
::: library/core/src/num/shells/usize.rs:13:1
|
13 | int_module! { usize }
| --------------------- in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/shells/int_macros.rs:41:22
|
3 | / macro_rules! int_module {
4 | | ($T:ident) => (int_module!($T, #[stable(feature = "rust1", since = "1.0.0")]););
| | -------------------------------------------------------------- in this macro invocation (#2)
5 | | ($T:ident, #[$attr:meta]) => (
6 | | #[doc = concat!(
... |
41 | | #[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")]
| | ^^^^^^^^^^^^^
42 | | pub const MAX: $T = $T::MAX;
43 | | )
44 | | }
| | -
| | |
| |_in this expansion of `int_module!` (#1)
| in this expansion of `int_module!` (#2)
|
::: library/core/src/num/shells/usize.rs:13:1
|
13 | int_module! { usize }
| --------------------- in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/int_macros.rs:2767:22
|
1 | / macro_rules! int_impl {
2 | | ($SelfT:ty, $ActualT:ident, $UnsignedT:ty, $BITS:expr, $BITS_MINUS_ONE:expr, $Min:expr, $Max:expr,
3 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
4 | | $reversed:expr, $le_bytes:expr, $be_bytes:expr,
... |
2767 | | #[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")]
| | ^^^^^^^^^^^^^
... |
2784 | | }
2785 | | }
| |__- in this expansion of `int_impl!`
|
::: library/core/src/num/mod.rs:241:5
|
241 | / int_impl! { i8, i8, u8, 8, 7, -128, 127, 2, "-0x7e", "0xa", "0x12", "0x12", "0x48",
242 | | "[0x12]", "[0x12]", "", "", "" }
| |____________________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/int_macros.rs:2780:22
|
1 | / macro_rules! int_impl {
2 | | ($SelfT:ty, $ActualT:ident, $UnsignedT:ty, $BITS:expr, $BITS_MINUS_ONE:expr, $Min:expr, $Max:expr,
3 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
4 | | $reversed:expr, $le_bytes:expr, $be_bytes:expr,
... |
2780 | | #[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")]
| | ^^^^^^^^^^^^^
... |
2784 | | }
2785 | | }
| |__- in this expansion of `int_impl!`
|
::: library/core/src/num/mod.rs:241:5
|
241 | / int_impl! { i8, i8, u8, 8, 7, -128, 127, 2, "-0x7e", "0xa", "0x12", "0x12", "0x48",
242 | | "[0x12]", "[0x12]", "", "", "" }
| |____________________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/int_macros.rs:2767:22
|
1 | / macro_rules! int_impl {
2 | | ($SelfT:ty, $ActualT:ident, $UnsignedT:ty, $BITS:expr, $BITS_MINUS_ONE:expr, $Min:expr, $Max:expr,
3 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
4 | | $reversed:expr, $le_bytes:expr, $be_bytes:expr,
... |
2767 | | #[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")]
| | ^^^^^^^^^^^^^
... |
2784 | | }
2785 | | }
| |__- in this expansion of `int_impl!`
|
::: library/core/src/num/mod.rs:246:5
|
246 | / int_impl! { i16, i16, u16, 16, 15, -32768, 32767, 4, "-0x5ffd", "0x3a", "0x1234", "0x3412",
247 | | "0x2c48", "[0x34, 0x12]", "[0x12, 0x34]", "", "", "" }
| |__________________________________________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/int_macros.rs:2780:22
|
1 | / macro_rules! int_impl {
2 | | ($SelfT:ty, $ActualT:ident, $UnsignedT:ty, $BITS:expr, $BITS_MINUS_ONE:expr, $Min:expr, $Max:expr,
3 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
4 | | $reversed:expr, $le_bytes:expr, $be_bytes:expr,
... |
2780 | | #[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")]
| | ^^^^^^^^^^^^^
... |
2784 | | }
2785 | | }
| |__- in this expansion of `int_impl!`
|
::: library/core/src/num/mod.rs:246:5
|
246 | / int_impl! { i16, i16, u16, 16, 15, -32768, 32767, 4, "-0x5ffd", "0x3a", "0x1234", "0x3412",
247 | | "0x2c48", "[0x34, 0x12]", "[0x12, 0x34]", "", "", "" }
| |__________________________________________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/int_macros.rs:2767:22
|
1 | / macro_rules! int_impl {
2 | | ($SelfT:ty, $ActualT:ident, $UnsignedT:ty, $BITS:expr, $BITS_MINUS_ONE:expr, $Min:expr, $Max:expr,
3 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
4 | | $reversed:expr, $le_bytes:expr, $be_bytes:expr,
... |
2767 | | #[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")]
| | ^^^^^^^^^^^^^
... |
2784 | | }
2785 | | }
| |__- in this expansion of `int_impl!`
|
::: library/core/src/num/mod.rs:251:5
|
251 | / int_impl! { i32, i32, u32, 32, 31, -2147483648, 2147483647, 8, "0x10000b3", "0xb301",
252 | | "0x12345678", "0x78563412", "0x1e6a2c48", "[0x78, 0x56, 0x34, 0x12]",
253 | | "[0x12, 0x34, 0x56, 0x78]", "", "", "" }
| |____________________________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/int_macros.rs:2780:22
|
1 | / macro_rules! int_impl {
2 | | ($SelfT:ty, $ActualT:ident, $UnsignedT:ty, $BITS:expr, $BITS_MINUS_ONE:expr, $Min:expr, $Max:expr,
3 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
4 | | $reversed:expr, $le_bytes:expr, $be_bytes:expr,
... |
2780 | | #[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")]
| | ^^^^^^^^^^^^^
... |
2784 | | }
2785 | | }
| |__- in this expansion of `int_impl!`
|
::: library/core/src/num/mod.rs:251:5
|
251 | / int_impl! { i32, i32, u32, 32, 31, -2147483648, 2147483647, 8, "0x10000b3", "0xb301",
252 | | "0x12345678", "0x78563412", "0x1e6a2c48", "[0x78, 0x56, 0x34, 0x12]",
253 | | "[0x12, 0x34, 0x56, 0x78]", "", "", "" }
| |____________________________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/int_macros.rs:2767:22
|
1 | / macro_rules! int_impl {
2 | | ($SelfT:ty, $ActualT:ident, $UnsignedT:ty, $BITS:expr, $BITS_MINUS_ONE:expr, $Min:expr, $Max:expr,
3 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
4 | | $reversed:expr, $le_bytes:expr, $be_bytes:expr,
... |
2767 | | #[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")]
| | ^^^^^^^^^^^^^
... |
2784 | | }
2785 | | }
| |__- in this expansion of `int_impl!`
|
::: library/core/src/num/mod.rs:257:5
|
257 | / int_impl! { i64, i64, u64, 64, 63, -9223372036854775808, 9223372036854775807, 12,
258 | | "0xaa00000000006e1", "0x6e10aa", "0x1234567890123456", "0x5634129078563412",
259 | | "0x6a2c48091e6a2c48", "[0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]",
260 | | "[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]", "", "", "" }
| |____________________________________________________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/int_macros.rs:2780:22
|
1 | / macro_rules! int_impl {
2 | | ($SelfT:ty, $ActualT:ident, $UnsignedT:ty, $BITS:expr, $BITS_MINUS_ONE:expr, $Min:expr, $Max:expr,
3 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
4 | | $reversed:expr, $le_bytes:expr, $be_bytes:expr,
... |
2780 | | #[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")]
| | ^^^^^^^^^^^^^
... |
2784 | | }
2785 | | }
| |__- in this expansion of `int_impl!`
|
::: library/core/src/num/mod.rs:257:5
|
257 | / int_impl! { i64, i64, u64, 64, 63, -9223372036854775808, 9223372036854775807, 12,
258 | | "0xaa00000000006e1", "0x6e10aa", "0x1234567890123456", "0x5634129078563412",
259 | | "0x6a2c48091e6a2c48", "[0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]",
260 | | "[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]", "", "", "" }
| |____________________________________________________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/int_macros.rs:2767:22
|
1 | / macro_rules! int_impl {
2 | | ($SelfT:ty, $ActualT:ident, $UnsignedT:ty, $BITS:expr, $BITS_MINUS_ONE:expr, $Min:expr, $Max:expr,
3 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
4 | | $reversed:expr, $le_bytes:expr, $be_bytes:expr,
... |
2767 | | #[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")]
| | ^^^^^^^^^^^^^
... |
2784 | | }
2785 | | }
| |__- in this expansion of `int_impl!`
|
::: library/core/src/num/mod.rs:264:5
|
264 | / int_impl! { i128, i128, u128, 128, 127, -170141183460469231731687303715884105728,
265 | | 170141183460469231731687303715884105727, 16,
266 | | "0x13f40000000000000000000000004f76", "0x4f7613f4", "0x12345678901234567890123456789012",
267 | | "0x12907856341290785634129078563412", "0x48091e6a2c48091e6a2c48091e6a2c48",
... |
270 | | "[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, \
271 | | 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]", "", "", "" }
| |____________________________________________________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/int_macros.rs:2780:22
|
1 | / macro_rules! int_impl {
2 | | ($SelfT:ty, $ActualT:ident, $UnsignedT:ty, $BITS:expr, $BITS_MINUS_ONE:expr, $Min:expr, $Max:expr,
3 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
4 | | $reversed:expr, $le_bytes:expr, $be_bytes:expr,
... |
2780 | | #[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")]
| | ^^^^^^^^^^^^^
... |
2784 | | }
2785 | | }
| |__- in this expansion of `int_impl!`
|
::: library/core/src/num/mod.rs:264:5
|
264 | / int_impl! { i128, i128, u128, 128, 127, -170141183460469231731687303715884105728,
265 | | 170141183460469231731687303715884105727, 16,
266 | | "0x13f40000000000000000000000004f76", "0x4f7613f4", "0x12345678901234567890123456789012",
267 | | "0x12907856341290785634129078563412", "0x48091e6a2c48091e6a2c48091e6a2c48",
... |
270 | | "[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, \
271 | | 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]", "", "", "" }
| |____________________________________________________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/int_macros.rs:2767:22
|
1 | / macro_rules! int_impl {
2 | | ($SelfT:ty, $ActualT:ident, $UnsignedT:ty, $BITS:expr, $BITS_MINUS_ONE:expr, $Min:expr, $Max:expr,
3 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
4 | | $reversed:expr, $le_bytes:expr, $be_bytes:expr,
... |
2767 | | #[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")]
| | ^^^^^^^^^^^^^
... |
2784 | | }
2785 | | }
| |__- in this expansion of `int_impl!`
|
::: library/core/src/num/mod.rs:293:5
|
293 | / int_impl! { isize, i64, usize, 64, 63, -9223372036854775808, 9223372036854775807,
294 | | 12, "0xaa00000000006e1", "0x6e10aa", "0x1234567890123456", "0x5634129078563412",
295 | | "0x6a2c48091e6a2c48", "[0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]",
296 | | "[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]",
297 | | usize_isize_to_xe_bytes_doc!(), usize_isize_from_xe_bytes_doc!(),
298 | | " on 64-bit targets" }
| |__________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/int_macros.rs:2780:22
|
1 | / macro_rules! int_impl {
2 | | ($SelfT:ty, $ActualT:ident, $UnsignedT:ty, $BITS:expr, $BITS_MINUS_ONE:expr, $Min:expr, $Max:expr,
3 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
4 | | $reversed:expr, $le_bytes:expr, $be_bytes:expr,
... |
2780 | | #[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")]
| | ^^^^^^^^^^^^^
... |
2784 | | }
2785 | | }
| |__- in this expansion of `int_impl!`
|
::: library/core/src/num/mod.rs:293:5
|
293 | / int_impl! { isize, i64, usize, 64, 63, -9223372036854775808, 9223372036854775807,
294 | | 12, "0xaa00000000006e1", "0x6e10aa", "0x1234567890123456", "0x5634129078563412",
295 | | "0x6a2c48091e6a2c48", "[0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]",
296 | | "[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]",
297 | | usize_isize_to_xe_bytes_doc!(), usize_isize_from_xe_bytes_doc!(),
298 | | " on 64-bit targets" }
| |__________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/uint_macros.rs:2428:22
|
1 | / macro_rules! uint_impl {
2 | | ($SelfT:ty, $ActualT:ident, $SignedT:ident, $NonZeroT:ident,
3 | | $BITS:expr, $MaxV:expr,
4 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
... |
2428 | | #[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")]
| | ^^^^^^^^^^^^^
... |
2441 | | }
2442 | | }
| |__- in this expansion of `uint_impl!`
|
::: library/core/src/num/mod.rs:305:5
|
305 | / uint_impl! { u8, u8, i8, NonZeroU8, 8, 255, 2, "0x82", "0xa", "0x12", "0x12", "0x48", "[0x12]",
306 | | "[0x12]", "", "", "" }
| |__________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/uint_macros.rs:2439:22
|
1 | / macro_rules! uint_impl {
2 | | ($SelfT:ty, $ActualT:ident, $SignedT:ident, $NonZeroT:ident,
3 | | $BITS:expr, $MaxV:expr,
4 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
... |
2439 | | #[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")]
| | ^^^^^^^^^^^^^
2440 | | pub const fn max_value() -> Self { Self::MAX }
2441 | | }
2442 | | }
| |__- in this expansion of `uint_impl!`
|
::: library/core/src/num/mod.rs:305:5
|
305 | / uint_impl! { u8, u8, i8, NonZeroU8, 8, 255, 2, "0x82", "0xa", "0x12", "0x12", "0x48", "[0x12]",
306 | | "[0x12]", "", "", "" }
| |__________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/uint_macros.rs:2428:22
|
1 | / macro_rules! uint_impl {
2 | | ($SelfT:ty, $ActualT:ident, $SignedT:ident, $NonZeroT:ident,
3 | | $BITS:expr, $MaxV:expr,
4 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
... |
2428 | | #[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")]
| | ^^^^^^^^^^^^^
... |
2441 | | }
2442 | | }
| |__- in this expansion of `uint_impl!`
|
::: library/core/src/num/mod.rs:890:5
|
890 | / uint_impl! { u16, u16, i16, NonZeroU16, 16, 65535, 4, "0xa003", "0x3a", "0x1234", "0x3412", "0x2c48",
891 | | "[0x34, 0x12]", "[0x12, 0x34]", "", "", "" }
| |________________________________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/uint_macros.rs:2439:22
|
1 | / macro_rules! uint_impl {
2 | | ($SelfT:ty, $ActualT:ident, $SignedT:ident, $NonZeroT:ident,
3 | | $BITS:expr, $MaxV:expr,
4 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
... |
2439 | | #[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")]
| | ^^^^^^^^^^^^^
2440 | | pub const fn max_value() -> Self { Self::MAX }
2441 | | }
2442 | | }
| |__- in this expansion of `uint_impl!`
|
::: library/core/src/num/mod.rs:890:5
|
890 | / uint_impl! { u16, u16, i16, NonZeroU16, 16, 65535, 4, "0xa003", "0x3a", "0x1234", "0x3412", "0x2c48",
891 | | "[0x34, 0x12]", "[0x12, 0x34]", "", "", "" }
| |________________________________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/uint_macros.rs:2428:22
|
1 | / macro_rules! uint_impl {
2 | | ($SelfT:ty, $ActualT:ident, $SignedT:ident, $NonZeroT:ident,
3 | | $BITS:expr, $MaxV:expr,
4 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
... |
2428 | | #[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")]
| | ^^^^^^^^^^^^^
... |
2441 | | }
2442 | | }
| |__- in this expansion of `uint_impl!`
|
::: library/core/src/num/mod.rs:921:5
|
921 | / uint_impl! { u32, u32, i32, NonZeroU32, 32, 4294967295, 8, "0x10000b3", "0xb301", "0x12345678",
922 | | "0x78563412", "0x1e6a2c48", "[0x78, 0x56, 0x34, 0x12]", "[0x12, 0x34, 0x56, 0x78]", "", "", "" }
| |____________________________________________________________________________________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/uint_macros.rs:2439:22
|
1 | / macro_rules! uint_impl {
2 | | ($SelfT:ty, $ActualT:ident, $SignedT:ident, $NonZeroT:ident,
3 | | $BITS:expr, $MaxV:expr,
4 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
... |
2439 | | #[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")]
| | ^^^^^^^^^^^^^
2440 | | pub const fn max_value() -> Self { Self::MAX }
2441 | | }
2442 | | }
| |__- in this expansion of `uint_impl!`
|
::: library/core/src/num/mod.rs:921:5
|
921 | / uint_impl! { u32, u32, i32, NonZeroU32, 32, 4294967295, 8, "0x10000b3", "0xb301", "0x12345678",
922 | | "0x78563412", "0x1e6a2c48", "[0x78, 0x56, 0x34, 0x12]", "[0x12, 0x34, 0x56, 0x78]", "", "", "" }
| |____________________________________________________________________________________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/uint_macros.rs:2428:22
|
1 | / macro_rules! uint_impl {
2 | | ($SelfT:ty, $ActualT:ident, $SignedT:ident, $NonZeroT:ident,
3 | | $BITS:expr, $MaxV:expr,
4 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
... |
2428 | | #[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")]
| | ^^^^^^^^^^^^^
... |
2441 | | }
2442 | | }
| |__- in this expansion of `uint_impl!`
|
::: library/core/src/num/mod.rs:927:5
|
927 | / uint_impl! { u64, u64, i64, NonZeroU64, 64, 18446744073709551615, 12, "0xaa00000000006e1", "0x6e10aa",
928 | | "0x1234567890123456", "0x5634129078563412", "0x6a2c48091e6a2c48",
929 | | "[0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]",
930 | | "[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]",
931 | | "", "", ""}
| |_______________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/uint_macros.rs:2439:22
|
1 | / macro_rules! uint_impl {
2 | | ($SelfT:ty, $ActualT:ident, $SignedT:ident, $NonZeroT:ident,
3 | | $BITS:expr, $MaxV:expr,
4 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
... |
2439 | | #[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")]
| | ^^^^^^^^^^^^^
2440 | | pub const fn max_value() -> Self { Self::MAX }
2441 | | }
2442 | | }
| |__- in this expansion of `uint_impl!`
|
::: library/core/src/num/mod.rs:927:5
|
927 | / uint_impl! { u64, u64, i64, NonZeroU64, 64, 18446744073709551615, 12, "0xaa00000000006e1", "0x6e10aa",
928 | | "0x1234567890123456", "0x5634129078563412", "0x6a2c48091e6a2c48",
929 | | "[0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]",
930 | | "[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]",
931 | | "", "", ""}
| |_______________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/uint_macros.rs:2428:22
|
1 | / macro_rules! uint_impl {
2 | | ($SelfT:ty, $ActualT:ident, $SignedT:ident, $NonZeroT:ident,
3 | | $BITS:expr, $MaxV:expr,
4 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
... |
2428 | | #[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")]
| | ^^^^^^^^^^^^^
... |
2441 | | }
2442 | | }
| |__- in this expansion of `uint_impl!`
|
::: library/core/src/num/mod.rs:936:5
|
936 | / uint_impl! { u128, u128, i128, NonZeroU128, 128, 340282366920938463463374607431768211455, 16,
937 | | "0x13f40000000000000000000000004f76", "0x4f7613f4", "0x12345678901234567890123456789012",
938 | | "0x12907856341290785634129078563412", "0x48091e6a2c48091e6a2c48091e6a2c48",
939 | | "[0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, \
... |
942 | | 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]",
943 | | "", "", ""}
| |________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/uint_macros.rs:2439:22
|
1 | / macro_rules! uint_impl {
2 | | ($SelfT:ty, $ActualT:ident, $SignedT:ident, $NonZeroT:ident,
3 | | $BITS:expr, $MaxV:expr,
4 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
... |
2439 | | #[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")]
| | ^^^^^^^^^^^^^
2440 | | pub const fn max_value() -> Self { Self::MAX }
2441 | | }
2442 | | }
| |__- in this expansion of `uint_impl!`
|
::: library/core/src/num/mod.rs:936:5
|
936 | / uint_impl! { u128, u128, i128, NonZeroU128, 128, 340282366920938463463374607431768211455, 16,
937 | | "0x13f40000000000000000000000004f76", "0x4f7613f4", "0x12345678901234567890123456789012",
938 | | "0x12907856341290785634129078563412", "0x48091e6a2c48091e6a2c48091e6a2c48",
939 | | "[0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, \
... |
942 | | 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]",
943 | | "", "", ""}
| |________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/uint_macros.rs:2428:22
|
1 | / macro_rules! uint_impl {
2 | | ($SelfT:ty, $ActualT:ident, $SignedT:ident, $NonZeroT:ident,
3 | | $BITS:expr, $MaxV:expr,
4 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
... |
2428 | | #[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")]
| | ^^^^^^^^^^^^^
... |
2441 | | }
2442 | | }
| |__- in this expansion of `uint_impl!`
|
::: library/core/src/num/mod.rs:965:5
|
965 | / uint_impl! { usize, u64, isize, NonZeroUsize, 64, 18446744073709551615, 12, "0xaa00000000006e1", "0x6e10aa",
966 | | "0x1234567890123456", "0x5634129078563412", "0x6a2c48091e6a2c48",
967 | | "[0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]",
968 | | "[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]",
969 | | usize_isize_to_xe_bytes_doc!(), usize_isize_from_xe_bytes_doc!(),
970 | | " on 64-bit targets" }
| |__________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: the since field must contain a semver-compliant version
--> library/core/src/num/uint_macros.rs:2439:22
|
1 | / macro_rules! uint_impl {
2 | | ($SelfT:ty, $ActualT:ident, $SignedT:ident, $NonZeroT:ident,
3 | | $BITS:expr, $MaxV:expr,
4 | | $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr,
... |
2439 | | #[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")]
| | ^^^^^^^^^^^^^
2440 | | pub const fn max_value() -> Self { Self::MAX }
2441 | | }
2442 | | }
| |__- in this expansion of `uint_impl!`
|
::: library/core/src/num/mod.rs:965:5
|
965 | / uint_impl! { usize, u64, isize, NonZeroUsize, 64, 18446744073709551615, 12, "0xaa00000000006e1", "0x6e10aa",
966 | | "0x1234567890123456", "0x5634129078563412", "0x6a2c48091e6a2c48",
967 | | "[0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]",
968 | | "[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]",
969 | | usize_isize_to_xe_bytes_doc!(), usize_isize_from_xe_bytes_doc!(),
970 | | " on 64-bit targets" }
| |__________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deprecated_semver
warning: `core` (lib) generated 690 warnings (29 duplicates) (run `cargo fix --lib -p core` to apply 297 suggestions)
Checking rustc-std-workspace-core v1.99.0 (/home/gh-jyn514/rust3/library/rustc-std-workspace-core)
Checking compiler_builtins v0.1.85
Checking libc v0.2.138
Checking alloc v0.0.0 (/home/gh-jyn514/rust3/library/alloc)
Checking cfg-if v1.0.0
Checking adler v1.0.2
Checking memchr v2.5.0
Checking rustc-demangle v0.1.21
warning: this let-binding has unit value
--> library/alloc/src/boxed/thin.rs:64:9
|
64 | let meta = ptr::metadata(&value);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `ptr::metadata(&value);`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
= note: `#[warn(clippy::let_unit_value)]` on by default
warning: local variable doesn't need to be boxed here
--> library/alloc/src/boxed.rs:611:29
|
611 | pub const fn into_inner(boxed: Self) -> T
| ^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#boxed_local
= note: `#[warn(clippy::boxed_local)]` on by default
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/alloc/src/boxed.rs:1342:5
|
1342 | / fn ne(&self, other: &Self) -> bool {
1343 | | PartialEq::ne(&**self, &**other)
1344 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
= note: `#[warn(clippy::partialeq_ne_impl)]` on by default
warning: deref which would be done by auto-deref
--> library/alloc/src/boxed.rs:1903:9
|
1903 | &**self
| ^^^^^^^ help: try this: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
= note: `#[warn(clippy::explicit_auto_deref)]` on by default
warning: deref which would be done by auto-deref
--> library/alloc/src/boxed.rs:1911:9
|
1911 | &mut **self
| ^^^^^^^^^^^ help: try this: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/alloc/src/boxed.rs:2030:35
|
2030 | self.clone_from_slice(&other);
| ^^^^^^ help: change this to: `other`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
warning: deref which would be done by auto-deref
--> library/alloc/src/boxed.rs:2040:9
|
2040 | &**self
| ^^^^^^^ help: try this: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: deref which would be done by auto-deref
--> library/alloc/src/boxed.rs:2047:9
|
2047 | &mut **self
| ^^^^^^^^^^^ help: try this: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: deref which would be done by auto-deref
--> library/alloc/src/boxed.rs:2054:9
|
2054 | &**self
| ^^^^^^^ help: try this: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: deref which would be done by auto-deref
--> library/alloc/src/boxed.rs:2061:9
|
2061 | &mut **self
| ^^^^^^^^^^^ help: try this: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: deref which would be done by auto-deref
--> library/alloc/src/borrow.rs:26:9
|
26 | &**self
| ^^^^^^^ help: try this: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: dereferencing a tuple pattern where every element takes a reference
--> library/alloc/src/borrow.rs:206:40
|
206 | (&mut Owned(ref mut dest), &Owned(ref o)) => o.borrow().clone_into(dest),
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference
= note: `#[warn(clippy::needless_borrowed_reference)]` on by default
help: try removing the `&` and `ref` parts
|
206 - (&mut Owned(ref mut dest), &Owned(ref o)) => o.borrow().clone_into(dest),
206 + (&mut Owned(ref mut dest), Owned(o)) => o.borrow().clone_into(dest),
|
warning: `ref` directly on a function argument is ignored. Consider using a reference type instead
--> library/alloc/src/collections/binary_heap.rs:1682:31
|
1682 | fn spec_extend(&mut self, ref mut other: Vec<T>) {
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg
= note: `#[warn(clippy::toplevel_ref_arg)]` on by default
warning: `ref` directly on a function argument is ignored. Consider using a reference type instead
--> library/alloc/src/collections/binary_heap.rs:1690:31
|
1690 | fn spec_extend(&mut self, ref mut other: BinaryHeap<T>) {
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg
warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
--> library/alloc/src/collections/btree/map/entry.rs:369:21
|
369 | drop(ins.left);
| ^^^^^^^^^^^^^^
|
note: argument has type `collections::btree::node::NodeRef<collections::btree::node::marker::Mut<'_>, K, V, collections::btree::node::marker::LeafOrInternal>`
--> library/alloc/src/collections/btree/map/entry.rs:369:26
|
369 | drop(ins.left);
| ^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#drop_non_drop
= note: `#[warn(clippy::drop_non_drop)]` on by default
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/alloc/src/collections/btree/map.rs:1334:76
|
1334 | let (new_left_len, right_len) = Root::calc_split_length(total_num, &left_root, &right_root);
| ^^^^^^^^^^ help: change this to: `left_root`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: using `clone` on type `core::option::Option<collections::btree::node::Handle<collections::btree::node::NodeRef<collections::btree::node::marker::Immut<'_>, K, V, collections::btree::node::marker::Leaf>, collections::btree::node::marker::Edge>>` which implements the `Copy` trait
--> library/alloc/src/collections/btree/navigate.rs:17:28
|
17 | LeafRange { front: self.front.clone(), back: self.back.clone() }
| ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.front`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `#[warn(clippy::clone_on_copy)]` on by default
warning: using `clone` on type `core::option::Option<collections::btree::node::Handle<collections::btree::node::NodeRef<collections::btree::node::marker::Immut<'_>, K, V, collections::btree::node::marker::Leaf>, collections::btree::node::marker::Edge>>` which implements the `Copy` trait
--> library/alloc/src/collections/btree/navigate.rs:17:54
|
17 | LeafRange { front: self.front.clone(), back: self.back.clone() }
| ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.back`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
warning: the function `Self::as_leaf_ptr` doesn't need a mutable reference
--> library/alloc/src/collections/btree/node.rs:441:37
|
441 | let ptr = Self::as_leaf_ptr(&mut self);
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
= note: `#[warn(clippy::unnecessary_mut_passed)]` on by default
warning: the function `Self::as_leaf_ptr` doesn't need a mutable reference
--> library/alloc/src/collections/btree/node.rs:509:38
|
509 | let leaf = Self::as_leaf_ptr(&mut self);
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
warning: this expression borrows a value the compiler would automatically borrow
--> library/alloc/src/collections/btree/node.rs:515:28
|
515 | let key = unsafe { (&*keys.get_unchecked(idx)).assume_init_ref() };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(*keys.get_unchecked(idx))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression borrows a value the compiler would automatically borrow
--> library/alloc/src/collections/btree/node.rs:516:28
|
516 | let val = unsafe { (&mut *vals.get_unchecked_mut(idx)).assume_init_mut() };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(*vals.get_unchecked_mut(idx))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/alloc/src/collections/btree/node.rs:1313:26
|
1313 | slice_remove(&mut parent_node.edge_area_mut(..old_parent_len + 1), parent_idx + 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `parent_node.edge_area_mut(..old_parent_len + 1)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/alloc/src/collections/btree/set.rs:1641:40
|
1641 | if !other_set.contains(&self_next) {
| ^^^^^^^^^^ help: change this to: `self_next`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/alloc/src/collections/btree/set.rs:1738:39
|
1738 | if large_set.contains(&small_next) {
| ^^^^^^^^^^^ help: change this to: `small_next`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: local variable doesn't need to be boxed here
--> library/alloc/src/collections/linked_list.rs:152:21
|
152 | fn into_element(self: Box<Self>) -> T {
| ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#boxed_local
warning: manual implementation of an assign operation
--> library/alloc/src/collections/linked_list.rs:351:13
|
351 | self.len = self.len - at;
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.len -= at`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
= note: `#[warn(clippy::assign_op_pattern)]` on by default
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
--> library/alloc/src/collections/linked_list.rs:355:13
|
355 | mem::replace(self, LinkedList::new())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(self)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default
= note: `#[warn(clippy::mem_replace_with_default)]` on by default
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
--> library/alloc/src/collections/linked_list.rs:395:13
|
395 | mem::replace(self, LinkedList::new())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(self)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default
warning: manual saturating arithmetic
--> library/alloc/src/collections/linked_list.rs:557:25
|
557 | Cursor { index: self.len.checked_sub(1).unwrap_or(0), current: self.tail, list: self }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try using `saturating_sub`: `self.len.saturating_sub(1)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_saturating_arithmetic
= note: `#[warn(clippy::manual_saturating_arithmetic)]` on by default
warning: manual saturating arithmetic
--> library/alloc/src/collections/linked_list.rs:567:28
|
567 | CursorMut { index: self.len.checked_sub(1).unwrap_or(0), current: self.tail, list: self }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try using `saturating_sub`: `self.len.saturating_sub(1)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_saturating_arithmetic
warning: manual saturating arithmetic
--> library/alloc/src/collections/linked_list.rs:1232:30
|
1232 | self.index = self.list.len().checked_sub(1).unwrap_or(0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try using `saturating_sub`: `self.list.len().saturating_sub(1)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_saturating_arithmetic
warning: unnecessary closure used to substitute value for `Option::None`
--> library/alloc/src/collections/linked_list.rs:1237:30
|
1237 | self.index = self.index.checked_sub(1).unwrap_or_else(|| self.list.len());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^----------------------------------
| |
| help: use `unwrap_or(..)` instead: `unwrap_or(self.list.len())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
= note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default
warning: manual saturating arithmetic
--> library/alloc/src/collections/linked_list.rs:1349:30
|
1349 | self.index = self.list.len().checked_sub(1).unwrap_or(0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try using `saturating_sub`: `self.list.len().saturating_sub(1)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_saturating_arithmetic
warning: unnecessary closure used to substitute value for `Option::None`
--> library/alloc/src/collections/linked_list.rs:1354:30
|
1354 | self.index = self.index.checked_sub(1).unwrap_or_else(|| self.list.len());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^----------------------------------
| |
| help: use `unwrap_or(..)` instead: `unwrap_or(self.list.len())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
warning: `ref` directly on a function argument is ignored. Consider using a reference type instead
--> library/alloc/src/collections/linked_list.rs:1871:31
|
1871 | fn spec_extend(&mut self, ref mut other: LinkedList<T>) {
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/alloc/src/collections/linked_list.rs:1894:5
|
1894 | / fn ne(&self, other: &Self) -> bool {
1895 | | self.len() != other.len() || self.iter().ne(other)
1896 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: redundant closure
--> library/alloc/src/collections/vec_deque/mod.rs:2478:41
|
2478 | let cmp_back = back.first().map(|elem| f(elem));
| ^^^^^^^^^^^^^^ help: replace the closure with the function itself: `&mut f`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
= note: `#[warn(clippy::redundant_closure)]` on by default
warning: redundant closure
--> library/alloc/src/collections/vec_deque/mod.rs:2589:46
|
2589 | if let Some(true) = back.first().map(|v| pred(v)) {
| ^^^^^^^^^^^ help: replace the closure with the function itself: `&mut pred`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
warning: `if` chain can be rewritten with `match`
--> library/alloc/src/collections/vec_deque/mod.rs:2649:9
|
2649 | / if sa.len() == oa.len() {
2650 | | sa == oa && sb == ob
2651 | | } else if sa.len() < oa.len() {
2652 | | // Always divisible in three sections, for example:
... |
2675 | | sa_front == oa && sa_mid == ob_mid && sb == ob_back
2676 | | }
| |_________^
|
= help: consider rewriting the `if` chain to use `cmp` and `match`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_chain
= note: `#[warn(clippy::comparison_chain)]` on by default
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> library/alloc/src/ffi/c_str.rs:409:56
|
409 | let slice = slice::from_raw_parts_mut(ptr, len as usize);
| ^^^^^^^^^^^^ help: try: `len`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default
warning: deref on an immutable reference
--> library/alloc/src/ffi/c_str.rs:581:9
|
581 | &*self
| ^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref
= note: `#[warn(clippy::borrow_deref_ref)]` on by default
help: if you would like to reborrow, try removing `&*`
|
581 | self
|
help: if you would like to deref, try using `&**`
|
581 | &**self
|
warning: needless `fn main` in doctest
--> library/alloc/src/fmt.rs:393:4
|
393 | //! use std::fmt;
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
= note: `#[warn(clippy::needless_doctest_main)]` on by default
warning: needless `fn main` in doctest
--> library/alloc/src/rc.rs:92:4
|
92 | //! use std::rc::Rc;
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: needless `fn main` in doctest
--> library/alloc/src/rc.rs:160:4
|
160 | //! use std::rc::Rc;
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/alloc/src/rc.rs:1739:5
|
1739 | / fn ne(&self, other: &Rc<T>) -> bool {
1740 | | RcEqIdent::ne(self, other)
1741 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: deref which would be done by auto-deref
--> library/alloc/src/rc.rs:2698:9
|
2698 | &**self
| ^^^^^^^ help: try this: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: deref which would be done by auto-deref
--> library/alloc/src/rc.rs:2705:9
|
2705 | &**self
| ^^^^^^^ help: try this: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: called `skip_while(<p>).next()` on an `Iterator`
--> library/alloc/src/str.rs:414:19
|
414 | match iter.skip_while(|&c| Case_Ignorable(c)).next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: this is more succinctly expressed by calling `.find(!<p>)` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#skip_while_next
= note: `#[warn(clippy::skip_while_next)]` on by default
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/alloc/src/string.rs:2217:5
|
2217 | / fn ne(&self, other: &String) -> bool {
2218 | | PartialEq::ne(&self[..], &other[..])
2219 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/alloc/src/string.rs:2232:13
|
2222 | / macro_rules! impl_eq {
2223 | | ($lhs:ty, $rhs: ty) => {
2224 | | #[stable(feature = "rust1", since = "1.0.0")]
2225 | | #[allow(unused_lifetimes)]
... |
2232 | |/ fn ne(&self, other: &$rhs) -> bool {
2233 | || PartialEq::ne(&self[..], &other[..])
2234 | || }
| ||_____________^
... |
2249 | | };
2250 | | }
| |__- in this expansion of `impl_eq!`
2251 |
2252 | impl_eq! { String, str }
| ------------------------ in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/alloc/src/string.rs:2245:13
|
2222 | / macro_rules! impl_eq {
2223 | | ($lhs:ty, $rhs: ty) => {
2224 | | #[stable(feature = "rust1", since = "1.0.0")]
2225 | | #[allow(unused_lifetimes)]
... |
2245 | |/ fn ne(&self, other: &$lhs) -> bool {
2246 | || PartialEq::ne(&self[..], &other[..])
2247 | || }
| ||_____________^
2248 | | }
2249 | | };
2250 | | }
| |__- in this expansion of `impl_eq!`
2251 |
2252 | impl_eq! { String, str }
| ------------------------ in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/alloc/src/string.rs:2232:13
|
2222 | / macro_rules! impl_eq {
2223 | | ($lhs:ty, $rhs: ty) => {
2224 | | #[stable(feature = "rust1", since = "1.0.0")]
2225 | | #[allow(unused_lifetimes)]
... |
2232 | |/ fn ne(&self, other: &$rhs) -> bool {
2233 | || PartialEq::ne(&self[..], &other[..])
2234 | || }
| ||_____________^
... |
2249 | | };
2250 | | }
| |__- in this expansion of `impl_eq!`
...
2253 | impl_eq! { String, &'a str }
| ---------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/alloc/src/string.rs:2245:13
|
2222 | / macro_rules! impl_eq {
2223 | | ($lhs:ty, $rhs: ty) => {
2224 | | #[stable(feature = "rust1", since = "1.0.0")]
2225 | | #[allow(unused_lifetimes)]
... |
2245 | |/ fn ne(&self, other: &$lhs) -> bool {
2246 | || PartialEq::ne(&self[..], &other[..])
2247 | || }
| ||_____________^
2248 | | }
2249 | | };
2250 | | }
| |__- in this expansion of `impl_eq!`
...
2253 | impl_eq! { String, &'a str }
| ---------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/alloc/src/string.rs:2232:13
|
2222 | / macro_rules! impl_eq {
2223 | | ($lhs:ty, $rhs: ty) => {
2224 | | #[stable(feature = "rust1", since = "1.0.0")]
2225 | | #[allow(unused_lifetimes)]
... |
2232 | |/ fn ne(&self, other: &$rhs) -> bool {
2233 | || PartialEq::ne(&self[..], &other[..])
2234 | || }
| ||_____________^
... |
2249 | | };
2250 | | }
| |__- in this expansion of `impl_eq!`
...
2255 | impl_eq! { Cow<'a, str>, str }
| ------------------------------ in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/alloc/src/string.rs:2245:13
|
2222 | / macro_rules! impl_eq {
2223 | | ($lhs:ty, $rhs: ty) => {
2224 | | #[stable(feature = "rust1", since = "1.0.0")]
2225 | | #[allow(unused_lifetimes)]
... |
2245 | |/ fn ne(&self, other: &$lhs) -> bool {
2246 | || PartialEq::ne(&self[..], &other[..])
2247 | || }
| ||_____________^
2248 | | }
2249 | | };
2250 | | }
| |__- in this expansion of `impl_eq!`
...
2255 | impl_eq! { Cow<'a, str>, str }
| ------------------------------ in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/alloc/src/string.rs:2232:13
|
2222 | / macro_rules! impl_eq {
2223 | | ($lhs:ty, $rhs: ty) => {
2224 | | #[stable(feature = "rust1", since = "1.0.0")]
2225 | | #[allow(unused_lifetimes)]
... |
2232 | |/ fn ne(&self, other: &$rhs) -> bool {
2233 | || PartialEq::ne(&self[..], &other[..])
2234 | || }
| ||_____________^
... |
2249 | | };
2250 | | }
| |__- in this expansion of `impl_eq!`
...
2257 | impl_eq! { Cow<'a, str>, &'b str }
| ---------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/alloc/src/string.rs:2245:13
|
2222 | / macro_rules! impl_eq {
2223 | | ($lhs:ty, $rhs: ty) => {
2224 | | #[stable(feature = "rust1", since = "1.0.0")]
2225 | | #[allow(unused_lifetimes)]
... |
2245 | |/ fn ne(&self, other: &$lhs) -> bool {
2246 | || PartialEq::ne(&self[..], &other[..])
2247 | || }
| ||_____________^
2248 | | }
2249 | | };
2250 | | }
| |__- in this expansion of `impl_eq!`
...
2257 | impl_eq! { Cow<'a, str>, &'b str }
| ---------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/alloc/src/string.rs:2232:13
|
2222 | / macro_rules! impl_eq {
2223 | | ($lhs:ty, $rhs: ty) => {
2224 | | #[stable(feature = "rust1", since = "1.0.0")]
2225 | | #[allow(unused_lifetimes)]
... |
2232 | |/ fn ne(&self, other: &$rhs) -> bool {
2233 | || PartialEq::ne(&self[..], &other[..])
2234 | || }
| ||_____________^
... |
2249 | | };
2250 | | }
| |__- in this expansion of `impl_eq!`
...
2259 | impl_eq! { Cow<'a, str>, String }
| --------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/alloc/src/string.rs:2245:13
|
2222 | / macro_rules! impl_eq {
2223 | | ($lhs:ty, $rhs: ty) => {
2224 | | #[stable(feature = "rust1", since = "1.0.0")]
2225 | | #[allow(unused_lifetimes)]
... |
2245 | |/ fn ne(&self, other: &$lhs) -> bool {
2246 | || PartialEq::ne(&self[..], &other[..])
2247 | || }
| ||_____________^
2248 | | }
2249 | | };
2250 | | }
| |__- in this expansion of `impl_eq!`
...
2259 | impl_eq! { Cow<'a, str>, String }
| --------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: deref which would be done by auto-deref
--> library/alloc/src/string.rs:2436:47
|
2436 | unsafe { str::from_utf8_unchecked_mut(&mut *self.vec) }
| ^^^^^^^^^^^^^^ help: try this: `&mut self.vec`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: deref which would be done by auto-deref
--> library/alloc/src/string.rs:2468:47
|
2468 | unsafe { str::from_utf8_unchecked_mut(&mut *self.vec) }
| ^^^^^^^^^^^^^^ help: try this: `&mut self.vec`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/alloc/src/sync.rs:2334:5
|
2334 | / fn ne(&self, other: &Arc<T>) -> bool {
2335 | | ArcEqIdent::ne(self, other)
2336 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: deref which would be done by auto-deref
--> library/alloc/src/sync.rs:2765:9
|
2765 | &**self
| ^^^^^^^ help: try this: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: deref which would be done by auto-deref
--> library/alloc/src/sync.rs:2772:9
|
2772 | &**self
| ^^^^^^^ help: try this: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: the method `iter` doesn't need a mutable reference
--> library/alloc/src/vec/drain.rs:200:49
|
200 | let iter = mem::replace(&mut self.iter, (&mut []).iter());
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
warning: this expression borrows a value the compiler would automatically borrow
--> library/alloc/src/vec/drain.rs:200:49
|
200 | let iter = mem::replace(&mut self.iter, (&mut []).iter());
| ^^^^^^^^^ help: change this to: `[]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: unneeded `return` statement
--> library/alloc/src/vec/into_iter.rs:271:9
|
271 | / return unsafe {
272 | | ptr::copy_nonoverlapping(self.ptr, raw_ary.as_mut_ptr() as *mut T, N);
273 | | self.ptr = self.ptr.add(N);
274 | | Ok(raw_ary.transpose().assume_init())
275 | | };
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
= help: remove `return`
warning: equality checks against false can be replaced by a negation
--> library/alloc/src/vec/is_zero.rs:36:25
|
36 | impl_is_zero!(bool, |x| x == false);
| ^^^^^^^^^^ help: try simplifying it as shown: `!x`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison
= note: `#[warn(clippy::bool_comparison)]` on by default
warning: returning the result of a `let` binding from a block
--> library/alloc/src/vec/in_place_collect.rs:211:9
|
209 | let vec = unsafe { Vec::from_raw_parts(dst_buf, len, cap) };
| ------------------------------------------------------------ unnecessary `let` binding
210 |
211 | vec
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
= note: `#[warn(clippy::let_and_return)]` on by default
help: return the expression directly
|
209 ~
210 |
211 ~ unsafe { Vec::from_raw_parts(dst_buf, len, cap) }
|
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/alloc/src/vec/partial_eq.rs:18:13
|
7 | / macro_rules! __impl_slice_eq1 {
8 | | ([$($vars:tt)*] $lhs:ty, $rhs:ty $(where $ty:ty: $bound:ident)?, #[$stability:meta]) => {
9 | | #[$stability]
10 | | impl<T, U, $($vars)*> PartialEq<$rhs> for $lhs
... |
18 | | fn ne(&self, other: &$rhs) -> bool { self[..] != other[..] }
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19 | | }
20 | | }
21 | | }
| |_- in this expansion of `__impl_slice_eq1!`
22 |
23 | __impl_slice_eq1! { [A1: Allocator, A2: Allocator] Vec<T, A1>, Vec<U, A2>, #[stable(feature = "rust1", since = "1.0.0")] }
| -------------------------------------------------------------------------------------------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/alloc/src/vec/partial_eq.rs:18:13
|
7 | / macro_rules! __impl_slice_eq1 {
8 | | ([$($vars:tt)*] $lhs:ty, $rhs:ty $(where $ty:ty: $bound:ident)?, #[$stability:meta]) => {
9 | | #[$stability]
10 | | impl<T, U, $($vars)*> PartialEq<$rhs> for $lhs
... |
18 | | fn ne(&self, other: &$rhs) -> bool { self[..] != other[..] }
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19 | | }
20 | | }
21 | | }
| |_- in this expansion of `__impl_slice_eq1!`
...
24 | __impl_slice_eq1! { [A: Allocator] Vec<T, A>, &[U], #[stable(feature = "rust1", since = "1.0.0")] }
| --------------------------------------------------------------------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/alloc/src/vec/partial_eq.rs:18:13
|
7 | / macro_rules! __impl_slice_eq1 {
8 | | ([$($vars:tt)*] $lhs:ty, $rhs:ty $(where $ty:ty: $bound:ident)?, #[$stability:meta]) => {
9 | | #[$stability]
10 | | impl<T, U, $($vars)*> PartialEq<$rhs> for $lhs
... |
18 | | fn ne(&self, other: &$rhs) -> bool { self[..] != other[..] }
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19 | | }
20 | | }
21 | | }
| |_- in this expansion of `__impl_slice_eq1!`
...
25 | __impl_slice_eq1! { [A: Allocator] Vec<T, A>, &mut [U], #[stable(feature = "rust1", since = "1.0.0")] }
| ------------------------------------------------------------------------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/alloc/src/vec/partial_eq.rs:18:13
|
7 | / macro_rules! __impl_slice_eq1 {
8 | | ([$($vars:tt)*] $lhs:ty, $rhs:ty $(where $ty:ty: $bound:ident)?, #[$stability:meta]) => {
9 | | #[$stability]
10 | | impl<T, U, $($vars)*> PartialEq<$rhs> for $lhs
... |
18 | | fn ne(&self, other: &$rhs) -> bool { self[..] != other[..] }
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19 | | }
20 | | }
21 | | }
| |_- in this expansion of `__impl_slice_eq1!`
...
26 | __impl_slice_eq1! { [A: Allocator] &[T], Vec<U, A>, #[stable(feature = "partialeq_vec_for_ref_slice", since = "1.46.0")] }
| -------------------------------------------------------------------------------------------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/alloc/src/vec/partial_eq.rs:18:13
|
7 | / macro_rules! __impl_slice_eq1 {
8 | | ([$($vars:tt)*] $lhs:ty, $rhs:ty $(where $ty:ty: $bound:ident)?, #[$stability:meta]) => {
9 | | #[$stability]
10 | | impl<T, U, $($vars)*> PartialEq<$rhs> for $lhs
... |
18 | | fn ne(&self, other: &$rhs) -> bool { self[..] != other[..] }
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19 | | }
20 | | }
21 | | }
| |_- in this expansion of `__impl_slice_eq1!`
...
27 | __impl_slice_eq1! { [A: Allocator] &mut [T], Vec<U, A>, #[stable(feature = "partialeq_vec_for_ref_slice", since = "1.46.0")] }
| ------------------------------------------------------------------------------------------------------------------------------ in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/alloc/src/vec/partial_eq.rs:18:13
|
7 | / macro_rules! __impl_slice_eq1 {
8 | | ([$($vars:tt)*] $lhs:ty, $rhs:ty $(where $ty:ty: $bound:ident)?, #[$stability:meta]) => {
9 | | #[$stability]
10 | | impl<T, U, $($vars)*> PartialEq<$rhs> for $lhs
... |
18 | | fn ne(&self, other: &$rhs) -> bool { self[..] != other[..] }
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19 | | }
20 | | }
21 | | }
| |_- in this expansion of `__impl_slice_eq1!`
...
28 | __impl_slice_eq1! { [A: Allocator] Vec<T, A>, [U], #[stable(feature = "partialeq_vec_for_slice", since = "1.48.0")] }
| ---------------------------------------------------------------------------------------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/alloc/src/vec/partial_eq.rs:18:13
|
7 | / macro_rules! __impl_slice_eq1 {
8 | | ([$($vars:tt)*] $lhs:ty, $rhs:ty $(where $ty:ty: $bound:ident)?, #[$stability:meta]) => {
9 | | #[$stability]
10 | | impl<T, U, $($vars)*> PartialEq<$rhs> for $lhs
... |
18 | | fn ne(&self, other: &$rhs) -> bool { self[..] != other[..] }
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19 | | }
20 | | }
21 | | }
| |_- in this expansion of `__impl_slice_eq1!`
...
29 | __impl_slice_eq1! { [A: Allocator] [T], Vec<U, A>, #[stable(feature = "partialeq_vec_for_slice", since = "1.48.0")] }
| ---------------------------------------------------------------------------------------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/alloc/src/vec/partial_eq.rs:18:13
|
7 | / macro_rules! __impl_slice_eq1 {
8 | | ([$($vars:tt)*] $lhs:ty, $rhs:ty $(where $ty:ty: $bound:ident)?, #[$stability:meta]) => {
9 | | #[$stability]
10 | | impl<T, U, $($vars)*> PartialEq<$rhs> for $lhs
... |
18 | | fn ne(&self, other: &$rhs) -> bool { self[..] != other[..] }
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19 | | }
20 | | }
21 | | }
| |_- in this expansion of `__impl_slice_eq1!`
...
31 | __impl_slice_eq1! { [A: Allocator] Cow<'_, [T]>, Vec<U, A> where T: Clone, #[stable(feature = "rust1", since = "1.0.0")] }
| -------------------------------------------------------------------------------------------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/alloc/src/vec/partial_eq.rs:18:13
|
7 | / macro_rules! __impl_slice_eq1 {
8 | | ([$($vars:tt)*] $lhs:ty, $rhs:ty $(where $ty:ty: $bound:ident)?, #[$stability:meta]) => {
9 | | #[$stability]
10 | | impl<T, U, $($vars)*> PartialEq<$rhs> for $lhs
... |
18 | | fn ne(&self, other: &$rhs) -> bool { self[..] != other[..] }
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19 | | }
20 | | }
21 | | }
| |_- in this expansion of `__impl_slice_eq1!`
...
33 | __impl_slice_eq1! { [] Cow<'_, [T]>, &[U] where T: Clone, #[stable(feature = "rust1", since = "1.0.0")] }
| --------------------------------------------------------------------------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/alloc/src/vec/partial_eq.rs:18:13
|
7 | / macro_rules! __impl_slice_eq1 {
8 | | ([$($vars:tt)*] $lhs:ty, $rhs:ty $(where $ty:ty: $bound:ident)?, #[$stability:meta]) => {
9 | | #[$stability]
10 | | impl<T, U, $($vars)*> PartialEq<$rhs> for $lhs
... |
18 | | fn ne(&self, other: &$rhs) -> bool { self[..] != other[..] }
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19 | | }
20 | | }
21 | | }
| |_- in this expansion of `__impl_slice_eq1!`
...
35 | __impl_slice_eq1! { [] Cow<'_, [T]>, &mut [U] where T: Clone, #[stable(feature = "rust1", since = "1.0.0")] }
| ------------------------------------------------------------------------------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/alloc/src/vec/partial_eq.rs:18:13
|
7 | / macro_rules! __impl_slice_eq1 {
8 | | ([$($vars:tt)*] $lhs:ty, $rhs:ty $(where $ty:ty: $bound:ident)?, #[$stability:meta]) => {
9 | | #[$stability]
10 | | impl<T, U, $($vars)*> PartialEq<$rhs> for $lhs
... |
18 | | fn ne(&self, other: &$rhs) -> bool { self[..] != other[..] }
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19 | | }
20 | | }
21 | | }
| |_- in this expansion of `__impl_slice_eq1!`
...
36 | __impl_slice_eq1! { [A: Allocator, const N: usize] Vec<T, A>, [U; N], #[stable(feature = "rust1", since = "1.0.0")] }
| --------------------------------------------------------------------------------------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: re-implementing `PartialEq::ne` is unnecessary
--> library/alloc/src/vec/partial_eq.rs:18:13
|
7 | / macro_rules! __impl_slice_eq1 {
8 | | ([$($vars:tt)*] $lhs:ty, $rhs:ty $(where $ty:ty: $bound:ident)?, #[$stability:meta]) => {
9 | | #[$stability]
10 | | impl<T, U, $($vars)*> PartialEq<$rhs> for $lhs
... |
18 | | fn ne(&self, other: &$rhs) -> bool { self[..] != other[..] }
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19 | | }
20 | | }
21 | | }
| |_- in this expansion of `__impl_slice_eq1!`
...
37 | __impl_slice_eq1! { [A: Allocator, const N: usize] Vec<T, A>, &[U; N], #[stable(feature = "rust1", since = "1.0.0")] }
| ---------------------------------------------------------------------------------------------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_ne_impl
warning: needless `fn main` in doctest
--> library/alloc/src/vec/mod.rs:564:8
|
564 | /// #![feature(allocator_api)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: needless `fn main` in doctest
--> library/alloc/src/vec/mod.rs:760:8
|
760 | /// use std::alloc::{alloc, Layout};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: `if` chain can be rewritten with `match`
--> library/alloc/src/vec/mod.rs:1461:17
|
1461 | / if index < len {
1462 | | // Shift everything over to make space. (Duplicating the
1463 | | // `index`th element into two consecutive places.)
1464 | | ptr::copy(p, p.add(1), len - index);
... |
1468 | | assert_failed(index, len);
1469 | | }
| |_________________^
|
= help: consider rewriting the `if` chain to use `cmp` and `match`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_chain
warning: deref which would be done by auto-deref
--> library/alloc/src/vec/mod.rs:2679:26
|
2679 | <[T]>::to_vec_in(&**self, alloc)
| ^^^^^^^ help: try this: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: `alloc` (lib) generated 86 warnings (run `cargo fix --lib -p alloc` to apply 42 suggestions)
Checking rustc-std-workspace-alloc v1.99.0 (/home/gh-jyn514/rust3/library/rustc-std-workspace-alloc)
Checking panic_unwind v0.0.0 (/home/gh-jyn514/rust3/library/panic_unwind)
Checking panic_abort v0.0.0 (/home/gh-jyn514/rust3/library/panic_abort)
warning: digits of hex or binary literal not grouped by four
--> library/panic_unwind/src/gcc.rs:112:5
|
112 | 0x4d4f5a_00_52555354
| ^^^^^^^^^^^^^^^^^^^^ help: consider: `0x4d4f_5a00_5255_5354`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings
= note: `#[warn(clippy::unusual_byte_groupings)]` on by default
Checking gimli v0.26.1
Checking hashbrown v0.12.3
Checking object v0.29.0
Checking miniz_oxide v0.5.3
Checking std_detect v0.1.5 (/home/gh-jyn514/rust3/library/stdarch/crates/std_detect)
warning: `panic_unwind` (lib) generated 1 warning (run `cargo fix --lib -p panic_unwind` to apply 1 suggestion)
Checking addr2line v0.17.0
warning: unnecessary `>= y + 1` or `x - 1 >=`
--> library/std/src/io/error/repr_bitpacked.rs:374:16
|
374 | static_assert!(align_of::<SimpleMessage>() >= TAG_MASK + 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `align_of::<SimpleMessage>() > TAG_MASK`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one
= note: `#[warn(clippy::int_plus_one)]` on by default
warning: unnecessary `>= y + 1` or `x - 1 >=`
--> library/std/src/io/error/repr_bitpacked.rs:375:16
|
375 | static_assert!(align_of::<Custom>() >= TAG_MASK + 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `align_of::<Custom>() > TAG_MASK`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one
warning: the `sep @ _` pattern can be written as just `sep`
--> library/std/src/path.rs:3040:32
|
3040 | [b'.', sep @ _, ..] if is_sep_byte(*sep) => 1,
| ^^^^^^^ help: try: `sep`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern
= note: `#[warn(clippy::redundant_pattern)]` on by default
warning: this `if` has identical blocks
--> library/std/src/f64.rs:949:33
|
949 | } else if self.is_nan() {
| _________________________________^
950 | | self // log(NaN) = NaN
951 | | } else if self > 0.0 {
| |_________^
|
note: same as this
--> library/std/src/f64.rs:951:30
|
951 | } else if self > 0.0 {
| ______________________________^
952 | | self // log(Inf) = Inf
953 | | } else {
| |_________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
= note: `#[warn(clippy::if_same_then_else)]` on by default
warning: redundant pattern matching, consider using `is_err()`
--> library/std/src/thread/local.rs:1033:16
|
1033 | if let Err(_) = panic::catch_unwind(panic::AssertUnwindSafe(|| unsafe {
| ^^^^^^
|
= note: this will change drop order of the result, as well as all temporaries
= note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
= note: `#[warn(clippy::redundant_pattern_matching)]` on by default
help: try this
|
1033 ~ if panic::catch_unwind(panic::AssertUnwindSafe(|| unsafe {
1034 + let value = (*ptr).inner.take();
1035 + (*ptr).dtor_state.set(DtorState::RunningOrHasRun);
1036 + drop(value);
1037 ~ })).is_err() {
|
warning: you should consider adding a `Default` implementation for `Builder`
--> library/std/src/thread/mod.rs:311:5
|
311 | / pub fn new() -> Builder {
312 | | Builder { name: None, stack_size: None }
313 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
291 + impl Default for Builder {
292 + fn default() -> Self {
293 + Self::new()
294 + }
295 + }
|
warning: redundant pattern matching, consider using `is_err()`
--> library/std/src/thread/mod.rs:1424:16
|
1424 | if let Err(_) = panic::catch_unwind(panic::AssertUnwindSafe(|| {
| ^^^^^^
|
= note: this will change drop order of the result, as well as all temporaries
= note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
help: try this
|
1424 ~ if panic::catch_unwind(panic::AssertUnwindSafe(|| {
1425 + *self.result.get_mut() = None;
1426 ~ })).is_err() {
|
warning: variables can be used directly in the `format!` string
--> library/std/src/backtrace.rs:221:13
|
221 | write!(fmt, "fn: \"{:#}\"", fn_name)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
help: change this to
|
221 - write!(fmt, "fn: \"{:#}\"", fn_name)?;
221 + write!(fmt, "fn: \"{fn_name:#}\"")?;
|
warning: variables can be used directly in the `format!` string
--> library/std/src/backtrace.rs:227:13
|
227 | write!(fmt, ", file: \"{:?}\"", fname)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
227 - write!(fmt, ", file: \"{:?}\"", fname)?;
227 + write!(fmt, ", file: \"{fname:?}\"")?;
|
warning: variables can be used directly in the `format!` string
--> library/std/src/backtrace.rs:231:13
|
231 | write!(fmt, ", line: {:?}", line)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
231 - write!(fmt, ", line: {:?}", line)?;
231 + write!(fmt, ", line: {line:?}")?;
|
warning: you seem to be trying to use `match` to destructure a single infallible pattern. Consider using `let`
--> library/std/src/backtrace.rs:474:13
|
474 | / let frame = match &frame.frame {
475 | | RawFrame::Actual(frame) => frame,
476 | | #[cfg(test)]
477 | | RawFrame::Fake => unimplemented!(),
478 | | };
| |______________^ help: try this: `let RawFrame::Actual(frame) = &frame.frame;`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#infallible_destructuring_match
= note: `#[warn(clippy::infallible_destructuring_match)]` on by default
warning: variables can be used directly in the `format!` string
--> library/std/src/env.rs:301:17
|
301 | write!(f, "environment variable was not valid unicode: {:?}", s)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
301 - write!(f, "environment variable was not valid unicode: {:?}", s)
301 + write!(f, "environment variable was not valid unicode: {s:?}")
|
warning: needless `fn main` in doctest
--> library/std/src/env.rs:625:4
|
625 | /// use std::env;
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
= note: `#[warn(clippy::needless_doctest_main)]` on by default
warning: returning the result of a `let` binding from a block
--> library/std/src/error.rs:468:9
|
462 | / let backtrace = backtrace.or_else(|| {
463 | | self.error
464 | | .source()
465 | | .map(|source| source.sources().find_map(|source| source.request_ref()))
466 | | .flatten()
467 | | });
| |___________- unnecessary `let` binding
468 | backtrace
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
= note: `#[warn(clippy::let_and_return)]` on by default
help: return the expression directly
|
462 ~
463 ~ backtrace.or_else(|| {
464 + self.error
465 + .source()
466 + .map(|source| source.sources().find_map(|source| source.request_ref()))
467 + .flatten()
468 + })
|
warning: called `map(..).flatten()` on `Option`
--> library/std/src/error.rs:465:18
|
465 | .map(|source| source.sources().find_map(|source| source.request_ref()))
| __________________^
466 | | .flatten()
| |__________________________^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|source| source.sources().find_map(|source| source.request_ref()))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
= note: `#[warn(clippy::map_flatten)]` on by default
warning: needlessly taken reference of both operands
--> library/std/src/ffi/os_str.rs:560:9
|
560 | &**self == &**other
| ^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
= note: `#[warn(clippy::op_ref)]` on by default
help: use the values directly
|
560 | **self == **other
| ~~~~~~ ~~~~~~~
warning: this expression borrows a value the compiler would automatically borrow
--> library/std/src/ffi/os_str.rs:603:9
|
603 | (&**self).partial_cmp(&**other)
| ^^^^^^^^^ help: change this to: `(**self)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
warning: needlessly taken reference of both operands
--> library/std/src/ffi/os_str.rs:607:9
|
607 | &**self < &**other
| ^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
help: use the values directly
|
607 | **self < **other
| ~~~~~~ ~~~~~~~
warning: needlessly taken reference of both operands
--> library/std/src/ffi/os_str.rs:611:9
|
611 | &**self <= &**other
| ^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
help: use the values directly
|
611 | **self <= **other
| ~~~~~~ ~~~~~~~
warning: needlessly taken reference of both operands
--> library/std/src/ffi/os_str.rs:615:9
|
615 | &**self > &**other
| ^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
help: use the values directly
|
615 | **self > **other
| ~~~~~~ ~~~~~~~
warning: needlessly taken reference of both operands
--> library/std/src/ffi/os_str.rs:619:9
|
619 | &**self >= &**other
| ^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
help: use the values directly
|
619 | **self >= **other
| ~~~~~~ ~~~~~~~
warning: this expression borrows a value the compiler would automatically borrow
--> library/std/src/ffi/os_str.rs:627:9
|
627 | (&**self).partial_cmp(other)
| ^^^^^^^^^ help: change this to: `(**self)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression borrows a value the compiler would automatically borrow
--> library/std/src/ffi/os_str.rs:635:9
|
635 | (&**self).cmp(&**other)
| ^^^^^^^^^ help: change this to: `(**self)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression borrows a value the compiler would automatically borrow
--> library/std/src/ffi/os_str.rs:643:9
|
643 | (&**self).hash(state)
| ^^^^^^^^^ help: change this to: `(**self)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression borrows a value the compiler would automatically borrow
--> library/std/src/ffi/os_str.rs:1330:9
|
1330 | (&**self).as_ref()
| ^^^^^^^^^ help: change this to: `(**self)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: you should consider adding a `Default` implementation for `OpenOptions`
--> library/std/src/fs.rs:854:5
|
854 | / pub fn new() -> Self {
855 | | OpenOptions(fs_imp::OpenOptions::new())
856 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
839 + impl Default for OpenOptions {
840 + fn default() -> Self {
841 + Self::new()
842 + }
843 + }
|
warning: struct `Metadata` has a public `len` method, but no `is_empty` method
--> library/std/src/fs.rs:1192:5
|
1192 | pub fn len(&self) -> u64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty
= note: `#[warn(clippy::len_without_is_empty)]` on by default
warning: you should consider adding a `Default` implementation for `DirBuilder`
--> library/std/src/fs.rs:2404:5
|
2404 | / pub fn new() -> DirBuilder {
2405 | | DirBuilder { inner: fs_imp::DirBuilder::new(), recursive: false }
2406 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
2391 + impl Default for DirBuilder {
2392 + fn default() -> Self {
2393 + Self::new()
2394 + }
2395 + }
|
warning: redundant pattern matching, consider using `is_some()`
--> library/std/src/io/buffered/bufreader.rs:244:20
|
244 | if let Some(_) = pos.checked_sub((-offset) as u64) {
| -------^^^^^^^------------------------------------ help: try this: `if pos.checked_sub((-offset) as u64).is_some()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
warning: the function `ptr::read` doesn't need a mutable reference
--> library/std/src/io/buffered/bufwriter.rs:342:40
|
342 | let inner = unsafe { ptr::read(&mut self.inner) };
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
= note: `#[warn(clippy::unnecessary_mut_passed)]` on by default
warning: variables can be used directly in the `format!` string
--> library/std/src/io/error/repr_bitpacked.rs:195:9
|
195 | / debug_assert!(
196 | | matches!(res.data(), ErrorData::Simple(k) if k == kind),
197 | | "repr(simple) encoding failed {:?}",
198 | | kind,
199 | | );
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
warning: variables can be used directly in the `format!` string
--> library/std/src/io/error/repr_bitpacked.rs:259:17
|
259 | debug_assert!(false, "Invalid io::error::Repr bits: `Repr({:#018x})`", bits);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
259 - debug_assert!(false, "Invalid io::error::Repr bits: `Repr({:#018x})`", bits);
259 + debug_assert!(false, "Invalid io::error::Repr bits: `Repr({bits:#018x})`");
|
warning: casting to the same type is unnecessary (`i32` -> `i32`)
--> library/std/src/io/error.rs:582:34
|
582 | Error::from_raw_os_error(sys::os::errno() as i32)
| ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `sys::os::errno()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default
warning: deref which would be done by auto-deref
--> library/std/src/io/error.rs:858:27
|
858 | let res = (*b).error.downcast::<E>();
| ^^^^ help: try this: `b`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
= note: `#[warn(clippy::explicit_auto_deref)]` on by default
warning: this pattern creates a reference to a reference
--> library/std/src/io/error.rs:931:31
|
931 | ErrorData::Custom(ref c) => c.error.fmt(fmt),
| ^^^^^ help: try this: `c`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: deref which would be done by auto-deref
--> library/std/src/io/impls.rs:305:31
|
305 | buf.extend_from_slice(*self);
| ^^^^^ help: try this: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
--> library/std/src/io/impls.rs:339:22
|
339 | let (a, b) = mem::replace(self, &mut []).split_at_mut(amt);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(self)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default
= note: `#[warn(clippy::mem_replace_with_default)]` on by default
warning: struct `BorrowedBuf` has a public `len` method, but no `is_empty` method
--> library/std/src/io/readbuf.rs:85:5
|
85 | pub fn len(&self) -> usize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty
warning: deref on an immutable reference
--> library/std/src/io/stdio.rs:677:39
|
677 | io::Write::is_write_vectored(&&*self)
| ^^^^^^ help: if you would like to reborrow, try removing `&*`: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref
= note: `#[warn(clippy::borrow_deref_ref)]` on by default
warning: deref on an immutable reference
--> library/std/src/io/stdio.rs:896:39
|
896 | io::Write::is_write_vectored(&&*self)
| ^^^^^^ help: if you would like to reborrow, try removing `&*`: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
--> library/std/src/io/mod.rs:1173:22
|
1173 | *bufs = &mut replace(bufs, &mut [])[remove..];
| ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(bufs)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
--> library/std/src/io/mod.rs:1316:22
|
1316 | *bufs = &mut replace(bufs, &mut [])[remove..];
| ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(bufs)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default
warning: using `SeekFrom::Current` to start from current position
--> library/std/src/io/mod.rs:1877:9
|
1877 | self.seek(SeekFrom::Current(0))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `self.stream_position()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#seek_from_current
= note: `#[warn(clippy::seek_from_current)]` on by default
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> library/std/src/io/mod.rs:2605:39
|
2605 | let extra_init = cmp::min(limit as usize, buf.init_ref().len());
| ^^^^^^^^^^^^^^ help: try: `limit`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: variables can be used directly in the `format!` string
--> library/std/src/net/ip_addr.rs:1796:26
|
1796 | 0 => write!(f, "::{}", ipv4),
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
1796 - 0 => write!(f, "::{}", ipv4),
1796 + 0 => write!(f, "::{ipv4}"),
|
warning: variables can be used directly in the `format!` string
--> library/std/src/net/ip_addr.rs:1798:31
|
1798 | 0xffff => write!(f, "::ffff:{}", ipv4),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
1798 - 0xffff => write!(f, "::ffff:{}", ipv4),
1798 + 0xffff => write!(f, "::ffff:{ipv4}"),
|
warning: variables can be used directly in the `format!` string
--> library/std/src/net/ip_addr.rs:1836:25
|
1836 | write!(f, "{:x}", first)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
1836 - write!(f, "{:x}", first)?;
1836 + write!(f, "{first:x}")?;
|
warning: variables can be used directly in the `format!` string
--> library/std/src/net/ip_addr.rs:1839:29
|
1839 | ... write!(f, "{:x}", segment)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
1839 - write!(f, "{:x}", segment)?;
1839 + write!(f, "{segment:x}")?;
|
warning: variables can be used directly in the `format!` string
--> library/std/src/net/ip_addr.rs:1858:13
|
1858 | write!(buf, "{}", self).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
1858 - write!(buf, "{}", self).unwrap();
1858 + write!(buf, "{self}").unwrap();
|
warning: this `if` has identical blocks
--> library/std/src/net/parser.rs:131:33
|
131 | if digit_count == 0 {
| _________________________________^
132 | | None
133 | | } else if !allow_zero_prefix && has_leading_zero && digit_count > 1 {
| |_____________^
|
note: same as this
--> library/std/src/net/parser.rs:133:81
|
133 | } else if !allow_zero_prefix && has_leading_zero && digit_count > 1 {
| _________________________________________________________________________________^
134 | | None
135 | | } else {
| |_____________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
warning: this operation has no effect
--> library/std/src/net/parser.rs:176:32
|
176 | groups[i + 0] = u16::from_be_bytes([one, two]);
| ^^^^^ help: consider reducing it to: `i`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op
= note: `#[warn(clippy::identity_op)]` on by default
warning: struct update has no effect, all the fields in the struct have already been specified
--> library/std/src/net/socket_addr.rs:567:15
|
567 | ..unsafe { mem::zeroed() }
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update
= note: `#[warn(clippy::needless_update)]` on by default
warning: you are implementing `Hash` explicitly but have derived `PartialEq`
--> library/std/src/net/socket_addr.rs:707:1
|
707 | / impl hash::Hash for SocketAddrV4 {
708 | | fn hash<H: hash::Hasher>(&self, s: &mut H) {
709 | | (self.port, self.ip).hash(s)
710 | | }
711 | | }
| |_^
|
note: `PartialEq` implemented here
--> library/std/src/net/socket_addr.rs:78:27
|
78 | #[derive(Copy, Clone, Eq, PartialEq)]
| ^^^^^^^^^ in this derive macro expansion
|
::: /home/gh-jyn514/rust3/library/core/src/cmp.rs:236:1
|
236 | pub macro PartialEq($item:item) {
| ------------------- in this expansion of `#[derive(PartialEq)]`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_hash_xor_eq
= note: `#[warn(clippy::derive_hash_xor_eq)]` on by default
warning: you are implementing `Hash` explicitly but have derived `PartialEq`
--> library/std/src/net/socket_addr.rs:713:1
|
713 | / impl hash::Hash for SocketAddrV6 {
714 | | fn hash<H: hash::Hasher>(&self, s: &mut H) {
715 | | (self.port, &self.ip, self.flowinfo, self.scope_id).hash(s)
716 | | }
717 | | }
| |_^
|
note: `PartialEq` implemented here
--> library/std/src/net/socket_addr.rs:111:27
|
111 | #[derive(Copy, Clone, Eq, PartialEq)]
| ^^^^^^^^^ in this derive macro expansion
|
::: /home/gh-jyn514/rust3/library/core/src/cmp.rs:236:1
|
236 | pub macro PartialEq($item:item) {
| ------------------- in this expansion of `#[derive(PartialEq)]`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_hash_xor_eq
warning: this expression borrows a value the compiler would automatically borrow
--> library/std/src/net/socket_addr.rs:972:9
|
972 | (&**self).to_socket_addrs()
| ^^^^^^^^^ help: change this to: `(**self)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: accessing first element with `bytes.get(0)`
--> library/std/src/os/unix/net/addr.rs:57:11
|
57 | match bytes.get(0) {
| ^^^^^^^^^^^^ help: try: `bytes.first()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
= note: `#[warn(clippy::get_first)]` on by default
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> library/std/src/os/unix/net/ancillary.rs:45:28
|
45 | ancillary.length = msg.msg_controllen as usize;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `msg.msg_controllen`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: you should consider adding a `Default` implementation for `SocketCred`
--> library/std/src/os/unix/net/ancillary.rs:205:5
|
205 | / pub fn new() -> SocketCred {
206 | | SocketCred(libc::ucred { pid: 0, uid: 0, gid: 0 })
207 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
199 + impl Default for SocketCred {
200 + fn default() -> Self {
201 + Self::new()
202 + }
203 + }
|
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> library/std/src/os/unix/net/ancillary.rs:389:28
|
389 | let data_len = (*cmsg).cmsg_len as usize - cmsg_len_zero;
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(*cmsg).cmsg_len`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: deref which would be done by auto-deref
--> library/std/src/os/unix/net/ancillary.rs:389:28
|
389 | let data_len = (*cmsg).cmsg_len as usize - cmsg_len_zero;
| ^^^^^^^ help: try this: `cmsg`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: deref which would be done by auto-deref
--> library/std/src/os/unix/net/ancillary.rs:393:19
|
393 | match (*cmsg).cmsg_level {
| ^^^^^^^ help: try this: `cmsg`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: deref which would be done by auto-deref
--> library/std/src/os/unix/net/ancillary.rs:394:43
|
394 | libc::SOL_SOCKET => match (*cmsg).cmsg_type {
| ^^^^^^^ help: try this: `cmsg`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: deref which would be done by auto-deref
--> library/std/src/os/unix/net/ancillary.rs:405:74
|
405 | Err(AncillaryError::Unknown { cmsg_level, cmsg_type: (*cmsg).cmsg_type })
| ^^^^^^^ help: try this: `cmsg`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/std/src/os/unix/net/ancillary.rs:596:13
|
596 | &mut self.buffer,
| ^^^^^^^^^^^^^^^^ help: change this to: `self.buffer`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/std/src/os/unix/net/ancillary.rs:616:13
|
616 | &mut self.buffer,
| ^^^^^^^^^^^^^^^^ help: change this to: `self.buffer`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: `if` chain can be rewritten with `match`
--> library/std/src/os/unix/net/datagram.rs:327:13
|
327 | / if count > 0 {
328 | | 1
329 | | } else if count == 0 {
330 | | 0
331 | | } else {
332 | | -1
333 | | }
| |_____________^
|
= help: consider rewriting the `if` chain to use `cmp` and `match`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_chain
= note: `#[warn(clippy::comparison_chain)]` on by default
warning: deref on an immutable reference
--> library/std/src/os/unix/net/stream.rs:630:37
|
630 | io::Read::is_read_vectored(&&*self)
| ^^^^^^ help: if you would like to reborrow, try removing `&*`: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref
warning: deref on an immutable reference
--> library/std/src/os/unix/net/stream.rs:662:39
|
662 | io::Write::is_write_vectored(&&*self)
| ^^^^^^ help: if you would like to reborrow, try removing `&*`: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref
warning: useless conversion to the same type: `i32`
--> library/std/src/os/unix/process.rs:312:9
|
312 | self.as_inner().into_raw().into()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `self.as_inner().into_raw()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
warning: casting to the same type is unnecessary (`u64` -> `u64`)
--> library/std/src/os/linux/fs.rs:335:9
|
335 | self.as_inner().as_inner().st_dev as u64
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.as_inner().as_inner().st_dev`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: casting to the same type is unnecessary (`u64` -> `u64`)
--> library/std/src/os/linux/fs.rs:338:9
|
338 | self.as_inner().as_inner().st_ino as u64
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.as_inner().as_inner().st_ino`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: casting to the same type is unnecessary (`u32` -> `u32`)
--> library/std/src/os/linux/fs.rs:341:9
|
341 | self.as_inner().as_inner().st_mode as u32
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.as_inner().as_inner().st_mode`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: casting to the same type is unnecessary (`u32` -> `u32`)
--> library/std/src/os/linux/fs.rs:347:9
|
347 | self.as_inner().as_inner().st_uid as u32
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.as_inner().as_inner().st_uid`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: casting to the same type is unnecessary (`u32` -> `u32`)
--> library/std/src/os/linux/fs.rs:350:9
|
350 | self.as_inner().as_inner().st_gid as u32
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.as_inner().as_inner().st_gid`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: casting to the same type is unnecessary (`u64` -> `u64`)
--> library/std/src/os/linux/fs.rs:353:9
|
353 | self.as_inner().as_inner().st_rdev as u64
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.as_inner().as_inner().st_rdev`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: casting to the same type is unnecessary (`i64` -> `i64`)
--> library/std/src/os/linux/fs.rs:364:9
|
364 | file_attr.as_inner().st_atime as i64
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `file_attr.as_inner().st_atime`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: casting to the same type is unnecessary (`i64` -> `i64`)
--> library/std/src/os/linux/fs.rs:367:9
|
367 | self.as_inner().as_inner().st_atime_nsec as i64
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.as_inner().as_inner().st_atime_nsec`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: casting to the same type is unnecessary (`i64` -> `i64`)
--> library/std/src/os/linux/fs.rs:375:9
|
375 | file_attr.as_inner().st_mtime as i64
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `file_attr.as_inner().st_mtime`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: casting to the same type is unnecessary (`i64` -> `i64`)
--> library/std/src/os/linux/fs.rs:378:9
|
378 | self.as_inner().as_inner().st_mtime_nsec as i64
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.as_inner().as_inner().st_mtime_nsec`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: casting to the same type is unnecessary (`i64` -> `i64`)
--> library/std/src/os/linux/fs.rs:386:9
|
386 | file_attr.as_inner().st_ctime as i64
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `file_attr.as_inner().st_ctime`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: casting to the same type is unnecessary (`i64` -> `i64`)
--> library/std/src/os/linux/fs.rs:389:9
|
389 | self.as_inner().as_inner().st_ctime_nsec as i64
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.as_inner().as_inner().st_ctime_nsec`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: useless conversion to the same type: `os::fd::owned::OwnedFd`
--> library/std/src/os/fd/owned.rs:310:9
|
310 | tcp_stream.into_inner().into_socket().into_inner().into_inner().into()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `tcp_stream.into_inner().into_socket().into_inner().into_inner()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
warning: useless conversion to the same type: `os::fd::owned::OwnedFd`
--> library/std/src/os/fd/owned.rs:336:9
|
336 | tcp_listener.into_inner().into_socket().into_inner().into_inner().into()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `tcp_listener.into_inner().into_socket().into_inner().into_inner()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
warning: useless conversion to the same type: `os::fd::owned::OwnedFd`
--> library/std/src/os/fd/owned.rs:362:9
|
362 | udp_socket.into_inner().into_socket().into_inner().into_inner().into()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `udp_socket.into_inner().into_socket().into_inner().into_inner()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/std/src/path.rs:2279:32
|
2279 | Ancestors { next: Some(&self) }
| ^^^^^ help: change this to: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`
--> library/std/src/path.rs:2477:9
|
2477 | self.file_name().map(split_file_at_dot).and_then(|(before, _after)| Some(before))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `self.file_name().map(split_file_at_dot).map(|(before, _after)| before)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
= note: `#[warn(clippy::bind_instead_of_map)]` on by default
warning: deref on an immutable reference
--> library/std/src/process.rs:279:39
|
279 | io::Write::is_write_vectored(&&*self)
| ^^^^^^ help: if you would like to reborrow, try removing `&*`: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> library/std/src/process.rs:1672:1
|
1672 | impl Into<ExitStatus> for ExitStatusError {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
= note: `#[warn(clippy::from_over_into)]` on by default
help: replace the `Into` implentation with `From<process::ExitStatusError>`
|
1672 ~ impl From<ExitStatusError> for ExitStatus {
1673 ~ fn from(val: ExitStatusError) -> Self {
1674 ~ ExitStatus(val.0.into())
|
warning: needless `fn main` in doctest
--> library/std/src/process.rs:2094:4
|
2094 | /// use std::process;
| ^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: needless `fn main` in doctest
--> library/std/src/process.rs:2109:4
|
2109 | /// use std::process;
| ^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> library/std/src/sync/mpmc/select.rs:61:1
|
61 | impl Into<usize> for Selected {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see
https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence
= help: replace the `Into` implentation with `From<sync::mpmc::select::Selected>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
warning: a `const` item should never be interior mutable
--> library/std/src/sync/once.rs:61:1
|
61 | pub const ONCE_INIT: Once = Once::new();
| -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| make this a static item (maybe with lazy_static)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const
= note: `#[warn(clippy::declare_interior_mutable_const)]` on by default
warning: the method `assume_init_read` doesn't need a mutable reference
--> library/std/src/sync/once_lock.rs:285:27
|
285 | unsafe { Some((&mut *self.value.get()).assume_init_read()) }
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
warning: this expression borrows a value the compiler would automatically borrow
--> library/std/src/sync/once_lock.rs:285:27
|
285 | unsafe { Some((&mut *self.value.get()).assume_init_read()) }
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(*self.value.get())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression borrows a value the compiler would automatically borrow
--> library/std/src/sync/once_lock.rs:309:30
|
309 | unsafe { (&mut *slot.get()).write(value) };
| ^^^^^^^^^^^^^^^^^^ help: change this to: `(*slot.get())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression borrows a value the compiler would automatically borrow
--> library/std/src/sync/once_lock.rs:329:9
|
329 | (&*self.value.get()).assume_init_ref()
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `(*self.value.get())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression borrows a value the compiler would automatically borrow
--> library/std/src/sync/once_lock.rs:338:9
|
338 | (&mut *self.value.get()).assume_init_mut()
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(*self.value.get())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: needless `fn main` in doctest
--> library/std/src/sync/once_lock.rs:365:8
|
365 | /// #![feature(once_cell)]
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: this expression borrows a value the compiler would automatically borrow
--> library/std/src/sync/once_lock.rs:452:22
|
452 | unsafe { (&mut *self.value.get()).assume_init_drop() };
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(*self.value.get())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: needless `fn main` in doctest
--> library/std/src/time.rs:73:4
|
73 | /// use std::time::{Duration, Instant};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: needless `fn main` in doctest
--> library/std/src/time.rs:182:4
|
182 | /// use std::time::{Duration, SystemTime};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: unchecked subtraction of a 'Duration' from an 'Instant'
--> library/std/src/time.rs:431:17
|
431 | *self = *self - other;
| ^^^^^^^^^^^^^ help: try: `*self.checked_sub(other).unwrap()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unchecked_duration_subtraction
= note: `#[warn(clippy::unchecked_duration_subtraction)]` on by default
warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead
--> library/std/src/sys/unix/weak.rs:34:13
|
32 | / pub(crate) macro weak {
33 | | (fn $name:ident($($t:ty),*) -> $ret:ty) => (
34 | | let ref $name: ExternWeak<unsafe extern "C" fn($($t),*) -> $ret> = {
| | ^^^^^^^^^
35 | | extern "C" {
... |
42 | | )
43 | | }
| |_- in this expansion of `weak!` (#2)
...
158 | / pub(crate) macro syscall {
159 | | (fn $name:ident($($arg_name:ident: $t:ty),*) -> $ret:ty) => (
160 | | unsafe fn $name($($arg_name:$t),*) -> $ret {
161 | | weak! { fn $name($($t),*) -> $ret }
| | ----------------------------------- in this macro invocation (#2)
... |
178 | | )
179 | | }
| |_- in this expansion of `syscall!` (#1)
|
::: library/std/src/sys/unix/fs.rs:158:9
|
158 | / syscall! {
159 | | fn statx(
160 | | fd: c_int,
161 | | pathname: *const c_char,
... |
165 | | ) -> c_int
166 | | }
| |_________- in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg
= note: `#[warn(clippy::toplevel_ref_arg)]` on by default
help: try
|
34 ~ let statx: &ExternWeak<unsafe extern "C" fn($($t),*) -> $ret> = &{
35 + extern "C" {
36 + #[linkage = "extern_weak"]
37 + static $name: Option<unsafe extern "C" fn($($t),*) -> $ret>;
38 + }
39 + #[allow(unused_unsafe)]
40 + ExternWeak::new(unsafe { $name })
41 + };
|
warning: casting to the same type is unnecessary (`i64` -> `i64`)
--> library/std/src/sys/unix/fs.rs:438:28
|
438 | Ok(SystemTime::new(self.stat.st_mtime as i64, self.stat.st_mtime_nsec as i64))
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.stat.st_mtime`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: casting to the same type is unnecessary (`i64` -> `i64`)
--> library/std/src/sys/unix/fs.rs:438:55
|
438 | Ok(SystemTime::new(self.stat.st_mtime as i64, self.stat.st_mtime_nsec as i64))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.stat.st_mtime_nsec`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: casting to the same type is unnecessary (`i64` -> `i64`)
--> library/std/src/sys/unix/fs.rs:460:28
|
460 | Ok(SystemTime::new(self.stat.st_atime as i64, self.stat.st_atime_nsec as i64))
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.stat.st_atime`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: casting to the same type is unnecessary (`i64` -> `i64`)
--> library/std/src/sys/unix/fs.rs:460:55
|
460 | Ok(SystemTime::new(self.stat.st_atime as i64, self.stat.st_atime_nsec as i64))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.stat.st_atime_nsec`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: casting to the same type is unnecessary (`u32` -> `u32`)
--> library/std/src/sys/unix/fs.rs:535:9
|
535 | self.mode as u32
| ^^^^^^^^^^^^^^^^ help: try: `self.mode`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: casting to the same type is unnecessary (`u64` -> `u64`)
--> library/std/src/sys/unix/fs.rs:674:28
|
674 | d_ino: *offset_ptr!(entry_ptr, d_ino) as u64,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*offset_ptr!(entry_ptr, d_ino)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: casting to the same type is unnecessary (`u8` -> `u8`)
--> library/std/src/sys/unix/fs.rs:676:29
|
676 | d_type: *offset_ptr!(entry_ptr, d_type) as u8,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*offset_ptr!(entry_ptr, d_type)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: casting to the same type is unnecessary (`u64` -> `u64`)
--> library/std/src/sys/unix/fs.rs:826:9
|
826 | self.entry.d_ino as u64
| ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.entry.d_ino`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: the borrowed expression implements the required traits
--> library/std/src/sys/unix/fs.rs:1257:20
|
1257 | p.push(&fd.to_string());
| ^^^^^^^^^^^^^^^ help: change this to: `fd.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/std/src/sys/unix/fs.rs:1859:59
|
1859 | let fd = match openat_nofollow_dironly(parent_fd, &path) {
| ^^^^^ help: change this to: `path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/std/src/sys/unix/fs.rs:1912:70
|
1912 | run_path_with_cstr(p, |p| remove_dir_all_recursive(None, &p))
| ^^ help: change this to: `p`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead
--> library/std/src/sys/unix/weak.rs:34:13
|
32 | / pub(crate) macro weak {
33 | | (fn $name:ident($($t:ty),*) -> $ret:ty) => (
34 | | let ref $name: ExternWeak<unsafe extern "C" fn($($t),*) -> $ret> = {
| | ^^^^^^^^^
35 | | extern "C" {
... |
42 | | )
43 | | }
| |_- in this expansion of `weak!` (#2)
...
158 | / pub(crate) macro syscall {
159 | | (fn $name:ident($($arg_name:ident: $t:ty),*) -> $ret:ty) => (
160 | | unsafe fn $name($($arg_name:$t),*) -> $ret {
161 | | weak! { fn $name($($t),*) -> $ret }
| | ----------------------------------- in this macro invocation (#2)
... |
178 | | )
179 | | }
| |_- in this expansion of `syscall!` (#1)
|
::: library/std/src/sys/unix/kernel_copy.rs:523:5
|
523 | / syscall! {
524 | | fn copy_file_range(
525 | | fd_in: libc::c_int,
526 | | off_in: *mut libc::loff_t,
... |
531 | | ) -> libc::ssize_t
532 | | }
| |_____- in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg
help: try
|
34 ~ let copy_file_range: &ExternWeak<unsafe extern "C" fn($($t),*) -> $ret> = &{
35 + extern "C" {
36 + #[linkage = "extern_weak"]
37 + static $name: Option<unsafe extern "C" fn($($t),*) -> $ret>;
38 + }
39 + #[allow(unused_unsafe)]
40 + ExternWeak::new(unsafe { $name })
41 + };
|
warning: unnecessary closure used with `bool::then`
--> library/std/src/sys/unix/locks/futex_rwlock.rs:73:49
|
73 | .fetch_update(Acquire, Relaxed, |s| is_read_lockable(s).then(|| s + READ_LOCKED))
| ^^^^^^^^^^^^^^^^^^^^------------------------
| |
| help: use `then_some(..)` instead: `then_some(s + READ_LOCKED)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
= note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default
warning: unnecessary closure used with `bool::then`
--> library/std/src/sys/unix/locks/futex_rwlock.rs:147:49
|
147 | .fetch_update(Acquire, Relaxed, |s| is_unlocked(s).then(|| s + WRITE_LOCKED))
| ^^^^^^^^^^^^^^^-------------------------
| |
| help: use `then_some(..)` instead: `then_some(s + WRITE_LOCKED)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
warning: casting to the same type is unnecessary (`i32` -> `i32`)
--> library/std/src/sys/unix/net.rs:454:78
|
454 | if raw == 0 { Ok(None) } else { Ok(Some(io::Error::from_raw_os_error(raw as i32))) }
| ^^^^^^^^^^ help: try: `raw`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: casting to the same type is unnecessary (`i32` -> `i32`)
--> library/std/src/sys/unix/os.rs:76:14
|
76 | unsafe { (*errno_location()) as i32 }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(*errno_location())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: casting integer literal to `usize` is unnecessary
--> library/std/src/sys/unix/os.rs:620:27
|
620 | n if n < 0 => 512 as usize,
| ^^^^^^^^^^^^ help: try: `512_usize`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: this call to `as_ref` does nothing
--> library/std/src/sys/unix/process/process_common.rs:206:45
|
206 | let program_kind = ProgramKind::new(program.as_ref());
| ^^^^^^^^^^^^^^^^ help: try this: `program`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref
= note: `#[warn(clippy::useless_asref)]` on by default
warning: deref which would be done by auto-deref
--> library/std/src/sys/unix/process/process_common.rs:312:9
|
312 | &*self.program
| ^^^^^^^^^^^^^^ help: try this: `&self.program`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/std/src/sys/unix/process/process_common.rs:478:39
|
478 | let fd = File::open_c(&path, &opts)?;
| ^^^^^ help: change this to: `path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> library/std/src/sys/unix/process/process_common.rs:572:17
|
572 | write!(f, " {:?}", arg)?;
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
572 - write!(f, " {:?}", arg)?;
572 + write!(f, " {arg:?}")?;
|
warning: variables can be used directly in the `format!` string
--> library/std/src/sys/unix/process/process_unix.rs:113:21
|
113 | / assert_eq!(
114 | | CLOEXEC_MSG_FOOTER, footer,
115 | | "Validation on the CLOEXEC pipe failed: {:?}",
116 | | bytes
117 | | );
| |_____________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
warning: useless conversion to the same type: `usize`
--> library/std/src/sys/unix/process/process_unix.rs:303:37
|
303 | cvt(libc::setgroups(_g.len().try_into().unwrap(), _g.as_ptr()))?;
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider removing `.try_into()`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead
--> library/std/src/sys/unix/weak.rs:34:13
|
32 | / pub(crate) macro weak {
33 | | (fn $name:ident($($t:ty),*) -> $ret:ty) => (
34 | | let ref $name: ExternWeak<unsafe extern "C" fn($($t),*) -> $ret> = {
| | ^^^^^^^^^
35 | | extern "C" {
... |
42 | | )
43 | | }
| |_- in this expansion of `weak!`
|
::: library/std/src/sys/unix/process/process_unix.rs:443:9
|
443 | / weak! {
444 | | fn posix_spawn_file_actions_addchdir_np(
445 | | *mut libc::posix_spawn_file_actions_t,
446 | | *const libc::c_char
447 | | ) -> libc::c_int
448 | | }
| |_________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg
help: try
|
34 ~ let posix_spawn_file_actions_addchdir_np: &ExternWeak<unsafe extern "C" fn($($t),*) -> $ret> = &{
35 + extern "C" {
36 + #[linkage = "extern_weak"]
37 + static $name: Option<unsafe extern "C" fn($($t),*) -> $ret>;
38 + }
39 + #[allow(unused_unsafe)]
40 + ExternWeak::new(unsafe { $name })
41 + };
|
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> library/std/src/sys/unix/process/process_unix.rs:812:1
|
812 | impl Into<ExitStatus> for ExitStatusError {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
help: replace the `Into` implentation with `From<sys::unix::process::process_inner::ExitStatusError>`
|
812 ~ impl From<ExitStatusError> for ExitStatus {
813 ~ fn from(val: ExitStatusError) -> Self {
814 ~ ExitStatus(val.0.into())
|
warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead
--> library/std/src/sys/unix/weak.rs:34:13
|
32 | / pub(crate) macro weak {
33 | | (fn $name:ident($($t:ty),*) -> $ret:ty) => (
34 | | let ref $name: ExternWeak<unsafe extern "C" fn($($t),*) -> $ret> = {
| | ^^^^^^^^^
35 | | extern "C" {
... |
42 | | )
43 | | }
| |__- in this expansion of `weak!` (#2)
...
158 | / pub(crate) macro syscall {
159 | | (fn $name:ident($($arg_name:ident: $t:ty),*) -> $ret:ty) => (
160 | | unsafe fn $name($($arg_name:$t),*) -> $ret {
161 | | weak! { fn $name($($t),*) -> $ret }
| | ----------------------------------- in this macro invocation (#2)
... |
178 | | )
179 | | }
| |_- in this expansion of `syscall!` (#1)
|
::: library/std/src/sys/unix/rand.rs:40:9
|
40 | / syscall! {
41 | | fn getrandom(
42 | | buffer: *mut libc::c_void,
43 | | length: libc::size_t,
44 | | flags: libc::c_uint
45 | | ) -> libc::ssize_t
46 | | }
| |_________- in this macro invocation (#1)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg
help: try
|
34 ~ let getrandom: &ExternWeak<unsafe extern "C" fn($($t),*) -> $ret> = &{
35 + extern "C" {
36 + #[linkage = "extern_weak"]
37 + static $name: Option<unsafe extern "C" fn($($t),*) -> $ret>;
38 + }
39 + #[allow(unused_unsafe)]
40 + ExternWeak::new(unsafe { $name })
41 + };
|
warning: casting to the same type is unnecessary (`i32` -> `i32`)
--> library/std/src/sys/unix/stdio.rs:86:32
|
86 | err.raw_os_error() == Some(libc::EBADF as i32)
| ^^^^^^^^^^^^^^^^^^ help: try: `libc::EBADF`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: the borrowed expression implements the required traits
--> library/std/src/sys/unix/thread.rs:544:23
|
544 | path.push(&group_path);
| ^^^^^^^^^^^ help: change this to: `group_path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this `if` has identical blocks
--> library/std/src/sys/unix/thread.rs:873:77
|
873 | ret = if cfg!(any(target_os = "freebsd", target_os = "netbsd")) {
| _____________________________________________________________________________^
874 | | Some(stackaddr - guardsize..stackaddr)
875 | | } else if cfg!(all(target_os = "linux", target_env = "musl")) {
| |_____________^
|
note: same as this
--> library/std/src/sys/unix/thread.rs:875:75
|
875 | } else if cfg!(all(target_os = "linux", target_env = "musl")) {
| ___________________________________________________________________________^
876 | | Some(stackaddr - guardsize..stackaddr)
877 | | } else if cfg!(all(target_os = "linux", any(target_env = "gnu", target_env = "uclibc")))
| |_____________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
warning: useless conversion to the same type: `i64`
--> library/std/src/sys/unix/time.rs:143:21
|
143 | tv_sec: self.tv_sec.try_into().ok()?,
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider removing `.try_into()`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
warning: casting to the same type is unnecessary (`i64` -> `i64`)
--> library/std/src/sys/unix/time.rs:151:23
|
151 | Timespec::new(t.tv_sec as i64, t.tv_nsec as i64)
| ^^^^^^^^^^^^^^^ help: try: `t.tv_sec`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: casting to the same type is unnecessary (`i64` -> `i64`)
--> library/std/src/sys/unix/time.rs:151:40
|
151 | Timespec::new(t.tv_sec as i64, t.tv_nsec as i64)
| ^^^^^^^^^^^^^^^^ help: try: `t.tv_nsec`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/std/src/sys/unix/mod.rs:78:34
|
78 | thread::Thread::set_name(&CStr::from_bytes_with_nul_unchecked(b"main\0"));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `CStr::from_bytes_with_nul_unchecked(b"main\0")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> library/std/src/sys_common/backtrace.rs:174:53
|
174 | if let Ok(stripped) = file.strip_prefix(&cwd) {
| ^^^^ help: change this to: `cwd`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/std/src/sys_common/once/futex.rs:59:28
|
59 | futex_wake_all(&self.state);
| ^^^^^^^^^^^ help: change this to: `self.state`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this `impl` can be derived
--> library/std/src/sys_common/process.rs:20:1
|
20 | / impl Default for CommandEnv {
21 | | fn default() -> Self {
22 | | CommandEnv { clear: false, saw_path: false, vars: Default::default() }
23 | | }
24 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
= note: `#[warn(clippy::derivable_impls)]` on by default
= help: remove the manual implementation...
help: ...and instead derive it
|
14 | #[derive(Default)]
|
warning: useless conversion to the same type: `ffi::os_str::OsString`
--> library/std/src/sys_common/process.rs:40:31
|
40 | result.insert(k.into(), v);
| ^^^^^^^^ help: consider removing `.into()`: `k`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
warning: dereferencing a tuple pattern where every element takes a reference
--> library/std/src/sys_common/process.rs:44:20
|
44 | if let &Some(ref v) = maybe_v {
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference
= note: `#[warn(clippy::needless_borrowed_reference)]` on by default
help: try removing the `&` and `ref` parts
|
44 - if let &Some(ref v) = maybe_v {
44 + if let Some(v) = maybe_v {
|
warning: this `if` has identical blocks
--> library/std/src/sys_common/thread_parking/futex.rs:75:56
|
75 | if self.state.swap(EMPTY, Acquire) == NOTIFIED {
| ________________________________________________________^
76 | | // Woke up because of unpark().
77 | | } else {
| |_________^
|
note: same as this
--> library/std/src/sys_common/thread_parking/futex.rs:77:16
|
77 | } else {
| ________________^
78 | | // Timeout or spurious wake up.
79 | | // We return either way, because we can't easily tell if it was the
80 | | // timeout or not.
81 | | }
| |_________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
warning: this expression borrows a value the compiler would automatically borrow
--> library/std/src/sys_common/wtf8.rs:338:16
|
338 | match ((&*self).final_lead_surrogate(), other.initial_trail_surrogate()) {
| ^^^^^^^^ help: change this to: `(*self)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression borrows a value the compiler would automatically borrow
--> library/std/src/sys_common/wtf8.rs:375:33
|
375 | if let Some(lead) = (&*self).final_lead_surrogate() {
| ^^^^^^^^ help: change this to: `(*self)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> library/std/src/sys_common/wtf8.rs:528:13
|
528 | write!(formatter, "\\u{{{:x}}}", surrogate)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
528 - write!(formatter, "\\u{{{:x}}}", surrogate)?;
528 + write!(formatter, "\\u{{{surrogate:x}}}")?;
|
warning: manual `!Range::contains` implementation
--> library/std/src/sys_common/wtf8.rs:877:21
|
877 | Some(&b) => b < 128 || b >= 192,
| ^^^^^^^^^^^^^^^^^^^ help: use: `!(128..192).contains(&b)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
= note: `#[warn(clippy::manual_range_contains)]` on by default
warning: you are implementing `Hash` explicitly but have derived `PartialEq`
--> library/std/src/sys_common/wtf8.rs:964:1
|
964 | / impl Hash for CodePoint {
965 | | #[inline]
966 | | fn hash<H: Hasher>(&self, state: &mut H) {
967 | | self.value.hash(state)
968 | | }
969 | | }
| |_^
|
note: `PartialEq` implemented here
--> library/std/src/sys_common/wtf8.rs:44:14
|
44 | #[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Copy)]
| ^^^^^^^^^ in this derive macro expansion
|
::: /home/gh-jyn514/rust3/library/core/src/cmp.rs:236:1
|
236 | pub macro PartialEq($item:item) {
| ------------------- in this expansion of `#[derive(PartialEq)]`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_hash_xor_eq
warning: you are implementing `Hash` explicitly but have derived `PartialEq`
--> library/std/src/sys_common/wtf8.rs:971:1
|
971 | / impl Hash for Wtf8Buf {
972 | | #[inline]
973 | | fn hash<H: Hasher>(&self, state: &mut H) {
974 | | state.write(&self.bytes);
975 | | 0xfeu8.hash(state)
976 | | }
977 | | }
| |_^
|
note: `PartialEq` implemented here
--> library/std/src/sys_common/wtf8.rs:135:14
|
135 | #[derive(Eq, PartialEq, Ord, PartialOrd, Clone)]
| ^^^^^^^^^ in this derive macro expansion
|
::: /home/gh-jyn514/rust3/library/core/src/cmp.rs:236:1
|
236 | pub macro PartialEq($item:item) {
| ------------------- in this expansion of `#[derive(PartialEq)]`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_hash_xor_eq
warning: you are implementing `Hash` explicitly but have derived `PartialEq`
--> library/std/src/sys_common/wtf8.rs:979:1
|
979 | / impl Hash for Wtf8 {
980 | | #[inline]
981 | | fn hash<H: Hasher>(&self, state: &mut H) {
982 | | state.write(&self.bytes);
983 | | 0xfeu8.hash(state)
984 | | }
985 | | }
| |_^
|
note: `PartialEq` implemented here
--> library/std/src/sys_common/wtf8.rs:498:19
|
498 | #[derive(Eq, Ord, PartialEq, PartialOrd)]
| ^^^^^^^^^ in this derive macro expansion
|
::: /home/gh-jyn514/rust3/library/core/src/cmp.rs:236:1
|
236 | pub macro PartialEq($item:item) {
| ------------------- in this expansion of `#[derive(PartialEq)]`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_hash_xor_eq
warning: a `const` item should never be interior mutable
--> library/std/src/sys_common/thread_local_key.rs:118:1
|
118 | pub const INIT: StaticKey = StaticKey::new(None);
| -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| make this a static item (maybe with lazy_static)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> library/std/src/sys_common/net.rs:109:21
|
109 | assert!(len as usize >= mem::size_of::<c::sockaddr_in>());
| ^^^^^^^^^^^^ help: try: `len`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> library/std/src/sys_common/net.rs:115:21
|
115 | assert!(len as usize >= mem::size_of::<c::sockaddr_in6>());
| ^^^^^^^^^^^^ help: try: `len`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: transmute from a pointer type (`*mut libc::sockaddr`) to a reference type (`&libc::sockaddr_storage`)
--> library/std/src/sys_common/net.rs:157:40
|
157 | match sockaddr_to_addr(mem::transmute(cur.ai_addr), cur.ai_addrlen as usize) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*(cur.ai_addr as *const libc::sockaddr_storage)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#transmute_ptr_to_ref
= note: `#[warn(clippy::transmute_ptr_to_ref)]` on by default
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> library/std/src/sys_common/net.rs:284:39
|
284 | let len = cmp::min(buf.len(), <wrlen_t>::MAX as usize) as wrlen_t;
| ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `<wrlen_t>::MAX`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> library/std/src/sys_common/net.rs:541:39
|
541 | let len = cmp::min(buf.len(), <wrlen_t>::MAX as usize) as wrlen_t;
| ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `<wrlen_t>::MAX`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> library/std/src/sys_common/net.rs:680:39
|
680 | let len = cmp::min(buf.len(), <wrlen_t>::MAX as usize) as wrlen_t;
| ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `<wrlen_t>::MAX`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact
--> library/std/src/panicking.rs:541:17
|
541 | drop(s.write_fmt(*inner));
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: argument has type `core::result::Result<(), core::fmt::Error>`
--> library/std/src/panicking.rs:541:22
|
541 | drop(s.write_fmt(*inner));
| ^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#drop_copy
= note: `#[warn(clippy::drop_copy)]` on by default
warning: sub-expression diverges
--> library/std/src/panicking.rs:607:12
|
607 | return crate::sys_common::backtrace::__rust_end_short_backtrace(move || {
| ____________^
608 | | rust_panic_with_hook(&mut PanicPayload::new(msg), None, loc, true)
609 | | });
| |______^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#diverging_sub_expression
= note: `#[warn(clippy::diverging_sub_expression)]` on by default
warning: casting to the same type is unnecessary (`u64` -> `u64`)
--> library/std/src/personality/dwarf/mod.rs:69:23
|
69 | result |= (!0 as u64) << shift;
| ^^^^^^^^^^^ help: try: `!0`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
warning: mutable borrow from immutable input(s)
--> library/std/src/../../backtrace/src/symbolize/gimli/stash.rs:25:44
|
25 | pub fn allocate(&self, size: usize) -> &mut [u8] {
| ^^^^^^^^^
|
note: immutable borrow here
--> library/std/src/../../backtrace/src/symbolize/gimli/stash.rs:25:21
|
25 | pub fn allocate(&self, size: usize) -> &mut [u8] {
| ^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_from_ref
= note: `#[warn(clippy::mut_from_ref)]` on by default
warning: `std` (lib) generated 160 warnings (run `cargo fix --lib -p std` to apply 120 suggestions)
Checking rustc-std-workspace-std v1.99.0 (/home/gh-jyn514/rust3/library/rustc-std-workspace-std)
Checking proc_macro v0.0.0 (/home/gh-jyn514/rust3/library/proc_macro)
Checking unicode-width v0.1.10
Checking getopts v0.2.21
warning: mutable borrow from immutable input(s)
--> library/proc_macro/src/bridge/arena.rs:105:60
|
105 | pub(crate) fn alloc_str<'a>(&'a self, string: &str) -> &'a mut str {
| ^^^^^^^^^^^
|
note: immutable borrow here
--> library/proc_macro/src/bridge/arena.rs:105:33
|
105 | pub(crate) fn alloc_str<'a>(&'a self, string: &str) -> &'a mut str {
| ^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_from_ref
= note: `#[warn(clippy::mut_from_ref)]` on by default
warning: deref which would be done by auto-deref
--> library/proc_macro/src/bridge/client.rs:301:19
|
301 | f(&mut *state)
| ^^^^^^^^^^^ help: try this: `&mut state`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
= note: `#[warn(clippy::explicit_auto_deref)]` on by default
warning: this `impl` can be derived
--> library/proc_macro/src/bridge/fxhash.rs:38:1
|
38 | / impl Default for FxHasher {
39 | | #[inline]
40 | | fn default() -> FxHasher {
41 | | FxHasher { hash: 0 }
42 | | }
43 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
= note: `#[warn(clippy::derivable_impls)]` on by default
= help: remove the manual implementation...
help: ...and instead derive it
|
29 | #[derive(Default)]
|
warning: length comparison to one
--> library/proc_macro/src/bridge/fxhash.rs:74:40
|
74 | if (size_of::<usize>() > 1) && bytes.len() >= 1 {
| ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!bytes.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
= note: `#[warn(clippy::len_zero)]` on by default
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> library/proc_macro/src/bridge/rpc.rs:268:1
|
268 | impl Into<Box<dyn Any + Send>> for PanicMessage {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see
https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
= note: `#[warn(clippy::from_over_into)]` on by default
help: replace the `Into` implentation with `From<bridge::rpc::PanicMessage>`
|
268 ~ impl From<PanicMessage> for Box<dyn Any + Send> {
269 ~ fn from(val: PanicMessage) -> Self {
270 ~ match val {
|
warning: this returns a `Result<_, ()>`
--> library/proc_macro/src/bridge/mod.rs:59:90
|
28 | | /// // ...
| |________________________________^
...
52 | / macro_rules! with_api {
53 | ($S:ident, $self:ident, $m:ident) => {
54 | / $m! {
55 | | FreeFunctions {
56 | | fn drop($self: $S::FreeFunctions);
57 | | fn track_env_var(var: &str, value: Option<&str>);
58 | | fn track_path(path: &str);
59 | fn literal_from_str(s: &str) -> Result<Literal<$S::Span, $S::Symbol>, ()>;
| __________________________________________________________________________________________^
...
109 | },
110 | | }
| |_________- in this macro invocation (#2)
111 | | };
112 | | }
| |_- in this expansion of `with_api!` (#1)
|
::: library/proc_macro/src/bridge/server.rs:31:1
|
31 | / macro_rules! declare_server_traits {
32 | | ($($name:ident {
33 | | $(fn $method:ident($($arg:ident: $arg_ty:ty),* $(,)?) $(-> $ret_ty:ty)?;)*
34 | | }),* $(,)?) => {
... |
48 | | }
49 | | }
| |_- in this expansion of `declare_server_traits!` (#2)
50 | with_api!(Self, self_, declare_server_traits);
| --------------------------------------------- in this macro invocation (#1)
|
= help: use a custom `Error` type instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err
= note: `#[warn(clippy::result_unit_err)]` on by default
warning: this returns a `Result<_, ()>`
--> library/proc_macro/src/bridge/mod.rs:66:87
|
28 | | /// // ...
| |________________________________^
...
52 | / macro_rules! with_api {
53 | ($S:ident, $self:ident, $m:ident) => {
54 | / $m! {
55 | | FreeFunctions {
56 | | fn drop($self: $S::FreeFunctions);
57 | | fn track_env_var(var: &str, value: Option<&str>);
... |
66 | fn expand_expr($self: &$S::TokenStream) -> Result<$S::TokenStream, ()>;
| _______________________________________________________________________________________^
...
109 | },
110 | | }
| |_________- in this macro invocation (#2)
111 | | };
112 | | }
| |_- in this expansion of `with_api!` (#1)
|
::: library/proc_macro/src/bridge/server.rs:31:1
|
31 | / macro_rules! declare_server_traits {
32 | | ($($name:ident {
33 | | $(fn $method:ident($($arg:ident: $arg_ty:ty),* $(,)?) $(-> $ret_ty:ty)?;)*
34 | | }),* $(,)?) => {
... |
48 | | }
49 | | }
| |_- in this expansion of `declare_server_traits!` (#2)
50 | with_api!(Self, self_, declare_server_traits);
| --------------------------------------------- in this macro invocation (#1)
|
= help: use a custom `Error` type instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err
warning: this returns a `Result<_, ()>`
--> library/proc_macro/src/bridge/mod.rs:108:88
|
28 | | /// // ...
| |________________________________^
...
52 | / macro_rules! with_api {
53 | ($S:ident, $self:ident, $m:ident) => {
54 | / $m! {
55 | | FreeFunctions {
56 | | fn drop($self: $S::FreeFunctions);
57 | | fn track_env_var(var: &str, value: Option<&str>);
... |
108 | fn normalize_and_validate_ident(string: &str) -> Result<$S::Symbol, ()>;
| ________________________________________________________________________________________^
109 | },
110 | | }
| |_________- in this macro invocation (#2)
111 | | };
112 | | }
| |_- in this expansion of `with_api!` (#1)
|
::: library/proc_macro/src/bridge/server.rs:31:1
|
31 | / macro_rules! declare_server_traits {
32 | | ($($name:ident {
33 | | $(fn $method:ident($($arg:ident: $arg_ty:ty),* $(,)?) $(-> $ret_ty:ty)?;)*
34 | | }),* $(,)?) => {
... |
48 | | }
49 | | }
| |_- in this expansion of `declare_server_traits!` (#2)
50 | with_api!(Self, self_, declare_server_traits);
| --------------------------------------------- in this macro invocation (#1)
|
= help: use a custom `Error` type instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err
warning: variables can be used directly in the `format!` string
--> library/proc_macro/src/bridge/symbol.rs:38:17
|
38 | panic!("`{}` cannot be a raw identifier", string);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
help: change this to
|
38 - panic!("`{}` cannot be a raw identifier", string);
38 + panic!("`{string}` cannot be a raw identifier");
|
warning: variables can be used directly in the `format!` string
--> library/proc_macro/src/bridge/symbol.rs:52:29
|
52 | .unwrap_or_else(|_| panic!("`{:?}` is not a valid identifier", string))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
52 - .unwrap_or_else(|_| panic!("`{:?}` is not a valid identifier", string))
52 + .unwrap_or_else(|_| panic!("`{string:?}` is not a valid identifier"))
|
warning: match expression looks like `matches!` macro
--> library/proc_macro/src/bridge/symbol.rs:81:9
|
81 | / match string {
82 | | "_" | "super" | "self" | "Self" | "crate" => false,
83 | | _ => true,
84 | | }
| |_________^ help: try this: `!matches!(string, "_" | "super" | "self" | "Self" | "crate")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro
= note: `#[warn(clippy::match_like_matches_macro)]` on by default
warning: using `self.to_string` in `fmt::Display` implementation will cause infinite recursion
--> library/proc_macro/src/lib.rs:193:22
|
193 | f.write_str(&self.to_string())
| ^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#recursive_format_impl
= note: `#[warn(clippy::recursive_format_impl)]` on by default
warning: method `eq` can be confused for the standard trait method `std::cmp::PartialEq::eq`
--> library/proc_macro/src/lib.rs:538:5
|
538 | / pub fn eq(&self, other: &Span) -> bool {
539 | | self.0 == other.0
540 | | }
| |_____^
|
= help: consider implementing the trait `std::cmp::PartialEq` or choosing a less ambiguous method name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
= note: `#[warn(clippy::should_implement_trait)]` on by default
warning: using `self.to_string` in `fmt::Display` implementation will cause infinite recursion
--> library/proc_macro/src/lib.rs:787:22
|
787 | f.write_str(&self.to_string())
| ^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#recursive_format_impl
warning: using `self.to_string` in `fmt::Display` implementation will cause infinite recursion
--> library/proc_macro/src/lib.rs:916:22
|
916 | f.write_str(&self.to_string())
| ^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#recursive_format_impl
warning: variables can be used directly in the `format!` string
--> library/proc_macro/src/lib.rs:975:13
|
975 | panic!("unsupported character `{:?}`", ch);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
975 - panic!("unsupported character `{:?}`", ch);
975 + panic!("unsupported character `{ch:?}`");
|
warning: variables can be used directly in the `format!` string
--> library/proc_macro/src/lib.rs:1338:22
|
1338 | let quoted = format!("{:?}", string);
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
1338 - let quoted = format!("{:?}", string);
1338 + let quoted = format!("{string:?}");
|
warning: variables can be used directly in the `format!` string
--> library/proc_macro/src/lib.rs:1347:22
|
1347 | let quoted = format!("{:?}", ch);
| ^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
1347 - let quoted = format!("{:?}", ch);
1347 + let quoted = format!("{ch:?}");
|
warning: `proc_macro` (lib) generated 18 warnings (run `cargo fix --lib -p proc_macro` to apply 9 suggestions)
Checking test v0.0.0 (/home/gh-jyn514/rust3/library/test)
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/test/src/console.rs:150:30
|
150 | for test in filter_tests(&opts, tests).into_iter() {
| ^^^^^ help: change this to: `opts`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
warning: deref on an immutable reference
--> library/test/src/console.rs:247:64
|
247 | out.write_result(test, result, exec_time.as_ref(), &*stdout, st)?;
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref
= note: `#[warn(clippy::borrow_deref_ref)]` on by default
help: if you would like to reborrow, try removing `&*`
|
247 | out.write_result(test, result, exec_time.as_ref(), stdout, st)?;
| ~~~~~~
help: if you would like to deref, try using `&**`
|
247 | out.write_result(test, result, exec_time.as_ref(), &**stdout, st)?;
| ~~~~~~~~~
warning: deref which would be done by auto-deref
--> library/test/src/console.rs:265:39
|
265 | .max_by_key(|t| len_if_padded(*t))
| ^^ help: try this: `t`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
= note: `#[warn(clippy::explicit_auto_deref)]` on by default
warning: all variants have the same prefix: `Te`
--> library/test/src/event.rs:30:1
|
30 | / pub enum TestEvent {
31 | | TeFiltered(usize, Option<u64>),
32 | | TeWait(TestDesc),
33 | | TeResult(CompletedTest),
34 | | TeTimeout(TestDesc),
35 | | TeFilteredOut(usize),
36 | | }
| |_^
|
= help: remove the prefixes and use full paths to the variants instead of glob imports
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names
= note: `#[warn(clippy::enum_variant_names)]` on by default
warning: deref which would be done by auto-deref
--> library/test/src/formatters/json.rs:43:28
|
43 | self.write_message(&*format!(
| ____________________________^
44 | | r#"{{ "type": "{}", "name": "{}", "event": "{}""#,
45 | | ty,
46 | | EscapedString(name),
47 | | evt
48 | | ))?;
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
help: try this
|
43 ~ self.write_message(&format!(
44 + r#"{{ "type": "{}", "name": "{}", "event": "{}""#,
45 + ty,
46 + EscapedString(name),
47 + evt
48 ~ ))?;
|
warning: deref which would be done by auto-deref
--> library/test/src/formatters/json.rs:50:32
|
50 | self.write_message(&*format!(r#", "exec_time": {}"#, exec_time.0.as_secs_f64()))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&format!(r#", "exec_time": {}"#, exec_time.0.as_secs_f64())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: deref which would be done by auto-deref
--> library/test/src/formatters/json.rs:53:32
|
53 | self.write_message(&*format!(r#", "stdout": "{}""#, EscapedString(stdout)))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&format!(r#", "stdout": "{}""#, EscapedString(stdout))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: deref which would be done by auto-deref
--> library/test/src/formatters/json.rs:56:32
|
56 | self.write_message(&*format!(r#", {extra}"#))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&format!(r#", {extra}"#)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: deref which would be done by auto-deref
--> library/test/src/formatters/json.rs:69:30
|
69 | self.writeln_message(&*format!(
| ______________________________^
70 | | r#"{{ "type": "suite", "event": "started", "test_count": {test_count}{shuffle_seed_json} }}"#
71 | | ))
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
help: try this
|
69 ~ self.writeln_message(&format!(
70 + r#"{{ "type": "suite", "event": "started", "test_count": {test_count}{shuffle_seed_json} }}"#
71 ~ ))
|
warning: deref which would be done by auto-deref
--> library/test/src/formatters/json.rs:75:30
|
75 | self.writeln_message(&*format!(
| ______________________________^
76 | | r#"{{ "type": "test", "event": "started", "name": "{}" }}"#,
77 | | EscapedString(desc.name.as_slice())
78 | | ))
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
help: try this
|
75 ~ self.writeln_message(&format!(
76 + r#"{{ "type": "test", "event": "started", "name": "{}" }}"#,
77 + EscapedString(desc.name.as_slice())
78 ~ ))
|
warning: deref which would be done by auto-deref
--> library/test/src/formatters/json.rs:154:38
|
154 | self.writeln_message(&*line)
| ^^^^^^ help: try this: `&line`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: deref which would be done by auto-deref
--> library/test/src/formatters/json.rs:160:30
|
160 | self.writeln_message(&*format!(
| ______________________________^
161 | | r#"{{ "type": "test", "event": "timeout", "name": "{}" }}"#,
162 | | EscapedString(desc.name.as_slice())
163 | | ))
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
help: try this
|
160 ~ self.writeln_message(&format!(
161 + r#"{{ "type": "test", "event": "timeout", "name": "{}" }}"#,
162 + EscapedString(desc.name.as_slice())
163 ~ ))
|
warning: deref which would be done by auto-deref
--> library/test/src/formatters/json.rs:167:28
|
167 | self.write_message(&*format!(
| ____________________________^
168 | | "{{ \"type\": \"suite\", \
169 | | \"event\": \"{}\", \
170 | | \"passed\": {}, \
... |
180 | | state.filtered_out,
181 | | ))?;
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
help: try this
|
167 ~ self.write_message(&format!(
168 + "{{ \"type\": \"suite\", \
169 + \"event\": \"{}\", \
170 + \"passed\": {}, \
171 + \"failed\": {}, \
172 + \"ignored\": {}, \
173 + \"measured\": {}, \
174 + \"filtered_out\": {}",
175 + if state.failed == 0 { "ok" } else { "failed" },
176 + state.passed,
177 + state.failed,
178 + state.ignored,
179 + state.measured,
180 + state.filtered_out,
181 ~ ))?;
|
warning: deref which would be done by auto-deref
--> library/test/src/formatters/junit.rs:67:28
|
67 | self.write_message(&*format!(
| ____________________________^
68 | | "<testsuite name=\"test\" package=\"test\" id=\"0\" \
69 | | errors=\"0\" \
70 | | failures=\"{}\" \
... |
74 | | state.failed, state.total, state.ignored
75 | | ))?;
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
help: try this
|
67 ~ self.write_message(&format!(
68 + "<testsuite name=\"test\" package=\"test\" id=\"0\" \
69 + errors=\"0\" \
70 + failures=\"{}\" \
71 + tests=\"{}\" \
72 + skipped=\"{}\" \
73 + >",
74 + state.failed, state.total, state.ignored
75 ~ ))?;
|
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
--> library/test/src/formatters/junit.rs:76:41
|
76 | for (desc, result, duration) in std::mem::replace(&mut self.results, Vec::new()) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut self.results)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default
= note: `#[warn(clippy::mem_replace_with_default)]` on by default
warning: deref which would be done by auto-deref
--> library/test/src/formatters/junit.rs:81:40
|
81 | self.write_message(&*format!(
| ________________________________________^
82 | | "<testcase classname=\"{}\" \
83 | | name=\"{}\" time=\"{}\">",
84 | | class_name,
85 | | test_name,
86 | | duration.as_secs_f64()
87 | | ))?;
| |_____________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
help: try this
|
81 ~ self.write_message(&format!(
82 + "<testcase classname=\"{}\" \
83 + name=\"{}\" time=\"{}\">",
84 + class_name,
85 + test_name,
86 + duration.as_secs_f64()
87 ~ ))?;
|
warning: deref which would be done by auto-deref
--> library/test/src/formatters/junit.rs:93:40
|
93 | self.write_message(&*format!(
| ________________________________________^
94 | | "<testcase classname=\"{}\" \
95 | | name=\"{}\" time=\"{}\">",
96 | | class_name,
97 | | test_name,
98 | | duration.as_secs_f64()
99 | | ))?;
| |_____________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
help: try this
|
93 ~ self.write_message(&format!(
94 + "<testcase classname=\"{}\" \
95 + name=\"{}\" time=\"{}\">",
96 + class_name,
97 + test_name,
98 + duration.as_secs_f64()
99 ~ ))?;
|
warning: deref which would be done by auto-deref
--> library/test/src/formatters/junit.rs:100:40
|
100 | self.write_message(&*format!("<failure message=\"{m}\" type=\"assert\"/>"))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&format!("<failure message=\"{m}\" type=\"assert\"/>")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
warning: deref which would be done by auto-deref
--> library/test/src/formatters/junit.rs:105:40
|
105 | self.write_message(&*format!(
| ________________________________________^
106 | | "<testcase classname=\"{}\" \
107 | | name=\"{}\" time=\"{}\">",
108 | | class_name,
109 | | test_name,
110 | | duration.as_secs_f64()
111 | | ))?;
| |_____________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
help: try this
|
105 ~ self.write_message(&format!(
106 + "<testcase classname=\"{}\" \
107 + name=\"{}\" time=\"{}\">",
108 + class_name,
109 + test_name,
110 + duration.as_secs_f64()
111 ~ ))?;
|
warning: deref which would be done by auto-deref
--> library/test/src/formatters/junit.rs:117:40
|
117 | self.write_message(&*format!(
| ________________________________________^
118 | | "<testcase classname=\"benchmark::{}\" \
119 | | name=\"{}\" time=\"{}\" />",
120 | | class_name, test_name, b.ns_iter_summ.sum
121 | | ))?;
| |_____________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
help: try this
|
117 ~ self.write_message(&format!(
118 + "<testcase classname=\"benchmark::{}\" \
119 + name=\"{}\" time=\"{}\" />",
120 + class_name, test_name, b.ns_iter_summ.sum
121 ~ ))?;
|
warning: deref which would be done by auto-deref
--> library/test/src/formatters/junit.rs:125:40
|
125 | self.write_message(&*format!(
| ________________________________________^
126 | | "<testcase classname=\"{}\" \
127 | | name=\"{}\" time=\"{}\"/>",
128 | | class_name,
129 | | test_name,
130 | | duration.as_secs_f64()
131 | | ))?;
| |_____________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
help: try this
|
125 ~ self.write_message(&format!(
126 + "<testcase classname=\"{}\" \
127 + name=\"{}\" time=\"{}\"/>",
128 + class_name,
129 + test_name,
130 + duration.as_secs_f64()
131 ~ ))?;
|
warning: dereferencing a tuple pattern where every element takes a reference
--> library/test/src/formatters/pretty.rs:137:13
|
137 | for &(ref f, ref stdout) in inputs {
| ^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference
= note: `#[warn(clippy::needless_borrowed_reference)]` on by default
help: try removing the `&` and `ref` parts
|
137 - for &(ref f, ref stdout) in inputs {
137 + for (f, stdout) in inputs {
|
warning: the borrowed expression implements the required traits
--> library/test/src/formatters/pretty.rs:174:30
|
174 | self.write_plain(&format!("test {name} - {test_mode} ... "))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("test {name} - {test_mode} ... ")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> library/test/src/formatters/pretty.rs:176:30
|
176 | self.write_plain(&format!("test {name} ... "))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("test {name} ... ")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> library/test/src/formatters/pretty.rs:191:26
|
191 | self.write_plain(&format!("\nrunning {test_count} {noun}{shuffle_seed_msg}\n"))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("\nrunning {test_count} {noun}{shuffle_seed_msg}\n")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> library/test/src/formatters/pretty.rs:224:34
|
224 | self.write_plain(&format!(": {}", fmt_bench_samples(bs)))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!(": {}", fmt_bench_samples(bs))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> library/test/src/formatters/pretty.rs:234:26
|
234 | self.write_plain(&format!(
| __________________________^
235 | | "test {} has been running for over {} seconds\n",
236 | | desc.name,
237 | | time::TEST_WARN_TIMEOUT_S
238 | | ))
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
help: change this to
|
234 ~ self.write_plain(format!(
235 + "test {} has been running for over {} seconds\n",
236 + desc.name,
237 + time::TEST_WARN_TIMEOUT_S
238 ~ ))
|
warning: the borrowed expression implements the required traits
--> library/test/src/formatters/pretty.rs:270:26
|
270 | self.write_plain(&s)?;
| ^^ help: change this to: `s`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> library/test/src/formatters/pretty.rs:274:30
|
274 | self.write_plain(&time_str)?;
| ^^^^^^^^^ help: change this to: `time_str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> library/test/src/formatters/terse.rs:73:30
|
73 | self.write_plain(&out)?;
| ^^^^ help: change this to: `out`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: dereferencing a tuple pattern where every element takes a reference
--> library/test/src/formatters/terse.rs:109:13
|
109 | for &(ref f, ref stdout) in &state.not_failures {
| ^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference
help: try removing the `&` and `ref` parts
|
109 - for &(ref f, ref stdout) in &state.not_failures {
109 + for (f, stdout) in &state.not_failures {
|
warning: dereferencing a tuple pattern where every element takes a reference
--> library/test/src/formatters/terse.rs:135:13
|
135 | for &(ref f, ref stdout) in &state.failures {
| ^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference
help: try removing the `&` and `ref` parts
|
135 - for &(ref f, ref stdout) in &state.failures {
135 + for (f, stdout) in &state.failures {
|
warning: the borrowed expression implements the required traits
--> library/test/src/formatters/terse.rs:160:30
|
160 | self.write_plain(&format!("test {name} - {test_mode} ... "))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("test {name} - {test_mode} ... ")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> library/test/src/formatters/terse.rs:162:30
|
162 | self.write_plain(&format!("test {name} ... "))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("test {name} ... ")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> library/test/src/formatters/terse.rs:178:26
|
178 | self.write_plain(&format!("\nrunning {test_count} {noun}{shuffle_seed_msg}\n"))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("\nrunning {test_count} {noun}{shuffle_seed_msg}\n")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> library/test/src/formatters/terse.rs:212:34
|
212 | self.write_plain(&format!(": {}\n", fmt_bench_samples(bs)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!(": {}\n", fmt_bench_samples(bs))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> library/test/src/formatters/terse.rs:218:26
|
218 | self.write_plain(&format!(
| __________________________^
219 | | "test {} has been running for over {} seconds\n",
220 | | desc.name,
221 | | time::TEST_WARN_TIMEOUT_S
222 | | ))
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
help: change this to
|
218 ~ self.write_plain(format!(
219 + "test {} has been running for over {} seconds\n",
220 + desc.name,
221 + time::TEST_WARN_TIMEOUT_S
222 ~ ))
|
warning: the borrowed expression implements the required traits
--> library/test/src/formatters/terse.rs:248:26
|
248 | self.write_plain(&s)?;
| ^^ help: change this to: `s`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> library/test/src/formatters/terse.rs:252:30
|
252 | self.write_plain(&time_str)?;
| ^^^^^^^^^ help: change this to: `time_str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: you should consider adding a `Default` implementation for `MetricMap`
--> library/test/src/helpers/metrics.rs:20:5
|
20 | / pub fn new() -> MetricMap {
21 | | MetricMap(BTreeMap::new())
22 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
19 + impl Default for MetricMap {
20 + fn default() -> Self {
21 + Self::new()
22 + }
23 + }
|
warning: you should consider adding a `Default` implementation for `Options`
--> library/test/src/options.rs:69:5
|
69 | / pub fn new() -> Options {
70 | | Options { display_output: false, panic_abort: false }
71 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
68 + impl Default for Options {
69 + fn default() -> Self {
70 + Self::new()
71 + }
72 + }
|
warning: variant name ends with the enum's name
--> library/test/src/term/terminfo/mod.rs:41:5
|
41 | IoError(io::Error),
| ^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names
warning: comparison to empty slice
--> library/test/src/term/terminfo/searcher.rs:25:16
|
25 | if i == "" {
| ^^^^^^^ help: using `is_empty` is clearer and more explicit: `i.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty
= note: `#[warn(clippy::comparison_to_empty)]` on by default
warning: the borrowed expression implements the required traits
--> library/test/src/term/terminfo/searcher.rs:52:20
|
52 | p.push(&term);
| ^^^^^ help: change this to: `term`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: manual `RangeInclusive::contains` implementation
--> library/test/src/term/terminfo/parm.rs:285:20
|
285 | if cur >= 'A' && cur <= 'Z' {
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `('A'..='Z').contains(&cur)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
= note: `#[warn(clippy::manual_range_contains)]` on by default
warning: manual `RangeInclusive::contains` implementation
--> library/test/src/term/terminfo/parm.rs:292:27
|
292 | } else if cur >= 'a' && cur <= 'z' {
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `('a'..='z').contains(&cur)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
warning: manual `RangeInclusive::contains` implementation
--> library/test/src/term/terminfo/parm.rs:304:20
|
304 | if cur >= 'A' && cur <= 'Z' {
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `('A'..='Z').contains(&cur)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
warning: manual `RangeInclusive::contains` implementation
--> library/test/src/term/terminfo/parm.rs:307:27
|
307 | } else if cur >= 'a' && cur <= 'z' {
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `('a'..='z').contains(&cur)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/test/src/term/terminfo/mod.rs:152:38
|
152 | Some(op) => match expand(&op, &[], &mut Variables::new()) {
| ^^^ help: change this to: `op`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: manual `Range::contains` implementation
--> library/test/src/term/terminfo/mod.rs:183:40
|
183 | if color >= self.num_colors && color >= 8 && color < 16 { color - 8 } else { color }
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(8..16).contains(&color)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/test/src/term/terminfo/mod.rs:188:39
|
188 | Some(cmd) => match expand(&cmd, params, &mut Variables::new()) {
| ^^^^ help: change this to: `cmd`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> library/test/src/test_result.rs:36:49
|
36 | (&ShouldPanic::YesWithMessage(msg), Err(ref err)) => {
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
help: try this
|
36 ~ (&ShouldPanic::YesWithMessage(msg), Err(err)) => {
37 | let maybe_panic_str = err
...
54 | expected substring: `{:?}`"#,
55 ~ (*err).type_id(),
|
warning: deref on an immutable reference
--> library/test/src/types.rs:50:42
|
50 | AlignedTestName(ref s, _) => &*s,
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref
help: if you would like to reborrow, try removing `&*`
|
50 | AlignedTestName(ref s, _) => s,
| ~
help: if you would like to deref, try using `&**`
|
50 | AlignedTestName(ref s, _) => &**s,
| ~~~~
warning: redundant pattern matching, consider using `is_err()`
--> library/test/src/lib.rs:272:24
|
272 | if let Err(_) = join_handle.join() {
| -------^^^^^^--------------------- help: try this: `if join_handle.join().is_err()`
|
= note: this will change drop order of the result, as well as all temporaries
= note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
= note: `#[warn(clippy::redundant_pattern_matching)]` on by default
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> library/test/src/lib.rs:792:62
|
792 | panic::set_hook(Box::new(move |info| record_result2(Some(&info))));
| ^^^^^ help: change this to: `info`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: `test` (lib) generated 55 warnings (run `cargo fix --lib -p test` to apply 50 suggestions)
Finished release [optimized] target(s) in 56.58s
Building stage1 library artifacts (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)
Finished release [optimized] target(s) in 50.26s
Copying stage1 library from stage1 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu / aarch64-unknown-linux-gnu)
Checking stage1 compiler artifacts (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)
Compiling proc-macro2 v1.0.46
Compiling quote v1.0.21
Compiling syn v1.0.102
Compiling unicode-ident v1.0.5
Compiling unicode-xid v0.2.4
Compiling serde v1.0.147
Compiling serde_derive v1.0.147
Checking cfg-if v1.0.0
Compiling libc v0.2.138
Compiling stable_deref_trait v1.2.0
Compiling proc-macro-hack v0.5.19
Compiling version_check v0.9.3
Compiling autocfg v1.1.0
Checking once_cell v1.16.0
Checking smallvec v1.8.1
Compiling log v0.4.14
Compiling cc v1.0.76
Compiling parking_lot_core v0.8.5
Checking scopeguard v1.1.0
Checking rustc-hash v1.1.0
Checking pin-project-lite v0.2.8
Compiling memchr v2.5.0
Compiling typenum v1.12.0
Checking bitflags v1.3.2
Compiling self_cell v0.10.2
Compiling unicode-width v0.1.10
Checking thin-vec v0.2.9
Checking arrayvec v0.7.0
Checking fastrand v1.8.0
Checking instant v0.1.12
Checking remove_dir_all v0.5.3
Checking rustc_graphviz v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc_graphviz)
Checking writeable v0.5.0
Checking litemap v0.6.0
Checking scoped-tls v1.0.0
Checking unic-common v0.9.0
Compiling annotate-snippets v0.9.1
Checking unic-char-range v0.9.0
Checking ppv-lite86 v0.2.8
warning: unexpected condition value `cargo-clippy` for condition name `feature`
|
= help: was set with `--cfg` but isn't in the `--check-cfg` expected values
= note: `#[warn(unexpected_cfgs)]` on by default
Compiling type-map v0.4.0
Compiling ryu v1.0.5
Checking unic-ucd-version v0.9.0
Compiling serde_json v1.0.85
Checking unic-char-property v0.9.0
Checking itoa v1.0.2
Checking tracing-core v0.1.28
Checking odht v0.3.1
Checking lazy_static v1.4.0
warning: this returns a `Result<_, ()>`
--> compiler/rustc_graphviz/src/lib.rs:399:5
|
399 | pub fn new<Name: Into<Cow<'a, str>>>(name: Name) -> Result<Id<'a>, ()> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use a custom `Error` type instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err
= note: `#[warn(clippy::result_unit_err)]` on by default
Checking unic-emoji-char v0.9.0
Checking termcolor v1.1.3
Checking rustc_arena v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc_arena)
warning: variables can be used directly in the `format!` string
--> compiler/rustc_graphviz/src/lib.rs:519:31
|
519 | HtmlStr(ref s) => format!("<{}>", s),
| ^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
help: change this to
|
519 - HtmlStr(ref s) => format!("<{}>", s),
519 + HtmlStr(ref s) => format!("<{s}>"),
|
Checking getopts v0.2.21
Checking rustc_fs_util v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc_fs_util)
Checking either v1.6.0
Compiling convert_case v0.4.0
Checking datafrog v2.0.1
warning: variables can be used directly in the `format!` string
--> compiler/rustc_graphviz/src/lib.rs:625:16
|
625 | font = format!(r#"fontname="{}""#, fontname);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
625 - font = format!(r#"fontname="{}""#, fontname);
625 + font = format!(r#"fontname="{fontname}""#);
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_graphviz/src/lib.rs:638:9
|
638 | writeln!(w, r#" node[{}];"#, content_attrs_str)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
638 - writeln!(w, r#" node[{}];"#, content_attrs_str)?;
638 + writeln!(w, r#" node[{content_attrs_str}];"#)?;
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_graphviz/src/lib.rs:639:9
|
639 | writeln!(w, r#" edge[{}];"#, content_attrs_str)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
639 - writeln!(w, r#" edge[{}];"#, content_attrs_str)?;
639 + writeln!(w, r#" edge[{content_attrs_str}];"#)?;
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_graphviz/src/lib.rs:652:13
|
652 | write!(text, "[label={}]", escaped).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
652 - write!(text, "[label={}]", escaped).unwrap();
652 + write!(text, "[label={escaped}]").unwrap();
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_graphviz/src/lib.rs:681:13
|
681 | write!(text, "[label={}]", escaped_label).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
681 - write!(text, "[label={}]", escaped_label).unwrap();
681 + write!(text, "[label={escaped_label}]").unwrap();
|
Checking rustc_apfloat v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc_apfloat)
Checking tinyvec_macros v0.1.0
Checking regex-syntax v0.6.26
Compiling crossbeam-utils v0.8.14
Compiling crc32fast v1.3.2
warning: `rustc_graphviz` (lib) generated 8 warnings (run `cargo fix --lib -p rustc_graphviz` to apply 6 suggestions)
Checking sharded-slab v0.1.1
Checking tinyvec v1.6.0
Checking thread_local v1.1.4
warning: `rustc_fs_util` (lib) generated 1 warning (1 duplicate)
Checking ansi_term v0.12.1
Checking rustc_lexer v0.1.0 (/home/gh-jyn514/rust3/compiler/rustc_lexer)
Checking adler v1.0.2
warning: mutable borrow from immutable input(s)
--> compiler/rustc_arena/src/lib.rs:135:56
|
135 | fn alloc_from_iter(self, arena: &TypedArena<T>) -> &mut [T];
| ^^^^^^^^
|
note: immutable borrow here
--> compiler/rustc_arena/src/lib.rs:135:37
|
135 | fn alloc_from_iter(self, arena: &TypedArena<T>) -> &mut [T];
| ^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_from_ref
= note: `#[warn(clippy::mut_from_ref)]` on by default
Compiling snap v1.0.1
warning: mutable borrow from immutable input(s)
--> compiler/rustc_arena/src/lib.rs:208:39
|
208 | pub fn alloc(&self, object: T) -> &mut T {
| ^^^^^^
|
note: immutable borrow here
--> compiler/rustc_arena/src/lib.rs:208:18
|
208 | pub fn alloc(&self, object: T) -> &mut T {
| ^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_from_ref
Checking itertools v0.10.5
warning: mutable borrow from immutable input(s)
--> compiler/rustc_arena/src/lib.rs:449:42
|
449 | pub fn alloc<T>(&self, object: T) -> &mut T {
| ^^^^^^
|
note: immutable borrow here
--> compiler/rustc_arena/src/lib.rs:449:21
|
449 | pub fn alloc<T>(&self, object: T) -> &mut T {
| ^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_from_ref
warning: mutable borrow from immutable input(s)
--> compiler/rustc_arena/src/lib.rs:469:50
|
469 | pub fn alloc_slice<T>(&self, slice: &[T]) -> &mut [T]
| ^^^^^^^^
|
note: immutable borrow here
--> compiler/rustc_arena/src/lib.rs:469:27
|
469 | pub fn alloc_slice<T>(&self, slice: &[T]) -> &mut [T]
| ^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_from_ref
warning: mutable borrow from immutable input(s)
--> compiler/rustc_arena/src/lib.rs:491:10
|
491 | ) -> &mut [T] {
| ^^^^^^^^
|
note: immutable borrow here
--> compiler/rustc_arena/src/lib.rs:487:9
|
487 | &self,
| ^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_from_ref
warning: mutable borrow from immutable input(s)
--> compiler/rustc_arena/src/lib.rs:508:77
|
508 | pub fn alloc_from_iter<T, I: IntoIterator<Item = T>>(&self, iter: I) -> &mut [T] {
| ^^^^^^^^
|
note: immutable borrow here
--> compiler/rustc_arena/src/lib.rs:508:58
|
508 | pub fn alloc_from_iter<T, I: IntoIterator<Item = T>>(&self, iter: I) -> &mut [T] {
| ^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_from_ref
Compiling ahash v0.7.4
warning: `rustc_arena` (lib) generated 7 warnings (1 duplicate)
Compiling generic-array v0.14.4
Checking unicode-script v0.5.5
Checking ena v0.14.0
Checking libloading v0.7.1
Compiling indexmap v1.9.1
Compiling lock_api v0.4.7
Checking miniz_oxide v0.5.3
Checking fixedbitset v0.2.0
Checking static_assertions v1.1.0
Checking fallible-iterator v0.2.0
Checking rustc-demangle v0.1.21
Checking punycode v0.4.1
Checking pathdiff v0.2.1
Checking polonius-engine v0.13.0
Checking tracing-log v0.1.2
warning: unnecessary closure used to substitute value for `Option::None`
--> compiler/rustc_lexer/src/unescape.rs:198:31
|
198 | break std::char::from_u32(value).ok_or_else(|| {
| _______________________________^
199 | | if value > 0x10FFFF {
200 | | EscapeError::OutOfRangeUnicodeEscape
201 | | } else {
202 | | EscapeError::LoneSurrogateUnicodeEscape
203 | | }
204 | | })?;
| |__________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
= note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default
help: use `ok_or(..)` instead
|
198 ~ break std::char::from_u32(value).ok_or({
199 + if value > 0x10FFFF {
200 + EscapeError::OutOfRangeUnicodeEscape
201 + } else {
202 + EscapeError::LoneSurrogateUnicodeEscape
203 + }
204 ~ })?;
|
warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent
--> compiler/rustc_lexer/src/unescape.rs:300:26
|
300 | if let Some(c) = tail.chars().nth(0) {
| ^^^^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `tail.chars().next()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero
= note: `#[warn(clippy::iter_nth_zero)]` on by default
Checking rustc_error_codes v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc_error_codes)
Checking regex-automata v0.2.0
warning: use of `char::is_digit` with literal radix of 10
--> compiler/rustc_lexer/src/lib.rs:602:20
|
602 | if self.first().is_digit(10) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.first().is_ascii_digit()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix
= note: `#[warn(clippy::is_digit_ascii_radix)]` on by default
warning: use of `char::is_digit` with literal radix of 10
--> compiler/rustc_lexer/src/lib.rs:633:42
|
633 | is_id_start(self.first()) || self.first().is_digit(10)
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.first().is_ascii_digit()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix
warning: use of `char::is_digit` with literal radix of 10
--> compiler/rustc_lexer/src/lib.rs:649:34
|
649 | let starts_with_number = self.first().is_digit(10);
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.first().is_ascii_digit()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix
Checking aho-corasick v0.7.18
warning: `rustc_lexer` (lib) generated 6 warnings (1 duplicate) (run `cargo fix --lib -p rustc_lexer` to apply 5 suggestions)
Compiling rustc-main v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc)
Checking coverage_test_macros v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc_mir_transform/src/coverage/test_macros)
warning: `rustc_error_codes` (lib) generated 1 warning (1 duplicate)
Compiling psm v0.1.21
Compiling stacker v0.1.15
Compiling rustc_llvm v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc_llvm)
Checking crossbeam-channel v0.5.6
warning: `if` chain can be rewritten with `match`
--> compiler/rustc_apfloat/src/ieee.rs:391:9
|
391 | / if exp == 0 {
392 | | // Nothing to do.
393 | | } else if exp > 0 {
394 | | // Just shift left.
... |
437 | | }
438 | | }
| |_________^
|
= help: consider rewriting the `if` chain to use `cmp` and `match`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_chain
= note: `#[warn(clippy::comparison_chain)]` on by default
warning: variables can be used directly in the `format!` string
--> compiler/rustc_apfloat/src/ieee.rs:573:17
|
573 | write!(f, "{:+}", exp)?;
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
help: change this to
|
573 - write!(f, "{:+}", exp)?;
573 + write!(f, "{exp:+}")?;
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_apfloat/src/ieee.rs:575:17
|
575 | write!(f, "{:+03}", exp)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
575 - write!(f, "{:+03}", exp)?;
575 + write!(f, "{exp:+03}")?;
|
Checking getrandom v0.2.8
Checking tempfile v3.3.0
Checking memmap2 v0.2.1
Checking jobserver v0.1.24
Checking cpufeatures v0.2.5
Checking termize v0.1.1
Checking atty v0.2.14
Checking flate2 v1.0.23
warning: casting the result of `i32::abs()` to usize
--> compiler/rustc_apfloat/src/ieee.rs:2001:29
|
2001 | let mut power = dec_exp.abs() as usize;
| ^^^^^^^^^^^^^ help: replace with: `dec_exp.unsigned_abs()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned
= note: `#[warn(clippy::cast_abs_to_unsigned)]` on by default
warning: `if` chain can be rewritten with `match`
--> compiler/rustc_apfloat/src/ieee.rs:2528:13
|
2528 | / if bits == 0 {
2529 | | reverse = cmp(a_sig, b_sig) == Ordering::Less;
2530 | | loss = Loss::ExactlyZero;
2531 | | } else if bits > 0 {
... |
2538 | | reverse = true;
2539 | | }
| |_____________^
|
= help: consider rewriting the `if` chain to use `cmp` and `match`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_chain
Compiling cstr v0.2.8
Checking rand_core v0.6.2
warning: `rustc_apfloat` (lib) generated 6 warnings (1 duplicate) (run `cargo fix --lib -p rustc_apfloat` to apply 3 suggestions)
Checking parking_lot v0.11.2
Checking unicode-normalization v0.1.22
Checking rand_chacha v0.3.0
Checking rand_xoshiro v0.6.0
Checking hashbrown v0.12.3
Checking measureme v10.1.0
Checking rand v0.8.5
Checking unicode-security v0.1.0
Checking crypto-common v0.1.2
Checking block-buffer v0.10.2
Checking digest v0.10.2
Checking regex v1.5.6
Checking regex-automata v0.1.10
Checking twox-hash v1.6.3
Checking sha-1 v0.10.0
Checking sha2 v0.10.1
Checking md-5 v0.10.0
Checking rustc_serialize v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc_serialize)
Checking petgraph v0.5.1
Checking object v0.29.0
Checking gimli v0.26.1
warning: unneeded unit return type
--> compiler/rustc_serialize/src/serialize.rs:220:25
|
220 | fn decode(_: &mut D) -> () {}
| ^^^^^^ help: remove the `-> ()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit
= note: `#[warn(clippy::unused_unit)]` on by default
warning: the loop variable `i` is only used to index `v`
--> compiler/rustc_serialize/src/serialize.rs:298:18
|
298 | for i in 0..len {
| ^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
= note: `#[warn(clippy::needless_range_loop)]` on by default
help: consider using an iterator
|
298 | for <item> in v.iter_mut().take(len) {
| ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
warning: you should consider adding a `Default` implementation for `MemEncoder`
--> compiler/rustc_serialize/src/opaque.rs:18:5
|
18 | / pub fn new() -> MemEncoder {
19 | | MemEncoder { data: vec![] }
20 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
17 + impl Default for MemEncoder {
18 + fn default() -> Self {
19 + Self::new()
20 + }
21 + }
|
Checking matchers v0.1.0
warning: this let-binding has unit value
--> compiler/rustc_serialize/src/opaque.rs:407:9
|
407 | let _result = self.flush();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `self.flush();`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
= note: `#[warn(clippy::let_unit_value)]` on by default
warning: `rustc_serialize` (lib) generated 5 warnings (1 duplicate) (run `cargo fix --lib -p rustc_serialize` to apply 2 suggestions)
Checking synstructure v0.12.6
Checking ar_archive_writer v0.1.1
Compiling zerofrom-derive v0.1.1
Compiling yoke-derive v0.6.1
Compiling zerovec-derive v0.9.0
Compiling displaydoc v0.2.3
Compiling thiserror-impl v1.0.33
Compiling tracing-attributes v0.1.22
Compiling icu_provider_macros v1.0.0
Compiling chalk-derive v0.87.0
Compiling derive_more v0.99.17
Checking chalk-ir v0.87.0
Compiling thiserror v1.0.33
Checking tracing v0.1.35
Compiling fluent-syntax v0.11.0
Compiling zerofrom v0.1.1
Checking tracing-subscriber v0.3.3
Checking thorin-dwp v0.3.0
Checking tracing-tree v0.2.0
Checking chalk-solve v0.87.0
Checking rustc_log v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc_log)
warning: needless `fn main` in doctest
--> compiler/rustc_log/src/lib.rs:16:4
|
16 | //! fn main() {
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
= note: `#[warn(clippy::needless_doctest_main)]` on by default
warning: variables can be used directly in the `format!` string
--> compiler/rustc_log/src/lib.rs:115:48
|
115 | Error::InvalidColorValue(value) => write!(
| ________________________________________________^
116 | | formatter,
117 | | "invalid log color value '{}': expected one of always, never, or auto",
118 | | value,
119 | | ),
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
warning: `rustc_log` (lib) generated 3 warnings (1 duplicate) (run `cargo fix --lib -p rustc_log` to apply 1 suggestion)
Checking chalk-engine v0.87.0
Checking yoke v0.6.2
Checking gsgdt v0.1.2
Checking rls-span v0.5.3
Checking zerovec v0.9.0
Checking rls-data v0.19.1
Checking tinystr v0.7.0
Checking unic-langid-impl v0.9.1
Checking icu_locid v1.0.0
Checking icu_provider v1.0.1
Checking icu_provider_adapters v1.0.0
Checking icu_list v1.0.0
Compiling unic-langid-macros-impl v0.9.1
passing clippy --sysroot /home/gh-jyn514/rust3/build/aarch64-unknown-linux-gnu/stage1
Checking rustc_baked_icu_data v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc_baked_icu_data)
warning: `rustc_baked_icu_data` (lib) generated 1 warning (1 duplicate)
Compiling unic-langid-macros v0.9.1
passing clippy --sysroot /home/gh-jyn514/rust3/build/aarch64-unknown-linux-gnu/stage1
passing clippy --sysroot /home/gh-jyn514/rust3/build/aarch64-unknown-linux-gnu/stage1
Checking unic-langid v0.9.1
passing clippy --sysroot /home/gh-jyn514/rust3/build/aarch64-unknown-linux-gnu/stage1
passing clippy --sysroot /home/gh-jyn514/rust3/build/aarch64-unknown-linux-gnu/stage1
Compiling intl-memoizer v0.5.1
Compiling intl_pluralrules v7.0.2
Compiling fluent-langneg v0.13.0
Checking fluent-bundle v0.15.2
Checking rustc_macros v0.1.0 (/home/gh-jyn514/rust3/compiler/rustc_macros)
Checking rustc_index v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc_index)
warning: variables can be used directly in the `format!` string
--> compiler/rustc_index/src/bit_set.rs:1094:34
|
1094 | result.push_str(&format!("{}{:02x}", sep, byte));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
help: change this to
|
1094 - result.push_str(&format!("{}{:02x}", sep, byte));
1094 + result.push_str(&format!("{sep}{byte:02x}"));
|
warning: the loop variable `index` is only used to index `words`
--> compiler/rustc_index/src/bit_set.rs:1709:22
|
1709 | for index in start..end {
| ^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
= note: `#[warn(clippy::needless_range_loop)]` on by default
help: consider using an iterator
|
1709 | for <item> in words.iter_mut().take(end).skip(start) {
| ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: variables can be used directly in the `format!` string
--> compiler/rustc_index/src/interval.rs:136:9
|
136 | / debug_assert!(
137 | | self.check_invariants(),
138 | | "wrong intervals after insert {:?}..={:?} to {:?}",
139 | | start,
140 | | end,
141 | | self
142 | | );
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
warning: method `into_iter` can be confused for the standard trait method `std::iter::IntoIterator::into_iter`
--> compiler/rustc_index/src/vec.rs:155:5
|
155 | / pub fn into_iter(self) -> vec::IntoIter<T> {
156 | | self.raw.into_iter()
157 | | }
| |_____^
|
= help: consider implementing the trait `std::iter::IntoIterator` or choosing a less ambiguous method name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
= note: `#[warn(clippy::should_implement_trait)]` on by default
warning: `rustc_index` (lib) generated 5 warnings (1 duplicate) (run `cargo fix --lib -p rustc_index` to apply 2 suggestions)
Checking rustc_data_structures v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc_data_structures)
warning: consider choosing a more descriptive name
--> compiler/rustc_data_structures/src/sip128.rs:400:13
|
400 | let _0 = state.v0 ^ state.v1 ^ state.v2 ^ state.v3;
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits
= note: `#[warn(clippy::just_underscores_and_digits)]` on by default
warning: consider choosing a more descriptive name
--> compiler/rustc_data_structures/src/sip128.rs:404:13
|
404 | let _1 = state.v0 ^ state.v1 ^ state.v2 ^ state.v3;
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits
warning: consider choosing a more descriptive name
--> compiler/rustc_data_structures/src/stable_hasher.rs:48:14
|
48 | let (_0, _1) = hasher.finalize();
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits
warning: consider choosing a more descriptive name
--> compiler/rustc_data_structures/src/stable_hasher.rs:48:18
|
48 | let (_0, _1) = hasher.finalize();
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits
warning: consider choosing a more descriptive name
--> compiler/rustc_data_structures/src/stable_hasher.rs:337:18
|
337 | let (ref _0,) = *self;
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits
warning: consider choosing a more descriptive name
--> compiler/rustc_data_structures/src/stable_hasher.rs:344:18
|
344 | let (ref _0, ref _1) = *self;
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits
warning: consider choosing a more descriptive name
--> compiler/rustc_data_structures/src/stable_hasher.rs:344:26
|
344 | let (ref _0, ref _1) = *self;
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits
warning: consider choosing a more descriptive name
--> compiler/rustc_data_structures/src/stable_hasher.rs:357:18
|
357 | let (ref _0, ref _1, ref _2) = *self;
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits
warning: consider choosing a more descriptive name
--> compiler/rustc_data_structures/src/stable_hasher.rs:357:26
|
357 | let (ref _0, ref _1, ref _2) = *self;
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits
warning: consider choosing a more descriptive name
--> compiler/rustc_data_structures/src/stable_hasher.rs:357:34
|
357 | let (ref _0, ref _1, ref _2) = *self;
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits
warning: consider choosing a more descriptive name
--> compiler/rustc_data_structures/src/stable_hasher.rs:372:18
|
372 | let (ref _0, ref _1, ref _2, ref _3) = *self;
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits
warning: consider choosing a more descriptive name
--> compiler/rustc_data_structures/src/stable_hasher.rs:372:26
|
372 | let (ref _0, ref _1, ref _2, ref _3) = *self;
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits
warning: consider choosing a more descriptive name
--> compiler/rustc_data_structures/src/stable_hasher.rs:372:34
|
372 | let (ref _0, ref _1, ref _2, ref _3) = *self;
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits
warning: consider choosing a more descriptive name
--> compiler/rustc_data_structures/src/stable_hasher.rs:372:42
|
372 | let (ref _0, ref _1, ref _2, ref _3) = *self;
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits
warning: consider choosing a more descriptive name
--> compiler/rustc_data_structures/src/fingerprint.rs:16:16
|
16 | pub fn new(_0: u64, _1: u64) -> Fingerprint {
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits
warning: consider choosing a more descriptive name
--> compiler/rustc_data_structures/src/fingerprint.rs:16:25
|
16 | pub fn new(_0: u64, _1: u64) -> Fingerprint {
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits
warning: consider choosing a more descriptive name
--> compiler/rustc_data_structures/src/fingerprint.rs:137:14
|
137 | let (_0, _1) = hasher.finalize();
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits
warning: consider choosing a more descriptive name
--> compiler/rustc_data_structures/src/fingerprint.rs:137:18
|
137 | let (_0, _1) = hasher.finalize();
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> compiler/rustc_llvm/src/lib.rs:33:57
|
33 | let slice = slice::from_raw_parts(ptr as *const u8, size as usize);
| ^^^^^^^^^^^^^ help: try: `size`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default
warning: `rustc_llvm` (lib) generated 2 warnings (1 duplicate) (run `cargo fix --lib -p rustc_llvm` to apply 1 suggestion)
warning: manual `RangeInclusive::contains` implementation
--> compiler/rustc_data_structures/src/base_n.rs:17:19
|
17 | debug_assert!(base >= 2 && base <= MAX_BASE);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(2..=MAX_BASE).contains(&base)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
= note: `#[warn(clippy::manual_range_contains)]` on by default
warning: this loop could be written as a `for` loop
--> compiler/rustc_data_structures/src/graph/dominators/mod.rs:59:9
|
59 | while let Some(successor) = frame.iter.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for successor in frame.iter.by_ref()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
= note: `#[warn(clippy::while_let_on_iterator)]` on by default
warning: variables can be used directly in the `format!` string
--> compiler/rustc_data_structures/src/graph/dominators/mod.rs:280:9
|
280 | assert!(self.is_reachable(node), "node {:?} is not reachable", node);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
help: change this to
|
280 - assert!(self.is_reachable(node), "node {:?} is not reachable", node);
280 + assert!(self.is_reachable(node), "node {node:?} is not reachable");
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_data_structures/src/graph/dominators/mod.rs:285:9
|
285 | assert!(self.is_reachable(node), "node {:?} is not reachable", node);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
285 - assert!(self.is_reachable(node), "node {:?} is not reachable", node);
285 + assert!(self.is_reachable(node), "node {node:?} is not reachable");
|
warning: you should consider adding a `Default` implementation for `Graph<N, E>`
--> compiler/rustc_data_structures/src/graph/implementation/mod.rs:88:5
|
88 | / pub fn new() -> Graph<N, E> {
89 | | Graph { nodes: SnapshotVec::new(), edges: SnapshotVec::new() }
90 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
87 + impl<N: Debug, E: Debug> Default for Graph<N, E> {
88 + fn default() -> Self {
89 + Self::new()
90 + }
91 + }
|
warning: this loop could be written as a `for` loop
--> compiler/rustc_data_structures/src/graph/iterate/mod.rs:51:9
|
51 | while let Some(successor) = frame.iter.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for successor in frame.iter.by_ref()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
warning: this loop could be written as a `for` loop
--> compiler/rustc_data_structures/src/graph/iterate/mod.rs:115:9
|
115 | while let Some(_) = self.next() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for _ in self.by_ref()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
warning: variables can be used directly in the `format!` string
--> compiler/rustc_data_structures/src/graph/scc/mod.rs:236:52
|
236 | WalkReturn::Cycle { min_depth } => panic!(
| ____________________________________________________^
237 | | "`start_walk_node({:?})` returned cycle with depth {:?}",
238 | | node, min_depth
239 | | ),
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
warning: variables can be used directly in the `format!` string
--> compiler/rustc_data_structures/src/graph/scc/mod.rs:274:50
|
274 | NodeState::InCycleWith { parent } => panic!(
| __________________________________________________^
275 | | "`find_state` returned `InCycleWith({:?})`, which ought to be impossible",
276 | | parent
277 | | ),
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
warning: variables can be used directly in the `format!` string
--> compiler/rustc_data_structures/src/graph/scc/mod.rs:372:26
|
372 | other => panic!("Invalid previous link while compressing cycle: {:?}", other),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
372 - other => panic!("Invalid previous link while compressing cycle: {:?}", other),
372 + other => panic!("Invalid previous link while compressing cycle: {other:?}"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_data_structures/src/graph/scc/mod.rs:397:21
|
397 | panic!("invalid parent state: {:?}", node_state)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
397 - panic!("invalid parent state: {:?}", node_state)
397 + panic!("invalid parent state: {node_state:?}")
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_data_structures/src/obligation_forest/graphviz.rs:33:43
|
33 | let file_path = dir.as_ref().join(format!("{:010}_{}.gv", counter, description));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
33 - let file_path = dir.as_ref().join(format!("{:010}_{}.gv", counter, description));
33 + let file_path = dir.as_ref().join(format!("{counter:010}_{description}.gv"));
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_data_structures/src/obligation_forest/graphviz.rs:50:22
|
50 | dot::Id::new(format!("obligation_{}", index)).unwrap()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
50 - dot::Id::new(format!("obligation_{}", index)).unwrap()
50 + dot::Id::new(format!("obligation_{index}")).unwrap()
|
warning: you should consider adding a `Default` implementation for `ObligationForest<O>`
--> compiler/rustc_data_structures/src/obligation_forest/mod.rs:308:5
|
308 | / pub fn new() -> ObligationForest<O> {
309 | | ObligationForest {
310 | | nodes: vec![],
311 | | done_cache: Default::default(),
... |
316 | | }
317 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
307 + impl<O: ForestObligation> Default for ObligationForest<O> {
308 + fn default() -> Self {
309 + Self::new()
310 + }
311 + }
|
warning: struct `ObligationForest` has a public `len` method, but no `is_empty` method
--> compiler/rustc_data_structures/src/obligation_forest/mod.rs:321:5
|
321 | pub fn len(&self) -> usize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty
= note: `#[warn(clippy::len_without_is_empty)]` on by default
warning: `assert!(false)` should probably be replaced
--> compiler/rustc_data_structures/src/obligation_forest/mod.rs:387:27
|
387 | self.compress(|_| assert!(false));
| ^^^^^^^^^^^^^^
|
= help: use `panic!()` or `unreachable!()`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants
= note: `#[warn(clippy::assertions_on_constants)]` on by default
warning: the loop variable `index` is used to index `node_rewrites`
--> compiler/rustc_data_structures/src/obligation_forest/mod.rs:638:22
|
638 | for index in 0..orig_nodes_len {
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
= note: `#[warn(clippy::needless_range_loop)]` on by default
help: consider using an iterator
|
638 | for (index, <item>) in node_rewrites.iter_mut().enumerate().take(orig_nodes_len) {
| ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: needless `fn main` in doctest
--> compiler/rustc_data_structures/src/owning_ref/mod.rs:58:1
|
58 | / use rustc_data_structures::owning_ref::BoxRef;
59 | |
60 | | fn main() {
61 | | // Create an array owned by a Box.
... |
235 | | ```
236 | | */
| |__^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
= note: `#[warn(clippy::needless_doctest_main)]` on by default
warning: needless `fn main` in doctest
--> compiler/rustc_data_structures/src/owning_ref/mod.rs:79:1
|
79 | / use rustc_data_structures::owning_ref::BoxRef;
80 | |
81 | | fn main() {
82 | | struct Foo {
... |
235 | | ```
236 | | */
| |__^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: needless `fn main` in doctest
--> compiler/rustc_data_structures/src/owning_ref/mod.rs:106:1
|
106 | / use rustc_data_structures::owning_ref::VecRef;
107 | |
108 | | fn main() {
109 | | let v = VecRef::new(vec![1, 2, 3, 4, 5]).map(|v| &v[3]);
... |
235 | | ```
236 | | */
| |__^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: needless `fn main` in doctest
--> compiler/rustc_data_structures/src/owning_ref/mod.rs:117:1
|
117 | / use rustc_data_structures::owning_ref::StringRef;
118 | |
119 | | fn main() {
120 | | let s = StringRef::new("hello world".to_owned())
... |
235 | | ```
236 | | */
| |__^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: needless `fn main` in doctest
--> compiler/rustc_data_structures/src/owning_ref/mod.rs:130:1
|
130 | / use rustc_data_structures::owning_ref::RcRef;
131 | | use std::rc::Rc;
132 | |
133 | | fn main() {
... |
235 | | ```
236 | | */
| |__^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: needless `fn main` in doctest
--> compiler/rustc_data_structures/src/owning_ref/mod.rs:152:1
|
152 | / use rustc_data_structures::owning_ref::ArcRef;
153 | | use std::sync::Arc;
154 | |
155 | | fn main() {
... |
235 | | ```
236 | | */
| |__^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: needless `fn main` in doctest
--> compiler/rustc_data_structures/src/owning_ref/mod.rs:184:1
|
184 | / use rustc_data_structures::owning_ref::RefRef;
185 | | use std::cell::{RefCell, Ref};
186 | |
187 | | fn main() {
... |
235 | | ```
236 | | */
| |__^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: needless `fn main` in doctest
--> compiler/rustc_data_structures/src/owning_ref/mod.rs:214:1
|
214 | / use rustc_data_structures::owning_ref::RefMutRefMut;
215 | | use std::cell::{RefCell, RefMut};
216 | |
217 | | fn main() {
... |
235 | | ```
236 | | */
| |__^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: needless `fn main` in doctest
--> compiler/rustc_data_structures/src/owning_ref/mod.rs:320:8
|
320 | /// use rustc_data_structures::owning_ref::OwningRef;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: needless `fn main` in doctest
--> compiler/rustc_data_structures/src/owning_ref/mod.rs:355:8
|
355 | /// use rustc_data_structures::owning_ref::OwningRef;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: needless `fn main` in doctest
--> compiler/rustc_data_structures/src/owning_ref/mod.rs:382:8
|
382 | /// use rustc_data_structures::owning_ref::OwningRef;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: needless `fn main` in doctest
--> compiler/rustc_data_structures/src/owning_ref/mod.rs:432:8
|
432 | /// use rustc_data_structures::owning_ref::{OwningRef, Erased};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: needless `fn main` in doctest
--> compiler/rustc_data_structures/src/owning_ref/mod.rs:506:8
|
506 | /// use rustc_data_structures::owning_ref::OwningRefMut;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: needless `fn main` in doctest
--> compiler/rustc_data_structures/src/owning_ref/mod.rs:541:8
|
541 | /// use rustc_data_structures::owning_ref::OwningRefMut;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: needless `fn main` in doctest
--> compiler/rustc_data_structures/src/owning_ref/mod.rs:568:8
|
568 | /// use rustc_data_structures::owning_ref::OwningRefMut;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: needless `fn main` in doctest
--> compiler/rustc_data_structures/src/owning_ref/mod.rs:595:8
|
595 | /// use rustc_data_structures::owning_ref::OwningRefMut;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: needless `fn main` in doctest
--> compiler/rustc_data_structures/src/owning_ref/mod.rs:624:8
|
624 | /// use rustc_data_structures::owning_ref::OwningRefMut;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: needless `fn main` in doctest
--> compiler/rustc_data_structures/src/owning_ref/mod.rs:674:8
|
674 | /// use rustc_data_structures::owning_ref::{OwningRefMut, Erased};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
warning: variables can be used directly in the `format!` string
--> compiler/rustc_data_structures/src/small_c_str.rs:33:13
|
33 | panic!("The string \"{}\" cannot be converted into a CStr: {}", s, e);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
33 - panic!("The string \"{}\" cannot be converted into a CStr: {}", s, e);
33 + panic!("The string \"{s}\" cannot be converted into a CStr: {e}");
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_data_structures/src/small_c_str.rs:42:13
|
42 | panic!("The string \"{}\" cannot be converted into a CStr: {}", s, e);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
42 - panic!("The string \"{}\" cannot be converted into a CStr: {}", s, e);
42 + panic!("The string \"{s}\" cannot be converted into a CStr: {e}");
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_data_structures/src/small_c_str.rs:77:13
|
77 | panic!("The iterator {:?} cannot be converted into a CStr: {}", data, e);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
77 - panic!("The iterator {:?} cannot be converted into a CStr: {}", data, e);
77 + panic!("The iterator {data:?} cannot be converted into a CStr: {e}");
|
warning: type `svh::Svh` implements inherent method `to_string(&self) -> String` which shadows the implementation of `Display`
--> compiler/rustc_data_structures/src/svh.rs:31:5
|
31 | / pub fn to_string(&self) -> String {
32 | | format!("{:016x}", self.hash)
33 | | }
| |_____^
|
= help: remove the inherent method from type `svh::Svh`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string_shadow_display
= note: `#[warn(clippy::inherent_to_string_shadow_display)]` on by default
warning: you are implementing `Hash` explicitly but have derived `PartialEq`
--> compiler/rustc_data_structures/src/svh.rs:36:1
|
36 | / impl Hash for Svh {
37 | | fn hash<H>(&self, state: &mut H)
38 | | where
39 | | H: Hasher,
... |
42 | | }
43 | | }
| |_^
|
note: `PartialEq` implemented here
--> compiler/rustc_data_structures/src/svh.rs:14:23
|
14 | #[derive(Copy, Clone, PartialEq, Eq, Debug)]
| ^^^^^^^^^ in this derive macro expansion
|
::: /home/gh-jyn514/rust3/library/core/src/cmp.rs:236:1
|
236 | pub macro PartialEq($item:item) {
| ------------------- in this expansion of `#[derive(PartialEq)]`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_hash_xor_eq
= note: `#[warn(clippy::derive_hash_xor_eq)]` on by default
warning: deref which would be done by auto-deref
--> compiler/rustc_data_structures/src/memmap.rs:45:9
|
45 | &*self.0
| ^^^^^^^^ help: try this: `&self.0`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
= note: `#[warn(clippy::explicit_auto_deref)]` on by default
warning: you should consider adding a `Default` implementation for `SortedIndexMultiMap<I, K, V>`
--> compiler/rustc_data_structures/src/sorted_map/index_map.rs:37:5
|
37 | / pub fn new() -> Self {
38 | | SortedIndexMultiMap { items: IndexVec::new(), idx_sorted_by_item_key: Vec::new() }
39 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
35 + impl<I: Idx, K: Ord, V> Default for SortedIndexMultiMap<I, K, V> {
36 + fn default() -> Self {
37 + Self::new()
38 + }
39 + }
|
warning: method `into_iter` can be confused for the standard trait method `std::iter::IntoIterator::into_iter`
--> compiler/rustc_data_structures/src/sorted_map/index_map.rs:53:5
|
53 | / pub fn into_iter(self) -> impl DoubleEndedIterator<Item = (K, V)> {
54 | | self.items.into_iter()
55 | | }
| |_____^
|
= help: consider implementing the trait `std::iter::IntoIterator` or choosing a less ambiguous method name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
= note: `#[warn(clippy::should_implement_trait)]` on by default
warning: this pattern creates a reference to a reference
--> compiler/rustc_data_structures/src/sorted_map.rs:234:29
|
234 | Bound::Included(ref k) => match self.lookup_index_for(k) {
| ^^^^^ help: try this: `k`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
warning: this pattern creates a reference to a reference
--> compiler/rustc_data_structures/src/sorted_map.rs:237:29
|
237 | Bound::Excluded(ref k) => match self.lookup_index_for(k) {
| ^^^^^ help: try this: `k`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_data_structures/src/sorted_map.rs:245:29
|
245 | Bound::Included(ref k) => match self.lookup_index_for(k) {
| ^^^^^ help: try this: `k`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_data_structures/src/sorted_map.rs:249:29
|
249 | Bound::Excluded(ref k) => match self.lookup_index_for(k) {
| ^^^^^ help: try this: `k`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: you should consider adding a `Default` implementation for `StableHasher`
--> compiler/rustc_data_structures/src/stable_hasher.rs:35:5
|
35 | / pub fn new() -> Self {
36 | | StableHasher { state: SipHasher128::new_with_keys(0, 0) }
37 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
33 + impl Default for StableHasher {
34 + fn default() -> Self {
35 + Self::new()
36 + }
37 + }
|
warning: transmute from a `f32` to a `u32`
--> compiler/rustc_data_structures/src/stable_hasher.rs:315:33
|
315 | let val: u32 = unsafe { ::std::mem::transmute(*self) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(*self).to_bits()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#transmute_float_to_int
= note: `#[warn(clippy::transmute_float_to_int)]` on by default
warning: transmute from a `f64` to a `u64`
--> compiler/rustc_data_structures/src/stable_hasher.rs:322:33
|
322 | let val: u64 = unsafe { ::std::mem::transmute(*self) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `(*self).to_bits()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#transmute_float_to_int
warning: you are implementing `Hash` explicitly but have derived `PartialEq`
--> compiler/rustc_data_structures/src/fingerprint.rs:96:1
|
96 | / impl Hash for Fingerprint {
97 | | #[inline]
98 | | fn hash<H: Hasher>(&self, state: &mut H) {
99 | | state.write_fingerprint(self);
100 | | }
101 | | }
| |_^
|
note: `PartialEq` implemented here
--> compiler/rustc_data_structures/src/fingerprint.rs:8:14
|
8 | #[derive(Eq, PartialEq, Ord, PartialOrd, Debug, Clone, Copy)]
| ^^^^^^^^^ in this derive macro expansion
|
::: /home/gh-jyn514/rust3/library/core/src/cmp.rs:236:1
|
236 | pub macro PartialEq($item:item) {
| ------------------- in this expansion of `#[derive(PartialEq)]`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_hash_xor_eq
warning: variables can be used directly in the `format!` string
--> compiler/rustc_data_structures/src/profiling.rs:548:24
|
548 | let filename = format!("{}-{:07}.rustc_profile", crate_name, pid);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
548 - let filename = format!("{}-{:07}.rustc_profile", crate_name, pid);
548 + let filename = format!("{crate_name}-{pid:07}.rustc_profile");
|
warning: type `ShardedHashMap` has a public `len` method, but no `is_empty` method
--> compiler/rustc_data_structures/src/sharded.rs:70:5
|
70 | pub fn len(&self) -> usize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty
warning: any number modulo 1 will be 0
--> compiler/rustc_data_structures/src/sharded.rs:149:5
|
149 | bits % SHARDS
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#modulo_one
= note: `#[warn(clippy::modulo_one)]` on by default
warning: this operation has no effect
--> compiler/rustc_data_structures/src/stack.rs:8:36
|
8 | const STACK_PER_RECURSION: usize = 1 * 1024 * 1024; // 1MB
| ^^^^^^^^ help: consider reducing it to: `1024`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op
= note: `#[warn(clippy::identity_op)]` on by default
warning: this returns a `Result<_, ()>`
--> compiler/rustc_data_structures/src/sync.rs:507:5
|
507 | pub fn try_write(&self) -> Result<WriteGuard<'_, T>, ()> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use a custom `Error` type instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err
= note: `#[warn(clippy::result_unit_err)]` on by default
warning: you should consider adding a `Default` implementation for `TinyList<T>`
--> compiler/rustc_data_structures/src/tiny_list.rs:24:5
|
24 | / pub fn new() -> TinyList<T> {
25 | | TinyList { head: None }
26 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
22 + impl<T: PartialEq> Default for TinyList<T> {
23 + fn default() -> Self {
24 + Self::new()
25 + }
26 + }
|
warning: this pattern creates a reference to a reference
--> compiler/rustc_data_structures/src/tiny_list.rs:51:24
|
51 | while let Some(ref e) = elem {
| ^^^^^ help: try this: `e`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> compiler/rustc_data_structures/src/vec_map.rs:72:9
|
72 | / assert!(
73 | | filter.next().is_none(),
74 | | "Collection {:#?} should have just one matching element",
75 | | self
76 | | );
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> compiler/rustc_data_structures/src/vec_map.rs:124:1
|
124 | impl<K, V> Into<Vec<(K, V)>> for VecMap<K, V> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see
https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
= note: `#[warn(clippy::from_over_into)]` on by default
help: replace the `Into` implentation with `From<vec_map::VecMap<K, V>>`
|
124 ~ impl<K, V> From<VecMap<K, V>> for Vec<(K, V)> {
125 ~ fn from(val: VecMap<K, V>) -> Self {
126 ~ val.0
|
warning: manual implementation of `Option::map`
--> compiler/rustc_data_structures/src/sso/map.rs:259:17
|
259 | / if let Some(index) = array.iter().position(|(k, _v)| k == key) {
260 | | Some(array.swap_remove(index).1)
261 | | } else {
262 | | None
263 | | }
| |_________________^ help: try this: `array.iter().position(|(k, _v)| k == key).map(|index| array.swap_remove(index).1)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map
= note: `#[warn(clippy::manual_map)]` on by default
warning: manual implementation of `Option::map`
--> compiler/rustc_data_structures/src/sso/map.rs:274:17
|
274 | / if let Some(index) = array.iter().position(|(k, _v)| k == key) {
275 | | Some(array.swap_remove(index))
276 | | } else {
277 | | None
278 | | }
| |_________________^ help: try this: `array.iter().position(|(k, _v)| k == key).map(|index| array.swap_remove(index))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map
warning: this let-binding has unit value
--> compiler/rustc_data_structures/src/tagged_ptr/copy.rs:60:9
|
60 | let () = Self::ASSERTION;
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `Self::ASSERTION;`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
= note: `#[warn(clippy::let_unit_value)]` on by default
warning: struct `UnordSet` has a public `len` method, but no `is_empty` method
--> compiler/rustc_data_structures/src/unord.rs:162:5
|
162 | pub fn len(&self) -> usize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty
warning: struct `UnordMap` has a public `len` method, but no `is_empty` method
--> compiler/rustc_data_structures/src/unord.rs:239:5
|
239 | pub fn len(&self) -> usize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty
warning: struct `UnordBag` has a public `len` method, but no `is_empty` method
--> compiler/rustc_data_structures/src/unord.rs:304:5
|
304 | pub fn len(&self) -> usize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty
warning: `rustc_data_structures` (lib) generated 85 warnings (1 duplicate) (run `cargo fix --lib -p rustc_data_structures` to apply 28 suggestions)
Checking rustc_span v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc_span)
Checking rustc_abi v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc_abi)
Checking rustc_type_ir v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc_type_ir)
Checking rustc_parse_format v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc_parse_format)
warning: unneeded unit return type
--> compiler/rustc_type_ir/src/sty.rs:382:55
|
382 | fn hash<__H: hash::Hasher>(&self, state: &mut __H) -> () {
| ^^^^^^ help: remove the `-> ()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit
= note: `#[warn(clippy::unused_unit)]` on by default
warning: unneeded unit return type
--> compiler/rustc_type_ir/src/sty.rs:1010:51
|
1010 | fn hash<H: hash::Hasher>(&self, state: &mut H) -> () {
| ^^^^^^ help: remove the `-> ()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit
warning: this `else { if .. }` block can be collapsed
--> compiler/rustc_abi/src/layout.rs:353:20
|
353 | } else {
| ____________________^
354 | | if !always_sized { StructKind::MaybeUnsized } else { StructKind::AlwaysSized }
355 | | };
| |_____________^ help: collapse nested if block: `if !always_sized { StructKind::MaybeUnsized } else { StructKind::AlwaysSized }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
= note: `#[warn(clippy::collapsible_else_if)]` on by default
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse_format/src/lib.rs:450:35
|
450 | let description = format!("expected `'}}'`, found `{:?}`", maybe);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
help: change this to
|
450 - let description = format!("expected `'}}'`, found `{:?}`", maybe);
450 + let description = format!("expected `'}}'`, found `{maybe:?}`");
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse_format/src/lib.rs:474:31
|
474 | let description = format!("expected `{:?}` but string was terminated", c);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
474 - let description = format!("expected `{:?}` but string was terminated", c);
474 + let description = format!("expected `{c:?}` but string was terminated");
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse_format/src/lib.rs:479:29
|
479 | let label = format!("expected `{:?}`", c);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
479 - let label = format!("expected `{:?}`", c);
479 + let label = format!("expected `{c:?}`");
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse_format/src/lib.rs:500:39
|
500 | self.err(description, format!("expected `{:?}`", c), pos.to(pos));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
500 - self.err(description, format!("expected `{:?}`", c), pos.to(pos));
500 + self.err(description, format!("expected `{c:?}`"), pos.to(pos));
|
warning: use of `char::is_digit` with literal radix of 16
--> compiler/rustc_parse_format/src/lib.rs:930:67
|
930 | ... s.clone().take(6).take_while(|(_, c)| c.is_digit(16)).count();
| ^^^^^^^^^^^^^^ help: try: `c.is_ascii_hexdigit()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix
= note: `#[warn(clippy::is_digit_ascii_radix)]` on by default
warning: use of `char::is_digit` with literal radix of 16
--> compiler/rustc_parse_format/src/lib.rs:949:31
|
949 | } else if next_c.is_digit(16) {
| ^^^^^^^^^^^^^^^^^^^ help: try: `next_c.is_ascii_hexdigit()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix
warning: use of `char::is_digit` with literal radix of 16
--> compiler/rustc_parse_format/src/lib.rs:956:32
|
956 | ... if c.is_digit(16) {
| ^^^^^^^^^^^^^^ help: try: `c.is_ascii_hexdigit()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix
warning: `rustc_parse_format` (lib) generated 8 warnings (1 duplicate) (run `cargo fix --lib -p rustc_parse_format` to apply 7 suggestions)
warning: variables can be used directly in the `format!` string
--> compiler/rustc_type_ir/src/sty.rs:1031:35
|
1031 | ReEarlyBound(data) => write!(f, "ReEarlyBound({:?})", data),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
help: change this to
|
1031 - ReEarlyBound(data) => write!(f, "ReEarlyBound({:?})", data),
1031 + ReEarlyBound(data) => write!(f, "ReEarlyBound({data:?})"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_type_ir/src/sty.rs:1034:17
|
1034 | write!(f, "ReLateBound({:?}, {:?})", binder_id, bound_region)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
1034 - write!(f, "ReLateBound({:?}, {:?})", binder_id, bound_region)
1034 + write!(f, "ReLateBound({binder_id:?}, {bound_region:?})")
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_type_ir/src/sty.rs:1043:43
|
1043 | RePlaceholder(placeholder) => write!(f, "RePlaceholder({:?})", placeholder),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
1043 - RePlaceholder(placeholder) => write!(f, "RePlaceholder({:?})", placeholder),
1043 + RePlaceholder(placeholder) => write!(f, "RePlaceholder({placeholder:?})"),
|
warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> compiler/rustc_abi/src/layout.rs:234:21
|
234 | / match (a.abi, b.abi) {
235 | | (Abi::Scalar(a), Abi::Scalar(b)) => {
236 | | // Order by the memory placement, not source order.
237 | | let ((i, a), (j, b)) = if offsets[i] < offsets[j] {
... |
260 | | _ => {}
261 | | }
| |_____________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
= note: `#[warn(clippy::single_match)]` on by default
help: try this
|
234 ~ if let (Abi::Scalar(a), Abi::Scalar(b)) = (a.abi, b.abi) {
235 + // Order by the memory placement, not source order.
236 + let ((i, a), (j, b)) = if offsets[i] < offsets[j] {
237 + ((i, a), (j, b))
238 + } else {
239 + ((j, b), (i, a))
240 + };
241 + let pair = self.scalar_pair::<V>(a, b);
242 + let pair_offsets = match pair.fields {
243 + FieldsShape::Arbitrary { ref offsets, ref memory_index } => {
244 + assert_eq!(memory_index, &[0, 1]);
245 + offsets
246 + }
247 + _ => panic!(),
248 + };
249 + if offsets[i] == pair_offsets[0]
250 + && offsets[j] == pair_offsets[1]
251 + && align == pair.align
252 + && size == pair.size
253 + {
254 + // We can use `ScalarPair` only when it matches our
255 + // already computed layout (including `#[repr(C)]`).
256 + abi = pair.abi;
257 + }
258 + }
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_abi/src/layout.rs:422:22
|
422 | _ => assert!(
| ______________________^
423 | | start == Bound::Unbounded && end == Bound::Unbounded,
424 | | "nonscalar layout for layout_scalar_valid_range type: {:#?}",
425 | | st,
426 | | ),
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
warning: variables can be used directly in the `format!` string
--> compiler/rustc_type_ir/src/lib.rs:721:27
|
721 | FreshTy(v) => write!(f, "FreshTy({:?})", v),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
721 - FreshTy(v) => write!(f, "FreshTy({:?})", v),
721 + FreshTy(v) => write!(f, "FreshTy({v:?})"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_type_ir/src/lib.rs:722:30
|
722 | FreshIntTy(v) => write!(f, "FreshIntTy({:?})", v),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
722 - FreshIntTy(v) => write!(f, "FreshIntTy({:?})", v),
722 + FreshIntTy(v) => write!(f, "FreshIntTy({v:?})"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_type_ir/src/lib.rs:723:32
|
723 | FreshFloatTy(v) => write!(f, "FreshFloatTy({:?})", v),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
723 - FreshFloatTy(v) => write!(f, "FreshFloatTy({:?})", v),
723 + FreshFloatTy(v) => write!(f, "FreshFloatTy({v:?})"),
|
warning: literal with an empty format string
--> compiler/rustc_type_ir/src/lib.rs:744:42
|
744 | IntVar(_) => write!(f, "{}", "{integer}"),
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_literal
= note: `#[warn(clippy::write_literal)]` on by default
help: try this
|
744 - IntVar(_) => write!(f, "{}", "{integer}"),
744 + IntVar(_) => write!(f, "{{integer}}"),
|
warning: literal with an empty format string
--> compiler/rustc_type_ir/src/lib.rs:745:44
|
745 | FloatVar(_) => write!(f, "{}", "{float}"),
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_literal
help: try this
|
745 - FloatVar(_) => write!(f, "{}", "{float}"),
745 + FloatVar(_) => write!(f, "{{float}}"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_type_ir/src/lib.rs:746:27
|
746 | FreshTy(v) => write!(f, "FreshTy({})", v),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
746 - FreshTy(v) => write!(f, "FreshTy({})", v),
746 + FreshTy(v) => write!(f, "FreshTy({v})"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_type_ir/src/lib.rs:747:30
|
747 | FreshIntTy(v) => write!(f, "FreshIntTy({})", v),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
747 - FreshIntTy(v) => write!(f, "FreshIntTy({})", v),
747 + FreshIntTy(v) => write!(f, "FreshIntTy({v})"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_type_ir/src/lib.rs:748:32
|
748 | FreshFloatTy(v) => write!(f, "FreshFloatTy({})", v),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
748 - FreshFloatTy(v) => write!(f, "FreshFloatTy({})", v),
748 + FreshFloatTy(v) => write!(f, "FreshFloatTy({v})"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_abi/src/layout.rs:620:9
|
620 | assert!(min <= max, "discriminant range is {}...{}", min, max);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
620 - assert!(min <= max, "discriminant range is {}...{}", min, max);
620 + assert!(min <= max, "discriminant range is {min}...{max}");
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_abi/src/layout.rs:687:13
|
687 | / panic!(
688 | | "layout decided on a larger discriminant type ({:?}) than typeck ({:?})",
689 | | min_ity, typeck_ity
690 | | );
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
warning: `rustc_type_ir` (lib) generated 14 warnings (1 duplicate) (run `cargo fix --lib -p rustc_type_ir` to apply 13 suggestions)
warning: variables can be used directly in the `format!` string
--> compiler/rustc_abi/src/lib.rs:328:21
|
328 | bits => panic!("obj_size_bound: unknown pointer bit size {}", bits),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
328 - bits => panic!("obj_size_bound: unknown pointer bit size {}", bits),
328 + bits => panic!("obj_size_bound: unknown pointer bit size {bits}"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_abi/src/lib.rs:338:21
|
338 | bits => panic!("ptr_sized_integer: unknown pointer bit size {}", bits),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
338 - bits => panic!("ptr_sized_integer: unknown pointer bit size {}", bits),
338 + bits => panic!("ptr_sized_integer: unknown pointer bit size {bits}"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_abi/src/lib.rs:395:22
|
395 | _ => Err(format!(r#"unknown endian: "{}""#, s)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
395 - _ => Err(format!(r#"unknown endian: "{}""#, s)),
395 + _ => Err(format!(r#"unknown endian: "{s}""#)),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_abi/src/lib.rs:450:13
|
450 | panic!("Size::bits: {} bytes in bits doesn't fit in u64", bytes)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
450 - panic!("Size::bits: {} bytes in bits doesn't fit in u64", bytes)
450 + panic!("Size::bits: {bytes} bytes in bits doesn't fit in u64")
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_abi/src/lib.rs:654:13
|
654 | format!("`{}` is not a power of 2", align)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
654 - format!("`{}` is not a power of 2", align)
654 + format!("`{align}` is not a power of 2")
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_abi/src/lib.rs:659:13
|
659 | format!("`{}` is too large", align)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
659 - format!("`{}` is too large", align)
659 + format!("`{align}` is too large")
|
warning: some ranges overlap
--> compiler/rustc_abi/src/lib.rs:805:13
|
805 | 0..=0x0000_0000_0000_00ff => I8,
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: overlaps with this
--> compiler/rustc_abi/src/lib.rs:806:13
|
806 | 0..=0x0000_0000_0000_ffff => I16,
| ^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_overlapping_arm
= note: `#[warn(clippy::match_overlapping_arm)]` on by default
warning: variables can be used directly in the `format!` string
--> compiler/rustc_abi/src/lib.rs:1126:17
|
1126 | / assert!(
1127 | | i < count.get(),
1128 | | "tried to access field {} of union with {} fields",
1129 | | i,
1130 | | count
1131 | | );
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
warning: variables can be used directly in the `format!` string
--> compiler/rustc_abi/src/lib.rs:1241:18
|
1241 | _ => panic!("`is_signed` on non-scalar ABI {:?}", self),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
1241 - _ => panic!("`is_signed` on non-scalar ABI {:?}", self),
1241 + _ => panic!("`is_signed` on non-scalar ABI {self:?}"),
|
warning: `rustc_abi` (lib) generated 15 warnings (1 duplicate) (run `cargo fix --lib -p rustc_abi` to apply 12 suggestions)
warning: the `Err`-variant returned from this function is very large
--> compiler/rustc_span/src/source_map.rs:544:46
|
544 | pub fn span_to_lines(&self, sp: Span) -> FileLinesResult {
| ^^^^^^^^^^^^^^^
|
::: compiler/rustc_span/src/lib.rs:2020:5
|
2020 | DistinctSources(DistinctSources),
| -------------------------------- the largest variant contains at least 128 bytes
|
= help: try reducing the size of `SpanLinesError`, for example by boxing large elements or replacing it with `Box<SpanLinesError>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
= note: `#[warn(clippy::result_large_err)]` on by default
warning: the `Err`-variant returned from this function is very large
--> compiler/rustc_span/src/source_map.rs:582:68
|
582 | fn span_to_source<F, T>(&self, sp: Span, extract_source: F) -> Result<T, SpanSnippetError>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: compiler/rustc_span/src/lib.rs:2026:5
|
2026 | DistinctSources(DistinctSources),
| -------------------------------- the largest variant contains at least 128 bytes
|
= help: try reducing the size of `SpanSnippetError`, for example by boxing large elements or replacing it with `Box<SpanSnippetError>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
warning: the `Err`-variant returned from this function is very large
--> compiler/rustc_span/src/source_map.rs:628:48
|
628 | pub fn span_to_snippet(&self, sp: Span) -> Result<String, SpanSnippetError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: compiler/rustc_span/src/lib.rs:2026:5
|
2026 | DistinctSources(DistinctSources),
| -------------------------------- the largest variant contains at least 128 bytes
|
= help: try reducing the size of `SpanSnippetError`, for example by boxing large elements or replacing it with `Box<SpanSnippetError>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
warning: the `Err`-variant returned from this function is very large
--> compiler/rustc_span/src/source_map.rs:653:52
|
653 | pub fn span_to_prev_source(&self, sp: Span) -> Result<String, SpanSnippetError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: compiler/rustc_span/src/lib.rs:2026:5
|
2026 | DistinctSources(DistinctSources),
| -------------------------------- the largest variant contains at least 128 bytes
|
= help: try reducing the size of `SpanSnippetError`, for example by boxing large elements or replacing it with `Box<SpanSnippetError>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
warning: the `Err`-variant returned from this function is very large
--> compiler/rustc_span/src/source_map.rs:711:52
|
711 | pub fn span_to_next_source(&self, sp: Span) -> Result<String, SpanSnippetError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: compiler/rustc_span/src/lib.rs:2026:5
|
2026 | DistinctSources(DistinctSources),
| -------------------------------- the largest variant contains at least 128 bytes
|
= help: try reducing the size of `SpanSnippetError`, for example by boxing large elements or replacing it with `Box<SpanSnippetError>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
warning: the `Err`-variant returned from this function is very large
--> compiler/rustc_span/src/source_map.rs:722:10
|
722 | ) -> Result<Span, SpanSnippetError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: compiler/rustc_span/src/lib.rs:2026:5
|
2026 | DistinctSources(DistinctSources),
| -------------------------------- the largest variant contains at least 128 bytes
|
= help: try reducing the size of `SpanSnippetError`, for example by boxing large elements or replacing it with `Box<SpanSnippetError>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
warning: unneeded `return` statement
--> compiler/rustc_span/src/source_map.rs:818:13
|
818 | return Ok(true);
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
= help: remove `return`
warning: manual implementation of an assign operation
--> compiler/rustc_span/src/source_map.rs:778:21
|
778 | i = i + 1;
| ^^^^^^^^^ help: replace it with: `i += 1`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
= note: `#[warn(clippy::assign_op_pattern)]` on by default
warning: manual implementation of an assign operation
--> compiler/rustc_span/src/source_map.rs:799:21
|
799 | i = i - 1;
| ^^^^^^^^^ help: replace it with: `i -= 1`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
warning: manual implementation of `Option::map`
--> compiler/rustc_span/src/source_map.rs:893:20
|
893 | } else if let Some(src) = src.get_source() {
| ____________________^
894 | | Some(&src[start_index..])
895 | | } else {
896 | | None
897 | | };
| |_____________^ help: try this: `{ src.get_source().map(|src| &src[start_index..]) }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map
= note: `#[warn(clippy::manual_map)]` on by default
warning: variables can be used directly in the `format!` string
--> compiler/rustc_span/src/edition.rs:47:9
|
47 | write!(f, "{}", s)
| ^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
help: change this to
|
47 - write!(f, "{}", s)
47 + write!(f, "{s}")
|
warning: this comparison might be written more concisely
--> compiler/rustc_span/src/hygiene.rs:108:16
|
108 | if hash_spans == !ctx.unstable_opts_incremental_ignore_spans() => {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `hash_spans != ctx.unstable_opts_incremental_ignore_spans()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison
= note: `#[warn(clippy::bool_comparison)]` on by default
warning: variables can be used directly in the `format!` string
--> compiler/rustc_span/src/hygiene.rs:109:18
|
109 | other => panic!("Attempted hashing of {msg} with non-default HashingControls: {:?}", other),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
109 - other => panic!("Attempted hashing of {msg} with non-default HashingControls: {:?}", other),
109 + other => panic!("Attempted hashing of {msg} with non-default HashingControls: {other:?}"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_span/src/hygiene.rs:628:13
|
628 | format!("{:#?}", data)
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
628 - format!("{:#?}", data)
628 + format!("{data:#?}")
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_span/src/hygiene.rs:1066:36
|
1066 | MacroKind::Bang => format!("{}!", name),
| ^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
1066 - MacroKind::Bang => format!("{}!", name),
1066 + MacroKind::Bang => format!("{name}!"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_span/src/hygiene.rs:1067:36
|
1067 | MacroKind::Attr => format!("#[{}]", name),
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
1067 - MacroKind::Attr => format!("#[{}]", name),
1067 + MacroKind::Attr => format!("#[{name}]"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_span/src/hygiene.rs:1068:38
|
1068 | MacroKind::Derive => format!("#[derive({})]", name),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
1068 - MacroKind::Derive => format!("#[derive({})]", name),
1068 + MacroKind::Derive => format!("#[derive({name})]"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_span/src/hygiene.rs:1465:5
|
1465 | / assert_eq!(
1466 | | expn_data.disambiguator, 0,
1467 | | "Already set disambiguator for ExpnData: {:?}",
1468 | | expn_data
1469 | | );
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
warning: you are implementing `Hash` explicitly but have derived `PartialEq`
--> compiler/rustc_span/src/def_id.rs:259:1
|
259 | / impl Hash for DefId {
260 | | fn hash<H: Hasher>(&self, h: &mut H) {
261 | | (((self.krate.as_u32() as u64) << 32) | (self.index.as_u32() as u64)).hash(h)
262 | | }
263 | | }
| |_^
|
note: `PartialEq` implemented here
--> compiler/rustc_span/src/def_id.rs:221:17
|
221 | #[derive(Clone, PartialEq, Eq, Copy)]
| ^^^^^^^^^ in this derive macro expansion
|
::: /home/gh-jyn514/rust3/library/core/src/cmp.rs:236:1
|
236 | pub macro PartialEq($item:item) {
| ------------------- in this expansion of `#[derive(PartialEq)]`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_hash_xor_eq
= note: `#[warn(clippy::derive_hash_xor_eq)]` on by default
warning: variables can be used directly in the `format!` string
--> compiler/rustc_span/src/def_id.rs:306:21
|
306 | None => panic!("DefId::expect_local: `{:?}` isn't local", self),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
306 - None => panic!("DefId::expect_local: `{:?}` isn't local", self),
306 + None => panic!("DefId::expect_local: `{self:?}` isn't local"),
|
warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str`
--> compiler/rustc_span/src/symbol.rs:1640:5
|
1640 | / pub fn from_str(string: &str) -> Ident {
1641 | | Ident::with_dummy_span(Symbol::intern(string))
1642 | | }
| |_____^
|
= help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
= note: `#[warn(clippy::should_implement_trait)]` on by default
warning: variables can be used directly in the `format!` string
--> compiler/rustc_span/src/profiling.rs:30:17
|
30 | format!("{:?}", span)
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
30 - format!("{:?}", span)
30 + format!("{span:?}")
|
warning: you are implementing `Hash` explicitly but have derived `PartialEq`
--> compiler/rustc_span/src/lib.rs:182:1
|
182 | / impl Hash for RealFileName {
183 | | fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
184 | | // To prevent #70924 from happening again we should only hash the
185 | | // remapped (virtualized) path if that exists. This is because
... |
189 | | }
190 | | }
| |_^
|
note: `PartialEq` implemented here
--> compiler/rustc_span/src/lib.rs:165:21
|
165 | #[derive(Debug, Eq, PartialEq, Clone, Ord, PartialOrd)]
| ^^^^^^^^^ in this derive macro expansion
|
::: /home/gh-jyn514/rust3/library/core/src/cmp.rs:236:1
|
236 | pub macro PartialEq($item:item) {
| ------------------- in this expansion of `#[derive(PartialEq)]`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_hash_xor_eq
warning: variables can be used directly in the `format!` string
--> compiler/rustc_span/src/lib.rs:332:30
|
332 | Custom(ref s) => write!(fmt, "<{}>", s),
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
332 - Custom(ref s) => write!(fmt, "<{}>", s),
332 + Custom(ref s) => write!(fmt, "<{s}>"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_span/src/lib.rs:1077:18
|
1077 | _ => panic!("width {} given for non-narrow character", width),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
1077 - _ => panic!("width {} given for non-narrow character", width),
1077 + _ => panic!("width {width} given for non-narrow character"),
|
warning: length comparison to zero
--> compiler/rustc_span/src/lib.rs:1350:16
|
1350 | if lines.len() != 0 {
| ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!lines.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
= note: `#[warn(clippy::len_zero)]` on by default
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
--> compiler/rustc_span/src/lib.rs:1528:48
|
1528 | lines.extend(raw_diffs.into_iter().map(|&diff| {
| ^^^^^^^^^ help: call directly: `iter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
= note: `#[warn(clippy::into_iter_on_ref)]` on by default
warning: manual implementation of `Option::map`
--> compiler/rustc_span/src/lib.rs:1632:16
|
1632 | } else if let Some(src) = self.external_src.borrow().get_source() {
| ________________^
1633 | | Some(Cow::Owned(String::from(get_until_newline(src, begin))))
1634 | | } else {
1635 | | None
1636 | | }
| |_________^ help: try this: `{ self.external_src.borrow().get_source().map(|src| Cow::Owned(String::from(get_until_newline(src, begin)))) }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
--> compiler/rustc_span/src/lib.rs:1822:19
|
1822 | let mut buf = std::mem::replace(src, String::new()).into_bytes();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(src)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default
= note: `#[warn(clippy::mem_replace_with_default)]` on by default
warning: `rustc_span` (lib) generated 30 warnings (1 duplicate) (run `cargo fix --lib -p rustc_span` to apply 20 suggestions)
Checking rustc_feature v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc_feature)
Checking rustc_ast v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc_ast)
Checking rustc_error_messages v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc_error_messages)
warning: variables can be used directly in the `format!` string
--> compiler/rustc_feature/src/builtin_attrs.rs:73:17
|
73 | write!(fmt, "Gated({:?}, {}, {})", stab, name, expl)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
help: change this to
|
73 - write!(fmt, "Gated({:?}, {}, {})", stab, name, expl)
73 + write!(fmt, "Gated({stab:?}, {name}, {expl})")
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_feature/src/lib.rs:123:21
|
123 | None => panic!("feature `{}` is not declared anywhere", feature),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
123 - None => panic!("feature `{}` is not declared anywhere", feature),
123 + None => panic!("feature `{feature}` is not declared anywhere"),
|
warning: `rustc_feature` (lib) generated 3 warnings (1 duplicate) (run `cargo fix --lib -p rustc_feature` to apply 2 suggestions)
Checking rustc_target v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc_target)
warning: variables can be used directly in the `format!` string
--> compiler/rustc_error_messages/src/lib.rs:112:51
|
112 | TranslationBundleError::ReadFtl(e) => write!(f, "could not read ftl file: {}", e),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
help: change this to
|
112 - TranslationBundleError::ReadFtl(e) => write!(f, "could not read ftl file: {}", e),
112 + TranslationBundleError::ReadFtl(e) => write!(f, "could not read ftl file: {e}"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_error_messages/src/lib.rs:114:17
|
114 | write!(f, "could not parse ftl file: {}", e)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
114 - write!(f, "could not parse ftl file: {}", e)
114 + write!(f, "could not parse ftl file: {e}")
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_error_messages/src/lib.rs:116:55
|
116 | TranslationBundleError::AddResource(e) => write!(f, "failed to add resource: {}", e),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
116 - TranslationBundleError::AddResource(e) => write!(f, "failed to add resource: {}", e),
116 + TranslationBundleError::AddResource(e) => write!(f, "failed to add resource: {e}"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_error_messages/src/lib.rs:119:17
|
119 | write!(f, "could not read locales dir: {}", e)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
119 - write!(f, "could not read locales dir: {}", e)
119 + write!(f, "could not read locales dir: {e}")
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_error_messages/src/lib.rs:122:17
|
122 | write!(f, "could not read locales dir entry: {}", e)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
122 - write!(f, "could not read locales dir entry: {}", e)
122 + write!(f, "could not read locales dir entry: {e}")
|
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> compiler/rustc_error_messages/src/lib.rs:400:1
|
400 | impl Into<SubdiagnosticMessage> for DiagnosticMessage {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
= note: `#[warn(clippy::from_over_into)]` on by default
help: replace the `Into` implentation with `From<DiagnosticMessage>`
|
400 ~ impl From<DiagnosticMessage> for SubdiagnosticMessage {
401 ~ fn from(val: DiagnosticMessage) -> Self {
402 ~ match val {
|
warning: you should consider adding a `Default` implementation for `MultiSpan`
--> compiler/rustc_error_messages/src/lib.rs:447:5
|
447 | / pub fn new() -> MultiSpan {
448 | | MultiSpan { primary_spans: vec![], span_labels: vec![] }
449 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
445 + impl Default for MultiSpan {
446 + fn default() -> Self {
447 + Self::new()
448 + }
449 + }
|
warning: unnecessary closure used to substitute value for `Option::None`
--> compiler/rustc_error_messages/src/lib.rs:616:26
|
616 | let locale = icu_locale_from_unic_langid(lang)
| __________________________^
617 | | .unwrap_or_else(|| rustc_baked_icu_data::supported_locales::EN);
| |__________________-------------------------------------------------------------^
| |
| help: use `unwrap_or(..)` instead: `unwrap_or(rustc_baked_icu_data::supported_locales::EN)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
= note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default
warning: unneeded unit return type
--> compiler/rustc_target/src/spec/mod.rs:2880:45
|
2880 | fn hash<H: Hasher>(&self, state: &mut H) -> () {
| ^^^^^^ help: remove the `-> ()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit
= note: `#[warn(clippy::unused_unit)]` on by default
warning: `rustc_error_messages` (lib) generated 9 warnings (1 duplicate) (run `cargo fix --lib -p rustc_error_messages` to apply 7 suggestions)
warning: accessing first element with `lines.get(0)`
--> compiler/rustc_ast/src/util/comments.rs:63:25
|
63 | let mut i = lines
| _________________________^
64 | | .get(0)
| |_______________________^ help: try: `lines.first()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
= note: `#[warn(clippy::get_first)]` on by default
warning: variables can be used directly in the `format!` string
--> compiler/rustc_ast/src/util/literal.rs:171:17
|
171 | write!(f, "b'{}'", b)?;
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
help: change this to
|
171 - write!(f, "b'{}'", b)?;
171 + write!(f, "b'{b}'")?;
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_ast/src/util/literal.rs:195:17
|
195 | write!(f, "{}", n)?;
| ^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
195 - write!(f, "{}", n)?;
195 + write!(f, "{n}")?;
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_ast/src/util/literal.rs:203:17
|
203 | write!(f, "{}", symbol)?;
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
203 - write!(f, "{}", symbol)?;
203 + write!(f, "{symbol}")?;
|
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> compiler/rustc_ast/src/ast.rs:233:1
|
233 | impl Into<Option<P<GenericArgs>>> for AngleBracketedArgs {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see
https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
= note: `#[warn(clippy::from_over_into)]` on by default
help: replace the `Into` implentation with `From<ast::AngleBracketedArgs>`
|
233 ~ impl From<AngleBracketedArgs> for Option<P<GenericArgs>> {
234 ~ fn from(val: AngleBracketedArgs) -> Self {
235 ~ Some(P(GenericArgs::AngleBracketed(val)))
|
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> compiler/rustc_ast/src/ast.rs:239:1
|
239 | impl Into<Option<P<GenericArgs>>> for ParenthesizedArgs {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see
https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
help: replace the `Into` implentation with `From<ast::ParenthesizedArgs>`
|
239 ~ impl From<ParenthesizedArgs> for Option<P<GenericArgs>> {
240 ~ fn from(val: ParenthesizedArgs) -> Self {
241 ~ Some(P(GenericArgs::Parenthesized(val)))
|
warning: match expression looks like `matches!` macro
--> compiler/rustc_ast/src/ast.rs:1291:9
|
1291 | / match &self.peel_parens().kind {
1292 | | ExprKind::Box(_)
1293 | | | ExprKind::Array(_)
1294 | | | ExprKind::Call(_, _)
... |
1301 | | _ => false,
1302 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro
= note: `#[warn(clippy::match_like_matches_macro)]` on by default
help: try this
|
1291 ~ matches!(&self.peel_parens().kind, ExprKind::Box(_)
1292 + | ExprKind::Array(_)
1293 + | ExprKind::Call(_, _)
1294 + | ExprKind::Tup(_)
1295 + | ExprKind::Lit(_)
1296 + | ExprKind::Range(_, _, _)
1297 + | ExprKind::Underscore
1298 + | ExprKind::Path(_, _)
1299 + | ExprKind::Struct(_))
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_ast/src/ast.rs:2173:17
|
2173 | write!(f, "{{{}:{}}}", operand_idx, modifier)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
2173 - write!(f, "{{{}:{}}}", operand_idx, modifier)
2173 + write!(f, "{{{operand_idx}:{modifier}}}")
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_ast/src/ast.rs:2176:17
|
2176 | write!(f, "{{{}}}", operand_idx)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
2176 - write!(f, "{{{}}}", operand_idx)
2176 + write!(f, "{{{operand_idx}}}")
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_ast/src/ast.rs:2188:21
|
2188 | let _ = write!(out, "{}", p);
| ^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
2188 - let _ = write!(out, "{}", p);
2188 + let _ = write!(out, "{p}");
|
warning: unneeded `return` statement
--> compiler/rustc_ast/src/ast_traits.rs:188:32
|
188 | StmtKind::Empty => return None,
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
= help: remove `return`
warning: unneeded `return` statement
--> compiler/rustc_ast/src/ast_traits.rs:197:32
|
197 | StmtKind::Empty => return None,
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= help: remove `return`
warning: variables can be used directly in the `format!` string
--> compiler/rustc_ast/src/ast_traits.rs:217:17
|
217 | panic!("Called tokens on doc comment attr {:?}", kind)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
217 - panic!("Called tokens on doc comment attr {:?}", kind)
217 + panic!("Called tokens on doc comment attr {kind:?}")
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_ast/src/ast_traits.rs:225:17
|
225 | panic!("Called tokens_mut on doc comment attr {:?}", kind)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
225 - panic!("Called tokens_mut on doc comment attr {:?}", kind)
225 + panic!("Called tokens_mut on doc comment attr {kind:?}")
|
warning: you should consider adding a `Default` implementation for `MarkedAttrs`
--> compiler/rustc_ast/src/attr/mod.rs:28:5
|
28 | / pub fn new() -> Self {
29 | | // We have no idea how many attributes there will be, so just
30 | | // initiate the vectors with 0 bits. We'll grow them as necessary.
31 | | MarkedAttrs(GrowableBitSet::new_empty())
32 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
27 + impl Default for MarkedAttrs {
28 + fn default() -> Self {
29 + Self::new()
30 + }
31 + }
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_ast/src/attr/mod.rs:313:36
|
313 | .unwrap_or_else(|| panic!("attribute is missing tokens: {:?}", self))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
313 - .unwrap_or_else(|| panic!("attribute is missing tokens: {:?}", self))
313 + .unwrap_or_else(|| panic!("attribute is missing tokens: {self:?}"))
|
warning: you should consider adding a `Default` implementation for `AttrIdGenerator`
--> compiler/rustc_ast/src/attr/mod.rs:330:5
|
330 | / pub fn new() -> Self {
331 | | // We use `(index as u32).reverse_bits()` to initialize the
332 | | // starting value of AttrId in each worker thread.
333 | | // The `index` is the index of the worker thread.
... |
345 | | }))
346 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
329 + impl Default for AttrIdGenerator {
330 + fn default() -> Self {
331 + Self::new()
332 + }
333 + }
|
warning: redundant closure
--> compiler/rustc_ast/src/attr/mod.rs:561:30
|
561 | .map(|lit| MetaItemKind::NameValue(lit))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `MetaItemKind::NameValue`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
= note: `#[warn(clippy::redundant_closure)]` on by default
warning: variables can be used directly in the `format!` string
--> compiler/rustc_ast/src/expand/allocator.rs:12:38
|
12 | AllocatorKind::Global => format!("__rg_{}", base),
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
12 - AllocatorKind::Global => format!("__rg_{}", base),
12 + AllocatorKind::Global => format!("__rg_{base}"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_ast/src/expand/allocator.rs:13:39
|
13 | AllocatorKind::Default => format!("__rdl_{}", base),
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
13 - AllocatorKind::Default => format!("__rdl_{}", base),
13 + AllocatorKind::Default => format!("__rdl_{base}"),
|
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> compiler/rustc_ast/src/ptr.rs:163:1
|
163 | impl<T> Into<Vec<T>> for P<[T]> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see
https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
help: replace the `Into` implentation with `From<ptr::P<[T]>>`
|
163 ~ impl<T> From<P<[T]>> for Vec<T> {
164 ~ fn from(val: P<[T]>) -> Self {
165 ~ val.into_vec()
|
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice`
--> compiler/rustc_ast/src/ptr.rs:188:18
|
188 | self.ptr.into_iter()
| ^^^^^^^^^ help: call directly: `iter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
= note: `#[warn(clippy::into_iter_on_ref)]` on by default
warning: variables can be used directly in the `format!` string
--> compiler/rustc_ast/src/token.rs:128:21
|
128 | Byte => write!(f, "b'{}'", symbol)?,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
128 - Byte => write!(f, "b'{}'", symbol)?,
128 + Byte => write!(f, "b'{symbol}'")?,
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_ast/src/token.rs:129:21
|
129 | Char => write!(f, "'{}'", symbol)?,
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
129 - Char => write!(f, "'{}'", symbol)?,
129 + Char => write!(f, "'{symbol}'")?,
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_ast/src/token.rs:130:20
|
130 | Str => write!(f, "\"{}\"", symbol)?,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
130 - Str => write!(f, "\"{}\"", symbol)?,
130 + Str => write!(f, "\"{symbol}\"")?,
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_ast/src/token.rs:137:24
|
137 | ByteStr => write!(f, "b\"{}\"", symbol)?,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
137 - ByteStr => write!(f, "b\"{}\"", symbol)?,
137 + ByteStr => write!(f, "b\"{symbol}\"")?,
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_ast/src/token.rs:144:45
|
144 | Integer | Float | Bool | Err => write!(f, "{}", symbol)?,
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
144 - Integer | Float | Bool | Err => write!(f, "{}", symbol)?,
144 + Integer | Float | Bool | Err => write!(f, "{symbol}")?,
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_ast/src/token.rs:148:13
|
148 | write!(f, "{}", suffix)?;
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
148 - write!(f, "{}", suffix)?;
148 + write!(f, "{suffix}")?;
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_ast/src/token.rs:759:64
|
759 | Ident(name, false) => Lifetime(Symbol::intern(&format!("'{}", name))),
| ^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
759 - Ident(name, false) => Lifetime(Symbol::intern(&format!("'{}", name))),
759 + Ident(name, false) => Lifetime(Symbol::intern(&format!("'{name}"))),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_ast/src/tokenstream.rs:259:25
|
259 | / assert!(
260 | | found,
261 | | "Failed to find trailing delimited group in: {:?}",
262 | | target_tokens
263 | | );
| |_________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
warning: redundant closure
--> compiler/rustc_ast/src/tokenstream.rs:506:26
|
506 | self.trees().map(|tree| TokenStream::flatten_token_tree(tree)).collect()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `TokenStream::flatten_token_tree`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do
--> compiler/rustc_ast/src/tokenstream.rs:511:30
|
511 | fn try_glue_to_last(vec: &mut Vec<TokenTree>, tt: &TokenTree) -> bool {
| ^^^^^^^^^^^^^^^^^^^ help: change this to: `&mut [TokenTree]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
= note: `#[warn(clippy::ptr_arg)]` on by default
warning: `rustc_ast` (lib) generated 33 warnings (1 duplicate) (run `cargo fix --lib -p rustc_ast` to apply 28 suggestions)
Checking rustc_ast_pretty v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc_ast_pretty)
warning: name `ABI` contains a capitalized acronym
--> compiler/rustc_target/src/abi/call/powerpc64.rs:10:6
|
10 | enum ABI {
| ^^^ help: consider making the acronym lowercase, except the initial letter: `Abi`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms
= note: `#[warn(clippy::upper_case_acronyms)]` on by default
warning: unneeded `return` statement
--> compiler/rustc_target/src/abi/call/sparc64.rs:68:5
|
68 | return data;
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
= help: remove `return`
warning: manual implementation of an assign operation
--> compiler/rustc_target/src/abi/call/sparc64.rs:35:9
|
35 | data.last_offset = data.last_offset + Reg::i32().size;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `data.last_offset += Reg::i32().size`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
= note: `#[warn(clippy::assign_op_pattern)]` on by default
warning: manual implementation of an assign operation
--> compiler/rustc_target/src/abi/call/sparc64.rs:43:9
|
43 | data.last_offset = data.last_offset + Reg::i64().size;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `data.last_offset += Reg::i64().size`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
warning: manual implementation of an assign operation
--> compiler/rustc_target/src/abi/call/sparc64.rs:52:9
|
52 | data.last_offset = data.last_offset + Reg::i32().size;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `data.last_offset += Reg::i32().size`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
warning: unneeded `return` statement
--> compiler/rustc_target/src/abi/call/sparc64.rs:94:5
|
94 | return data;
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= help: remove `return`
warning: unneeded `return` statement
--> compiler/rustc_target/src/abi/call/sparc64.rs:130:5
|
130 | return data;
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= help: remove `return`
warning: you should consider adding a `Default` implementation for `ArgAttributes`
--> compiler/rustc_target/src/abi/call/mod.rs:107:5
|
107 | / pub fn new() -> Self {
108 | | ArgAttributes {
109 | | regular: ArgAttribute::default(),
110 | | arg_ext: ArgExtension::None,
... |
113 | | }
114 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
106 + impl Default for ArgAttributes {
107 + fn default() -> Self {
108 + Self::new()
109 + }
110 + }
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/abi/call/mod.rs:180:22
|
180 | _ => panic!("unsupported integer: {:?}", self),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
help: change this to
|
180 - _ => panic!("unsupported integer: {:?}", self),
180 + _ => panic!("unsupported integer: {self:?}"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/abi/call/mod.rs:185:22
|
185 | _ => panic!("unsupported float: {:?}", self),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
185 - _ => panic!("unsupported float: {:?}", self),
185 + _ => panic!("unsupported float: {self:?}"),
|
warning: unneeded `return` statement
--> compiler/rustc_target/src/abi/call/mod.rs:269:9
|
269 | return size;
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= help: remove `return`
warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> compiler/rustc_target/src/abi/call/mod.rs:264:13
|
264 | / match self.prefix[i] {
265 | | Some(v) => size += v.size,
266 | | None => {}
267 | | }
| |_____________^ help: try this: `if let Some(v) = self.prefix[i] { size += v.size }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
= note: `#[warn(clippy::single_match)]` on by default
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/abi/call/mod.rs:645:17
|
645 | write!(f, "target architecture {:?} does not support `extern {}` ABI", arch, abi)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
645 - write!(f, "target architecture {:?} does not support `extern {}` ABI", arch, abi)
645 + write!(f, "target architecture {arch:?} does not support `extern {abi}` ABI")
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/abi/call/mod.rs:763:22
|
763 | _ => Err(format!("'{}' is not a valid value for entry function call convetion.", s)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
763 - _ => Err(format!("'{}' is not a valid value for entry function call convetion.", s)),
763 + _ => Err(format!("'{s}' is not a valid value for entry function call convetion.")),
|
warning: you should consider adding a `Default` implementation for `Printer`
--> compiler/rustc_ast_pretty/src/pp.rs:239:5
|
239 | / pub fn new() -> Self {
240 | | Printer {
241 | | out: String::new(),
242 | | space: MARGIN,
... |
251 | | }
252 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
238 + impl Default for Printer {
239 + fn default() -> Self {
240 + Self::new()
241 + }
242 + }
|
warning: unnecessary closure used to substitute value for `Option::None`
--> compiler/rustc_ast_pretty/src/pp.rs:255:9
|
255 | self.last_token_still_buffered().or_else(|| self.last_printed.as_ref())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^--------------------------------------
| |
| help: use `or(..)` instead: `or(self.last_printed.as_ref())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
= note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_ast_pretty/src/pprust/state/item.rs:354:44
|
354 | self.print_type_bounds(&bounds);
| ^^^^^^^ help: change this to: `bounds`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
warning: variables can be used directly in the `format!` string
--> compiler/rustc_ast_pretty/src/pprust/state/item.rs:414:36
|
414 | self.word_nbsp(format!("pub({})", path))
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
help: change this to
|
414 - self.word_nbsp(format!("pub({})", path))
414 + self.word_nbsp(format!("pub({path})"))
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_ast_pretty/src/pprust/state/item.rs:416:36
|
416 | self.word_nbsp(format!("pub(in {})", path))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
416 - self.word_nbsp(format!("pub(in {})", path))
416 + self.word_nbsp(format!("pub(in {path})"))
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_ast_pretty/src/pprust/state.rs:194:55
|
194 | (CommentKind::Line, ast::AttrStyle::Outer) => format!("///{}", data),
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
194 - (CommentKind::Line, ast::AttrStyle::Outer) => format!("///{}", data),
194 + (CommentKind::Line, ast::AttrStyle::Outer) => format!("///{data}"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_ast_pretty/src/pprust/state.rs:195:55
|
195 | (CommentKind::Line, ast::AttrStyle::Inner) => format!("//!{}", data),
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
195 - (CommentKind::Line, ast::AttrStyle::Inner) => format!("//!{}", data),
195 + (CommentKind::Line, ast::AttrStyle::Inner) => format!("//!{data}"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_ast_pretty/src/pprust/state.rs:196:56
|
196 | (CommentKind::Block, ast::AttrStyle::Outer) => format!("/**{}*/", data),
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
196 - (CommentKind::Block, ast::AttrStyle::Outer) => format!("/**{}*/", data),
196 + (CommentKind::Block, ast::AttrStyle::Outer) => format!("/**{data}*/"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_ast_pretty/src/pprust/state.rs:197:56
|
197 | (CommentKind::Block, ast::AttrStyle::Inner) => format!("/*!{}*/", data),
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
197 - (CommentKind::Block, ast::AttrStyle::Inner) => format!("/*!{}*/", data),
197 + (CommentKind::Block, ast::AttrStyle::Inner) => format!("/*!{data}*/"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_ast_pretty/src/pprust/state.rs:204:24
|
204 | token::Byte => format!("b'{}'", symbol),
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
204 - token::Byte => format!("b'{}'", symbol),
204 + token::Byte => format!("b'{symbol}'"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_ast_pretty/src/pprust/state.rs:205:24
|
205 | token::Char => format!("'{}'", symbol),
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
205 - token::Char => format!("'{}'", symbol),
205 + token::Char => format!("'{symbol}'"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_ast_pretty/src/pprust/state.rs:206:23
|
206 | token::Str => format!("\"{}\"", symbol),
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
206 - token::Str => format!("\"{}\"", symbol),
206 + token::Str => format!("\"{symbol}\""),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_ast_pretty/src/pprust/state.rs:210:27
|
210 | token::ByteStr => format!("b\"{}\"", symbol),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
210 - token::ByteStr => format!("b\"{}\"", symbol),
210 + token::ByteStr => format!("b\"{symbol}\""),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/asm/aarch64.rs:198:9
|
198 | write!(out, "{}{}", prefix, index)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
198 - write!(out, "{}{}", prefix, index)
198 + write!(out, "{prefix}{index}")
|
warning: casting to the same type is unnecessary (`isize` -> `isize`)
--> compiler/rustc_ast_pretty/src/pprust/state.rs:690:46
|
690 | self.break_offset_if_not_bol(1, -(INDENT_UNIT as isize));
| ^^^^^^^^^^^^^^^^^^^^^^ help: try: `INDENT_UNIT`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default
warning: you should consider adding a `Default` implementation for `State<'a>`
--> compiler/rustc_ast_pretty/src/pprust/state.rs:945:5
|
945 | / pub fn new() -> State<'a> {
946 | | State { s: pp::Printer::new(), comments: None, ann: &NoAnn }
947 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
944 + impl<'a> Default for State<'a> {
945 + fn default() -> Self {
946 + Self::new()
947 + }
948 + }
|
warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
--> compiler/rustc_ast_pretty/src/pprust/state.rs:988:9
|
988 | constraint.gen_args.as_ref().map(|args| self.print_generic_args(args, false));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
| |
| help: try this: `if let Some(args) = constraint.gen_args.as_ref() { self.print_generic_args(args, false) }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn
= note: `#[warn(clippy::option_map_unit_fn)]` on by default
warning: `rustc_ast_pretty` (lib) generated 17 warnings (1 duplicate) (run `cargo fix --lib -p rustc_ast_pretty` to apply 14 suggestions)
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/asm/arm.rs:252:13
|
252 | write!(out, "d{}", index)
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
252 - write!(out, "d{}", index)
252 + write!(out, "d{index}")
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/asm/x86.rs:360:24
|
360 | 'l' => write!(out, "{}l", root),
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
360 - 'l' => write!(out, "{}l", root),
360 + 'l' => write!(out, "{root}l"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/asm/x86.rs:361:24
|
361 | 'h' => write!(out, "{}h", root),
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
361 - 'h' => write!(out, "{}h", root),
361 + 'h' => write!(out, "{root}h"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/asm/x86.rs:362:24
|
362 | 'x' => write!(out, "{}x", root),
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
362 - 'x' => write!(out, "{}x", root),
362 + 'x' => write!(out, "{root}x"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/asm/x86.rs:363:24
|
363 | 'e' => write!(out, "e{}x", root),
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
363 - 'e' => write!(out, "e{}x", root),
363 + 'e' => write!(out, "e{root}x"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/asm/x86.rs:364:24
|
364 | 'r' => write!(out, "r{}x", root),
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
364 - 'r' => write!(out, "r{}x", root),
364 + 'r' => write!(out, "r{root}x"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/asm/x86.rs:370:24
|
370 | 'l' => write!(out, "{}l", root),
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
370 - 'l' => write!(out, "{}l", root),
370 + 'l' => write!(out, "{root}l"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/asm/x86.rs:371:24
|
371 | 'x' => write!(out, "{}", root),
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
371 - 'x' => write!(out, "{}", root),
371 + 'x' => write!(out, "{root}"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/asm/x86.rs:372:24
|
372 | 'e' => write!(out, "e{}", root),
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
372 - 'e' => write!(out, "e{}", root),
372 + 'e' => write!(out, "e{root}"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/asm/x86.rs:373:24
|
373 | 'r' => write!(out, "r{}", root),
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
373 - 'r' => write!(out, "r{}", root),
373 + 'r' => write!(out, "r{root}"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/asm/x86.rs:379:24
|
379 | 'l' => write!(out, "{}b", root),
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
379 - 'l' => write!(out, "{}b", root),
379 + 'l' => write!(out, "{root}b"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/asm/x86.rs:380:24
|
380 | 'x' => write!(out, "{}w", root),
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
380 - 'x' => write!(out, "{}w", root),
380 + 'x' => write!(out, "{root}w"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/asm/x86.rs:381:24
|
381 | 'e' => write!(out, "{}d", root),
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
381 - 'e' => write!(out, "{}d", root),
381 + 'e' => write!(out, "{root}d"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/asm/x86.rs:390:13
|
390 | write!(out, "{}{}", prefix, index)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
390 - write!(out, "{}{}", prefix, index)
390 + write!(out, "{prefix}{index}")
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/asm/x86.rs:394:13
|
394 | write!(out, "{}{}", prefix, index)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
394 - write!(out, "{}{}", prefix, index)
394 + write!(out, "{prefix}{index}")
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/asm/x86.rs:398:13
|
398 | write!(out, "{}{}", prefix, index)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
398 - write!(out, "{}{}", prefix, index)
398 + write!(out, "{prefix}{index}")
|
warning: this operation has no effect
--> compiler/rustc_target/src/asm/mod.rs:661:31
|
661 | Self::VecI8(n) => n * 1,
| ^^^^^ help: consider reducing it to: `n`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op
= note: `#[warn(clippy::identity_op)]` on by default
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/asm/mod.rs:682:31
|
682 | Self::VecI8(n) => write!(f, "i8x{}", n),
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
682 - Self::VecI8(n) => write!(f, "i8x{}", n),
682 + Self::VecI8(n) => write!(f, "i8x{n}"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/asm/mod.rs:683:32
|
683 | Self::VecI16(n) => write!(f, "i16x{}", n),
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
683 - Self::VecI16(n) => write!(f, "i16x{}", n),
683 + Self::VecI16(n) => write!(f, "i16x{n}"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/asm/mod.rs:684:32
|
684 | Self::VecI32(n) => write!(f, "i32x{}", n),
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
684 - Self::VecI32(n) => write!(f, "i32x{}", n),
684 + Self::VecI32(n) => write!(f, "i32x{n}"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/asm/mod.rs:685:32
|
685 | Self::VecI64(n) => write!(f, "i64x{}", n),
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
685 - Self::VecI64(n) => write!(f, "i64x{}", n),
685 + Self::VecI64(n) => write!(f, "i64x{n}"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/asm/mod.rs:686:33
|
686 | Self::VecI128(n) => write!(f, "i128x{}", n),
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
686 - Self::VecI128(n) => write!(f, "i128x{}", n),
686 + Self::VecI128(n) => write!(f, "i128x{n}"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/asm/mod.rs:687:32
|
687 | Self::VecF32(n) => write!(f, "f32x{}", n),
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
687 - Self::VecF32(n) => write!(f, "f32x{}", n),
687 + Self::VecF32(n) => write!(f, "f32x{n}"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/asm/mod.rs:688:32
|
688 | Self::VecF64(n) => write!(f, "f64x{}", n),
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
688 - Self::VecF64(n) => write!(f, "f64x{}", n),
688 + Self::VecF64(n) => write!(f, "f64x{n}"),
|
warning: match expression looks like `matches!` macro
--> compiler/rustc_target/src/spec/abi.rs:54:9
|
54 | / match self {
55 | | Self::C { .. }
56 | | | Self::Cdecl { .. }
57 | | | Self::Win64 { .. }
... |
60 | | _ => false,
61 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro
= note: `#[warn(clippy::match_like_matches_macro)]` on by default
help: try this
|
54 ~ matches!(self, Self::C { .. }
55 + | Self::Cdecl { .. }
56 + | Self::Win64 { .. }
57 + | Self::SysV64 { .. }
58 + | Self::EfiApi)
|
warning: this match could be written as a `let` statement
--> compiler/rustc_target/src/spec/abi.rs:331:9
|
331 | / match self {
332 | | abi => write!(f, "\"{}\"", abi.name()),
333 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding
= note: `#[warn(clippy::match_single_binding)]` on by default
help: consider using a `let` statement
|
331 ~ let abi = self;
332 + write!(f, "\"{}\"", abi.name())
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/spec/apple_base.rs:79:18
|
79 | "sim" => format!("{}-simulator", os).into(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
79 - "sim" => format!("{}-simulator", os).into(),
79 + "sim" => format!("{os}-simulator").into(),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/spec/apple_base.rs:196:5
|
196 | format!("{}.{}", major, minor)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
196 - format!("{}.{}", major, minor)
196 + format!("{major}.{minor}")
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/spec/apple_base.rs:255:5
|
255 | format!("{}.{}", major, minor)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
255 - format!("{}.{}", major, minor)
255 + format!("{major}.{minor}")
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/spec/apple_base.rs:269:5
|
269 | format!("{}.{}", major, minor)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
269 - format!("{}.{}", major, minor)
269 + format!("{major}.{minor}")
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/spec/apple_base.rs:278:5
|
278 | format!("{}.{}", major, minor)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
278 - format!("{}.{}", major, minor)
278 + format!("{major}.{minor}")
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/spec/solid_base.rs:6:13
|
6 | os: format!("solid_{}", kernel).into(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
6 - os: format!("solid_{}", kernel).into(),
6 + os: format!("solid_{kernel}").into(),
|
warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str`
--> compiler/rustc_target/src/spec/mod.rs:283:13
|
276 | / macro_rules! linker_flavor_cli_impls {
277 | | ($(($($flavor:tt)*) $string:literal)*) => (
278 | | impl LinkerFlavorCli {
279 | | pub const fn one_of() -> &'static str {
... |
283 | |/ pub fn from_str(s: &str) -> Option<LinkerFlavorCli> {
284 | || Some(match s {
285 | || $($string => $($flavor)*,)*
286 | || _ => return None,
287 | || })
288 | || }
| ||_____________^
... |
296 | | )
297 | | }
| |__- in this expansion of `linker_flavor_cli_impls!`
298 |
299 | / linker_flavor_cli_impls! {
300 | | (LinkerFlavorCli::Gcc) "gcc"
301 | | (LinkerFlavorCli::Ld) "ld"
302 | | (LinkerFlavorCli::Lld(LldFlavor::Ld)) "ld.lld"
... |
309 | | (LinkerFlavorCli::PtxLinker) "ptx-linker"
310 | | }
| |_- in this macro invocation
|
= help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
= note: `#[warn(clippy::should_implement_trait)]` on by default
warning: unnecessary closure used to substitute value for `Option::None`
--> compiler/rustc_target/src/spec/mod.rs:743:22
|
743 | let object = json.as_object().ok_or_else(|| "expected a JSON object")?;
| ^^^^^^^^^^^^^^^^^---------------------------------------
| |
| help: use `ok_or(..)` instead: `ok_or("expected a JSON object")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
= note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default
warning: unnecessary closure used to substitute value for `Option::None`
--> compiler/rustc_target/src/spec/mod.rs:744:20
|
744 | let kind = object
| ____________________^
745 | | .get("kind")
746 | | .and_then(|o| o.as_str())
747 | | .ok_or_else(|| "expected `kind` to be a string")?;
| |______________----------------------------------------------^
| |
| help: use `ok_or(..)` instead: `ok_or("expected `kind` to be a string")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
warning: unnecessary closure used to substitute value for `Option::None`
--> compiler/rustc_target/src/spec/mod.rs:753:35
|
753 | let min_version = object
| ___________________________________^
754 | | .get("min-llvm-version-for-inline")
755 | | .and_then(|o| o.as_array())
756 | | .ok_or_else(|| "expected `min-llvm-version-for-inline` to be an array")?;
| |______________________---------------------------------------------------------------------^
| |
| help: use `ok_or(..)` instead: `ok_or("expected `min-llvm-version-for-inline` to be an array")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
--> compiler/rustc_target/src/spec/mod.rs:757:44
|
757 | let mut iter = min_version.into_iter().map(|v| {
| ^^^^^^^^^ help: call directly: `iter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
= note: `#[warn(clippy::into_iter_on_ref)]` on by default
warning: unnecessary closure used to substitute value for `Option::None`
--> compiler/rustc_target/src/spec/mod.rs:758:31
|
758 | let int = v.as_u64().ok_or_else(
| ________________________________^__________-
| | _______________________________|
| ||
759 | || || "expected `min-llvm-version-for-inline` values to be integers",
760 | || )?;
| ||_____________________^ help: use `ok_or(..)` instead: `ok_or("expected `min-llvm-version-for-inline` values to be integers")`
| |_____________________|
|
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/spec/mod.rs:843:53
|
843 | let name = s.as_str().unwrap_or_else(|| panic!("unrecognized sanitizer {:?}", s));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
843 - let name = s.as_str().unwrap_or_else(|| panic!("unrecognized sanitizer {:?}", s));
843 + let name = s.as_str().unwrap_or_else(|| panic!("unrecognized sanitizer {s:?}"));
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/spec/mod.rs:2075:32
|
2075 | .ok_or_else(|| format!("Field {} in target specification is required", name))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
2075 - .ok_or_else(|| format!("Field {} in target specification is required", name))
2075 + .ok_or_else(|| format!("Field {name} in target specification is required"))
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/spec/mod.rs:2481:35
|
2481 | .map_err(|()| format!("'{}' is not a valid value for frame-pointer", s))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
2481 - .map_err(|()| format!("'{}' is not a valid value for frame-pointer", s))?;
2481 + .map_err(|()| format!("'{s}' is not a valid value for frame-pointer"))?;
|
warning: manual `!RangeInclusive::contains` implementation
--> compiler/rustc_target/src/spec/mod.rs:2124:24
|
2090 | / macro_rules! key {
2091 | | ($key_name:ident) => ( {
2092 | | let name = (stringify!($key_name)).replace("_", "-");
2093 | | if let Some(s) = obj.remove(&name).and_then(|s| s.as_str().map(str::to_string).map(Cow::from)) {
... |
2124 | | if s < 1 || s > 5 {
| | ^^^^^^^^^^^^^^ help: use: `!(1..=5).contains(&s)`
... |
2466 | | } );
2467 | | }
| |_________- in this expansion of `key!`
...
2535 | key!(default_dwarf_version, u32);
| -------------------------------- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
= note: `#[warn(clippy::manual_range_contains)]` on by default
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/spec/mod.rs:2673:21
|
2673 | Err(format!("Could not find specification for target {:?}", target_triple))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
2673 - Err(format!("Could not find specification for target {:?}", target_triple))
2673 + Err(format!("Could not find specification for target {target_triple:?}"))
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/spec/mod.rs:2937:17
|
2937 | format!("target path {:?} is not a valid file: {}", canonicalized_path, err),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
2937 - format!("target path {:?} is not a valid file: {}", canonicalized_path, err),
2937 + format!("target path {canonicalized_path:?} is not a valid file: {err}"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_target/src/spec/mod.rs:2972:17
|
2972 | format!("{}-{}", triple, hash)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
2972 - format!("{}-{}", triple, hash)
2972 + format!("{triple}-{hash}")
|
warning: `rustc_target` (lib) generated 62 warnings (1 duplicate) (run `cargo fix --lib -p rustc_target` to apply 54 suggestions)
Checking rustc_hir v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc_hir)
warning: statics have by default a `'static` lifetime
--> compiler/rustc_hir/src/lang_items.rs:330:24
|
330 | pub static FN_TRAITS: &'static [LangItem] = &[LangItem::Fn, LangItem::FnMut, LangItem::FnOnce];
| -^^^^^^^----------- help: consider removing `'static`: `&[LangItem]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
= note: `#[warn(clippy::redundant_static_lifetimes)]` on by default
warning: statics have by default a `'static` lifetime
--> compiler/rustc_hir/src/lang_items.rs:332:24
|
332 | pub static OPERATORS: &'static [LangItem] = &[
| -^^^^^^^----------- help: consider removing `'static`: `&[LangItem]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
warning: match expression looks like `matches!` macro
--> compiler/rustc_hir/src/def.rs:224:9
|
224 | / match self {
225 | | DefKind::Fn | DefKind::AssocFn | DefKind::Closure | DefKind::Generator => true,
226 | | _ => false,
227 | | }
| |_________^ help: try this: `matches!(self, DefKind::Fn | DefKind::AssocFn | DefKind::Closure | DefKind::Generator)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro
= note: `#[warn(clippy::match_like_matches_macro)]` on by default
warning: method `into_iter` can be confused for the standard trait method `std::iter::IntoIterator::into_iter`
--> compiler/rustc_hir/src/def.rs:515:5
|
515 | / pub fn into_iter(self) -> IntoIter<T, 3> {
516 | | [self.value_ns, self.type_ns, self.macro_ns].into_iter()
517 | | }
| |_____^
|
= help: consider implementing the trait `std::iter::IntoIterator` or choosing a less ambiguous method name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
= note: `#[warn(clippy::should_implement_trait)]` on by default
warning: variables can be used directly in the `format!` string
--> compiler/rustc_hir/src/def.rs:601:32
|
601 | .unwrap_or_else(|| panic!("attempted .def_id() on invalid res: {:?}", self))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
help: change this to
|
601 - .unwrap_or_else(|| panic!("attempted .def_id() on invalid res: {:?}", self))
601 + .unwrap_or_else(|| panic!("attempted .def_id() on invalid res: {self:?}"))
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_hir/src/definitions.rs:55:13
|
55 | / panic!(
56 | | "found DefPathHash collision between {:?} and {:?}. \
57 | | Compilation cannot continue.",
58 | | def_path1, def_path2
59 | | );
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
warning: variables can be used directly in the `format!` string
--> compiler/rustc_hir/src/definitions.rs:227:13
|
227 | write!(s, "::{}", component).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
227 - write!(s, "::{}", component).unwrap();
227 + write!(s, "::{component}").unwrap();
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_hir/src/definitions.rs:243:13
|
243 | write!(s, "{}", component).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
243 - write!(s, "{}", component).unwrap();
243 + write!(s, "{component}").unwrap();
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_hir/src/definitions.rs:436:52
|
436 | DefPathDataName::Anon { namespace } => write!(f, "{{{{{}}}}}", namespace),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
436 - DefPathDataName::Anon { namespace } => write!(f, "{{{{{}}}}}", namespace),
436 + DefPathDataName::Anon { namespace } => write!(f, "{{{{{namespace}}}}}"),
|
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/hir.rs:237:21
|
237 | if let Some(ref args) = self.args {
| ^^^^^^^^ help: try this: `args`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/hir.rs:351:38
|
351 | GenericArg::Type(ref ty) => {
| ^^^^^^ help: try this: `ty`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/hir.rs:352:44
|
352 | if let TyKind::Tup(ref tys) = ty.kind {
| ^^^^^^^ help: try this: `tys`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> compiler/rustc_hir/src/hir.rs:1273:1
|
1273 | impl Into<ast::BinOpKind> for BinOpKind {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see
https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
= note: `#[warn(clippy::from_over_into)]` on by default
help: replace the `Into` implentation with `From<hir::BinOpKind>`
|
1273 ~ impl From<BinOpKind> for ast::BinOpKind {
1274 ~ fn from(val: BinOpKind) -> Self {
1275 ~ match val {
|
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/hir.rs:1674:33
|
1674 | ExprKind::DropTemps(ref expr, ..) => expr.precedence(),
| ^^^^^^^^ help: try this: `expr`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/hir.rs:1712:47
|
1712 | ExprKind::Path(QPath::Resolved(_, ref path)) => {
| ^^^^^^^^ help: try this: `path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/hir.rs:1719:28
|
1719 | ExprKind::Type(ref e, _) => e.is_place_expr(allow_projections_from),
| ^^^^^ help: try this: `e`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/hir.rs:1723:29
|
1723 | ExprKind::Field(ref base, _) | ExprKind::Index(ref base, _) => {
| ^^^^^^^^ ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
help: try this
|
1723 | ExprKind::Field(base, _) | ExprKind::Index(base, _) => {
| ~~~~ ~~~~
warning: match expression looks like `matches!` macro
--> compiler/rustc_hir/src/hir.rs:1844:9
|
1844 | / match &self.kind {
1845 | | ExprKind::Box(_)
1846 | | | ExprKind::Array(_)
1847 | | | ExprKind::Call(..)
... |
1852 | | _ => false,
1853 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro
help: try this
|
1844 ~ matches!(&self.kind, ExprKind::Box(_)
1845 + | ExprKind::Array(_)
1846 + | ExprKind::Call(..)
1847 + | ExprKind::Tup(_)
1848 + | ExprKind::Lit(_)
1849 + | ExprKind::Path(_)
1850 + | ExprKind::Struct(..))
|
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/hir.rs:1870:26
|
1870 | ExprKind::Struct(ref qpath, _, _) => matches!(
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
help: try this
|
1870 ~ ExprKind::Struct(qpath, _, _) => matches!(
1871 ~ *qpath,
|
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/hir.rs:1883:24
|
1883 | ExprKind::Call(ref func, _) => {
| ^^^^^^^^ help: try this: `func`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/hir.rs:2396:56
|
2396 | TypeBindingKind::Equality { term: Term::Ty(ref ty) } => ty,
| ^^^^^^ help: try this: `ty`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/hir.rs:2784:26
|
2784 | Self::Return(ref ty) => ty.span,
| ^^^^^^ help: try this: `ty`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: manual check for common ascii range
--> compiler/rustc_hir/src/hir.rs:2901:9
|
2901 | (b'0'..=b'9').contains(&first)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `first.is_ascii_digit()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check
= note: `#[warn(clippy::manual_is_ascii_check)]` on by default
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/hir.rs:2926:33
|
2926 | VariantData::Struct(ref fields, ..) | VariantData::Tuple(ref fields, ..) => fields,
| ^^^^^^^^^^ ^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
help: try this
|
2926 | VariantData::Struct(fields, ..) | VariantData::Tuple(fields, ..) => fields,
| ~~~~~~ ~~~~~~
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/hir.rs:3128:29
|
3128 | ItemKind::Fn(_, ref generics, _)
| ^^^^^^^^^^^^
3129 | | ItemKind::TyAlias(_, ref generics)
| ^^^^^^^^^^^^
3130 | | ItemKind::OpaqueTy(OpaqueTy { ref generics, .. })
| ^^^^^^^^^^^^
3131 | | ItemKind::Enum(_, ref generics)
| ^^^^^^^^^^^^
3132 | | ItemKind::Struct(_, ref generics)
| ^^^^^^^^^^^^
3133 | | ItemKind::Union(_, ref generics)
| ^^^^^^^^^^^^
3134 | | ItemKind::Trait(_, _, ref generics, _, _)
| ^^^^^^^^^^^^
3135 | | ItemKind::TraitAlias(ref generics, _)
| ^^^^^^^^^^^^
3136 | | ItemKind::Impl(Impl { ref generics, .. }) => generics,
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
help: try this
|
3128 ~ ItemKind::Fn(_, generics, _)
3129 ~ | ItemKind::TyAlias(_, generics)
3130 ~ | ItemKind::OpaqueTy(OpaqueTy { generics, .. })
3131 ~ | ItemKind::Enum(_, generics)
3132 ~ | ItemKind::Struct(_, generics)
3133 ~ | ItemKind::Union(_, generics)
3134 ~ | ItemKind::Trait(_, _, generics, _, _)
3135 ~ | ItemKind::TraitAlias(generics, _)
3136 ~ | ItemKind::Impl(Impl { generics, .. }) => generics,
|
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> compiler/rustc_hir/src/hir.rs:3376:1
|
3376 | impl<'hir> Into<OwnerNode<'hir>> for &'hir Item<'hir> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
help: replace the `Into` implentation with `From<&'hir hir::Item<'hir>>`
|
3376 ~ impl<'hir> From<&'hir Item<'hir>> for OwnerNode<'hir> {
3377 ~ fn from(val: &'hir Item<'hir>) -> Self {
3378 ~ OwnerNode::Item(val)
|
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> compiler/rustc_hir/src/hir.rs:3382:1
|
3382 | impl<'hir> Into<OwnerNode<'hir>> for &'hir ForeignItem<'hir> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
help: replace the `Into` implentation with `From<&'hir hir::ForeignItem<'hir>>`
|
3382 ~ impl<'hir> From<&'hir ForeignItem<'hir>> for OwnerNode<'hir> {
3383 ~ fn from(val: &'hir ForeignItem<'hir>) -> Self {
3384 ~ OwnerNode::ForeignItem(val)
|
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> compiler/rustc_hir/src/hir.rs:3388:1
|
3388 | impl<'hir> Into<OwnerNode<'hir>> for &'hir ImplItem<'hir> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
help: replace the `Into` implentation with `From<&'hir hir::ImplItem<'hir>>`
|
3388 ~ impl<'hir> From<&'hir ImplItem<'hir>> for OwnerNode<'hir> {
3389 ~ fn from(val: &'hir ImplItem<'hir>) -> Self {
3390 ~ OwnerNode::ImplItem(val)
|
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> compiler/rustc_hir/src/hir.rs:3394:1
|
3394 | impl<'hir> Into<OwnerNode<'hir>> for &'hir TraitItem<'hir> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
help: replace the `Into` implentation with `From<&'hir hir::TraitItem<'hir>>`
|
3394 ~ impl<'hir> From<&'hir TraitItem<'hir>> for OwnerNode<'hir> {
3395 ~ fn from(val: &'hir TraitItem<'hir>) -> Self {
3396 ~ OwnerNode::TraitItem(val)
|
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> compiler/rustc_hir/src/hir.rs:3400:1
|
3400 | impl<'hir> Into<Node<'hir>> for OwnerNode<'hir> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
help: replace the `Into` implentation with `From<hir::OwnerNode<'hir>>`
|
3400 ~ impl<'hir> From<OwnerNode<'hir>> for Node<'hir> {
3401 ~ fn from(val: OwnerNode<'hir>) -> Self {
3402 ~ match val {
|
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/hir.rs:3552:39
|
3552 | ItemKind::Fn(ref sig, ref generics, _) => {
| ^^^^^^^^^^^^ help: try this: `generics`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> compiler/rustc_hir/src/hir_id.rs:107:9
|
107 | write!(f, "{:?}", self)
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
107 - write!(f, "{:?}", self)
107 + write!(f, "{self:?}")
|
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:94:31
|
94 | FnKind::Method(_, ref sig) => Some(&sig.header),
| ^^^^^^^ help: try this: `sig`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: statement with no effect
--> compiler/rustc_hir/src/intravisit.rs:122:9
|
122 | *self;
| ^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect
= note: `#[warn(clippy::no_effect)]` on by default
warning: statement with no effect
--> compiler/rustc_hir/src/intravisit.rs:125:9
|
125 | *self;
| ^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect
warning: statement with no effect
--> compiler/rustc_hir/src/intravisit.rs:128:9
|
128 | *self;
| ^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect
warning: statement with no effect
--> compiler/rustc_hir/src/intravisit.rs:131:9
|
131 | *self;
| ^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect
warning: statement with no effect
--> compiler/rustc_hir/src/intravisit.rs:134:9
|
134 | *self;
| ^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect
warning: statement with no effect
--> compiler/rustc_hir/src/intravisit.rs:137:9
|
137 | *self;
| ^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:463:23
|
463 | ItemKind::Use(ref path, _) => {
| ^^^^^^^^ help: try this: `path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:466:26
|
466 | ItemKind::Static(ref typ, _, body) | ItemKind::Const(ref typ, body) => {
| ^^^^^^^ ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
help: try this
|
466 | ItemKind::Static(typ, _, body) | ItemKind::Const(typ, body) => {
| ~~~ ~~~
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:471:31
|
471 | ItemKind::Fn(ref sig, ref generics, body_id) => visitor.visit_fn(
| ^^^^^^^^^^^^ help: try this: `generics`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:481:23
|
481 | ItemKind::Mod(ref module) => {
| ^^^^^^^^^^ help: try this: `module`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:493:27
|
493 | ItemKind::TyAlias(ref ty, ref generics) => {
| ^^^^^^ help: try this: `ty`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:493:35
|
493 | ItemKind::TyAlias(ref ty, ref generics) => {
| ^^^^^^^^^^^^ help: try this: `generics`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:498:39
|
498 | ItemKind::OpaqueTy(OpaqueTy { ref generics, bounds, .. }) => {
| ^^^^^^^^^^^^ help: try this: `generics`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:503:45
|
503 | ItemKind::Enum(ref enum_definition, ref generics) => {
| ^^^^^^^^^^^^ help: try this: `generics`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:514:13
|
514 | ref generics,
| ^^^^^^^^^^^^ help: try this: `generics`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:516:13
|
516 | ref self_ty,
| ^^^^^^^^^^^ help: try this: `self_ty`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:525:49
|
525 | ItemKind::Struct(ref struct_definition, ref generics)
| ^^^^^^^^^^^^
526 | | ItemKind::Union(ref struct_definition, ref generics) => {
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
help: try this
|
525 ~ ItemKind::Struct(ref struct_definition, generics)
526 ~ | ItemKind::Union(ref struct_definition, generics) => {
|
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:531:29
|
531 | ItemKind::Trait(.., ref generics, bounds, trait_item_refs) => {
| ^^^^^^^^^^^^ help: try this: `generics`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:537:30
|
537 | ItemKind::TraitAlias(ref generics, bounds) => {
| ^^^^^^^^^^^^ help: try this: `generics`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:566:29
|
566 | ForeignItemKind::Fn(ref function_declaration, param_names, ref generics) => {
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `function_declaration`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:566:68
|
566 | ForeignItemKind::Fn(ref function_declaration, param_names, ref generics) => {
| ^^^^^^^^^^^^ help: try this: `generics`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:573:33
|
573 | ForeignItemKind::Static(ref typ, _) => visitor.visit_ty(typ),
| ^^^^^^^ help: try this: `typ`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:599:25
|
599 | StmtKind::Local(ref local) => visitor.visit_local(local),
| ^^^^^^^^^ help: try this: `local`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:601:24
|
601 | StmtKind::Expr(ref expression) | StmtKind::Semi(ref expression) => {
| ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
help: try this
|
601 | StmtKind::Expr(expression) | StmtKind::Semi(expression) => {
| ~~~~~~~~~~ ~~~~~~~~~~
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:612:23
|
612 | Guard::If(ref e) => visitor.visit_expr(e),
| ^^^^^ help: try this: `e`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:613:26
|
613 | Guard::IfLet(ref l) => {
| ^^^^^ help: try this: `l`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:639:22
|
639 | PatKind::Box(ref subpattern) | PatKind::Ref(ref subpattern, _) => {
| ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
help: try this
|
639 | PatKind::Box(subpattern) | PatKind::Ref(subpattern, _) => {
| ~~~~~~~~~~ ~~~~~~~~~~
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:646:22
|
646 | PatKind::Lit(ref expression) => visitor.visit_expr(expression),
| ^^^^^^^^^^^^^^ help: try this: `expression`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:681:23
|
681 | ExprKind::Box(ref subexpression) => visitor.visit_expr(subexpression),
| ^^^^^^^^^^^^^^^^^ help: try this: `subexpression`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:686:26
|
686 | ExprKind::Repeat(ref element, ref count) => {
| ^^^^^^^^^^^ help: try this: `element`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:690:26
|
690 | ExprKind::Struct(ref qpath, fields, ref optional_base) => {
| ^^^^^^^^^ help: try this: `qpath`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:698:24
|
698 | ExprKind::Call(ref callee_expression, arguments) => {
| ^^^^^^^^^^^^^^^^^^^^^ help: try this: `callee_expression`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:702:30
|
702 | ExprKind::MethodCall(ref segment, receiver, arguments, _) => {
| ^^^^^^^^^^^ help: try this: `segment`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:707:29
|
707 | ExprKind::Binary(_, ref left_expression, ref right_expression) => {
| ^^^^^^^^^^^^^^^^^^^ help: try this: `left_expression`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:707:50
|
707 | ExprKind::Binary(_, ref left_expression, ref right_expression) => {
| ^^^^^^^^^^^^^^^^^^^^ help: try this: `right_expression`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:711:32
|
711 | ExprKind::AddrOf(_, _, ref subexpression) | ExprKind::Unary(_, ref subexpression) => {
| ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
help: try this
|
711 | ExprKind::AddrOf(_, _, subexpression) | ExprKind::Unary(_, subexpression) => {
| ~~~~~~~~~~~~~ ~~~~~~~~~~~~~
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:714:24
|
714 | ExprKind::Cast(ref subexpression, ref typ) | ExprKind::Type(ref subexpression, ref typ) => {
| ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
help: try this
|
714 | ExprKind::Cast(subexpression, ref typ) | ExprKind::Type(subexpression, ref typ) => {
| ~~~~~~~~~~~~~ ~~~~~~~~~~~~~
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:714:43
|
714 | ExprKind::Cast(ref subexpression, ref typ) | ExprKind::Type(ref subexpression, ref typ) => {
| ^^^^^^^ ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
help: try this
|
714 | ExprKind::Cast(ref subexpression, typ) | ExprKind::Type(ref subexpression, typ) => {
| ~~~ ~~~
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:718:29
|
718 | ExprKind::DropTemps(ref subexpression) => {
| ^^^^^^^^^^^^^^^^^ help: try this: `subexpression`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:721:23
|
721 | ExprKind::Let(ref let_expr) => visitor.visit_let_expr(let_expr),
| ^^^^^^^^^^^^ help: try this: `let_expr`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:722:22
|
722 | ExprKind::If(ref cond, ref then, ref else_opt) => {
| ^^^^^^^^ help: try this: `cond`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:722:32
|
722 | ExprKind::If(ref cond, ref then, ref else_opt) => {
| ^^^^^^^^ help: try this: `then`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:727:24
|
727 | ExprKind::Loop(ref block, ref opt_label, _, _) => {
| ^^^^^^^^^ help: try this: `block`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:731:25
|
731 | ExprKind::Match(ref subexpression, arms, _) => {
| ^^^^^^^^^^^^^^^^^ help: try this: `subexpression`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:749:25
|
749 | ExprKind::Block(ref block, ref opt_label) => {
| ^^^^^^^^^ help: try this: `block`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:753:26
|
753 | ExprKind::Assign(ref lhs, ref rhs, _) => {
| ^^^^^^^ help: try this: `lhs`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:753:35
|
753 | ExprKind::Assign(ref lhs, ref rhs, _) => {
| ^^^^^^^ help: try this: `rhs`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:757:31
|
757 | ExprKind::AssignOp(_, ref left_expression, ref right_expression) => {
| ^^^^^^^^^^^^^^^^^^^ help: try this: `left_expression`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:757:52
|
757 | ExprKind::AssignOp(_, ref left_expression, ref right_expression) => {
| ^^^^^^^^^^^^^^^^^^^^ help: try this: `right_expression`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:761:25
|
761 | ExprKind::Field(ref subexpression, ident) => {
| ^^^^^^^^^^^^^^^^^ help: try this: `subexpression`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:765:25
|
765 | ExprKind::Index(ref main_expression, ref index_expression) => {
| ^^^^^^^^^^^^^^^^^^^ help: try this: `main_expression`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:765:46
|
765 | ExprKind::Index(ref main_expression, ref index_expression) => {
| ^^^^^^^^^^^^^^^^^^^^ help: try this: `index_expression`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:782:29
|
782 | ExprKind::InlineAsm(ref asm) => {
| ^^^^^^^ help: try this: `asm`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:785:25
|
785 | ExprKind::Yield(ref subexpression, _) => {
| ^^^^^^^^^^^^^^^^^ help: try this: `subexpression`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:810:23
|
810 | TyKind::Slice(ref ty) => visitor.visit_ty(ty),
| ^^^^^^ help: try this: `ty`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:812:21
|
812 | TyKind::Ref(ref lifetime, ref mutable_type) => {
| ^^^^^^^^^^^^ help: try this: `lifetime`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:820:24
|
820 | TyKind::BareFn(ref function_declaration) => {
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `function_declaration`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:831:23
|
831 | TyKind::Array(ref ty, ref length) => {
| ^^^^^^ help: try this: `ty`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:835:37
|
835 | TyKind::TraitObject(bounds, ref lifetime, _syntax) => {
| ^^^^^^^^^^^^ help: try this: `lifetime`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:855:35
|
855 | GenericParamKind::Const { ref ty, ref default } => {
| ^^^^^^ help: try this: `ty`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:880:13
|
880 | ref bounded_ty,
| ^^^^^^^^^^^^^^ help: try this: `bounded_ty`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:892:13
|
892 | ref lifetime,
| ^^^^^^^^^^^^ help: try this: `lifetime`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:900:56
|
900 | WherePredicate::EqPredicate(WhereEqPredicate { ref lhs_ty, ref rhs_ty, span: _ }) => {
| ^^^^^^^^^^ help: try this: `lhs_ty`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:900:68
|
900 | WherePredicate::EqPredicate(WhereEqPredicate { ref lhs_ty, ref rhs_ty, span: _ }) => {
| ^^^^^^^^^^ help: try this: `rhs_ty`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:915:28
|
915 | if let FnRetTy::Return(ref output_ty) = *ret_ty {
| ^^^^^^^^^^^^^ help: try this: `output_ty`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:958:30
|
958 | TraitItemKind::Const(ref ty, default) => {
| ^^^^^^ help: try this: `ty`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:994:9
|
994 | ref generics,
| ^^^^^^^^^^^^ help: try this: `generics`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:1005:29
|
1005 | ImplItemKind::Const(ref ty, body) => {
| ^^^^^^ help: try this: `ty`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:1019:28
|
1019 | ImplItemKind::Type(ref ty) => {
| ^^^^^^ help: try this: `ty`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:1058:32
|
1058 | GenericBound::Outlives(ref lifetime) => visitor.visit_lifetime(lifetime),
| ^^^^^^^^^^^^ help: try this: `lifetime`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:1121:42
|
1121 | QPath::Resolved(ref maybe_qself, ref path) => {
| ^^^^^^^^ help: try this: `path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:1125:29
|
1125 | QPath::TypeRelative(ref qself, ref segment) => {
| ^^^^^^^^^ help: try this: `qself`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:1125:40
|
1125 | QPath::TypeRelative(ref qself, ref segment) => {
| ^^^^^^^^^^^ help: try this: `segment`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:1142:17
|
1142 | if let Some(ref args) = segment.args {
| ^^^^^^^^ help: try this: `args`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir/src/intravisit.rs:1161:22
|
1161 | Term::Ty(ref ty) => visitor.visit_ty(ty),
| ^^^^^^ help: try this: `ty`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: you should consider adding a `Default` implementation for `LanguageItems`
--> compiler/rustc_hir/src/lang_items.rs:33:5
|
33 | / pub fn new() -> Self {
34 | | Self { items: [None; std::mem::variant_count::<LangItem>()], missing: Vec::new() }
35 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
31 + impl Default for LanguageItems {
32 + fn default() -> Self {
33 + Self::new()
34 + }
35 + }
|
warning: unnecessary closure used to substitute value for `Option::None`
--> compiler/rustc_hir/src/lang_items.rs:49:9
|
49 | self.get(it).ok_or_else(|| LangItemError(it))
| ^^^^^^^^^^^^^--------------------------------
| |
| help: use `ok_or(..)` instead: `ok_or(LangItemError(it))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
= note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default
warning: mutable borrow from immutable input(s)
--> /home/gh-jyn514/rust3/compiler/rustc_arena/src/lib.rs:571:61
|
563 | pub macro declare_arena([$($a:tt $name:ident: $ty:ty,)*]) {
| ----------------------- in this expansion of `rustc_arena::declare_arena!` (#2)
...
571 | fn allocate_on<'a>(self, arena: &'a Arena<'tcx>) -> &'a mut Self;
| ^^^^^^^^^^^^
|
::: compiler/rustc_hir/src/lib.rs:53:1
|
53 | arena_types!(rustc_arena::declare_arena);
| ---------------------------------------- in this macro invocation (#1)
|
::: compiler/rustc_hir/src/arena.rs:6:1
|
6 | / macro_rules! arena_types {
7 | | ($macro:path) => (
8 | | $macro!([
| | ________________-
9 | || // HIR types
10 | || [] hir_krate: rustc_hir::Crate<'tcx>,
11 | || [] arm: rustc_hir::Arm<'tcx>,
... ||
53 | || [] where_predicate: rustc_hir::WherePredicate<'tcx>,
54 | || ]);
| ||__________- in this macro invocation (#2)
55 | | )
56 | | }
| |__- in this expansion of `arena_types!` (#1)
|
note: immutable borrow here
--> /home/gh-jyn514/rust3/compiler/rustc_arena/src/lib.rs:571:41
|
563 | pub macro declare_arena([$($a:tt $name:ident: $ty:ty,)*]) {
| ----------------------- in this expansion of `rustc_arena::declare_arena!` (#2)
...
571 | fn allocate_on<'a>(self, arena: &'a Arena<'tcx>) -> &'a mut Self;
| ^^^^^^^^^^^^^^^
|
::: compiler/rustc_hir/src/lib.rs:53:1
|
53 | arena_types!(rustc_arena::declare_arena);
| ---------------------------------------- in this macro invocation (#1)
|
::: compiler/rustc_hir/src/arena.rs:6:1
|
6 | / macro_rules! arena_types {
7 | | ($macro:path) => (
8 | | $macro!([
| | ________________-
9 | || // HIR types
10 | || [] hir_krate: rustc_hir::Crate<'tcx>,
11 | || [] arm: rustc_hir::Arm<'tcx>,
... ||
53 | || [] where_predicate: rustc_hir::WherePredicate<'tcx>,
54 | || ]);
| ||__________- in this macro invocation (#2)
55 | | )
56 | | }
| |__- in this expansion of `arena_types!` (#1)
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_from_ref
= note: `#[warn(clippy::mut_from_ref)]` on by default
warning: mutable borrow from immutable input(s)
--> /home/gh-jyn514/rust3/compiler/rustc_arena/src/lib.rs:575:14
|
563 | pub macro declare_arena([$($a:tt $name:ident: $ty:ty,)*]) {
| ----------------------- in this expansion of `rustc_arena::declare_arena!` (#2)
...
575 | ) -> &'a mut [Self];
| ^^^^^^^^^^^^^^
|
::: compiler/rustc_hir/src/lib.rs:53:1
|
53 | arena_types!(rustc_arena::declare_arena);
| ---------------------------------------- in this macro invocation (#1)
|
::: compiler/rustc_hir/src/arena.rs:6:1
|
6 | / macro_rules! arena_types {
7 | | ($macro:path) => (
8 | | $macro!([
| | ________________-
9 | || // HIR types
10 | || [] hir_krate: rustc_hir::Crate<'tcx>,
11 | || [] arm: rustc_hir::Arm<'tcx>,
... ||
53 | || [] where_predicate: rustc_hir::WherePredicate<'tcx>,
54 | || ]);
| ||__________- in this macro invocation (#2)
55 | | )
56 | | }
| |__- in this expansion of `arena_types!` (#1)
|
note: immutable borrow here
--> /home/gh-jyn514/rust3/compiler/rustc_arena/src/lib.rs:573:20
|
563 | pub macro declare_arena([$($a:tt $name:ident: $ty:ty,)*]) {
| ----------------------- in this expansion of `rustc_arena::declare_arena!` (#2)
...
573 | arena: &'a Arena<'tcx>,
| ^^^^^^^^^^^^^^^
|
::: compiler/rustc_hir/src/lib.rs:53:1
|
53 | arena_types!(rustc_arena::declare_arena);
| ---------------------------------------- in this macro invocation (#1)
|
::: compiler/rustc_hir/src/arena.rs:6:1
|
6 | / macro_rules! arena_types {
7 | | ($macro:path) => (
8 | | $macro!([
| | ________________-
9 | || // HIR types
10 | || [] hir_krate: rustc_hir::Crate<'tcx>,
11 | || [] arm: rustc_hir::Arm<'tcx>,
... ||
53 | || [] where_predicate: rustc_hir::WherePredicate<'tcx>,
54 | || ]);
| ||__________- in this macro invocation (#2)
55 | | )
56 | | }
| |__- in this expansion of `arena_types!` (#1)
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_from_ref
warning: `rustc_hir` (lib) generated 113 warnings (1 duplicate) (run `cargo fix --lib -p rustc_hir` to apply 100 suggestions)
Checking rustc_lint_defs v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc_lint_defs)
Checking rustc_hir_pretty v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc_hir_pretty)
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_hir_pretty/src/lib.rs:66:50
|
66 | Nested::Body(id) => state.print_expr(&self.body(id).value),
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.body(id).value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str`
--> compiler/rustc_lint_defs/src/lib.rs:231:5
|
231 | / pub fn from_str(x: &str) -> Option<Level> {
232 | | match x {
233 | | "allow" => Some(Level::Allow),
234 | | "warn" => Some(Level::Warn),
... |
238 | | }
239 | | }
| |_____^
|
= help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
= note: `#[warn(clippy::should_implement_trait)]` on by default
warning: wildcard pattern covers any other pattern as it will match anyway
--> compiler/rustc_lint_defs/src/lib.rs:237:13
|
237 | "expect" | _ => None,
| ^^^^^^^^^^^^
|
= help: consider handling `_` separately
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns
= note: `#[warn(clippy::wildcard_in_or_patterns)]` on by default
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_hir_pretty/src/lib.rs:90:57
|
90 | Node::ExprField(a) => self.print_expr_field(&a),
| ^^ help: change this to: `a`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_hir_pretty/src/lib.rs:97:54
|
97 | Node::PatField(a) => self.print_patfield(&a),
| ^^ help: change this to: `a`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: implementation of inherent method `to_string(&self) -> String` for type `LintId`
--> compiler/rustc_lint_defs/src/lib.rs:435:5
|
435 | / pub fn to_string(&self) -> String {
436 | | self.lint.name_lower()
437 | | }
| |_____^
|
= help: implement trait `Display` for type `LintId` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string
= note: `#[warn(clippy::inherent_to_string)]` on by default
warning: casting to the same type is unnecessary (`isize` -> `isize`)
--> compiler/rustc_hir_pretty/src/lib.rs:247:42
|
247 | self.break_offset_if_not_bol(1, -(INDENT_UNIT as isize));
| ^^^^^^^^^^^^^^^^^^^^^^ help: try: `INDENT_UNIT`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir_pretty/src/lib.rs:310:30
|
310 | hir::TyKind::Ref(ref lifetime, ref mt) => {
| ^^^^^^^^^^^^ help: try this: `lifetime`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir_pretty/src/lib.rs:331:46
|
331 | hir::TyKind::TraitObject(bounds, ref lifetime, syntax) => {
| ^^^^^^^^^^^^ help: try this: `lifetime`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: `rustc_lint_defs` (lib) generated 4 warnings (1 duplicate)
Checking rustc_errors v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc_errors)
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir_pretty/src/lib.rs:567:32
|
567 | hir::ItemKind::Mod(ref _mod) => {
| ^^^^^^^^ help: try this: `_mod`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_hir_pretty/src/lib.rs:1147:37
|
1147 | self.print_outer_attributes(&self.attrs(field.hir_id));
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.attrs(field.hir_id)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_hir_pretty/src/lib.rs:1152:25
|
1152 | self.print_expr(&field.expr);
| ^^^^^^^^^^^ help: change this to: `field.expr`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_hir_pretty/src/lib.rs:1182:37
|
1182 | self.print_expr_maybe_paren(&receiver, parser::PREC_POSTFIX);
| ^^^^^^^^^ help: change this to: `receiver`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> compiler/rustc_hir_pretty/src/lib.rs:1271:28
|
1271 | s.word(format!("{}", reg));
| ^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
help: change this to
|
1271 - s.word(format!("{}", reg));
1271 + s.word(format!("{reg}"));
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_hir_pretty/src/lib.rs:1279:28
|
1279 | s.word(format!("{}", reg));
| ^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
1279 - s.word(format!("{}", reg));
1279 + s.word(format!("{reg}"));
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_hir_pretty/src/lib.rs:1290:28
|
1290 | s.word(format!("{}", reg));
| ^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
1290 - s.word(format!("{}", reg));
1290 + s.word(format!("{reg}"));
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_hir_pretty/src/lib.rs:1298:28
|
1298 | s.word(format!("{}", reg));
| ^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
1298 - s.word(format!("{}", reg));
1298 + s.word(format!("{reg}"));
|
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir_pretty/src/lib.rs:1268:50
|
1268 | hir::InlineAsmOperand::In { reg, ref expr } => {
| ^^^^^^^^ help: try this: `expr`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir_pretty/src/lib.rs:1287:59
|
1287 | hir::InlineAsmOperand::InOut { reg, late, ref expr } => {
| ^^^^^^^^ help: try this: `expr`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir_pretty/src/lib.rs:1295:64
|
1295 | hir::InlineAsmOperand::SplitInOut { reg, late, ref in_expr, ref out_expr } => {
| ^^^^^^^^^^^ help: try this: `in_expr`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_hir_pretty/src/lib.rs:1785:48
|
1785 | self.commasep_cmnt(Consistent, &fields, |s, f| s.print_patfield(f), |f| f.pat.span);
| ^^^^^^^ help: change this to: `fields`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_hir_pretty/src/lib.rs:1885:37
|
1885 | self.print_outer_attributes(&self.attrs(field.hir_id));
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.attrs(field.hir_id)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this pattern creates a reference to a reference
--> compiler/rustc_hir_pretty/src/lib.rs:2179:21
|
2179 | ref lifetime,
| ^^^^^^^^^^^^ help: try this: `lifetime`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: `rustc_hir_pretty` (lib) generated 21 warnings (1 duplicate) (run `cargo fix --lib -p rustc_hir_pretty` to apply 20 suggestions)
warning: this `else { if .. }` block can be collapsed
--> compiler/rustc_errors/src/lib.rs:1237:20
|
1237 | } else {
| ____________________^
1238 | | if diag.is_force_warn() {
1239 | | self.warn_count -= 1;
1240 | | } else {
... |
1247 | | }
1248 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
= note: `#[warn(clippy::collapsible_else_if)]` on by default
help: collapse nested if block
|
1237 ~ } else if diag.is_force_warn() {
1238 + self.warn_count -= 1;
1239 + } else {
1240 + // Unless they're forced, don't flush stashed warnings when
1241 + // there are errors, to avoid causing warning overload. The
1242 + // stash would've been stolen already if it were important.
1243 + if has_errors {
1244 + continue;
1245 + }
1246 + }
|
warning: this `else { if .. }` block can be collapsed
--> compiler/rustc_errors/src/lib.rs:1478:16
|
1478 | } else {
| ________________^
1479 | | if diagnostic.is_force_warn() {
1480 | | self.warn_count -= 1;
1481 | | }
1482 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
help: collapse nested if block
|
1478 ~ } else if diagnostic.is_force_warn() {
1479 + self.warn_count -= 1;
1480 + }
|
warning: this pattern creates a reference to a reference
--> compiler/rustc_errors/src/annotate_snippet_emitter_writer.rs:141:42
|
141 | let primary_lo = if let Some(ref primary_span) = msp.primary_span().as_ref() {
| ^^^^^^^^^^^^^^^^ help: try this: `primary_span`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> compiler/rustc_errors/src/diagnostic.rs:61:1
|
61 | impl<'source> Into<FluentValue<'source>> for DiagnosticArgValue<'source> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see
https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
= note: `#[warn(clippy::from_over_into)]` on by default
help: replace the `Into` implentation with `From<diagnostic::DiagnosticArgValue<'source>>`
|
61 ~ impl<'source> From<DiagnosticArgValue<'source>> for FluentValue<'source> {
62 ~ fn from(val: DiagnosticArgValue<'source>) -> Self {
63 ~ match val {
|
warning: you should consider adding a `Default` implementation for `DiagnosticStyledString`
--> compiler/rustc_errors/src/diagnostic.rs:172:5
|
172 | / pub fn new() -> DiagnosticStyledString {
173 | | DiagnosticStyledString(vec![])
174 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
171 + impl Default for DiagnosticStyledString {
172 + fn default() -> Self {
173 + Self::new()
174 + }
175 + }
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_errors/src/diagnostic.rs:428:13
|
428 | format!("expected {}", expected_label)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
help: change this to
|
428 - format!("expected {}", expected_label)
428 + format!("expected {expected_label}")
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_errors/src/diagnostic.rs:434:13
|
434 | format!("found {}", found_label)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
434 - format!("found {}", found_label)
434 + format!("found {found_label}")
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_errors/src/diagnostic.rs:447:19
|
447 | msg.push((format!("`{}\n", expected_extra), Style::NoStyle));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
447 - msg.push((format!("`{}\n", expected_extra), Style::NoStyle));
447 + msg.push((format!("`{expected_extra}\n"), Style::NoStyle));
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_errors/src/diagnostic.rs:453:19
|
453 | msg.push((format!("`{}", found_extra), Style::NoStyle));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
453 - msg.push((format!("`{}", found_extra), Style::NoStyle));
453 + msg.push((format!("`{found_extra}"), Style::NoStyle));
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_errors/src/diagnostic.rs:462:14
|
462 | (format!("`{}` from trait: `", name), Style::NoStyle),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
462 - (format!("`{}` from trait: `", name), Style::NoStyle),
462 + (format!("`{name}` from trait: `"), Style::NoStyle),
|
warning: the borrowed expression implements the required traits
--> compiler/rustc_errors/src/diagnostic.rs:562:23
|
562 | self.help(&format!("set `edition = \"{}\"` in `Cargo.toml`", LATEST_STABLE_EDITION));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("set `edition = \"{}\"` in `Cargo.toml`", LATEST_STABLE_EDITION)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> compiler/rustc_errors/src/diagnostic.rs:562:24
|
562 | self.help(&format!("set `edition = \"{}\"` in `Cargo.toml`", LATEST_STABLE_EDITION));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
562 - self.help(&format!("set `edition = \"{}\"` in `Cargo.toml`", LATEST_STABLE_EDITION));
562 + self.help(&format!("set `edition = \"{LATEST_STABLE_EDITION}\"` in `Cargo.toml`"));
|
warning: the borrowed expression implements the required traits
--> compiler/rustc_errors/src/diagnostic.rs:564:23
|
564 | self.help(&format!("pass `--edition {}` to `rustc`", LATEST_STABLE_EDITION));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("pass `--edition {}` to `rustc`", LATEST_STABLE_EDITION)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> compiler/rustc_errors/src/diagnostic.rs:564:24
|
564 | self.help(&format!("pass `--edition {}` to `rustc`", LATEST_STABLE_EDITION));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
564 - self.help(&format!("pass `--edition {}` to `rustc`", LATEST_STABLE_EDITION));
564 + self.help(&format!("pass `--edition {LATEST_STABLE_EDITION}` to `rustc`"));
|
warning: this function has an empty `#[must_use]` attribute, but returns a type already marked as `#[must_use]`
--> compiler/rustc_errors/src/diagnostic_builder.rs:23:5
|
23 | fn into_diagnostic(self, handler: &'a Handler) -> DiagnosticBuilder<'a, T>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: either add some descriptive text or remove the attribute
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use
= note: `#[warn(clippy::double_must_use)]` on by default
warning: variables can be used directly in the `format!` string
--> compiler/rustc_errors/src/diagnostic_impls.rs:87:44
|
87 | DiagnosticArgValue::Str(Cow::Owned(format!("{:?}", self)))
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
87 - DiagnosticArgValue::Str(Cow::Owned(format!("{:?}", self)))
87 + DiagnosticArgValue::Str(Cow::Owned(format!("{self:?}")))
|
warning: this operation has no effect
--> compiler/rustc_errors/src/emitter.rs:1394:25
|
1394 | 0 + line,
| ^^^^^^^^ help: consider reducing it to: `line`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op
= note: `#[warn(clippy::identity_op)]` on by default
warning: `if` chain can be rewritten with `match`
--> compiler/rustc_errors/src/emitter.rs:1681:25
|
1681 | / if line_idx_delta > 2 {
1682 | | let last_buffer_line_num = buffer.num_lines();
1683 | | buffer.puts(last_buffer_line_num, 0, "...", Style::LineNumber);
1684 | |
... |
1721 | | }
1722 | | }
| |_________________________^
|
= help: consider rewriting the `if` chain to use `cmp` and `match`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_chain
= note: `#[warn(clippy::comparison_chain)]` on by default
warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
--> compiler/rustc_errors/src/emitter.rs:1904:25
|
1904 | / first_line.map(|(p, l)| {
1905 | | self.draw_code_line(
1906 | | &mut buffer,
1907 | | &mut row_num,
... |
1916 | | )
1917 | | });
| |__________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn
= note: `#[warn(clippy::option_map_unit_fn)]` on by default
help: try this
|
1904 ~ if let Some((p, l)) = first_line { self.draw_code_line(
1905 + &mut buffer,
1906 + &mut row_num,
1907 + &Vec::new(),
1908 + p,
1909 + l,
1910 + line_start,
1911 + show_code_change,
1912 + max_line_num_len,
1913 + &file_lines,
1914 + is_multiline,
1915 + ) }
|
warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
--> compiler/rustc_errors/src/emitter.rs:1922:25
|
1922 | / last_line.map(|(p, l)| {
1923 | | self.draw_code_line(
1924 | | &mut buffer,
1925 | | &mut row_num,
... |
1934 | | )
1935 | | });
| |__________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn
help: try this
|
1922 ~ if let Some((p, l)) = last_line { self.draw_code_line(
1923 + &mut buffer,
1924 + &mut row_num,
1925 + &Vec::new(),
1926 + p,
1927 + l,
1928 + line_start,
1929 + show_code_change,
1930 + max_line_num_len,
1931 + &file_lines,
1932 + is_multiline,
1933 + ) }
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_errors/src/emitter.rs:2095:25
|
2095 | panic!("failed to emit error: {}", e)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
2095 - panic!("failed to emit error: {}", e)
2095 + panic!("failed to emit error: {e}")
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_errors/src/emitter.rs:2111:29
|
2111 | ... panic!("failed to emit error: {}", err);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
2111 - panic!("failed to emit error: {}", err);
2111 + panic!("failed to emit error: {err}");
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_errors/src/emitter.rs:2128:33
|
2128 | ... panic!("failed to emit error: {}", e);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
2128 - panic!("failed to emit error: {}", e);
2128 + panic!("failed to emit error: {e}");
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_errors/src/emitter.rs:2137:29
|
2137 | ... panic!("failed to emit error: {}", e);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
2137 - panic!("failed to emit error: {}", e);
2137 + panic!("failed to emit error: {e}");
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_errors/src/emitter.rs:2142:23
|
2142 | Err(e) => panic!("failed to emit error: {}", e),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
2142 - Err(e) => panic!("failed to emit error: {}", e),
2142 + Err(e) => panic!("failed to emit error: {e}"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_errors/src/emitter.rs:2147:23
|
2147 | Err(e) => panic!("failed to emit error: {}", e),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
2147 - Err(e) => panic!("failed to emit error: {}", e),
2147 + Err(e) => panic!("failed to emit error: {e}"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_errors/src/emitter.rs:2150:21
|
2150 | panic!("failed to emit error: {}", e)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
2150 - panic!("failed to emit error: {}", e)
2150 + panic!("failed to emit error: {e}")
|
warning: this pattern creates a reference to a reference
--> compiler/rustc_errors/src/emitter.rs:2282:21
|
2282 | if let Some(ref sm) = emitter.source_map() {
| ^^^^^^ help: try this: `sm`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> compiler/rustc_errors/src/json.rs:153:13
|
153 | panic!("failed to print diagnostics: {:?}", e);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
153 - panic!("failed to print diagnostics: {:?}", e);
153 + panic!("failed to print diagnostics: {e:?}");
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_errors/src/json.rs:166:13
|
166 | panic!("failed to print notification: {:?}", e);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
166 - panic!("failed to print notification: {:?}", e);
166 + panic!("failed to print notification: {e:?}");
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_errors/src/json.rs:188:13
|
188 | panic!("failed to print future breakage report: {:?}", e);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
188 - panic!("failed to print future breakage report: {:?}", e);
188 + panic!("failed to print future breakage report: {e:?}");
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_errors/src/json.rs:202:13
|
202 | panic!("failed to print unused externs: {:?}", e);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
202 - panic!("failed to print unused externs: {:?}", e);
202 + panic!("failed to print unused externs: {e:?}");
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_errors/src/translation.rs:93:17
|
93 | / debug_assert!(
94 | | errs.is_empty(),
95 | | "identifier: {:?}, attr: {:?}, args: {:?}, errors: {:?}",
96 | | identifier,
... |
99 | | errs
100 | | );
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
--> compiler/rustc_errors/src/lib.rs:505:24
|
505 | let bugs = std::mem::replace(&mut self.delayed_span_bugs, Vec::new());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut self.delayed_span_bugs)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default
= note: `#[warn(clippy::mem_replace_with_default)]` on by default
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
--> compiler/rustc_errors/src/lib.rs:519:24
|
519 | let bugs = std::mem::replace(&mut self.delayed_good_path_bugs, Vec::new());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut self.delayed_good_path_bugs)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
--> compiler/rustc_errors/src/lib.rs:1206:20
|
1206 | let bugs = std::mem::replace(&mut inner.delayed_span_bugs, Vec::new());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut inner.delayed_span_bugs)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default
warning: the borrowed expression implements the required traits
--> compiler/rustc_errors/src/lib.rs:1404:36
|
1404 | let _ = self.fatal(&format!("{}; {}", &errors, &warnings));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}; {}", &errors, &warnings)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_errors/src/lib.rs:1427:34
|
1427 | self.failure(&format!(
| __________________________________^
1428 | | "Some errors have detailed explanations: {}{}",
1429 | | error_codes[..limit].join(", "),
1430 | | if error_codes.len() > 9 { "..." } else { "." }
1431 | | ));
| |_____________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
help: change this to
|
1427 ~ self.failure(format!(
1428 + "Some errors have detailed explanations: {}{}",
1429 + error_codes[..limit].join(", "),
1430 + if error_codes.len() > 9 { "..." } else { "." }
1431 ~ ));
|
warning: the borrowed expression implements the required traits
--> compiler/rustc_errors/src/lib.rs:1432:34
|
1432 | self.failure(&format!(
| __________________________________^
1433 | | "For more information about an error, try \
1434 | | `rustc --explain {}`.",
1435 | | &error_codes[0]
1436 | | ));
| |_____________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
help: change this to
|
1432 ~ self.failure(format!(
1433 + "For more information about an error, try \
1434 + `rustc --explain {}`.",
1435 + &error_codes[0]
1436 ~ ));
|
warning: the borrowed expression implements the required traits
--> compiler/rustc_errors/src/lib.rs:1438:34
|
1438 | self.failure(&format!(
| __________________________________^
1439 | | "For more information about this error, try \
1440 | | `rustc --explain {}`.",
1441 | | &error_codes[0]
1442 | | ));
| |_____________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
help: change this to
|
1438 ~ self.failure(format!(
1439 + "For more information about this error, try \
1440 + `rustc --explain {}`.",
1441 + &error_codes[0]
1442 ~ ));
|
warning: the borrowed expression implements the required traits
--> compiler/rustc_errors/src/lib.rs:1543:25
|
1543 | diagnostic.note(&format!("delayed at {}", std::panic::Location::caller()));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("delayed at {}", std::panic::Location::caller())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> compiler/rustc_errors/src/lib.rs:1645:25
|
1645 | / panic!(
1646 | | "aborting after {} errors and {} delayed bugs due to `-Z treat-err-as-bug={}`",
1647 | | count, delayed_count, as_bug,
1648 | | )
| |_________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
warning: variables can be used directly in the `format!` string
--> compiler/rustc_errors/src/lib.rs:1650:25
|
1650 | / panic!(
1651 | | "aborting after {} errors due to `-Z treat-err-as-bug={}`",
1652 | | count, as_bug,
1653 | | )
| |_________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
warning: the borrowed expression implements the required traits
--> compiler/rustc_errors/src/lib.rs:1672:25
|
1672 | self.inner.note(&format!("delayed at {}", self.note));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("delayed at {}", self.note)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> compiler/rustc_errors/src/lib.rs:1768:30
|
1768 | if incl_angl_brckt { format!("<{}>", anon_lts) } else { format!("{}, ", anon_lts) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
1768 - if incl_angl_brckt { format!("<{}>", anon_lts) } else { format!("{}, ", anon_lts) };
1768 + if incl_angl_brckt { format!("<{anon_lts}>") } else { format!("{}, ", anon_lts) };
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_errors/src/lib.rs:1768:65
|
1768 | if incl_angl_brckt { format!("<{}>", anon_lts) } else { format!("{}, ", anon_lts) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
1768 - if incl_angl_brckt { format!("<{}>", anon_lts) } else { format!("{}, ", anon_lts) };
1768 + if incl_angl_brckt { format!("<{}>", anon_lts) } else { format!("{anon_lts}, ") };
|
warning: the borrowed expression implements the required traits
--> compiler/rustc_errors/src/lib.rs:1771:9
|
1771 | &format!("indicate the anonymous lifetime{}", pluralize!(n)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("indicate the anonymous lifetime{}", pluralize!(n))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: `rustc_errors` (lib) generated 48 warnings (1 duplicate) (run `cargo fix --lib -p rustc_errors` to apply 44 suggestions)
Checking rustc_session v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc_session)
warning: use of `.to_digit(..).is_some()`
--> compiler/rustc_session/src/errors.rs:315:26
|
315 | .all(|c| c.to_digit(base).is_some());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `c.is_digit(base)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_digit_is_some
= note: `#[warn(clippy::to_digit_is_some)]` on by default
warning: you should consider adding a `Default` implementation for `CguReuseTracker`
--> compiler/rustc_session/src/cgu_reuse_tracker.rs:62:5
|
62 | / pub fn new() -> CguReuseTracker {
63 | | let data =
64 | | TrackerData { actual_reuse: Default::default(), expected_reuse: Default::default() };
65 | |
66 | | CguReuseTracker { data: Some(Arc::new(Mutex::new(data))) }
67 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
61 + impl Default for CguReuseTracker {
62 + fn default() -> Self {
63 + Self::new()
64 + }
65 + }
|
warning: statement with no effect
--> compiler/rustc_session/src/cgu_reuse_tracker.rs:122:25
|
122 | / IncorrectCguReuseType {
123 | | span: error_span.0,
124 | | cgu_user_name,
125 | | actual_reuse,
126 | | expected_reuse,
127 | | at_least,
128 | | };
| |__________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect
= note: `#[warn(clippy::no_effect)]` on by default
warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
--> compiler/rustc_session/src/parse.rs:112:9
|
112 | / sess.span_diagnostic
113 | | .steal_diagnostic(span, StashKey::EarlySyntaxWarning)
114 | | .map(|err| err.cancel());
| |____________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn
= note: `#[warn(clippy::option_map_unit_fn)]` on by default
help: try this
|
112 ~ if let Some(err) = sess.span_diagnostic
113 + .steal_diagnostic(span, StashKey::EarlySyntaxWarning) { err.cancel() }
|
warning: unneeded `return` statement
--> compiler/rustc_session/src/parse.rs:329:9
|
329 | return spans.len() - 1;
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
= help: remove `return`
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
--> compiler/rustc_session/src/code_stats.rs:120:47
|
120 | for (i, variant_info) in variants.into_iter().enumerate() {
| ^^^^^^^^^ help: call directly: `iter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
= note: `#[warn(clippy::into_iter_on_ref)]` on by default
warning: struct `OutputTypes` has a public `len` method, but no `is_empty` method
--> compiler/rustc_session/src/config.rs:430:5
|
430 | pub fn len(&self) -> usize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty
= note: `#[warn(clippy::len_without_is_empty)]` on by default
warning: struct `Externs` has a public `len` method, but no `is_empty` method
--> compiler/rustc_session/src/config.rs:518:5
|
518 | pub fn len(&self) -> usize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty
warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do
--> compiler/rustc_session/src/config.rs:672:55
|
672 | fn with_directory_and_extension(&self, directory: &PathBuf, extension: &str) -> PathBuf {
| ^^^^^^^^ help: change this to: `&Path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
= note: `#[warn(clippy::ptr_arg)]` on by default
warning: redundant closure
--> compiler/rustc_session/src/config.rs:1002:59
|
1002 | .map(|names_valid| names_valid.iter().map(|a| f(a)).collect()),
| ^^^^^^^^ help: replace the closure with the function itself: `&mut f`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
= note: `#[warn(clippy::redundant_closure)]` on by default
warning: redundant closure
--> compiler/rustc_session/src/config.rs:1006:51
|
1006 | .map(|(a, b)| (f(a), b.iter().map(|b| f(b)).collect()))
| ^^^^^^^^ help: replace the closure with the function itself: `&mut f`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
warning: variables can be used directly in the `format!` string
--> compiler/rustc_session/src/config.rs:1198:14
|
1198 | &format!(
| ______________^
1199 | | "Error loading target specification: {}. \
1200 | | Run `rustc --print target-list` for a list of built-in targets",
1201 | | e
1202 | | ),
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
warning: variables can be used directly in the `format!` string
--> compiler/rustc_session/src/config.rs:1648:13
|
1648 | / format!(
1649 | | "the crate requires edition {}, but the latest edition supported by this Rust version is {}",
1650 | | edition, LATEST_STABLE_EDITION
1651 | | )
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
warning: redundant closure
--> compiler/rustc_session/src/config.rs:2113:29
|
2113 | let path = path.map(|p| CanonicalizedPath::new(p));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `CanonicalizedPath::new`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> compiler/rustc_session/src/config.rs:2215:21
|
2215 | Some(to) => match std::env::current_dir() {
| _____________________^
2216 | | Ok(cwd) => mapping.push((cwd, to.clone())),
2217 | | Err(_) => (),
2218 | | },
| |_________^ help: try this: `if let Ok(cwd) = std::env::current_dir() { mapping.push((cwd, to.clone())) }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
= note: `#[warn(clippy::single_match)]` on by default
warning: unneeded `return` statement
--> compiler/rustc_session/src/filesearch.rs:152:5
|
152 | return sysroot_candidates;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= help: remove `return`
warning: redundant closure
--> compiler/rustc_session/src/filesearch.rs:168:42
|
168 | let dll = current_dll_path().map(|s| canonicalize(s))?;
| ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `canonicalize`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
warning: unneeded `return` statement
--> compiler/rustc_session/src/options.rs:346:5
|
346 | return op;
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= help: remove `return`
warning: variables can be used directly in the `format!` string
--> compiler/rustc_session/src/options.rs:329:30
|
329 | ... &format!(
| ________________________^
330 | | ... "{0} option `{1}` requires {2} ({3} {1}=<value>)",
331 | | ... outputname, key, type_desc, prefix
332 | | ... ),
| |_______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
warning: redundant clone
--> compiler/rustc_session/src/session.rs:702:48
|
702 | let found_positive = requested_features.clone().any(|r| r == "+crt-static");
| ^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> compiler/rustc_session/src/session.rs:702:30
|
702 | let found_positive = requested_features.clone().any(|r| r == "+crt-static");
| ^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
= note: `#[warn(clippy::redundant_clone)]` on by default
warning: binary comparison to literal `Option::None`
--> compiler/rustc_session/src/session.rs:709:16
|
709 | || crate_type == None && self.opts.crate_types.contains(&CrateType::ProcMacro)
| ^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `crate_type.is_none()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none
= note: `#[warn(clippy::partialeq_to_none)]` on by default
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_session/src/session.rs:758:77
|
758 | let rustlib_path = rustc_target::target_rustlib_path(&self.sysroot, &config::host_triple());
| ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `config::host_triple()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
warning: the borrowed expression implements the required traits
--> compiler/rustc_session/src/session.rs:861:35
|
861 | self.warn(&format!("optimization-fuel-exhausted: {}", msg()));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("optimization-fuel-exhausted: {}", msg())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: unnecessary closure used to substitute value for `Option::None`
--> compiler/rustc_session/src/session.rs:1322:21
|
1322 | let hash_kind = sopts.unstable_opts.src_hash_algorithm.unwrap_or_else(|| {
| _____________________^
1323 | | if target_cfg.is_like_msvc {
1324 | | SourceFileHashAlgorithm::Sha1
1325 | | } else {
1326 | | SourceFileHashAlgorithm::Md5
1327 | | }
1328 | | });
| |______^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
= note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default
help: use `unwrap_or(..)` instead
|
1322 ~ let hash_kind = sopts.unstable_opts.src_hash_algorithm.unwrap_or({
1323 + if target_cfg.is_like_msvc {
1324 + SourceFileHashAlgorithm::Sha1
1325 + } else {
1326 + SourceFileHashAlgorithm::Md5
1327 + }
1328 ~ });
|
warning: the borrowed expression implements the required traits
--> compiler/rustc_session/src/output.rs:126:55
|
126 | .unwrap_or_else(|| outputs.out_directory.join(&format!("lib{libname}.rmeta")));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("lib{libname}.rmeta")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_session/src/output.rs:142:55
|
142 | CrateType::Rlib => outputs.out_directory.join(&format!("lib{libname}.rlib")),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("lib{libname}.rlib")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_session/src/output.rs:145:40
|
145 | outputs.out_directory.join(&format!("{prefix}{libname}{suffix}"))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{prefix}{libname}{suffix}")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_session/src/output.rs:149:40
|
149 | outputs.out_directory.join(&format!("{prefix}{libname}{suffix}"))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{prefix}{libname}{suffix}")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: `rustc_session` (lib) generated 29 warnings (1 duplicate) (run `cargo fix --lib -p rustc_session` to apply 22 suggestions)
Checking rustc_attr v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc_attr)
Checking rustc_query_system v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc_query_system)
Checking rustc_parse v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc_parse)
warning: redundant field names in struct initialization
--> compiler/rustc_query_system/src/query/job.rs:610:9
|
610 | cycle_usage: cycle_usage,
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `cycle_usage`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
= note: `#[warn(clippy::redundant_field_names)]` on by default
warning: this `else { if .. }` block can be collapsed
--> compiler/rustc_parse/src/parser/expr.rs:2254:20
|
2254 | } else {
| ____________________^
2255 | | if let Some(block) = recover_block_from_condition(self) {
2256 | | block
2257 | | } else {
... |
2267 | | }
2268 | | };
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
= note: `#[warn(clippy::collapsible_else_if)]` on by default
help: collapse nested if block
|
2254 ~ } else if let Some(block) = recover_block_from_condition(self) {
2255 + block
2256 + } else {
2257 + self.error_on_extra_if(&cond)?;
2258 + // Parse block, which will always fail, but we can add a nice note to the error
2259 + self.parse_block().map_err(|mut err| {
2260 + err.span_note(
2261 + cond_span,
2262 + "the `if` expression is missing a block after this condition",
2263 + );
2264 + err
2265 + })?
2266 ~ };
|
warning: this `else { if .. }` block can be collapsed
--> compiler/rustc_parse/src/parser/mod.rs:1259:16
|
1259 | } else {
| ________________^
1260 | | if self.eat(&token::Eq) {
1261 | | let eq_span = self.prev_token.span;
1262 | | AttrArgs::Eq(eq_span, AttrArgsEq::Ast(self.parse_expr_force_collect()?))
... |
1265 | | }
1266 | | })
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
help: collapse nested if block
|
1259 ~ } else if self.eat(&token::Eq) {
1260 + let eq_span = self.prev_token.span;
1261 + AttrArgs::Eq(eq_span, AttrArgsEq::Ast(self.parse_expr_force_collect()?))
1262 + } else {
1263 + AttrArgs::Empty
1264 ~ })
|
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_attr/src/builtin.rs:27:20
|
27 | Symbol::intern(&version)
| ^^^^^^^^ help: change this to: `version`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
warning: this `if` has identical blocks
--> compiler/rustc_attr/src/builtin.rs:302:69
|
302 | if meta_name == sym::unstable && stab.is_some() {
| _____________________________________________________________________^
303 | | handle_errors(
304 | | &sess.parse_sess,
305 | | attr.span,
... |
308 | | break;
309 | | } else if meta_name == sym::rustc_const_unstable && const_stab.is_some() {
| |_____________________^
|
note: same as this
--> compiler/rustc_attr/src/builtin.rs:309:94
|
309 | } else if meta_name == sym::rustc_const_unstable && const_stab.is_some() {
| ______________________________________________________________________________________________^
310 | | handle_errors(
311 | | &sess.parse_sess,
312 | | attr.span,
... |
315 | | break;
316 | | } else if meta_name == sym::rustc_default_body_unstable && body_stab.is_some() {
| |_____________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
= note: `#[warn(clippy::if_same_then_else)]` on by default
warning: this `if` has identical blocks
--> compiler/rustc_attr/src/builtin.rs:309:94
|
309 | } else if meta_name == sym::rustc_const_unstable && const_stab.is_some() {
| ______________________________________________________________________________________________^
310 | | handle_errors(
311 | | &sess.parse_sess,
312 | | attr.span,
... |
315 | | break;
316 | | } else if meta_name == sym::rustc_default_body_unstable && body_stab.is_some() {
| |_____________________^
|
note: same as this
--> compiler/rustc_attr/src/builtin.rs:316:100
|
316 | } else if meta_name == sym::rustc_default_body_unstable && body_stab.is_some() {
| ____________________________________________________________________________________________________^
317 | | handle_errors(
318 | | &sess.parse_sess,
319 | | attr.span,
... |
322 | | break;
323 | | }
| |_____________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
warning: this `if` has identical blocks
--> compiler/rustc_attr/src/builtin.rs:445:67
|
445 | if meta_name == sym::stable && stab.is_some() {
| ___________________________________________________________________^
446 | | handle_errors(
447 | | &sess.parse_sess,
448 | | attr.span,
... |
451 | | break;
452 | | } else if meta_name == sym::rustc_const_stable && const_stab.is_some() {
| |_____________________^
|
note: same as this
--> compiler/rustc_attr/src/builtin.rs:452:92
|
452 | } else if meta_name == sym::rustc_const_stable && const_stab.is_some() {
| ____________________________________________________________________________________________^
453 | | handle_errors(
454 | | &sess.parse_sess,
455 | | attr.span,
... |
458 | | break;
459 | | }
| |_____________________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_attr/src/builtin.rs:615:18
|
615 | gate_cfg(&gated_cfg, span, sess, feats);
| ^^^^^^^^^^ help: change this to: `gated_cfg`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> compiler/rustc_attr/src/builtin.rs:622:23
|
622 | let explain = format!("`cfg({})` is experimental and subject to change", cfg);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
help: change this to
|
622 - let explain = format!("`cfg({})` is experimental and subject to change", cfg);
622 + let explain = format!("`cfg({cfg})` is experimental and subject to change");
|
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_attr/src/builtin.rs:734:29
|
734 | ... &"compact `cfg(target(..))` is experimental and subject to change"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `"compact `cfg(target(..))` is experimental and subject to change"`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> compiler/rustc_attr/src/builtin.rs:978:5
|
978 | assert!(attr.has_name(sym::repr), "expected `#[repr(..)]`, found: {:?}", attr);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
978 - assert!(attr.has_name(sym::repr), "expected `#[repr(..)]`, found: {:?}", attr);
978 + assert!(attr.has_name(sym::repr), "expected `#[repr(..)]`, found: {attr:?}");
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_attr/src/session_diagnostics.rs:54:56
|
54 | let expected = self.expected.iter().map(|name| format!("`{}`", name)).collect::<Vec<_>>();
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
54 - let expected = self.expected.iter().map(|name| format!("`{}`", name)).collect::<Vec<_>>();
54 + let expected = self.expected.iter().map(|name| format!("`{name}`")).collect::<Vec<_>>();
|
warning: `rustc_attr` (lib) generated 10 warnings (1 duplicate) (run `cargo fix --lib -p rustc_attr` to apply 6 suggestions)
warning: variables can be used directly in the `format!` string
--> compiler/rustc_query_system/src/dep_graph/debug.rs:32:25
|
32 | let debug_str = format!("{:?}", node);
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
help: change this to
|
32 - let debug_str = format!("{:?}", node);
32 + let debug_str = format!("{node:?}");
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_query_system/src/dep_graph/debug.rs:49:17
|
49 | Err(format!("expected a filter like `a&b -> c&d`, not `{}`", test).into())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
49 - Err(format!("expected a filter like `a&b -> c&d`, not `{}`", test).into())
49 + Err(format!("expected a filter like `a&b -> c&d`, not `{test}`").into())
|
warning: returning the result of a `let` binding from a block
--> compiler/rustc_query_system/src/dep_graph/dep_node.rs:90:9
|
78 | let dep_node = DepNode { kind, hash: hash.into() };
| --------------------------------------------------- unnecessary `let` binding
...
90 | dep_node
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
= note: `#[warn(clippy::let_and_return)]` on by default
help: return the expression directly
|
78 ~
79 |
...
89 |
90 ~ DepNode { kind, hash: hash.into() }
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_query_system/src/dep_graph/dep_node.rs:123:9
|
123 | format!("{:?}", self)
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
123 - format!("{:?}", self)
123 + format!("{self:?}")
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_query_system/src/dep_graph/graph.rs:316:9
|
316 | / assert!(
317 | | !self.dep_node_exists(&key),
318 | | "forcing query with already existing `DepNode`\n\
319 | | - query-key: {:?}\n\
... |
322 | | key
323 | | );
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
warning: variables can be used directly in the `format!` string
--> compiler/rustc_query_system/src/dep_graph/graph.rs:365:13
|
365 | / debug_assert!(
366 | | data.colors.get(prev_index).is_none(),
367 | | "DepGraph::with_task() - Duplicate DepNodeColor \
368 | | insertion for {:?}",
369 | | key
370 | | );
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
warning: variables can be used directly in the `format!` string
--> compiler/rustc_query_system/src/dep_graph/graph.rs:450:25
|
450 | panic!("Illegal read of: {:?}", dep_node_index)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
450 - panic!("Illegal read of: {:?}", dep_node_index)
450 + panic!("Illegal read of: {dep_node_index:?}")
|
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_query_system/src/dep_graph/graph.rs:684:69
|
684 | self.try_mark_previous_green(qcx, data, prev_index, &dep_node)
| ^^^^^^^^^ help: change this to: `dep_node`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
warning: unneeded `return` statement
--> compiler/rustc_query_system/src/dep_graph/graph.rs:774:9
|
774 | return None;
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
= help: remove `return`
warning: redundant pattern matching, consider using `is_none()`
--> compiler/rustc_query_system/src/dep_graph/graph.rs:759:16
|
759 | if let None = qcx.dep_context().sess().has_errors_or_delayed_span_bugs() {
| -------^^^^------------------------------------------------------------- help: try this: `if qcx.dep_context().sess().has_errors_or_delayed_span_bugs().is_none()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
= note: `#[warn(clippy::redundant_pattern_matching)]` on by default
warning: variables can be used directly in the `format!` string
--> compiler/rustc_query_system/src/dep_graph/graph.rs:824:9
|
824 | / debug_assert!(
825 | | data.colors.get(prev_dep_node_index).is_none(),
826 | | "DepGraph::try_mark_previous_green() - Duplicate DepNodeColor \
827 | | insertion for {:?}",
828 | | dep_node
829 | | );
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
warning: variables can be used directly in the `format!` string
--> compiler/rustc_query_system/src/dep_graph/graph.rs:1165:25
|
1165 | eprintln!("[task::green] {:?}", key);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
1165 - eprintln!("[task::green] {:?}", key);
1165 + eprintln!("[task::green] {key:?}");
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_query_system/src/dep_graph/graph.rs:1187:25
|
1187 | eprintln!("[task::red] {:?}", key);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
1187 - eprintln!("[task::red] {:?}", key);
1187 + eprintln!("[task::red] {key:?}");
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_query_system/src/dep_graph/graph.rs:1210:21
|
1210 | eprintln!("[task::unknown] {:?}", key);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
1210 - eprintln!("[task::unknown] {:?}", key);
1210 + eprintln!("[task::unknown] {key:?}");
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_query_system/src/dep_graph/graph.rs:1235:17
|
1235 | eprintln!("[task::new] {:?}", key);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
1235 - eprintln!("[task::new] {:?}", key);
1235 + eprintln!("[task::new] {key:?}");
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_query_system/src/dep_graph/serialized.rs:273:13
|
273 | eprintln!("{}", SEPARATOR);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
273 - eprintln!("{}", SEPARATOR);
273 + eprintln!("{SEPARATOR}");
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_query_system/src/dep_graph/serialized.rs:279:17
|
279 | eprintln!("[incremental] Total Edge Reads: {}", total_read_count);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
279 - eprintln!("[incremental] Total Edge Reads: {}", total_read_count);
279 + eprintln!("[incremental] Total Edge Reads: {total_read_count}");
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_query_system/src/dep_graph/serialized.rs:280:17
|
280 | / eprintln!(
281 | | "[incremental] Total Duplicate Edge Reads: {}",
282 | | total_duplicate_read_count
283 | | );
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
warning: variables can be used directly in the `format!` string
--> compiler/rustc_query_system/src/dep_graph/serialized.rs:291:13
|
291 | eprintln!("{}", SEPARATOR);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
291 - eprintln!("{}", SEPARATOR);
291 + eprintln!("{SEPARATOR}");
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_query_system/src/dep_graph/serialized.rs:307:13
|
307 | eprintln!("{}", SEPARATOR);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
307 - eprintln!("{}", SEPARATOR);
307 + eprintln!("{SEPARATOR}");
|
warning: this returns a `Result<_, ()>`
--> compiler/rustc_query_system/src/query/plumbing.rs:343:1
|
343 | / pub fn try_get_cached<Tcx, C, R, OnHit>(
344 | | tcx: Tcx,
345 | | cache: &C,
346 | | key: &C::Key,
347 | | // `on_hit` can be called while holding a lock to the query cache
348 | | on_hit: OnHit,
349 | | ) -> Result<R, ()>
| |__________________^
|
= help: use a custom `Error` type instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err
= note: `#[warn(clippy::result_unit_err)]` on by default
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_query_system/src/query/plumbing.rs:355:18
|
355 | cache.lookup(&key, |value, index| {
| ^^^^ help: change this to: `key`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_query_system/src/query/plumbing.rs:453:63
|
453 | try_load_from_disk_and_cache_in_memory(qcx, &key, &dep_node, query)
| ^^^^^^^^^ help: change this to: `dep_node`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_query_system/src/query/plumbing.rs:508:79
|
508 | let (prev_dep_node_index, dep_node_index) = dep_graph.try_mark_green(qcx, &dep_node)?;
| ^^^^^^^^^ help: change this to: `dep_node`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> compiler/rustc_query_system/src/query/plumbing.rs:556:9
|
556 | / debug_assert!(
557 | | !qcx.dep_context().fingerprint_style(dep_node.kind).reconstructible(),
558 | | "missing on-disk cache entry for {:?}",
559 | | dep_node
560 | | );
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
warning: variables can be used directly in the `format!` string
--> compiler/rustc_query_system/src/query/plumbing.rs:596:5
|
596 | / assert!(
597 | | tcx.dep_graph().is_green(dep_node),
598 | | "fingerprint for green query instance not loaded from cache: {:?}",
599 | | dep_node,
600 | | );
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
warning: variables can be used directly in the `format!` string
--> compiler/rustc_query_system/src/query/plumbing.rs:678:13
|
678 | format!("`cargo clean -p {}` or `cargo clean`", crate_name)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
678 - format!("`cargo clean -p {}` or `cargo clean`", crate_name)
678 + format!("`cargo clean -p {crate_name}` or `cargo clean`")
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_query_system/src/query/plumbing.rs:685:23
|
685 | dep_node: format!("{:?}", dep_node),
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
685 - dep_node: format!("{:?}", dep_node),
685 + dep_node: format!("{dep_node:?}"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_query_system/src/query/plumbing.rs:687:9
|
687 | panic!("Found unstable fingerprints for {:?}: {:?}", dep_node, result);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
687 - panic!("Found unstable fingerprints for {:?}: {:?}", dep_node, result);
687 + panic!("Found unstable fingerprints for {dep_node:?}: {result:?}");
|
warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> compiler/rustc_query_system/src/query/plumbing.rs:796:5
|
796 | / match cached {
797 | | Ok(()) => return,
798 | | Err(()) => {}
799 | | }
| |_____^ help: try this: `if let Ok(()) = cached { return }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
= note: `#[warn(clippy::single_match)]` on by default
warning: this returns a `Result<_, ()>`
--> compiler/rustc_query_system/src/query/caches.rs:39:5
|
39 | / fn lookup<R, OnHit>(
40 | | &self,
41 | | key: &Self::Key,
42 | | // `on_hit` can be called while holding a lock to the query state shard.
43 | | on_hit: OnHit,
44 | | ) -> Result<R, ()>
| |______________________^
|
= help: use a custom `Error` type instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_query_system/src/query/caches.rs:167:9
|
167 | &value
| ^^^^^^ help: change this to: `value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_query_system/src/query/caches.rs:348:9
|
348 | &value
| ^^^^^^ help: change this to: `value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: `rustc_query_system` (lib) generated 35 warnings (1 duplicate) (run `cargo fix --lib -p rustc_query_system` to apply 31 suggestions)
Checking rustc_middle v0.0.0 (/home/gh-jyn514/rust3/compiler/rustc_middle)
warning: manual implementation of `Option::map`
--> compiler/rustc_parse/src/parser/attr.rs:44:24
|
44 | } else if let Some(prev_outer_attr_sp) = prev_outer_attr_sp {
| ________________________^
45 | | Some(InnerAttrForbiddenReason::AfterOuterAttribute { prev_outer_attr_sp })
46 | | } else {
47 | | None
48 | | };
| |_________________^ help: try this: `{ prev_outer_attr_sp.map(|prev_outer_attr_sp| InnerAttrForbiddenReason::AfterOuterAttribute { prev_outer_attr_sp }) }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map
= note: `#[warn(clippy::manual_map)]` on by default
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/parser/attr_wrapper.rs:148:17
|
148 | assert!(!range.is_empty(), "Cannot replace an empty range: {:?}", range);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
help: change this to
|
148 - assert!(!range.is_empty(), "Cannot replace an empty range: {:?}", range);
148 + assert!(!range.is_empty(), "Cannot replace an empty range: {range:?}");
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/parser/attr_wrapper.rs:150:17
|
150 | / assert!(
151 | | range.len() >= new_tokens.len(),
152 | | "Range {:?} has greater len than {:?}",
153 | | range,
154 | | new_tokens
155 | | );
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/parser/attr_wrapper.rs:412:40
|
412 | .unwrap_or_else(|| panic!("Token stack was empty for token: {:?}", token));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
412 - .unwrap_or_else(|| panic!("Token stack was empty for token: {:?}", token));
412 + .unwrap_or_else(|| panic!("Token stack was empty for token: {token:?}"));
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/parser/attr_wrapper.rs:415:17
|
415 | / assert_eq!(
416 | | open_delim, delim,
417 | | "Mismatched open/close delims: open={:?} close={:?}",
418 | | open_delim, span
419 | | );
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/parser/attr_wrapper.rs:426:25
|
426 | panic!("Bottom token frame is missing for token: {:?}", token)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
426 - panic!("Bottom token frame is missing for token: {:?}", token)
426 + panic!("Bottom token frame is missing for token: {token:?}")
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/parser/attr_wrapper.rs:459:13
|
459 | panic!("Unexpected last token {:?}", last_token)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
459 - panic!("Unexpected last token {:?}", last_token)
459 + panic!("Unexpected last token {last_token:?}")
|
warning: the `Err`-variant returned from this function is very large
--> compiler/rustc_parse/src/parser/diagnostics.rs:282:57
|
282 | pub(super) fn span_to_snippet(&self, span: Span) -> Result<String, SpanSnippetError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 128 bytes
|
= help: try reducing the size of `rustc_span::SpanSnippetError`, for example by boxing large elements or replacing it with `Box<rustc_span::SpanSnippetError>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
= note: `#[warn(clippy::result_large_err)]` on by default
warning: unneeded `return` statement
--> compiler/rustc_parse/src/parser/diagnostics.rs:384:17
|
384 | return None;
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
= help: remove `return`
warning: this `if` has identical blocks
--> compiler/rustc_parse/src/parser/diagnostics.rs:394:80
|
394 | if self.token.span == DUMMY_SP || self.prev_token.span == DUMMY_SP {
| ________________________________________________________________________________^
395 | | // Likely inside a macro, can't provide meaningful suggestions.
396 | | } else if !sm.is_multiline(self.prev_token.span.until(self.token.span)) {
| |_____________^
|
note: same as this
--> compiler/rustc_parse/src/parser/diagnostics.rs:396:85
|
396 | } else if !sm.is_multiline(self.prev_token.span.until(self.token.span)) {
| _____________________________________________________________________________________^
397 | | // The current token is in the same line as the prior token, not recoverable.
398 | | } else if [token::Comma, token::Colon].contains(&self.token.kind)
| |_____________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
= note: `#[warn(clippy::if_same_then_else)]` on by default
warning: this `if` has identical blocks
--> compiler/rustc_parse/src/parser/diagnostics.rs:396:85
|
396 | } else if !sm.is_multiline(self.prev_token.span.until(self.token.span)) {
| _____________________________________________________________________________________^
397 | | // The current token is in the same line as the prior token, not recoverable.
398 | | } else if [token::Comma, token::Colon].contains(&self.token.kind)
| |_____________^
|
note: same as this
--> compiler/rustc_parse/src/parser/diagnostics.rs:400:13
|
400 | / {
401 | | // Likely typo: The current token is on a new line and is expected to be
402 | | // `.`, `;`, `?`, or an operator after a close delimiter token.
403 | | //
... |
408 | | // https://github.com/rust-lang/rust/issues/72253
409 | | } else if self.look_ahead(1, |t| {
| |_____________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/diagnostics.rs:488:61
|
488 | let mut err = self.struct_span_err(self.token.span, &msg_exp);
| ^^^^^^^^ help: change this to: `msg_exp`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/diagnostics.rs:494:21
|
494 | &format!("write `fn` instead of `{symbol}` to declare a function"),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("write `fn` instead of `{symbol}` to declare a function")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this `if` has identical blocks
--> compiler/rustc_parse/src/parser/diagnostics.rs:554:45
|
554 | if self.prev_token.span == DUMMY_SP {
| _____________________________________________^
555 | | // Account for macro context where the previous span might not be
556 | | // available to avoid incorrect output (#54841).
557 | | err.span_label(self.token.span, label_exp);
558 | | } else if !sm.is_multiline(self.token.span.shrink_to_hi().until(sp.shrink_to_lo())) {
| |_________^
|
note: same as this
--> compiler/rustc_parse/src/parser/diagnostics.rs:558:93
|
558 | } else if !sm.is_multiline(self.token.span.shrink_to_hi().until(sp.shrink_to_lo())) {
| _____________________________________________________________________________________________^
559 | | // When the spans are in the same line, it means that the only content between
560 | | // them is whitespace, point at the found token in that case:
561 | | //
... |
571 | | err.span_label(self.token.span, label_exp);
572 | | } else {
| |_________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/diagnostics.rs:608:21
|
608 | &format!("remove the extra `#`{}", pluralize!(count)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("remove the extra `#`{}", pluralize!(count))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/diagnostics.rs:614:21
|
614 | &format!("this raw string started with {n_hashes} `#`{}", pluralize!(n_hashes)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("this raw string started with {n_hashes} `#`{}", pluralize!(n_hashes))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: in an `if` condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`
--> compiler/rustc_parse/src/parser/diagnostics.rs:820:45
|
820 | while self.look_ahead(position, |t| {
| _____________________________________________^
821 | | trace!("check_trailing_angle_brackets: t={:?}", t);
822 | | if *t == token::BinOp(token::BinOpToken::Shr) {
823 | | number_of_shr += 1;
... |
830 | | }
831 | | }) {
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#blocks_in_if_conditions
= note: `#[warn(clippy::blocks_in_if_conditions)]` on by default
warning: in an `if` condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`
--> compiler/rustc_parse/src/parser/diagnostics.rs:846:42
|
846 | if self.look_ahead(position, |t| {
| __________________________________________^
847 | | trace!("check_trailing_angle_brackets: t={:?}", t);
848 | | end.contains(&&t.kind)
849 | | }) {
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#blocks_in_if_conditions
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_parse/src/parser/diagnostics.rs:988:72
|
988 | ... .unwrap_or_else(|_| pprust::expr_to_string(&e))
| ^^ help: change this to: `e`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_parse/src/parser/diagnostics.rs:992:50
|
992 | middle_term: expr_to_str(&r1),
| ^^^ help: change this to: `r1`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_parse/src/parser/diagnostics.rs:1201:77
|
1201 | self.sess.emit_err(AmbiguousPlus { sum_ty: pprust::ty_to_string(&ty), span: ty.span });
| ^^^ help: change this to: `ty`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/diagnostics.rs:1291:13
|
1291 | &format!("Rust has no {} {} operator", kind.fixity, kind.op.name()),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("Rust has no {} {} operator", kind.fixity, kind.op.name())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/diagnostics.rs:1293:33
|
1293 | err.span_label(op_span, &format!("not a valid {} operator", kind.fixity));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("not a valid {} operator", kind.fixity)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/diagnostics.rs:1296:22
|
1296 | err.help(&format!("use `{}= 1` instead", kind.op.chr()));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("use `{}= 1` instead", kind.op.chr())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/diagnostics.rs:1485:48
|
1485 | let mut err = self.struct_span_err(sp, &msg);
| ^^^^ help: change this to: `msg`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_parse/src/parser/diagnostics.rs:1571:93
|
1571 | expr: self.span_to_snippet(expr.span).unwrap_or_else(|_| pprust::expr_to_string(&expr)),
| ^^^^^ help: change this to: `expr`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/diagnostics.rs:1618:52
|
1618 | ...k_to_lo(), &format!("{prefix}you can still access the deprecated `try!()` macro using the \"raw identifier\" syntax"), "r#", Applicabi...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{prefix}you can still access the deprecated `try!()` macro using the \"raw identifier\" syntax")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: called `iter().cloned().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable
--> compiler/rustc_parse/src/parser/diagnostics.rs:1749:49
|
1749 | err.span.primary_spans().iter().cloned().collect();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_cloned_collect
= note: `#[warn(clippy::iter_cloned_collect)]` on by default
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/diagnostics.rs:1765:21
|
1765 | &format!("`{delim}` may belong here"),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("`{delim}` may belong here")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/diagnostics.rs:2067:50
|
2067 | let mut err = self.struct_span_err(span, &msg);
| ^^^^ help: change this to: `msg`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do
--> compiler/rustc_parse/src/parser/diagnostics.rs:2101:72
|
2101 | pub(super) fn deduplicate_recovered_params_names(&self, fn_inputs: &mut Vec<Param>) {
| ^^^^^^^^^^^^^^^ help: change this to: `&mut [Param]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
= note: `#[warn(clippy::ptr_arg)]` on by default
warning: unneeded `return` statement
--> compiler/rustc_parse/src/parser/diagnostics.rs:2154:9
|
2154 | return Ok(false); // Don't continue.
| ^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= help: remove `return`
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/diagnostics.rs:2138:13
|
2138 | &format!("expected one of `,` or `>`, found {}", super::token_descr(&self.token)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("expected one of `,` or `>`, found {}", super::token_descr(&self.token))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/diagnostics.rs:2516:17
|
2516 | / &format!(
2517 | | "try adding parentheses to match on a tuple{}",
2518 | | if let CommaRecoveryMode::LikelyTuple = rt { "" } else { "..." },
2519 | | ),
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
help: change this to
|
2516 ~ format!(
2517 + "try adding parentheses to match on a tuple{}",
2518 + if let CommaRecoveryMode::LikelyTuple = rt { "" } else { "..." },
2519 ~ ),
|
warning: all variants have the same postfix: `Parsed`
--> compiler/rustc_parse/src/parser/expr.rs:83:1
|
83 | / pub(super) enum LhsExpr {
84 | | NotYetParsed,
85 | | AttributesParsed(AttrWrapper),
86 | | AlreadyParsed(P<Expr>, bool), // (expr, starts_statement)
87 | | }
| |_^
|
= help: remove the postfixes and use full paths to the variants instead of glob imports
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names
= note: `#[warn(clippy::enum_variant_names)]` on by default
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/expr.rs:844:54
|
844 | let mut err = self.struct_span_err(span, &msg);
| ^^^^ help: change this to: `msg`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/expr.rs:869:21
|
869 | / &format!(
870 | | "{}remove the type ascription",
871 | | if is_nightly { "alternatively, " } else { "" }
872 | | ),
| |_____________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
help: change this to
|
869 ~ format!(
870 + "{}remove the type ascription",
871 + if is_nightly { "alternatively, " } else { "" }
872 ~ ),
|
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/expr.rs:1029:47
|
1029 | self.struct_span_err(self.token.span, &format!("unexpected token: `{actual}`")).emit();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("unexpected token: `{actual}`")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/parser/expr.rs:1065:17
|
1065 | panic!("unexpected character in a float token: {:?}", c)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
1065 - panic!("unexpected character in a float token: {:?}", c)
1065 + panic!("unexpected character in a float token: {c:?}")
|
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_parse/src/parser/expr.rs:1082:77
|
1082 | self.parse_tuple_field_access_expr(lo, base, Symbol::intern(&i), suffix, None)
| ^^ help: change this to: `i`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_parse/src/parser/expr.rs:1095:45
|
1095 | let symbol = Symbol::intern(&i);
| ^^ help: change this to: `i`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_parse/src/parser/expr.rs:1113:46
|
1113 | let symbol1 = Symbol::intern(&i1);
| ^^^ help: change this to: `i1`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_parse/src/parser/expr.rs:1120:46
|
1120 | let symbol2 = Symbol::intern(&i2);
| ^^^ help: change this to: `i2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/parser/expr.rs:1137:18
|
1137 | _ => panic!("unexpected components in a float token: {:?}", components),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
1137 - _ => panic!("unexpected components in a float token: {:?}", components),
1137 + _ => panic!("unexpected components in a float token: {components:?}"),
|
warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> compiler/rustc_parse/src/parser/expr.rs:1197:9
|
1197 | / match (seq.as_mut(), snapshot) {
1198 | | (Err(err), Some((mut snapshot, ExprKind::Path(None, path)))) => {
1199 | | snapshot.bump(); // `(`
1200 | | match snapshot.parse_struct_fields(path.clone(), false, Delimiter::Parenthesis) {
... |
1240 | | _ => {}
1241 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
= note: `#[warn(clippy::single_match)]` on by default
help: try this
|
1197 ~ if let (Err(err), Some((mut snapshot, ExprKind::Path(None, path)))) = (seq.as_mut(), snapshot) {
1198 + snapshot.bump(); // `(`
1199 + match snapshot.parse_struct_fields(path.clone(), false, Delimiter::Parenthesis) {
1200 + Ok((fields, ..))
1201 + if snapshot.eat(&token::CloseDelim(Delimiter::Parenthesis)) =>
1202 + {
1203 + // We are certain we have `Enum::Foo(a: 3, b: 4)`, suggest
1204 + // `Enum::Foo { a: 3, b: 4 }` or `Enum::Foo(3, 4)`.
1205 + self.restore_snapshot(snapshot);
1206 + let close_paren = self.prev_token.span;
1207 + let span = lo.to(self.prev_token.span);
1208 + if !fields.is_empty() {
1209 + let mut replacement_err = ParenthesesWithStructFields {
1210 + span,
1211 + r#type: path,
1212 + braces_for_struct: BracesForStructLiteral {
1213 + first: open_paren,
1214 + second: close_paren,
1215 + },
1216 + no_fields_for_fn: NoFieldsForFnCall {
1217 + fields: fields
1218 + .into_iter()
1219 + .map(|field| field.span.until(field.expr.span))
1220 + .collect(),
1221 + },
1222 + }
1223 + .into_diagnostic(&self.sess.span_diagnostic);
1224 + replacement_err.emit();
1225 +
1226 + let old_err = mem::replace(err, replacement_err);
1227 + old_err.cancel();
1228 + } else {
1229 + err.emit();
1230 + }
1231 + return Some(self.mk_expr_err(span));
1232 + }
1233 + Ok(_) => {}
1234 + Err(mut err) => {
1235 + err.emit();
1236 + }
1237 + }
1238 + }
|
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/expr.rs:1818:47
|
1818 | self_.struct_span_err(token.span, &msg)
| ^^^^ help: change this to: `msg`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_parse/src/parser/expr.rs:1900:42
|
1900 | report_lit_error(&self.sess, err, lit, span);
| ^^^^^^^^^^ help: change this to: `self.sess`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: `crate` references the macro call's crate
--> compiler/rustc_middle/src/query/mod.rs:84:50
|
84 | query hir_owner(key: hir::OwnerId) -> Option<crate::hir::Owner<'tcx>> {
| ^^^^^ help: to reference the macro definition's crate, use: `$crate`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def
= note: `#[warn(clippy::crate_in_macro_def)]` on by default
warning: this `else { if .. }` block can be collapsed
--> compiler/rustc_middle/src/mir/pretty.rs:177:12
|
177 | } else {
| ____________^
178 | | if pass_num {
179 | | format!(".{:03}-{:03}", body.phase.phase_index(), body.pass_count)
180 | | } else {
181 | | ".-------".to_string()
182 | | }
183 | | };
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
= note: `#[warn(clippy::collapsible_else_if)]` on by default
help: collapse nested if block
|
177 ~ } else if pass_num {
178 + format!(".{:03}-{:03}", body.phase.phase_index(), body.pass_count)
179 + } else {
180 + ".-------".to_string()
181 ~ };
|
warning: deref which would be done by auto-deref
--> compiler/rustc_parse/src/parser/generics.rs:42:64
|
42 | if let TyKind::ImplTrait(_, bounds) = &(*p).kind {
| ^^^^ help: try this: `p`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
= note: `#[warn(clippy::explicit_auto_deref)]` on by default
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_parse/src/parser/item.rs:179:40
|
179 | let vs = pprust::vis_to_string(&vis);
| ^^^^ help: change this to: `vis`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/item.rs:181:40
|
181 | self.struct_span_err(vis.span, &format!("visibility `{vs}` is not followed by an item"))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("visibility `{vs}` is not followed by an item")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/item.rs:183:19
|
183 | .help(&format!("you likely meant to define an item, e.g., `{vs} fn foo() {{}}`"))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("you likely meant to define an item, e.g., `{vs} fn foo() {{}}`")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/item.rs:201:40
|
201 | self.struct_span_err(span, &msg)
| ^^^^ help: change this to: `msg`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: redundant field names in struct initialization
--> compiler/rustc_middle/src/traits/chalk.rs:210:47
|
210 | Box::new(chalk_ir::TyData { kind: ty, flags: flags })
| ^^^^^^^^^^^^ help: replace it with: `flags`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
= note: `#[warn(clippy::redundant_field_names)]` on by default
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/item.rs:394:17
|
394 | &msg,
| ^^^^ help: change this to: `msg`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/item.rs:419:52
|
419 | let mut err = self.struct_span_err(sp, &msg);
| ^^^^ help: change this to: `msg`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/item.rs:426:21
|
426 | &suggestion,
| ^^^^^^^^^^^ help: change this to: `suggestion`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/parser/item.rs:434:21
|
434 | format!("{}!", snippet),
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
434 - format!("{}!", snippet),
434 + format!("{snippet}!"),
|
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/item.rs:457:52
|
457 | let mut err = self.struct_span_err(sp, &msg);
| ^^^^ help: change this to: `msg`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/item.rs:461:21
|
461 | &format!("add `{kw}` here to parse `{ident}` as a public {kw_name}"),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("add `{kw}` here to parse `{ident}` as a public {kw_name}")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/parser/item.rs:462:21
|
462 | format!(" {} ", kw),
| ^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
462 - format!(" {} ", kw),
462 + format!(" {kw} "),
|
warning: field assignment outside of initializer for an instance created with Default::default()
--> compiler/rustc_parse/src/parser/item.rs:575:13
|
575 | generics.span = self.prev_token.span.shrink_to_hi();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: consider initializing the variable with `rustc_ast::Generics { span: self.prev_token.span.shrink_to_hi(), ..Default::default() }` and removing relevant reassignments
--> compiler/rustc_parse/src/parser/item.rs:572:13
|
572 | let mut generics = Generics::default();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default
= note: `#[warn(clippy::field_reassign_with_default)]` on by default
warning: this `else { if .. }` block can be collapsed
--> compiler/rustc_middle/src/ty/print/pretty.rs:692:24
|
692 | } else {
| ________________________^
693 | | if verbose { p!(write("{:?}", infer_ty)) } else { p!(write("{}", infer_ty)) }
694 | | }
| |_________________^ help: collapse nested if block: `if verbose { p!(write("{:?}", infer_ty)) } else { p!(write("{}", infer_ty)) }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
warning: this `else { if .. }` block can be collapsed
--> compiler/rustc_middle/src/ty/print/pretty.rs:685:28
|
685 | } else {
| ____________________________^
686 | | if verbose {
687 | | p!(write("{:?}", infer_ty))
688 | | } else {
689 | | p!(write("{}", infer_ty))
690 | | }
691 | | }
| |_____________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
help: collapse nested if block
|
685 ~ } else if verbose {
686 + p!(write("{:?}", infer_ty))
687 + } else {
688 + p!(write("{}", infer_ty))
689 + }
|
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/item.rs:1183:36
|
1183 | self.struct_span_err(span, &format!("{descr} is not supported in {ctx}"))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{descr} is not supported in {ctx}")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/item.rs:1184:19
|
1184 | .help(&format!("consider moving the {descr} out to a nearby module scope"))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("consider moving the {descr} out to a nearby module scope")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/item.rs:1331:50
|
1331 | let mut err = self.struct_span_err(span, &format!("missing type for `{kind}` item"));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("missing type for `{kind}` item")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: unneeded unit return type
--> compiler/rustc_middle/src/ty/util.rs:232:28
|
232 | mut f: impl FnMut() -> (),
| ^^^^^^ help: remove the `-> ()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit
= note: `#[warn(clippy::unused_unit)]` on by default
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/item.rs:1696:21
|
1696 | &format!("expected `,`, or `}}`, found {}", super::token_descr(&self.token)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("expected `,`, or `}}`, found {}", super::token_descr(&self.token))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/item.rs:1848:29
|
1848 | ... &format!("functions are not allowed in {adt_ty} definitions"),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("functions are not allowed in {adt_ty} definitions")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/item.rs:1867:29
|
1867 | ... &format!("structs are not allowed in {adt_ty} definitions"),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("structs are not allowed in {adt_ty} definitions")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: operator precedence can trip the unwary
--> compiler/rustc_middle/src/ty/context.rs:824:13
|
824 | stable_crate_id.to_u64() >> 8 * 6,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `stable_crate_id.to_u64() >> (8 * 6)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
= note: `#[warn(clippy::precedence)]` on by default
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/item.rs:2004:44
|
2004 | self.struct_span_err(vis.span, &msg)
| ^^^^ help: change this to: `msg`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/item.rs:2020:23
|
2020 | .help(&format!("try adjusting the macro to put `{vstr}` inside the invocation"))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("try adjusting the macro to put `{vstr}` inside the invocation")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/item.rs:2079:17
|
2079 | &format!("`{kw_str}` definition cannot be nested inside `{keyword}`"),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("`{kw_str}` definition cannot be nested inside `{keyword}`")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/item.rs:2083:17
|
2083 | &format!("consider creating a new `{kw_str}` definition instead of nesting"),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("consider creating a new `{kw_str}` definition instead of nesting")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_parse/src/parser/item.rs:2239:71
|
2239 | if let Err(mut err) = self.expected_one_of_not_found(&[], &expected) {
| ^^^^^^^^^ help: change this to: `expected`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/item.rs:2370:29
|
2370 | ... &format!("`{original_kw}` already used earlier, remove this one"),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("`{original_kw}` already used earlier, remove this one")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/item.rs:2374:49
|
2374 | .span_note(original_sp, &format!("`{original_kw}` first seen here"));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("`{original_kw}` first seen here")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/item.rs:2385:37
|
2385 | ... &format!("`{misplaced_qual}` must come before `{current_qual}`"),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("`{misplaced_qual}` must come before `{current_qual}`")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/item.rs:2409:37
|
2409 | ... &format!("visibility `{vs}` must come before `{snippet}`"),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("visibility `{vs}` must come before `{snippet}`")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: match expression looks like `matches!` macro
--> compiler/rustc_parse/src/parser/nonterminal.rs:21:13
|
21 | / match *nt {
22 | | token::NtItem(_) | token::NtBlock(_) | token::NtVis(_) | token::NtLifetime(_) => {
23 | | false
24 | | }
25 | | _ => true,
26 | | }
| |_____________^ help: try this: `!matches!(*nt, token::NtItem(_) | token::NtBlock(_) | token::NtVis(_) | token::NtLifetime(_))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro
= note: `#[warn(clippy::match_like_matches_macro)]` on by default
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_parse/src/parser/nonterminal.rs:63:39
|
63 | _ => may_be_ident(&nt),
| ^^^ help: change this to: `nt`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/parser/pat.rs:184:23
|
184 | let msg = format!("top-level or-patterns are not allowed in {}", syntax_loc);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
184 - let msg = format!("top-level or-patterns are not allowed in {}", syntax_loc);
184 + let msg = format!("top-level or-patterns are not allowed in {syntax_loc}");
|
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/pat.rs:299:50
|
299 | let mut err = self.struct_span_err(span, &format!("a {} `|` is {}", pos, ctx));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("a {} `|` is {}", pos, ctx)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/parser/pat.rs:299:51
|
299 | let mut err = self.struct_span_err(span, &format!("a {} `|` is {}", pos, ctx));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
299 - let mut err = self.struct_span_err(span, &format!("a {} `|` is {}", pos, ctx));
299 + let mut err = self.struct_span_err(span, &format!("a {pos} `|` is {ctx}"));
|
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/pat.rs:302:13
|
302 | &format!("remove the `{}`", pprust::token_to_string(&self.token)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("remove the `{}`", pprust::token_to_string(&self.token))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/pat.rs:423:75
|
423 | let mut err = self_.struct_span_err(self_.token.span, &msg);
| ^^^^ help: change this to: `msg`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/parser/pat.rs:424:54
|
424 | err.span_label(self_.token.span, format!("expected {}", expected));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
424 - err.span_label(self_.token.span, format!("expected {}", expected));
424 + err.span_label(self_.token.span, format!("expected {expected}"));
|
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_parse/src/parser/pat.rs:538:55
|
538 | format!("({})", pprust::pat_to_string(&pat)),
| ^^^^ help: change this to: `pat`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/pat.rs:559:40
|
559 | self.struct_span_err(span, &format!("unexpected lifetime `{}` in pattern", name))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("unexpected lifetime `{}` in pattern", name)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/parser/pat.rs:559:41
|
559 | self.struct_span_err(span, &format!("unexpected lifetime `{}` in pattern", name))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
559 - self.struct_span_err(span, &format!("unexpected lifetime `{}` in pattern", name))
559 + self.struct_span_err(span, &format!("unexpected lifetime `{name}` in pattern"))
|
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_parse/src/parser/pat.rs:660:41
|
660 | let fix = pprust::pat_to_string(&pat);
| ^^^^ help: change this to: `pat`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/pat.rs:709:61
|
709 | let mut err = self.struct_span_err(self.token.span, &msg);
| ^^^^ help: change this to: `msg`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/parser/pat.rs:710:41
|
710 | err.span_label(self.token.span, format!("expected {}", expected));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
710 - err.span_label(self.token.span, format!("expected {}", expected));
710 + err.span_label(self.token.span, format!("expected {expected}"));
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/parser/pat.rs:1020:28
|
1020 | let msg = &format!("expected `}}`, found {}", token_str);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
1020 - let msg = &format!("expected `}}`, found {}", token_str);
1020 + let msg = &format!("expected `}}`, found {token_str}");
|
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/path.rs:446:25
|
446 | / &format!(
447 | | "unmatched angle bracket{}",
448 | | pluralize!(snapshot.unmatched_angle_bracket_count)
449 | | ),
| |_________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
help: change this to
|
446 ~ format!(
447 + "unmatched angle bracket{}",
448 + pluralize!(snapshot.unmatched_angle_bracket_count)
449 ~ ),
|
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/path.rs:453:25
|
453 | / &format!(
454 | | "remove extra angle bracket{}",
455 | | pluralize!(snapshot.unmatched_angle_bracket_count)
456 | | ),
| |_________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
help: change this to
|
453 ~ format!(
454 + "remove extra angle bracket{}",
455 + pluralize!(snapshot.unmatched_angle_bracket_count)
456 ~ ),
|
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/path.rs:611:25
|
611 | &format!("remove the `=` if `{}` is a type", ident),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("remove the `=` if `{}` is a type", ident)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/parser/path.rs:611:26
|
611 | &format!("remove the `=` if `{}` is a type", ident),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
611 - &format!("remove the `=` if `{}` is a type", ident),
611 + &format!("remove the `=` if `{ident}` is a type"),
|
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/path.rs:618:25
|
618 | &format!("expected type, found {}", super::token_descr(&self.token)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("expected type, found {}", super::token_descr(&self.token))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/parser/stmt.rs:283:50
|
283 | err.span_label(pat.span, format!("while parsing the type for `{}`", snip));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
283 - err.span_label(pat.span, format!("while parsing the type for `{}`", snip));
283 + err.span_label(pat.span, format!("while parsing the type for `{snip}`"));
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/parser/stmt.rs:495:19
|
495 | let msg = format!("expected `{{`, found {}", tok);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
495 - let msg = format!("expected `{{`, found {}", tok);
495 + let msg = format!("expected `{{`, found {tok}");
|
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/stmt.rs:600:37
|
600 | / ... &format!(
601 | | ... "add a space before `{}` to use a regular comment",
602 | | ... doc_comment_marker,
603 | | ... ),
| |_______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
help: change this to
|
600 ~ format!(
601 + "add a space before `{}` to use a regular comment",
602 + doc_comment_marker,
603 ~ ),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/parser/stmt.rs:600:38
|
600 | ... &format!(
| ________________________^
601 | | ... "add a space before `{}` to use a regular comment",
602 | | ... doc_comment_marker,
603 | | ... ),
| |_______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/parser/stmt.rs:604:37
|
604 | ... format!("{} {}", comment_marker, doc_comment_marker),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
604 - format!("{} {}", comment_marker, doc_comment_marker),
604 + format!("{comment_marker} {doc_comment_marker}"),
|
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/ty.rs:318:65
|
318 | let mut err = self.struct_span_err(self.token.span, &msg);
| ^^^^ help: change this to: `msg`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/parser/ty.rs:477:25
|
477 | format!("&{} mut", lifetime_src),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
477 - format!("&{} mut", lifetime_src),
477 + format!("&{lifetime_src} mut"),
|
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/ty.rs:605:36
|
605 | self.struct_span_err(span, &format!("an `fn` pointer type cannot be `{}`", qual))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("an `fn` pointer type cannot be `{}`", qual)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/parser/ty.rs:605:37
|
605 | self.struct_span_err(span, &format!("an `fn` pointer type cannot be `{}`", qual))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
605 - self.struct_span_err(span, &format!("an `fn` pointer type cannot be `{}`", qual))
605 + self.struct_span_err(span, &format!("an `fn` pointer type cannot be `{qual}`"))
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/parser/ty.rs:606:36
|
606 | .span_label(qual_span, format!("`{}` because of this", qual))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
606 - .span_label(qual_span, format!("`{}` because of this", qual))
606 + .span_label(qual_span, format!("`{qual}` because of this"))
|
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/ty.rs:609:17
|
609 | &format!("remove the `{}` qualifier", qual),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("remove the `{}` qualifier", qual)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/parser/ty.rs:609:18
|
609 | &format!("remove the `{}` qualifier", qual),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
609 - &format!("remove the `{}` qualifier", qual),
609 + &format!("remove the `{qual}` qualifier"),
|
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/ty.rs:626:25
|
626 | &format!("expected `+` between lifetime and {}", symname),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("expected `+` between lifetime and {}", symname)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/parser/ty.rs:626:26
|
626 | &format!("expected `+` between lifetime and {}", symname),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
626 - &format!("expected `+` between lifetime and {}", symname),
626 + &format!("expected `+` between lifetime and {symname}"),
|
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/ty.rs:801:17
|
801 | &format!("remove the bound{}", pluralize!(negative_bounds_len)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("remove the bound{}", pluralize!(negative_bounds_len))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
--> compiler/rustc_parse/src/parser/ty.rs:1044:22
|
1044 | args.into_iter()
| ^^^^^^^^^ help: call directly: `iter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
= note: `#[warn(clippy::into_iter_on_ref)]` on by default
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> compiler/rustc_parse/src/parser/mod.rs:220:57
|
220 | emit_unclosed_delims(&mut self.unclosed_delims, &self.sess);
| ^^^^^^^^^^ help: change this to: `self.sess`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: you don't need to add `&` to all patterns
--> compiler/rustc_parse/src/parser/mod.rs:285:17
|
285 | / match tree {
286 | | &TokenTree::Token(ref token, spacing) => match (desugar_doc_comments, token) {
287 | | (true, &Token { kind: token::DocComment(_, attr_style, data), span }) => {
288 | | return self.desugar(attr_style, data, span);
... |
300 | | }
301 | | };
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats
= note: `#[warn(clippy::match_ref_pats)]` on by default
help: instead of prefixing all patterns with `&`, you can dereference the expression
|
285 ~ match *tree {
286 ~ TokenTree::Token(ref token, spacing) => match (desugar_doc_comments, token) {
287 | (true, &Token { kind: token::DocComment(_, attr_style, data), span }) => {
...
291 | },
292 ~ TokenTree::Delimited(sp, delim, ref tts) => {
|
warning: implementation of inherent method `to_string(&self) -> String` for type `parser::TokenType`
--> compiler/rustc_parse/src/parser/mod.rs:386:5
|
386 | / fn to_string(&self) -> String {
387 | | match self {
388 | | TokenType::Token(t) => format!("`{}`", pprust::token_kind_to_string(t)),
389 | | TokenType::Keyword(kw) => format!("`{}`", kw),
... |
396 | | }
397 | | }
| |_____^
|
= help: implement trait `Display` for type `parser::TokenType` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string
= note: `#[warn(clippy::inherent_to_string)]` on by default
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/parser/mod.rs:389:39
|
389 | TokenType::Keyword(kw) => format!("`{}`", kw),
| ^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
389 - TokenType::Keyword(kw) => format!("`{}`", kw),
389 + TokenType::Keyword(kw) => format!("`{kw}`"),
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/parser/mod.rs:459:32
|
459 | if let Some(kind) = kind { format!("{} `{}`", kind, name) } else { format!("`{}`", name) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
459 - if let Some(kind) = kind { format!("{} `{}`", kind, name) } else { format!("`{}`", name) }
459 + if let Some(kind) = kind { format!("{kind} `{name}`") } else { format!("`{}`", name) }
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/parser/mod.rs:459:72
|
459 | if let Some(kind) = kind { format!("{} `{}`", kind, name) } else { format!("`{}`", name) }
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
459 - if let Some(kind) = kind { format!("{} `{}`", kind, name) } else { format!("`{}`", name) }
459 + if let Some(kind) = kind { format!("{} `{}`", kind, name) } else { format!("`{name}`") }
|
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/parser/mod.rs:918:41
|
918 | ... &msg,
| ^^^^ help: change this to: `msg`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/parser/mod.rs:934:46
|
934 | ... &format!("missing `{}`", token_str),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
934 - &format!("missing `{}`", token_str),
934 + &format!("missing `{token_str}`"),
|
warning: unneeded `return` statement
--> compiler/rustc_parse/src/parser/mod.rs:1167:9
|
1167 | return looker(&token);
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= help: remove `return`
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/lexer/tokentrees.rs:235:19
|
235 | let msg = format!("unexpected closing delimiter: `{}`", token_str);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
235 - let msg = format!("unexpected closing delimiter: `{}`", token_str);
235 + let msg = format!("unexpected closing delimiter: `{token_str}`");
|
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/lexer/tokentrees.rs:237:86
|
237 | self.string_reader.sess.span_diagnostic.struct_span_err(self.token.span, &msg);
| ^^^^ help: change this to: `msg`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: redundant closure
--> compiler/rustc_parse/src/lexer/unescape_error_reporting.rs:56:40
|
56 | if lit.chars().skip(1).all(|c| is_combining_mark(c)) {
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `is_combining_mark`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
= note: `#[warn(clippy::redundant_closure)]` on by default
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/lexer/unescape_error_reporting.rs:151:40
|
151 | .struct_span_err(span, &format!("{}: `{}`", msg, escaped_char(c)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}: `{}`", msg, escaped_char(c))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> compiler/rustc_parse/src/lexer/unescape_error_reporting.rs:187:58
|
187 | let mut diag = handler.struct_span_err(span, &format!("{}: `{}`", label, ec));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}: `{}`", label, ec)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/lexer/unescape_error_reporting.rs:187:59
|
187 | let mut diag = handler.struct_span_err(span, &format!("{}: `{}`", label, ec));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
187 - let mut diag = handler.struct_span_err(span, &format!("{}: `{}`", label, ec));
187 + let mut diag = handler.struct_span_err(span, &format!("{label}: `{ec}`"));
|
warning: variables can be used directly in the `format!` string
--> compiler/rustc_parse/src/lexer/unescape_error_reporting.rs:203:25
|
203 | format!("r\"{}\"", lit),
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https:/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment