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 @@ -5210,13 +5210,10 @@ impl<'a> Parser<'a> {
5210
5210
let variant_attrs = self . parse_outer_attributes ( ) ;
5211
5211
let vlo = self . span . lo ;
5212
5212
5213
- let vis = try!( self . parse_visibility ( ) ) ;
5214
-
5215
- let ident;
5216
5213
let kind;
5217
5214
let mut args = Vec :: new ( ) ;
5218
5215
let mut disr_expr = None ;
5219
- ident = try!( self . parse_ident ( ) ) ;
5216
+ let ident = try!( self . parse_ident ( ) ) ;
5220
5217
if try!( self . eat ( & token:: OpenDelim ( token:: Brace ) ) ) {
5221
5218
// Parse a struct variant.
5222
5219
all_nullary = false ;
@@ -5258,7 +5255,7 @@ impl<'a> Parser<'a> {
5258
5255
kind : kind,
5259
5256
id : ast:: DUMMY_NODE_ID ,
5260
5257
disr_expr : disr_expr,
5261
- vis : vis ,
5258
+ vis : Inherited ,
5262
5259
} ;
5263
5260
variants. push ( P ( spanned ( vlo, self . last_span . hi , vr) ) ) ;
5264
5261
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