1 // This test checks that it proper item type will be suggested when
2 // using the `_` type placeholder.
4 fn test1() -> _ { Some(42) }
5 //~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types
7 const TEST2: _ = 42u32;
8 //~^ ERROR the placeholder `_` is not allowed within types on item signatures for constants
10 const TEST3: _ = Some(42);
11 //~^ ERROR the placeholder `_` is not allowed within types on item signatures for constants
13 const TEST4: fn() -> _ = 42;
14 //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
15 //~| ERROR the placeholder `_` is not allowed within types on item signatures for constant items
19 //~^ ERROR the placeholder `_` is not allowed within types on item signatures for constants
26 //~^ ERROR the placeholder `_` is not allowed within types on item signatures for constants
30 let _: Option<usize> = test1();
32 let _: Option<i32> = test1();