]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/trailing-question-in-type.fixed
Point (again) to more expressions with their type, even if not fully resolved
[rust.git] / src / test / ui / parser / trailing-question-in-type.fixed
1 // run-rustfix
2
3 fn foo() -> Option<i32> { //~ ERROR invalid `?` in type
4     let x: Option<i32> = Some(1); //~ ERROR invalid `?` in type
5     x
6 }
7
8 fn main() {
9     let _: Option<i32> = foo();
10 }