Skip to content

Commit b7459f3

Browse files
committed
review comments
1 parent 84dfb2c commit b7459f3

23 files changed

+47
-47
lines changed

src/librustc_resolve/macros.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ impl<'a> Resolver<'a> {
328328
if attr_kind == NonMacroAttrKind::Custom {
329329
assert!(path.segments.len() == 1);
330330
if !features.custom_attribute {
331-
let msg = format!("the attribute `{}` is currently unknown to the \
331+
let msg = format!("The attribute `{}` is currently unknown to the \
332332
compiler and may have meaning added to it in the \
333333
future", path);
334334
self.report_unknown_attribute(

src/test/ui/attributes/obsolete-attr.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0658]: the attribute `fixed_stack_segment` is currently unknown to the compiler and may have meaning added to it in the future
1+
error[E0658]: The attribute `fixed_stack_segment` is currently unknown to the compiler and may have meaning added to it in the future
22
--> $DIR/obsolete-attr.rs:5:3
33
|
44
LL | #[fixed_stack_segment] fn f() {}
@@ -7,7 +7,7 @@ LL | #[fixed_stack_segment] fn f() {}
77
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
88
= help: add `#![feature(custom_attribute)]` to the crate attributes to enable
99

10-
error[E0658]: the attribute `ab_isize` is currently unknown to the compiler and may have meaning added to it in the future
10+
error[E0658]: The attribute `ab_isize` is currently unknown to the compiler and may have meaning added to it in the future
1111
--> $DIR/obsolete-attr.rs:3:3
1212
|
1313
LL | #[ab_isize="stdcall"] extern {}

src/test/ui/attributes/unknown-attr.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0658]: the attribute `mutable_doc` is currently unknown to the compiler and may have meaning added to it in the future
1+
error[E0658]: The attribute `mutable_doc` is currently unknown to the compiler and may have meaning added to it in the future
22
--> $DIR/unknown-attr.rs:5:4
33
|
44
LL | #![mutable_doc]
@@ -7,7 +7,7 @@ LL | #![mutable_doc]
77
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
88
= help: add `#![feature(custom_attribute)]` to the crate attributes to enable
99

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

19-
error[E0658]: the attribute `dance` is currently unknown to the compiler and may have meaning added to it in the future
19+
error[E0658]: The attribute `dance` is currently unknown to the compiler and may have meaning added to it in the future
2020
--> $DIR/unknown-attr.rs:9:3
2121
|
2222
LL | #[dance] fn main() {}

src/test/ui/conditional-compilation/cfg-attr-unknown-attribute-macro-expansion.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0658]: the attribute `unknown` is currently unknown to the compiler and may have meaning added to it in the future
1+
error[E0658]: The attribute `unknown` is currently unknown to the compiler and may have meaning added to it in the future
22
--> $DIR/cfg-attr-unknown-attribute-macro-expansion.rs:3:27
33
|
44
LL | #[cfg_attr(all(), unknown)]

src/test/ui/custom_attribute.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#![feature(stmt_expr_attributes)]
22

3-
#[foo] //~ ERROR the attribute `foo`
3+
#[foo] //~ ERROR The attribute `foo`
44
fn main() {
5-
#[foo] //~ ERROR the attribute `foo`
5+
#[foo] //~ ERROR The attribute `foo`
66
let x = ();
7-
#[foo] //~ ERROR the attribute `foo`
7+
#[foo] //~ ERROR The attribute `foo`
88
x
99
}

src/test/ui/custom_attribute.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0658]: the attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future
1+
error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future
22
--> $DIR/custom_attribute.rs:3:3
33
|
44
LL | #[foo]
@@ -7,7 +7,7 @@ LL | #[foo]
77
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
88
= help: add `#![feature(custom_attribute)]` to the crate attributes to enable
99

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

19-
error[E0658]: the attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future
19+
error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future
2020
--> $DIR/custom_attribute.rs:7:7
2121
|
2222
LL | #[foo]

src/test/ui/feature-gates/feature-gate-custom_attribute.stderr

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0658]: the attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future
1+
error[E0658]: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future
22
--> $DIR/feature-gate-custom_attribute.rs:7:3
33
|
44
LL | #[fake_attr]
@@ -7,7 +7,7 @@ LL | #[fake_attr]
77
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
88
= help: add `#![feature(custom_attribute)]` to the crate attributes to enable
99

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

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

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

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

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

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

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

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

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

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

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

109-
error[E0658]: the attribute `fake_doc` is currently unknown to the compiler and may have meaning added to it in the future
109+
error[E0658]: The attribute `fake_doc` is currently unknown to the compiler and may have meaning added to it in the future
110110
--> $DIR/feature-gate-custom_attribute.rs:19:3
111111
|
112112
LL | #[fake_doc(r"doc")]

src/test/ui/feature-gates/feature-gate-rustc-attrs.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ LL | #[rustc_unknown]
3737
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
3838
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
3939

40-
error[E0658]: the attribute `rustc_unknown` is currently unknown to the compiler and may have meaning added to it in the future
40+
error[E0658]: The attribute `rustc_unknown` is currently unknown to the compiler and may have meaning added to it in the future
4141
--> $DIR/feature-gate-rustc-attrs.rs:20:3
4242
|
4343
LL | #[rustc_unknown]

src/test/ui/issues/issue-32655.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0658]: the attribute `derive_Clone` is currently unknown to the compiler and may have meaning added to it in the future
1+
error[E0658]: The attribute `derive_Clone` is currently unknown to the compiler and may have meaning added to it in the future
22
--> $DIR/issue-32655.rs:6:11
33
|
44
LL | #[derive_Clone]
@@ -10,7 +10,7 @@ LL | foo!();
1010
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
1111
= help: add `#![feature(custom_attribute)]` to the crate attributes to enable
1212

13-
error[E0658]: the attribute `derive_Clone` is currently unknown to the compiler and may have meaning added to it in the future
13+
error[E0658]: The attribute `derive_Clone` is currently unknown to the compiler and may have meaning added to it in the future
1414
--> $DIR/issue-32655.rs:18:7
1515
|
1616
LL | #[derive_Clone]

src/test/ui/issues/issue-49074.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Check that unknown attribute error is shown even if there are unresolved macros.
22

33
#[marco_use] // typo
4-
//~^ ERROR the attribute `marco_use` is currently unknown to the compiler
4+
//~^ ERROR The attribute `marco_use` is currently unknown to the compiler
55
mod foo {
66
macro_rules! bar {
77
() => ();

src/test/ui/issues/issue-49074.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0658]: the attribute `marco_use` is currently unknown to the compiler and may have meaning added to it in the future
1+
error[E0658]: The attribute `marco_use` is currently unknown to the compiler and may have meaning added to it in the future
22
--> $DIR/issue-49074.rs:3:3
33
|
44
LL | #[marco_use] // typo

src/test/ui/macros/macro-reexport-removed.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ note: subsumed by `pub use`
1010
LL | #![feature(macro_reexport)]
1111
| ^^^^^^^^^^^^^^
1212

13-
error[E0658]: the attribute `macro_reexport` is currently unknown to the compiler and may have meaning added to it in the future
13+
error[E0658]: The attribute `macro_reexport` is currently unknown to the compiler and may have meaning added to it in the future
1414
--> $DIR/macro-reexport-removed.rs:5:3
1515
|
1616
LL | #[macro_reexport(macro_one)]

src/test/ui/proc-macro/derive-helper-shadowing.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0658]: the attribute `empty_helper` is currently unknown to the compiler and may have meaning added to it in the future
1+
error[E0658]: The attribute `empty_helper` is currently unknown to the compiler and may have meaning added to it in the future
22
--> $DIR/derive-helper-shadowing.rs:22:15
33
|
44
LL | #[empty_helper]

src/test/ui/proc-macro/derive-still-gated.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0658]: the attribute `derive_Empty` is currently unknown to the compiler and may have meaning added to it in the future
1+
error[E0658]: The attribute `derive_Empty` is currently unknown to the compiler and may have meaning added to it in the future
22
--> $DIR/derive-still-gated.rs:6:3
33
|
44
LL | #[derive_Empty]

src/test/ui/proc-macro/expand-to-unstable-2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | #[derive(Unstable)]
77
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
88
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
99

10-
error[E0658]: the attribute `rustc_foo` is currently unknown to the compiler and may have meaning added to it in the future
10+
error[E0658]: The attribute `rustc_foo` is currently unknown to the compiler and may have meaning added to it in the future
1111
--> $DIR/expand-to-unstable-2.rs:6:10
1212
|
1313
LL | #[derive(Unstable)]

src/test/ui/proc-macro/issue-41211.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0658]: the attribute `identity_attr` is currently unknown to the compiler and may have meaning added to it in the future
1+
error[E0658]: The attribute `identity_attr` is currently unknown to the compiler and may have meaning added to it in the future
22
--> $DIR/issue-41211.rs:8:4
33
|
44
LL | #![identity_attr]

src/test/ui/proc-macro/macro-namespace-reserved-2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ error: can't use a procedural macro from the same crate that defines it
7676
LL | #[derive(MyTrait)]
7777
| ^^^^^^^
7878

79-
error[E0658]: the attribute `my_macro` is currently unknown to the compiler and may have meaning added to it in the future
79+
error[E0658]: The attribute `my_macro` is currently unknown to the compiler and may have meaning added to it in the future
8080
--> $DIR/macro-namespace-reserved-2.rs:38:3
8181
|
8282
LL | #[my_macro]

src/test/ui/proc-macro/proc-macro-attributes.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0658]: the attribute `C` is currently unknown to the compiler and may have meaning added to it in the future
1+
error[E0658]: The attribute `C` is currently unknown to the compiler and may have meaning added to it in the future
22
--> $DIR/proc-macro-attributes.rs:7:3
33
|
44
LL | #[C]

src/test/ui/proc-macro/resolve-error.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0658]: the attribute `attr_proc_macra` is currently unknown to the compiler and may have meaning added to it in the future
1+
error[E0658]: The attribute `attr_proc_macra` is currently unknown to the compiler and may have meaning added to it in the future
22
--> $DIR/resolve-error.rs:27:3
33
|
44
LL | #[attr_proc_macra]
@@ -7,7 +7,7 @@ LL | #[attr_proc_macra]
77
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
88
= help: add `#![feature(custom_attribute)]` to the crate attributes to enable
99

10-
error[E0658]: the attribute `FooWithLongNan` is currently unknown to the compiler and may have meaning added to it in the future
10+
error[E0658]: The attribute `FooWithLongNan` is currently unknown to the compiler and may have meaning added to it in the future
1111
--> $DIR/resolve-error.rs:31:3
1212
|
1313
LL | #[FooWithLongNan]

src/test/ui/reserved/reserved-attr-on-macro.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | #[rustc_attribute_should_be_reserved]
77
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
88
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
99

10-
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
10+
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
1111
--> $DIR/reserved-attr-on-macro.rs:1:3
1212
|
1313
LL | #[rustc_attribute_should_be_reserved]

src/test/ui/span/issue-36530.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0658]: the attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future
1+
error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future
22
--> $DIR/issue-36530.rs:3:3
33
|
44
LL | #[foo]
@@ -16,7 +16,7 @@ LL | #![foo]
1616
= note: for more information, see https://github.com/rust-lang/rust/issues/54726
1717
= help: add `#![feature(custom_inner_attributes)]` to the crate attributes to enable
1818

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

0 commit comments

Comments
 (0)