]>
Commit | Line | Data |
---|---|---|
94222f64 XL |
1 | // revisions: full generic_arg |
2 | #![cfg_attr(generic_arg, feature(generic_arg_infer))] | |
3 | ||
2c00a5a8 XL |
4 | // When the type of a method call's receiver is unknown, the span should point |
5 | // to the receiver (and not the entire call, as was previously the case before | |
6 | // the fix of which this tests). | |
7 | ||
8 | fn shines_a_beacon_through_the_darkness() { | |
9 | let x: Option<_> = None; | |
10 | x.unwrap().method_that_could_exist_on_some_type(); | |
0731742a | 11 | //~^ ERROR type annotations needed |
2c00a5a8 XL |
12 | } |
13 | ||
14 | fn courier_to_des_moines_and_points_west(data: &[u32]) -> String { | |
60c5eb7d XL |
15 | data.iter() |
16 | .sum::<_>() //~ ERROR type annotations needed | |
2c00a5a8 XL |
17 | .to_string() |
18 | } | |
19 | ||
20 | fn main() {} |