-
-
Save lqd/a9a8f8c173735299e75c4804b764c20c to your computer and use it in GitHub Desktop.
WIP PR for issue https://github.com/rust-lang/rust/issues/57362 and part of https://github.com/rust-lang/rust/issues/57642 : error message diffs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
error[E0308]: mismatched types | |
--> src/main.rs:13:7 | |
| | |
13 | a.f(); | |
| ^ one type is more general than the other | |
| | |
- = note: expected type `Trait` | |
- found type `Trait` | |
+ = note: expected trait `Trait` to be implemented for `fn(&u8)` | |
+ found trait `Trait` implemented for `for<'r> fn(&'r _)` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
error[E0308]: mismatched types | |
--> src/lib.rs:31:13 | |
| | |
31 | let x = <fn (&())>::make_g(); | |
| ^^^^^^^^^^^^^^^^^^ one type is more general than the other | |
| | |
- = note: expected type `X` | |
- found type `X` | |
+ = note: expected trait `X` to be implemented for `for<'r> fn(&'r ())` | |
+ found trait `X` implemented for `fn(&())` | |
error[E0308]: mismatched types | |
--> src/lib.rs:36:13 | |
| | |
36 | let x = <fn (&())>::make_f(); | |
| ^^^^^^^^^^^^^^^^^^ one type is more general than the other | |
| | |
- = note: expected type `Y` | |
- found type `Y` | |
+ = note: expected trait `Y` to be implemented for `for<'r> fn(&'r ())` | |
+ found trait `Y` implemented for `fn(_)` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LL | foo(()); | |
| ^^^ one type is more general than the other | |
| | |
- = note: expected type `Mirror` | |
- found type `Mirror` | |
+ = note: expected trait `Mirror` to be implemented for `&'a _` | |
+ found trait `Mirror` implemented for `_` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment