diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2014-09-06 11:54:11 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2014-09-09 19:24:06 -0700 |
| commit | 1bce8698cdeb274f33ecbfbcbb014367eb1ddfd0 (patch) | |
| tree | 22270ebc8f88991655f5fa00bca3daaac16e6fc7 /src/libsyntax/parse/parser.rs | |
| parent | a1f49730906ca27947cd99547f7295a1bcf83920 (diff) | |
| download | rust-1bce8698cdeb274f33ecbfbcbb014367eb1ddfd0.tar.gz rust-1bce8698cdeb274f33ecbfbcbb014367eb1ddfd0.zip | |
librustc: Obsolete the old external crate renaming syntax.
Instead of `extern crate foo = bar`, write `extern crate bar as foo`. Instead of `extern crate baz = "quux"`, write `extern crate "quux" as baz`. Closes #16461. [breaking-change]
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 6aff1152f7e..073e88bc4a1 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -4783,11 +4783,7 @@ impl<'a> Parser<'a> { self.bump(); let path = self.parse_str(); let span = self.span; - self.span_warn(span, - format!("this extern crate syntax is deprecated. \ - Use: extern crate \"{}\" as {};", - path.ref0().get(), the_ident.as_str() ).as_slice() - ); + self.obsolete(span, ObsoleteExternCrateRenaming); Some(path) } else {None}; |
