]> git.lizzy.rs Git - rust.git/blob - tests/ui/try-trait/yeet-for-result.rs
Rollup merge of #104965 - zacklukem:p-option-as_ref-docs, r=scottmcm
[rust.git] / tests / 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 }