Open
Description
Between nightly-2020-02-28 and nightly-2020-02-29 I observed that macro errors which used to point to a specific problematic identifier token now point equivocally to the entire macro invocation. See dtolnay/tt-call@364468e.
The issue minimizes to:
macro_rules! nothing_expected {
() => {};
}
macro_rules! repro {
($ident:ident) => {
nothing_expected!($ident);
};
}
repro!(T);
Before; points to T
:
error: no rules expected the token `T`
--> src/main.rs:11:8
|
1 | macro_rules! nothing_expected {
| ----------------------------- when calling this macro
...
11 | repro!(T);
| ^ no rules expected this token in macro call
After; does not point to T
:
error: no rules expected the token `T`
--> src/main.rs:7:27
|
1 | macro_rules! nothing_expected {
| ----------------------------- when calling this macro
...
7 | nothing_expected!($ident);
| ^^^^^^ no rules expected this token in macro call
...
11 | repro!(T);
| ---------- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
The applicable commit range is 6d69cab...0eb878d.
The most relevant looking PR in that range is #69384. @petrochenkov @Centril
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Category: An issue proposing an enhancement or a PR with one.Medium priorityRelevant to the compiler team, which will review and decide on the PR/issue.Performance or correctness regression from one stable version to another.