mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
20 lines
313 B
Rust
20 lines
313 B
Rust
//@ compile-flags: --edition 2018
|
|
#![feature(try_blocks)]
|
|
|
|
//@ run-pass
|
|
fn main() {
|
|
let _: Result<(), ()> = try {
|
|
'foo: {
|
|
Err(())?;
|
|
break 'foo;
|
|
}
|
|
};
|
|
|
|
'foo: {
|
|
let _: Result<(), ()> = try {
|
|
Err(())?;
|
|
break 'foo;
|
|
};
|
|
}
|
|
}
|