-
-
-
Unfortunately, not exactly. Macros are expanded in-place, so there's no way to add code outside of where the macro itself is written, and rust has no syntax to declare new types within type syntax. The closest you can get is probably something like this: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=5d9c57899f2512cac6232ad02e65180b …
Kraj razgovora
Novi razgovor -
-
-
Closest I could get: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=79128e73d3e747e632950931dae27b72 … The problem with your proposed syntax for the macro is that types can't be declared in a Type expression (i.e. the right hand side of a type alias expression). (Unless there's some hack idk of to hoist a type from within a proc_macro)
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.