-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
regression: c"..." are experimental #113235
Comments
The following reproducer compiles successfully on stable in editions 2015 and 2018 but fails to compile on beta and nightly while it should remain valid: macro_rules! m { (c$e:expr) => {}; }
fn main() { m!(c"hello"); } stderr
@rustbot label S-has-mcve |
This would be easy to fix if we had access to the edition in |
Assigning P-medium since this is only a warning, and only valid for older editions of Rust. @rustbot label -I-prioritize +P-medium |
@hameerabbasi It's not a warning but a hard error. noc7c9/pyfection no longer compiles due to this bug. rustc lexes the crate differently than before. |
@fmease Do you recommend |
I guess the priority is fine, I just wanted to set the record straight :) |
Without doing a bisection, I can tell you that this regressed in #108801 (regressed in: 8ff3903, still a regression after refactoring commit: a49570f) when @rustbot label -E-needs-bisection |
Let's at least revert the lexer changes until @fee1-dead or someone else can fix this in a way that's compatible with the pre-2021 editions @fmease, do you want to do that, or shall I? |
Just reverting the lexer change & keeping everything else related to @rustbot claim |
To be clear, all the existing cstring tests would break, so you'll have to mark some of the tests as |
Slightly unrelated, but I've noticed that the GitHub label should be renamed from F-c_str_literal to F-c_str_literals and its description needs to be updated, too (see https://github.com/rust-lang/rust/blob/master/compiler/rustc_feature/src/active.rs for the source of truth). |
…=compiler-errors Revert the lexing of `c"…"` string literals Fixes \[after beta-backport\] rust-lang#113235. Further progress is tracked in rust-lang#113333. This PR *manually* reverts parts of rust-lang#108801 (since a git-revert would've been too coarse-grained & messy) and git-reverts rust-lang#111647. CC `@fee1-dead` (rust-lang#108801) `@klensy` (rust-lang#111647) r? `@compiler-errors` `@rustbot` label F-c_str_literals beta-nominated
This is now fixed on beta and can be closed, right? |
Correct, we have an issue tracking reimplementation at #113333 |
Not clear to me whether this is expected -- I don't see much in the way of commentary on the RFC, and I thought we had reserved these literals previously, but perhaps that reservation was incomplete?
https://crater-reports.s3.amazonaws.com/beta-1.71-4/beta-2023-06-25/gh/noc7c9.pyfection/log.txt
The text was updated successfully, but these errors were encountered: