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
error[E0433]: failed to resolve: use of undeclared type or module `b`
--> src/main.rs:9:17
|
9 | #[derive(Debug, XmlSchema)]
| ^^^^^^^^^ use of undeclared type or module `b`
|
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0412]: cannot find type `b` in this scope
--> src/main.rs:9:17
|
9 | #[derive(Debug, XmlSchema)]
| ^^^^^^^^^
| |
| similarly named struct `B` defined here
| help: a struct with a similar name exists: `B`
error: expected identifier, found keyword `ref`
--> src/main.rs:9:17
|
9 | #[derive(Debug, XmlSchema)]
| ^^^^^^^^^ expected identifier, found keyword
|
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
help: you can escape reserved keywords to use them as identifiers
|
9 | #[derive(Debug, r#ref)]
| ^^^^^
error: expected type, found keyword `ref`
--> src/main.rs:9:17
|
9 | #[derive(Debug, XmlSchema)]
| ^^^^^^^^^ expected type
|
Maybe some kind of encoding would make sense here? By that I mean something similar to e.g. percent-encoding, but only yielding characters that are valid in Rust identifiers.
Another option could be to filter out the problematic characters, and disambiguate collisions by some other means such as placing them in separate modules.
Example 1:
Example 2:
Example 3:
The text was updated successfully, but these errors were encountered: