1
Fork 0

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

View file

@ -4,7 +4,7 @@ error: '\'' character isn't allowed in `#[doc(alias = "...")]`
LL | #[doc(alias = "shouldn't work!")] 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 --> $DIR/doc-alias-crate-level.rs:1:8
| |
LL | #![doc(alias = "crate-level-not-working")] 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 --> $DIR/doc-attr2.rs:4:7
| |
LL | #[doc(test(no_crate_inject))] 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! = 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> = 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 --> $DIR/doc-attr2.rs:9:12
| |
LL | #![doc(test(no_crate_inject))] 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 --> $DIR/doc-attr2.rs:4:7
| |
LL | #[doc(test(no_crate_inject))] 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! = 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> = 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 --> $DIR/doc-attr2.rs:9:12
| |
LL | #![doc(test(no_crate_inject))] 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!")] 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 --> $DIR/doc-alias-crate-level.rs:5:8
| |
LL | #![doc(alias = "not working!")] LL | #![doc(alias = "not working!")]

View file

@ -10,7 +10,7 @@ error: `#[doc(keyword = "...")]` can only be used on modules
LL | #[doc(keyword = "hall")] 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 --> $DIR/doc_keyword.rs:4:8
| |
LL | #![doc(keyword = "hello")] LL | #![doc(keyword = "hello")]