You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building/testing v0.6.0 (7df142c), I get errors like this:
error[E0311]: the associated type `<K as generic_json::Json>::Array` may not live long enough
--> src/util/json/build.rs:118:53
|
118 | impl<J: JsonClone, K: JsonFrom<J>, T: AsJson<J, K>> AsJson<J, K> for [T] {
| ^^^^^^^^^^^^
|
= help: consider adding an explicit lifetime bound `<K as generic_json::Json>::Array: 'a`...
= note: ...so that the type `<K as generic_json::Json>::Array` will meet its required lifetime bounds...
note: ...that is required by this bound
--> src/util/json/build.rs:13:35
|
13 | pub trait AsJson<J: JsonClone, K: JsonFrom<J>> {
| ^^^^^^^^^^^
cargo 1.60.0-nightly (95bb3c92b 2022-01-18)
The text was updated successfully, but these errors were encountered:
This looks like a compiler bug to me. The lifetime is inconsistently required depending on where the HRTB (comming from the JsonMut trait alias used in JsonFrom) is placed. I've opened an issue.
In the meantime, I think I can get around the issue just by removing the JsonFrom bound from the AsJson trait definition. I hope.
When building/testing v0.6.0 (7df142c), I get errors like this:
cargo 1.60.0-nightly (95bb3c92b 2022-01-18)
The text was updated successfully, but these errors were encountered: