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-01-11 09:32:08 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-12-04 11:56:21 +01:00
2023-06-24 18:41:27 +00:00
2023-01-11 09:32:08 +00:00
2023-01-30 20:12:19 +00:00
2023-01-11 09:32:08 +00:00
2023-10-30 00:15:49 +00:00
2023-10-30 00:15:49 +00:00
2023-10-30 00:15:49 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-20 02:26:12 -05:00
2023-01-20 02:26:12 -05:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-11-24 19:15:52 +01:00
2023-01-11 09:32:08 +00:00
2023-11-24 19:15:52 +01:00
2023-01-11 09:32:08 +00:00
2023-01-30 20:12:19 +00:00
2023-01-20 02:26:12 -05:00
2023-01-20 02:26:12 -05:00
2023-01-11 09:32:08 +00:00
2023-04-03 15:59:21 +00:00
2023-10-11 12:49:57 +00:00
2023-11-24 19:15:52 +01:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-11-24 19:15:52 +01:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-05-24 19:35:59 -03:00
2023-11-24 19:15:52 +01:00
2023-01-11 09:32:08 +00:00
2023-11-24 19:15:52 +01:00
2023-01-14 12:51:20 +13:00
2023-04-03 15:59:21 +00:00
2023-03-15 22:19:54 +13:00
2023-03-15 22:19:54 +13:00
2023-03-15 22:19:54 +13:00
2023-07-01 02:28:15 -04:00
2023-09-07 11:07:33 +08:00
2023-11-24 19:15:52 +01:00
2023-10-15 19:20:06 +08:00
2023-11-24 19:15:52 +01:00
2023-12-03 12:25:46 +01:00
2023-11-29 03:58:29 +01:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-10-16 15:57:59 +00:00
2023-10-16 15:57:59 +00:00
2023-10-16 15:57:59 +00:00
2023-01-11 09:32:08 +00:00
2023-11-24 19:15:52 +01:00
2023-01-11 09:32:08 +00:00
2023-11-24 19:15:52 +01:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-03-13 17:31:55 +04:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-11-24 19:15:52 +01:00
2023-01-11 09:32:08 +00:00
2023-01-30 20:12:19 +00:00
2023-01-11 09:32:08 +00:00
2023-10-05 01:04:41 +00:00
2023-11-27 21:38:19 +09:00
2023-11-27 21:38:19 +09:00
2023-11-27 21:38:19 +09:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-30 20:12:19 +00:00
2023-05-10 22:35:01 +08:00
2023-01-11 09:32:08 +00:00
2023-11-24 19:15:52 +01:00
2023-01-11 09:32:08 +00:00
2023-11-24 19:15:52 +01:00
2023-01-11 09:32:08 +00:00
2023-11-24 19:15:52 +01:00
2023-11-17 00:55:55 +00:00
2023-11-17 00:55:55 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2023-07-17 22:06:32 +00:00
2023-07-17 22:06:32 +00:00
2023-07-17 22:06:32 +00:00
2023-07-17 22:02:09 +00:00
2023-07-17 22:02:09 +00:00
2023-07-28 11:20:11 +00:00
2023-11-24 19:15:52 +01:00
2023-07-17 22:06:32 +00:00
2023-04-03 15:59:21 +00:00
2023-01-11 09:32:08 +00:00
2023-11-24 19:15:52 +01:00