]> git.lizzy.rs Git - rust.git/blob - tests/pretty/yeet-expr.rs
Rollup merge of #105526 - Xiretza:iter-from-generator-derive, r=scottmcm
[rust.git] / tests / pretty / yeet-expr.rs
1 // pp-exact
2 #![feature(yeet_expr)]
3
4 fn yeet_no_expr() -> Option<String> { do yeet }
5
6 fn yeet_no_expr_with_semicolon() -> Option<String> { do yeet; }
7
8 fn yeet_with_expr() -> Result<String, i32> { do yeet 1 + 2 }
9
10 fn yeet_with_expr_with_semicolon() -> Result<String, i32> { do yeet 1 + 2; }
11
12 fn main() {}