Replace #[phase] with #[plugin] / #[macro_use] / #[no_link]

This commit is contained in:
Keegan McAllister 2014-12-31 20:43:46 -08:00
parent f314e2c4ea
commit 60be2f52d2
82 changed files with 363 additions and 236 deletions

View file

@ -11,8 +11,7 @@
// no-prefer-dynamic
#![crate_type = "rlib"]
#![feature(phase)]
#[phase(plugin)] extern crate "issue-13560-1" as t1;
#[phase(plugin, link)] extern crate "issue-13560-2" as t2;
#[macro_use] #[no_link] extern crate "issue-13560-1" as t1;
#[macro_use] extern crate "issue-13560-2" as t2;

View file

@ -10,12 +10,12 @@
// force-host
#![feature(phase, plugin_registrar)]
#![feature(plugin_registrar)]
extern crate syntax;
// Load rustc as a plugin to get macros
#[phase(plugin, link)]
#[macro_use]
extern crate rustc;
use syntax::ast;

View file

@ -10,12 +10,12 @@
// force-host
#![feature(phase, plugin_registrar)]
#![feature(plugin_registrar)]
extern crate syntax;
// Load rustc as a plugin to get macros
#[phase(plugin, link)]
#[macro_use]
extern crate rustc;
use syntax::ast;

View file

@ -8,8 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(phase)]
#[phase(plugin, link)] extern crate log;
#[macro_use] extern crate log;
pub fn foo<T>() {
fn death() -> int { panic!() }

View file

@ -9,9 +9,8 @@
// except according to those terms.
#![crate_type = "dylib"]
#![feature(phase)]
#![macro_reexport(reexported)]
#[phase(plugin)]
#[macro_use] #[no_link]
extern crate macro_reexport_1;

View file

@ -14,10 +14,9 @@
// it hasn't been defined just yet. Make sure we don't explode.
#![no_std]
#![feature(phase)]
#![crate_type = "rlib"]
#[phase(plugin, link)]
#[macro_use]
extern crate core;
struct A;

View file

@ -41,7 +41,7 @@
// ignore-stage1
// ignore-cross-compile #12102
#![feature(macro_rules, phase, slicing_syntax)]
#![feature(macro_rules, plugin, slicing_syntax)]
extern crate regex;

View file

@ -11,8 +11,8 @@
// aux-build:macro_crate_test.rs
// ignore-stage1
#[phase(plugin)]
//~^ ERROR compile time crate loading is experimental and possibly buggy
#[plugin] #[no_link]
//~^ ERROR compiler plugins are experimental and possibly buggy
extern crate macro_crate_test;
fn main() {}

View file

@ -12,9 +12,9 @@
// ignore-stage1
// compile-flags: -D lint-me
#![feature(phase)]
#![feature(plugin)]
#[phase(plugin)]
#[plugin] #[no_link]
extern crate lint_group_plugin_test;
fn lintme() { } //~ ERROR item is named 'lintme'

View file

@ -11,10 +11,10 @@
// aux-build:lint_plugin_test.rs
// ignore-stage1
#![feature(phase)]
#![feature(plugin)]
#![deny(test_lint)]
#[phase(plugin)]
#[plugin] #[no_link]
extern crate lint_plugin_test;
fn lintme() { } //~ ERROR item is named 'lintme'

View file

@ -12,9 +12,9 @@
// ignore-stage1
// compile-flags: -D test-lint
#![feature(phase)]
#![feature(plugin)]
#[phase(plugin)]
#[plugin] #[no_link]
extern crate lint_plugin_test;
fn lintme() { } //~ ERROR item is named 'lintme'

View file

@ -11,10 +11,10 @@
// aux-build:lint_plugin_test.rs
// ignore-stage1
#![feature(phase)]
#![feature(plugin)]
#![forbid(test_lint)]
#[phase(plugin)]
#[plugin] #[no_link]
extern crate lint_plugin_test;
fn lintme() { } //~ ERROR item is named 'lintme'

View file

@ -12,9 +12,9 @@
// ignore-stage1
// compile-flags: -F test-lint
#![feature(phase)]
#![feature(plugin)]
#[phase(plugin)]
#[plugin] #[no_link]
extern crate lint_plugin_test;
fn lintme() { } //~ ERROR item is named 'lintme'

View file

@ -20,9 +20,9 @@
// editors, so instead he made a macro that expands into the embedded
// ident form.
#![feature(phase)]
#![feature(plugin)]
#[phase(plugin)]
#[plugin] #[no_link]
extern crate macro_crate_test;
fn main() {

View file

@ -12,9 +12,7 @@
// ignore-stage1
// ignore-android
#![feature(phase)]
#[phase(plugin)]
#[macro_use] #[no_link]
extern crate macro_crate_test;
fn main() {

View file

@ -14,8 +14,8 @@
// ignore-android
// ignore-cross-compile gives a different error message
#![feature(phase)]
#[phase(plugin)] extern crate rlib_crate_test;
#![feature(plugin)]
#[plugin] #[no_link] extern crate rlib_crate_test;
//~^ ERROR: plugin crate `rlib_crate_test` only found in rlib format, but must be available in dylib format
fn main() {}

View file

@ -12,9 +12,7 @@
// ignore-stage1
// ignore-android
#![feature(phase)]
#[phase(plugin)]
#[macro_use] #[no_link]
extern crate macro_crate_test;
fn main() {

View file

@ -8,9 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(phase)]
#[phase(plugin)]
#[macro_use] #[no_link]
extern crate doesnt_exist; //~ ERROR can't find crate
fn main() {}

View file

@ -13,9 +13,9 @@
// ignore-android
// error-pattern: plugin tried to register a new MacroRulesTT
#![feature(phase)]
#![feature(plugin)]
#[phase(plugin)]
#[plugin] #[no_link]
extern crate macro_crate_MacroRulesTT;
fn main() { }

View file

@ -8,11 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(phase)]
#[phase(plugin)]
use std::mem;
#[phase(blah)]
//~^ ERROR #[phase] is deprecated
extern crate foo;
fn main() {}

View file

@ -8,11 +8,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(phase)]
#![deny(dead_code)]
#![allow(unreachable_code)]
#[phase(link, plugin)] extern crate core;
#[macro_use] extern crate core;
fn foo() { //~ ERROR function is never used

View file

@ -13,7 +13,7 @@
// aux-build:stability_cfg1.rs
// aux-build:stability_cfg2.rs
#![feature(globs, phase)]
#![feature(globs)]
#![deny(unstable)]
#![deny(deprecated)]
#![deny(experimental)]
@ -23,7 +23,7 @@ mod cross_crate {
extern crate stability_cfg1;
extern crate stability_cfg2; //~ ERROR: use of experimental item
#[phase(plugin, link)]
#[macro_use]
extern crate lint_stability; //~ ERROR: use of unmarked item
use self::lint_stability::*;

View file

@ -1,4 +1,4 @@
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// 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.
//
@ -8,12 +8,12 @@
// 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;
#[no_link]
extern crate libc;
fn main() {
debug!("foo");
unsafe {
libc::abs(0); //~ ERROR Use of undeclared type or module `libc`
//~^ ERROR unresolved name `libc::abs`
}
}

View file

@ -1,7 +1,6 @@
#![feature(phase)]
#![no_std]
#![feature(globs)]
#[phase(plugin, link)]
#[macro_use]
extern crate "std" as std;
#[prelude_import]
use std::prelude::v1::*;

View file

@ -10,8 +10,7 @@
// error-pattern:whatever
#![feature(phase)]
#[phase(plugin, link)] extern crate log;
#[macro_use] extern crate log;
use std::os;
fn main() {

View file

@ -10,8 +10,7 @@
// error-pattern:whatever
#![feature(phase)]
#[phase(plugin, link)] extern crate log;
#[macro_use] extern crate log;
use std::os;
use std::thread::Thread;

View file

@ -10,8 +10,7 @@
// error-pattern:whatever
#![feature(phase)]
#[phase(plugin, link)] extern crate log;
#[macro_use] extern crate log;
use std::os;
fn main() {

View file

@ -8,9 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(phase)]
#[phase(plugin, link)]
#[macro_use]
extern crate foo;
fn main() {

View file

@ -8,9 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(phase)]
extern crate lib;
#[phase(plugin, link)] extern crate log;
#[macro_use] extern crate log;
fn main() {}

View file

@ -11,9 +11,9 @@
// ignore-stage1
// ignore-android
// aux-build:issue_16723_multiple_items_syntax_ext.rs
#![feature(phase)]
#![feature(plugin)]
#[phase(plugin)] extern crate issue_16723_multiple_items_syntax_ext;
#[plugin] #[no_link] extern crate issue_16723_multiple_items_syntax_ext;
multiple_items!();

View file

@ -12,9 +12,9 @@
// ignore-stage1
// ignore-pretty
#![feature(phase)]
#![feature(plugin)]
#[phase(plugin)]
#[plugin] #[no_link]
extern crate lint_group_plugin_test;
fn lintme() { } //~ WARNING item is named 'lintme'

View file

@ -12,9 +12,9 @@
// ignore-stage1
// compile-flags: -A test-lint
#![feature(phase)]
#![feature(plugin)]
#[phase(plugin)]
#[plugin] #[no_link]
extern crate lint_plugin_test;
fn lintme() { }

View file

@ -12,9 +12,9 @@
// ignore-stage1
// ignore-pretty
#![feature(phase)]
#![feature(plugin)]
#[phase(plugin)]
#[plugin] #[no_link]
extern crate lint_plugin_test;
fn lintme() { } //~ WARNING item is named 'lintme'

View file

@ -14,9 +14,9 @@
// Issue #15750: a macro that internally parses its input and then
// uses `quote_expr!` to rearrange it should be hygiene-preserving.
#![feature(phase)]
#![feature(plugin)]
#[phase(plugin)]
#[plugin] #[no_link]
extern crate macro_crate_test;
fn main() {

View file

@ -11,9 +11,9 @@
// aux-build:plugin_crate_outlive_expansion_phase.rs
// ignore-stage1
#![feature(phase)]
#![feature(plugin)]
#[phase(plugin)]
#[plugin] #[no_link]
extern crate plugin_crate_outlive_expansion_phase;
pub fn main() {}

View file

@ -11,9 +11,9 @@
// aux-build:macro_crate_test.rs
// ignore-stage1
#![feature(phase)]
#![feature(plugin)]
#[phase(plugin)]
#[macro_use] #[plugin] #[no_link]
extern crate macro_crate_test;
#[into_foo]

View file

@ -15,9 +15,9 @@
// macro_crate_test will not compile on a cross-compiled target because
// libsyntax is not compiled for it.
#![feature(phase)]
#![feature(plugin)]
#[phase(plugin, link)]
#[plugin]
extern crate macro_crate_test;
fn main() {

View file

@ -11,9 +11,9 @@
// aux-build:roman_numerals.rs
// ignore-stage1
#![feature(phase)]
#![feature(plugin)]
#[phase(plugin)]
#[plugin] #[no_link]
extern crate roman_numerals;
pub fn main() {

View file

@ -12,9 +12,9 @@
// aux-build:syntax-extension-with-dll-deps-2.rs
// ignore-stage1
#![feature(phase)]
#![feature(plugin)]
#[phase(plugin)]
#[plugin] #[no_link]
extern crate "syntax-extension-with-dll-deps-2" as extension;
fn main() {

View file

@ -11,9 +11,7 @@
// ignore-android (FIXME #11419)
// exec-env:RUST_LOG=info
#![feature(phase)]
#[phase(plugin, link)]
#[macro_use]
extern crate log;
use log::{set_logger, Logger, LogRecord};

View file

@ -11,8 +11,7 @@
// compile-flags: --cfg ndebug
// exec-env:RUST_LOG=conditional-debug-macro-off=4
#![feature(phase)]
#[phase(plugin, link)]
#[macro_use]
extern crate log;
pub fn main() {

View file

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(phase)]
#[phase(plugin, link)] extern crate "std" as std2;
#[macro_use] extern crate "std" as std2;
fn main() {}

View file

@ -11,8 +11,7 @@
// compile-flags:--cfg ndebug
// exec-env:RUST_LOG=logging-enabled-debug=debug
#![feature(phase)]
#[phase(plugin, link)]
#[macro_use]
extern crate log;
pub fn main() {

View file

@ -10,8 +10,7 @@
// exec-env:RUST_LOG=logging-enabled=info
#![feature(phase)]
#[phase(plugin, link)]
#[macro_use]
extern crate log;
pub fn main() {

View file

@ -12,9 +12,7 @@
// ignore-windows
// exec-env:RUST_LOG=debug
#![feature(phase)]
#[phase(plugin, link)]
#[macro_use]
extern crate log;
use std::io::Command;

View file

@ -10,9 +10,7 @@
// aux-build:macro_crate_def_only.rs
#![feature(phase)]
#[phase(plugin)]
#[macro_use] #[no_link]
extern crate macro_crate_def_only;
pub fn main() {

View file

@ -11,9 +11,7 @@
// aux-build:macro_crate_nonterminal.rs
// ignore-stage1
#![feature(phase)]
#[phase(plugin, link)]
#[macro_use]
extern crate "macro_crate_nonterminal" as new_name;
pub fn main() {

View file

@ -11,9 +11,7 @@
// aux-build:macro_crate_nonterminal.rs
// ignore-stage1
#![feature(phase)]
#[phase(plugin, link)]
#[macro_use]
extern crate macro_crate_nonterminal;
pub fn main() {

View file

@ -11,9 +11,7 @@
//aux-build:macro_export_inner_module.rs
//ignore-stage1
#![feature(phase)]
#[phase(plugin)]
#[macro_use] #[no_link]
extern crate macro_export_inner_module;
pub fn main() {

View file

@ -12,9 +12,7 @@
// aux-build:macro_reexport_2.rs
// ignore-stage1
#![feature(phase)]
#[phase(plugin)]
#[macro_use] #[no_link]
extern crate macro_reexport_2;
fn main() {

View file

@ -10,8 +10,7 @@
// exec-env:RUST_LOG=rust-log-filter/f.o
#![feature(phase)]
#[phase(plugin,link)]
#[macro_use]
extern crate log;
use std::sync::mpsc::{channel, Sender, Receiver};

View file

@ -12,8 +12,7 @@
// ignore-android needs extra network permissions
// exec-env:RUST_LOG=debug
#![feature(phase)]
#[phase(plugin, link)]
#[macro_use]
extern crate log;
extern crate libc;

View file

@ -8,14 +8,14 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(phase, lang_items)]
#![feature(lang_items)]
#![no_std]
#[phase(plugin, link)]
#[macro_use]
extern crate core;
extern crate libc;
#[phase(plugin, link)]
#[macro_use]
extern crate collections;
use core::option::Option::Some;