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
Inter-struct is designed to work in this environment:
89
131
90
132
- In the scope of a single crate. Cross-crate usage won't work.
91
133
- In the main `src` folder of the crate. Integration tests and examples aren't supported.
92
134
93
-
Depending on your crate's structure, the module resolution might not work as expected.
94
-
As we're creating safe and valid Rust code the compiler will thrown an error if any problems arise.
135
+
The main problems in this crate come from the fact that there's no official way to resolve modules or types in the the procedural macro stage.
136
+
137
+
Due to this limitation, inter-struct isn't capable of ensuring the equality of two types.
138
+
As a result, it might create false negative compile errors, even though the types might be compatible.
139
+
This might happen if, for instance, types are obscured via an alias or if a type can be automatically dereferenced into another type.
140
+
141
+
However, as we're creating safe and valid Rust code, the compiler will thrown an error if any type problems arise.
95
142
96
-
Limitations in type resolution might also lead to wrong code generation for types that are obscured by type aliases, but the compiler should still throw errors in those cases.
97
143
98
144
#### Not yet solved problems
99
145
@@ -113,9 +159,9 @@ These are problems that can probably be solved but they're non-trivial.
113
159
#### Unsolvable problems
114
160
115
161
These are problems that are either impossible to solve or very infeasible.
116
-
For instance, something infeasible would be to parse all files and to do a full type resolution of a given crate.
117
-
That would be a job for the compiler in later stages.
162
+
For instance, something infeasible would be to parse all files for a full type resolution of a given crate.
163
+
That would be a job for the compiler in a later stage.
118
164
119
165
- Structs that are altered or generated by other macros.
120
-
- Type aliases. E.g. `type test = Option<String>` won't be detected as an Option.
121
-
The current check for `Option` fields is a literal check for the `Option` token.
166
+
- Type comparison and type resolution. E.g. `type test = Option<String>` won't be detected as optional.
167
+
The current type checks are literal comparisons of the type tokens.
0 commit comments