]> git.lizzy.rs Git - rust.git/blob - tests/ui/parser/trailing-question-in-type.rs
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / ui / parser / trailing-question-in-type.rs
1 // run-rustfix
2
3 fn foo() -> i32? { //~ ERROR invalid `?` in type
4     let x: i32? = Some(1); //~ ERROR invalid `?` in type
5     x
6 }
7
8 fn main() {
9     let _: Option<i32> = foo();
10 }