diff options
| author | Steven Fackler <sfackler@gmail.com> | 2014-11-15 17:57:54 -0800 |
|---|---|---|
| committer | Steven Fackler <sfackler@gmail.com> | 2014-11-15 18:15:27 -0800 |
| commit | 579c65da1babbcfa5f3fd1cb5a1062acbe5b61eb (patch) | |
| tree | 16a6ebca56dbed85cfe040b99642ae1b3a7a72d6 /src/test/compile-fail/struct-variant-no-pub.rs | |
| parent | 7e43f419cb98c9035d30e5cf0e0be7944dbc0371 (diff) | |
| download | rust-579c65da1babbcfa5f3fd1cb5a1062acbe5b61eb.tar.gz rust-579c65da1babbcfa5f3fd1cb5a1062acbe5b61eb.zip | |
Un-feature gate struct variants
Struct variant field visibility is now inherited. Remove `pub` keywords from declarations. Closes #18641 [breaking-change]
Diffstat (limited to 'src/test/compile-fail/struct-variant-no-pub.rs')
| -rw-r--r-- | src/test/compile-fail/struct-variant-no-pub.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/compile-fail/struct-variant-no-pub.rs b/src/test/compile-fail/struct-variant-no-pub.rs new file mode 100644 index 00000000000..15ed69083e0 --- /dev/null +++ b/src/test/compile-fail/struct-variant-no-pub.rs @@ -0,0 +1,17 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +enum Foo { + Bar { + pub a: int //~ ERROR: `pub` is not allowed here + } +} + +fn main() {} |
