-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-bugCategory: This is a bug.Category: This is a bug.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.
Description
I don't know what to make of this error.
use std::fmt::Debug;
macro_rules! check {
($ty:ty, $expected:expr) => {
};
($ty_of:expr, $expected:expr) => {
};
}
fn main() {
check!(
<str as Debug>::fmt,
"foo",
);
}
Errors:
Compiling playground v0.0.1 (/playground)
error: expected identifier, found `,`
--> src/main.rs:14:16
|
14 | <str as Debug>::fmt,
| ^
| |
| expected identifier
| help: remove this comma
error: aborting due to previous error
error: Could not compile `playground`.
To learn more, run the command again with --verbose.
On stable (1.34) the output is
error: expected identifier, found `,`
--> src/main.rs:14:25
|
14 | <str as Debug>::fmt,
| ^
| |
| expected identifier
| help: remove this comma
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-bugCategory: This is a bug.Category: This is a bug.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.