-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Impossible case reached #2831
Comments
Going to take a look at this crash next |
There was a "too many errors" message, so maybe clippy just did not reach the place where the error occurs. On a local fork clippy crashed there. |
This is the test case that crashes for us, with a similar backtrace: trait Trait<'a, A> {}
impl<T> Trait<'static, T> for T {}
fn func<S: Trait<'static, ()>>(item: S) {} P.S. I run on |
Seeing this when running clippy on https://github.com/gluon-lang/gluon (specifically the gluon_base crate which prevents clippy from running on the rest of the project). |
Further fixes are blocked on rust-lang/rust-clippy#2831
Further fixes are blocked on rust-lang/rust-clippy#2831
628: style: Fix clippy warnings in gluon_base r=Marwes a=Marwes Further fixes are blocked on rust-lang/rust-clippy#2831 Co-authored-by: Markus Westerlind <[email protected]>
Thank you for the minimal repro @idubrov. This is at the top of my todo list again now. |
628: style: Fix clippy warnings in gluon_base r=Marwes a=Marwes Further fixes are blocked on rust-lang/rust-clippy#2831 Co-authored-by: Markus Westerlind <[email protected]>
Quick update: It's difficult but I'm going to dig deeper. Unfortunately I don't know enough yet, about the Rusts trait system implementation to fix it right away. Here are the things I know. This is the minimal repro: trait Bar<'a, A> {}
impl<'b, T> Bar<'b, T> for T {}
fn funk<'b, S: Bar<'b, ()>>(_item: S) {} // this line causes the crash The crash originates from Clippy's The code for The crash happens when I added some debug statements inside Clippy's cx.param_env: ParamEnv { caller_bounds: [Binder(TraitPredicate(<S as Bar<'b, ()>>)), Binder(TraitPredicate(<S as std::marker::Sized>))], reveal: Us
erFacing }
ty: &S
obligation: Obligation(predicate=Binder(TraitPredicate(<&S as Bar<()>>)),depth=0)
ty_params: [()] Next I want to:
|
This looks like you are creating the |
In that case, I suspect this call: It calls |
I think you just want to remove the |
…hewjasper Improve bug! message for impossible case in Relate Hitting this branch [in Clippy][clippy_issue] and I think it makes sense to print both values here in case other people hit this branch, too. (still have to figure out why this branch is hit) [clippy_issue]: rust-lang/rust-clippy#2831 (comment)
Hi there,
We're seeing the following error when running clippy. I pasted the relevant excerpt below, and the full Travis job is here. The usual workaround of running
cargo check
first seems to work for now.Let me know what additional information would be useful in debugging this. Running clippy 0.0.206 on this repo should be enough to reproduce the issue locally.
The text was updated successfully, but these errors were encountered: