Skip to content
New issue

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

Agressive clippy #6989

Closed
tschuett opened this issue Mar 27, 2021 · 5 comments
Closed

Agressive clippy #6989

tschuett opened this issue Mar 27, 2021 · 5 comments

Comments

@tschuett
Copy link

GitHub Actions:

rustc 1.51.0 (2fd73fabe 2021-03-23)
/usr/share/rust/.cargo/bin/cargo clippy -- -D warnings

Local installation:

rustc 1.51.0 (2fd73fabe 2021-03-23)
cargo clippy  -- -D warnings

On GitHub Actions, I get the following error:

error: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices.

My local installation never gives me that error?!? The remote clippy is much more aggressive in linting.

@llogiq
Copy link
Contributor

llogiq commented Mar 27, 2021

I thought #4612 was fixed...this would have been an explanation, but we'd need to know more about your setup to say for sure.

@tschuett
Copy link
Author

tschuett commented Mar 27, 2021

Indeed the following provides more warnings

cargo check
cargo clean
cargo clippy

It is a simple setup; no workspace.

> rustc -V -v
rustc 1.51.0 (2fd73fabe 2021-03-23)
binary: rustc
commit-hash: 2fd73fabe469357a12c2c974c140f67e7cdd76d0
commit-date: 2021-03-23
host: x86_64-apple-darwin
release: 1.51.0
LLVM version: 11.0.1
>  cargo clippy -v -V
clippy 0.1.51 (2fd73fab 2021-03-23)
> cargo -v -V
cargo 1.51.0 (43b129a20 2021-03-16)
release: 1.51.0
commit-hash: 43b129a20fbf1ede0df411396ccf0c024bf34134
commit-date: 2021-03-16

@tschuett
Copy link
Author

tschuett commented Mar 27, 2021

You can try it with:
https://github.com/tschuett/clippy
I need to do the check clean clippy sequence to get the lint.

But:

cargo build
cargo clippy

works. This is what GitHub Actions is doing. The problem seems to be with the check.

@tschuett
Copy link
Author

IIRC, this is not a rust 1.51 problem. I had the same problem with 1.50.

@tschuett
Copy link
Author

The fix #6687 will be in 1.52.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants