Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 14 pull requests #62413

Closed
wants to merge 50 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
3d2c4ff
Optimize pointer alignment in utf8 validation
jridgewell May 30, 2019
7d0a952
Implement initernal lint LINT_PASS_IMPL_WITHOUT_MACRO
flip1995 May 2, 2019
37f09cb
Only allow {declare,impl}_lint_pass macros for implementing LintPass
flip1995 Jun 13, 2019
084c829
Enable internal lints in bootstrap
flip1995 Jun 17, 2019
65c81de
Allow default_hash_types in some crates
flip1995 Jun 17, 2019
08b81f2
Rename internal -> rustc::internal
flip1995 Jun 17, 2019
7de6f54
Turn internal lints into tool lints
flip1995 Jun 24, 2019
8e087cd
Use symbols in lint tool list
flip1995 Jun 24, 2019
d0625a3
Allow usage_of_ty_tykind only in sty
flip1995 Jun 24, 2019
16b37b5
Update linked OpenSSL version
alexcrichton Jun 26, 2019
e475539
Add MemoryExtra in InterpretCx constructor params
pvdrz Jun 26, 2019
e32b8eb
Remove default bound for Machine::MemoryExtra
pvdrz Jun 26, 2019
0ffb643
Make sure `#[rustc_doc_only_macro]` and other rustc attributes are re…
petrochenkov Jun 29, 2019
e4e7eb2
Feature gate `rustc` attributes harder
petrochenkov Jun 30, 2019
2bad604
request at least ptr-size alignment from posix_memalign
RalfJung Jul 2, 2019
576369b
improve and deduplicate comments
RalfJung Jul 2, 2019
45e7ba9
test more possible overaligned requests
RalfJung Jul 2, 2019
2e47fc3
fix unused-import error on android
RalfJung Jul 3, 2019
e45bbaf
Fix merge conflicts
pvdrz Jul 4, 2019
6b75d08
Remove compile-pass from compiletest
JohnTitor Jul 4, 2019
7987719
remove FIXMEs for functions that won't go away
ljedrz Jun 27, 2019
4f7ba51
rename hir::map::local_def_id to local_def_id_from_node_id
ljedrz Jun 27, 2019
37d7e1f
rename hir::map::local_def_id_from_hir_id to local_def_id
ljedrz Jun 27, 2019
c6131b2
rename hir::map::opt_local_def_id*
ljedrz Jun 27, 2019
01e0d83
infer::error_reporting: adjust 2 debug messages
ljedrz Jun 28, 2019
675bfb6
fix a dep_graph doc regarding type_of_item
ljedrz Jul 2, 2019
a6030ff
infer: fix a Region-related debug message
ljedrz Jul 2, 2019
c3fcf28
Remove compile-pass from error codes' explanation
JohnTitor Jul 4, 2019
3adad33
Update rustc-guide
JohnTitor Jul 4, 2019
7f035ba
Fix a typo in Write::write_vectored docs
pawroman Jul 4, 2019
61ddf5e
Create async version of the dynamic-drop test
matthewjasper Jun 27, 2019
f4b30f4
Update README.md
markebrooks Jul 4, 2019
90419d3
Remove `solve_nll_region_constraints` measurements from `-Ztime-passe…
nnethercote Jun 25, 2019
87b103d
Add a "total" measurement to -Ztime-passes.
nnethercote Jun 25, 2019
050a71b
rustc_target: avoid negative register counts in the SysV x86_64 ABI.
eddyb Jul 4, 2019
f01e5e6
Lint on invalid values passed to x.py --warnings
Mark-Simulacrum Jul 5, 2019
c57637e
Rollup merge of #61339 - jridgewell:pointer-alignment, r=BurntSushi
Centril Jul 5, 2019
cf5e9e5
Rollup merge of #61545 - flip1995:internal_lints, r=oli-obk
Centril Jul 5, 2019
3ee2128
Rollup merge of #62110 - nnethercote:improve-Ztime-passes, r=Zoxc
Centril Jul 5, 2019
de03018
Rollup merge of #62133 - petrochenkov:norustc, r=eddyb
Centril Jul 5, 2019
1bd67c4
Rollup merge of #62151 - alexcrichton:update-openssl, r=Mark-Simulacrum
Centril Jul 5, 2019
b53ce9e
Rollup merge of #62158 - christianpoveda:ecx-memory-extra, r=RalfJung
Centril Jul 5, 2019
3525eff
Rollup merge of #62168 - ljedrz:the_culmination_of_hiridification, r=…
Centril Jul 5, 2019
7a595ee
Rollup merge of #62193 - matthewjasper:dynamic-drop-async, r=Centril
Centril Jul 5, 2019
c2b89eb
Rollup merge of #62296 - RalfJung:memalign, r=alexcrichton
Centril Jul 5, 2019
e142410
Rollup merge of #62369 - JohnTitor:remove-compile-pass, r=petrochenkov
Centril Jul 5, 2019
65a2db3
Rollup merge of #62380 - eddyb:x64-sysv-regs, r=nagisa
Centril Jul 5, 2019
aacf5a8
Rollup merge of #62381 - pawroman:fix_typo_in_write_vectored, r=Centril
Centril Jul 5, 2019
83ba37c
Rollup merge of #62390 - markebrooks:encourage, r=Centril
Centril Jul 5, 2019
76f9f4f
Rollup merge of #62406 - Mark-Simulacrum:warnings-lint, r=RalfJung
Centril Jul 5, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/libcore/lib.rs
Original file line number Diff line number Diff line change
@@ -74,6 +74,7 @@
#![feature(concat_idents)]
#![feature(const_fn)]
#![feature(const_fn_union)]
#![feature(custom_inner_attributes)]
#![feature(doc_cfg)]
#![feature(doc_spotlight)]
#![feature(extern_types)]
12 changes: 2 additions & 10 deletions src/librustc_resolve/macros.rs
Original file line number Diff line number Diff line change
@@ -323,21 +323,13 @@ impl<'a> Resolver<'a> {
let features = self.session.features_untracked();
if attr_kind == NonMacroAttrKind::Custom {
assert!(path.segments.len() == 1);
let name = path.segments[0].ident.as_str();
if name.starts_with("rustc_") {
if !features.rustc_attrs {
let msg = "unless otherwise specified, attributes with the prefix \
`rustc_` are reserved for internal compiler diagnostics";
self.report_unknown_attribute(path.span, &name, msg,
sym::rustc_attrs);
}
} else if !features.custom_attribute {
if !features.custom_attribute {
let msg = format!("The attribute `{}` is currently unknown to the \
compiler and may have meaning added to it in the \
future", path);
self.report_unknown_attribute(
path.span,
&name,
&path.segments[0].ident.as_str(),
&msg,
sym::custom_attribute,
);
4 changes: 1 addition & 3 deletions src/libsyntax/ext/expand.rs
Original file line number Diff line number Diff line change
@@ -1525,9 +1525,7 @@ impl<'feat> ExpansionConfig<'feat> {
}

fn enable_custom_inner_attributes(&self) -> bool {
self.features.map_or(false, |features| {
features.custom_inner_attributes || features.custom_attribute || features.rustc_attrs
})
self.features.map_or(false, |features| features.custom_inner_attributes)
}
}

52 changes: 39 additions & 13 deletions src/libsyntax/feature_gate.rs
Original file line number Diff line number Diff line change
@@ -1290,6 +1290,18 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
attribute is just used for rustc unit \
tests and will never be stable",
cfg_fn!(rustc_attrs))),
(sym::rustc_dump_env_program_clauses, Whitelisted, template!(Word), Gated(Stability::Unstable,
sym::rustc_attrs,
"the `#[rustc_dump_env_program_clauses]` \
attribute is just used for rustc unit \
tests and will never be stable",
cfg_fn!(rustc_attrs))),
(sym::rustc_object_lifetime_default, Whitelisted, template!(Word), Gated(Stability::Unstable,
sym::rustc_attrs,
"the `#[rustc_object_lifetime_default]` \
attribute is just used for rustc unit \
tests and will never be stable",
cfg_fn!(rustc_attrs))),
(sym::rustc_test_marker, Normal, template!(Word), Gated(Stability::Unstable,
sym::rustc_attrs,
"the `#[rustc_test_marker]` attribute \
@@ -1351,6 +1363,26 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
"internal implementation detail",
cfg_fn!(rustc_attrs))),

(sym::rustc_allocator_nounwind, Whitelisted, template!(Word), Gated(Stability::Unstable,
sym::rustc_attrs,
"internal implementation detail",
cfg_fn!(rustc_attrs))),

(sym::rustc_doc_only_macro, Whitelisted, template!(Word), Gated(Stability::Unstable,
sym::rustc_attrs,
"internal implementation detail",
cfg_fn!(rustc_attrs))),

(sym::rustc_promotable, Whitelisted, template!(Word), Gated(Stability::Unstable,
sym::rustc_attrs,
"internal implementation detail",
cfg_fn!(rustc_attrs))),

(sym::rustc_allow_const_fn_ptr, Whitelisted, template!(Word), Gated(Stability::Unstable,
sym::rustc_attrs,
"internal implementation detail",
cfg_fn!(rustc_attrs))),

(sym::rustc_dummy, Normal, template!(Word /* doesn't matter*/), Gated(Stability::Unstable,
sym::rustc_attrs,
"used by the test suite",
@@ -1647,19 +1679,13 @@ impl<'a> Context<'a> {
return;
}
}
if !attr::is_known(attr) {
if attr.name_or_empty().as_str().starts_with("rustc_") {
let msg = "unless otherwise specified, attributes with the prefix `rustc_` \
are reserved for internal compiler diagnostics";
gate_feature!(self, rustc_attrs, attr.span, msg);
} else if !is_macro {
// Only run the custom attribute lint during regular feature gate
// checking. Macro gating runs before the plugin attributes are
// registered, so we skip this in that case.
let msg = format!("The attribute `{}` is currently unknown to the compiler and \
may have meaning added to it in the future", attr.path);
gate_feature!(self, custom_attribute, attr.span, &msg);
}
if !is_macro && !attr::is_known(attr) {
// Only run the custom attribute lint during regular feature gate
// checking. Macro gating runs before the plugin attributes are
// registered, so we skip this in that case.
let msg = format!("The attribute `{}` is currently unknown to the compiler and \
may have meaning added to it in the future", attr.path);
gate_feature!(self, custom_attribute, attr.span, &msg);
}
}
}
5 changes: 3 additions & 2 deletions src/test/run-pass-fulldeps/issue-15778-pass.rs
Original file line number Diff line number Diff line change
@@ -2,12 +2,13 @@
// ignore-stage1
// compile-flags: -D crate-not-okay

#![feature(plugin, rustc_attrs)]
#![feature(plugin, custom_attribute, custom_inner_attributes)]

#![plugin(lint_for_crate)]
#![rustc_crate_okay]
#![rustc_crate_blue]
#![rustc_crate_red]
#![rustc_crate_grey]
#![rustc_crate_green]

pub fn main() { }
fn main() {}
52 changes: 0 additions & 52 deletions src/test/run-pass/attr-on-generic-formals.rs

This file was deleted.

6 changes: 2 additions & 4 deletions src/test/ui/attributes/attrs-with-no-formal-in-generics-1.rs
Original file line number Diff line number Diff line change
@@ -6,10 +6,8 @@

struct RefIntPair<'a, 'b>(&'a u32, &'b u32);

impl<#[rustc_1] 'a, 'b, #[oops]> RefIntPair<'a, 'b> {
impl<#[rustc_dummy] 'a, 'b, #[oops]> RefIntPair<'a, 'b> {
//~^ ERROR trailing attribute after generic parameter
}

fn main() {

}
fn main() {}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error: trailing attribute after generic parameter
--> $DIR/attrs-with-no-formal-in-generics-1.rs:9:25
--> $DIR/attrs-with-no-formal-in-generics-1.rs:9:29
|
LL | impl<#[rustc_1] 'a, 'b, #[oops]> RefIntPair<'a, 'b> {
| ^^^^^^^ attributes must go before parameters
LL | impl<#[rustc_dummy] 'a, 'b, #[oops]> RefIntPair<'a, 'b> {
| ^^^^^^^ attributes must go before parameters

error: aborting due to previous error

Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@

struct RefAny<'a, T>(&'a T);

impl<#[rustc_1] 'a, #[rustc_2] T, #[oops]> RefAny<'a, T> {}
impl<#[rustc_dummy] 'a, #[rustc_dummy] T, #[oops]> RefAny<'a, T> {}
//~^ ERROR trailing attribute after generic parameter

fn main() {}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error: trailing attribute after generic parameter
--> $DIR/attrs-with-no-formal-in-generics-2.rs:9:35
--> $DIR/attrs-with-no-formal-in-generics-2.rs:9:43
|
LL | impl<#[rustc_1] 'a, #[rustc_2] T, #[oops]> RefAny<'a, T> {}
| ^^^^^^^ attributes must go before parameters
LL | impl<#[rustc_dummy] 'a, #[rustc_dummy] T, #[oops]> RefAny<'a, T> {}
| ^^^^^^^ attributes must go before parameters

error: aborting due to previous error

Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ const fn error(_: fn()) {}

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_allow_const_fn_ptr]
//~^ ERROR unless otherwise specified, attributes with the prefix `rustc_` are reserved
//~^ ERROR internal implementation detail
const fn compiles(_: fn()) {}

fn main() {}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error[E0658]: unless otherwise specified, attributes with the prefix `rustc_` are reserved for internal compiler diagnostics
--> $DIR/allow_const_fn_ptr_feature_gate.rs:7:3
error[E0658]: internal implementation detail
--> $DIR/allow_const_fn_ptr_feature_gate.rs:7:1
|
LL | #[rustc_allow_const_fn_ptr]
| ^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add #![feature(rustc_attrs)] to the crate attributes to enable
4 changes: 2 additions & 2 deletions src/test/ui/feature-gates/feature-gate-rustc-attrs.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Test that `#[rustc_*]` attributes are gated by `rustc_attrs` feature gate.

#[rustc_foo]
//~^ ERROR unless otherwise specified, attributes with the prefix `rustc_` are reserved
#[rustc_dummy]
//~^ ERROR used by the test suite

fn main() {}
8 changes: 4 additions & 4 deletions src/test/ui/feature-gates/feature-gate-rustc-attrs.stderr
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error[E0658]: unless otherwise specified, attributes with the prefix `rustc_` are reserved for internal compiler diagnostics
--> $DIR/feature-gate-rustc-attrs.rs:3:3
error[E0658]: used by the test suite
--> $DIR/feature-gate-rustc-attrs.rs:3:1
|
LL | #[rustc_foo]
| ^^^^^^^^^
LL | #[rustc_dummy]
| ^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add #![feature(rustc_attrs)] to the crate attributes to enable
44 changes: 19 additions & 25 deletions src/test/ui/generic/generic-param-attrs.rs
Original file line number Diff line number Diff line change
@@ -1,44 +1,38 @@
// This test previously ensured that attributes on formals in generic parameter
// lists are rejected without a feature gate.
//
// (We are prefixing all tested features with `rustc_`, to ensure that
// the attributes themselves won't be rejected by the compiler when
// using `rustc_attrs` feature. There is a separate compile-fail/ test
// ensuring that the attribute feature-gating works in this context.)

// compile-pass

#![feature(rustc_attrs)]
#![allow(dead_code)]

struct StLt<#[rustc_lt_struct] 'a>(&'a u32);
struct StTy<#[rustc_ty_struct] I>(I);
enum EnLt<#[rustc_lt_enum] 'b> { A(&'b u32), B }
enum EnTy<#[rustc_ty_enum] J> { A(J), B }
trait TrLt<#[rustc_lt_trait] 'c> { fn foo(&self, _: &'c [u32]) -> &'c u32; }
trait TrTy<#[rustc_ty_trait] K> { fn foo(&self, _: K); }
type TyLt<#[rustc_lt_type] 'd> = &'d u32;
type TyTy<#[rustc_ty_type] L> = (L, );

impl<#[rustc_lt_inherent] 'e> StLt<'e> { }
impl<#[rustc_ty_inherent] M> StTy<M> { }
impl<#[rustc_lt_impl_for] 'f> TrLt<'f> for StLt<'f> {

struct StLt<#[rustc_dummy] 'a>(&'a u32);
struct StTy<#[rustc_dummy] I>(I);
enum EnLt<#[rustc_dummy] 'b> { A(&'b u32), B }
enum EnTy<#[rustc_dummy] J> { A(J), B }
trait TrLt<#[rustc_dummy] 'c> { fn foo(&self, _: &'c [u32]) -> &'c u32; }
trait TrTy<#[rustc_dummy] K> { fn foo(&self, _: K); }
type TyLt<#[rustc_dummy] 'd> = &'d u32;
type TyTy<#[rustc_dummy] L> = (L, );

impl<#[rustc_dummy] 'e> StLt<'e> { }
impl<#[rustc_dummy] M> StTy<M> { }
impl<#[rustc_dummy] 'f> TrLt<'f> for StLt<'f> {
fn foo(&self, _: &'f [u32]) -> &'f u32 { loop { } }
}
impl<#[rustc_ty_impl_for] N> TrTy<N> for StTy<N> {
impl<#[rustc_dummy] N> TrTy<N> for StTy<N> {
fn foo(&self, _: N) { }
}

fn f_lt<#[rustc_lt_fn] 'g>(_: &'g [u32]) -> &'g u32 { loop { } }
fn f_ty<#[rustc_ty_fn] O>(_: O) { }
fn f_lt<#[rustc_dummy] 'g>(_: &'g [u32]) -> &'g u32 { loop { } }
fn f_ty<#[rustc_dummy] O>(_: O) { }

impl<I> StTy<I> {
fn m_lt<#[rustc_lt_meth] 'h>(_: &'h [u32]) -> &'h u32 { loop { } }
fn m_ty<#[rustc_ty_meth] P>(_: P) { }
fn m_lt<#[rustc_dummy] 'h>(_: &'h [u32]) -> &'h u32 { loop { } }
fn m_ty<#[rustc_dummy] P>(_: P) { }
}

fn hof_lt<Q>(_: Q)
where Q: for <#[rustc_lt_hof] 'i> Fn(&'i [u32]) -> &'i u32
where Q: for <#[rustc_dummy] 'i> Fn(&'i [u32]) -> &'i u32
{}

fn main() {}
7 changes: 1 addition & 6 deletions src/test/ui/nll/ty-outlives/projection-implied-bounds.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
// compile-flags:-Zborrowck=mir -Zverbose

// Test that we can deduce when projections like `T::Item` outlive the
// function body. Test that this does not imply that `T: 'a` holds.

#![allow(warnings)]
#![feature(rustc_attrs)]
// compile-flags:-Zborrowck=mir -Zverbose

use std::cell::Cell;

@@ -18,7 +15,6 @@ where
f(&value, Cell::new(&n));
}

#[rustc_errors]
fn generic1<T: Iterator>(value: T) {
// No error here:
twice(value, |value_ref, item| invoke1(item));
@@ -30,7 +26,6 @@ where
{
}

#[rustc_errors]
fn generic2<T: Iterator>(value: T) {
twice(value, |value_ref, item| invoke2(value_ref, item));
//~^ ERROR the parameter type `T` may not live long enough
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0310]: the parameter type `T` may not live long enough
--> $DIR/projection-implied-bounds.rs:35:18
--> $DIR/projection-implied-bounds.rs:30:18
|
LL | twice(value, |value_ref, item| invoke2(value_ref, item));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4 changes: 0 additions & 4 deletions src/test/ui/nll/ty-outlives/ty-param-implied-bounds.rs
Original file line number Diff line number Diff line change
@@ -4,9 +4,6 @@
// Test that we assume that universal types like `T` outlive the
// function body.

#![allow(warnings)]
#![feature(rustc_attrs)]

use std::cell::Cell;

fn twice<F, T>(value: T, mut f: F)
@@ -17,7 +14,6 @@ where
f(Cell::new(&value));
}

#[rustc_errors]
fn generic<T>(value: T) {
// No error here:
twice(value, |r| invoke(r));
48 changes: 24 additions & 24 deletions src/test/ui/object-lifetime/object-lifetime-default.stderr
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
error: 'a,Ambiguous
--> $DIR/object-lifetime-default.rs:24:1
error: BaseDefault
--> $DIR/object-lifetime-default.rs:6:1
|
LL | struct G<'a,'b,T:'a,U:'a+'b>(&'a T, &'b U);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | struct A<T>(T);
| ^^^^^^^^^^^^^^^

error: 'a,'b
--> $DIR/object-lifetime-default.rs:21:1
error: BaseDefault
--> $DIR/object-lifetime-default.rs:9:1
|
LL | struct F<'a,'b,T:'a,U:'b>(&'a T, &'b U);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | struct B<'a,T>(&'a (), T);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^

error: 'b
--> $DIR/object-lifetime-default.rs:18:1
error: 'a
--> $DIR/object-lifetime-default.rs:12:1
|
LL | struct E<'a,'b:'a,T:'b>(&'a T, &'b T);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | struct C<'a,T:'a>(&'a T);
| ^^^^^^^^^^^^^^^^^^^^^^^^^

error: Ambiguous
--> $DIR/object-lifetime-default.rs:15:1
|
LL | struct D<'a,'b,T:'a+'b>(&'a T, &'b T);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: 'a
--> $DIR/object-lifetime-default.rs:12:1
error: 'b
--> $DIR/object-lifetime-default.rs:18:1
|
LL | struct C<'a,T:'a>(&'a T);
| ^^^^^^^^^^^^^^^^^^^^^^^^^
LL | struct E<'a,'b:'a,T:'b>(&'a T, &'b T);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: BaseDefault
--> $DIR/object-lifetime-default.rs:9:1
error: 'a,'b
--> $DIR/object-lifetime-default.rs:21:1
|
LL | struct B<'a,T>(&'a (), T);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | struct F<'a,'b,T:'a,U:'b>(&'a T, &'b U);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: BaseDefault
--> $DIR/object-lifetime-default.rs:6:1
error: 'a,Ambiguous
--> $DIR/object-lifetime-default.rs:24:1
|
LL | struct A<T>(T);
| ^^^^^^^^^^^^^^^
LL | struct G<'a,'b,T:'a,U:'a+'b>(&'a T, &'b U);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 7 previous errors

4 changes: 1 addition & 3 deletions src/test/ui/proc-macro/expand-to-unstable-2.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
// aux-build:derive-unstable-2.rs

#![allow(warnings)]

#[macro_use]
extern crate derive_unstable_2;

#[derive(Unstable)]
//~^ ERROR: reserved for internal compiler
//~^ ERROR attribute `rustc_foo` is currently unknown
struct A;

fn main() {
6 changes: 3 additions & 3 deletions src/test/ui/proc-macro/expand-to-unstable-2.stderr
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error[E0658]: unless otherwise specified, attributes with the prefix `rustc_` are reserved for internal compiler diagnostics
--> $DIR/expand-to-unstable-2.rs:8:10
error[E0658]: The attribute `rustc_foo` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/expand-to-unstable-2.rs:6:10
|
LL | #[derive(Unstable)]
| ^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add #![feature(rustc_attrs)] to the crate attributes to enable
= help: add #![feature(custom_attribute)] to the crate attributes to enable

error: aborting due to previous error

2 changes: 1 addition & 1 deletion src/test/ui/reserved/reserved-attr-on-macro.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#[rustc_attribute_should_be_reserved]
//~^ ERROR unless otherwise specified, attributes with the prefix `rustc_` are reserved
//~^ ERROR attribute `rustc_attribute_should_be_reserved` is currently unknown
macro_rules! foo {
() => (());
}
4 changes: 2 additions & 2 deletions src/test/ui/reserved/reserved-attr-on-macro.stderr
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error[E0658]: unless otherwise specified, attributes with the prefix `rustc_` are reserved for internal compiler diagnostics
error[E0658]: The attribute `rustc_attribute_should_be_reserved` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/reserved-attr-on-macro.rs:1:3
|
LL | #[rustc_attribute_should_be_reserved]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add #![feature(rustc_attrs)] to the crate attributes to enable
= help: add #![feature(custom_attribute)] to the crate attributes to enable

error: cannot determine resolution for the macro `foo`
--> $DIR/reserved-attr-on-macro.rs:8:5
17 changes: 6 additions & 11 deletions src/test/ui/suggestions/attribute-typos.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
#[deprcated] //~ ERROR E0658
fn foo() {} //~| HELP a built-in attribute with a similar name exists
//~| SUGGESTION deprecated
//~| HELP add #![feature(custom_attribute)] to the crate attributes to enable
#[deprcated] //~ ERROR attribute `deprcated` is currently unknown
fn foo() {}

#[tests] //~ ERROR E0658
fn bar() {} //~| HELP a built-in attribute with a similar name exists
//~| SUGGESTION test
//~| HELP add #![feature(custom_attribute)] to the crate attributes to enable
#[tests] //~ ERROR attribute `tests` is currently unknown to the compiler
fn bar() {}

#[rustc_err] //~ ERROR E0658
fn main() {} //~| HELP add #![feature(rustc_attrs)] to the crate attributes to enable
// don't suggest rustc attributes
#[rustc_err] //~ ERROR attribute `rustc_err` is currently unknown
fn main() {}
8 changes: 4 additions & 4 deletions src/test/ui/suggestions/attribute-typos.stderr
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
error[E0658]: unless otherwise specified, attributes with the prefix `rustc_` are reserved for internal compiler diagnostics
--> $DIR/attribute-typos.rs:11:3
error[E0658]: The attribute `rustc_err` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/attribute-typos.rs:7:3
|
LL | #[rustc_err]
| ^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add #![feature(rustc_attrs)] to the crate attributes to enable
= help: add #![feature(custom_attribute)] to the crate attributes to enable

error[E0658]: The attribute `tests` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/attribute-typos.rs:6:3
--> $DIR/attribute-typos.rs:4:3
|
LL | #[tests]
| ^^^^^ help: a built-in attribute with a similar name exists: `test`