]> git.proxmox.com Git - rustc.git/blob - tests/ui/inference/need_type_info/issue-113264-incorrect-impl-trait-in-path-suggestion.stderr
New upstream version 1.75.0+dfsg1
[rustc.git] / tests / ui / inference / need_type_info / issue-113264-incorrect-impl-trait-in-path-suggestion.stderr
1 error[E0283]: type annotations needed
2 --> $DIR/issue-113264-incorrect-impl-trait-in-path-suggestion.rs:10:16
3 |
4 LL | (S {}).owo(None)
5 | --- ^^^^ cannot infer type of the type parameter `T` declared on the enum `Option`
6 | |
7 | required by a bound introduced by this call
8 |
9 = note: cannot satisfy `_: T`
10 note: required by a bound in `S::owo`
11 --> $DIR/issue-113264-incorrect-impl-trait-in-path-suggestion.rs:6:35
12 |
13 LL | fn owo(&self, _: Option<&impl T>) {}
14 | ^ required by this bound in `S::owo`
15 help: consider specifying the generic argument
16 |
17 LL | (S {}).owo(None::<&_>)
18 | ++++++
19
20 error: aborting due to previous error
21
22 For more information about this error, try `rustc --explain E0283`.