]> git.lizzy.rs Git - rust.git/blob - tests/ui/parser/trailing-question-in-type.rs
Rollup merge of #106441 - mllken:abstract-socket-noref, r=joshtriplett
[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 }