Experimentally add *heterogeneous* try blocks
148725 moved the default to being homogeneous; this adds heterogeneous ones back under an obvious-bikeshed syntax so people can experiment with that as well. Essentially resolves 149025 by letting them move to this syntax instead.
This commit is contained in:
parent
ba2142a19c
commit
4033d19b79
21 changed files with 278 additions and 59 deletions
6
tests/pretty/try-blocks.rs
Normal file
6
tests/pretty/try-blocks.rs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
//@ pp-exact
|
||||
//@ edition: 2024
|
||||
|
||||
#![feature(try_blocks, try_blocks_heterogeneous)]
|
||||
|
||||
fn main() { try { Some(1)? }; try bikeshed Result<u32, ()> { 3 }; }
|
||||
Loading…
Add table
Add a link
Reference in a new issue