-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
ICE: pattern has unexpected type
#122809
Comments
This has ICEd before #120550: struct S(());
impl S {
fn check() {
let a;
(Self, a) = (S, ());
}
}
fn main() {} |
^Regression in nightly-2022-05-05 commit[0] 2022-05-03: Auto merge of #96558 - bjorn3:librarify_parse_format, r=davidtwco would not be surprised if its #95380 actually 🙈 |
So only this specific case seems to be #95380. Matching struct S(());
impl S {
fn foo() {
let Self = S;
}
}
fn main() {} |
https://www.youtube.com/watch?v=OzLhXesNkCI Regression in nightly-2020-11-19 fetching (via remote github) commits from max(c919f49, 2020-11-16) to 8256379 |
…h-pat-only, r=petrochenkov Validate that we're only matching on unit struct for path pattern Resolution doesn't validate that we only really take `CtorKind::Unit` in path patterns, since all it sees is `Res::SelfCtor(def_id)`. Check this instead during pattern typeck. r? petrochenkov Fixes rust-lang#122809
Rollup merge of rust-lang#122910 - compiler-errors:unit-struct-in-path-pat-only, r=petrochenkov Validate that we're only matching on unit struct for path pattern Resolution doesn't validate that we only really take `CtorKind::Unit` in path patterns, since all it sees is `Res::SelfCtor(def_id)`. Check this instead during pattern typeck. r? petrochenkov Fixes rust-lang#122809
auto-reduced (treereduce-rust):
original:
Version information
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc
Program output
The text was updated successfully, but these errors were encountered: