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