about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2017-01-04 13:47:04 -0800
committerEsteban Küber <esteban@kuber.com.ar>2017-01-04 13:47:04 -0800
commitf2dd75cb865524ca558630a2e785ca55d6d287ef (patch)
tree31a52b1a91d72085cb7e57836bd64f0fd56ebf64
parent5598f351627bf1c235e7b7d06bd60ad0bad537cc (diff)
downloadrust-f2dd75cb865524ca558630a2e785ca55d6d287ef.tar.gz
rust-f2dd75cb865524ca558630a2e785ca55d6d287ef.zip
review comments
-rw-r--r--src/librustc_typeck/check/_match.rs3
-rw-r--r--src/test/ui/mismatched_types/issue-38371.stderr3
2 files changed, 1 insertions, 5 deletions
diff --git a/src/librustc_typeck/check/_match.rs b/src/librustc_typeck/check/_match.rs
index fcd61b3c7c8..f05c9a00be2 100644
--- a/src/librustc_typeck/check/_match.rs
+++ b/src/librustc_typeck/check/_match.rs
@@ -223,9 +223,6 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
                                         .span_to_snippet(pat.span)
                                     {
                                         err.help(&format!("did you mean `{}: &{}`?",
-                                                          snippet,
-                                                          expected));
-                                        err.help(&format!("did you mean `{}: {}`?",
                                                           &snippet[1..],
                                                           expected));
                                     }
diff --git a/src/test/ui/mismatched_types/issue-38371.stderr b/src/test/ui/mismatched_types/issue-38371.stderr
index 8b27218f497..e0d80f890d9 100644
--- a/src/test/ui/mismatched_types/issue-38371.stderr
+++ b/src/test/ui/mismatched_types/issue-38371.stderr
@@ -6,8 +6,7 @@ error[E0308]: mismatched types
    |
    = note: expected type `Foo`
    = note:    found type `&_`
-   = help: did you mean `&foo: &Foo`?
-   = help: did you mean `foo: Foo`?
+   = help: did you mean `foo: &Foo`?
 
 error: aborting due to previous error