about summary refs log tree commit diff
path: root/tests/ui/parser/trailing-question-in-type.fixed
blob: 47ae66ac677e22b65284a4f454c4253ff9b03ffc (plain)
1
2
3
4
5
6
7
8
9
10
//@ run-rustfix

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

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