Matthias Krüger
b469a6dd9b
Rollup merge of #122843 - WaffleLapkin:semicolon-vs-the-never, r=compiler-errors
...
Add a never type option to make diverging blocks `()`
More experiments for ~~the blood god~~ T-lang!
Usage example:
```rust
#![allow(internal_features)]
#![feature(never_type, rustc_attrs)]
#![rustc_never_type_options(diverging_block_default = "unit")]
fn main() {
let _: u8 = { //~ error: expected `u8`, found `()`
return;
};
}
```
r? compiler-errors
I'm not sure how I feel about parsing the attribute every time we create `FnCtxt`. There must be a better way to do this, right?
2024-03-22 01:07:33 +01:00
..
2024-03-13 15:25:35 +00:00
2024-02-21 20:15:52 +01:00
2024-03-21 17:46:50 +01:00
2024-03-08 23:20:29 -05:00
2024-03-21 11:42:49 -04:00
2024-03-21 11:42:49 -04:00
2024-03-21 11:42:49 -04:00
2024-03-11 09:15:09 +11:00
2024-03-21 17:46:49 +01:00
2024-03-20 22:28:56 -04:00
2024-03-19 09:17:40 +00:00
2024-03-19 00:04:09 +00:00
2024-03-20 05:51:22 +01:00
2024-03-21 17:53:57 +00:00
2024-03-20 05:51:22 +01:00
2024-03-21 09:01:18 +00:00
2024-03-21 11:48:49 +11:00
2024-03-19 00:04:09 +00:00
2024-03-05 12:14:49 +11:00
2024-03-20 13:43:41 +00:00
2024-03-21 17:46:49 +01:00
2024-03-22 01:07:33 +01:00
2024-03-05 12:14:49 +11:00
2024-02-06 13:12:33 +11:00
2024-02-06 13:12:33 +11:00
2024-03-22 01:07:31 +01:00
2024-03-21 11:42:49 -04:00
2024-03-21 11:42:49 -04:00
2024-03-22 01:07:33 +01:00
2024-03-21 14:27:11 +01:00
2024-03-06 16:54:42 +01:00
2024-02-08 07:44:34 -05:00
2024-03-21 12:05:08 +01:00
2024-03-21 11:50:40 +11:00
2024-02-06 13:12:33 +11:00
2024-03-21 11:42:49 -04:00
2024-03-16 23:28:47 +01:00
2024-03-17 10:11:04 -07:00
2024-03-03 12:33:26 +01:00
2024-03-11 10:06:34 +11:00
2024-03-21 06:12:24 +00:00
2024-03-21 17:46:51 +01:00
2024-03-21 11:42:49 -04:00
2024-03-20 08:49:13 -04:00
2024-03-21 09:01:18 +00:00
2024-03-21 14:27:11 +01:00
2024-03-04 15:39:59 +00:00
2024-03-21 17:46:50 +01:00
2024-03-16 22:33:02 +00:00
2024-03-21 17:46:50 +01:00
2024-03-21 17:46:48 +01:00
2024-03-21 14:27:11 +01:00
2024-03-12 05:31:41 +01:00
2024-03-12 09:04:00 -07:00
2024-03-21 11:42:49 -04:00
2024-03-08 20:56:25 +00:00
2024-03-21 11:50:40 +11:00
2024-03-20 18:02:11 -07:00
2024-03-22 01:07:33 +01:00
2024-03-21 14:27:11 +01:00
2024-03-21 17:46:51 +01:00
2024-03-22 01:07:31 +01:00
2024-03-07 06:27:09 +00:00
2024-03-18 09:34:08 +00:00
2024-03-19 16:59:24 -04:00
2024-03-20 17:29:58 +00:00
2024-03-21 12:05:08 +01:00