about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-03-22 01:07:33 +0100
committerGitHub <noreply@github.com>2024-03-22 01:07:33 +0100
commitb469a6dd9bfc549474c06999691a9701ea4d3807 (patch)
treee6bf2126e27f07563fe5ed8d8fc149a3cc2c63f9 /compiler/rustc_codegen_llvm/src
parentce63d7ae4332fb0593bbe418f465b8e980c5bdd0 (diff)
parent93297bfb052a8dd72123547072872915f4d60675 (diff)
downloadrust-b469a6dd9bfc549474c06999691a9701ea4d3807.tar.gz
rust-b469a6dd9bfc549474c06999691a9701ea4d3807.zip
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?
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions