Rollup merge of #50987 - estebank:underline-multiple-suggestions, r=petrochencov

Underline multiple suggested replacements in the same line

<img width="685" alt="screen shot 2018-05-22 at 21 06 48" src="https://user-images.githubusercontent.com/1606434/40403051-174f3180-5e04-11e8-86b6-261630c5ff80.png">

Follow up to #50943.

Fix #50977.
This commit is contained in:
kennytm 2018-05-26 19:32:18 +08:00 committed by GitHub
commit 103abdb75c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 56 additions and 26 deletions

View file

@ -9,7 +9,7 @@ LL | fn foo<U: Debug>(&self, _: &U) { }
help: try removing the generic parameter and using `impl Trait` instead
|
LL | fn foo(&self, _: &impl Debug) { }
|
| -- ^^^^^^^^^^
error[E0643]: method `bar` has incompatible signature for trait
--> $DIR/impl-generic-mismatch.rs:27:23
@ -21,12 +21,8 @@ LL | fn bar(&self, _: &impl Debug) { }
| ^^^^^^^^^^ expected generic parameter, found `impl Trait`
help: try changing the `impl Trait` argument to a generic parameter
|
LL | fn bar<U: Debug><U: Debug>(&self, _: &U);
LL | }
LL |
LL | impl Bar for () {
LL | fn bar(&self, _: &U) { }
|
LL | fn bar<U: Debug>(&self, _: &U) { }
| ^^^^^^^^^^ ^
error[E0643]: method `hash` has incompatible signature for trait
--> $DIR/impl-generic-mismatch.rs:38:33