]>
Commit | Line | Data |
---|---|---|
f035d41b XL |
1 | error[E0283]: type annotations needed |
2 | --> $DIR/issue-72690.rs:7:5 | |
3 | | | |
4 | LL | String::from("x".as_ref()); | |
29967ef6 | 5 | | ^^^^^^^^^^^^ cannot infer type for reference `&_` |
f035d41b | 6 | | |
1b1a35ee | 7 | = note: cannot satisfy `String: From<&_>` |
136023e0 XL |
8 | note: required by `from` |
9 | --> $SRC_DIR/core/src/convert/mod.rs:LL:COL | |
10 | | | |
11 | LL | fn from(_: T) -> Self; | |
12 | | ^^^^^^^^^^^^^^^^^^^^^^ | |
f035d41b XL |
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 | ||
29967ef6 | 20 | error[E0283]: type annotations needed for `&T` |
f035d41b XL |
21 | --> $DIR/issue-72690.rs:15:17 |
22 | | | |
23 | LL | let _ = "x".as_ref(); | |
29967ef6 XL |
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 | |
f035d41b | 27 | | |
1b1a35ee | 28 | = note: cannot satisfy `str: AsRef<_>` |
f035d41b XL |
29 | |
30 | error[E0283]: type annotations needed | |
31 | --> $DIR/issue-72690.rs:19:5 | |
32 | | | |
33 | LL | String::from("x".as_ref()); | |
29967ef6 | 34 | | ^^^^^^^^^^^^ cannot infer type for reference `&_` |
f035d41b | 35 | | |
1b1a35ee | 36 | = note: cannot satisfy `String: From<&_>` |
136023e0 XL |
37 | note: required by `from` |
38 | --> $SRC_DIR/core/src/convert/mod.rs:LL:COL | |
39 | | | |
40 | LL | fn from(_: T) -> Self; | |
41 | | ^^^^^^^^^^^^^^^^^^^^^^ | |
f035d41b XL |
42 | |
43 | error[E0283]: type annotations needed | |
44 | --> $DIR/issue-72690.rs:25:5 | |
45 | | | |
46 | LL | String::from("x".as_ref()); | |
29967ef6 | 47 | | ^^^^^^^^^^^^ cannot infer type for reference `&_` |
f035d41b | 48 | | |
1b1a35ee | 49 | = note: cannot satisfy `String: From<&_>` |
136023e0 XL |
50 | note: required by `from` |
51 | --> $SRC_DIR/core/src/convert/mod.rs:LL:COL | |
52 | | | |
53 | LL | fn from(_: T) -> Self; | |
54 | | ^^^^^^^^^^^^^^^^^^^^^^ | |
f035d41b XL |
55 | |
56 | error[E0283]: type annotations needed | |
57 | --> $DIR/issue-72690.rs:33:5 | |
58 | | | |
59 | LL | String::from("x".as_ref()); | |
29967ef6 | 60 | | ^^^^^^^^^^^^ cannot infer type for reference `&_` |
f035d41b | 61 | | |
1b1a35ee | 62 | = note: cannot satisfy `String: From<&_>` |
136023e0 XL |
63 | note: required by `from` |
64 | --> $SRC_DIR/core/src/convert/mod.rs:LL:COL | |
65 | | | |
66 | LL | fn from(_: T) -> Self; | |
67 | | ^^^^^^^^^^^^^^^^^^^^^^ | |
f035d41b | 68 | |
29967ef6 | 69 | error[E0283]: type annotations needed |
f035d41b XL |
70 | --> $DIR/issue-72690.rs:41:5 |
71 | | | |
72 | LL | String::from("x".as_ref()); | |
29967ef6 | 73 | | ^^^^^^^^^^^^ cannot infer type for reference `&_` |
f035d41b | 74 | | |
1b1a35ee | 75 | = note: cannot satisfy `String: From<&_>` |
136023e0 XL |
76 | note: required by `from` |
77 | --> $SRC_DIR/core/src/convert/mod.rs:LL:COL | |
78 | | | |
79 | LL | fn from(_: T) -> Self; | |
80 | | ^^^^^^^^^^^^^^^^^^^^^^ | |
f035d41b | 81 | |
29967ef6 | 82 | error[E0283]: type annotations needed |
f035d41b XL |
83 | --> $DIR/issue-72690.rs:47:5 |
84 | | | |
f035d41b | 85 | LL | String::from("x".as_ref()); |
29967ef6 | 86 | | ^^^^^^^^^^^^ cannot infer type for reference `&_` |
f035d41b | 87 | | |
1b1a35ee | 88 | = note: cannot satisfy `String: From<&_>` |
136023e0 XL |
89 | note: required by `from` |
90 | --> $SRC_DIR/core/src/convert/mod.rs:LL:COL | |
91 | | | |
92 | LL | fn from(_: T) -> Self; | |
93 | | ^^^^^^^^^^^^^^^^^^^^^^ | |
f035d41b | 94 | |
29967ef6 | 95 | error[E0283]: type annotations needed |
f035d41b XL |
96 | --> $DIR/issue-72690.rs:55:5 |
97 | | | |
f035d41b | 98 | LL | String::from("x".as_ref()); |
29967ef6 | 99 | | ^^^^^^^^^^^^ cannot infer type for reference `&_` |
f035d41b | 100 | | |
1b1a35ee | 101 | = note: cannot satisfy `String: From<&_>` |
136023e0 XL |
102 | note: required by `from` |
103 | --> $SRC_DIR/core/src/convert/mod.rs:LL:COL | |
104 | | | |
105 | LL | fn from(_: T) -> Self; | |
106 | | ^^^^^^^^^^^^^^^^^^^^^^ | |
f035d41b XL |
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`. |