rust-lang / rust-lang/fls

Inconsistency in description of string literals

Open
#532 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-lexer C-enhancement
Dominant language
reStructuredText
Stars
497
Forks
41
Avg merge
3h 52m
Merged PRs (30d)
4

Description

In the description of various string literals (on lexical-elements.rst):

  • RawByteStringContent is specified as taking arbitrary AsciiCharacters. This isn't true - 0x0D (CR) is still rejected, and AsciiCharacter is specified as "any Unicode character in the range 0x00 - 0x7F, both inclusive", without specifically excluding 0x0D. Note that SimpleByteStringLiteral is defined instead in terms of SimpleByteStringCharacter, which is specified to be AsciiCharacter minus 0x0D, 0x22, and 0x5C.
  • RawCStringContent is specified as taking any characters except 0x0D (CR) (" ~[\r]* "), but raw C string literals also can't contain 0x00 (NUL).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/lexical-elements.rst and compare the definitions of RawByteStringContent, SimpleByteStringCharacter, and RawCStringContent. Verify the documented exclusions for carriage return and NUL against the issue, then update the descriptions so they match the stated literal restrictions.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.