Auto merge of #56444 - petrochenkov:uifull, r=davidtwco

Move compile-fail-fulldeps tests to UI

cc https://github.com/rust-lang/rust/issues/53353

r? @davidtwco
This commit is contained in:
bors 2018-12-09 18:49:12 +00:00
commit b755501043
134 changed files with 1110 additions and 173 deletions

View File

@ -389,7 +389,6 @@ impl<'a> Builder<'a> {
test::UiFullDeps,
test::RunPassFullDeps,
test::RunFailFullDeps,
test::CompileFailFullDeps,
test::Rustdoc,
test::Pretty,
test::RunPassPretty,

View File

@ -832,12 +832,6 @@ host_test!(RunFailFullDeps {
suite: "run-fail-fulldeps"
});
host_test!(CompileFailFullDeps {
path: "src/test/compile-fail-fulldeps",
mode: "compile-fail",
suite: "compile-fail-fulldeps"
});
host_test!(Rustdoc {
path: "src/test/rustdoc",
mode: "rustdoc",

View File

@ -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 <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.
// 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]);
}

View File

@ -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 <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.
// 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);
}

View File

@ -1,15 +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.
#![crate_type = "dylib"]
#[macro_export]
macro_rules! reexported {
() => ( 3 )
}

View File

@ -1,23 +0,0 @@
// Copyright 2016 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.
// force-host
// no-prefer-dynamic
#![crate_type = "proc-macro"]
extern crate proc_macro;
use proc_macro::TokenStream;
#[proc_macro_derive(Clona)]
pub fn derive_clonea(input: TokenStream) -> TokenStream {
"".parse().unwrap()
}

View File

@ -1,23 +0,0 @@
// Copyright 2016 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.
// force-host
// no-prefer-dynamic
#![crate_type = "proc-macro"]
extern crate proc_macro;
use proc_macro::TokenStream;
#[proc_macro_derive(FooWithLongName)]
pub fn derive_foo(input: TokenStream) -> TokenStream {
"".parse().unwrap()
}

View File

@ -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`.

View File

@ -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`.

View File

@ -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`.

View File

@ -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

View File

@ -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

View File

@ -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= = "<user")] //~ ERROR literal or identifier
| ^^^^
error: aborting due to 2 previous errors

View File

@ -0,0 +1,18 @@
error: item is named 'lintme'
--> $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

View File

@ -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

View File

@ -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

View File

@ -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`.

View File

@ -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`.

View File

@ -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`.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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`.

View File

@ -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`.

View File

@ -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`.

View File

@ -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`.

View File

@ -0,0 +1,28 @@
error: expected expression, found `<eof>`
--> $DIR/attr-invalid-exprs.rs:21:13
|
LL | let _ = #[no_output] "Hello, world!";
| ^^^^^^^^^^^^
error: macro expansion ignores token `,` and any following
--> $DIR/attr-invalid-exprs.rs:24:13
|
LL | let _ = #[duplicate] "Hello, world!";
| ^^^^^^^^^^^^- help: you might be missing a semicolon here: `;`
| |
| caused by the macro expansion here
|
= note: the usage of `duplicate!` is likely invalid in expression context
error: macro expansion ignores token `,` and any following
--> $DIR/attr-invalid-exprs.rs:33:9
|
LL | #[duplicate]
| ^^^^^^^^^^^^- help: you might be missing a semicolon here: `;`
| |
| caused by the macro expansion here
|
= note: the usage of `duplicate!` is likely invalid in expression context
error: aborting due to 3 previous errors

View File

@ -0,0 +1,19 @@
error[E0658]: attributes on expressions are experimental. (see issue #15701)
--> $DIR/attr-stmt-expr.rs:20:5
|
LL | #[expect_print_expr]
| ^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable
error[E0658]: attributes on expressions are experimental. (see issue #15701)
--> $DIR/attr-stmt-expr.rs:33:5
|
LL | #[expect_expr]
| ^^^^^^^^^^^^^^
|
= help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0658`.

View File

@ -0,0 +1,39 @@
error[E0308]: mismatched types
--> $DIR/attribute-with-error.rs:21:18
|
LL | let a: i32 = "foo";
| ^^^^^ expected i32, found reference
|
= note: expected type `i32`
found type `&'static str`
error[E0308]: mismatched types
--> $DIR/attribute-with-error.rs:23:18
|
LL | let b: i32 = "f'oo";
| ^^^^^^ expected i32, found reference
|
= note: expected type `i32`
found type `&'static str`
error[E0308]: mismatched types
--> $DIR/attribute-with-error.rs:36:22
|
LL | let a: i32 = "foo";
| ^^^^^ expected i32, found reference
|
= note: expected type `i32`
found type `&'static str`
error[E0308]: mismatched types
--> $DIR/attribute-with-error.rs:46:22
|
LL | let a: i32 = "foo";
| ^^^^^ expected i32, found reference
|
= note: expected type `i32`
found type `&'static str`
error: aborting due to 4 previous errors
For more information about this error, try `rustc --explain E0308`.

View File

@ -0,0 +1,50 @@
error: attribute must be of form: #[proc_macro_derive(TraitName)]
--> $DIR/attribute.rs:18:1
|
LL | #[proc_macro_derive]
| ^^^^^^^^^^^^^^^^^^^^
error: attribute must be of form: #[proc_macro_derive(TraitName)]
--> $DIR/attribute.rs:24:1
|
LL | #[proc_macro_derive = "foo"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: must only be one word
--> $DIR/attribute.rs:31:5
|
LL | a = "b"
| ^^^^^^^
error: attribute must have either one or two arguments
--> $DIR/attribute.rs:38:1
|
LL | #[proc_macro_derive(b, c, d)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: must only be one word
--> $DIR/attribute.rs:44:21
|
LL | #[proc_macro_derive(d(e))]
| ^^^^
error: must only be one word
--> $DIR/attribute.rs:50:35
|
LL | #[proc_macro_derive(f, attributes(g = "h"))]
| ^^^^^^^
error: must only be one word
--> $DIR/attribute.rs:56:35
|
LL | #[proc_macro_derive(i, attributes(j(k)))]
| ^^^^
error: attribute must have either one or two arguments
--> $DIR/attribute.rs:62:1
|
LL | #[proc_macro_derive(l, attributes(m), n)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 8 previous errors

View File

@ -0,0 +1,13 @@
warning: unused variable: `a`
--> $DIR/attributes-included.rs:27:9
|
LL | let a: i32 = "foo"; //~ WARN: unused variable
| ^ help: consider using `_a` instead
|
note: lint level defined here
--> $DIR/attributes-included.rs:14:9
|
LL | #![warn(unused)]
| ^^^^^^
= note: #[warn(unused_variables)] implied by #[warn(unused)]

View File

@ -1,4 +1,5 @@
// edition:2015
// force-host
// no-prefer-dynamic
#![crate_type = "proc-macro"]

View File

@ -0,0 +1,14 @@
error[E0428]: the name `A` is defined multiple times
--> $DIR/define-two.rs:25:21
|
LL | #[proc_macro_derive(A)]
| - previous definition of the macro `A` here
...
LL | #[proc_macro_derive(A)] //~ ERROR the name `A` is defined multiple times
| ^ `A` redefined here
|
= note: `A` must be defined only once in the macro namespace of this module
error: aborting due to previous error
For more information about this error, try `rustc --explain E0428`.

View File

@ -0,0 +1,14 @@
error: expected `:`, found `}`
--> $DIR/derive-bad.rs:17:5
|
LL | A
| ^ expected `:`
error: proc-macro derive produced unparseable tokens
--> $DIR/derive-bad.rs:17:5
|
LL | A
| ^
error: aborting due to 2 previous errors

View File

@ -0,0 +1,11 @@
error[E0658]: The attribute `derive_A` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
--> $DIR/derive-still-gated.rs:18:3
|
LL | #[derive_A] //~ ERROR attribute `derive_A` is currently unknown
| ^^^^^^^^
|
= help: add #![feature(custom_attribute)] to the crate attributes to enable
error: aborting due to previous error
For more information about this error, try `rustc --explain E0658`.

View File

@ -0,0 +1,11 @@
error[E0658]: unless otherwise specified, attributes with the prefix `rustc_` are reserved for internal compiler diagnostics (see issue #29642)
--> $DIR/expand-to-unstable-2.rs:18:10
|
LL | #[derive(Unstable)]
| ^^^^^^^^
|
= help: add #![feature(rustc_attrs)] to the crate attributes to enable
error: aborting due to previous error
For more information about this error, try `rustc --explain E0658`.

View File

@ -0,0 +1,11 @@
error[E0658]: use of unstable library feature 'core_intrinsics': intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library
--> $DIR/expand-to-unstable.rs:18:10
|
LL | #[derive(Unstable)]
| ^^^^^^^^
|
= help: add #![feature(core_intrinsics)] to the crate attributes to enable
error: aborting due to previous error
For more information about this error, try `rustc --explain E0658`.

View File

@ -0,0 +1,10 @@
error: cannot export macro_rules! macros from a `proc-macro` crate type currently
--> $DIR/export-macro.rs:19:1
|
LL | / macro_rules! foo {
LL | | ($e:expr) => ($e)
LL | | }
| |_^
error: aborting due to previous error

View File

@ -0,0 +1,26 @@
error: `proc-macro` crate types cannot export any items other than functions tagged with `#[proc_macro_derive]` currently
--> $DIR/exports.rs:17:1
|
LL | pub fn a() {} //~ ERROR: cannot export any items
| ^^^^^^^^^^^^^
error: `proc-macro` crate types cannot export any items other than functions tagged with `#[proc_macro_derive]` currently
--> $DIR/exports.rs:18:1
|
LL | pub struct B; //~ ERROR: cannot export any items
| ^^^^^^^^^^^^^
error: `proc-macro` crate types cannot export any items other than functions tagged with `#[proc_macro_derive]` currently
--> $DIR/exports.rs:19:1
|
LL | pub enum C {} //~ ERROR: cannot export any items
| ^^^^^^^^^^^^^
error: `proc-macro` crate types cannot export any items other than functions tagged with `#[proc_macro_derive]` currently
--> $DIR/exports.rs:20:1
|
LL | pub mod d {} //~ ERROR: cannot export any items
| ^^^^^^^^^^^^
error: aborting due to 4 previous errors

View File

@ -0,0 +1,14 @@
error: the `#[proc_macro_derive]` attribute is only usable with crates of the `proc-macro` crate type
--> $DIR/illegal-proc-macro-derive-use.rs:13:1
|
LL | #[proc_macro_derive(Foo)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error: the `#[proc_macro_derive]` attribute may only be used on bare functions
--> $DIR/illegal-proc-macro-derive-use.rs:20:1
|
LL | #[proc_macro_derive(Foo)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors

View File

@ -0,0 +1,9 @@
error[E0432]: unresolved import `derive_a::derive_a`
--> $DIR/import.rs:18:5
|
LL | use derive_a::derive_a;
| ^^^^^^^^^^^^^^^^^^ no `derive_a` in the root
error: aborting due to previous error
For more information about this error, try `rustc --explain E0432`.

Some files were not shown because too many files have changed in this diff Show More