Merge pull request #110 from aumetra/match-unit-type #128
clippy
14 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 14 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.73.0-nightly (28eb857b9 2023-08-12)
- cargo 1.73.0-nightly (d78bbf4bd 2023-08-03)
- clippy 0.1.73 (28eb857 2023-08-12)
Annotations
Check warning on line 779 in tests/tests.rs
github-actions / clippy
use of a disallowed/placeholder name `foo`
warning: use of a disallowed/placeholder name `foo`
--> tests/tests.rs:779:9
|
779 | let foo = Foo::builder().with_x_value(1).with_y_value(2).build();
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_names
Check warning on line 780 in tests/tests.rs
github-actions / clippy
consider adding a `;` to the last statement for consistent formatting
warning: consider adding a `;` to the last statement for consistent formatting
--> tests/tests.rs:780:5
|
780 | assert_eq!(foo, Foo { x: 1, y: 2 })
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `assert_eq!(foo, Foo { x: 1, y: 2 });`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
Check warning on line 766 in tests/tests.rs
github-actions / clippy
use of a disallowed/placeholder name `foo`
warning: use of a disallowed/placeholder name `foo`
--> tests/tests.rs:766:9
|
766 | let foo = Foo::builder().x_value(1).y_value(2).build();
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_names
Check warning on line 767 in tests/tests.rs
github-actions / clippy
consider adding a `;` to the last statement for consistent formatting
warning: consider adding a `;` to the last statement for consistent formatting
--> tests/tests.rs:767:5
|
767 | assert_eq!(foo, Foo { x: 1, y: 2 })
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `assert_eq!(foo, Foo { x: 1, y: 2 });`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
Check warning on line 753 in tests/tests.rs
github-actions / clippy
use of a disallowed/placeholder name `foo`
warning: use of a disallowed/placeholder name `foo`
--> tests/tests.rs:753:9
|
753 | let foo = Foo::builder().with_x(1).with_y(2).build();
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_names
Check warning on line 754 in tests/tests.rs
github-actions / clippy
consider adding a `;` to the last statement for consistent formatting
warning: consider adding a `;` to the last statement for consistent formatting
--> tests/tests.rs:754:5
|
754 | assert_eq!(foo, Foo { x: 1, y: 2 })
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `assert_eq!(foo, Foo { x: 1, y: 2 });`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
note: the lint level is defined here
--> tests/tests.rs:1:9
|
1 | #![warn(clippy::pedantic)]
| ^^^^^^^^^^^^^^^^
= note: `#[warn(clippy::semicolon_if_nothing_returned)]` implied by `#[warn(clippy::pedantic)]`
Check warning on line 400 in tests/tests.rs
github-actions / clippy
very complex type used. Consider factoring parts into `type` definitions
warning: very complex type used. Consider factoring parts into `type` definitions
--> tests/tests.rs:400:31
|
400 | fn m_default(self) -> FooBuilder<'a, X, Y, Z, (), (X_, Y_, Z_, ((),))> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
Check warning on line 394 in tests/tests.rs
github-actions / clippy
very complex type used. Consider factoring parts into `type` definitions
warning: very complex type used. Consider factoring parts into `type` definitions
--> tests/tests.rs:394:31
|
394 | fn z_default(self) -> FooBuilder<'a, X, Y, usize, M, (X_, Y_, (usize,), M_)> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
= note: `#[warn(clippy::type_complexity)]` on by default
Check warning on line 50 in tests/tests.rs
github-actions / clippy
use of a disallowed/placeholder name `foo`
warning: use of a disallowed/placeholder name `foo`
--> tests/tests.rs:50:13
|
50 | let foo = Foo::builder().x(&mut a).y(&mut b).build();
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_names
= note: `#[warn(clippy::disallowed_names)]` on by default
Check warning on line 30 in examples/complicate_build.rs
github-actions / clippy
use of a disallowed/placeholder name `foo`
warning: use of a disallowed/placeholder name `foo`
--> examples/complicate_build.rs:30:17
|
30 | let foo = self.__build();
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_names
= note: `#[warn(clippy::disallowed_names)]` on by default
Check warning on line 125 in typed-builder-macro/src/util.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> typed-builder-macro/src/util.rs:125:14
|
125 | _ => return Err(Error::new_spanned(expr, "attribute only allows str values")),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
125 | _ => Err(Error::new_spanned(expr, "attribute only allows str values")),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Check warning on line 123 in typed-builder-macro/src/util.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> typed-builder-macro/src/util.rs:123:18
|
123 | _ => return Err(Error::new_spanned(expr, "attribute only allows str values")),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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`
|
123 | _ => Err(Error::new_spanned(expr, "attribute only allows str values")),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Check warning on line 312 in typed-builder-macro/src/field_info.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> typed-builder-macro/src/field_info.rs:312:63
|
312 | self.suffix = Some(expr_to_lit_string(&*assign.right)?);
| ^^^^^^^^^^^^^^ help: try: `&assign.right`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
Check warning on line 308 in typed-builder-macro/src/field_info.rs
github-actions / clippy
deref which would be done by auto-deref
warning: deref which would be done by auto-deref
--> typed-builder-macro/src/field_info.rs:308:63
|
308 | self.prefix = Some(expr_to_lit_string(&*assign.right)?);
| ^^^^^^^^^^^^^^ help: try: `&assign.right`
|
= 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