diff --git a/src/test/compile-fail-fulldeps/auxiliary/lint_group_plugin_test.rs b/src/test/compile-fail-fulldeps/auxiliary/lint_group_plugin_test.rs deleted file mode 100644 index f697642f8431d..0000000000000 --- a/src/test/compile-fail-fulldeps/auxiliary/lint_group_plugin_test.rs +++ /dev/null @@ -1,51 +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 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// force-host - -#![feature(plugin_registrar)] -#![feature(box_syntax, rustc_private)] - -// Load rustc as a plugin to get macros -#[macro_use] -extern crate rustc; -extern crate rustc_plugin; - -use rustc::hir; -use rustc::lint::{LateContext, LintContext, LintPass, LateLintPass, LateLintPassObject, LintArray}; -use rustc_plugin::Registry; - -declare_lint!(TEST_LINT, Warn, "Warn about items named 'lintme'"); - -declare_lint!(PLEASE_LINT, Warn, "Warn about items named 'pleaselintme'"); - -struct Pass; - -impl LintPass for Pass { - fn get_lints(&self) -> LintArray { - lint_array!(TEST_LINT, PLEASE_LINT) - } -} - -impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass { - fn check_item(&mut self, cx: &LateContext, it: &hir::Item) { - match &*it.name.as_str() { - "lintme" => cx.span_lint(TEST_LINT, it.span, "item is named 'lintme'"), - "pleaselintme" => cx.span_lint(PLEASE_LINT, it.span, "item is named 'pleaselintme'"), - _ => {} - } - } -} - -#[plugin_registrar] -pub fn plugin_registrar(reg: &mut Registry) { - reg.register_late_lint_pass(box Pass); - reg.register_lint_group("lint_me", None, vec![TEST_LINT, PLEASE_LINT]); -} diff --git a/src/test/compile-fail-fulldeps/auxiliary/lint_plugin_test.rs b/src/test/compile-fail-fulldeps/auxiliary/lint_plugin_test.rs deleted file mode 100644 index 8647797270f9a..0000000000000 --- a/src/test/compile-fail-fulldeps/auxiliary/lint_plugin_test.rs +++ /dev/null @@ -1,48 +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 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// force-host - -#![feature(plugin_registrar)] -#![feature(box_syntax, rustc_private)] - -extern crate syntax; - -// Load rustc as a plugin to get macros -#[macro_use] -extern crate rustc; -extern crate rustc_plugin; - -use rustc::lint::{EarlyContext, LintContext, LintPass, EarlyLintPass, - EarlyLintPassObject, LintArray}; -use rustc_plugin::Registry; -use syntax::ast; -declare_lint!(TEST_LINT, Warn, "Warn about items named 'lintme'"); - -struct Pass; - -impl LintPass for Pass { - fn get_lints(&self) -> LintArray { - lint_array!(TEST_LINT) - } -} - -impl EarlyLintPass for Pass { - fn check_item(&mut self, cx: &EarlyContext, it: &ast::Item) { - if it.ident.name == "lintme" { - cx.span_lint(TEST_LINT, it.span, "item is named 'lintme'"); - } - } -} - -#[plugin_registrar] -pub fn plugin_registrar(reg: &mut Registry) { - reg.register_early_lint_pass(box Pass as EarlyLintPassObject); -} diff --git a/src/test/compile-fail-fulldeps/auxiliary/attr_plugin_test.rs b/src/test/ui-fulldeps/auxiliary/attr_plugin_test.rs similarity index 100% rename from src/test/compile-fail-fulldeps/auxiliary/attr_plugin_test.rs rename to src/test/ui-fulldeps/auxiliary/attr_plugin_test.rs diff --git a/src/test/compile-fail-fulldeps/auxiliary/lint_for_crate.rs b/src/test/ui-fulldeps/auxiliary/lint_for_crate.rs similarity index 100% rename from src/test/compile-fail-fulldeps/auxiliary/lint_for_crate.rs rename to src/test/ui-fulldeps/auxiliary/lint_for_crate.rs diff --git a/src/test/compile-fail-fulldeps/auxiliary/macro_crate_test.rs b/src/test/ui-fulldeps/auxiliary/macro_crate_test.rs similarity index 100% rename from src/test/compile-fail-fulldeps/auxiliary/macro_crate_test.rs rename to src/test/ui-fulldeps/auxiliary/macro_crate_test.rs diff --git a/src/test/compile-fail-fulldeps/auxiliary/macro_reexport_1.rs b/src/test/ui-fulldeps/auxiliary/macro_reexport_1.rs similarity index 100% rename from src/test/compile-fail-fulldeps/auxiliary/macro_reexport_1.rs rename to src/test/ui-fulldeps/auxiliary/macro_reexport_1.rs diff --git a/src/test/compile-fail-fulldeps/auxiliary/pub_and_stability.rs b/src/test/ui-fulldeps/auxiliary/pub_and_stability.rs similarity index 100% rename from src/test/compile-fail-fulldeps/auxiliary/pub_and_stability.rs rename to src/test/ui-fulldeps/auxiliary/pub_and_stability.rs diff --git a/src/test/compile-fail-fulldeps/auxiliary/rlib_crate_test.rs b/src/test/ui-fulldeps/auxiliary/rlib_crate_test.rs similarity index 100% rename from src/test/compile-fail-fulldeps/auxiliary/rlib_crate_test.rs rename to src/test/ui-fulldeps/auxiliary/rlib_crate_test.rs diff --git a/src/test/compile-fail-fulldeps/auxiliary/use_from_trait_xc.rs b/src/test/ui-fulldeps/auxiliary/use_from_trait_xc.rs similarity index 100% rename from src/test/compile-fail-fulldeps/auxiliary/use_from_trait_xc.rs rename to src/test/ui-fulldeps/auxiliary/use_from_trait_xc.rs diff --git a/src/test/compile-fail-fulldeps/dropck_tarena_cycle_checked.rs b/src/test/ui-fulldeps/dropck_tarena_cycle_checked.rs similarity index 100% rename from src/test/compile-fail-fulldeps/dropck_tarena_cycle_checked.rs rename to src/test/ui-fulldeps/dropck_tarena_cycle_checked.rs diff --git a/src/test/ui-fulldeps/dropck_tarena_cycle_checked.stderr b/src/test/ui-fulldeps/dropck_tarena_cycle_checked.stderr new file mode 100644 index 0000000000000..eae33bab45392 --- /dev/null +++ b/src/test/ui-fulldeps/dropck_tarena_cycle_checked.stderr @@ -0,0 +1,13 @@ +error[E0597]: `arena` does not live long enough + --> $DIR/dropck_tarena_cycle_checked.rs:126:8 + | +LL | f(&arena); + | ^^^^^ borrowed value does not live long enough +LL | } //~^ ERROR `arena` does not live long enough + | - `arena` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/compile-fail-fulldeps/dropck_tarena_unsound_drop.rs b/src/test/ui-fulldeps/dropck_tarena_unsound_drop.rs similarity index 100% rename from src/test/compile-fail-fulldeps/dropck_tarena_unsound_drop.rs rename to src/test/ui-fulldeps/dropck_tarena_unsound_drop.rs diff --git a/src/test/ui-fulldeps/dropck_tarena_unsound_drop.stderr b/src/test/ui-fulldeps/dropck_tarena_unsound_drop.stderr new file mode 100644 index 0000000000000..75ceb692c7595 --- /dev/null +++ b/src/test/ui-fulldeps/dropck_tarena_unsound_drop.stderr @@ -0,0 +1,13 @@ +error[E0597]: `arena` does not live long enough + --> $DIR/dropck_tarena_unsound_drop.rs:51:8 + | +LL | f(&arena); + | ^^^^^ borrowed value does not live long enough +LL | } //~^ ERROR `arena` does not live long enough + | - `arena` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0597`. diff --git a/src/test/compile-fail-fulldeps/explore-issue-38412.rs b/src/test/ui-fulldeps/explore-issue-38412.rs similarity index 100% rename from src/test/compile-fail-fulldeps/explore-issue-38412.rs rename to src/test/ui-fulldeps/explore-issue-38412.rs diff --git a/src/test/ui-fulldeps/explore-issue-38412.stderr b/src/test/ui-fulldeps/explore-issue-38412.stderr new file mode 100644 index 0000000000000..8e31c1c7e017e --- /dev/null +++ b/src/test/ui-fulldeps/explore-issue-38412.stderr @@ -0,0 +1,132 @@ +error[E0658]: use of unstable library feature 'unstable_undeclared' (see issue #38412) + --> $DIR/explore-issue-38412.rs:31:63 + | +LL | let Record { a_stable_pub: _, a_unstable_declared_pub: _, a_unstable_undeclared_pub: _, .. } = + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(unstable_undeclared)] to the crate attributes to enable + +error[E0658]: use of unstable library feature 'unstable_undeclared' (see issue #38412) + --> $DIR/explore-issue-38412.rs:40:5 + | +LL | r.a_unstable_undeclared_pub; //~ ERROR use of unstable library feature + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(unstable_undeclared)] to the crate attributes to enable + +error[E0616]: field `b_crate` of struct `pub_and_stability::Record` is private + --> $DIR/explore-issue-38412.rs:41:5 + | +LL | r.b_crate; //~ ERROR is private + | ^^^^^^^^^ + +error[E0616]: field `c_mod` of struct `pub_and_stability::Record` is private + --> $DIR/explore-issue-38412.rs:42:5 + | +LL | r.c_mod; //~ ERROR is private + | ^^^^^^^ + +error[E0616]: field `d_priv` of struct `pub_and_stability::Record` is private + --> $DIR/explore-issue-38412.rs:43:5 + | +LL | r.d_priv; //~ ERROR is private + | ^^^^^^^^ + +error[E0658]: use of unstable library feature 'unstable_undeclared' (see issue #38412) + --> $DIR/explore-issue-38412.rs:47:5 + | +LL | t.2; //~ ERROR use of unstable library feature + | ^^^ + | + = help: add #![feature(unstable_undeclared)] to the crate attributes to enable + +error[E0616]: field `3` of struct `pub_and_stability::Tuple` is private + --> $DIR/explore-issue-38412.rs:48:5 + | +LL | t.3; //~ ERROR is private + | ^^^ + +error[E0616]: field `4` of struct `pub_and_stability::Tuple` is private + --> $DIR/explore-issue-38412.rs:49:5 + | +LL | t.4; //~ ERROR is private + | ^^^ + +error[E0616]: field `5` of struct `pub_and_stability::Tuple` is private + --> $DIR/explore-issue-38412.rs:50:5 + | +LL | t.5; //~ ERROR is private + | ^^^ + +error[E0658]: use of unstable library feature 'unstable_undeclared' (see issue #38412) + --> $DIR/explore-issue-38412.rs:54:7 + | +LL | r.unstable_undeclared_trait_method(); //~ ERROR use of unstable library feature + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(unstable_undeclared)] to the crate attributes to enable + +error[E0658]: use of unstable library feature 'unstable_undeclared' (see issue #38412) + --> $DIR/explore-issue-38412.rs:58:7 + | +LL | r.unstable_undeclared(); //~ ERROR use of unstable library feature + | ^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(unstable_undeclared)] to the crate attributes to enable + +error[E0624]: method `pub_crate` is private + --> $DIR/explore-issue-38412.rs:60:7 + | +LL | r.pub_crate(); //~ ERROR `pub_crate` is private + | ^^^^^^^^^ + +error[E0624]: method `pub_mod` is private + --> $DIR/explore-issue-38412.rs:61:7 + | +LL | r.pub_mod(); //~ ERROR `pub_mod` is private + | ^^^^^^^ + +error[E0624]: method `private` is private + --> $DIR/explore-issue-38412.rs:62:7 + | +LL | r.private(); //~ ERROR `private` is private + | ^^^^^^^ + +error[E0658]: use of unstable library feature 'unstable_undeclared' (see issue #38412) + --> $DIR/explore-issue-38412.rs:67:7 + | +LL | t.unstable_undeclared_trait_method(); //~ ERROR use of unstable library feature + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(unstable_undeclared)] to the crate attributes to enable + +error[E0658]: use of unstable library feature 'unstable_undeclared' (see issue #38412) + --> $DIR/explore-issue-38412.rs:71:7 + | +LL | t.unstable_undeclared(); //~ ERROR use of unstable library feature + | ^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(unstable_undeclared)] to the crate attributes to enable + +error[E0624]: method `pub_crate` is private + --> $DIR/explore-issue-38412.rs:73:7 + | +LL | t.pub_crate(); //~ ERROR `pub_crate` is private + | ^^^^^^^^^ + +error[E0624]: method `pub_mod` is private + --> $DIR/explore-issue-38412.rs:74:7 + | +LL | t.pub_mod(); //~ ERROR `pub_mod` is private + | ^^^^^^^ + +error[E0624]: method `private` is private + --> $DIR/explore-issue-38412.rs:75:7 + | +LL | t.private(); //~ ERROR `private` is private + | ^^^^^^^ + +error: aborting due to 19 previous errors + +Some errors occurred: E0616, E0624, E0658. +For more information about an error, try `rustc --explain E0616`. diff --git a/src/test/compile-fail-fulldeps/gated-plugin.rs b/src/test/ui-fulldeps/gated-plugin.rs similarity index 100% rename from src/test/compile-fail-fulldeps/gated-plugin.rs rename to src/test/ui-fulldeps/gated-plugin.rs diff --git a/src/test/ui-fulldeps/gated-plugin.stderr b/src/test/ui-fulldeps/gated-plugin.stderr new file mode 100644 index 0000000000000..075bc799b3349 --- /dev/null +++ b/src/test/ui-fulldeps/gated-plugin.stderr @@ -0,0 +1,11 @@ +error[E0658]: compiler plugins are experimental and possibly buggy (see issue #29597) + --> $DIR/gated-plugin.rs:13:1 + | +LL | #![plugin(macro_crate_test)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(plugin)] to the crate attributes to enable + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/compile-fail-fulldeps/gated-quote.rs b/src/test/ui-fulldeps/gated-quote.rs similarity index 100% rename from src/test/compile-fail-fulldeps/gated-quote.rs rename to src/test/ui-fulldeps/gated-quote.rs diff --git a/src/test/ui-fulldeps/gated-quote.stderr b/src/test/ui-fulldeps/gated-quote.stderr new file mode 100644 index 0000000000000..db091938c6ea8 --- /dev/null +++ b/src/test/ui-fulldeps/gated-quote.stderr @@ -0,0 +1,80 @@ +error: cannot find macro `quote_path!` in this scope + --> $DIR/gated-quote.rs:65:13 + | +LL | let x = quote_path!(ecx, 3); + | ^^^^^^^^^^ + +error: cannot find macro `quote_meta_item!` in this scope + --> $DIR/gated-quote.rs:63:13 + | +LL | let x = quote_meta_item!(ecx, 3); + | ^^^^^^^^^^^^^^^ + +error: cannot find macro `quote_block!` in this scope + --> $DIR/gated-quote.rs:61:13 + | +LL | let x = quote_block!(ecx, 3); + | ^^^^^^^^^^^ + +error: cannot find macro `quote_arg!` in this scope + --> $DIR/gated-quote.rs:59:13 + | +LL | let x = quote_arg!(ecx, 3); + | ^^^^^^^^^ + +error: cannot find macro `quote_attr!` in this scope + --> $DIR/gated-quote.rs:57:13 + | +LL | let x = quote_attr!(ecx, 3); + | ^^^^^^^^^^ + +error: cannot find macro `quote_stmt!` in this scope + --> $DIR/gated-quote.rs:55:13 + | +LL | let x = quote_stmt!(ecx, 3); + | ^^^^^^^^^^ + +error: cannot find macro `quote_arm!` in this scope + --> $DIR/gated-quote.rs:53:13 + | +LL | let x = quote_arm!(ecx, 3); + | ^^^^^^^^^ + +error: cannot find macro `quote_pat!` in this scope + --> $DIR/gated-quote.rs:51:13 + | +LL | let x = quote_pat!(ecx, 3); + | ^^^^^^^^^ + +error: cannot find macro `quote_item!` in this scope + --> $DIR/gated-quote.rs:49:13 + | +LL | let x = quote_item!(ecx, 3); + | ^^^^^^^^^^ + +error: cannot find macro `quote_method!` in this scope + --> $DIR/gated-quote.rs:47:13 + | +LL | let x = quote_method!(ecx, 3); + | ^^^^^^^^^^^^ + +error: cannot find macro `quote_ty!` in this scope + --> $DIR/gated-quote.rs:45:13 + | +LL | let x = quote_ty!(ecx, 3); + | ^^^^^^^^ + +error: cannot find macro `quote_expr!` in this scope + --> $DIR/gated-quote.rs:43:13 + | +LL | let x = quote_expr!(ecx, 3); + | ^^^^^^^^^^ + +error: cannot find macro `quote_tokens!` in this scope + --> $DIR/gated-quote.rs:41:13 + | +LL | let x = quote_tokens!(ecx, 3); + | ^^^^^^^^^^^^ + +error: aborting due to 13 previous errors + diff --git a/src/test/compile-fail-fulldeps/issue-15778-fail.rs b/src/test/ui-fulldeps/issue-15778-fail.rs similarity index 100% rename from src/test/compile-fail-fulldeps/issue-15778-fail.rs rename to src/test/ui-fulldeps/issue-15778-fail.rs diff --git a/src/test/ui-fulldeps/issue-15778-fail.stderr b/src/test/ui-fulldeps/issue-15778-fail.stderr new file mode 100644 index 0000000000000..49a2b260a1e31 --- /dev/null +++ b/src/test/ui-fulldeps/issue-15778-fail.stderr @@ -0,0 +1,13 @@ +error: crate is not marked with #![crate_okay] + --> $DIR/issue-15778-fail.rs:15:1 + | +LL | / #![feature(plugin)] //~ ERROR crate is not marked with #![crate_okay] +LL | | #![plugin(lint_for_crate)] +LL | | +LL | | pub fn main() { } + | |_________________^ + | + = note: requested on the command line with `-D crate-not-okay` + +error: aborting due to previous error + diff --git a/src/test/compile-fail-fulldeps/issue-18986.rs b/src/test/ui-fulldeps/issue-18986.rs similarity index 100% rename from src/test/compile-fail-fulldeps/issue-18986.rs rename to src/test/ui-fulldeps/issue-18986.rs diff --git a/src/test/ui-fulldeps/issue-18986.stderr b/src/test/ui-fulldeps/issue-18986.stderr new file mode 100644 index 0000000000000..241cc4250a38d --- /dev/null +++ b/src/test/ui-fulldeps/issue-18986.stderr @@ -0,0 +1,9 @@ +error[E0574]: expected struct, variant or union type, found trait `Trait` + --> $DIR/issue-18986.rs:18:9 + | +LL | Trait { x: 42 } => () //~ ERROR expected struct, variant or union type, found trait `Trait` + | ^^^^^ not a struct, variant or union type + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0574`. diff --git a/src/test/compile-fail-fulldeps/issue-48941.rs b/src/test/ui-fulldeps/issue-48941.rs similarity index 100% rename from src/test/compile-fail-fulldeps/issue-48941.rs rename to src/test/ui-fulldeps/issue-48941.rs diff --git a/src/test/ui-fulldeps/issue-48941.stderr b/src/test/ui-fulldeps/issue-48941.stderr new file mode 100644 index 0000000000000..606c51fc5004d --- /dev/null +++ b/src/test/ui-fulldeps/issue-48941.stderr @@ -0,0 +1,14 @@ +error: expected unsuffixed literal or identifier, found a + --> $DIR/issue-48941.rs:20:24 + | +LL | #[noop_attribute("hi", rank = a)] //~ ERROR expected unsuffixed literal or identifier, found a + | ^^^^ + +error: expected unsuffixed literal or identifier, found = + --> $DIR/issue-48941.rs:23:27 + | +LL | #[noop_attribute("/user", data= = " $DIR/lint-group-plugin-deny-cmdline.rs:18:1 + | +LL | fn lintme() { } //~ ERROR item is named 'lintme' + | ^^^^^^^^^^^^^^^ + | + = note: `-D test-lint` implied by `-D lint-me` + +error: item is named 'pleaselintme' + --> $DIR/lint-group-plugin-deny-cmdline.rs:20:1 + | +LL | fn pleaselintme() { } //~ ERROR item is named 'pleaselintme' + | ^^^^^^^^^^^^^^^^^^^^^ + | + = note: `-D please-lint` implied by `-D lint-me` + +error: aborting due to 2 previous errors + diff --git a/src/test/compile-fail-fulldeps/lint-plugin-deny-attr.rs b/src/test/ui-fulldeps/lint-plugin-deny-attr.rs similarity index 100% rename from src/test/compile-fail-fulldeps/lint-plugin-deny-attr.rs rename to src/test/ui-fulldeps/lint-plugin-deny-attr.rs diff --git a/src/test/ui-fulldeps/lint-plugin-deny-attr.stderr b/src/test/ui-fulldeps/lint-plugin-deny-attr.stderr new file mode 100644 index 0000000000000..e0ea1e0065a9e --- /dev/null +++ b/src/test/ui-fulldeps/lint-plugin-deny-attr.stderr @@ -0,0 +1,14 @@ +error: item is named 'lintme' + --> $DIR/lint-plugin-deny-attr.rs:18:1 + | +LL | fn lintme() { } //~ ERROR item is named 'lintme' + | ^^^^^^^^^^^^^^^ + | +note: lint level defined here + --> $DIR/lint-plugin-deny-attr.rs:16:9 + | +LL | #![deny(test_lint)] + | ^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/compile-fail-fulldeps/lint-plugin-deny-cmdline.rs b/src/test/ui-fulldeps/lint-plugin-deny-cmdline.rs similarity index 100% rename from src/test/compile-fail-fulldeps/lint-plugin-deny-cmdline.rs rename to src/test/ui-fulldeps/lint-plugin-deny-cmdline.rs diff --git a/src/test/ui-fulldeps/lint-plugin-deny-cmdline.stderr b/src/test/ui-fulldeps/lint-plugin-deny-cmdline.stderr new file mode 100644 index 0000000000000..9084253b71e98 --- /dev/null +++ b/src/test/ui-fulldeps/lint-plugin-deny-cmdline.stderr @@ -0,0 +1,10 @@ +error: item is named 'lintme' + --> $DIR/lint-plugin-deny-cmdline.rs:18:1 + | +LL | fn lintme() { } //~ ERROR item is named 'lintme' + | ^^^^^^^^^^^^^^^ + | + = note: requested on the command line with `-D test-lint` + +error: aborting due to previous error + diff --git a/src/test/compile-fail-fulldeps/lint-plugin-forbid-cmdline.rs b/src/test/ui-fulldeps/lint-plugin-forbid-cmdline.rs similarity index 100% rename from src/test/compile-fail-fulldeps/lint-plugin-forbid-cmdline.rs rename to src/test/ui-fulldeps/lint-plugin-forbid-cmdline.rs diff --git a/src/test/ui-fulldeps/lint-plugin-forbid-cmdline.stderr b/src/test/ui-fulldeps/lint-plugin-forbid-cmdline.stderr new file mode 100644 index 0000000000000..30043db41da89 --- /dev/null +++ b/src/test/ui-fulldeps/lint-plugin-forbid-cmdline.stderr @@ -0,0 +1,19 @@ +error[E0453]: allow(test_lint) overruled by outer forbid(test_lint) + --> $DIR/lint-plugin-forbid-cmdline.rs:20:9 + | +LL | #[allow(test_lint)] //~ ERROR allow(test_lint) overruled by outer forbid(test_lint) + | ^^^^^^^^^ overruled by previous forbid + | + = note: `forbid` lint level was set on command line + +error: item is named 'lintme' + --> $DIR/lint-plugin-forbid-cmdline.rs:18:1 + | +LL | fn lintme() { } //~ ERROR item is named 'lintme' + | ^^^^^^^^^^^^^^^ + | + = note: requested on the command line with `-F test-lint` + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0453`. diff --git a/src/test/compile-fail-fulldeps/macro-crate-doesnt-resolve.rs b/src/test/ui-fulldeps/macro-crate-doesnt-resolve.rs similarity index 100% rename from src/test/compile-fail-fulldeps/macro-crate-doesnt-resolve.rs rename to src/test/ui-fulldeps/macro-crate-doesnt-resolve.rs diff --git a/src/test/ui-fulldeps/macro-crate-doesnt-resolve.stderr b/src/test/ui-fulldeps/macro-crate-doesnt-resolve.stderr new file mode 100644 index 0000000000000..c45cfa9070f07 --- /dev/null +++ b/src/test/ui-fulldeps/macro-crate-doesnt-resolve.stderr @@ -0,0 +1,9 @@ +error[E0425]: cannot find function `foo` in module `macro_crate_test` + --> $DIR/macro-crate-doesnt-resolve.rs:17:23 + | +LL | macro_crate_test::foo(); //~ ERROR cannot find function `foo` in module `macro_crate_test` + | ^^^ not found in `macro_crate_test` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0425`. diff --git a/src/test/compile-fail-fulldeps/macro-crate-rlib.rs b/src/test/ui-fulldeps/macro-crate-rlib.rs similarity index 100% rename from src/test/compile-fail-fulldeps/macro-crate-rlib.rs rename to src/test/ui-fulldeps/macro-crate-rlib.rs diff --git a/src/test/ui-fulldeps/macro-crate-rlib.stderr b/src/test/ui-fulldeps/macro-crate-rlib.stderr new file mode 100644 index 0000000000000..8a7f7883a1088 --- /dev/null +++ b/src/test/ui-fulldeps/macro-crate-rlib.stderr @@ -0,0 +1,9 @@ +error[E0457]: plugin `rlib_crate_test` only found in rlib format, but must be available in dylib format + --> $DIR/macro-crate-rlib.rs:16:11 + | +LL | #![plugin(rlib_crate_test)] + | ^^^^^^^^^^^^^^^ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0457`. diff --git a/src/test/compile-fail-fulldeps/macro-crate-unexported-macro.rs b/src/test/ui-fulldeps/macro-crate-unexported-macro.rs similarity index 100% rename from src/test/compile-fail-fulldeps/macro-crate-unexported-macro.rs rename to src/test/ui-fulldeps/macro-crate-unexported-macro.rs diff --git a/src/test/ui-fulldeps/macro-crate-unexported-macro.stderr b/src/test/ui-fulldeps/macro-crate-unexported-macro.stderr new file mode 100644 index 0000000000000..8d87c882a1ac4 --- /dev/null +++ b/src/test/ui-fulldeps/macro-crate-unexported-macro.stderr @@ -0,0 +1,8 @@ +error: cannot find macro `unexported_macro!` in this scope + --> $DIR/macro-crate-unexported-macro.rs:17:5 + | +LL | unexported_macro!(); + | ^^^^^^^^^^^^^^^^ help: you could try the macro: `exported_macro` + +error: aborting due to previous error + diff --git a/src/test/compile-fail-fulldeps/no-link-unknown-crate.rs b/src/test/ui-fulldeps/no-link-unknown-crate.rs similarity index 100% rename from src/test/compile-fail-fulldeps/no-link-unknown-crate.rs rename to src/test/ui-fulldeps/no-link-unknown-crate.rs diff --git a/src/test/ui-fulldeps/no-link-unknown-crate.stderr b/src/test/ui-fulldeps/no-link-unknown-crate.stderr new file mode 100644 index 0000000000000..182b484f80bfb --- /dev/null +++ b/src/test/ui-fulldeps/no-link-unknown-crate.stderr @@ -0,0 +1,9 @@ +error[E0463]: can't find crate for `doesnt_exist` + --> $DIR/no-link-unknown-crate.rs:12:1 + | +LL | extern crate doesnt_exist; //~ ERROR can't find crate + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0463`. diff --git a/src/test/compile-fail-fulldeps/plugin-as-extern-crate.rs b/src/test/ui-fulldeps/plugin-as-extern-crate.rs similarity index 100% rename from src/test/compile-fail-fulldeps/plugin-as-extern-crate.rs rename to src/test/ui-fulldeps/plugin-as-extern-crate.rs diff --git a/src/test/ui-fulldeps/plugin-as-extern-crate.stderr b/src/test/ui-fulldeps/plugin-as-extern-crate.stderr new file mode 100644 index 0000000000000..713f1b0734544 --- /dev/null +++ b/src/test/ui-fulldeps/plugin-as-extern-crate.stderr @@ -0,0 +1,14 @@ +error: compiler plugin used as an ordinary library + --> $DIR/plugin-as-extern-crate.rs:20:1 + | +LL | extern crate macro_crate_test; //~ ERROR compiler plugin used as an ordinary library + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +note: lint level defined here + --> $DIR/plugin-as-extern-crate.rs:17:9 + | +LL | #![deny(plugin_as_library)] + | ^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/compile-fail-fulldeps/plugin-attr-register-deny.rs b/src/test/ui-fulldeps/plugin-attr-register-deny.rs similarity index 100% rename from src/test/compile-fail-fulldeps/plugin-attr-register-deny.rs rename to src/test/ui-fulldeps/plugin-attr-register-deny.rs diff --git a/src/test/ui-fulldeps/plugin-attr-register-deny.stderr b/src/test/ui-fulldeps/plugin-attr-register-deny.stderr new file mode 100644 index 0000000000000..0bb2d1c9f5ee0 --- /dev/null +++ b/src/test/ui-fulldeps/plugin-attr-register-deny.stderr @@ -0,0 +1,26 @@ +error: unused attribute + --> $DIR/plugin-attr-register-deny.rs:24:5 + | +LL | #[bar] + | ^^^^^^ + | +note: lint level defined here + --> $DIR/plugin-attr-register-deny.rs:16:9 + | +LL | #![deny(unused_attributes)] + | ^^^^^^^^^^^^^^^^^ + +error: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/plugin-attr-register-deny.rs:24:5 + | +LL | #[bar] + | ^^^^^^ + +error: unused attribute + --> $DIR/plugin-attr-register-deny.rs:21:1 + | +LL | #[foo] + | ^^^^^^ + +error: aborting due to 3 previous errors + diff --git a/src/test/compile-fail-fulldeps/plugin-plus-extern-crate.rs b/src/test/ui-fulldeps/plugin-plus-extern-crate.rs similarity index 100% rename from src/test/compile-fail-fulldeps/plugin-plus-extern-crate.rs rename to src/test/ui-fulldeps/plugin-plus-extern-crate.rs diff --git a/src/test/ui-fulldeps/plugin-plus-extern-crate.stderr b/src/test/ui-fulldeps/plugin-plus-extern-crate.stderr new file mode 100644 index 0000000000000..faefe04e14ab8 --- /dev/null +++ b/src/test/ui-fulldeps/plugin-plus-extern-crate.stderr @@ -0,0 +1,14 @@ +error: compiler plugin used as an ordinary library + --> $DIR/plugin-plus-extern-crate.rs:22:1 + | +LL | extern crate macro_crate_test; //~ ERROR compiler plugin used as an ordinary library + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +note: lint level defined here + --> $DIR/plugin-plus-extern-crate.rs:18:9 + | +LL | #![deny(plugin_as_library)] + | ^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/compile-fail-fulldeps/qquote.rs b/src/test/ui-fulldeps/qquote.rs similarity index 100% rename from src/test/compile-fail-fulldeps/qquote.rs rename to src/test/ui-fulldeps/qquote.rs diff --git a/src/test/ui-fulldeps/qquote.stderr b/src/test/ui-fulldeps/qquote.stderr new file mode 100644 index 0000000000000..4c136ad4b787a --- /dev/null +++ b/src/test/ui-fulldeps/qquote.stderr @@ -0,0 +1,9 @@ +error[E0425]: cannot find value `abcd` in this scope + --> $DIR/qquote.rs:35:38 + | +LL | let expr = quote_expr!(&cx, 2 - $abcd + 7); //~ ERROR cannot find value `abcd` in this scope + | ^^^^ not found in this scope + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0425`.