about summary refs log tree commit diff
diff options
context:
space:
mode:
authorakida31 <akida3@protonmail.com>2022-10-09 10:07:47 +0200
committerakida31 <akida3@protonmail.com>2022-12-13 16:28:31 +0100
commite326e8c885e70040fc5f3012fa6126853cfd080f (patch)
treebd364719a981c01ade8af5c7b0f26361d8826054
parente50f5756aac024e5f10bf918e321afa1e671d7af (diff)
downloadrust-e326e8c885e70040fc5f3012fa6126853cfd080f.tar.gz
rust-e326e8c885e70040fc5f3012fa6126853cfd080f.zip
Remove `hint` from help message
-rw-r--r--compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs4
-rw-r--r--src/test/ui/anonymous-higher-ranked-lifetime.stderr36
-rw-r--r--src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr2
-rw-r--r--src/test/ui/mismatched_types/issue-36053-2.stderr2
4 files changed, 22 insertions, 22 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
index 2923ad352a7..8e393550509 100644
--- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
+++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
@@ -1811,11 +1811,11 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
 
                 if found_ty == expected_ty {
                     let hint = if found_refs < expected_refs {
-                        "hint: consider borrowing here:"
+                        "consider borrowing here:"
                     } else if found_refs == expected_refs {
                         continue;
                     } else {
-                        "hint: consider removing the borrow:"
+                        "consider removing the borrow:"
                     };
                     err.span_suggestion_verbose(
                         arg_span,
diff --git a/src/test/ui/anonymous-higher-ranked-lifetime.stderr b/src/test/ui/anonymous-higher-ranked-lifetime.stderr
index af6ae127304..499ee1f9b5b 100644
--- a/src/test/ui/anonymous-higher-ranked-lifetime.stderr
+++ b/src/test/ui/anonymous-higher-ranked-lifetime.stderr
@@ -13,11 +13,11 @@ note: required by a bound in `f1`
    |
 LL | fn f1<F>(_: F) where F: Fn(&(), &()) {}
    |                         ^^^^^^^^^^^^ required by this bound in `f1`
-help: hint: consider borrowing here:
+help: consider borrowing here:
    |
 LL |     f1(|_: &(), _: ()| {});
    |            ~~~
-help: hint: consider borrowing here:
+help: consider borrowing here:
    |
 LL |     f1(|_: (), _: &()| {});
    |                   ~~~
@@ -37,11 +37,11 @@ note: required by a bound in `f2`
    |
 LL | fn f2<F>(_: F) where F: for<'a> Fn(&'a (), &()) {}
    |                         ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `f2`
-help: hint: consider borrowing here:
+help: consider borrowing here:
    |
 LL |     f2(|_: &'a (), _: ()| {});
    |            ~~~~~~
-help: hint: consider borrowing here:
+help: consider borrowing here:
    |
 LL |     f2(|_: (), _: &()| {});
    |                   ~~~
@@ -61,11 +61,11 @@ note: required by a bound in `f3`
    |
 LL | fn f3<'a, F>(_: F) where F: Fn(&'a (), &()) {}
    |                             ^^^^^^^^^^^^^^^ required by this bound in `f3`
-help: hint: consider borrowing here:
+help: consider borrowing here:
    |
 LL |     f3(|_: &(), _: ()| {});
    |            ~~~
-help: hint: consider borrowing here:
+help: consider borrowing here:
    |
 LL |     f3(|_: (), _: &()| {});
    |                   ~~~
@@ -85,11 +85,11 @@ note: required by a bound in `f4`
    |
 LL | fn f4<F>(_: F) where F: for<'r> Fn(&(), &'r ()) {}
    |                         ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `f4`
-help: hint: consider borrowing here:
+help: consider borrowing here:
    |
 LL |     f4(|_: &(), _: ()| {});
    |            ~~~
-help: hint: consider borrowing here:
+help: consider borrowing here:
    |
 LL |     f4(|_: (), _: &'r ()| {});
    |                   ~~~~~~
@@ -109,11 +109,11 @@ note: required by a bound in `f5`
    |
 LL | fn f5<F>(_: F) where F: for<'r> Fn(&'r (), &'r ()) {}
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `f5`
-help: hint: consider borrowing here:
+help: consider borrowing here:
    |
 LL |     f5(|_: &'r (), _: ()| {});
    |            ~~~~~~
-help: hint: consider borrowing here:
+help: consider borrowing here:
    |
 LL |     f5(|_: (), _: &'r ()| {});
    |                   ~~~~~~
@@ -133,7 +133,7 @@ note: required by a bound in `g1`
    |
 LL | fn g1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>) {}
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `g1`
-help: hint: consider borrowing here:
+help: consider borrowing here:
    |
 LL |     g1(|_: &(), _: ()| {});
    |            ~~~
@@ -153,7 +153,7 @@ note: required by a bound in `g2`
    |
 LL | fn g2<F>(_: F) where F: Fn(&(), fn(&())) {}
    |                         ^^^^^^^^^^^^^^^^ required by this bound in `g2`
-help: hint: consider borrowing here:
+help: consider borrowing here:
    |
 LL |     g2(|_: &(), _: ()| {});
    |            ~~~
@@ -173,7 +173,7 @@ note: required by a bound in `g3`
    |
 LL | fn g3<F>(_: F) where F: for<'s> Fn(&'s (), Box<dyn Fn(&())>) {}
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `g3`
-help: hint: consider borrowing here:
+help: consider borrowing here:
    |
 LL |     g3(|_: &'s (), _: ()| {});
    |            ~~~~~~
@@ -193,7 +193,7 @@ note: required by a bound in `g4`
    |
 LL | fn g4<F>(_: F) where F: Fn(&(), for<'r> fn(&'r ())) {}
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `g4`
-help: hint: consider borrowing here:
+help: consider borrowing here:
    |
 LL |     g4(|_: &(), _: ()| {});
    |            ~~~
@@ -213,11 +213,11 @@ note: required by a bound in `h1`
    |
 LL | fn h1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>, &(), fn(&(), &())) {}
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `h1`
-help: hint: consider borrowing here:
+help: consider borrowing here:
    |
 LL |     h1(|_: &(), _: (), _: (), _: ()| {});
    |            ~~~
-help: hint: consider borrowing here:
+help: consider borrowing here:
    |
 LL |     h1(|_: (), _: (), _: &(), _: ()| {});
    |                          ~~~
@@ -237,11 +237,11 @@ note: required by a bound in `h2`
    |
 LL | fn h2<F>(_: F) where F: for<'t0> Fn(&(), Box<dyn Fn(&())>, &'t0 (), fn(&(), &())) {}
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `h2`
-help: hint: consider borrowing here:
+help: consider borrowing here:
    |
 LL |     h2(|_: &(), _: (), _: (), _: ()| {});
    |            ~~~
-help: hint: consider borrowing here:
+help: consider borrowing here:
    |
 LL |     h2(|_: (), _: (), _: &'t0 (), _: ()| {});
    |                          ~~~~~~~
diff --git a/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr b/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr
index 8a1a0d2440b..3edcb4ee05e 100644
--- a/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr
+++ b/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr
@@ -13,7 +13,7 @@ note: required by a bound in `map`
    |
 LL |         F: FnMut(Self::Item) -> B,
    |            ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Iterator::map`
-help: hint: consider borrowing here:
+help: consider borrowing here:
    |
 LL |     a.iter().map(|_: &(u32, u32)| 45);
    |                      ~~~~~~~~~~~
diff --git a/src/test/ui/mismatched_types/issue-36053-2.stderr b/src/test/ui/mismatched_types/issue-36053-2.stderr
index bbcce98f7d3..b0a69ef2720 100644
--- a/src/test/ui/mismatched_types/issue-36053-2.stderr
+++ b/src/test/ui/mismatched_types/issue-36053-2.stderr
@@ -13,7 +13,7 @@ note: required by a bound in `filter`
    |
 LL |         P: FnMut(&Self::Item) -> bool,
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Iterator::filter`
-help: hint: consider borrowing here:
+help: consider borrowing here:
    |
 LL |     once::<&str>("str").fuse().filter(|a: &&str| true).count();
    |                                           ~~~~~