]> git.proxmox.com Git - rustc.git/blob - src/test/ui/traits/issue-77982.stderr
Update unsuspicious file list
[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 | ^^^ ------------ type must be known at this point
6 | |
7 | cannot infer type of the type parameter `Q` declared on the associated function `get`
8 |
9 = note: multiple `impl`s satisfying `String: Borrow<_>` found in the following crates: `alloc`, `core`:
10 - impl Borrow<str> for String;
11 - impl<T> Borrow<T> for T
12 where T: ?Sized;
13 note: required by a bound in `HashMap::<K, V, S>::get`
14 --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
15 |
16 LL | K: Borrow<Q>,
17 | ^^^^^^^^^ required by this bound in `HashMap::<K, V, S>::get`
18 help: consider specifying the generic argument
19 |
20 LL | opts.get::<Q>(opt.as_ref());
21 | +++++
22
23 error[E0283]: type annotations needed
24 --> $DIR/issue-77982.rs:8:10
25 |
26 LL | opts.get(opt.as_ref());
27 | ^^^ ------ type must be known at this point
28 | |
29 | cannot infer type of the type parameter `Q` declared on the associated function `get`
30 |
31 = note: multiple `impl`s satisfying `String: AsRef<_>` found in the following crates: `alloc`, `std`:
32 - impl AsRef<OsStr> for String;
33 - impl AsRef<Path> for String;
34 - impl AsRef<[u8]> for String;
35 - impl AsRef<str> for String;
36 help: consider specifying the generic argument
37 |
38 LL | opts.get::<Q>(opt.as_ref());
39 | +++++
40
41 error[E0283]: type annotations needed
42 --> $DIR/issue-77982.rs:13:59
43 |
44 LL | let ips: Vec<_> = (0..100_000).map(|_| u32::from(0u32.into())).collect();
45 | --------- ^^^^
46 | |
47 | required by a bound introduced by this call
48 |
49 = note: cannot satisfy `u32: From<_>`
50 help: try using a fully qualified path to specify the expected types
51 |
52 LL | let ips: Vec<_> = (0..100_000).map(|_| u32::from(<u32 as Into<T>>::into(0u32))).collect();
53 | +++++++++++++++++++++++ ~
54
55 error[E0283]: type annotations needed for `Box<T>`
56 --> $DIR/issue-77982.rs:36:9
57 |
58 LL | let _ = ().foo();
59 | ^ --- type must be known at this point
60 |
61 note: multiple `impl`s satisfying `(): Foo<'_, _>` found
62 --> $DIR/issue-77982.rs:29:1
63 |
64 LL | impl Foo<'static, u32> for () {}
65 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66 LL | impl<'a> Foo<'a, i16> for () {}
67 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
68 help: consider giving this pattern a type, where the type for type parameter `T` is specified
69 |
70 LL | let _: Box<T> = ().foo();
71 | ++++++++
72
73 error[E0283]: type annotations needed for `Box<T>`
74 --> $DIR/issue-77982.rs:40:9
75 |
76 LL | let _ = (&()).bar();
77 | ^ --- type must be known at this point
78 |
79 note: multiple `impl`s satisfying `&(): Bar<'_, _>` found
80 --> $DIR/issue-77982.rs:32:1
81 |
82 LL | impl<'a> Bar<'static, u32> for &'a () {}
83 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
84 LL | impl<'a> Bar<'a, i16> for &'a () {}
85 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
86 help: consider giving this pattern a type, where the type for type parameter `T` is specified
87 |
88 LL | let _: Box<T> = (&()).bar();
89 | ++++++++
90
91 error: aborting due to 5 previous errors
92
93 For more information about this error, try `rustc --explain E0283`.