File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed
branches/beta/src/libsyntax/parse Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -31,5 +31,5 @@ refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
31
31
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
32
32
refs/heads/batch: b5571ed71a5879c0495a982506258d5d267744ed
33
33
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34
- refs/heads/beta: 595a08258700f2f5689ad63d99b5d65d5dfb5eab
34
+ refs/heads/beta: 48f50e1e98691d74427e23e82694f528b3fb4d56
35
35
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ use ptr::P;
22
22
/// The specific types of unsupported syntax
23
23
#[ derive( Copy , PartialEq , Eq , Hash ) ]
24
24
pub enum ObsoleteSyntax {
25
+ Sized ,
25
26
OwnedType ,
26
27
OwnedExpr ,
27
28
OwnedPattern ,
@@ -92,7 +93,11 @@ impl<'a> ParserObsoleteMethods for parser::Parser<'a> {
92
93
ObsoleteSyntax :: ExternCrateRenaming => (
93
94
"`extern crate foo = bar` syntax" ,
94
95
"write `extern crate bar as foo` instead"
95
- )
96
+ ) ,
97
+ ObsoleteSyntax :: Sized => (
98
+ "`Sized? T` syntax for removing the `Sized` bound" ,
99
+ "write `T: ?Sized` instead"
100
+ ) ,
96
101
} ;
97
102
98
103
self . report ( sp, kind, kind_str, desc) ;
Original file line number Diff line number Diff line change @@ -4092,8 +4092,8 @@ impl<'a> Parser<'a> {
4092
4092
// unbound, and it may only be `Sized`. To avoid backtracking and other
4093
4093
// complications, we parse an ident, then check for `?`. If we find it,
4094
4094
// we use the ident as the unbound, otherwise, we use it as the name of
4095
- // type param. Even worse, for now, we need to check for `?` before or
4096
- // after the bound.
4095
+ // type param. Even worse, we need to check for `?` before or after the
4096
+ // bound.
4097
4097
let mut span = self . span ;
4098
4098
let mut ident = self . parse_ident ( ) ;
4099
4099
let mut unbound = None ;
@@ -4102,6 +4102,7 @@ impl<'a> Parser<'a> {
4102
4102
unbound = Some ( tref) ;
4103
4103
span = self . span ;
4104
4104
ident = self . parse_ident ( ) ;
4105
+ self . obsolete ( span, ObsoleteSyntax :: Sized ) ;
4105
4106
}
4106
4107
4107
4108
let mut bounds = self . parse_colon_then_ty_param_bounds ( BoundParsingMode :: Modified ) ;
You can’t perform that action at this time.
0 commit comments