Skip to content

Instantly share code, notes, and snippets.

@lqd

lqd/57362.txt Secret

Created January 17, 2019 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lqd/05ba014ec235aa02b6564e03cbd478c7 to your computer and use it in GitHub Desktop.
Save lqd/05ba014ec235aa02b6564e03cbd478c7 to your computer and use it in GitHub Desktop.
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