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

No span for clippy::large_stack_arrays #13774

Open
IceTDrinker opened this issue Dec 3, 2024 · 0 comments
Open

No span for clippy::large_stack_arrays #13774

IceTDrinker opened this issue Dec 3, 2024 · 0 comments
Labels
C-bug Category: Clippy is not doing the correct thing

Comments

@IceTDrinker
Copy link

IceTDrinker commented Dec 3, 2024

Summary

As asked here: https://rust-lang.zulipchat.com/#narrow/channel/257328-clippy/topic/Large.20stack.20array.20without.20code.20span.20clippy.3A.3Alarge_stack_arra/near/485664087

I am posting an issue regarding the clippy::large_stack_arrays lint appearing without a span.

Reproducer

https://github.com/zama-ai/tfhe-rs/tree/am/chore/clippy-bug (permalink for commit zama-ai/tfhe-rs@8378ce7)

Run

RUSTFLAGS="-C target-cpu=native" cargo "+nightly-2024-11-29" clippy --all-targets --features=x86_64-unix,boolean,shortint,integer -p tfhe -- --no-deps -D warnings

I expected to see this happen:

If I get the large stack array lint, I expect to get the offending span

Instead, this happened:

error: allocating a local array larger than 16384 bytes
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_stack_arrays
  = note: `-D clippy::large-stack-arrays` implied by `-D warnings`
  = help: to override `-D warnings` add `#[allow(clippy::large_stack_arrays)]`

error: could not compile `tfhe` (lib test) due to 1 previous error

no span is provided

Version

rustc 1.85.0-nightly (a2545fd6f 2024-11-28)
binary: rustc
commit-hash: a2545fd6fc66b4323f555223a860c451885d1d2b
commit-date: 2024-11-28
host: x86_64-unknown-linux-gnu
release: 1.85.0-nightly
LLVM version: 19.1.4

Additional Labels

No response

@IceTDrinker IceTDrinker added the C-bug Category: Clippy is not doing the correct thing label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing
Projects
None yet
Development

No branches or pull requests

1 participant