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
The grammar describes the syntax of the language, which corresponds to how it is parsed into an AST. This is significant because macros work with the AST. Semantic validation is done later, such as validating the self type. In this example, a macro could accept any type in that position, and that would be valid Rust, such as:
I'm going to close this, as the grammar is defined as intended. The reference could definitely make this a little clearer, and I opened #916 to track that.
The section on methods states this grammar:
and then elaborates that [Type] is limited to the following..
My thoughts... Why use, the nonterminal, Type in the rule of TypedSelf? It is clear that only a small subset of Type is allowed here. Suggestion...
then in the example there is this
which was not mentioned in the grammar nor is accepted syntax. Should be removed?
The text was updated successfully, but these errors were encountered: