From 1bce8698cdeb274f33ecbfbcbb014367eb1ddfd0 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Sat, 6 Sep 2014 11:54:11 -0700 Subject: 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] --- src/libsyntax/parse/parser.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/libsyntax/parse/parser.rs') 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}; -- cgit 1.4.1-3-g733a5