Commit c9dff9d
authored
Rollup merge of rust-lang#133286 - jieyouxu:bug-ourselves, r=compiler-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.File tree
3 files changed
+39
-3
lines changed- compiler/rustc_resolve/src
- tests/ui/pattern
3 files changed
+39
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3940 | 3940 | | |
3941 | 3941 | | |
3942 | 3942 | | |
3943 | | - | |
3944 | | - | |
3945 | | - | |
| 3943 | + | |
| 3944 | + | |
3946 | 3945 | | |
3947 | 3946 | | |
3948 | 3947 | | |
| 3948 | + | |
3949 | 3949 | | |
3950 | 3950 | | |
3951 | 3951 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
0 commit comments