about summary refs log tree commit diff
path: root/src/test/debuginfo/enum-thinlto.rs
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-11-22 19:57:41 +0100
committerGitHub <noreply@github.com>2019-11-22 19:57:41 +0100
commit8cba0a9073f740791c5d18148d649c61aaf7d6c7 (patch)
tree1906720783e10429ac031f9dab006757720840eb /src/test/debuginfo/enum-thinlto.rs
parent083b5a0a1bb3b2ee0873697ebf37e88d85faa3e5 (diff)
parent9a88364525a4660dbd6f6a371b3b25199f5bbe4a (diff)
downloadrust-8cba0a9073f740791c5d18148d649c61aaf7d6c7.tar.gz
rust-8cba0a9073f740791c5d18148d649c61aaf7d6c7.zip
Rollup merge of #66183 - Centril:empty-vis-trait-decl, r=petrochenkov
*Syntactically* permit visibilities on trait items & enum variants

Fixes #65041

Suppose we have `$vis trait_item` or `$vis enum_variant` and `$vis` is a `:vis` macro fragment. Before this PR, this would fail to parse. This is now instead allowed as per language team consensus in https://github.com/rust-lang/rust/issues/65041#issuecomment-538105286. (See added tests for elaboration.)

Moreover, we now also permit visibility modifiers on trait items & enum variants *syntactically* but reject them with semantic checks (in `ast_validation`):

```rust
#[cfg(FALSE)]
trait Foo { pub fn bar(); } // OK

#[cfg(FALSE)]
enum E { pub U } // OK
```
Diffstat (limited to 'src/test/debuginfo/enum-thinlto.rs')
0 files changed, 0 insertions, 0 deletions