Skip to content

Discuss Rkyv 0.8 migration#5

Draft
ThierryBerger wants to merge 2 commits into
rkyv:masterfrom
ThierryBerger:rkyv_0.8-discuss
Draft

Discuss Rkyv 0.8 migration#5
ThierryBerger wants to merge 2 commits into
rkyv:masterfrom
ThierryBerger:rkyv_0.8-discuss

Conversation

@ThierryBerger

Copy link
Copy Markdown

pull request linked to #4 ; only here to provide more code-backed discussion through macro expand.

<CustomPhantom<T> as ::rkyv::with::ArchiveWith<PhantomData<T>>>::resolve_with(
&self.phantom,
resolver.phantom,
field_out,

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line errors out with:

error[E0308]: mismatched types
   --> rkyv_wrappers/src/expanded.rs:33:17
    |
30  |             <CustomPhantom<T> as ::rkyv::with::ArchiveWith<PhantomData<T>>>::resolve_with(
    |             ----------------------------------------------------------------------------- arguments to this function are incorrect
...
33  |                 field_out,
    |                 ^^^^^^^^^ expected `Place<...>`, found `Place<PhantomData<T>>`
    |
    = note: expected struct `Place<<CustomPhantom<T> as ArchiveWith<PhantomData<T>>>::Archived>`
               found struct `Place<PhantomData<T>>`
    = help: consider constraining the associated type `<CustomPhantom<T> as ArchiveWith<PhantomData<T>>>::Archived` to `PhantomData<T>` or calling a method that returns `<CustomPhantom<T> as ArchiveWith<PhantomData<T>>>::Archived`
    = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
note: associated function defined here
   --> /home/tb/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rkyv-0.8.10/src/with.rs:114:8
    |
114 |     fn resolve_with(
    |        ^^^^^^^^^^^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant