about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorricked-twice <39213807+ricked-twice@users.noreply.github.com>2022-05-17 22:59:13 +0200
committerricked-twice <39213807+ricked-twice@users.noreply.github.com>2022-05-17 22:59:13 +0200
commitac5366b669b5a4f9a6c7e231ac6f99e709c44fe9 (patch)
tree74ca5fda4b39892e01136f86da6cf283de02adee /src/test
parent4d7e014550444129deb3c83dd588357cb36241b2 (diff)
downloadrust-ac5366b669b5a4f9a6c7e231ac6f99e709c44fe9.tar.gz
rust-ac5366b669b5a4f9a6c7e231ac6f99e709c44fe9.zip
Taking review into account
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/binop/issue-77910-1.stderr14
-rw-r--r--src/test/ui/suggestions/imm-ref-trait-object-literal-bound-regions.stderr1
2 files changed, 5 insertions, 10 deletions
diff --git a/src/test/ui/binop/issue-77910-1.stderr b/src/test/ui/binop/issue-77910-1.stderr
index 95ee51a8826..68303b84208 100644
--- a/src/test/ui/binop/issue-77910-1.stderr
+++ b/src/test/ui/binop/issue-77910-1.stderr
@@ -12,20 +12,14 @@ LL |     assert_eq!(foo, y);
 error[E0277]: `for<'r> fn(&'r i32) -> &'r i32 {foo}` doesn't implement `Debug`
   --> $DIR/issue-77910-1.rs:8:5
    |
+LL | fn foo(s: &i32) -> &i32 {
+   |    --- consider calling this function
+...
 LL |     assert_eq!(foo, y);
    |     ^^^^^^^^^^^^^^^^^^ `for<'r> fn(&'r i32) -> &'r i32 {foo}` cannot be formatted using `{:?}` because it doesn't implement `Debug`
    |
    = help: the trait `Debug` is not implemented for `for<'r> fn(&'r i32) -> &'r i32 {foo}`
-   = help: the following other types implement trait `Debug`:
-             extern "C" fn() -> Ret
-             extern "C" fn(A) -> Ret
-             extern "C" fn(A, ...) -> Ret
-             extern "C" fn(A, B) -> Ret
-             extern "C" fn(A, B, ...) -> Ret
-             extern "C" fn(A, B, C) -> Ret
-             extern "C" fn(A, B, C, ...) -> Ret
-             extern "C" fn(A, B, C, D) -> Ret
-           and 68 others
+   = help: use parentheses to call the function: `foo(s)`
    = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to 2 previous errors
diff --git a/src/test/ui/suggestions/imm-ref-trait-object-literal-bound-regions.stderr b/src/test/ui/suggestions/imm-ref-trait-object-literal-bound-regions.stderr
index 0783f04dc9b..ba6af8f15fa 100644
--- a/src/test/ui/suggestions/imm-ref-trait-object-literal-bound-regions.stderr
+++ b/src/test/ui/suggestions/imm-ref-trait-object-literal-bound-regions.stderr
@@ -5,6 +5,7 @@ LL |     foo::<S>(s);
    |     ^^^^^^^^ the trait `for<'b> Trait` is not implemented for `&'b S`
    |
    = help: the trait `Trait` is implemented for `&'a mut S`
+   = note: `for<'b> Trait` is implemented for `&'b mut S`, but not for `&'b S`
 note: required by a bound in `foo`
   --> $DIR/imm-ref-trait-object-literal-bound-regions.rs:11:20
    |