about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/from_over_into.fixed6
-rw-r--r--tests/ui/from_over_into.stderr15
2 files changed, 4 insertions, 17 deletions
diff --git a/tests/ui/from_over_into.fixed b/tests/ui/from_over_into.fixed
index f1333bb39a8..98310ac5c6c 100644
--- a/tests/ui/from_over_into.fixed
+++ b/tests/ui/from_over_into.fixed
@@ -92,9 +92,9 @@ pub struct Lval<T>(T);
 
 pub struct Rval<T>(T);
 
-impl<T> From<Lval<T>> for Rval<Lval<T>> {
-    fn from(val: Lval<T>) -> Self {
-        Rval(val)
+impl<T> Into<Rval<Self>> for Lval<T> {
+    fn into(self) -> Rval<Self> {
+        Rval(self)
     }
 }
 
diff --git a/tests/ui/from_over_into.stderr b/tests/ui/from_over_into.stderr
index c514bb6146c..6039f86fe67 100644
--- a/tests/ui/from_over_into.stderr
+++ b/tests/ui/from_over_into.stderr
@@ -71,18 +71,5 @@ LL ~         fn from(val: Vec<T>) -> Self {
 LL ~             FromOverInto(val)
    |
 
-error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
-  --> $DIR/from_over_into.rs:95:1
-   |
-LL | impl<T> Into<Rval<Self>> for Lval<T> {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-help: replace the `Into` implementation with `From<Lval<T>>`
-   |
-LL ~ impl<T> From<Lval<T>> for Rval<Lval<T>> {
-LL ~     fn from(val: Lval<T>) -> Self {
-LL ~         Rval(val)
-   |
-
-error: aborting due to 6 previous errors
+error: aborting due to 5 previous errors