From 785d607fb4e3e17908f39827b636e16ea441bc9f Mon Sep 17 00:00:00 2001 From: xiongmao86 Date: Wed, 24 Feb 2021 16:09:38 +0800 Subject: [PATCH] Reference for pull request. --- tests/ui/from_instead_of_into.stderr | 54 +++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 5 deletions(-) diff --git a/tests/ui/from_instead_of_into.stderr b/tests/ui/from_instead_of_into.stderr index 5bf718003852..04a1acc88f35 100644 --- a/tests/ui/from_instead_of_into.stderr +++ b/tests/ui/from_instead_of_into.stderr @@ -2,33 +2,77 @@ error: Into trait is preferable than From as a generic bound --> $DIR/from_instead_of_into.rs:11:5 | LL | u32: From, - | ^^^^^^^^^^^^ help: try: `T: Into` + | ^^^^^^^^^^^^ | = note: `-D clippy::from-instead-of-into` implied by `-D warnings` +help: remove From bound + | +LL | , + | -- +help: Add this bound predicate + | +LL | u32: FromT: Into, + | ^^^^^^^^^^^^ error: Into trait is preferable than From as a generic bound --> $DIR/from_instead_of_into.rs:17:5 | LL | u32: Copy + Clone + From, - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `T: Into, u32: Copy + Clone` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +help: remove From bound + | +LL | u32: Copy + Clone, + | -- +help: Add this bound predicate + | +LL | u32: Copy + Clone + From, T: Into, + | ^^^^^^^^^^^^^^ error: TryInto trait is preferable than TryFrom as a generic bound --> $DIR/from_instead_of_into.rs:23:5 | LL | u32: TryFrom, - | ^^^^^^^^^^^^^^^ help: try: `T: TryInto` + | ^^^^^^^^^^^^^^^ + | +help: remove TryFrom bound + | +LL | , + | -- +help: Add this bound predicate + | +LL | u32: TryFromT: TryInto, + | ^^^^^^^^^^^^^^^ error: TryInto trait is preferable than TryFrom as a generic bound --> $DIR/from_instead_of_into.rs:29:5 | LL | u32: Copy + TryFrom + Clone, - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `T: TryInto, u32: Copy + Clone` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +help: remove TryFrom bound + | +LL | u32: Copy + Clone, + | -- +help: Add this bound predicate + | +LL | u32: Copy + TryFrom + Clone, T: TryInto, + | ^^^^^^^^^^^^^^^^^ error: TryInto trait is preferable than TryFrom as a generic bound --> $DIR/from_instead_of_into.rs:35:5 | LL | u32: TryFrom + Copy + Clone, - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `T: TryInto, u32: Copy + Clone` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +help: remove TryFrom bound + | +LL | + Copy + Clone, + | -- +help: Add this bound predicate + | +LL | u32: TryFrom + Copy + Clone, T: TryInto, + | ^^^^^^^^^^^^^^^^^ error: aborting due to 5 previous errors