-
Notifications
You must be signed in to change notification settings - Fork 498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upper bound on hashes in raw string literals #1180
Conversation
Has this been decided upon by the lang team, or is this just what it currently is in rustc? |
I started a conversation at https://rust-lang.zulipchat.com/#narrow/stream/237824-t-lang.2Fdoc/topic/Max.20raw.20string.20delimiters/near/275921936, which contains some links to the history here. I don't think this change can be made easily, as we'll probably need to go through some process to decide on an appropriate limit (and to decide how to apply limits to the language in general). And, BTW, this change just modifies the set of examples. I don't think those are proper definitions. If we do decide to go forward with something like this, the lexer definition and text describing the format will need to be updated. |
This PR now complies with the recently merged rust-lang/rust#95251. I'm not sure what the protocol is here - perhaps this PR should wait until the other makes it into stable? |
The reference follows the same train as the compiler. So anything that is merged as stable on the compiler can be documented in the reference repository and it'll show up in the stable docs at the same time. I want to merge this, but @ehuss 's last paragraph still needs to be resolved.
|
For the formal definitions, both instances of It might be a good idea to also mention the consequence of the upper limit, namely that |
I'm nominating this for lang design team (T-lang) discussion so that we can figure out if we want include this as part of the reference spec (or if we want to encode the limit in some other way. E.g., maybe "implementation defined limit on the number of octothorpes in a raw-string literal") See also relevant context here: rust-lang/rust#50296 (comment) and also zulip discussion here: https://rust-lang.zulipchat.com/#narrow/stream/237824-t-lang.2Fdoc/topic/Max.20raw.20string.20delimiters/near/275921936 |
Discussed in T-lang triage meeting. General agreement that we prefer a concrete statement "raw strings can have between [0,255] hashmarks", rather than referencing some sort of "implementation-defined bound that must be >= 255". So, now I'll merge this. |
Update books ## reference 6 commits in 8e36971959ff238b5aa2575fbc7a2e09e1313e82..b74825d8f88b685e239ade00f00de68ba4cd63d4 2022-05-09 17:20:59 -0700 to 2022-05-20 14:30:30 -0700 - Inline assembly: Clarify references to quoted regs (rust-lang/reference#1191) - Add tile registers to inline-assembly documentation (rust-lang/reference#1220) - Upper bound on hashes in raw string literals (rust-lang/reference#1180) - Remove footnote on warning about lifetime shadowing labels. - Makes explanation for Spans in "Procedural Macros" clearer (rust-lang/reference#1219) - Update "Match Expressions" to remove 'cold' (rust-lang/reference#1216) ## book 18 commits in d9415b7cbfcb4b24062683f429bd0ff535396362..b4dd5f00b87190ad5ef42cbc2a88a783c6ae57ef 2022-05-09 09:10:44 -0400 to 2022-05-24 21:37:06 -0400 - Snapshot of appendices for nostarch - Update rust-analyzer URLs and make links less repetitive - Correct byte string literal type. Fixes rust-lang/book#2631. - Fix verb agreement. Fixes rust-lang/book#3176 - Propagate ch19 edits to src - Edits to chapter 19 from nostarch - Propagate ch18 edits to src - Edits to ch18 from nostarch - Propagate tech review edits to src ch5 - Responses to chapter 5 tech review - Ch5 after tech review - Merge branch 'ch7-edits' - fix: mdBook authors - Propagating ch17 edits to src - Edits from nostarch for ch17 - Fix rust-lang/book#3152 - Wrong character used - & is not valid inside image alt text - Merge branch 'ch20' ## rust-by-example 2 commits in e9f93cfcf410bc092c9107b8a41a82f144c761f2..2ed26865e8c29ef939dc913a97bd321cadd72a9a 2022-05-08 18:24:06 -0300 to 2022-05-18 17:23:47 -0300 - Rework cpuid asm example. (rust-lang/rust-by-example#1542) - chore: better description for eprint macro (rust-lang/rust-by-example#1541) ## rustc-dev-guide 11 commits in 0c02acd..554c00e 2022-05-10 09:45:31 -0300 to 2022-05-24 17:15:35 -0700 - Cleanup rustdoc-internals - Fix some wording on the "Incremental Compilation In Detail" page - Exclude `tomlee.co` from link-checking (rust-lang/rustc-dev-guide#1356) - Add note about patching dependencies and warnings. (rust-lang/rustc-dev-guide#1354) - make sentence more simple (rust-lang/rustc-dev-guide#1353) - Update some links and docs (rust-lang/rustc-dev-guide#1340) - Replace a broken YouTube link (rust-lang/rustc-dev-guide#1295) - Edit the "Compiler Source Code" chapter (rust-lang/rustc-dev-guide#1307) - Add docs for logging of queries. (rust-lang/rustc-dev-guide#1350) - Fix configuration names for vscode/r-a (rust-lang/rustc-dev-guide#1352) - Update docs for deprecated attribute (rust-lang/rustc-dev-guide#1338)
No description provided.