Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
2fcea9fb68c8e04f10e5cb15bbfb486de9800afa
rust/tests/ui/parser/attribute/attr-bad-meta-4.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
311 B
Rust
Raw Normal View History

Rewrite `parse_meta_item`. It can't use `maybe_whole`, but it can match `maybe_whole` more closely. Also add a test for a case that wasn't previously covered.
2024-03-20 06:47:59 +11:00
macro_rules! mac {
($attr_item: meta) => {
#[cfg($attr_item)]
Remove `NtMeta`. Note: there was an existing code path involving `Interpolated` in `MetaItem::from_tokens` that was dead. This commit transfers that to the new form, but puts an `unreachable!` call inside it.
2024-04-18 16:22:02 +10:00
//~^ ERROR expected unsuffixed literal, found `meta` metavariable
Rewrite `parse_meta_item`. It can't use `maybe_whole`, but it can match `maybe_whole` more closely. Also add a test for a case that wasn't previously covered.
2024-03-20 06:47:59 +11:00
struct S;
}
}
mac!(an(arbitrary token stream));
Fix parse error message for meta items
2024-05-06 01:25:49 +02:00
#[cfg(feature = -1)]
//~^ ERROR expected unsuffixed literal, found `-`
fn handler() {}
Rewrite `parse_meta_item`. It can't use `maybe_whole`, but it can match `maybe_whole` more closely. Also add a test for a case that wasn't previously covered.
2024-03-20 06:47:59 +11:00
fn main() {}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 507ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API