]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-72690.stderr
Added docs to internal_macro const
[rust.git] / src / test / ui / issues / issue-72690.stderr
1 error[E0283]: type annotations needed
2   --> $DIR/issue-72690.rs:7:5
3    |
4 LL |     String::from("x".as_ref());
5    |     ^^^^^^^^^^^^ cannot infer type for reference `&_`
6    |
7    = note: cannot satisfy `String: From<&_>`
8 note: required by `from`
9   --> $SRC_DIR/core/src/convert/mod.rs:LL:COL
10    |
11 LL |     fn from(_: T) -> Self;
12    |     ^^^^^^^^^^^^^^^^^^^^^^
13
14 error[E0282]: type annotations needed
15   --> $DIR/issue-72690.rs:11:6
16    |
17 LL |     |x| String::from("x".as_ref());
18    |      ^ consider giving this closure parameter a type
19
20 error[E0283]: type annotations needed for `&T`
21   --> $DIR/issue-72690.rs:15:17
22    |
23 LL |     let _ = "x".as_ref();
24    |         -       ^^^^^^ cannot infer type for type parameter `T` declared on the trait `AsRef`
25    |         |
26    |         consider giving this pattern the explicit type `&T`, where the type parameter `T` is specified
27    |
28    = note: cannot satisfy `str: AsRef<_>`
29
30 error[E0283]: type annotations needed
31   --> $DIR/issue-72690.rs:19:5
32    |
33 LL |     String::from("x".as_ref());
34    |     ^^^^^^^^^^^^ cannot infer type for reference `&_`
35    |
36    = note: cannot satisfy `String: From<&_>`
37 note: required by `from`
38   --> $SRC_DIR/core/src/convert/mod.rs:LL:COL
39    |
40 LL |     fn from(_: T) -> Self;
41    |     ^^^^^^^^^^^^^^^^^^^^^^
42
43 error[E0283]: type annotations needed
44   --> $DIR/issue-72690.rs:25:5
45    |
46 LL |     String::from("x".as_ref());
47    |     ^^^^^^^^^^^^ cannot infer type for reference `&_`
48    |
49    = note: cannot satisfy `String: From<&_>`
50 note: required by `from`
51   --> $SRC_DIR/core/src/convert/mod.rs:LL:COL
52    |
53 LL |     fn from(_: T) -> Self;
54    |     ^^^^^^^^^^^^^^^^^^^^^^
55
56 error[E0283]: type annotations needed
57   --> $DIR/issue-72690.rs:33:5
58    |
59 LL |     String::from("x".as_ref());
60    |     ^^^^^^^^^^^^ cannot infer type for reference `&_`
61    |
62    = note: cannot satisfy `String: From<&_>`
63 note: required by `from`
64   --> $SRC_DIR/core/src/convert/mod.rs:LL:COL
65    |
66 LL |     fn from(_: T) -> Self;
67    |     ^^^^^^^^^^^^^^^^^^^^^^
68
69 error[E0283]: type annotations needed
70   --> $DIR/issue-72690.rs:41:5
71    |
72 LL |     String::from("x".as_ref());
73    |     ^^^^^^^^^^^^ cannot infer type for reference `&_`
74    |
75    = note: cannot satisfy `String: From<&_>`
76 note: required by `from`
77   --> $SRC_DIR/core/src/convert/mod.rs:LL:COL
78    |
79 LL |     fn from(_: T) -> Self;
80    |     ^^^^^^^^^^^^^^^^^^^^^^
81
82 error[E0283]: type annotations needed
83   --> $DIR/issue-72690.rs:47:5
84    |
85 LL |     String::from("x".as_ref());
86    |     ^^^^^^^^^^^^ cannot infer type for reference `&_`
87    |
88    = note: cannot satisfy `String: From<&_>`
89 note: required by `from`
90   --> $SRC_DIR/core/src/convert/mod.rs:LL:COL
91    |
92 LL |     fn from(_: T) -> Self;
93    |     ^^^^^^^^^^^^^^^^^^^^^^
94
95 error[E0283]: type annotations needed
96   --> $DIR/issue-72690.rs:55:5
97    |
98 LL |     String::from("x".as_ref());
99    |     ^^^^^^^^^^^^ cannot infer type for reference `&_`
100    |
101    = note: cannot satisfy `String: From<&_>`
102 note: required by `from`
103   --> $SRC_DIR/core/src/convert/mod.rs:LL:COL
104    |
105 LL |     fn from(_: T) -> Self;
106    |     ^^^^^^^^^^^^^^^^^^^^^^
107
108 error: aborting due to 9 previous errors
109
110 Some errors have detailed explanations: E0282, E0283.
111 For more information about an error, try `rustc --explain E0282`.