diff options
| author | bors <bors@rust-lang.org> | 2020-11-20 00:51:54 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-11-20 00:51:54 +0000 |
| commit | 4ec27e4b79891b0ebc2ad71a3c4ac94f67d93f93 (patch) | |
| tree | 602e46b3159e5835cba6bcb4e8441189f2aa0d8e /src | |
| parent | 09c9c9f7da72b774cc445c0f56fc0b9792a49647 (diff) | |
| parent | 5adc00fbb8a40ecc685b26abfce0a4b619eb4c88 (diff) | |
| download | rust-4ec27e4b79891b0ebc2ad71a3c4ac94f67d93f93.tar.gz rust-4ec27e4b79891b0ebc2ad71a3c4ac94f67d93f93.zip | |
Auto merge of #79220 - Dylan-DPC:rollup-5bpbygd, r=Dylan-DPC
Rollup of 11 pull requests
Successful merges:
- #79119 (Clarify availability of atomic operations)
- #79123 (Add u128 and i128 integer tests)
- #79177 (Test drop order for (destructuring) assignments)
- #79181 (rustdoc: add [src] links to methods on a trait's page)
- #79183 (Make compiletest testing use the local sysroot)
- #79185 (expand/resolve: Pre-requisites to "Turn `#[derive]` into a regular macro attribute")
- #79193 (Revert #78969 "Normalize function type during validation")
- #79194 (Make as{_mut,}_slice on array::IntoIter public)
- #79204 (Add jyn514 email alias to mailmap)
- #79212 (Move `rustc_ty` -> `rustc_ty_utils`)
- #79217 (Add the "memcpy" doc alias to slice::copy_from_slice)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src')
29 files changed, 315 insertions, 324 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index 60808dcba61..e087e2b8ff1 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -484,10 +484,13 @@ impl Step for CompiletestTest { let host = self.host; let compiler = builder.compiler(0, host); + // We need `ToolStd` for the locally-built sysroot because + // compiletest uses unstable features of the `test` crate. + builder.ensure(compile::Std { compiler, target: host }); let cargo = tool::prepare_tool_cargo( builder, compiler, - Mode::ToolBootstrap, + Mode::ToolStd, host, "test", "src/tools/compiletest", diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index 28f7a4d3162..147a8d33765 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -1194,6 +1194,16 @@ fn write_minify( } } +fn write_srclink(cx: &Context, item: &clean::Item, buf: &mut Buffer, cache: &Cache) { + if let Some(l) = cx.src_href(item, cache) { + write!( + buf, + "<a class=\"srclink\" href=\"{}\" title=\"{}\">[src]</a>", + l, "goto source code" + ) + } +} + #[derive(Debug, Eq, PartialEq, Hash)] struct ItemEntry { url: String, @@ -1706,13 +1716,7 @@ fn print_item(cx: &Context, item: &clean::Item, buf: &mut Buffer, cache: &Cache) // this page, and this link will be auto-clicked. The `id` attribute is // used to find the link to auto-click. if cx.shared.include_sources && !item.is_primitive() { - if let Some(l) = cx.src_href(item, cache) { - write!( - buf, - "<a class=\"srclink\" href=\"{}\" title=\"{}\">[src]</a>", - l, "goto source code" - ); - } + write_srclink(cx, item, buf, cache); } write!(buf, "</span>"); // out-of-band @@ -2624,7 +2628,7 @@ fn item_trait(w: &mut Buffer, cx: &Context, it: &clean::Item, t: &clean::Trait, write!(w, "{}<span class=\"loading-content\">Loading content...</span>", extra_content) } - fn trait_item(w: &mut Buffer, cx: &Context, m: &clean::Item, t: &clean::Item) { + fn trait_item(w: &mut Buffer, cx: &Context, m: &clean::Item, t: &clean::Item, cache: &Cache) { let name = m.name.as_ref().unwrap(); info!("Documenting {} on {}", name, t.name.as_deref().unwrap_or_default()); let item_type = m.type_(); @@ -2633,6 +2637,7 @@ fn item_trait(w: &mut Buffer, cx: &Context, it: &clean::Item, t: &clean::Trait, render_assoc_item(w, m, AssocItemLink::Anchor(Some(&id)), ItemType::Impl); write!(w, "</code>"); render_stability_since(w, m, t); + write_srclink(cx, m, w, cache); write!(w, "</h3>"); document(w, cx, m, Some(t)); } @@ -2644,8 +2649,8 @@ fn item_trait(w: &mut Buffer, cx: &Context, it: &clean::Item, t: &clean::Trait, "Associated Types", "<div class=\"methods\">", ); - for t in &types { - trait_item(w, cx, *t, it); + for t in types { + trait_item(w, cx, t, it, cache); } write_loading_content(w, "</div>"); } @@ -2657,8 +2662,8 @@ fn item_trait(w: &mut Buffer, cx: &Context, it: &clean::Item, t: &clean::Trait, "Associated Constants", "<div class=\"methods\">", ); - for t in &consts { - trait_item(w, cx, *t, it); + for t in consts { + trait_item(w, cx, t, it, cache); } write_loading_content(w, "</div>"); } @@ -2671,8 +2676,8 @@ fn item_trait(w: &mut Buffer, cx: &Context, it: &clean::Item, t: &clean::Trait, "Required methods", "<div class=\"methods\">", ); - for m in &required { - trait_item(w, cx, *m, it); + for m in required { + trait_item(w, cx, m, it, cache); } write_loading_content(w, "</div>"); } @@ -2683,8 +2688,8 @@ fn item_trait(w: &mut Buffer, cx: &Context, it: &clean::Item, t: &clean::Trait, "Provided methods", "<div class=\"methods\">", ); - for m in &provided { - trait_item(w, cx, *m, it); + for m in provided { + trait_item(w, cx, m, it, cache); } write_loading_content(w, "</div>"); } @@ -3693,13 +3698,7 @@ fn render_impl( StabilityLevel::Unstable { .. } => None, }); render_stability_since_raw(w, since.as_deref(), outer_version); - if let Some(l) = cx.src_href(&i.impl_item, cache) { - write!( - w, - "<a class=\"srclink\" href=\"{}\" title=\"{}\">[src]</a>", - l, "goto source code" - ); - } + write_srclink(cx, &i.impl_item, w, cache); write!(w, "</h3>"); if trait_.is_some() { @@ -3765,13 +3764,7 @@ fn render_impl( render_assoc_item(w, item, link.anchor(&id), ItemType::Impl); write!(w, "</code>"); render_stability_since_raw(w, item.stable_since().as_deref(), outer_version); - if let Some(l) = cx.src_href(item, cache) { - write!( - w, - "<a class=\"srclink\" href=\"{}\" title=\"{}\">[src]</a>", - l, "goto source code" - ); - } + write_srclink(cx, item, w, cache); write!(w, "</h4>"); } } @@ -3787,13 +3780,7 @@ fn render_impl( assoc_const(w, item, ty, default.as_ref(), link.anchor(&id), ""); write!(w, "</code>"); render_stability_since_raw(w, item.stable_since().as_deref(), outer_version); - if let Some(l) = cx.src_href(item, cache) { - write!( - w, - "<a class=\"srclink\" href=\"{}\" title=\"{}\">[src]</a>", - l, "goto source code" - ); - } + write_srclink(cx, item, w, cache); write!(w, "</h4>"); } clean::AssocTypeItem(ref bounds, ref default) => { diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index 7eccb09b073..7d22913b99d 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -659,7 +659,7 @@ a { text-decoration: underline; } -.invisible > .srclink, h4 > code + .srclink { +.invisible > .srclink, h4 > code + .srclink, h3 > code + .srclink { position: absolute; top: 0; right: 0; @@ -857,25 +857,25 @@ body.blur > :not(#help) { top: 0; } -.impl-items .since, .impl .since { +.impl-items .since, .impl .since, .methods .since { flex-grow: 0; padding-left: 12px; padding-right: 2px; position: initial; } -.impl-items .srclink, .impl .srclink { +.impl-items .srclink, .impl .srclink, .methods .srclink { flex-grow: 0; /* Override header settings otherwise it's too bold */ font-size: 17px; font-weight: normal; } -.impl-items code, .impl code { +.impl-items code, .impl code, .methods code { flex-grow: 1; } -.impl-items h4, h4.impl, h3.impl { +.impl-items h4, h4.impl, h3.impl, .methods h3 { display: flex; flex-basis: 100%; font-size: 16px; diff --git a/src/test/rustdoc/trait-src-link.rs b/src/test/rustdoc/trait-src-link.rs new file mode 100644 index 00000000000..77116695690 --- /dev/null +++ b/src/test/rustdoc/trait-src-link.rs @@ -0,0 +1,26 @@ +#![crate_name = "quix"] +pub trait Foo { + // @has quix/trait.Foo.html '//a[@href="../src/quix/trait-src-link.rs.html#4"]' '[src]' + fn required(); + + // @has quix/trait.Foo.html '//a[@href="../src/quix/trait-src-link.rs.html#7"]' '[src]' + fn provided() {} +} + +pub struct Bar; + +impl Foo for Bar { + // @has quix/struct.Bar.html '//a[@href="../src/quix/trait-src-link.rs.html#14"]' '[src]' + fn required() {} + // @has quix/struct.Bar.html '//a[@href="../src/quix/trait-src-link.rs.html#7"]' '[src]' +} + +pub struct Baz; + +impl Foo for Baz { + // @has quix/struct.Baz.html '//a[@href="../src/quix/trait-src-link.rs.html#22"]' '[src]' + fn required() {} + + // @has quix/struct.Baz.html '//a[@href="../src/quix/trait-src-link.rs.html#25"]' '[src]' + fn provided() {} +} diff --git a/src/test/ui/attrs-resolution-errors.rs b/src/test/ui/attrs-resolution-errors.rs index a38b3cfa666..8770fb1ded8 100644 --- a/src/test/ui/attrs-resolution-errors.rs +++ b/src/test/ui/attrs-resolution-errors.rs @@ -1,12 +1,12 @@ enum FooEnum { #[test] - //~^ ERROR expected an inert attribute, found an attribute macro + //~^ ERROR expected non-macro attribute, found attribute macro Bar(i32), } struct FooStruct { #[test] - //~^ ERROR expected an inert attribute, found an attribute macro + //~^ ERROR expected non-macro attribute, found attribute macro bar: i32, } @@ -21,20 +21,20 @@ fn main() { match foo_struct { FooStruct { #[test] bar - //~^ ERROR expected an inert attribute, found an attribute macro + //~^ ERROR expected non-macro attribute, found attribute macro } => {} } match 1 { 0 => {} #[test] - //~^ ERROR expected an inert attribute, found an attribute macro + //~^ ERROR expected non-macro attribute, found attribute macro _ => {} } let _another_foo_strunct = FooStruct { #[test] - //~^ ERROR expected an inert attribute, found an attribute macro + //~^ ERROR expected non-macro attribute, found attribute macro bar: 1, }; } diff --git a/src/test/ui/attrs-resolution-errors.stderr b/src/test/ui/attrs-resolution-errors.stderr index 31f2a74edb3..883f96e5c19 100644 --- a/src/test/ui/attrs-resolution-errors.stderr +++ b/src/test/ui/attrs-resolution-errors.stderr @@ -1,32 +1,32 @@ -error: expected an inert attribute, found an attribute macro - --> $DIR/attrs-resolution-errors.rs:2:5 +error: expected non-macro attribute, found attribute macro `test` + --> $DIR/attrs-resolution-errors.rs:2:7 | LL | #[test] - | ^^^^^^^ + | ^^^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/attrs-resolution-errors.rs:8:5 +error: expected non-macro attribute, found attribute macro `test` + --> $DIR/attrs-resolution-errors.rs:8:7 | LL | #[test] - | ^^^^^^^ + | ^^^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/attrs-resolution-errors.rs:23:13 +error: expected non-macro attribute, found attribute macro `test` + --> $DIR/attrs-resolution-errors.rs:23:15 | LL | #[test] bar - | ^^^^^^^ + | ^^^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/attrs-resolution-errors.rs:30:9 +error: expected non-macro attribute, found attribute macro `test` + --> $DIR/attrs-resolution-errors.rs:30:11 | LL | #[test] - | ^^^^^^^ + | ^^^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/attrs-resolution-errors.rs:36:9 +error: expected non-macro attribute, found attribute macro `test` + --> $DIR/attrs-resolution-errors.rs:36:11 | LL | #[test] - | ^^^^^^^ + | ^^^^ not a non-macro attribute error: aborting due to 5 previous errors diff --git a/src/test/ui/conditional-compilation/cfg_accessible-stuck.rs b/src/test/ui/conditional-compilation/cfg_accessible-stuck.rs index 8bc93fa3243..50504a44c95 100644 --- a/src/test/ui/conditional-compilation/cfg_accessible-stuck.rs +++ b/src/test/ui/conditional-compilation/cfg_accessible-stuck.rs @@ -1,6 +1,6 @@ #![feature(cfg_accessible)] -#[cfg_accessible(Z)] //~ ERROR cannot determine whether the path is accessible or not +#[cfg_accessible(Z)] // OK, recovered after the other `cfg_accessible` produces an error. struct S; #[cfg_accessible(S)] //~ ERROR cannot determine whether the path is accessible or not diff --git a/src/test/ui/conditional-compilation/cfg_accessible-stuck.stderr b/src/test/ui/conditional-compilation/cfg_accessible-stuck.stderr index 9641441a819..33af7d62548 100644 --- a/src/test/ui/conditional-compilation/cfg_accessible-stuck.stderr +++ b/src/test/ui/conditional-compilation/cfg_accessible-stuck.stderr @@ -4,11 +4,5 @@ error: cannot determine whether the path is accessible or not LL | #[cfg_accessible(S)] | ^^^^^^^^^^^^^^^^^^^^ -error: cannot determine whether the path is accessible or not - --> $DIR/cfg_accessible-stuck.rs:3:1 - | -LL | #[cfg_accessible(Z)] - | ^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to 2 previous errors +error: aborting due to previous error diff --git a/src/test/ui/destructuring-assignment/drop-order.rs b/src/test/ui/destructuring-assignment/drop-order.rs new file mode 100644 index 00000000000..d06b31c7f27 --- /dev/null +++ b/src/test/ui/destructuring-assignment/drop-order.rs @@ -0,0 +1,44 @@ +// run-pass + +//! Test that let bindings and destructuring assignments have consistent drop orders + +#![feature(destructuring_assignment)] +#![allow(unused_variables, unused_assignments)] + +use std::cell::RefCell; + +thread_local! { + static DROP_ORDER: RefCell<Vec<usize>> = RefCell::new(Vec::new()); +} + +struct DropRecorder(usize); +impl Drop for DropRecorder { + fn drop(&mut self) { + DROP_ORDER.with(|d| d.borrow_mut().push(self.0)); + } +} + +fn main() { + let expected_drop_order = vec![1, 4, 5, 3, 2]; + // Check the drop order for let bindings: + { + let _ = DropRecorder(1); + let _val = DropRecorder(2); + let (x, _) = (DropRecorder(3), DropRecorder(4)); + drop(DropRecorder(5)); + } + DROP_ORDER.with(|d| { + assert_eq!(&*d.borrow(), &expected_drop_order); + d.borrow_mut().clear(); + }); + // Check that the drop order for destructuring assignment is the same: + { + let _val; + let x; + _ = DropRecorder(1); + _val = DropRecorder(2); + (x, _) = (DropRecorder(3), DropRecorder(4)); + drop(DropRecorder(5)); + } + DROP_ORDER.with(|d| assert_eq!(&*d.borrow(), &expected_drop_order)); +} diff --git a/src/test/ui/issues/issue-36617.rs b/src/test/ui/issues/issue-36617.rs index 58f44f42524..1102f3c4640 100644 --- a/src/test/ui/issues/issue-36617.rs +++ b/src/test/ui/issues/issue-36617.rs @@ -1,5 +1,4 @@ #![derive(Copy)] //~ ERROR `derive` may only be applied to structs, enums and unions //~| ERROR cannot determine resolution for the derive macro `Copy` - //~| ERROR cannot determine resolution for the derive macro `Copy` fn main() {} diff --git a/src/test/ui/issues/issue-36617.stderr b/src/test/ui/issues/issue-36617.stderr index 586dcf2cea6..dc6ef169259 100644 --- a/src/test/ui/issues/issue-36617.stderr +++ b/src/test/ui/issues/issue-36617.stderr @@ -12,14 +12,6 @@ LL | #![derive(Copy)] | = note: import resolution is stuck, try simplifying macro imports -error: cannot determine resolution for the derive macro `Copy` - --> $DIR/issue-36617.rs:1:11 - | -LL | #![derive(Copy)] - | ^^^^ - | - = note: import resolution is stuck, try simplifying macro imports - -error: aborting due to 3 previous errors +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0774`. diff --git a/src/test/ui/issues/issue-49934-errors.rs b/src/test/ui/issues/issue-49934-errors.rs index 6fa5f01ffd9..bf95f8fa7e1 100644 --- a/src/test/ui/issues/issue-49934-errors.rs +++ b/src/test/ui/issues/issue-49934-errors.rs @@ -1,10 +1,8 @@ fn foo<#[derive(Debug)] T>() { //~^ ERROR `derive` may only be applied to structs, enums and unions -//~| ERROR expected an inert attribute, found a derive macro match 0 { #[derive(Debug)] //~^ ERROR `derive` may only be applied to structs, enums and unions - //~| ERROR expected an inert attribute, found a derive macro _ => (), } } diff --git a/src/test/ui/issues/issue-49934-errors.stderr b/src/test/ui/issues/issue-49934-errors.stderr index 3befb38a208..71cd2d30342 100644 --- a/src/test/ui/issues/issue-49934-errors.stderr +++ b/src/test/ui/issues/issue-49934-errors.stderr @@ -4,24 +4,12 @@ error[E0774]: `derive` may only be applied to structs, enums and unions LL | fn foo<#[derive(Debug)] T>() { | ^^^^^^^^^^^^^^^^ -error: expected an inert attribute, found a derive macro - --> $DIR/issue-49934-errors.rs:1:17 - | -LL | fn foo<#[derive(Debug)] T>() { - | ^^^^^ - error[E0774]: `derive` may only be applied to structs, enums and unions - --> $DIR/issue-49934-errors.rs:5:9 + --> $DIR/issue-49934-errors.rs:4:9 | LL | #[derive(Debug)] | ^^^^^^^^^^^^^^^^ -error: expected an inert attribute, found a derive macro - --> $DIR/issue-49934-errors.rs:5:18 - | -LL | #[derive(Debug)] - | ^^^^^ - -error: aborting due to 4 previous errors +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0774`. diff --git a/src/test/ui/issues/issue-50865-private-impl-trait/auxiliary/lib.rs b/src/test/ui/issues/issue-50865-private-impl-trait/auxiliary/lib.rs index f3a51b415fa..fb4bf2b8b44 100644 --- a/src/test/ui/issues/issue-50865-private-impl-trait/auxiliary/lib.rs +++ b/src/test/ui/issues/issue-50865-private-impl-trait/auxiliary/lib.rs @@ -1,3 +1,7 @@ +// revisions: default miropt +//[miropt]compile-flags: -Z mir-opt-level=2 +// ~^ This flag is for #77668, it used to be ICE. + #![crate_type = "lib"] pub fn bar<P>( // Error won't happen if "bar" is not generic diff --git a/src/test/ui/malformed/issue-69341-malformed-derive-inert.rs b/src/test/ui/malformed/issue-69341-malformed-derive-inert.rs index 24692f7cf52..1fd7cddc7c9 100644 --- a/src/test/ui/malformed/issue-69341-malformed-derive-inert.rs +++ b/src/test/ui/malformed/issue-69341-malformed-derive-inert.rs @@ -4,7 +4,6 @@ struct CLI { #[derive(parse())] //~^ ERROR traits in `#[derive(...)]` don't accept arguments //~| ERROR cannot find derive macro `parse` in this scope - //~| ERROR cannot find derive macro `parse` in this scope path: (), //~^ ERROR `derive` may only be applied to structs, enums and unions } diff --git a/src/test/ui/malformed/issue-69341-malformed-derive-inert.stderr b/src/test/ui/malformed/issue-69341-malformed-derive-inert.stderr index c4532a375a7..db40ce07530 100644 --- a/src/test/ui/malformed/issue-69341-malformed-derive-inert.stderr +++ b/src/test/ui/malformed/issue-69341-malformed-derive-inert.stderr @@ -5,7 +5,7 @@ LL | #[derive(parse())] | ^^ help: remove the arguments error[E0774]: `derive` may only be applied to structs, enums and unions - --> $DIR/issue-69341-malformed-derive-inert.rs:8:5 + --> $DIR/issue-69341-malformed-derive-inert.rs:7:5 | LL | path: (), | ^^^^^^^^ @@ -16,12 +16,6 @@ error: cannot find derive macro `parse` in this scope LL | #[derive(parse())] | ^^^^^ -error: cannot find derive macro `parse` in this scope - --> $DIR/issue-69341-malformed-derive-inert.rs:4:14 - | -LL | #[derive(parse())] - | ^^^^^ - -error: aborting due to 4 previous errors +error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0774`. diff --git a/src/test/ui/mir/mir-inlining/ice-issue-77306-1.rs b/src/test/ui/mir/mir-inlining/ice-issue-77306-1.rs index ccb279f7fa2..4d083bf2321 100644 --- a/src/test/ui/mir/mir-inlining/ice-issue-77306-1.rs +++ b/src/test/ui/mir/mir-inlining/ice-issue-77306-1.rs @@ -1,27 +1,17 @@ -// Regression test for various issues related to normalization & inlining. -// * #68347, #77306, #77668 - missed normalization during inlining. -// * #78442 - missed normalization in validator after inlining. -// -// build-pass +// run-pass // compile-flags:-Zmir-opt-level=2 +// Previously ICEd because we did not normalize during inlining, +// see https://github.com/rust-lang/rust/pull/77306 for more discussion. + pub fn write() { create()() } -pub fn write_generic<T>(_t: T) { - hide()(); -} - pub fn create() -> impl FnOnce() { || () } -pub fn hide() -> impl Fn() { - write -} - fn main() { write(); - write_generic(()); } diff --git a/src/test/ui/proc-macro/proc-macro-gates.rs b/src/test/ui/proc-macro/proc-macro-gates.rs index b3b677fa7ff..4c72ecbfc03 100644 --- a/src/test/ui/proc-macro/proc-macro-gates.rs +++ b/src/test/ui/proc-macro/proc-macro-gates.rs @@ -7,11 +7,11 @@ extern crate test_macros; fn _test_inner() { - #![empty_attr] //~ ERROR: non-builtin inner attributes are unstable + #![empty_attr] //~ ERROR: inner macro attributes are unstable } mod _test2_inner { - #![empty_attr] //~ ERROR: non-builtin inner attributes are unstable + #![empty_attr] //~ ERROR: inner macro attributes are unstable } #[empty_attr = "y"] //~ ERROR: key-value macro attributes are not supported diff --git a/src/test/ui/proc-macro/proc-macro-gates.stderr b/src/test/ui/proc-macro/proc-macro-gates.stderr index c0343495531..33a808037ee 100644 --- a/src/test/ui/proc-macro/proc-macro-gates.stderr +++ b/src/test/ui/proc-macro/proc-macro-gates.stderr @@ -1,17 +1,17 @@ -error[E0658]: non-builtin inner attributes are unstable - --> $DIR/proc-macro-gates.rs:10:5 +error[E0658]: inner macro attributes are unstable + --> $DIR/proc-macro-gates.rs:10:8 | LL | #![empty_attr] - | ^^^^^^^^^^^^^^ + | ^^^^^^^^^^ | = note: see issue #54726 <https://github.com/rust-lang/rust/issues/54726> for more information = help: add `#![feature(custom_inner_attributes)]` to the crate attributes to enable -error[E0658]: non-builtin inner attributes are unstable - --> $DIR/proc-macro-gates.rs:14:5 +error[E0658]: inner macro attributes are unstable + --> $DIR/proc-macro-gates.rs:14:8 | LL | #![empty_attr] - | ^^^^^^^^^^^^^^ + | ^^^^^^^^^^ | = note: see issue #54726 <https://github.com/rust-lang/rust/issues/54726> for more information = help: add `#![feature(custom_inner_attributes)]` to the crate attributes to enable diff --git a/src/test/ui/proc-macro/proc-macro-gates2.rs b/src/test/ui/proc-macro/proc-macro-gates2.rs index 2fd5efd71f0..38fbd4733d5 100644 --- a/src/test/ui/proc-macro/proc-macro-gates2.rs +++ b/src/test/ui/proc-macro/proc-macro-gates2.rs @@ -10,11 +10,11 @@ extern crate test_macros; // should either require a feature gate or not be allowed on stable. fn _test6<#[empty_attr] T>() {} -//~^ ERROR: expected an inert attribute, found an attribute macro +//~^ ERROR: expected non-macro attribute, found attribute macro fn _test7() { match 1 { - #[empty_attr] //~ ERROR: expected an inert attribute, found an attribute macro + #[empty_attr] //~ ERROR: expected non-macro attribute, found attribute macro 0 => {} _ => {} } diff --git a/src/test/ui/proc-macro/proc-macro-gates2.stderr b/src/test/ui/proc-macro/proc-macro-gates2.stderr index fd271da6155..64df34e7ce3 100644 --- a/src/test/ui/proc-macro/proc-macro-gates2.stderr +++ b/src/test/ui/proc-macro/proc-macro-gates2.stderr @@ -1,14 +1,14 @@ -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-gates2.rs:12:11 +error: expected non-macro attribute, found attribute macro `empty_attr` + --> $DIR/proc-macro-gates2.rs:12:13 | LL | fn _test6<#[empty_attr] T>() {} - | ^^^^^^^^^^^^^ + | ^^^^^^^^^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-gates2.rs:17:9 +error: expected non-macro attribute, found attribute macro `empty_attr` + --> $DIR/proc-macro-gates2.rs:17:11 | LL | #[empty_attr] - | ^^^^^^^^^^^^^ + | ^^^^^^^^^^ not a non-macro attribute error: aborting due to 2 previous errors diff --git a/src/test/ui/rfc-2565-param-attrs/param-attrs-builtin-attrs.rs b/src/test/ui/rfc-2565-param-attrs/param-attrs-builtin-attrs.rs index bf09171c9a1..6403b3f55c4 100644 --- a/src/test/ui/rfc-2565-param-attrs/param-attrs-builtin-attrs.rs +++ b/src/test/ui/rfc-2565-param-attrs/param-attrs-builtin-attrs.rs @@ -3,7 +3,7 @@ extern "C" { /// Foo //~^ ERROR documentation comments cannot be applied to function #[test] a: i32, - //~^ ERROR expected an inert attribute, found an attribute macro + //~^ ERROR expected non-macro attribute, found attribute macro /// Bar //~^ ERROR documentation comments cannot be applied to function #[must_use] @@ -19,7 +19,7 @@ type FnType = fn( /// Foo //~^ ERROR documentation comments cannot be applied to function #[test] a: u32, - //~^ ERROR expected an inert attribute, found an attribute macro + //~^ ERROR expected non-macro attribute, found attribute macro /// Bar //~^ ERROR documentation comments cannot be applied to function #[must_use] @@ -34,7 +34,7 @@ pub fn foo( /// Foo //~^ ERROR documentation comments cannot be applied to function #[test] a: u32, - //~^ ERROR expected an inert attribute, found an attribute macro + //~^ ERROR expected non-macro attribute, found attribute macro /// Bar //~^ ERROR documentation comments cannot be applied to function #[must_use] @@ -54,7 +54,7 @@ impl SelfStruct { /// Bar //~^ ERROR documentation comments cannot be applied to function #[test] a: i32, - //~^ ERROR expected an inert attribute, found an attribute macro + //~^ ERROR expected non-macro attribute, found attribute macro /// Baz //~^ ERROR documentation comments cannot be applied to function #[must_use] @@ -69,7 +69,7 @@ impl SelfStruct { /// Foo //~^ ERROR documentation comments cannot be applied to function #[test] a: i32, - //~^ ERROR expected an inert attribute, found an attribute macro + //~^ ERROR expected non-macro attribute, found attribute macro /// Baz //~^ ERROR documentation comments cannot be applied to function #[must_use] @@ -90,7 +90,7 @@ impl RefStruct { /// Bar //~^ ERROR documentation comments cannot be applied to function #[test] a: i32, - //~^ ERROR expected an inert attribute, found an attribute macro + //~^ ERROR expected non-macro attribute, found attribute macro /// Baz //~^ ERROR documentation comments cannot be applied to function #[must_use] @@ -109,7 +109,7 @@ trait RefTrait { /// Bar //~^ ERROR documentation comments cannot be applied to function #[test] a: i32, - //~^ ERROR expected an inert attribute, found an attribute macro + //~^ ERROR expected non-macro attribute, found attribute macro /// Baz //~^ ERROR documentation comments cannot be applied to function #[must_use] @@ -124,7 +124,7 @@ trait RefTrait { /// Foo //~^ ERROR documentation comments cannot be applied to function #[test] a: i32, - //~^ ERROR expected an inert attribute, found an attribute macro + //~^ ERROR expected non-macro attribute, found attribute macro /// Baz //~^ ERROR documentation comments cannot be applied to function #[must_use] @@ -144,7 +144,7 @@ impl RefTrait for RefStruct { /// Bar //~^ ERROR documentation comments cannot be applied to function #[test] a: i32, - //~^ ERROR expected an inert attribute, found an attribute macro + //~^ ERROR expected non-macro attribute, found attribute macro /// Baz //~^ ERROR documentation comments cannot be applied to function #[must_use] @@ -161,7 +161,7 @@ fn main() { /// Foo //~^ ERROR documentation comments cannot be applied to function #[test] a: u32, - //~^ ERROR expected an inert attribute, found an attribute macro + //~^ ERROR expected non-macro attribute, found attribute macro /// Bar //~^ ERROR documentation comments cannot be applied to function #[must_use] diff --git a/src/test/ui/rfc-2565-param-attrs/param-attrs-builtin-attrs.stderr b/src/test/ui/rfc-2565-param-attrs/param-attrs-builtin-attrs.stderr index 4d0349e8765..edca8cea68d 100644 --- a/src/test/ui/rfc-2565-param-attrs/param-attrs-builtin-attrs.stderr +++ b/src/test/ui/rfc-2565-param-attrs/param-attrs-builtin-attrs.stderr @@ -1,62 +1,62 @@ -error: expected an inert attribute, found an attribute macro - --> $DIR/param-attrs-builtin-attrs.rs:5:9 +error: expected non-macro attribute, found attribute macro `test` + --> $DIR/param-attrs-builtin-attrs.rs:5:11 | LL | #[test] a: i32, - | ^^^^^^^ + | ^^^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/param-attrs-builtin-attrs.rs:21:5 +error: expected non-macro attribute, found attribute macro `test` + --> $DIR/param-attrs-builtin-attrs.rs:21:7 | LL | #[test] a: u32, - | ^^^^^^^ + | ^^^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/param-attrs-builtin-attrs.rs:36:5 +error: expected non-macro attribute, found attribute macro `test` + --> $DIR/param-attrs-builtin-attrs.rs:36:7 | LL | #[test] a: u32, - | ^^^^^^^ + | ^^^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/param-attrs-builtin-attrs.rs:56:9 +error: expected non-macro attribute, found attribute macro `test` + --> $DIR/param-attrs-builtin-attrs.rs:56:11 | LL | #[test] a: i32, - | ^^^^^^^ + | ^^^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/param-attrs-builtin-attrs.rs:71:9 +error: expected non-macro attribute, found attribute macro `test` + --> $DIR/param-attrs-builtin-attrs.rs:71:11 | LL | #[test] a: i32, - | ^^^^^^^ + | ^^^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/param-attrs-builtin-attrs.rs:92:9 +error: expected non-macro attribute, found attribute macro `test` + --> $DIR/param-attrs-builtin-attrs.rs:92:11 | LL | #[test] a: i32, - | ^^^^^^^ + | ^^^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/param-attrs-builtin-attrs.rs:111:9 +error: expected non-macro attribute, found attribute macro `test` + --> $DIR/param-attrs-builtin-attrs.rs:111:11 | LL | #[test] a: i32, - | ^^^^^^^ + | ^^^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/param-attrs-builtin-attrs.rs:126:9 +error: expected non-macro attribute, found attribute macro `test` + --> $DIR/param-attrs-builtin-attrs.rs:126:11 | LL | #[test] a: i32, - | ^^^^^^^ + | ^^^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/param-attrs-builtin-attrs.rs:146:9 +error: expected non-macro attribute, found attribute macro `test` + --> $DIR/param-attrs-builtin-attrs.rs:146:11 | LL | #[test] a: i32, - | ^^^^^^^ + | ^^^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/param-attrs-builtin-attrs.rs:163:9 +error: expected non-macro attribute, found attribute macro `test` + --> $DIR/param-attrs-builtin-attrs.rs:163:11 | LL | #[test] a: u32, - | ^^^^^^^ + | ^^^^ not a non-macro attribute error: documentation comments cannot be applied to function parameters --> $DIR/param-attrs-builtin-attrs.rs:3:9 diff --git a/src/test/ui/rfc-2565-param-attrs/proc-macro-cannot-be-used.rs b/src/test/ui/rfc-2565-param-attrs/proc-macro-cannot-be-used.rs index be9085d5878..fcfa610ec85 100644 --- a/src/test/ui/rfc-2565-param-attrs/proc-macro-cannot-be-used.rs +++ b/src/test/ui/rfc-2565-param-attrs/proc-macro-cannot-be-used.rs @@ -8,58 +8,58 @@ use ident_mac::id; struct W(u8); extern "C" { fn ffi(#[id] arg1: i32, #[id] ...); } -//~^ ERROR expected an inert attribute, found an attribute macro -//~| ERROR expected an inert attribute, found an attribute macro +//~^ ERROR expected non-macro attribute, found attribute macro +//~| ERROR expected non-macro attribute, found attribute macro unsafe extern "C" fn cvar(arg1: i32, #[id] mut args: ...) {} -//~^ ERROR expected an inert attribute, found an attribute macro +//~^ ERROR expected non-macro attribute, found attribute macro type Alias = extern "C" fn(#[id] u8, #[id] ...); - //~^ ERROR expected an inert attribute, found an attribute macro - //~| ERROR expected an inert attribute, found an attribute macro + //~^ ERROR expected non-macro attribute, found attribute macro + //~| ERROR expected non-macro attribute, found attribute macro fn free(#[id] arg1: u8) { - //~^ ERROR expected an inert attribute, found an attribute macro + //~^ ERROR expected non-macro attribute, found attribute macro let lam = |#[id] W(x), #[id] y: usize| (); - //~^ ERROR expected an inert attribute, found an attribute macro - //~| ERROR expected an inert attribute, found an attribute macro + //~^ ERROR expected non-macro attribute, found attribute macro + //~| ERROR expected non-macro attribute, found attribute macro } impl W { fn inherent1(#[id] self, #[id] arg1: u8) {} - //~^ ERROR expected an inert attribute, found an attribute macro - //~| ERROR expected an inert attribute, found an attribute macro + //~^ ERROR expected non-macro attribute, found attribute macro + //~| ERROR expected non-macro attribute, found attribute macro fn inherent2(#[id] &self, #[id] arg1: u8) {} - //~^ ERROR expected an inert attribute, found an attribute macro - //~| ERROR expected an inert attribute, found an attribute macro + //~^ ERROR expected non-macro attribute, found attribute macro + //~| ERROR expected non-macro attribute, found attribute macro fn inherent3<'a>(#[id] &'a mut self, #[id] arg1: u8) {} - //~^ ERROR expected an inert attribute, found an attribute macro - //~| ERROR expected an inert attribute, found an attribute macro + //~^ ERROR expected non-macro attribute, found attribute macro + //~| ERROR expected non-macro attribute, found attribute macro fn inherent4<'a>(#[id] self: Box<Self>, #[id] arg1: u8) {} - //~^ ERROR expected an inert attribute, found an attribute macro - //~| ERROR expected an inert attribute, found an attribute macro + //~^ ERROR expected non-macro attribute, found attribute macro + //~| ERROR expected non-macro attribute, found attribute macro fn issue_64682_associated_fn<'a>(#[id] arg1: u8, #[id] arg2: u8) {} - //~^ ERROR expected an inert attribute, found an attribute macro - //~| ERROR expected an inert attribute, found an attribute macro + //~^ ERROR expected non-macro attribute, found attribute macro + //~| ERROR expected non-macro attribute, found attribute macro } trait A { fn trait1(#[id] self, #[id] arg1: u8); - //~^ ERROR expected an inert attribute, found an attribute macro - //~| ERROR expected an inert attribute, found an attribute macro + //~^ ERROR expected non-macro attribute, found attribute macro + //~| ERROR expected non-macro attribute, found attribute macro fn trait2(#[id] &self, #[id] arg1: u8); - //~^ ERROR expected an inert attribute, found an attribute macro - //~| ERROR expected an inert attribute, found an attribute macro + //~^ ERROR expected non-macro attribute, found attribute macro + //~| ERROR expected non-macro attribute, found attribute macro fn trait3<'a>(#[id] &'a mut self, #[id] arg1: u8); - //~^ ERROR expected an inert attribute, found an attribute macro - //~| ERROR expected an inert attribute, found an attribute macro + //~^ ERROR expected non-macro attribute, found attribute macro + //~| ERROR expected non-macro attribute, found attribute macro fn trait4<'a>(#[id] self: Box<Self>, #[id] arg1: u8, #[id] Vec<u8>); - //~^ ERROR expected an inert attribute, found an attribute macro - //~| ERROR expected an inert attribute, found an attribute macro - //~| ERROR expected an inert attribute, found an attribute macro + //~^ ERROR expected non-macro attribute, found attribute macro + //~| ERROR expected non-macro attribute, found attribute macro + //~| ERROR expected non-macro attribute, found attribute macro fn issue_64682_associated_fn<'a>(#[id] arg1: u8, #[id] arg2: u8); - //~^ ERROR expected an inert attribute, found an attribute macro - //~| ERROR expected an inert attribute, found an attribute macro + //~^ ERROR expected non-macro attribute, found attribute macro + //~| ERROR expected non-macro attribute, found attribute macro } fn main() {} diff --git a/src/test/ui/rfc-2565-param-attrs/proc-macro-cannot-be-used.stderr b/src/test/ui/rfc-2565-param-attrs/proc-macro-cannot-be-used.stderr index 1cc3c3d8228..38c5050f342 100644 --- a/src/test/ui/rfc-2565-param-attrs/proc-macro-cannot-be-used.stderr +++ b/src/test/ui/rfc-2565-param-attrs/proc-macro-cannot-be-used.stderr @@ -1,176 +1,176 @@ -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-cannot-be-used.rs:10:21 +error: expected non-macro attribute, found attribute macro `id` + --> $DIR/proc-macro-cannot-be-used.rs:10:23 | LL | extern "C" { fn ffi(#[id] arg1: i32, #[id] ...); } - | ^^^^^ + | ^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-cannot-be-used.rs:10:38 +error: expected non-macro attribute, found attribute macro `id` + --> $DIR/proc-macro-cannot-be-used.rs:10:40 | LL | extern "C" { fn ffi(#[id] arg1: i32, #[id] ...); } - | ^^^^^ + | ^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-cannot-be-used.rs:14:38 +error: expected non-macro attribute, found attribute macro `id` + --> $DIR/proc-macro-cannot-be-used.rs:14:40 | LL | unsafe extern "C" fn cvar(arg1: i32, #[id] mut args: ...) {} - | ^^^^^ + | ^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-cannot-be-used.rs:17:28 +error: expected non-macro attribute, found attribute macro `id` + --> $DIR/proc-macro-cannot-be-used.rs:17:30 | LL | type Alias = extern "C" fn(#[id] u8, #[id] ...); - | ^^^^^ + | ^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-cannot-be-used.rs:17:38 +error: expected non-macro attribute, found attribute macro `id` + --> $DIR/proc-macro-cannot-be-used.rs:17:40 | LL | type Alias = extern "C" fn(#[id] u8, #[id] ...); - | ^^^^^ + | ^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-cannot-be-used.rs:21:9 +error: expected non-macro attribute, found attribute macro `id` + --> $DIR/proc-macro-cannot-be-used.rs:21:11 | LL | fn free(#[id] arg1: u8) { - | ^^^^^ + | ^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-cannot-be-used.rs:23:16 +error: expected non-macro attribute, found attribute macro `id` + --> $DIR/proc-macro-cannot-be-used.rs:23:18 | LL | let lam = |#[id] W(x), #[id] y: usize| (); - | ^^^^^ + | ^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-cannot-be-used.rs:23:28 +error: expected non-macro attribute, found attribute macro `id` + --> $DIR/proc-macro-cannot-be-used.rs:23:30 | LL | let lam = |#[id] W(x), #[id] y: usize| (); - | ^^^^^ + | ^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-cannot-be-used.rs:29:18 +error: expected non-macro attribute, found attribute macro `id` + --> $DIR/proc-macro-cannot-be-used.rs:29:20 | LL | fn inherent1(#[id] self, #[id] arg1: u8) {} - | ^^^^^ + | ^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-cannot-be-used.rs:29:30 +error: expected non-macro attribute, found attribute macro `id` + --> $DIR/proc-macro-cannot-be-used.rs:29:32 | LL | fn inherent1(#[id] self, #[id] arg1: u8) {} - | ^^^^^ + | ^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-cannot-be-used.rs:32:18 +error: expected non-macro attribute, found attribute macro `id` + --> $DIR/proc-macro-cannot-be-used.rs:32:20 | LL | fn inherent2(#[id] &self, #[id] arg1: u8) {} - | ^^^^^ + | ^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-cannot-be-used.rs:32:31 +error: expected non-macro attribute, found attribute macro `id` + --> $DIR/proc-macro-cannot-be-used.rs:32:33 | LL | fn inherent2(#[id] &self, #[id] arg1: u8) {} - | ^^^^^ + | ^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-cannot-be-used.rs:35:22 +error: expected non-macro attribute, found attribute macro `id` + --> $DIR/proc-macro-cannot-be-used.rs:35:24 | LL | fn inherent3<'a>(#[id] &'a mut self, #[id] arg1: u8) {} - | ^^^^^ + | ^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-cannot-be-used.rs:35:42 +error: expected non-macro attribute, found attribute macro `id` + --> $DIR/proc-macro-cannot-be-used.rs:35:44 | LL | fn inherent3<'a>(#[id] &'a mut self, #[id] arg1: u8) {} - | ^^^^^ + | ^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-cannot-be-used.rs:38:22 +error: expected non-macro attribute, found attribute macro `id` + --> $DIR/proc-macro-cannot-be-used.rs:38:24 | LL | fn inherent4<'a>(#[id] self: Box<Self>, #[id] arg1: u8) {} - | ^^^^^ + | ^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-cannot-be-used.rs:38:45 +error: expected non-macro attribute, found attribute macro `id` + --> $DIR/proc-macro-cannot-be-used.rs:38:47 | LL | fn inherent4<'a>(#[id] self: Box<Self>, #[id] arg1: u8) {} - | ^^^^^ + | ^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-cannot-be-used.rs:41:38 +error: expected non-macro attribute, found attribute macro `id` + --> $DIR/proc-macro-cannot-be-used.rs:41:40 | LL | fn issue_64682_associated_fn<'a>(#[id] arg1: u8, #[id] arg2: u8) {} - | ^^^^^ + | ^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-cannot-be-used.rs:41:54 +error: expected non-macro attribute, found attribute macro `id` + --> $DIR/proc-macro-cannot-be-used.rs:41:56 | LL | fn issue_64682_associated_fn<'a>(#[id] arg1: u8, #[id] arg2: u8) {} - | ^^^^^ + | ^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-cannot-be-used.rs:47:15 +error: expected non-macro attribute, found attribute macro `id` + --> $DIR/proc-macro-cannot-be-used.rs:47:17 | LL | fn trait1(#[id] self, #[id] arg1: u8); - | ^^^^^ + | ^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-cannot-be-used.rs:47:27 +error: expected non-macro attribute, found attribute macro `id` + --> $DIR/proc-macro-cannot-be-used.rs:47:29 | LL | fn trait1(#[id] self, #[id] arg1: u8); - | ^^^^^ + | ^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-cannot-be-used.rs:50:15 +error: expected non-macro attribute, found attribute macro `id` + --> $DIR/proc-macro-cannot-be-used.rs:50:17 | LL | fn trait2(#[id] &self, #[id] arg1: u8); - | ^^^^^ + | ^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-cannot-be-used.rs:50:28 +error: expected non-macro attribute, found attribute macro `id` + --> $DIR/proc-macro-cannot-be-used.rs:50:30 | LL | fn trait2(#[id] &self, #[id] arg1: u8); - | ^^^^^ + | ^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-cannot-be-used.rs:53:19 +error: expected non-macro attribute, found attribute macro `id` + --> $DIR/proc-macro-cannot-be-used.rs:53:21 | LL | fn trait3<'a>(#[id] &'a mut self, #[id] arg1: u8); - | ^^^^^ + | ^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-cannot-be-used.rs:53:39 +error: expected non-macro attribute, found attribute macro `id` + --> $DIR/proc-macro-cannot-be-used.rs:53:41 | LL | fn trait3<'a>(#[id] &'a mut self, #[id] arg1: u8); - | ^^^^^ + | ^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-cannot-be-used.rs:56:19 +error: expected non-macro attribute, found attribute macro `id` + --> $DIR/proc-macro-cannot-be-used.rs:56:21 | LL | fn trait4<'a>(#[id] self: Box<Self>, #[id] arg1: u8, #[id] Vec<u8>); - | ^^^^^ + | ^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-cannot-be-used.rs:56:42 +error: expected non-macro attribute, found attribute macro `id` + --> $DIR/proc-macro-cannot-be-used.rs:56:44 | LL | fn trait4<'a>(#[id] self: Box<Self>, #[id] arg1: u8, #[id] Vec<u8>); - | ^^^^^ + | ^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-cannot-be-used.rs:56:58 +error: expected non-macro attribute, found attribute macro `id` + --> $DIR/proc-macro-cannot-be-used.rs:56:60 | LL | fn trait4<'a>(#[id] self: Box<Self>, #[id] arg1: u8, #[id] Vec<u8>); - | ^^^^^ + | ^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-cannot-be-used.rs:60:38 +error: expected non-macro attribute, found attribute macro `id` + --> $DIR/proc-macro-cannot-be-used.rs:60:40 | LL | fn issue_64682_associated_fn<'a>(#[id] arg1: u8, #[id] arg2: u8); - | ^^^^^ + | ^^ not a non-macro attribute -error: expected an inert attribute, found an attribute macro - --> $DIR/proc-macro-cannot-be-used.rs:60:54 +error: expected non-macro attribute, found attribute macro `id` + --> $DIR/proc-macro-cannot-be-used.rs:60:56 | LL | fn issue_64682_associated_fn<'a>(#[id] arg1: u8, #[id] arg2: u8); - | ^^^^^ + | ^^ not a non-macro attribute error: aborting due to 29 previous errors diff --git a/src/test/ui/span/issue-36530.rs b/src/test/ui/span/issue-36530.rs index 4776740d8de..70e04bf7ee6 100644 --- a/src/test/ui/span/issue-36530.rs +++ b/src/test/ui/span/issue-36530.rs @@ -6,7 +6,7 @@ #[foo] mod foo { - #![foo] //~ ERROR non-builtin inner attributes are unstable + #![foo] //~ ERROR custom inner attributes are unstable } fn main() {} diff --git a/src/test/ui/span/issue-36530.stderr b/src/test/ui/span/issue-36530.stderr index 79b12590fc5..a998d7217a1 100644 --- a/src/test/ui/span/issue-36530.stderr +++ b/src/test/ui/span/issue-36530.stderr @@ -1,8 +1,8 @@ -error[E0658]: non-builtin inner attributes are unstable - --> $DIR/issue-36530.rs:9:5 +error[E0658]: custom inner attributes are unstable + --> $DIR/issue-36530.rs:9:8 | LL | #![foo] - | ^^^^^^^ + | ^^^ | = note: see issue #54726 <https://github.com/rust-lang/rust/issues/54726> for more information = help: add `#![feature(custom_inner_attributes)]` to the crate attributes to enable diff --git a/src/test/ui/span/issue-43927-non-ADT-derive.rs b/src/test/ui/span/issue-43927-non-ADT-derive.rs index 89b8eba1e95..8f1599a5abc 100644 --- a/src/test/ui/span/issue-43927-non-ADT-derive.rs +++ b/src/test/ui/span/issue-43927-non-ADT-derive.rs @@ -5,9 +5,6 @@ //~| ERROR cannot determine resolution for the derive macro `Debug` //~| ERROR cannot determine resolution for the derive macro `PartialEq` //~| ERROR cannot determine resolution for the derive macro `Eq` -//~| ERROR cannot determine resolution for the derive macro `Debug` -//~| ERROR cannot determine resolution for the derive macro `PartialEq` -//~| ERROR cannot determine resolution for the derive macro `Eq` struct DerivedOn; fn main() {} diff --git a/src/test/ui/span/issue-43927-non-ADT-derive.stderr b/src/test/ui/span/issue-43927-non-ADT-derive.stderr index b160a4e5877..85beac535c9 100644 --- a/src/test/ui/span/issue-43927-non-ADT-derive.stderr +++ b/src/test/ui/span/issue-43927-non-ADT-derive.stderr @@ -28,30 +28,6 @@ LL | #![derive(Debug, PartialEq, Eq)] // should be an outer attribute! | = note: import resolution is stuck, try simplifying macro imports -error: cannot determine resolution for the derive macro `Eq` - --> $DIR/issue-43927-non-ADT-derive.rs:3:29 - | -LL | #![derive(Debug, PartialEq, Eq)] // should be an outer attribute! - | ^^ - | - = note: import resolution is stuck, try simplifying macro imports - -error: cannot determine resolution for the derive macro `PartialEq` - --> $DIR/issue-43927-non-ADT-derive.rs:3:18 - | -LL | #![derive(Debug, PartialEq, Eq)] // should be an outer attribute! - | ^^^^^^^^^ - | - = note: import resolution is stuck, try simplifying macro imports - -error: cannot determine resolution for the derive macro `Debug` - --> $DIR/issue-43927-non-ADT-derive.rs:3:11 - | -LL | #![derive(Debug, PartialEq, Eq)] // should be an outer attribute! - | ^^^^^ - | - = note: import resolution is stuck, try simplifying macro imports - -error: aborting due to 7 previous errors +error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0774`. |
