Files
rust/compiler
bors 2b399b5275 Auto merge of #118527 - Nadrieril:never_patterns_parse, r=compiler-errors
never_patterns: Parse match arms with no body

Never patterns are meant to signal unreachable cases, and thus don't take bodies:
```rust
let ptr: *const Option<!> = ...;
match *ptr {
    None => { foo(); }
    Some(!),
}
```
This PR makes rustc accept the above, and enforces that an arm has a body xor is a never pattern. This affects parsing of match arms even with the feature off, so this is delicate. (Plus this is my first non-trivial change to the parser).

~~The last commit is optional; it introduces a bit of churn to allow the new suggestions to be machine-applicable. There may be a better solution? I'm not sure.~~ EDIT: I removed that commit

r? `@compiler-errors`
2023-12-08 17:08:52 +00:00
..
2023-10-30 08:46:02 +11:00
2023-12-05 17:52:51 -08:00
2023-11-15 19:41:28 -05:00
2023-11-15 19:41:28 -05:00
2023-11-28 20:40:38 +00:00
2023-11-26 08:38:02 +11:00
2023-11-23 14:11:02 +03:00
2023-12-08 02:16:29 +01:00
2023-10-30 08:46:02 +11:00
2023-11-22 08:13:21 +11:00
2023-12-06 19:50:35 +00:00