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
e66a39bb65eb4a7fb1813993e10fc1af5bdac9bc
rust/src/test/ui/parser/duplicate-visibility.rs

8 lines
140 B
Rust
Raw Normal View History

parser: unify item list parsing. as a consequence, `trait X { #![attr] }` becomes legal.
2020-01-31 06:43:33 +01:00
fn main() {}
libsyntax: refactor the parser to consider foreign items as items parse_item_or_view_item() would drop visibility if none of the conditions following it would hold. This was the case when parsing extern {} blocks, where the function was only used to parse view items, but discarded the visibility of the first not-view item.
2012-10-09 11:59:03 +02:00
extern {
pub pub fn foo();
parser: tweak unmatched wording
2020-02-23 04:49:26 +01:00
//~^ ERROR visibility `pub` not followed by an item
parse: use `parse_item_common` in `parse_foreign_item`.
2020-02-22 06:57:31 +01:00
//~| ERROR non-item in item list
libsyntax: refactor the parser to consider foreign items as items parse_item_or_view_item() would drop visibility if none of the conditions following it would hold. This was the case when parsing extern {} blocks, where the function was only used to parse view items, but discarded the visibility of the first not-view item.
2012-10-09 11:59:03 +02:00
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 2928ms Template: 2ms
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