Skip to content
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

Tracking Issue for RFC 3593: Reserve unprefixed guarded string literals in Edition 2024 #123735

Closed
6 of 7 tasks
traviscross opened this issue Apr 10, 2024 · 2 comments
Closed
6 of 7 tasks
Assignees
Labels
A-edition-2024 Area: The 2024 edition B-RFC-approved Blocker: Approved by a merged RFC but not yet implemented. C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC F-unprefixed_guarded_strings `#![feature(unprefixed_guarded_strings)]` S-tracking-ready-for-edition Status: This issue is ready for inclusion in the edition. T-lang Relevant to the language team, which will review and decide on the PR/issue.

Comments

@traviscross
Copy link
Contributor

traviscross commented Apr 10, 2024

This is a tracking issue for the RFC 3593: Reserve unprefixed guarded string literals in Edition 2024.

The feature gate for the issue is #![feature(unprefixed_guarded_strings)].

About tracking issues

Tracking issues are used to record the overall progress of implementation. They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions. A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature. Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.

Steps

Unresolved Questions

None.

Implementation history

cc @pitaj

@traviscross traviscross added C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-lang Relevant to the language team, which will review and decide on the PR/issue. A-maybe-future-edition Something we may consider for a future edition. A-edition-2024 Area: The 2024 edition labels Apr 10, 2024
@traviscross traviscross removed the A-maybe-future-edition Something we may consider for a future edition. label Apr 10, 2024
@pitaj pitaj self-assigned this Apr 11, 2024
@traviscross traviscross added the F-unprefixed_guarded_strings `#![feature(unprefixed_guarded_strings)]` label Apr 15, 2024
@traviscross traviscross added the B-RFC-approved Blocker: Approved by a merged RFC but not yet implemented. label May 6, 2024
bors added a commit to rust-lang-ci/rust that referenced this issue May 14, 2024
Experiment: Reserve guarded string literal syntax (RFC 3593) on all editions

Purpose: crater run to see if we even need to make this change on an edition boundary.

This syntax change applies to all editions, because the particular syntax `#"foo"#` is unlikely to exist in the wild.

Subset of rust-lang#123951

Tracking issue: rust-lang#123735
RFC: rust-lang/rfcs#3593
@traviscross traviscross added S-tracking-impl-incomplete Status: The implementation is incomplete. S-tracking-needs-migration-lint Status: This item needs a migration lint. S-tracking-needs-documentation Status: Needs documentation. and removed S-tracking-needs-migration-lint Status: This item needs a migration lint. labels May 21, 2024
bors added a commit to rust-lang-ci/rust that referenced this issue Oct 9, 2024
…viscross

Reserve guarded string literals (RFC 3593)

Implementation for RFC 3593, including:
- lexer / parser changes
- diagnostics
- migration lint
- tests

We reserve `#"`, `##"`, `###"`, `####`, and any other string of four or more repeated `#`. This avoids infinite lookahead in the lexer, though we still use infinite lookahead in the parser to provide better forward compatibility diagnostics.

This PR does not implement any special lexing of the string internals:
- strings preceded by one or more `#` are denied
- regardless of the number of trailing `#`
- string contents are lexed as if it was just a bare `"string"`

Tracking issue: rust-lang#123735
RFC: rust-lang/rfcs#3593
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Oct 9, 2024
…raviscross

Reserve guarded string literals (RFC 3593)

Implementation for RFC 3593, including:
- lexer / parser changes
- diagnostics
- migration lint
- tests

We reserve `#"`, `##"`, `###"`, `####`, and any other string of four or more repeated `#`. This avoids infinite lookahead in the lexer, though we still use infinite lookahead in the parser to provide better forward compatibility diagnostics.

This PR does not implement any special lexing of the string internals:
- strings preceded by one or more `#` are denied
- regardless of the number of trailing `#`
- string contents are lexed as if it was just a bare `"string"`

Tracking issue: rust-lang#123735
RFC: rust-lang/rfcs#3593
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Oct 10, 2024
Rollup merge of rust-lang#123951 - pitaj:reserve-guarded-strings, r=traviscross

Reserve guarded string literals (RFC 3593)

Implementation for RFC 3593, including:
- lexer / parser changes
- diagnostics
- migration lint
- tests

We reserve `#"`, `##"`, `###"`, `####`, and any other string of four or more repeated `#`. This avoids infinite lookahead in the lexer, though we still use infinite lookahead in the parser to provide better forward compatibility diagnostics.

This PR does not implement any special lexing of the string internals:
- strings preceded by one or more `#` are denied
- regardless of the number of trailing `#`
- string contents are lexed as if it was just a bare `"string"`

Tracking issue: rust-lang#123735
RFC: rust-lang/rfcs#3593
@traviscross traviscross removed the S-tracking-impl-incomplete Status: The implementation is incomplete. label Oct 11, 2024
@ehuss
Copy link
Contributor

ehuss commented Oct 12, 2024

Posted documentation at rust-lang/edition-guide#326 and rust-lang/reference#1652.

@traviscross traviscross removed the S-tracking-needs-documentation Status: Needs documentation. label Oct 22, 2024
@traviscross
Copy link
Contributor Author

@rustbot labels +S-tracking-ready-for-edition

We reviewed this in our edition call today, and this is ready for Rust 2024.

Thanks to @pitaj for pushing forward on this, and thanks to @ehuss for the documentation here.

@rustbot rustbot added the S-tracking-ready-for-edition Status: This issue is ready for inclusion in the edition. label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-edition-2024 Area: The 2024 edition B-RFC-approved Blocker: Approved by a merged RFC but not yet implemented. C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC F-unprefixed_guarded_strings `#![feature(unprefixed_guarded_strings)]` S-tracking-ready-for-edition Status: This issue is ready for inclusion in the edition. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
Status: Idea
Development

No branches or pull requests

4 participants