Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ThierryBerger
Copy link
Contributor

Following discord's discussion: https://discordapp.com/channels/822925794249539645/1356558336752877679/1357009874730356747

Transcript

taintegral:

With a macro expansion, it looks like this is caused by the use of type alises in trait impls. This impl triggers the lint:

impl<
    __D: ::rkyv::rancor::Fallible + ?Sized,
    T,
    const R: usize,
    const C: usize,
> ::rkyv::Deserialize<Matrix<T, R, C>, __D> for ::rkyv::Archived<Matrix<T, R, C>>

but this one doesn't

impl<
    __D: ::rkyv::rancor::Fallible + ?Sized,
    T,
    const R: usize,
    const C: usize,
> ::rkyv::Deserialize<Matrix<T, R, C>, __D> for ArchivedMatrix<T, R, C>

(note the exchange of ::rkyv::Archived<Matrix<T, R, C>> for ArchivedMatrix<T, R, C>)

I thought we got rid of all of the uses of type alises in trait impls, but I guess I imagined that. If you want to do that change, I'd be happy to review/merge.


TL;DR

Deserialize macro fails at surprising setups, due to type alias being used.

Current status

See comments

Comment on lines +633 to 634
// Self should be handled specifically (we can't `impl ... for Self`)
#[rkyv(crate, as = Self)]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is failing, I'm not sure how to handle that special case.

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