-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Something funky crashes typeck (stable and nightly) #90444
Labels
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
From<Alias<T>>
an fn from(_: Alias)
crashes typeck (stable and nightly)
From<Alias<T>>
an fn from(_: Alias)
crashes typeck (stable and nightly)From<Alias<T>>
and fn from(_: Alias)
crashes typeck (stable and nightly)
From<Alias<T>>
and fn from(_: Alias)
crashes typeck (stable and nightly)
Can reproduce even without the type aliases: pub struct B(());
enum Thing {}
impl From<fn((), &[B], ())> for Thing {
fn from(_: fn((), &[B], ()) -> Self {}
} Edit: even smaller reproducer: enum Thing {}
impl From<fn((), ())> for Thing {
fn from(_: fn((), ()) -> Self {}
} Produces this output: (
|
After some testing, this can be reproduced since 1.53, might have been introduced in d43ede1 rust/compiler/rustc_typeck/src/check/compare_method.rs Lines 410 to 418 in d43ede1
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Meta
rustc --version --verbose
:Also get this using stable:
You can see it on the playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=3249dfb3850d684ed13b10623e3dfa60
Error output
Backtrace
The text was updated successfully, but these errors were encountered: