I tried this code:
fn main() {
fn f(_: &mut ()) {}
let x: fn(&mut ()) = f;
let y: fn(&mut ()) = f;
y == x;
}
I expected to see this happen: Successful compile.
Instead, this happened:
error[E0369]: binary operation `==` cannot be applied to type `for<'r> fn(&'r mut ())`
--> src/main.rs:94:7
|
94 | y == x;
| - ^^ - for<'r> fn(&'r mut ())
| |
| for<'r> fn(&'r mut ())
error: aborting due to previous error
For more information about this error, try `rustc --explain E0369`.
error: could not compile `executor`.
To learn more, run the command again with --verbose.
Meta
rustc --version --verbose:
rustc 1.46.0-nightly (6bb3dbfc6 2020-06-22)
I tried this code:
I expected to see this happen: Successful compile.
Instead, this happened:
Meta
rustc --version --verbose: