Skip to content

stack overflow in nursery lints #14336

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

Closed
matthiaskrgr opened this issue Mar 2, 2025 · 3 comments
Closed

stack overflow in nursery lints #14336

matthiaskrgr opened this issue Mar 2, 2025 · 3 comments
Labels
C-bug Category: Clippy is not doing the correct thing

Comments

@matthiaskrgr
Copy link
Member

Summary

.

Reproducer

I tried this code:
clippy-driver -Wclippy::nursery

//@ check-pass

#[derive(Debug)]
struct S<T> {
    t: T,
    s: Box<S<fn(u: T)>>,
}

fn main() {}
warning: struct `S` is never constructed
 --> ./src/tools/clippy/tests/ui/crashes/ice-10508c.rs:4:8
  |
4 | struct S<T> {
  |        ^
  |
  = note: `#[warn(dead_code)]` on by default


thread 'rustc' has overflowed its stack
fatal runtime error: stack overflow
Aborted (core dumped)

Version

rustc 1.87.0-nightly (351686bcf 2025-03-01)
binary: rustc
commit-hash: 351686bcfd18dd0f652aba69a806bfa68c57234d
commit-date: 2025-03-01
host: x86_64-unknown-linux-gnu
release: 1.87.0-nightly
LLVM version: 20.1.0

Additional Labels

No response

@matthiaskrgr matthiaskrgr added the C-bug Category: Clippy is not doing the correct thing label Mar 2, 2025
@lapla-cogito
Copy link
Contributor

This is occurring in significant_drop_tightning (checked with clippy-driver -Wclippy::significant_drop_tightening src/main.rs). I'll look closer.

@y21
Copy link
Member

y21 commented Mar 2, 2025

Probably the same issue as #13544.

@y21
Copy link
Member

y21 commented Apr 17, 2025

This was fixed by #14641 (along with #13544, which indeed this was a duplicate of and had the same backtrace)

@y21 y21 closed this as completed Apr 17, 2025
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

3 participants