Skip to content

Commit 28d177f

Browse files
committed
Update no_link to use the attribute template
1 parent b19c93f commit 28d177f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/items/extern-crates.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,21 @@ The *`no_link` [attribute][attributes]* may be specified on an `extern crate` it
8888
> other_crate::some_macro!();
8989
> ```
9090
91+
r[items.extern-crate.no_link.syntax]
92+
The `no_link` attribute uses the [MetaWord] syntax and thus does not take any inputs.
93+
94+
r[items.extern-crate.no_link.allowed-positions]
95+
The `no_link` attribute may be specified on an `extern crate` declaration.
96+
97+
> [!NOTE]
98+
> `rustc` currently warns on some positions where it is ignored, but this may become an error in the future.
99+
100+
r[items.extern-crate.no_link.duplicates]
101+
Duplicate instances of the `no_link` attribute are ignored.
102+
103+
> [!NOTE]
104+
> `rustc` currently warns about unused duplicate `no_link` attributes.
105+
91106
[identifier]: ../identifiers.md
92107
[RFC 940]: https://github.com/rust-lang/rfcs/blob/master/text/0940-hyphens-considered-harmful.md
93108
[`macro_use` attribute]: ../macros-by-example.md#the-macro_use-attribute

0 commit comments

Comments
 (0)