diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-11-04 00:36:45 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-11-09 17:50:51 +0300 |
| commit | 441e5aed2501de4dcafff8c1e2442ee4145737be (patch) | |
| tree | ad8a31eb1cfc7296066acebba1e15df707360baf /src/test/ui | |
| parent | 3a223a917378f439fd9107e26ee7355f5f92c62d (diff) | |
| download | rust-441e5aed2501de4dcafff8c1e2442ee4145737be.tar.gz rust-441e5aed2501de4dcafff8c1e2442ee4145737be.zip | |
Remove `#[feature(custom_attribute)]`
Diffstat (limited to 'src/test/ui')
| -rw-r--r-- | src/test/ui/feature-gates/feature-gate-custom_attribute2.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/feature-gates/feature-gate-custom_attribute2.stderr | 34 | ||||
| -rw-r--r-- | src/test/ui/proc-macro/expand-to-unstable-2.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/proc-macro/expand-to-unstable-2.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/proc-macro/issue-41211.rs | 6 | ||||
| -rw-r--r-- | src/test/ui/proc-macro/issue-41211.stderr | 19 | ||||
| -rw-r--r-- | src/test/ui/span/issue-36530.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/span/issue-36530.stderr | 2 |
8 files changed, 45 insertions, 28 deletions
diff --git a/src/test/ui/feature-gates/feature-gate-custom_attribute2.rs b/src/test/ui/feature-gates/feature-gate-custom_attribute2.rs index e4c80141aa2..724e53debeb 100644 --- a/src/test/ui/feature-gates/feature-gate-custom_attribute2.rs +++ b/src/test/ui/feature-gates/feature-gate-custom_attribute2.rs @@ -1,8 +1,6 @@ // This test ensures that attributes on formals in generic parameter // lists are included when we are checking for unstable attributes. -// gate-test-custom_attribute - struct StLt<#[lt_struct] 'a>(&'a u32); //~^ ERROR cannot find attribute `lt_struct` in this scope struct StTy<#[ty_struct] I>(I); diff --git a/src/test/ui/feature-gates/feature-gate-custom_attribute2.stderr b/src/test/ui/feature-gates/feature-gate-custom_attribute2.stderr index bc89caddb44..b33710ce049 100644 --- a/src/test/ui/feature-gates/feature-gate-custom_attribute2.stderr +++ b/src/test/ui/feature-gates/feature-gate-custom_attribute2.stderr @@ -1,101 +1,101 @@ error: cannot find attribute `lt_hof` in this scope - --> $DIR/feature-gate-custom_attribute2.rs:53:21 + --> $DIR/feature-gate-custom_attribute2.rs:51:21 | LL | where Q: for <#[lt_hof] 'i> Fn(&'i [u32]) -> &'i u32 | ^^^^^^ error: cannot find attribute `ty_meth` in this scope - --> $DIR/feature-gate-custom_attribute2.rs:48:15 + --> $DIR/feature-gate-custom_attribute2.rs:46:15 | LL | fn m_ty<#[ty_meth] P>(_: P) { } | ^^^^^^^ error: cannot find attribute `lt_meth` in this scope - --> $DIR/feature-gate-custom_attribute2.rs:46:15 + --> $DIR/feature-gate-custom_attribute2.rs:44:15 | LL | fn m_lt<#[lt_meth] 'h>(_: &'h [u32]) -> &'h u32 { loop { } } | ^^^^^^^ error: cannot find attribute `ty_fn` in this scope - --> $DIR/feature-gate-custom_attribute2.rs:42:11 + --> $DIR/feature-gate-custom_attribute2.rs:40:11 | LL | fn f_ty<#[ty_fn] O>(_: O) { } | ^^^^^ error: cannot find attribute `lt_fn` in this scope - --> $DIR/feature-gate-custom_attribute2.rs:40:11 + --> $DIR/feature-gate-custom_attribute2.rs:38:11 | LL | fn f_lt<#[lt_fn] 'g>(_: &'g [u32]) -> &'g u32 { loop { } } | ^^^^^ error: cannot find attribute `ty_impl_for` in this scope - --> $DIR/feature-gate-custom_attribute2.rs:35:8 + --> $DIR/feature-gate-custom_attribute2.rs:33:8 | LL | impl<#[ty_impl_for] N> TrTy<N> for StTy<N> { | ^^^^^^^^^^^ error: cannot find attribute `lt_impl_for` in this scope - --> $DIR/feature-gate-custom_attribute2.rs:31:8 + --> $DIR/feature-gate-custom_attribute2.rs:29:8 | LL | impl<#[lt_impl_for] 'f> TrLt<'f> for StLt<'f> { | ^^^^^^^^^^^ error: cannot find attribute `ty_inherent` in this scope - --> $DIR/feature-gate-custom_attribute2.rs:28:8 + --> $DIR/feature-gate-custom_attribute2.rs:26:8 | LL | impl<#[ty_inherent] M> StTy<M> { } | ^^^^^^^^^^^ error: cannot find attribute `lt_inherent` in this scope - --> $DIR/feature-gate-custom_attribute2.rs:26:8 + --> $DIR/feature-gate-custom_attribute2.rs:24:8 | LL | impl<#[lt_inherent] 'e> StLt<'e> { } | ^^^^^^^^^^^ error: cannot find attribute `ty_type` in this scope - --> $DIR/feature-gate-custom_attribute2.rs:23:13 + --> $DIR/feature-gate-custom_attribute2.rs:21:13 | LL | type TyTy<#[ty_type] L> = (L, ); | ^^^^^^^ error: cannot find attribute `lt_type` in this scope - --> $DIR/feature-gate-custom_attribute2.rs:21:13 + --> $DIR/feature-gate-custom_attribute2.rs:19:13 | LL | type TyLt<#[lt_type] 'd> = &'d u32; | ^^^^^^^ error: cannot find attribute `ty_trait` in this scope - --> $DIR/feature-gate-custom_attribute2.rs:18:14 + --> $DIR/feature-gate-custom_attribute2.rs:16:14 | LL | trait TrTy<#[ty_trait] K> { fn foo(&self, _: K); } | ^^^^^^^^ error: cannot find attribute `lt_trait` in this scope - --> $DIR/feature-gate-custom_attribute2.rs:16:14 + --> $DIR/feature-gate-custom_attribute2.rs:14:14 | LL | trait TrLt<#[lt_trait] 'c> { fn foo(&self, _: &'c [u32]) -> &'c u32; } | ^^^^^^^^ error: cannot find attribute `ty_enum` in this scope - --> $DIR/feature-gate-custom_attribute2.rs:13:13 + --> $DIR/feature-gate-custom_attribute2.rs:11:13 | LL | enum EnTy<#[ty_enum] J> { A(J), B } | ^^^^^^^ error: cannot find attribute `lt_enum` in this scope - --> $DIR/feature-gate-custom_attribute2.rs:11:13 + --> $DIR/feature-gate-custom_attribute2.rs:9:13 | LL | enum EnLt<#[lt_enum] 'b> { A(&'b u32), B } | ^^^^^^^ error: cannot find attribute `ty_struct` in this scope - --> $DIR/feature-gate-custom_attribute2.rs:8:15 + --> $DIR/feature-gate-custom_attribute2.rs:6:15 | LL | struct StTy<#[ty_struct] I>(I); | ^^^^^^^^^ error: cannot find attribute `lt_struct` in this scope - --> $DIR/feature-gate-custom_attribute2.rs:6:15 + --> $DIR/feature-gate-custom_attribute2.rs:4:15 | LL | struct StLt<#[lt_struct] 'a>(&'a u32); | ^^^^^^^^^ diff --git a/src/test/ui/proc-macro/expand-to-unstable-2.rs b/src/test/ui/proc-macro/expand-to-unstable-2.rs index da7c89fdd46..4160e5418b7 100644 --- a/src/test/ui/proc-macro/expand-to-unstable-2.rs +++ b/src/test/ui/proc-macro/expand-to-unstable-2.rs @@ -1,6 +1,8 @@ // aux-build:derive-unstable-2.rs -#![feature(custom_attribute)] +#![feature(register_attr)] + +#![register_attr(rustc_foo)] #[macro_use] extern crate derive_unstable_2; diff --git a/src/test/ui/proc-macro/expand-to-unstable-2.stderr b/src/test/ui/proc-macro/expand-to-unstable-2.stderr index 01e6a4a8ab9..5b6184afacd 100644 --- a/src/test/ui/proc-macro/expand-to-unstable-2.stderr +++ b/src/test/ui/proc-macro/expand-to-unstable-2.stderr @@ -1,5 +1,5 @@ error[E0658]: attributes starting with `rustc` are reserved for use by the `rustc` compiler - --> $DIR/expand-to-unstable-2.rs:8:10 + --> $DIR/expand-to-unstable-2.rs:10:10 | LL | #[derive(Unstable)] | ^^^^^^^^ diff --git a/src/test/ui/proc-macro/issue-41211.rs b/src/test/ui/proc-macro/issue-41211.rs index 491b89b2f55..072a63baf3a 100644 --- a/src/test/ui/proc-macro/issue-41211.rs +++ b/src/test/ui/proc-macro/issue-41211.rs @@ -3,11 +3,13 @@ // FIXME: https://github.com/rust-lang/rust/issues/41430 // This is a temporary regression test for the ICE reported in #41211 -#![feature(custom_attribute)] #![feature(custom_inner_attributes)] +#![feature(register_attr)] + +#![register_attr(identity_attr)] #![identity_attr] -//~^ ERROR inconsistent resolution for a macro: first custom attribute, then attribute macro +//~^ ERROR `identity_attr` is ambiguous extern crate test_macros; use test_macros::identity_attr; diff --git a/src/test/ui/proc-macro/issue-41211.stderr b/src/test/ui/proc-macro/issue-41211.stderr index f01cba0c930..22ad4aa147b 100644 --- a/src/test/ui/proc-macro/issue-41211.stderr +++ b/src/test/ui/proc-macro/issue-41211.stderr @@ -1,8 +1,21 @@ -error: inconsistent resolution for a macro: first custom attribute, then attribute macro - --> $DIR/issue-41211.rs:9:4 +error[E0659]: `identity_attr` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution) + --> $DIR/issue-41211.rs:11:4 | LL | #![identity_attr] - | ^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^ ambiguous name + | +note: `identity_attr` could refer to the attribute macro imported here + --> $DIR/issue-41211.rs:14:5 + | +LL | use test_macros::identity_attr; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + = help: use `crate::identity_attr` to refer to this attribute macro unambiguously +note: `identity_attr` could also refer to the explicitly registered attribute defined here + --> $DIR/issue-41211.rs:9:18 + | +LL | #![register_attr(identity_attr)] + | ^^^^^^^^^^^^^ error: aborting due to previous error +For more information about this error, try `rustc --explain E0659`. diff --git a/src/test/ui/span/issue-36530.rs b/src/test/ui/span/issue-36530.rs index 14b2c8644e0..4776740d8de 100644 --- a/src/test/ui/span/issue-36530.rs +++ b/src/test/ui/span/issue-36530.rs @@ -1,6 +1,8 @@ // gate-test-custom_inner_attributes -#![feature(custom_attribute)] +#![feature(register_attr)] + +#![register_attr(foo)] #[foo] mod foo { diff --git a/src/test/ui/span/issue-36530.stderr b/src/test/ui/span/issue-36530.stderr index c6b7895e65a..2d3972917df 100644 --- a/src/test/ui/span/issue-36530.stderr +++ b/src/test/ui/span/issue-36530.stderr @@ -1,5 +1,5 @@ error[E0658]: non-builtin inner attributes are unstable - --> $DIR/issue-36530.rs:7:5 + --> $DIR/issue-36530.rs:9:5 | LL | #![foo] | ^^^^^^^ |
