Skip to content

Commit e182b13

Browse files
committed
---
yaml --- r: 46537 b: refs/heads/auto c: 24893e8 h: refs/heads/master i: 46535: 59986d7 v: v3
1 parent 65f36c0 commit e182b13

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: e3d43e490be9b298d2bcebf26ac4708157fda9e2
17+
refs/heads/auto: 24893e8d02d70045254082067c0c6141b7946783

branches/auto/src/libsyntax/parse/obsolete.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ pub enum ObsoleteSyntax {
4848
ObsoleteUnenforcedBound,
4949
ObsoleteImplSyntax,
5050
ObsoleteTraitBoundSeparator,
51+
ObsoleteMutOwnedPointer,
5152
}
5253

5354
pub impl to_bytes::IterBytes for ObsoleteSyntax {
@@ -126,6 +127,12 @@ pub impl Parser {
126127
"space-separated trait bounds",
127128
"write `+` between trait bounds"
128129
),
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+
),
129136
};
130137

131138
self.report(sp, kind, kind_str, desc);

branches/auto/src/libsyntax/parse/parser.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ use parse::obsolete::{ObsoleteMoveInit, ObsoleteBinaryMove};
7575
use parse::obsolete::{ObsoleteStructCtor, ObsoleteWith};
7676
use parse::obsolete::{ObsoleteSyntax, ObsoleteLowerCaseKindBounds};
7777
use parse::obsolete::{ObsoleteUnsafeBlock, ObsoleteImplSyntax};
78-
use parse::obsolete::{ObsoleteTraitBoundSeparator};
78+
use parse::obsolete::{ObsoleteTraitBoundSeparator, ObsoleteMutOwnedPointer};
7979
use parse::prec::{as_prec, token_to_binop};
8080
use parse::token::{can_begin_expr, is_ident, is_ident_or_path};
8181
use parse::token::{is_plain_ident, INTERPOLATED, special_idents};
@@ -677,6 +677,11 @@ pub impl Parser {
677677
// rather than boxed ptrs. But the special casing of str/vec is not
678678
// reflected in the AST type.
679679
let mt = self.parse_mt();
680+
681+
if mt.mutbl == m_mutbl && sigil == OwnedSigil {
682+
self.obsolete(*self.last_span, ObsoleteMutOwnedPointer);
683+
}
684+
680685
ctor(mt)
681686
}
682687

0 commit comments

Comments
 (0)