]> git.lizzy.rs Git - rust.git/blob - src/test/ui/try-trait/try-on-option.rs
Add 'src/tools/rust-analyzer/' from commit '977e12a0bdc3e329af179ef3a9d466af9eb613bb'
[rust.git] / src / test / ui / try-trait / try-on-option.rs
1 fn main() {}
2
3 fn foo() -> Result<u32, ()> {
4     let x: Option<u32> = None;
5     x?; //~ ERROR the `?` operator
6     Ok(22)
7 }
8
9 fn bar() -> u32 {
10     let x: Option<u32> = None;
11     x?; //~ ERROR the `?` operator
12     22
13 }