]> git.lizzy.rs Git - rust.git/blob - src/test/ui/try-trait/yeet-for-result.rs
Merge commit 'e9d1a0a7b0b28dd422f1a790ccde532acafbf193' into sync_cg_clif-2022-08-24
[rust.git] / src / test / ui / try-trait / yeet-for-result.rs
1 // run-pass
2
3 #![feature(yeet_expr)]
4
5 fn always_yeet() -> Result<i32, String> {
6     do yeet "hello";
7 }
8
9 fn main() {
10     assert_eq!(always_yeet(), Err("hello".to_string()));
11 }