Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3d9f166

Browse files
committed
Fix note message style for "crate-level attr used as outer attr" error
1 parent 1de3926 commit 3d9f166

File tree

7 files changed

+35
-35
lines changed

7 files changed

+35
-35
lines changed

‎compiler/rustc_attr_parsing/messages.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ attr_parsing_invalid_style = {$is_used_as_inner ->
9090
[false] crate-level attribute should be an inner attribute: add an exclamation mark: `#![{$name}]`
9191
*[other] the `#![{$name}]` attribute can only be used at the crate root
9292
}
93-
.note = This attribute does not have an `!`, which means it is applied to this {$target}
93+
.note = this attribute does not have an `!`, which means it is applied to this {$target}
9494
9595
attr_parsing_link_ordinal_out_of_range = ordinal value in `link_ordinal` is too large: `{$ordinal}`
9696
.note = the value may not exceed `u16::MAX`

‎compiler/rustc_passes/messages.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ passes_const_stable_not_stable =
7575
.label = attribute specified here
7676
7777
passes_custom_mir_incompatible_dialect_and_phase =
78-
The {$dialect} dialect is not compatible with the {$phase} phase
78+
the {$dialect} dialect is not compatible with the {$phase} phase
7979
.dialect_span = this dialect...
8080
.phase_span = ... is not compatible with this phase
8181

‎tests/ui/attributes/crate-only-as-outer.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: crate-level attribute should be an inner attribute: add an exclamation ma
44
LL | #[crate_name = "owo"]
55
| ^^^^^^^^^^^^^^^^^^^^^
66
|
7-
note: This attribute does not have an `!`, which means it is applied to this function
7+
note: this attribute does not have an `!`, which means it is applied to this function
88
--> $DIR/crate-only-as-outer.rs:5:1
99
|
1010
LL | fn main() {}

‎tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -797,25 +797,25 @@ mod windows_subsystem {
797797
#[crate_name = "0900"]
798798
//~^ WARN crate-level attribute should be an inner attribute
799799
mod crate_name {
800-
//~^ NOTE This attribute does not have an `!`, which means it is applied to this module
800+
//~^ NOTE this attribute does not have an `!`, which means it is applied to this module
801801
mod inner { #![crate_name="0900"] }
802802
//~^ WARN the `#![crate_name]` attribute can only be used at the crate root
803803

804804
#[crate_name = "0900"] fn f() { }
805805
//~^ WARN crate-level attribute should be an inner attribute
806-
//~| NOTE This attribute does not have an `!`, which means it is applied to this function
806+
//~| NOTE this attribute does not have an `!`, which means it is applied to this function
807807

808808
#[crate_name = "0900"] struct S;
809809
//~^ WARN crate-level attribute should be an inner attribute
810-
//~| NOTE This attribute does not have an `!`, which means it is applied to this struct
810+
//~| NOTE this attribute does not have an `!`, which means it is applied to this struct
811811

812812
#[crate_name = "0900"] type T = S;
813813
//~^ WARN crate-level attribute should be an inner attribute
814-
//~| NOTE This attribute does not have an `!`, which means it is applied to this type alias
814+
//~| NOTE this attribute does not have an `!`, which means it is applied to this type alias
815815

816816
#[crate_name = "0900"] impl S { }
817817
//~^ WARN crate-level attribute should be an inner attribute
818-
//~| NOTE This attribute does not have an `!`, which means it is applied to this implementation block
818+
//~| NOTE this attribute does not have an `!`, which means it is applied to this implementation block
819819
}
820820

821821
#[crate_type = "0800"]
@@ -918,49 +918,49 @@ mod no_builtins {
918918
#[recursion_limit="0200"]
919919
//~^ WARN crate-level attribute should be an inner attribute
920920
mod recursion_limit {
921-
//~^ NOTE This attribute does not have an `!`, which means it is applied to this module
921+
//~^ NOTE this attribute does not have an `!`, which means it is applied to this module
922922
mod inner { #![recursion_limit="0200"] }
923923
//~^ WARN the `#![recursion_limit]` attribute can only be used at the crate root
924924

925925
#[recursion_limit="0200"] fn f() { }
926926
//~^ WARN crate-level attribute should be an inner attribute
927-
//~| NOTE This attribute does not have an `!`, which means it is applied to this function
927+
//~| NOTE this attribute does not have an `!`, which means it is applied to this function
928928

929929
#[recursion_limit="0200"] struct S;
930930
//~^ WARN crate-level attribute should be an inner attribute
931-
//~| NOTE This attribute does not have an `!`, which means it is applied to this struct
931+
//~| NOTE this attribute does not have an `!`, which means it is applied to this struct
932932

933933
#[recursion_limit="0200"] type T = S;
934934
//~^ WARN crate-level attribute should be an inner attribute
935-
//~| NOTE This attribute does not have an `!`, which means it is applied to this type alias
935+
//~| NOTE this attribute does not have an `!`, which means it is applied to this type alias
936936

937937
#[recursion_limit="0200"] impl S { }
938938
//~^ WARN crate-level attribute should be an inner attribute
939-
//~| NOTE This attribute does not have an `!`, which means it is applied to this implementation block
939+
//~| NOTE this attribute does not have an `!`, which means it is applied to this implementation block
940940
}
941941

942942
#[type_length_limit="0100"]
943943
//~^ WARN crate-level attribute should be an inner attribute
944944
mod type_length_limit {
945-
//~^ NOTE This attribute does not have an `!`, which means it is applied to this module
945+
//~^ NOTE this attribute does not have an `!`, which means it is applied to this module
946946
mod inner { #![type_length_limit="0100"] }
947947
//~^ WARN the `#![type_length_limit]` attribute can only be used at the crate root
948948

949949
#[type_length_limit="0100"] fn f() { }
950950
//~^ WARN crate-level attribute should be an inner attribute
951-
//~| NOTE This attribute does not have an `!`, which means it is applied to this function
951+
//~| NOTE this attribute does not have an `!`, which means it is applied to this function
952952

953953
#[type_length_limit="0100"] struct S;
954954
//~^ WARN crate-level attribute should be an inner attribute
955-
//~| NOTE This attribute does not have an `!`, which means it is applied to this struct
955+
//~| NOTE this attribute does not have an `!`, which means it is applied to this struct
956956

957957
#[type_length_limit="0100"] type T = S;
958958
//~^ WARN crate-level attribute should be an inner attribute
959-
//~| NOTE This attribute does not have an `!`, which means it is applied to this type alias
959+
//~| NOTE this attribute does not have an `!`, which means it is applied to this type alias
960960

961961
#[type_length_limit="0100"] impl S { }
962962
//~^ WARN crate-level attribute should be an inner attribute
963-
//~| NOTE This attribute does not have an `!`, which means it is applied to this implementation block
963+
//~| NOTE this attribute does not have an `!`, which means it is applied to this implementation block
964964
}
965965

966966
fn main() {}

‎tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs.stderr

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,7 @@ warning: crate-level attribute should be an inner attribute: add an exclamation
12901290
LL | #[crate_name = "0900"]
12911291
| ^^^^^^^^^^^^^^^^^^^^^^
12921292
|
1293-
note: This attribute does not have an `!`, which means it is applied to this module
1293+
note: this attribute does not have an `!`, which means it is applied to this module
12941294
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:799:1
12951295
|
12961296
LL | / mod crate_name {
@@ -1312,7 +1312,7 @@ warning: crate-level attribute should be an inner attribute: add an exclamation
13121312
LL | #[crate_name = "0900"] fn f() { }
13131313
| ^^^^^^^^^^^^^^^^^^^^^^
13141314
|
1315-
note: This attribute does not have an `!`, which means it is applied to this function
1315+
note: this attribute does not have an `!`, which means it is applied to this function
13161316
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:804:28
13171317
|
13181318
LL | #[crate_name = "0900"] fn f() { }
@@ -1324,7 +1324,7 @@ warning: crate-level attribute should be an inner attribute: add an exclamation
13241324
LL | #[crate_name = "0900"] struct S;
13251325
| ^^^^^^^^^^^^^^^^^^^^^^
13261326
|
1327-
note: This attribute does not have an `!`, which means it is applied to this struct
1327+
note: this attribute does not have an `!`, which means it is applied to this struct
13281328
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:808:28
13291329
|
13301330
LL | #[crate_name = "0900"] struct S;
@@ -1336,7 +1336,7 @@ warning: crate-level attribute should be an inner attribute: add an exclamation
13361336
LL | #[crate_name = "0900"] type T = S;
13371337
| ^^^^^^^^^^^^^^^^^^^^^^
13381338
|
1339-
note: This attribute does not have an `!`, which means it is applied to this type alias
1339+
note: this attribute does not have an `!`, which means it is applied to this type alias
13401340
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:812:28
13411341
|
13421342
LL | #[crate_name = "0900"] type T = S;
@@ -1348,7 +1348,7 @@ warning: crate-level attribute should be an inner attribute: add an exclamation
13481348
LL | #[crate_name = "0900"] impl S { }
13491349
| ^^^^^^^^^^^^^^^^^^^^^^
13501350
|
1351-
note: This attribute does not have an `!`, which means it is applied to this implementation block
1351+
note: this attribute does not have an `!`, which means it is applied to this implementation block
13521352
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:816:28
13531353
|
13541354
LL | #[crate_name = "0900"] impl S { }
@@ -1360,7 +1360,7 @@ warning: crate-level attribute should be an inner attribute: add an exclamation
13601360
LL | #[recursion_limit="0200"]
13611361
| ^^^^^^^^^^^^^^^^^^^^^^^^^
13621362
|
1363-
note: This attribute does not have an `!`, which means it is applied to this module
1363+
note: this attribute does not have an `!`, which means it is applied to this module
13641364
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:920:1
13651365
|
13661366
LL | / mod recursion_limit {
@@ -1382,7 +1382,7 @@ warning: crate-level attribute should be an inner attribute: add an exclamation
13821382
LL | #[recursion_limit="0200"] fn f() { }
13831383
| ^^^^^^^^^^^^^^^^^^^^^^^^^
13841384
|
1385-
note: This attribute does not have an `!`, which means it is applied to this function
1385+
note: this attribute does not have an `!`, which means it is applied to this function
13861386
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:925:31
13871387
|
13881388
LL | #[recursion_limit="0200"] fn f() { }
@@ -1394,7 +1394,7 @@ warning: crate-level attribute should be an inner attribute: add an exclamation
13941394
LL | #[recursion_limit="0200"] struct S;
13951395
| ^^^^^^^^^^^^^^^^^^^^^^^^^
13961396
|
1397-
note: This attribute does not have an `!`, which means it is applied to this struct
1397+
note: this attribute does not have an `!`, which means it is applied to this struct
13981398
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:929:31
13991399
|
14001400
LL | #[recursion_limit="0200"] struct S;
@@ -1406,7 +1406,7 @@ warning: crate-level attribute should be an inner attribute: add an exclamation
14061406
LL | #[recursion_limit="0200"] type T = S;
14071407
| ^^^^^^^^^^^^^^^^^^^^^^^^^
14081408
|
1409-
note: This attribute does not have an `!`, which means it is applied to this type alias
1409+
note: this attribute does not have an `!`, which means it is applied to this type alias
14101410
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:933:31
14111411
|
14121412
LL | #[recursion_limit="0200"] type T = S;
@@ -1418,7 +1418,7 @@ warning: crate-level attribute should be an inner attribute: add an exclamation
14181418
LL | #[recursion_limit="0200"] impl S { }
14191419
| ^^^^^^^^^^^^^^^^^^^^^^^^^
14201420
|
1421-
note: This attribute does not have an `!`, which means it is applied to this implementation block
1421+
note: this attribute does not have an `!`, which means it is applied to this implementation block
14221422
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:937:31
14231423
|
14241424
LL | #[recursion_limit="0200"] impl S { }
@@ -1430,7 +1430,7 @@ warning: crate-level attribute should be an inner attribute: add an exclamation
14301430
LL | #[type_length_limit="0100"]
14311431
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
14321432
|
1433-
note: This attribute does not have an `!`, which means it is applied to this module
1433+
note: this attribute does not have an `!`, which means it is applied to this module
14341434
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:944:1
14351435
|
14361436
LL | / mod type_length_limit {
@@ -1452,7 +1452,7 @@ warning: crate-level attribute should be an inner attribute: add an exclamation
14521452
LL | #[type_length_limit="0100"] fn f() { }
14531453
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
14541454
|
1455-
note: This attribute does not have an `!`, which means it is applied to this function
1455+
note: this attribute does not have an `!`, which means it is applied to this function
14561456
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:949:33
14571457
|
14581458
LL | #[type_length_limit="0100"] fn f() { }
@@ -1464,7 +1464,7 @@ warning: crate-level attribute should be an inner attribute: add an exclamation
14641464
LL | #[type_length_limit="0100"] struct S;
14651465
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
14661466
|
1467-
note: This attribute does not have an `!`, which means it is applied to this struct
1467+
note: this attribute does not have an `!`, which means it is applied to this struct
14681468
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:953:33
14691469
|
14701470
LL | #[type_length_limit="0100"] struct S;
@@ -1476,7 +1476,7 @@ warning: crate-level attribute should be an inner attribute: add an exclamation
14761476
LL | #[type_length_limit="0100"] type T = S;
14771477
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
14781478
|
1479-
note: This attribute does not have an `!`, which means it is applied to this type alias
1479+
note: this attribute does not have an `!`, which means it is applied to this type alias
14801480
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:957:33
14811481
|
14821482
LL | #[type_length_limit="0100"] type T = S;
@@ -1488,7 +1488,7 @@ warning: crate-level attribute should be an inner attribute: add an exclamation
14881488
LL | #[type_length_limit="0100"] impl S { }
14891489
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
14901490
|
1491-
note: This attribute does not have an `!`, which means it is applied to this implementation block
1491+
note: this attribute does not have an `!`, which means it is applied to this implementation block
14921492
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:961:33
14931493
|
14941494
LL | #[type_length_limit="0100"] impl S { }

‎tests/ui/lint/unused/concat-in-crate-name-issue-137687.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ error: crate-level attribute should be an inner attribute: add an exclamation ma
1717
LL | #[crate_name = concat !()]
1818
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
1919
|
20-
note: This attribute does not have an `!`, which means it is applied to this macro def
20+
note: this attribute does not have an `!`, which means it is applied to this macro def
2121
--> $DIR/concat-in-crate-name-issue-137687.rs:5:1
2222
|
2323
LL | / macro_rules! a {

‎tests/ui/lint/unused/unused-attr-macro-rules.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ error: crate-level attribute should be an inner attribute: add an exclamation ma
2727
LL | #[recursion_limit="1"]
2828
| ^^^^^^^^^^^^^^^^^^^^^^
2929
|
30-
note: This attribute does not have an `!`, which means it is applied to this macro def
30+
note: this attribute does not have an `!`, which means it is applied to this macro def
3131
--> $DIR/unused-attr-macro-rules.rs:12:1
3232
|
3333
LL | / macro_rules! foo {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /