File tree 3 files changed +7
-15
lines changed
3 files changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -5200,13 +5200,10 @@ impl<'a> Parser<'a> {
5200
5200
let variant_attrs = self . parse_outer_attributes ( ) ;
5201
5201
let vlo = self . span . lo ;
5202
5202
5203
- let vis = try!( self . parse_visibility ( ) ) ;
5204
-
5205
- let ident;
5206
5203
let kind;
5207
5204
let mut args = Vec :: new ( ) ;
5208
5205
let mut disr_expr = None ;
5209
- ident = try!( self . parse_ident ( ) ) ;
5206
+ let ident = try!( self . parse_ident ( ) ) ;
5210
5207
if try!( self . eat ( & token:: OpenDelim ( token:: Brace ) ) ) {
5211
5208
// Parse a struct variant.
5212
5209
all_nullary = false ;
@@ -5248,7 +5245,7 @@ impl<'a> Parser<'a> {
5248
5245
kind : kind,
5249
5246
id : ast:: DUMMY_NODE_ID ,
5250
5247
disr_expr : disr_expr,
5251
- vis : vis ,
5248
+ vis : Inherited ,
5252
5249
} ;
5253
5250
variants. push ( P ( spanned ( vlo, self . last_span . hi , vr) ) ) ;
5254
5251
Original file line number Diff line number Diff line change 1
- // Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1
+ // Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2
2
// file at the top-level directory of this distribution and at
3
3
// http://rust-lang.org/COPYRIGHT.
4
4
//
8
8
// option. This file may not be copied, modified, or distributed
9
9
// except according to those terms.
10
10
11
- use zoo:: bird:: { duck, goose} ;
12
-
13
- mod zoo {
14
- pub enum bird {
15
- pub duck, //~ ERROR: unnecessary `pub` visibility
16
- goose
17
- }
11
+ enum bird {
12
+ pub duck, //~ ERROR: expected identifier, found keyword `pub`
13
+ goose
18
14
}
19
15
20
16
21
17
fn main ( ) {
22
- let y = goose;
18
+ let y = bird :: goose;
23
19
}
Original file line number Diff line number Diff line change 9
9
// except according to those terms.
10
10
11
11
struct A { pub i : isize }
12
- pub enum C { pub Variant } //~ ERROR: unnecessary `pub`
13
12
14
13
pub trait E {
15
14
fn foo ( & self ) ;
You can’t perform that action at this time.
0 commit comments