We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
for example, with the connected nodes example:
warning: this `if` statement can be collapsed --> src/main.rs:11:4 | 11 | path(x, y) <-- edge(x, y); | ^^^^^^^^^ help: collapse nested if block: `if path(x, y && path(x, y && path(x, y path(x, y` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if = note: `#[warn(clippy::collapsible_if)]` on by default warning: this `if` statement can be collapsed --> src/main.rs:12:4 | 12 | path(x, z) <-- edge(x, y), path(y, z); | ^^^^^^^^^ help: collapse nested if block: `if path(x, z && path(x, z && path(x, z path(x, z` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if warning: using `clone` on type `i32` which implements the `Copy` trait --> src/main.rs:11:4 | 11 | path(x, y) <-- edge(x, y); | ^^^^^^^^^ | = 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 help: try removing the `clone` call | 11 ~ ascent! { 12 + relation edge(i32, i32); 13 + relation path(i32, i32); 14 + 15 + path(x, y) <-- edge(x, y); 16 + path(x, z) <-- edge(x, y), path(y, z); 17 ~ }) <-- edge(x, y); | warning: using `clone` on type `i32` which implements the `Copy` trait --> src/main.rs:12:36 | 12 | path(x, z) <-- edge(x, y), path(y, z); | ^ help: try dereferencing it: `*y` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: using `clone` on type `i32` which implements the `Copy` trait --> src/main.rs:12:4 | 12 | path(x, z) <-- edge(x, y), path(y, z); | ^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy help: try removing the `clone` call | 12 ~ ascent! { 13 + relation edge(i32, i32); 14 + relation path(i32, i32); 15 + 16 + path(x, y) <-- edge(x, y); 17 + path(x, z) <-- edge(x, y), path(y, z); 18 ~ }) <-- edge(x, y), path(y, z); | warning: using `clone` on type `i32` which implements the `Copy` trait --> src/main.rs:12:27 | 12 | path(x, z) <-- edge(x, y), path(y, z); | ^ help: try dereferencing it: `*y` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy warning: you seem to use `.enumerate()` and immediately discard the index --> src/main.rs:8:13 | 8 | relation edge(i32, i32); | ^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index = note: `#[warn(clippy::unused_enumerate_index)]` on by default = note: this warning originates in the macro `ascent` (in Nightly builds, run with -Z macro-backtrace for more info) warning: using `clone` on type `i32` which implements the `Copy` trait --> src/main.rs:8:13 | 8 | relation edge(i32, i32); | ^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy help: try removing the `clone` call | 8 ~ relation ascent! { 9 + relation edge(i32, i32); 10+ relation path(i32, i32); 11+ 12+ path(x, y) <-- edge(x, y); 13+ path(x, z) <-- edge(x, y), path(y, z); 14~ }(i32, i32); | warning: you seem to use `.enumerate()` and immediately discard the index --> src/main.rs:9:13 | 9 | relation path(i32, i32); | ^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index = note: this warning originates in the macro `ascent` (in Nightly builds, run with -Z macro-backtrace for more info) warning: using `clone` on type `i32` which implements the `Copy` trait --> src/main.rs:9:13 | 9 | relation path(i32, i32); | ^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy help: try removing the `clone` call | 9 ~ relation ascent! { 10+ relation edge(i32, i32); 11+ relation path(i32, i32); 12+ 13+ path(x, y) <-- edge(x, y); 14+ path(x, z) <-- edge(x, y), path(y, z); 15~ }(i32, i32); | warning: field assignment outside of initializer for an instance created with Default::default() --> src/main.rs:17:4 | 17 | prog.edge = vec![(1, 2), (2, 3)]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: consider initializing the variable with `AscentProgram { edge: vec![(1, 2), (2, 3)], ..Default::default() }` and removing relevant reassignments --> src/main.rs:16:4 | 16 | let mut prog = AscentProgram::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
The text was updated successfully, but these errors were encountered:
Fair enough. With the litany of (not helpful) Clippy warnings, I may just silence all of the Clippy warnings for the generated code.
Sorry, something went wrong.
if they aren't giving any useful info, may as well.
No branches or pull requests
for example, with the connected nodes example:
The text was updated successfully, but these errors were encountered: