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:
Scott McMurray 2025-11-30 14:46:36 -08:00
parent ba2142a19c
commit 4033d19b79
21 changed files with 278 additions and 59 deletions

View 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 }; }