]> git.proxmox.com Git - rustc.git/blob - src/test/ui/traits/issue-77982.stderr
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / traits / issue-77982.stderr
1 error[E0283]: type annotations needed
2 --> $DIR/issue-77982.rs:8:10
3 |
4 LL | opts.get(opt.as_ref());
5 | ^^^ ------------ this method call resolves to `&T`
6 | |
7 | cannot infer type for type parameter `Q` declared on the associated function `get`
8 |
9 = note: cannot satisfy `String: Borrow<_>`
10
11 error[E0283]: type annotations needed
12 --> $DIR/issue-77982.rs:12:44
13 |
14 LL | let ips: Vec<_> = (0..100_000).map(|_| u32::from(0u32.into())).collect();
15 | ^^^^^^^^^ ----------- this method call resolves to `T`
16 | |
17 | cannot infer type for type parameter `T` declared on the trait `From`
18 |
19 = note: cannot satisfy `u32: From<_>`
20 note: required by `from`
21 --> $SRC_DIR/core/src/convert/mod.rs:LL:COL
22 |
23 LL | fn from(_: T) -> Self;
24 | ^^^^^^^^^^^^^^^^^^^^^^
25
26 error[E0283]: type annotations needed for `Box<T>`
27 --> $DIR/issue-77982.rs:35:16
28 |
29 LL | let _ = ().foo();
30 | - ^^^ cannot infer type for type parameter `T` declared on the trait `Foo`
31 | |
32 | consider giving this pattern the explicit type `Box<T>`, where the type parameter `T` is specified
33 |
34 = note: cannot satisfy `(): Foo<'_, _>`
35
36 error[E0283]: type annotations needed for `Box<T>`
37 --> $DIR/issue-77982.rs:39:19
38 |
39 LL | let _ = (&()).bar();
40 | - ^^^ cannot infer type for type parameter `T` declared on the trait `Bar`
41 | |
42 | consider giving this pattern the explicit type `Box<T>`, where the type parameter `T` is specified
43 |
44 = note: cannot satisfy `&(): Bar<'_, _>`
45
46 error: aborting due to 4 previous errors
47
48 For more information about this error, try `rustc --explain E0283`.