Corrected EBNF grammar in the manual#14277
Conversation
There was a problem hiding this comment.
Um… what? These changes would make use; valid, which it is certainly not. A use statement must be followed by an identifier.
The grammar already existing appears to me to be correct.
There was a problem hiding this comment.
I take back what I said about the grammar existing being correct—I’ve been reading other grammar rules too much recently (the IETF RFC ones in particular) and was thinking […] meant optional. There is a problem with the current grammar, but the new one is wrong also. I think that just tacking a question mark after the OK, OK, that responsibility got shifted to the ] on the existing grammar would be correct?path_glob rule… not doing well today, am I?
There was a problem hiding this comment.
My line of thought is that a single identifier is also a path. path_glob can match multiple paths.
// Valid declarations
use ident = simple::path;
use simple::path;
use {many, idents}; // doesn't start with an ident!
// Invalid
use simple::path = another::path;
use *;
use;|
I think @chris-morgan is right about the |
The grammar for use declarations was outdated.
|
Alright, it's done. |
The grammar for use declarations was outdated. Corrected some other mistakes.
…ang#14279) fixes rust-lang#14277 changelog: [`incompatible_msrv`]: add config option [`check-incompatible-msrv-in-tests`] to enable in `#[test]` and `#[cfg(test)]` code.
The grammar for use declarations was outdated. Corrected some other mistakes.