]> git.lizzy.rs Git - rust.git/blob - tests/ui/parser/trailing-question-in-type.fixed
Rollup merge of #106701 - ibraheemdev:sync-sender-spin, r=Amanieu
[rust.git] / tests / 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 }