Skip to content

Commit 7cfe7d6

Browse files
Rollup merge of #121669 - nnethercote:count-stashed-errs-again, r=estebank
Count stashed errors again Stashed diagnostics are such a pain. Their "might be emitted, might not" semantics messes with lots of things. #120828 and #121206 made some big changes to how they work, improving some things, but still leaving some problems, as seen by the issues caused by #121206. This PR aims to fix all of them by restricting them in a way that eliminates the "might be emitted, might not" semantics while still allowing 98% of their benefit. Details in the individual commit logs. r? `@oli-obk`
2 parents f055f2a + 81783fb commit 7cfe7d6

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
struct Foo(isize, isize, isize, isize);
2+
3+
pub fn main() {
4+
let Self::anything_here_kills_it(a, b, ..) = Foo(5, 5, 5, 5);
5+
match [5, 5, 5, 5] {
6+
[..] => { }
7+
}
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions
2+
--> tests/ui/crashes/unreachable-array-or-slice.rs:4:9
3+
|
4+
LL | let Self::anything_here_kills_it(a, b, ..) = Foo(5, 5, 5, 5);
5+
| ^^^^ `Self` is only available in impls, traits, and type definitions
6+
7+
error: aborting due to 1 previous error
8+
9+
For more information about this error, try `rustc --explain E0433`.

0 commit comments

Comments
 (0)