Skip to content

Commit ebc70f2

Browse files
committed
Minor update of no_main
More closely align with the template, and some minor word tweaks.
1 parent 9f9e8f0 commit ebc70f2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/crates-and-source-files.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ When a "foreign" unwind (e.g. an exception thrown from C++ code, or a `panic!` i
130130

131131
For more information, see the [panic documentation][panic-docs].
132132

133+
<!-- template:attributes -->
133134
r[crate.no_main]
134135
### The `no_main` attribute
135136

@@ -143,16 +144,16 @@ The *`no_main` [attribute]* may be applied at the crate level to disable emittin
143144
> ```
144145
145146
r[crate.no_main.syntax]
146-
The `no_main` attribute uses the [MetaWord] syntax and thus does not take any inputs.
147+
The `no_main` attribute uses the [MetaWord] syntax.
147148
148149
r[crate.no_main.allowed-positions]
149150
The `no_main` attribute may only be applied to the crate root.
150151
151152
r[crate.no_main.duplicates]
152-
Duplicate instances of the `no_main` attribute are ignored.
153+
The `no_main` attribute may be used any number of times on the crate root.
153154
154155
> [!NOTE]
155-
> `rustc` current warns about unused duplicate `no_main` attributes.
156+
> `rustc` lints against any use following the first.
156157
157158
r[crate.crate_name]
158159
## The `crate_name` attribute

0 commit comments

Comments
 (0)