Closed Moxinilian closed 3 years ago
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.
I recall trying this but it still not building on latest Rust at the time. Unfortunately I don't have this project anymore to check this.
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.