summaryrefslogtreecommitdiffstats
path: root/src/test/ui/parser/trailing-question-in-type.rs
blob: b1c508365cff5aefd697c852bd0d42b54e21edf2 (plain)
1
2
3
4
5
6
7
8
9
10
// run-rustfix

fn foo() -> i32? { //~ ERROR invalid `?` in type
    let x: i32? = Some(1); //~ ERROR invalid `?` in type
    x
}

fn main() {
    let _: Option<i32> = foo();
}