rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
99.01k stars 12.79k forks source link

rustc 1.83 lexing regression in the 2015 edition: 'r#x'y #133479

Open mattheww opened 3 days ago

mattheww commented 3 days ago

rustc 1.82 accepts forms like 'r#x'y in the 2015 edition, but rustc 1.83 (beta) rejects them.

As I understand it, #126452 wasn't intended to have any effect on the 2015 edition.

playground

macro_rules! lexes {($($_:tt)*) => {}}

fn main() {
    lexes!('r#x'y);
}

I think this is fallout from the beta-backport of #132341.

compiler-errors commented 3 days ago

I'm tempted to say that this is a purely theoretical regression, and we should perhaps fix it in 1.84 but it's possibly a bit too late for 1.83? Especially because I'm not certain how to prepare a fix for this other than perhaps reverting raw lifetime functionality altogether.

apiraino commented 3 days ago

WG-prioritization assigning priority (Zulip discussion).

@rustbot label -I-prioritize +P-medium