Skip to content

Commit 5134047

Browse files
committed
Add hyphen to "crate level"
"crate level attribute" -> "crate-level attribute"
1 parent fe64970 commit 5134047

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

compiler/rustc_passes/src/check_attr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ impl CheckAttrVisitor<'tcx> {
520520
.struct_span_err(
521521
meta.span(),
522522
&format!(
523-
"`#![doc({} = \"...\")]` isn't allowed as a crate level attribute",
523+
"`#![doc({} = \"...\")]` isn't allowed as a crate-level attribute",
524524
attr_name,
525525
),
526526
)
@@ -559,7 +559,7 @@ impl CheckAttrVisitor<'tcx> {
559559
|lint| {
560560
lint.build(
561561
"`#![doc(test(...)]` is only allowed \
562-
as a crate level attribute",
562+
as a crate-level attribute",
563563
)
564564
.emit();
565565
},

src/test/rustdoc-ui/doc-alias-crate-level.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: '\'' character isn't allowed in `#[doc(alias = "...")]`
44
LL | #[doc(alias = "shouldn't work!")]
55
| ^^^^^^^^^^^^^^^^^
66

7-
error: `#![doc(alias = "...")]` isn't allowed as a crate level attribute
7+
error: `#![doc(alias = "...")]` isn't allowed as a crate-level attribute
88
--> $DIR/doc-alias-crate-level.rs:1:8
99
|
1010
LL | #![doc(alias = "crate-level-not-working")]

src/test/rustdoc-ui/doc-attr2.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: `#![doc(test(...)]` is only allowed as a crate level attribute
1+
error: `#![doc(test(...)]` is only allowed as a crate-level attribute
22
--> $DIR/doc-attr2.rs:4:7
33
|
44
LL | #[doc(test(no_crate_inject))]
@@ -13,7 +13,7 @@ LL | #![deny(warnings)]
1313
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
1414
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
1515

16-
error: `#![doc(test(...)]` is only allowed as a crate level attribute
16+
error: `#![doc(test(...)]` is only allowed as a crate-level attribute
1717
--> $DIR/doc-attr2.rs:9:12
1818
|
1919
LL | #![doc(test(no_crate_inject))]

src/test/ui/attributes/doc-attr2.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: `#![doc(test(...)]` is only allowed as a crate level attribute
1+
error: `#![doc(test(...)]` is only allowed as a crate-level attribute
22
--> $DIR/doc-attr2.rs:4:7
33
|
44
LL | #[doc(test(no_crate_inject))]
@@ -13,7 +13,7 @@ LL | #![deny(warnings)]
1313
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
1414
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
1515

16-
error: `#![doc(test(...)]` is only allowed as a crate level attribute
16+
error: `#![doc(test(...)]` is only allowed as a crate-level attribute
1717
--> $DIR/doc-attr2.rs:9:12
1818
|
1919
LL | #![doc(test(no_crate_inject))]

src/test/ui/rustdoc/doc-alias-crate-level.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: '\'' character isn't allowed in `#[doc(alias = "...")]`
44
LL | #[doc(alias = "shouldn't work!")]
55
| ^^^^^^^^^^^^^^^^^
66

7-
error: `#![doc(alias = "...")]` isn't allowed as a crate level attribute
7+
error: `#![doc(alias = "...")]` isn't allowed as a crate-level attribute
88
--> $DIR/doc-alias-crate-level.rs:5:8
99
|
1010
LL | #![doc(alias = "not working!")]

src/test/ui/rustdoc/doc_keyword.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ error: `#[doc(keyword = "...")]` can only be used on modules
1010
LL | #[doc(keyword = "hall")]
1111
| ^^^^^^^^^^^^^^^^
1212

13-
error: `#![doc(keyword = "...")]` isn't allowed as a crate level attribute
13+
error: `#![doc(keyword = "...")]` isn't allowed as a crate-level attribute
1414
--> $DIR/doc_keyword.rs:4:8
1515
|
1616
LL | #![doc(keyword = "hello")]

0 commit comments

Comments
 (0)