

Add a never type option to make diverging blocks `()` by WaffleLapkin · Pull Req...
source link: https://github.com/rust-lang/rust/pull/122843
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Conversation
Member
More experiments for the blood god T-lang!
Usage example:
#![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?
Recommend
-
4
12 Principles for a Diverging Desktop Future 10 Aug 2020 This post is an overview of the guiding principles driving much of the work be...
-
5
in search for better human computing interfaces who am i A reverser - someone trying to understand nature through computing. Humani nil a me alienum puto. ...
-
13
New issue Fix leak in Vec::extend_from_within #82760
-
11
Copy link Contributor WaffleLapkin ...
-
5
Copy link Contributor WaffleLapkin commented
-
8
New issue Make UnsafeCell::get_mut const #88722
-
6
New issue Stabilize Iterator::map_while #89086
-
12
Microsoft blocks Edge redirect tool in Windows 11, but there’s another optionMicrosoft’s attempts to force Windows users to make Edge their default browser have been somewhat questionable. Since relatively early on in the life o...
-
9
// char), or entirely non-surrogates (1 element per char) (low / 2, high) ...
-
4
Conversation Contributor Fixes...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK