json-ld
json-ld copied to clipboard
Resolve ambiguity introduced in rustc nightly 7c4b47696 2022-04-30
Resolves #40
Thanks to @ashbeitz for the suggested fix.
This is noisy, but necessary to resolve the following error:
error[E0221]: ambiguous associated type `MetaData` in bounds of `K`
--> src/indexed.rs:142:72
|
142 | fn as_json_with(&self, meta: impl Clone + Fn(Option<&J::MetaData>) -> K::MetaData) -> K {
| ^^^^^^^^^^^ ambiguous associated type `MetaData`
|
= note: associated type `K` could derive from `generic_json::Json`
= note: associated type `K` could derive from `generic_json::Json`
If this is a bug in the compiler, undoing this is simply applying s/<K as generic_json::Json>/K/g and possibly undoing a handful of intentional casts that get caught in the blast. If this is a bug in json-ld, this PR can be ignored and the bug can be resolved another way.
Thank you