diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2014-08-18 08:29:44 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2014-08-18 09:19:10 -0700 |
| commit | 67deb2e65e150a1b9b2fcd457da47e3e13b2c4f7 (patch) | |
| tree | 37fe9cab468b9f6757ca415f42a072a59012ee1e /src/libsyntax/parse/parser.rs | |
| parent | 7074592ee1ad1a155919268229b6464f2acc576e (diff) | |
| download | rust-67deb2e65e150a1b9b2fcd457da47e3e13b2c4f7.tar.gz rust-67deb2e65e150a1b9b2fcd457da47e3e13b2c4f7.zip | |
libsyntax: Remove the `use foo = bar` syntax from the language in favor
of `use bar as foo`. Change all uses of `use foo = bar` to `use bar as foo`. Implements RFC #47. Closes #16461. [breaking-change]
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 80b852111a2..9e2829e6380 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -5385,7 +5385,6 @@ impl<'a> Parser<'a> { match self.token { token::EQ => { // x = foo::bar - // NOTE(stage0, #16461, pcwalton): Deprecate after snapshot. self.bump(); let path_lo = self.span.lo; path = vec!(self.parse_ident()); @@ -5394,8 +5393,10 @@ impl<'a> Parser<'a> { let id = self.parse_ident(); path.push(id); } + let span = mk_sp(path_lo, self.span.hi); + self.obsolete(span, ObsoleteImportRenaming); let path = ast::Path { - span: mk_sp(path_lo, self.span.hi), + span: span, global: false, segments: path.move_iter().map(|identifier| { ast::PathSegment { |
