]> git.proxmox.com Git - rustc.git/blame - src/test/ui/span/issue-42234-unknown-receiver-type.generic_arg.stderr
Update unsuspicious file list
[rustc.git] / src / test / ui / span / issue-42234-unknown-receiver-type.generic_arg.stderr
CommitLineData
923072b8
FG
1error[E0282]: type annotations needed
2 --> $DIR/issue-42234-unknown-receiver-type.rs:9:24
2c00a5a8 3 |
0531ce1d 4LL | let x: Option<_> = None;
923072b8 5 | ^^^^ cannot infer type of the type parameter `T` declared on the enum `Option`
064997fb
FG
6LL | x.unwrap().method_that_could_exist_on_some_type();
7 | ---------- type must be known at this point
94b46f34 8 |
923072b8
FG
9help: consider specifying the generic argument
10 |
11LL | let x: Option<_> = None::<T>;
12 | +++++
2c00a5a8 13
0531ce1d 14error[E0282]: type annotations needed
923072b8 15 --> $DIR/issue-42234-unknown-receiver-type.rs:15:10
2c00a5a8 16 |
60c5eb7d 17LL | .sum::<_>()
923072b8 18 | ^^^ cannot infer type of the type parameter `S` declared on the associated function `sum`
94b46f34 19 |
923072b8
FG
20help: consider specifying the generic argument
21 |
22LL | .sum::<S>()
23 | ~~~~~
2c00a5a8
XL
24
25error: aborting due to 2 previous errors
26
0531ce1d 27For more information about this error, try `rustc --explain E0282`.