diff options
| author | bors <bors@rust-lang.org> | 2014-11-07 00:02:18 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-11-07 00:02:18 +0000 |
| commit | 45cbdec4174778bf915f17561ef971c068a7fcbc (patch) | |
| tree | 9516c60b7323f1233858665501a5029c9c3f90f0 /src/doc | |
| parent | 8ed288edb27fc83b15a549af69c82b5bb4f8ac1e (diff) | |
| parent | d27039d701a3c6e97f19e41436d06ed42c0f5f8a (diff) | |
| download | rust-45cbdec4174778bf915f17561ef971c068a7fcbc.tar.gz rust-45cbdec4174778bf915f17561ef971c068a7fcbc.zip | |
auto merge of #18719 : alexcrichton/rust/rollup, r=alexcrichton
Diffstat (limited to 'src/doc')
| -rw-r--r-- | src/doc/guide.md | 6 | ||||
| -rw-r--r-- | src/doc/reference.md | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/doc/guide.md b/src/doc/guide.md index 9a1a42478d3..2a74180393c 100644 --- a/src/doc/guide.md +++ b/src/doc/guide.md @@ -1149,7 +1149,7 @@ enum StringResult { } ``` Where a `StringResult` is either an `StringOK`, with the result of a computation, or an -`ErrorReason` with a `String` explaining what caused the computation to fail. This kind of +`ErrorReason` with a `String` explaining what caused the computation to fail. These kinds of `enum`s are actually very useful and are even part of the standard library. As you can see `enum`s with values are quite a powerful tool for data representation, @@ -1901,8 +1901,8 @@ result is a link to click on that result, we'll be taken to its documentation page. This page shows us a few things: the type signature of the function, some -explanatory text, and then an example. Let's modify our code to add in the -`random` function: +explanatory text, and then an example. Let's try to modify our code to add in the +`random` function and see what happens: ```{rust,ignore} use std::io; diff --git a/src/doc/reference.md b/src/doc/reference.md index 96d6bece230..1c338aa8118 100644 --- a/src/doc/reference.md +++ b/src/doc/reference.md @@ -1961,8 +1961,10 @@ On an `extern` block, the following attributes are interpreted: name and type. This is feature gated and the exact behavior is implementation-defined (due to variety of linker invocation syntax). - `link` - indicate that a native library should be linked to for the - declarations in this block to be linked correctly. See [external - blocks](#external-blocks) + declarations in this block to be linked correctly. `link` supports an optional `kind` + key with three possible values: `dylib`, `static`, and `framework`. See [external blocks](#external-blocks) for more about external blocks. Two + examples: `#[link(name = "readline")]` and + `#[link(name = "CoreFoundation", kind = "framework")]`. On declarations inside an `extern` block, the following attributes are interpreted: |
