diff options
| author | bors <bors@rust-lang.org> | 2017-10-24 12:24:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-10-24 12:24:16 +0000 |
| commit | fbc3642ef12d0de48549346a3b77dfb98487f5bc (patch) | |
| tree | 28a3498700735b535718cafbd6c7b8bac4f18b3e /src/libsyntax/ast.rs | |
| parent | a789fa0440214347e1bf6228fdb8fd36bf2f4520 (diff) | |
| parent | 214b0f229395d4460cbcccf17d07cf687ff83b0a (diff) | |
| download | rust-fbc3642ef12d0de48549346a3b77dfb98487f5bc.tar.gz rust-fbc3642ef12d0de48549346a3b77dfb98487f5bc.zip | |
Auto merge of #45401 - zackmdavis:crate_shorthand_visibility_modifier, r=nikomatsakis
`crate` shorthand visibility modifier cc #45388. r? @nikomatsakis
Diffstat (limited to 'src/libsyntax/ast.rs')
| -rw-r--r-- | src/libsyntax/ast.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index b985ac78056..090fc193b38 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -1788,10 +1788,19 @@ impl PolyTraitRef { } } +#[derive(Copy, Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] +pub enum CrateSugar { + /// Source is `pub(crate)` + PubCrate, + + /// Source is (just) `crate` + JustCrate, +} + #[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum Visibility { Public, - Crate(Span), + Crate(Span, CrateSugar), Restricted { path: P<Path>, id: NodeId }, Inherited, } |
