-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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: unexpected 'SelfCtor' in pattern, expected identifier
#133272
Comments
impl Foo {
fn fun() {
let S { ref Self } = todo!();
}
} |
Regression in nightly-2024-02-22 commit[0] 2024-02-20: Auto merge of #121345 - Nilstrieb:rollup-reb0xge, r=Nilstrieb |
This is because #121208 changed the |
For the code pattern reported in <rust-lang#133272>, ```rs impl Foo { fn fun() { let S { ref Self } = todo!(); } } ``` <rust-lang#121208> converted this to a `span_bug` from a `span_delayed_bug` because this specific self-ctor code pattern lacked test coverage. It turns out this can be hit but we just lacked test coverage, so change it back to a `span_delayed_bug` and add a target tested case.
…-errors Re-delay a resolve `bug` related to `Self`-ctor in patterns For the code pattern reported in <rust-lang#133272>, ```rs impl Foo { fn fun() { let S { ref Self } = todo!(); } } ``` <rust-lang#121208> converted this to a `span_bug` from a `span_delayed_bug` because this specific self-ctor code pattern lacked test coverage. It turns out this can be hit but we just lacked test coverage, so change it back to a `span_delayed_bug` and add a targeted test case. Follow-up to rust-lang#121208, cc `@nnethercote` (very good exercise to expose our test coverage gaps). Fixes rust-lang#133272.
…-errors Re-delay a resolve `bug` related to `Self`-ctor in patterns For the code pattern reported in <rust-lang#133272>, ```rs impl Foo { fn fun() { let S { ref Self } = todo!(); } } ``` <rust-lang#121208> converted this to a `span_bug` from a `span_delayed_bug` because this specific self-ctor code pattern lacked test coverage. It turns out this can be hit but we just lacked test coverage, so change it back to a `span_delayed_bug` and add a targeted test case. Follow-up to rust-lang#121208, cc ``@nnethercote`` (very good exercise to expose our test coverage gaps). Fixes rust-lang#133272.
…-errors Re-delay a resolve `bug` related to `Self`-ctor in patterns For the code pattern reported in <rust-lang#133272>, ```rs impl Foo { fn fun() { let S { ref Self } = todo!(); } } ``` <rust-lang#121208> converted this to a `span_bug` from a `span_delayed_bug` because this specific self-ctor code pattern lacked test coverage. It turns out this can be hit but we just lacked test coverage, so change it back to a `span_delayed_bug` and add a targeted test case. Follow-up to rust-lang#121208, cc ```@nnethercote``` (very good exercise to expose our test coverage gaps). Fixes rust-lang#133272.
auto-reduced (treereduce-rust):
original:
Version information
Possibly related line of code:
rust/compiler/rustc_resolve/src/late.rs
Lines 3939 to 3951 in 3fee0f1
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc
Program output
The text was updated successfully, but these errors were encountered: