File tree 3 files changed +3
-44
lines changed 3 files changed +3
-44
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ use std::to_bytes;
30
30
/// The specific types of unsupported syntax
31
31
#[ deriving( Eq ) ]
32
32
pub enum ObsoleteSyntax {
33
- ObsoleteLowerCaseKindBounds ,
34
33
ObsoleteLet ,
35
34
ObsoleteFieldTerminator ,
36
35
ObsoleteStructCtor ,
@@ -96,12 +95,6 @@ impl ParserObsoleteMethods for Parser {
96
95
/// Reports an obsolete syntax non-fatal error.
97
96
pub fn obsolete ( & self , sp : span , kind : ObsoleteSyntax ) {
98
97
let ( kind_str, desc) = match kind {
99
- ObsoleteLowerCaseKindBounds => (
100
- "lower-case kind bounds" ,
101
- "the `send`, `copy`, `const`, and `owned` \
102
- kinds are represented as traits now, and \
103
- should be camel cased"
104
- ) ,
105
98
ObsoleteLet => (
106
99
"`let` in field declaration" ,
107
100
"declare fields as `field: Type`"
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ use parse::lexer::TokenAndSpan;
71
71
use parse:: obsolete:: { ObsoleteClassTraits } ;
72
72
use parse:: obsolete:: { ObsoleteLet , ObsoleteFieldTerminator } ;
73
73
use parse:: obsolete:: { ObsoleteMoveInit , ObsoleteBinaryMove , ObsoleteSwap } ;
74
- use parse:: obsolete:: { ObsoleteSyntax , ObsoleteLowerCaseKindBounds } ;
74
+ use parse:: obsolete:: ObsoleteSyntax ;
75
75
use parse:: obsolete:: { ObsoleteUnsafeBlock , ObsoleteImplSyntax } ;
76
76
use parse:: obsolete:: { ObsoleteMutOwnedPointer } ;
77
77
use parse:: obsolete:: { ObsoleteMutVector , ObsoleteImplVisibility } ;
@@ -3309,30 +3309,8 @@ impl Parser {
3309
3309
self . bump ( ) ;
3310
3310
}
3311
3311
token:: MOD_SEP | token:: IDENT ( * ) => {
3312
- let obsolete_bound = match * self . token {
3313
- token:: MOD_SEP => false ,
3314
- token:: IDENT ( sid, _) => {
3315
- match self . id_to_str ( sid) . as_slice ( ) {
3316
- "send" |
3317
- "copy" |
3318
- "const" |
3319
- "owned" => {
3320
- self . obsolete (
3321
- * self . span ,
3322
- ObsoleteLowerCaseKindBounds ) ;
3323
- self . bump ( ) ;
3324
- true
3325
- }
3326
- _ => false
3327
- }
3328
- }
3329
- _ => fail ! ( )
3330
- } ;
3331
-
3332
- if !obsolete_bound {
3333
- let tref = self . parse_trait_ref ( ) ;
3334
- result. push ( TraitTyParamBound ( tref) ) ;
3335
- }
3312
+ let tref = self . parse_trait_ref ( ) ;
3313
+ result. push ( TraitTyParamBound ( tref) ) ;
3336
3314
}
3337
3315
_ => break ,
3338
3316
}
Original file line number Diff line number Diff line change 8
8
// option. This file may not be copied, modified, or distributed
9
9
// except according to those terms.
10
10
11
- fn f1 < T : copy > ( ) -> T { }
12
- //~^ ERROR obsolete syntax: lower-case kind bounds
13
-
14
- fn f1 < T : send > ( ) -> T { }
15
- //~^ ERROR obsolete syntax: lower-case kind bounds
16
-
17
- fn f1 < T : const > ( ) -> T { }
18
- //~^ ERROR obsolete syntax: lower-case kind bounds
19
-
20
- fn f1 < T : owned > ( ) -> T { }
21
- //~^ ERROR obsolete syntax: lower-case kind bounds
22
-
23
11
struct s {
24
12
let foo : ( ) ,
25
13
//~^ ERROR obsolete syntax: `let` in field declaration
You can’t perform that action at this time.
0 commit comments