Skip to content

Commit dda1f41

Browse files
committed
Revise no_link text
1 parent 0e464c9 commit dda1f41

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/items/extern-crates.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ r[items.extern-crate.no_link]
7777
## The `no_link` attribute
7878

7979
r[items.extern-crate.no_link.intro]
80-
The *`no_link` [attribute][attributes]* may be specified on an `extern crate` item to prevent linking the crate into the output. This is commonly used to load a crate to access only its macros.
80+
The *`no_link` [attribute][attributes]* may be applied to an `extern crate` item to prevent linking the crate.
81+
82+
> [!NOTE]
83+
> This is helpful, e.g., when only the macros of a crate are needed.
8184
8285
> [!EXAMPLE]
8386
> <!-- ignore: requires external crates -->
@@ -89,19 +92,19 @@ The *`no_link` [attribute][attributes]* may be specified on an `extern crate` it
8992
> ```
9093
9194
r[items.extern-crate.no_link.syntax]
92-
The `no_link` attribute uses the [MetaWord] syntax and thus does not take any inputs.
95+
The `no_link` attribute uses the [MetaWord] syntax and so does not accept any arguments.
9396
9497
r[items.extern-crate.no_link.allowed-positions]
95-
The `no_link` attribute may be specified on an `extern crate` declaration.
98+
The `no_link` attribute may only be applied to an `extern crate` declaration.
9699
97100
> [!NOTE]
98-
> `rustc` currently warns on some positions where it is ignored, but this may become an error in the future.
101+
> `rustc` currently accepts and ignores the attribute in other positions but lints against it. This may become a hard error in the future.
99102
100103
r[items.extern-crate.no_link.duplicates]
101104
Duplicate instances of the `no_link` attribute are ignored.
102105
103106
> [!NOTE]
104-
> `rustc` currently warns about unused duplicate `no_link` attributes.
107+
> `rustc` lints against duplicate use of this attribute.
105108
106109
[identifier]: ../identifiers.md
107110
[RFC 940]: https://github.com/rust-lang/rfcs/blob/master/text/0940-hyphens-considered-harmful.md

0 commit comments

Comments
 (0)