-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Closed
Labels
A-decl-macros-2-0Area: Declarative macros 2.0 (#39412)Area: Declarative macros 2.0 (#39412)A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.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.WG-diagnosticsWorking group: DiagnosticsWorking group: Diagnostics
Description
Ideally the `$` must be followed by an ident or `$` in `quote!`
error message would not look like an ICE.
#![feature(proc_macro)]
extern crate proc_macro;
use proc_macro::{quote, TokenStream};
#[proc_macro]
pub fn p(input: TokenStream) -> TokenStream {
quote! {
$()*
}
}
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: rustc 1.25.0-nightly (b5392f545 2018-01-08) running on x86_64-unknown-linux-gnu
thread 'rustc' panicked at '`$` must be followed by an ident or `$` in `quote!`', libproc_macro/quote.rs:105:26
goodmanjonathan and estebank
Metadata
Metadata
Assignees
Labels
A-decl-macros-2-0Area: Declarative macros 2.0 (#39412)Area: Declarative macros 2.0 (#39412)A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.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.WG-diagnosticsWorking group: DiagnosticsWorking group: Diagnostics