Fix null exclusions in grammar docs#50791
Conversation
The grammar documentation incorrectly says that comments, character literals, and string literals may not include null.
|
(rust_highfive has picked a reviewer for you, use r? to override) |
|
Wait, can they? Can files processed by the compiler have inline null characters? I wouldn't be surprised if they could, but "inline nulls" is something that tends to break a lot of things. |
|
@QuietMisdreavus I've tested this locally and the compiler happily accepts nulls in comments, char literals, and string literals. Whether or not this is intentional is another question, but in this day and age if a tool chokes on nulls I think that ought to be considered a bug in that tool. :) |
|
Works for me, thanks! @bors r+ rollup |
|
📌 Commit ab4735e has been approved by |
|
@bstrie Could you check if the grammar at https://github.com/rust-lang-nursery/reference is also correct? (tracking issue over there: rust-lang/reference#84). (I think this document is actually unmaintained and we'll eventually switch to rust-lang-nursery/reference) |
Fix null exclusions in grammar docs The grammar documentation incorrectly says that comments, character literals, and string literals may not include null.
Rollup of 10 pull requests Successful merges: - #50387 (Remove leftover tab in libtest outputs) - #50553 (Add Option::xor method) - #50610 (Improve format string errors) - #50649 (Tweak `nearest_common_ancestor()`.) - #50790 (Fix grammar documentation wrt Unicode identifiers) - #50791 (Fix null exclusions in grammar docs) - #50806 (Add `bless` x.py subcommand for easy ui test replacement) - #50818 (Speed up `opt_normalize_projection_type`) - #50837 (Revert #49767) - #50839 (Make sure people know the book is free oline) Failed merges:
The grammar documentation incorrectly says that comments, character literals,
and string literals may not include null.