Skip to content

Commit d108613

Browse files
committed
expand description of the link attribute
Fixes #18288
1 parent e2cd459 commit d108613

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/doc/reference.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1957,8 +1957,10 @@ On an `extern` block, the following attributes are interpreted:
19571957
name and type. This is feature gated and the exact behavior is
19581958
implementation-defined (due to variety of linker invocation syntax).
19591959
- `link` - indicate that a native library should be linked to for the
1960-
declarations in this block to be linked correctly. See [external
1961-
blocks](#external-blocks)
1960+
declarations in this block to be linked correctly. `link` supports an optional `kind`
1961+
key with three possible values: `dylib`, `static`, and `framework`. See [external blocks](#external-blocks) for more about external blocks. Two
1962+
examples: `#[link(name = "readline")]` and
1963+
`#[link(name = "CoreFoundation", kind = "framework")]`.
19621964

19631965
On declarations inside an `extern` block, the following attributes are
19641966
interpreted:

0 commit comments

Comments
 (0)