Remove obsolete warnings for extern mod

This patch gets rid of ObsoleteExternModAttributesInParens and
ObsoleteNamedExternModule since the replacement of `extern mod` with
`extern crate` avoids those cases and raises different errors. Both have
been around for at least a version which makes this a good moment to get
rid of them.
This commit is contained in:
Flavio Percoco 2014-02-03 22:49:14 +01:00
parent 9a6d92c1d7
commit 5deb3c9ca0
2 changed files with 0 additions and 17 deletions

View File

@ -30,7 +30,6 @@ pub enum ObsoleteSyntax {
ObsoleteSwap,
ObsoleteUnsafeBlock,
ObsoleteBareFnType,
ObsoleteNamedExternModule,
ObsoleteMultipleLocalDecl,
ObsoleteUnsafeExternFn,
ObsoleteTraitFuncVisibility,
@ -42,7 +41,6 @@ pub enum ObsoleteSyntax {
ObsoleteBoxedClosure,
ObsoleteClosureType,
ObsoleteMultipleImport,
ObsoleteExternModAttributesInParens,
ObsoleteManagedPattern,
ObsoleteManagedString,
ObsoleteManagedVec,
@ -86,11 +84,6 @@ fn obsolete(&mut self, sp: Span, kind: ObsoleteSyntax) {
"bare function type",
"use `|A| -> B` or `extern fn(A) -> B` instead"
),
ObsoleteNamedExternModule => (
"named external module",
"instead of `extern mod foo { ... }`, write `mod foo { \
extern { ... } }`"
),
ObsoleteMultipleLocalDecl => (
"declaration of multiple locals at once",
"instead of e.g. `let a = 1, b = 2`, write \
@ -141,11 +134,6 @@ fn obsolete(&mut self, sp: Span, kind: ObsoleteSyntax) {
"multiple imports",
"only one import is allowed per `use` statement"
),
ObsoleteExternModAttributesInParens => (
"`extern mod` with linkage attribute list",
"use `extern mod foo = \"bar\";` instead of \
`extern mod foo (name = \"bar\")`"
),
ObsoleteManagedPattern => (
"managed pointer pattern",
"use a nested `match` expression instead of a managed box \

View File

@ -8,11 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
extern mod obsolete_name {
//~^ ERROR obsolete syntax: named external module
fn bar();
}
trait A {
pub fn foo(); //~ ERROR: visibility not necessary
pub fn bar(); //~ ERROR: visibility not necessary