diff options
| author | bors <bors@rust-lang.org> | 2014-06-09 15:52:07 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-06-09 15:52:07 -0700 |
| commit | 0ea7aa30cc864d00fc30b9ba610f2daefab4e850 (patch) | |
| tree | 2f3216efe5cc25851595c14d803dc69738030a72 /src/test | |
| parent | b6146e652ae7f6d373d55dd021dc50cb00e0caf8 (diff) | |
| parent | deecda6a94b31489045d420f16840a72c44af7e1 (diff) | |
| download | rust-0ea7aa30cc864d00fc30b9ba610f2daefab4e850.tar.gz rust-0ea7aa30cc864d00fc30b9ba610f2daefab4e850.zip | |
auto merge of #14554 : kmcallister/rust/plugin_registrar, r=cmr
This implements the design in rust-lang/rfcs#86. It shouldn't be merged until that RFC is accepted, but it would be great if somebody has time to review the code before then.
Diffstat (limited to 'src/test')
48 files changed, 92 insertions, 79 deletions
diff --git a/src/test/auxiliary/issue-13560-3.rs b/src/test/auxiliary/issue-13560-3.rs index 3b77b244ce8..dfd13851774 100644 --- a/src/test/auxiliary/issue-13560-3.rs +++ b/src/test/auxiliary/issue-13560-3.rs @@ -13,6 +13,6 @@ #![crate_type = "rlib"] #![feature(phase)] -#[phase(syntax)] extern crate t1 = "issue-13560-1"; -#[phase(syntax, link)] extern crate t2 = "issue-13560-2"; +#[phase(plugin)] extern crate t1 = "issue-13560-1"; +#[phase(plugin, link)] extern crate t2 = "issue-13560-2"; diff --git a/src/test/auxiliary/logging_right_crate.rs b/src/test/auxiliary/logging_right_crate.rs index 3f0da3e344a..0c4af97b410 100644 --- a/src/test/auxiliary/logging_right_crate.rs +++ b/src/test/auxiliary/logging_right_crate.rs @@ -9,7 +9,7 @@ // except according to those terms. #![feature(phase)] -#[phase(syntax, link)] extern crate log; +#[phase(plugin, link)] extern crate log; extern crate debug; pub fn foo<T>() { diff --git a/src/test/auxiliary/macro_crate_test.rs b/src/test/auxiliary/macro_crate_test.rs index 95f2a8c1ca1..805b8a894cb 100644 --- a/src/test/auxiliary/macro_crate_test.rs +++ b/src/test/auxiliary/macro_crate_test.rs @@ -10,29 +10,28 @@ // force-host -#![feature(globs, macro_registrar, macro_rules, quote, managed_boxes)] +#![feature(globs, plugin_registrar, macro_rules, quote, managed_boxes)] extern crate syntax; +extern crate rustc; -use syntax::ast::{Name, TokenTree, Item, MetaItem}; +use syntax::ast::{TokenTree, Item, MetaItem}; use syntax::codemap::Span; use syntax::ext::base::*; use syntax::parse::token; +use rustc::plugin::Registry; #[macro_export] macro_rules! exported_macro (() => (2)) macro_rules! unexported_macro (() => (3)) -#[macro_registrar] -pub fn macro_registrar(register: |Name, SyntaxExtension|) { - register(token::intern("make_a_1"), - NormalTT(box BasicMacroExpander { - expander: expand_make_a_1, - span: None, - }, - None)); - register(token::intern("into_foo"), ItemModifier(expand_into_foo)); +#[plugin_registrar] +pub fn plugin_registrar(reg: &mut Registry) { + reg.register_macro("make_a_1", expand_make_a_1); + reg.register_syntax_extension( + token::intern("into_foo"), + ItemModifier(expand_into_foo)); } fn expand_make_a_1(cx: &mut ExtCtxt, sp: Span, tts: &[TokenTree]) diff --git a/src/test/auxiliary/macro_crate_outlive_expansion_phase.rs b/src/test/auxiliary/plugin_crate_outlive_expansion_phase.rs index 670673fe047..213fdd6b74a 100644 --- a/src/test/auxiliary/macro_crate_outlive_expansion_phase.rs +++ b/src/test/auxiliary/plugin_crate_outlive_expansion_phase.rs @@ -10,13 +10,12 @@ // force-host -#![feature(macro_registrar)] +#![feature(plugin_registrar)] -extern crate syntax; +extern crate rustc; use std::any::Any; -use syntax::ast::Name; -use syntax::ext::base::SyntaxExtension; +use rustc::plugin::Registry; struct Foo { foo: int @@ -26,8 +25,8 @@ impl Drop for Foo { fn drop(&mut self) {} } -#[macro_registrar] -pub fn registrar(_: |Name, SyntaxExtension|) { +#[plugin_registrar] +pub fn registrar(_: &mut Registry) { local_data_key!(foo: Box<Any:Send>); foo.replace(Some(box Foo { foo: 10 } as Box<Any:Send>)); } diff --git a/src/test/auxiliary/syntax-extension-with-dll-deps-2.rs b/src/test/auxiliary/syntax-extension-with-dll-deps-2.rs index 93b56a7600d..04318fcae27 100644 --- a/src/test/auxiliary/syntax-extension-with-dll-deps-2.rs +++ b/src/test/auxiliary/syntax-extension-with-dll-deps-2.rs @@ -12,24 +12,20 @@ // no-prefer-dynamic #![crate_type = "dylib"] -#![feature(macro_registrar, quote, globs)] +#![feature(plugin_registrar, quote, globs)] extern crate other = "syntax-extension-with-dll-deps-1"; extern crate syntax; +extern crate rustc; -use syntax::ast::{Name, TokenTree, Item, MetaItem}; +use syntax::ast::{TokenTree, Item, MetaItem}; use syntax::codemap::Span; use syntax::ext::base::*; -use syntax::parse::token; +use rustc::plugin::Registry; -#[macro_registrar] -pub fn macro_registrar(register: |Name, SyntaxExtension|) { - register(token::intern("foo"), - NormalTT(box BasicMacroExpander { - expander: expand_foo, - span: None, - }, - None)); +#[plugin_registrar] +pub fn plugin_registrar(reg: &mut Registry) { + reg.register_macro("foo", expand_foo); } fn expand_foo(cx: &mut ExtCtxt, sp: Span, tts: &[TokenTree]) diff --git a/src/test/auxiliary/weak-lang-items.rs b/src/test/auxiliary/weak-lang-items.rs index 68a2ae24b85..c998e362d7e 100644 --- a/src/test/auxiliary/weak-lang-items.rs +++ b/src/test/auxiliary/weak-lang-items.rs @@ -17,7 +17,7 @@ #![feature(phase)] #![crate_type = "rlib"] -#[phase(syntax, link)] +#[phase(plugin, link)] extern crate core; struct A; diff --git a/src/test/bench/shootout-chameneos-redux.rs b/src/test/bench/shootout-chameneos-redux.rs index baf02feb5b8..28786f1e163 100644 --- a/src/test/bench/shootout-chameneos-redux.rs +++ b/src/test/bench/shootout-chameneos-redux.rs @@ -11,7 +11,7 @@ // no-pretty-expanded #![feature(phase)] -#[phase(syntax)] extern crate green; +#[phase(plugin)] extern crate green; use std::string::String; use std::fmt; diff --git a/src/test/bench/shootout-meteor.rs b/src/test/bench/shootout-meteor.rs index 6f4aef27b63..afefaf2b535 100644 --- a/src/test/bench/shootout-meteor.rs +++ b/src/test/bench/shootout-meteor.rs @@ -39,7 +39,7 @@ // OF THE POSSIBILITY OF SUCH DAMAGE. #![feature(phase)] -#[phase(syntax)] extern crate green; +#[phase(plugin)] extern crate green; extern crate sync; use sync::Arc; diff --git a/src/test/bench/shootout-regex-dna.rs b/src/test/bench/shootout-regex-dna.rs index c2f0a58a288..ca0248bcf5d 100644 --- a/src/test/bench/shootout-regex-dna.rs +++ b/src/test/bench/shootout-regex-dna.rs @@ -46,7 +46,7 @@ #![feature(macro_rules, phase)] extern crate regex; -#[phase(syntax)]extern crate regex_macros; +#[phase(plugin)]extern crate regex_macros; extern crate sync; use std::io; diff --git a/src/test/bench/shootout-spectralnorm.rs b/src/test/bench/shootout-spectralnorm.rs index c038a056569..15b7ff1e81e 100644 --- a/src/test/bench/shootout-spectralnorm.rs +++ b/src/test/bench/shootout-spectralnorm.rs @@ -10,7 +10,7 @@ #![feature(phase)] #![allow(non_snake_case_functions)] -#[phase(syntax)] extern crate green; +#[phase(plugin)] extern crate green; extern crate sync; use std::from_str::FromStr; diff --git a/src/test/bench/shootout-threadring.rs b/src/test/bench/shootout-threadring.rs index 1a6582927ca..a001ff78ba0 100644 --- a/src/test/bench/shootout-threadring.rs +++ b/src/test/bench/shootout-threadring.rs @@ -9,7 +9,7 @@ // except according to those terms. #![feature(phase)] -#[phase(syntax)] extern crate green; +#[phase(plugin)] extern crate green; green_start!(main) fn start(n_tasks: int, token: int) { diff --git a/src/test/compile-fail-fulldeps/gated-phase.rs b/src/test/compile-fail-fulldeps/gated-phase.rs index c8763899269..1f384b85633 100644 --- a/src/test/compile-fail-fulldeps/gated-phase.rs +++ b/src/test/compile-fail-fulldeps/gated-phase.rs @@ -11,7 +11,7 @@ // aux-build:macro_crate_test.rs // ignore-stage1 -#[phase(syntax)] +#[phase(plugin)] //~^ ERROR compile time crate loading is experimental and possibly buggy extern crate macro_crate_test; diff --git a/src/test/compile-fail-fulldeps/macro-crate-unexported-macro.rs b/src/test/compile-fail-fulldeps/macro-crate-unexported-macro.rs index f8eb9868a5b..39c2accaddf 100644 --- a/src/test/compile-fail-fulldeps/macro-crate-unexported-macro.rs +++ b/src/test/compile-fail-fulldeps/macro-crate-unexported-macro.rs @@ -14,7 +14,7 @@ #![feature(phase)] -#[phase(syntax)] +#[phase(plugin)] extern crate macro_crate_test; fn main() { diff --git a/src/test/compile-fail-fulldeps/macro-crate-unknown-crate.rs b/src/test/compile-fail-fulldeps/macro-crate-unknown-crate.rs index 84c915f267e..7a7eac7b709 100644 --- a/src/test/compile-fail-fulldeps/macro-crate-unknown-crate.rs +++ b/src/test/compile-fail-fulldeps/macro-crate-unknown-crate.rs @@ -10,7 +10,7 @@ #![feature(phase)] -#[phase(syntax)] +#[phase(plugin)] extern crate doesnt_exist; //~ ERROR can't find crate fn main() {} diff --git a/src/test/compile-fail-fulldeps/phase-syntax-doesnt-resolve.rs b/src/test/compile-fail-fulldeps/phase-syntax-doesnt-resolve.rs index 2053f81683d..274fbf797e1 100644 --- a/src/test/compile-fail-fulldeps/phase-syntax-doesnt-resolve.rs +++ b/src/test/compile-fail-fulldeps/phase-syntax-doesnt-resolve.rs @@ -14,7 +14,7 @@ #![feature(phase)] -#[phase(syntax)] +#[phase(plugin)] extern crate macro_crate_test; fn main() { diff --git a/src/test/compile-fail-fulldeps/syntax-extension-fourcc-bad-len.rs b/src/test/compile-fail-fulldeps/syntax-extension-fourcc-bad-len.rs index fbcdf55f1ac..3ad17618fc0 100644 --- a/src/test/compile-fail-fulldeps/syntax-extension-fourcc-bad-len.rs +++ b/src/test/compile-fail-fulldeps/syntax-extension-fourcc-bad-len.rs @@ -13,7 +13,7 @@ #![feature(phase)] -#[phase(syntax)] +#[phase(plugin)] extern crate fourcc; fn main() { diff --git a/src/test/compile-fail-fulldeps/syntax-extension-fourcc-invalid-endian.rs b/src/test/compile-fail-fulldeps/syntax-extension-fourcc-invalid-endian.rs index 569b54b93fb..4d425d9a205 100644 --- a/src/test/compile-fail-fulldeps/syntax-extension-fourcc-invalid-endian.rs +++ b/src/test/compile-fail-fulldeps/syntax-extension-fourcc-invalid-endian.rs @@ -13,7 +13,7 @@ #![feature(phase)] -#[phase(syntax)] +#[phase(plugin)] extern crate fourcc; fn main() { diff --git a/src/test/compile-fail-fulldeps/syntax-extension-fourcc-non-ascii-str.rs b/src/test/compile-fail-fulldeps/syntax-extension-fourcc-non-ascii-str.rs index c0e2304354c..1a6d747c1e8 100644 --- a/src/test/compile-fail-fulldeps/syntax-extension-fourcc-non-ascii-str.rs +++ b/src/test/compile-fail-fulldeps/syntax-extension-fourcc-non-ascii-str.rs @@ -13,7 +13,7 @@ #![feature(phase)] -#[phase(syntax)] +#[phase(plugin)] extern crate fourcc; fn main() { diff --git a/src/test/compile-fail-fulldeps/syntax-extension-fourcc-non-literal.rs b/src/test/compile-fail-fulldeps/syntax-extension-fourcc-non-literal.rs index 536594f3063..885d8dd1ec3 100644 --- a/src/test/compile-fail-fulldeps/syntax-extension-fourcc-non-literal.rs +++ b/src/test/compile-fail-fulldeps/syntax-extension-fourcc-non-literal.rs @@ -13,7 +13,7 @@ #![feature(phase)] -#[phase(syntax)] +#[phase(plugin)] extern crate fourcc; fn main() { diff --git a/src/test/compile-fail-fulldeps/syntax-extension-fourcc-unsupported-literal.rs b/src/test/compile-fail-fulldeps/syntax-extension-fourcc-unsupported-literal.rs index 8a0b0856d24..da1c0070715 100644 --- a/src/test/compile-fail-fulldeps/syntax-extension-fourcc-unsupported-literal.rs +++ b/src/test/compile-fail-fulldeps/syntax-extension-fourcc-unsupported-literal.rs @@ -13,7 +13,7 @@ #![feature(phase)] -#[phase(syntax)] +#[phase(plugin)] extern crate fourcc; fn main() { diff --git a/src/test/compile-fail-fulldeps/syntax-extension-hexfloat-bad-lits.rs b/src/test/compile-fail-fulldeps/syntax-extension-hexfloat-bad-lits.rs index 1cd4f654d2e..191042f5f56 100644 --- a/src/test/compile-fail-fulldeps/syntax-extension-hexfloat-bad-lits.rs +++ b/src/test/compile-fail-fulldeps/syntax-extension-hexfloat-bad-lits.rs @@ -13,7 +13,7 @@ #![feature(phase)] -#[phase(syntax)] +#[phase(plugin)] extern crate hexfloat; fn main() { diff --git a/src/test/compile-fail-fulldeps/syntax-extension-hexfloat-bad-types.rs b/src/test/compile-fail-fulldeps/syntax-extension-hexfloat-bad-types.rs index 4a6475cea96..f0ace43ec9e 100644 --- a/src/test/compile-fail-fulldeps/syntax-extension-hexfloat-bad-types.rs +++ b/src/test/compile-fail-fulldeps/syntax-extension-hexfloat-bad-types.rs @@ -13,7 +13,7 @@ #![feature(phase)] -#[phase(syntax)] +#[phase(plugin)] extern crate hexfloat; fn main() { diff --git a/src/test/compile-fail-fulldeps/syntax-extension-regex-invalid.rs b/src/test/compile-fail-fulldeps/syntax-extension-regex-invalid.rs index 0e072dc1c06..bccba74e05c 100644 --- a/src/test/compile-fail-fulldeps/syntax-extension-regex-invalid.rs +++ b/src/test/compile-fail-fulldeps/syntax-extension-regex-invalid.rs @@ -15,7 +15,7 @@ #![feature(phase)] extern crate regex; -#[phase(syntax)] extern crate regex_macros; +#[phase(plugin)] extern crate regex_macros; // Tests to make sure that `regex!` will produce a compile error when given // an invalid regular expression. diff --git a/src/test/compile-fail-fulldeps/syntax-extension-regex-unused-static.rs b/src/test/compile-fail-fulldeps/syntax-extension-regex-unused-static.rs index 300e7e524df..819c9e6b0fe 100644 --- a/src/test/compile-fail-fulldeps/syntax-extension-regex-unused-static.rs +++ b/src/test/compile-fail-fulldeps/syntax-extension-regex-unused-static.rs @@ -15,7 +15,7 @@ #![feature(phase)] extern crate regex; -#[phase(syntax)] extern crate regex_macros; +#[phase(plugin)] extern crate regex_macros; #[deny(unused_variable)] #[deny(dead_code)] diff --git a/src/test/compile-fail-fulldeps/syntax-extension-regex-unused.rs b/src/test/compile-fail-fulldeps/syntax-extension-regex-unused.rs index c77bd52d9e5..d96b3f6f224 100644 --- a/src/test/compile-fail-fulldeps/syntax-extension-regex-unused.rs +++ b/src/test/compile-fail-fulldeps/syntax-extension-regex-unused.rs @@ -15,7 +15,7 @@ #![feature(phase)] extern crate regex; -#[phase(syntax)] extern crate regex_macros; +#[phase(plugin)] extern crate regex_macros; #[deny(unused_variable)] #[deny(dead_code)] diff --git a/src/test/compile-fail/gated-macro_registrar.rs b/src/test/compile-fail/gated-plugin_registrar.rs index 54274ccb847..f6e11ffd9e5 100644 --- a/src/test/compile-fail/gated-macro_registrar.rs +++ b/src/test/compile-fail/gated-plugin_registrar.rs @@ -9,7 +9,7 @@ // except according to those terms. // the registration function isn't typechecked yet -#[macro_registrar] -pub fn registrar() {} //~ ERROR cross-crate macro exports are experimental +#[plugin_registrar] +pub fn registrar() {} //~ ERROR compiler plugins are experimental fn main() {} diff --git a/src/test/compile-fail/multiple-macro-registrars.rs b/src/test/compile-fail/multiple-plugin-registrars.rs index 321c0ff0193..f5ebf84b8e0 100644 --- a/src/test/compile-fail/multiple-macro-registrars.rs +++ b/src/test/compile-fail/multiple-plugin-registrars.rs @@ -8,15 +8,15 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// error-pattern: multiple macro registration functions found +// error-pattern: multiple plugin registration functions found -#![feature(macro_registrar)] +#![feature(plugin_registrar)] // the registration function isn't typechecked yet -#[macro_registrar] +#[plugin_registrar] pub fn one() {} -#[macro_registrar] +#[plugin_registrar] pub fn two() {} fn main() {} diff --git a/src/test/run-fail/rt-set-exit-status-fail.rs b/src/test/run-fail/rt-set-exit-status-fail.rs index 385bc145204..c960679a43f 100644 --- a/src/test/run-fail/rt-set-exit-status-fail.rs +++ b/src/test/run-fail/rt-set-exit-status-fail.rs @@ -11,7 +11,7 @@ // error-pattern:whatever #![feature(phase)] -#[phase(syntax, link)] extern crate log; +#[phase(plugin, link)] extern crate log; use std::os; fn main() { diff --git a/src/test/run-fail/rt-set-exit-status-fail2.rs b/src/test/run-fail/rt-set-exit-status-fail2.rs index 3b5e27027b4..22985d57936 100644 --- a/src/test/run-fail/rt-set-exit-status-fail2.rs +++ b/src/test/run-fail/rt-set-exit-status-fail2.rs @@ -11,7 +11,7 @@ // error-pattern:whatever #![feature(phase)] -#[phase(syntax, link)] extern crate log; +#[phase(plugin, link)] extern crate log; use std::os; use std::task; diff --git a/src/test/run-fail/rt-set-exit-status.rs b/src/test/run-fail/rt-set-exit-status.rs index b94045e5d12..d08cb198802 100644 --- a/src/test/run-fail/rt-set-exit-status.rs +++ b/src/test/run-fail/rt-set-exit-status.rs @@ -11,7 +11,7 @@ // error-pattern:whatever #![feature(phase)] -#[phase(syntax, link)] extern crate log; +#[phase(plugin, link)] extern crate log; use std::os; fn main() { diff --git a/src/test/run-make/lto-syntax-extension/main.rs b/src/test/run-make/lto-syntax-extension/main.rs index 0c55d5fd314..ec4fbca48f8 100644 --- a/src/test/run-make/lto-syntax-extension/main.rs +++ b/src/test/run-make/lto-syntax-extension/main.rs @@ -11,7 +11,7 @@ #![feature(phase)] extern crate lib; -#[phase(syntax)] extern crate fourcc; +#[phase(plugin)] extern crate fourcc; fn main() { fourcc!("1234"); diff --git a/src/test/run-pass-fulldeps/macro-crate-outlive-expansion-phase.rs b/src/test/run-pass-fulldeps/macro-crate-outlive-expansion-phase.rs index 58663bb44c7..dd585ea9794 100644 --- a/src/test/run-pass-fulldeps/macro-crate-outlive-expansion-phase.rs +++ b/src/test/run-pass-fulldeps/macro-crate-outlive-expansion-phase.rs @@ -8,12 +8,12 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:macro_crate_outlive_expansion_phase.rs +// aux-build:plugin_crate_outlive_expansion_phase.rs // ignore-stage1 #![feature(phase)] -#[phase(syntax)] -extern crate macro_crate_outlive_expansion_phase; +#[phase(plugin)] +extern crate plugin_crate_outlive_expansion_phase; pub fn main() {} diff --git a/src/test/run-pass-fulldeps/macro-crate.rs b/src/test/run-pass-fulldeps/macro-crate.rs index 3c620c5e572..1e796d9d724 100644 --- a/src/test/run-pass-fulldeps/macro-crate.rs +++ b/src/test/run-pass-fulldeps/macro-crate.rs @@ -13,7 +13,7 @@ #![feature(phase)] -#[phase(syntax)] +#[phase(plugin)] extern crate macro_crate_test; #[into_foo] diff --git a/src/test/run-pass-fulldeps/phase-syntax-link-does-resolve.rs b/src/test/run-pass-fulldeps/phase-syntax-link-does-resolve.rs index b8d3ab23831..47ff7d31df5 100644 --- a/src/test/run-pass-fulldeps/phase-syntax-link-does-resolve.rs +++ b/src/test/run-pass-fulldeps/phase-syntax-link-does-resolve.rs @@ -17,7 +17,7 @@ #![feature(phase)] -#[phase(syntax, link)] +#[phase(plugin, link)] extern crate macro_crate_test; fn main() { diff --git a/src/test/run-pass-fulldeps/syntax-extension-fourcc.rs b/src/test/run-pass-fulldeps/syntax-extension-fourcc.rs index 0681ec63b9e..b16975fe6ee 100644 --- a/src/test/run-pass-fulldeps/syntax-extension-fourcc.rs +++ b/src/test/run-pass-fulldeps/syntax-extension-fourcc.rs @@ -13,7 +13,7 @@ #![feature(phase)] -#[phase(syntax)] +#[phase(plugin)] extern crate fourcc; static static_val: u32 = fourcc!("foo "); diff --git a/src/test/run-pass-fulldeps/syntax-extension-hexfloat.rs b/src/test/run-pass-fulldeps/syntax-extension-hexfloat.rs index 3601b610115..496b0111363 100644 --- a/src/test/run-pass-fulldeps/syntax-extension-hexfloat.rs +++ b/src/test/run-pass-fulldeps/syntax-extension-hexfloat.rs @@ -12,7 +12,7 @@ // ignore-pretty #![feature(phase)] -#[phase(syntax)] +#[phase(plugin)] extern crate hexfloat; pub fn main() { diff --git a/src/test/run-pass-fulldeps/syntax-extension-with-dll-deps.rs b/src/test/run-pass-fulldeps/syntax-extension-with-dll-deps.rs index efae04ea4fc..275463f5d7f 100644 --- a/src/test/run-pass-fulldeps/syntax-extension-with-dll-deps.rs +++ b/src/test/run-pass-fulldeps/syntax-extension-with-dll-deps.rs @@ -14,7 +14,7 @@ #![feature(phase)] -#[phase(syntax)] +#[phase(plugin)] extern crate extension = "syntax-extension-with-dll-deps-2"; fn main() { diff --git a/src/test/run-pass/capturing-logging.rs b/src/test/run-pass/capturing-logging.rs index 636e879fe32..3402db7c355 100644 --- a/src/test/run-pass/capturing-logging.rs +++ b/src/test/run-pass/capturing-logging.rs @@ -13,7 +13,7 @@ #![feature(phase)] -#[phase(syntax, link)] +#[phase(plugin, link)] extern crate log; extern crate native; diff --git a/src/test/run-pass/conditional-debug-macro-off.rs b/src/test/run-pass/conditional-debug-macro-off.rs index 56b38033c83..b7c4ccb3c2a 100644 --- a/src/test/run-pass/conditional-debug-macro-off.rs +++ b/src/test/run-pass/conditional-debug-macro-off.rs @@ -12,7 +12,7 @@ // exec-env:RUST_LOG=conditional-debug-macro-off=4 #![feature(phase)] -#[phase(syntax, link)] +#[phase(plugin, link)] extern crate log; extern crate debug; diff --git a/src/test/run-pass/deprecated-phase-syntax.rs b/src/test/run-pass/deprecated-phase-syntax.rs new file mode 100644 index 00000000000..df835dab4d4 --- /dev/null +++ b/src/test/run-pass/deprecated-phase-syntax.rs @@ -0,0 +1,19 @@ +// Copyright 2013-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(phase)] + +//~ WARNING phase(syntax) is a deprecated synonym for phase(plugin) +#[phase(syntax, link)] +extern crate log; + +fn main() { + debug!("foo"); +} diff --git a/src/test/run-pass/issue-14456.rs b/src/test/run-pass/issue-14456.rs index 79203503373..96290386ccc 100644 --- a/src/test/run-pass/issue-14456.rs +++ b/src/test/run-pass/issue-14456.rs @@ -10,7 +10,7 @@ #![feature(phase)] -#[phase(syntax, link)] +#[phase(plugin, link)] extern crate green; extern crate native; diff --git a/src/test/run-pass/logging-enabled-debug.rs b/src/test/run-pass/logging-enabled-debug.rs index 9320c77a285..7975af434d2 100644 --- a/src/test/run-pass/logging-enabled-debug.rs +++ b/src/test/run-pass/logging-enabled-debug.rs @@ -12,7 +12,7 @@ // exec-env:RUST_LOG=logging-enabled-debug=debug #![feature(phase)] -#[phase(syntax, link)] +#[phase(plugin, link)] extern crate log; pub fn main() { diff --git a/src/test/run-pass/logging-enabled.rs b/src/test/run-pass/logging-enabled.rs index b1d24e8b9b6..184ac713c89 100644 --- a/src/test/run-pass/logging-enabled.rs +++ b/src/test/run-pass/logging-enabled.rs @@ -11,7 +11,7 @@ // exec-env:RUST_LOG=logging-enabled=info #![feature(phase)] -#[phase(syntax, link)] +#[phase(plugin, link)] extern crate log; pub fn main() { diff --git a/src/test/run-pass/logging-separate-lines.rs b/src/test/run-pass/logging-separate-lines.rs index 7f9a4593780..989a8d4bde5 100644 --- a/src/test/run-pass/logging-separate-lines.rs +++ b/src/test/run-pass/logging-separate-lines.rs @@ -13,7 +13,7 @@ #![feature(phase)] -#[phase(syntax, link)] +#[phase(plugin, link)] extern crate log; use std::io::Command; diff --git a/src/test/run-pass/macro-crate-def-only.rs b/src/test/run-pass/macro-crate-def-only.rs index abf8edc274c..25da809babd 100644 --- a/src/test/run-pass/macro-crate-def-only.rs +++ b/src/test/run-pass/macro-crate-def-only.rs @@ -12,7 +12,7 @@ #![feature(phase)] -#[phase(syntax)] +#[phase(plugin)] extern crate macro_crate_def_only; pub fn main() { diff --git a/src/test/run-pass/macro-export-inner-module.rs b/src/test/run-pass/macro-export-inner-module.rs index 179c65cd046..c7911a69ce4 100644 --- a/src/test/run-pass/macro-export-inner-module.rs +++ b/src/test/run-pass/macro-export-inner-module.rs @@ -13,7 +13,7 @@ #![feature(phase)] -#[phase(syntax)] +#[phase(plugin)] extern crate macro_export_inner_module; pub fn main() { diff --git a/src/test/run-pass/phase-use-ignored.rs b/src/test/run-pass/phase-use-ignored.rs index 60f2619fffd..5015e43fa3f 100644 --- a/src/test/run-pass/phase-use-ignored.rs +++ b/src/test/run-pass/phase-use-ignored.rs @@ -11,7 +11,7 @@ #![feature(phase)] -#[phase(syntax)] +#[phase(plugin)] use std::mem; fn main() {} diff --git a/src/test/run-pass/tcp-stress.rs b/src/test/run-pass/tcp-stress.rs index a9a6e25adf3..9c4716e5f4d 100644 --- a/src/test/run-pass/tcp-stress.rs +++ b/src/test/run-pass/tcp-stress.rs @@ -13,7 +13,7 @@ // exec-env:RUST_LOG=debug #![feature(phase)] -#[phase(syntax, link)] +#[phase(plugin, link)] extern crate log; extern crate libc; extern crate green; |
