diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-03-26 15:10:31 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-03-26 15:43:42 -0700 |
| commit | 671d896294eb07825d52fdeed5f3fbc1989d4939 (patch) | |
| tree | 6a7308332762ed43f0d3e0c7abc6e99017cde7ab | |
| parent | 557d4346a26266d2eb13f6b0adf106b8873b0da1 (diff) | |
| download | rust-671d896294eb07825d52fdeed5f3fbc1989d4939.tar.gz rust-671d896294eb07825d52fdeed5f3fbc1989d4939.zip | |
rustc: Remove old #[phase] and #[plugin]
This commit removes the extra deprecation warnings and support for the old `phase` and `plugin` attributes for loading plugins.
| -rw-r--r-- | src/librustc/metadata/macro_import.rs | 9 | ||||
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 1 | ||||
| -rw-r--r-- | src/test/compile-fail/deprecated-phase.rs | 17 | ||||
| -rw-r--r-- | src/test/compile-fail/plugin-extern-crate-attr-deprecated.rs | 17 |
4 files changed, 0 insertions, 44 deletions
diff --git a/src/librustc/metadata/macro_import.rs b/src/librustc/metadata/macro_import.rs index 3714e3b8c73..c2d7911d151 100644 --- a/src/librustc/metadata/macro_import.rs +++ b/src/librustc/metadata/macro_import.rs @@ -79,15 +79,6 @@ impl<'a, 'v> Visitor<'v> for MacroLoader<'a> { for attr in &item.attrs { let mut used = true; match &attr.name()[..] { - "phase" => { - self.sess.span_err(attr.span, "#[phase] is deprecated"); - } - "plugin" => { - self.sess.span_err(attr.span, "#[plugin] on `extern crate` is deprecated"); - self.sess.fileline_help(attr.span, &format!("use a crate attribute instead, \ - i.e. #![plugin({})]", - item.ident.as_str())); - } "macro_use" => { let names = attr.meta_item_list(); if names.is_none() { diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 60f81dac1e9..e5e92503fcc 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -54,7 +54,6 @@ const KNOWN_FEATURES: &'static [(&'static str, &'static str, Status)] = &[ ("non_ascii_idents", "1.0.0", Active), ("thread_local", "1.0.0", Active), ("link_args", "1.0.0", Active), - ("phase", "1.0.0", Removed), ("plugin_registrar", "1.0.0", Active), ("log_syntax", "1.0.0", Active), ("trace_macros", "1.0.0", Active), diff --git a/src/test/compile-fail/deprecated-phase.rs b/src/test/compile-fail/deprecated-phase.rs deleted file mode 100644 index 22fc4a94cd2..00000000000 --- a/src/test/compile-fail/deprecated-phase.rs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![feature(custom_attribute)] - -#[phase(blah)] -//~^ ERROR #[phase] is deprecated -extern crate foo; - -fn main() {} diff --git a/src/test/compile-fail/plugin-extern-crate-attr-deprecated.rs b/src/test/compile-fail/plugin-extern-crate-attr-deprecated.rs deleted file mode 100644 index efa352e386d..00000000000 --- a/src/test/compile-fail/plugin-extern-crate-attr-deprecated.rs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![feature(plugin)] - -#[plugin] //~ ERROR #[plugin] on `extern crate` is deprecated -//~^ HELP use a crate attribute instead, i.e. #![plugin(std)] -extern crate std; - -fn main() {} |
