You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cargo +nightly clippy
error: internal compiler error: compiler/rustc_middle/src/ty/subst.rs:687:9: type parameter `Self/#0` (Self/0) out of range when substituting, substs=[]
thread 'rustc' panicked at 'Box<dyn Any>', /rustc/432abd86f231c908f6df3cdd779e83f35084be90/compiler/rustc_errors/src/lib.rs:1462:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new
note: Clippy version: clippy 0.1.65 (432abd8 2022-09-20)
query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack
cargo +nightly build succeeds with the same input, as does cargo clippy (on stable).
warning: function `foo` is never used
--> src/lib.rs:1:10
|
1 | async fn foo<S: AsRef<str>>(_: S) {}
| ^^^
|
= note: `#[warn(dead_code)]` on by default
warning: function `bar` is never used
--> src/lib.rs:3:10
|
3 | async fn bar() {
| ^^^
error: internal compiler error: compiler/rustc_middle/src/ty/subst.rs:687:9: type parameter `Self/#0` (Self/0) out of range when substituting, substs=[]
thread 'rustc' panicked at 'Box<dyn Any>', /rustc/432abd86f231c908f6df3cdd779e83f35084be90/compiler/rustc_errors/src/lib.rs:1462:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new
note: Clippy version: clippy 0.1.65 (432abd8 2022-09-20)
query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack
warning: `clippy-repro` (lib) generated 2 warnings
error: could not compile `clippy-repro`; 2 warnings emitted
The text was updated successfully, but these errors were encountered:
djkoloski
added
C-bug
Category: Clippy is not doing the correct thing
I-ICE
Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️
labels
Sep 21, 2022
This is caused by #9424. It looks like the compiler generated call to into_future doesn't have substs we need to check predicates. I'm working on fix that will just exit when it encounters these.
Fix ICE in `unnecessary_to_owned`
Fixes#9504
Compiler generated call `into_future` nodes return empty substs which we need when checking it's predicates. Handle this by simply exitting when we encounter one. This change introduces false negatives in place of the ICEs.
changelog: [`unnecessary_to_owned`]: fix ICE
Remove mitigations for incorrect node args
This change https://github.com/rust-lang/rust/pull/118420/files#r1419874371 adds a missing `write_args` to properly record node args for lang-item calls.
Thus, in the `unnecessary_to_owned` lint, this ensures that the `call_generic_args` extracted by `get_callee_generic_args_and_args` are always correct, and we can remove the mitigation for #9504 and #10021 since the root cause has been fixed.
I'm not sure if there is other now-unnecessary code that can be removed, but this is the one I found when investigating #11965 (comment).
changelog: none
Summary
Minimal repro:
Output:
cargo +nightly build
succeeds with the same input, as doescargo clippy
(on stable).Version
Error output
Backtrace
The text was updated successfully, but these errors were encountered: