Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Jul 13, 2019
1 parent 84dfb2c commit b7459f3
Show file tree
Hide file tree
Showing 23 changed files with 47 additions and 47 deletions.
2 changes: 1 addition & 1 deletion src/librustc_resolve/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ impl<'a> Resolver<'a> {
if attr_kind == NonMacroAttrKind::Custom {
assert!(path.segments.len() == 1);
if !features.custom_attribute {
let msg = format!("the attribute `{}` is currently unknown to the \
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(
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/attributes/obsolete-attr.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0658]: the attribute `fixed_stack_segment` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `fixed_stack_segment` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/obsolete-attr.rs:5:3
|
LL | #[fixed_stack_segment] fn f() {}
Expand All @@ -7,7 +7,7 @@ LL | #[fixed_stack_segment] fn f() {}
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add `#![feature(custom_attribute)]` to the crate attributes to enable

error[E0658]: the attribute `ab_isize` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `ab_isize` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/obsolete-attr.rs:3:3
|
LL | #[ab_isize="stdcall"] extern {}
Expand Down
6 changes: 3 additions & 3 deletions src/test/ui/attributes/unknown-attr.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0658]: the attribute `mutable_doc` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `mutable_doc` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/unknown-attr.rs:5:4
|
LL | #![mutable_doc]
Expand All @@ -7,7 +7,7 @@ LL | #![mutable_doc]
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add `#![feature(custom_attribute)]` to the crate attributes to enable

error[E0658]: the attribute `dance` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `dance` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/unknown-attr.rs:7:3
|
LL | #[dance] mod a {}
Expand All @@ -16,7 +16,7 @@ LL | #[dance] mod a {}
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add `#![feature(custom_attribute)]` to the crate attributes to enable

error[E0658]: the attribute `dance` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `dance` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/unknown-attr.rs:9:3
|
LL | #[dance] fn main() {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0658]: the attribute `unknown` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `unknown` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/cfg-attr-unknown-attribute-macro-expansion.rs:3:27
|
LL | #[cfg_attr(all(), unknown)]
Expand Down
6 changes: 3 additions & 3 deletions src/test/ui/custom_attribute.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#![feature(stmt_expr_attributes)]

#[foo] //~ ERROR the attribute `foo`
#[foo] //~ ERROR The attribute `foo`
fn main() {
#[foo] //~ ERROR the attribute `foo`
#[foo] //~ ERROR The attribute `foo`
let x = ();
#[foo] //~ ERROR the attribute `foo`
#[foo] //~ ERROR The attribute `foo`
x
}
6 changes: 3 additions & 3 deletions src/test/ui/custom_attribute.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0658]: the attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/custom_attribute.rs:3:3
|
LL | #[foo]
Expand All @@ -7,7 +7,7 @@ LL | #[foo]
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add `#![feature(custom_attribute)]` to the crate attributes to enable

error[E0658]: the attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/custom_attribute.rs:5:7
|
LL | #[foo]
Expand All @@ -16,7 +16,7 @@ LL | #[foo]
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add `#![feature(custom_attribute)]` to the crate attributes to enable

error[E0658]: the attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/custom_attribute.rs:7:7
|
LL | #[foo]
Expand Down
26 changes: 13 additions & 13 deletions src/test/ui/feature-gates/feature-gate-custom_attribute.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0658]: the attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/feature-gate-custom_attribute.rs:7:3
|
LL | #[fake_attr]
Expand All @@ -7,7 +7,7 @@ LL | #[fake_attr]
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add `#![feature(custom_attribute)]` to the crate attributes to enable

error[E0658]: the attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/feature-gate-custom_attribute.rs:8:3
|
LL | #[fake_attr(100)]
Expand All @@ -16,7 +16,7 @@ LL | #[fake_attr(100)]
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add `#![feature(custom_attribute)]` to the crate attributes to enable

error[E0658]: the attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/feature-gate-custom_attribute.rs:9:3
|
LL | #[fake_attr(1, 2, 3)]
Expand All @@ -25,7 +25,7 @@ LL | #[fake_attr(1, 2, 3)]
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add `#![feature(custom_attribute)]` to the crate attributes to enable

error[E0658]: the attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/feature-gate-custom_attribute.rs:10:3
|
LL | #[fake_attr("hello")]
Expand All @@ -34,7 +34,7 @@ LL | #[fake_attr("hello")]
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add `#![feature(custom_attribute)]` to the crate attributes to enable

error[E0658]: the attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/feature-gate-custom_attribute.rs:11:3
|
LL | #[fake_attr(name = "hello")]
Expand All @@ -43,7 +43,7 @@ LL | #[fake_attr(name = "hello")]
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add `#![feature(custom_attribute)]` to the crate attributes to enable

error[E0658]: the attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/feature-gate-custom_attribute.rs:12:3
|
LL | #[fake_attr(1, "hi", key = 12, true, false)]
Expand All @@ -52,7 +52,7 @@ LL | #[fake_attr(1, "hi", key = 12, true, false)]
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add `#![feature(custom_attribute)]` to the crate attributes to enable

error[E0658]: the attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/feature-gate-custom_attribute.rs:13:3
|
LL | #[fake_attr(key = "hello", val = 10)]
Expand All @@ -61,7 +61,7 @@ LL | #[fake_attr(key = "hello", val = 10)]
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add `#![feature(custom_attribute)]` to the crate attributes to enable

error[E0658]: the attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/feature-gate-custom_attribute.rs:14:3
|
LL | #[fake_attr(key("hello"), val(10))]
Expand All @@ -70,7 +70,7 @@ LL | #[fake_attr(key("hello"), val(10))]
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add `#![feature(custom_attribute)]` to the crate attributes to enable

error[E0658]: the attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/feature-gate-custom_attribute.rs:15:3
|
LL | #[fake_attr(enabled = true, disabled = false)]
Expand All @@ -79,7 +79,7 @@ LL | #[fake_attr(enabled = true, disabled = false)]
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add `#![feature(custom_attribute)]` to the crate attributes to enable

error[E0658]: the attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/feature-gate-custom_attribute.rs:16:3
|
LL | #[fake_attr(true)]
Expand All @@ -88,7 +88,7 @@ LL | #[fake_attr(true)]
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add `#![feature(custom_attribute)]` to the crate attributes to enable

error[E0658]: the attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/feature-gate-custom_attribute.rs:17:3
|
LL | #[fake_attr(pi = 3.14159)]
Expand All @@ -97,7 +97,7 @@ LL | #[fake_attr(pi = 3.14159)]
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add `#![feature(custom_attribute)]` to the crate attributes to enable

error[E0658]: the attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/feature-gate-custom_attribute.rs:18:3
|
LL | #[fake_attr(b"hi")]
Expand All @@ -106,7 +106,7 @@ LL | #[fake_attr(b"hi")]
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add `#![feature(custom_attribute)]` to the crate attributes to enable

error[E0658]: the attribute `fake_doc` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `fake_doc` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/feature-gate-custom_attribute.rs:19:3
|
LL | #[fake_doc(r"doc")]
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/feature-gates/feature-gate-rustc-attrs.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ LL | #[rustc_unknown]
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable

error[E0658]: the attribute `rustc_unknown` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `rustc_unknown` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/feature-gate-rustc-attrs.rs:20:3
|
LL | #[rustc_unknown]
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/issues/issue-32655.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0658]: the attribute `derive_Clone` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `derive_Clone` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/issue-32655.rs:6:11
|
LL | #[derive_Clone]
Expand All @@ -10,7 +10,7 @@ LL | foo!();
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add `#![feature(custom_attribute)]` to the crate attributes to enable

error[E0658]: the attribute `derive_Clone` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `derive_Clone` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/issue-32655.rs:18:7
|
LL | #[derive_Clone]
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-49074.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Check that unknown attribute error is shown even if there are unresolved macros.

#[marco_use] // typo
//~^ ERROR the attribute `marco_use` is currently unknown to the compiler
//~^ ERROR The attribute `marco_use` is currently unknown to the compiler
mod foo {
macro_rules! bar {
() => ();
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-49074.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0658]: the attribute `marco_use` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `marco_use` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/issue-49074.rs:3:3
|
LL | #[marco_use] // typo
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/macros/macro-reexport-removed.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ note: subsumed by `pub use`
LL | #![feature(macro_reexport)]
| ^^^^^^^^^^^^^^

error[E0658]: the attribute `macro_reexport` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `macro_reexport` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/macro-reexport-removed.rs:5:3
|
LL | #[macro_reexport(macro_one)]
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/proc-macro/derive-helper-shadowing.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0658]: the attribute `empty_helper` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `empty_helper` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/derive-helper-shadowing.rs:22:15
|
LL | #[empty_helper]
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/proc-macro/derive-still-gated.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0658]: the attribute `derive_Empty` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `derive_Empty` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/derive-still-gated.rs:6:3
|
LL | #[derive_Empty]
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/proc-macro/expand-to-unstable-2.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ 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

error[E0658]: the attribute `rustc_foo` is currently unknown to the compiler and may have meaning added to it in the future
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)]
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/proc-macro/issue-41211.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0658]: the attribute `identity_attr` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `identity_attr` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/issue-41211.rs:8:4
|
LL | #![identity_attr]
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/proc-macro/macro-namespace-reserved-2.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ error: can't use a procedural macro from the same crate that defines it
LL | #[derive(MyTrait)]
| ^^^^^^^

error[E0658]: the attribute `my_macro` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `my_macro` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/macro-namespace-reserved-2.rs:38:3
|
LL | #[my_macro]
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/proc-macro/proc-macro-attributes.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0658]: the attribute `C` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `C` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/proc-macro-attributes.rs:7:3
|
LL | #[C]
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/proc-macro/resolve-error.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0658]: the attribute `attr_proc_macra` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `attr_proc_macra` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/resolve-error.rs:27:3
|
LL | #[attr_proc_macra]
Expand All @@ -7,7 +7,7 @@ LL | #[attr_proc_macra]
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add `#![feature(custom_attribute)]` to the crate attributes to enable

error[E0658]: the attribute `FooWithLongNan` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `FooWithLongNan` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/resolve-error.rs:31:3
|
LL | #[FooWithLongNan]
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/reserved/reserved-attr-on-macro.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ 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

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
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]
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/span/issue-36530.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0658]: the attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/issue-36530.rs:3:3
|
LL | #[foo]
Expand All @@ -16,7 +16,7 @@ LL | #![foo]
= note: for more information, see https://github.com/rust-lang/rust/issues/54726
= help: add `#![feature(custom_inner_attributes)]` to the crate attributes to enable

error[E0658]: the attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future
error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future
--> $DIR/issue-36530.rs:5:8
|
LL | #![foo]
Expand Down
Loading

0 comments on commit b7459f3

Please sign in to comment.