Skip to content

Instantly share code, notes, and snippets.

@lqd
Last active October 23, 2019 11:03
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/a91a6ef849f87f9a4b713b7958387372 to your computer and use it in GitHub Desktop.
Save lqd/a91a6ef849f87f9a4b713b7958387372 to your computer and use it in GitHub Desktop.
error: implementation of `X` is not general enough
--> $DIR/issue-57362-2.rs:22:13
|
8 | / trait X {
9 | | type G;
10 | | fn make_g() -> Self::G;
| | ----------------------- due to a where-clause on `X::make_g`...
11 | | }
| |_- trait `X` defined here
...
22 | let x = <fn (&())>::make_g();
| ^^^^^^^^^^^^^^^^^^ doesn't satisfy where-clause
|
= note: ...`X` would have to be implemented for the type `for<'r> fn(&'r ())`
= note: ...but `X` is actually implemented for the type `fn(&'0 ())`, for some specific lifetime `'0`
error: aborting due to 2 previous errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment