-
-
Save lqd/05ba014ec235aa02b6564e03cbd478c7 to your computer and use it in GitHub Desktop.
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
before: | |
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` | |
--------------- | |
after: | |
error: implementation of `Trait` is not general enough | |
--> src/main.rs:13:7 | |
| | |
13 | a.f(); | |
| ^ | |
| | |
= note: `fn(&u8)` must implement `Trait` | |
= note: but `for<'r> fn(&'r _)` only implements `Trait` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment