Add hyphen to "crate level"

"crate level attribute" -> "crate-level attribute"
This commit is contained in:
Camelid 2021-03-13 14:32:06 -08:00
parent fe64970ed1
commit 5134047c40
6 changed files with 9 additions and 9 deletions

View File

@ -520,7 +520,7 @@ impl CheckAttrVisitor<'tcx> {
.struct_span_err(
meta.span(),
&format!(
"`#![doc({} = \"...\")]` isn't allowed as a crate level attribute",
"`#![doc({} = \"...\")]` isn't allowed as a crate-level attribute",
attr_name,
),
)
@ -559,7 +559,7 @@ impl CheckAttrVisitor<'tcx> {
|lint| {
lint.build(
"`#![doc(test(...)]` is only allowed \
as a crate level attribute",
as a crate-level attribute",
)
.emit();
},

View File

@ -4,7 +4,7 @@ error: '\'' character isn't allowed in `#[doc(alias = "...")]`
LL | #[doc(alias = "shouldn't work!")]
| ^^^^^^^^^^^^^^^^^
error: `#![doc(alias = "...")]` isn't allowed as a crate level attribute
error: `#![doc(alias = "...")]` isn't allowed as a crate-level attribute
--> $DIR/doc-alias-crate-level.rs:1:8
|
LL | #![doc(alias = "crate-level-not-working")]

View File

@ -1,4 +1,4 @@
error: `#![doc(test(...)]` is only allowed as a crate level attribute
error: `#![doc(test(...)]` is only allowed as a crate-level attribute
--> $DIR/doc-attr2.rs:4:7
|
LL | #[doc(test(no_crate_inject))]
@ -13,7 +13,7 @@ LL | #![deny(warnings)]
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
error: `#![doc(test(...)]` is only allowed as a crate level attribute
error: `#![doc(test(...)]` is only allowed as a crate-level attribute
--> $DIR/doc-attr2.rs:9:12
|
LL | #![doc(test(no_crate_inject))]

View File

@ -1,4 +1,4 @@
error: `#![doc(test(...)]` is only allowed as a crate level attribute
error: `#![doc(test(...)]` is only allowed as a crate-level attribute
--> $DIR/doc-attr2.rs:4:7
|
LL | #[doc(test(no_crate_inject))]
@ -13,7 +13,7 @@ LL | #![deny(warnings)]
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
error: `#![doc(test(...)]` is only allowed as a crate level attribute
error: `#![doc(test(...)]` is only allowed as a crate-level attribute
--> $DIR/doc-attr2.rs:9:12
|
LL | #![doc(test(no_crate_inject))]

View File

@ -4,7 +4,7 @@ error: '\'' character isn't allowed in `#[doc(alias = "...")]`
LL | #[doc(alias = "shouldn't work!")]
| ^^^^^^^^^^^^^^^^^
error: `#![doc(alias = "...")]` isn't allowed as a crate level attribute
error: `#![doc(alias = "...")]` isn't allowed as a crate-level attribute
--> $DIR/doc-alias-crate-level.rs:5:8
|
LL | #![doc(alias = "not working!")]

View File

@ -10,7 +10,7 @@ error: `#[doc(keyword = "...")]` can only be used on modules
LL | #[doc(keyword = "hall")]
| ^^^^^^^^^^^^^^^^
error: `#![doc(keyword = "...")]` isn't allowed as a crate level attribute
error: `#![doc(keyword = "...")]` isn't allowed as a crate-level attribute
--> $DIR/doc_keyword.rs:4:8
|
LL | #![doc(keyword = "hello")]