fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.2 KiB28 linesraw
1error[E0369]: binary operation `==` cannot be applied to type `for<'a> fn(&'a i32) -> &'a i32 {foo}`
2  --> $DIR/issue-77910-1.rs:8:5
3   |
4LL |     assert_eq!(foo, y);
5   |     ^^^^^^^^^^^^^^^^^^
6   |     |
7   |     for<'a> fn(&'a i32) -> &'a i32 {foo}
8   |     _
9   |
10   = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
11
12error[E0277]: `for<'a> fn(&'a i32) -> &'a i32 {foo}` doesn't implement `Debug`
13  --> $DIR/issue-77910-1.rs:8:5
14   |
15LL | fn foo(s: &i32) -> &i32 {
16   |    --- consider calling this function
17...
18LL |     assert_eq!(foo, y);
19   |     ^^^^^^^^^^^^^^^^^^ `for<'a> fn(&'a i32) -> &'a i32 {foo}` cannot be formatted using `{:?}` because it doesn't implement `Debug`
20   |
21   = help: the trait `Debug` is not implemented for fn item `for<'a> fn(&'a i32) -> &'a i32 {foo}`
22   = help: use parentheses to call this function: `foo(/* &i32 */)`
23   = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
24
25error: aborting due to 2 previous errors
26
27Some errors have detailed explanations: E0277, E0369.
28For more information about an error, try `rustc --explain E0277`.