]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/from_over_into.stderr
New upstream version 1.68.2+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / from_over_into.stderr
CommitLineData
f20569fa 1error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
f25598a0 2 --> $DIR/from_over_into.rs:10:1
f20569fa
XL
3 |
4LL | impl Into<StringWrapper> for String {
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6 |
7 = note: `-D clippy::from-over-into` implied by `-D warnings`
2b03887a
FG
8help: replace the `Into` implentation with `From<std::string::String>`
9 |
10LL ~ impl From<String> for StringWrapper {
11LL ~ fn from(val: String) -> Self {
12LL ~ StringWrapper(val)
13 |
14
15error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
f25598a0 16 --> $DIR/from_over_into.rs:18:1
2b03887a
FG
17 |
18LL | impl Into<SelfType> for String {
19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20 |
21help: replace the `Into` implentation with `From<std::string::String>`
22 |
23LL ~ impl From<String> for SelfType {
24LL ~ fn from(val: String) -> Self {
25LL ~ SelfType(String::new())
26 |
27
28error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
f25598a0 29 --> $DIR/from_over_into.rs:33:1
2b03887a
FG
30 |
31LL | impl Into<SelfKeywords> for X {
32 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33 |
34help: replace the `Into` implentation with `From<X>`
35 |
36LL ~ impl From<X> for SelfKeywords {
37LL ~ fn from(val: X) -> Self {
38LL ~ let _ = X::default();
39LL ~ let _ = X::FOO;
40LL ~ let _: X = val;
41 |
42
43error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
f25598a0 44 --> $DIR/from_over_into.rs:45:1
2b03887a
FG
45 |
46LL | impl core::convert::Into<bool> for crate::ExplicitPaths {
47 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48 |
49 = help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see
50 https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence
51help: replace the `Into` implentation with `From<ExplicitPaths>`
52 |
53LL ~ impl core::convert::From<crate::ExplicitPaths> for bool {
54LL ~ fn from(mut val: crate::ExplicitPaths) -> Self {
55LL ~ let in_closure = || val.0;
56LL |
57LL ~ val.0 = false;
58LL ~ val.0
59 |
60
61error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
f25598a0 62 --> $DIR/from_over_into.rs:78:5
2b03887a
FG
63 |
64LL | impl<T> Into<FromOverInto<T>> for Vec<T> {
65 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66 |
67help: replace the `Into` implentation with `From<std::vec::Vec<T>>`
68 |
69LL ~ impl<T> From<Vec<T>> for FromOverInto<T> {
70LL ~ fn from(val: Vec<T>) -> Self {
71LL ~ FromOverInto(val)
72 |
f20569fa 73
2b03887a 74error: aborting due to 5 previous errors
f20569fa 75