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
use std::marker::PhantomData;use yew::prelude::*;#[derive(PartialEq,Eq)]structGeneric<T>(PhantomData<T>);// This works fine.#[derive(Properties,PartialEq,Eq)]structProperties1{gen:Generic<Properties1>,}// This doesn't work, even though it's equivalent.#[derive(Properties,PartialEq,Eq)]structProperties2{gen:Generic<Self>,}
Steps To Reproduce
Steps to reproduce the behavior:
Compile above code without Properties2.
Observe that it compiles.
Run above code with Properties2.
Observe that it does not compile.
Expected behavior
The code with Properties2 should compile as it is equivalent to the first one. Probably the problem lies in the Self keyword being misunderstood as the fields are put into a different struct.
Environment:
Yew version: v0.21
Rust version: 1.74.1
The text was updated successfully, but these errors were encountered:
Problem
Example code should explain the problem:
Steps To Reproduce
Steps to reproduce the behavior:
Properties2
.Properties2
.Expected behavior
The code with
Properties2
should compile as it is equivalent to the first one. Probably the problem lies in theSelf
keyword being misunderstood as the fields are put into a different struct.Environment:
The text was updated successfully, but these errors were encountered: