-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Open
Labels
A-proc-macrosArea: Procedural macrosArea: Procedural macrosC-bugCategory: This is a bug.Category: This is a bug.I-prioritizeIssue: Indicates that prioritization has been requested for this issue.Issue: Indicates that prioritization has been requested for this issue.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Description
Reproducer
rustc a.rs --crate-type proc-macro --extern proc_macro
wherea.rs
:#[proc_macro] pub fn ck(x: proc_macro::TokenStream) -> proc_macro::TokenStream { _ = "---".parse::<proc_macro::TokenStream>(); x }
rustc b.rs --crate-type lib --extern a -L.
whereb.rs
:a::ck!();
In 1.87 and earlier, this used to compile just fine. However, since 1.88 (more precisely since PR #140035) this fails with:
error: invalid infostring for frontmatter
--> b.rs:1:1
|
1 | a::ck!();
| ^^^^^^^^
|
= note: frontmatter infostrings must be a single identifier immediately following the opening
= note: this error originates in the macro `a::ck` (in Nightly builds, run with -Z macro-backtrace for more info)
error: unclosed frontmatter
--> b.rs:1:1
|
1 | a::ck!();
| ^^^^^^^^
|
note: frontmatter opening here was not closed
--> b.rs:1:1
|
1 | a::ck!();
| ^^^^^^^^
= note: this error originates in the macro `a::ck` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: frontmatters are experimental
--> b.rs:1:1
|
1 | a::ck!();
| ^^^^^^^^
|
= note: see issue #136889 <https://github.com/rust-lang/rust/issues/136889> for more information
= note: this error originates in the macro `a::ck` (in Nightly builds, run with -Z macro-backtrace for more info)
Metadata
Metadata
Assignees
Labels
A-proc-macrosArea: Procedural macrosArea: Procedural macrosC-bugCategory: This is a bug.Category: This is a bug.I-prioritizeIssue: Indicates that prioritization has been requested for this issue.Issue: Indicates that prioritization has been requested for this issue.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.