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
While trying to instantiate an Input component with a custom type, as the struct uses a field name type that conflicts with the Rust reserved type keyword, the macro gets confused and refuses to build. I might be misusing it here, but I can't find a way around it beyond renaming it in the props struct.
The text was updated successfully, but these errors were encountered:
Moxinilian
changed the title
Impossible to instanciate ybc::Input as type is a prohibited identifier
Impossible to instantiate ybc::Input as type is a prohibited identifier
Apr 12, 2021
Hello there. In Rust, the way you deal with that is as follows: r#type. This allows you to use any identifier, even those reserved for language purposes.
While trying to instantiate an Input component with a custom type, as the struct uses a field name
type
that conflicts with the Rust reserved type keyword, the macro gets confused and refuses to build. I might be misusing it here, but I can't find a way around it beyond renaming it in the props struct.The text was updated successfully, but these errors were encountered: