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]
This commit is contained in:
parent
a1f4973090
commit
1bce8698cd
3 changed files with 10 additions and 7 deletions
|
@ -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};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue