File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed
branches/auto/src/libsyntax/parse Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -14,4 +14,4 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
14
14
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
15
15
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
16
16
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17
- refs/heads/auto: e3d43e490be9b298d2bcebf26ac4708157fda9e2
17
+ refs/heads/auto: 24893e8d02d70045254082067c0c6141b7946783
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ pub enum ObsoleteSyntax {
48
48
ObsoleteUnenforcedBound ,
49
49
ObsoleteImplSyntax ,
50
50
ObsoleteTraitBoundSeparator ,
51
+ ObsoleteMutOwnedPointer ,
51
52
}
52
53
53
54
pub impl to_bytes:: IterBytes for ObsoleteSyntax {
@@ -126,6 +127,12 @@ pub impl Parser {
126
127
"space-separated trait bounds" ,
127
128
"write `+` between trait bounds"
128
129
) ,
130
+ ObsoleteMutOwnedPointer => (
131
+ "mutable owned pointer" ,
132
+ "mutability inherits through `~` pointers; place the `~` box
133
+ in a mutable location, like a mutable local variable or an \
134
+ `@mut` box"
135
+ ) ,
129
136
} ;
130
137
131
138
self . report ( sp, kind, kind_str, desc) ;
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ use parse::obsolete::{ObsoleteMoveInit, ObsoleteBinaryMove};
75
75
use parse:: obsolete:: { ObsoleteStructCtor , ObsoleteWith } ;
76
76
use parse:: obsolete:: { ObsoleteSyntax , ObsoleteLowerCaseKindBounds } ;
77
77
use parse:: obsolete:: { ObsoleteUnsafeBlock , ObsoleteImplSyntax } ;
78
- use parse:: obsolete:: { ObsoleteTraitBoundSeparator } ;
78
+ use parse:: obsolete:: { ObsoleteTraitBoundSeparator , ObsoleteMutOwnedPointer } ;
79
79
use parse:: prec:: { as_prec, token_to_binop} ;
80
80
use parse:: token:: { can_begin_expr, is_ident, is_ident_or_path} ;
81
81
use parse:: token:: { is_plain_ident, INTERPOLATED , special_idents} ;
@@ -677,6 +677,11 @@ pub impl Parser {
677
677
// rather than boxed ptrs. But the special casing of str/vec is not
678
678
// reflected in the AST type.
679
679
let mt = self . parse_mt ( ) ;
680
+
681
+ if mt. mutbl == m_mutbl && sigil == OwnedSigil {
682
+ self . obsolete ( * self . last_span , ObsoleteMutOwnedPointer ) ;
683
+ }
684
+
680
685
ctor ( mt)
681
686
}
682
687
You can’t perform that action at this time.
0 commit comments