Skip to content

Commit 00bb293

Browse files
committed
Move test from compile-fail to ui/binop
1 parent 4eb28c3 commit 00bb293

File tree

4 files changed

+37
-0
lines changed

4 files changed

+37
-0
lines changed
+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
error[E0369]: binary operation `==` cannot be applied to type `for<'r> fn(&'r i32) -> &'r i32 {foo}`
2+
--> $DIR/issue-77910-1.rs:8:5
3+
|
4+
LL | assert_eq!(foo, y);
5+
| ^^^^^^^^^^^^^^^^^^^
6+
| |
7+
| for<'r> fn(&'r i32) -> &'r i32 {foo}
8+
| _
9+
|
10+
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
11+
12+
error[E0277]: `for<'r> fn(&'r i32) -> &'r i32 {foo}` doesn't implement `Debug`
13+
--> $DIR/issue-77910-1.rs:8:5
14+
|
15+
LL | assert_eq!(foo, y);
16+
| ^^^^^^^^^^^^^^^^^^^ `for<'r> fn(&'r i32) -> &'r i32 {foo}` cannot be formatted using `{:?}` because it doesn't implement `Debug`
17+
|
18+
= help: the trait `Debug` is not implemented for `for<'r> fn(&'r i32) -> &'r i32 {foo}`
19+
= note: required because of the requirements on the impl of `Debug` for `&for<'r> fn(&'r i32) -> &'r i32 {foo}`
20+
= note: required by `std::fmt::Debug::fmt`
21+
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
22+
23+
error: aborting due to 2 previous errors
24+
25+
Some errors have detailed explanations: E0277, E0369.
26+
For more information about an error, try `rustc --explain E0277`.
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
error[E0369]: binary operation `==` cannot be applied to type `for<'r> fn(&'r i32) -> &'r i32 {foo}`
2+
--> $DIR/issue-77910-2.rs:7:12
3+
|
4+
LL | if foo == y {}
5+
| --- ^^ - _
6+
| |
7+
| for<'r> fn(&'r i32) -> &'r i32 {foo}
8+
9+
error: aborting due to previous error
10+
11+
For more information about this error, try `rustc --explain E0369`.

0 commit comments

Comments
 (0)