summaryrefslogtreecommitdiffstats
path: root/src/test/ui/binop
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/binop/binary-op-on-double-ref.stderr2
-rw-r--r--src/test/ui/binop/issue-77910-1.rs2
-rw-r--r--src/test/ui/binop/issue-77910-1.stderr12
-rw-r--r--src/test/ui/binop/issue-77910-2.stderr9
4 files changed, 15 insertions, 10 deletions
diff --git a/src/test/ui/binop/binary-op-on-double-ref.stderr b/src/test/ui/binop/binary-op-on-double-ref.stderr
index 1651f70d5..34826d2f4 100644
--- a/src/test/ui/binop/binary-op-on-double-ref.stderr
+++ b/src/test/ui/binop/binary-op-on-double-ref.stderr
@@ -6,7 +6,7 @@ LL | x % 2 == 0
| |
| &&{integer}
|
-help: `%` can be used on `{integer}`, you can dereference `x`
+help: `%` can be used on `&{integer}` if you dereference the left-hand side
|
LL | *x % 2 == 0
| +
diff --git a/src/test/ui/binop/issue-77910-1.rs b/src/test/ui/binop/issue-77910-1.rs
index d786e3358..95bbd6a60 100644
--- a/src/test/ui/binop/issue-77910-1.rs
+++ b/src/test/ui/binop/issue-77910-1.rs
@@ -7,5 +7,5 @@ fn main() {
// we shouldn't ice with the bound var here.
assert_eq!(foo, y);
//~^ ERROR binary operation `==` cannot be applied to type
- //~| ERROR `for<'r> fn(&'r i32) -> &'r i32 {foo}` doesn't implement `Debug`
+ //~| ERROR `for<'a> fn(&'a i32) -> &'a i32 {foo}` doesn't implement `Debug`
}
diff --git a/src/test/ui/binop/issue-77910-1.stderr b/src/test/ui/binop/issue-77910-1.stderr
index 68303b842..263a35d98 100644
--- a/src/test/ui/binop/issue-77910-1.stderr
+++ b/src/test/ui/binop/issue-77910-1.stderr
@@ -1,25 +1,25 @@
-error[E0369]: binary operation `==` cannot be applied to type `for<'r> fn(&'r i32) -> &'r i32 {foo}`
+error[E0369]: binary operation `==` cannot be applied to type `for<'a> fn(&'a i32) -> &'a i32 {foo}`
--> $DIR/issue-77910-1.rs:8:5
|
LL | assert_eq!(foo, y);
| ^^^^^^^^^^^^^^^^^^
| |
- | for<'r> fn(&'r i32) -> &'r i32 {foo}
+ | for<'a> fn(&'a i32) -> &'a i32 {foo}
| _
|
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
-error[E0277]: `for<'r> fn(&'r i32) -> &'r i32 {foo}` doesn't implement `Debug`
+error[E0277]: `for<'a> fn(&'a i32) -> &'a 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`
+ | ^^^^^^^^^^^^^^^^^^ `for<'a> fn(&'a i32) -> &'a 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: use parentheses to call the function: `foo(s)`
+ = help: the trait `Debug` is not implemented for fn item `for<'a> fn(&'a i32) -> &'a i32 {foo}`
+ = help: use parentheses to call this function: `foo(/* &i32 */)`
= 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/binop/issue-77910-2.stderr b/src/test/ui/binop/issue-77910-2.stderr
index 5477a5762..b3856b6ae 100644
--- a/src/test/ui/binop/issue-77910-2.stderr
+++ b/src/test/ui/binop/issue-77910-2.stderr
@@ -1,10 +1,15 @@
-error[E0369]: binary operation `==` cannot be applied to type `for<'r> fn(&'r i32) -> &'r i32 {foo}`
+error[E0369]: binary operation `==` cannot be applied to type `for<'a> fn(&'a i32) -> &'a i32 {foo}`
--> $DIR/issue-77910-2.rs:7:12
|
LL | if foo == y {}
| --- ^^ - _
| |
- | for<'r> fn(&'r i32) -> &'r i32 {foo}
+ | for<'a> fn(&'a i32) -> &'a i32 {foo}
+ |
+help: use parentheses to call this function
+ |
+LL | if foo(/* &i32 */) == y {}
+ | ++++++++++++
error: aborting due to previous error