File tree 2 files changed +12
-3
lines changed
2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,8 @@ pub enum ObsoleteSyntax {
44
44
ObsoleteBoxedClosure ,
45
45
ObsoleteClosureType ,
46
46
ObsoleteMultipleImport ,
47
- ObsoleteExternModAttributesInParens
47
+ ObsoleteExternModAttributesInParens ,
48
+ ObsoleteManagedPattern ,
48
49
}
49
50
50
51
impl to_bytes:: IterBytes for ObsoleteSyntax {
@@ -148,7 +149,12 @@ impl ParserObsoleteMethods for Parser {
148
149
"`extern mod` with linkage attribute list" ,
149
150
"use `extern mod foo = \" bar\" ;` instead of \
150
151
`extern mod foo (name = \" bar\" )`"
151
- )
152
+ ) ,
153
+ ObsoleteManagedPattern => (
154
+ "managed pointer pattern" ,
155
+ "use a nested `match` expression instead of a managed box \
156
+ pattern"
157
+ ) ,
152
158
} ;
153
159
154
160
self . report ( sp, kind, kind_str, desc) ;
Original file line number Diff line number Diff line change @@ -2903,7 +2903,10 @@ impl Parser {
2903
2903
} ;
2904
2904
PatLit ( vst)
2905
2905
}
2906
- _ => PatBox ( sub)
2906
+ _ => {
2907
+ self . obsolete ( self . span , ObsoleteManagedPattern ) ;
2908
+ PatBox ( sub)
2909
+ }
2907
2910
} ;
2908
2911
hi = self . last_span . hi ;
2909
2912
return @ast:: Pat {
You can’t perform that action at this time.
0 commit comments