Skip to content

Commit 1bdde19

Browse files
committed
---
yaml --- r: 37631 b: refs/heads/try c: d106ef8 h: refs/heads/master i: 37629: 01a5907 37627: ae28511 37623: 3251997 37615: d7b6d14 37599: 27df47f 37567: 7562994 37503: 4ad1ec8 37375: fd23d19 v: v3
1 parent 49422d3 commit 1bdde19

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 09bb07bed9166105ea961a42b5fff7739ae0d2e9
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
5-
refs/heads/try: d701fcd8a52fdd1cf85516c546edcc8de9b5d400
5+
refs/heads/try: d106ef88e6a87d726630fea997699d4255fb5ebb
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278

branches/try/doc/rust.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,9 +1304,8 @@ Attributes may appear as any of
13041304
* An identifier followed by the equals sign '=' and a literal, providing a key/value pair
13051305
* An identifier followed by a parenthesized list of sub-attribute arguments
13061306

1307-
Attributes are applied to an entity by placing them within a hash-list
1308-
(`#[...]`) as either a prefix to the entity or as a semicolon-delimited
1309-
declaration within the entity body.
1307+
Attributes terminated by a semi-colon apply to the entity that the attribute is declared
1308+
within. Attributes that are not terminated by a semi-colon apply to the next entity.
13101309

13111310
An example of attributes:
13121311

@@ -1326,9 +1325,9 @@ mod bar {
13261325
...
13271326
}
13281327
1329-
// A documentation attribute
1330-
#[doc = "Add two numbers together."]
1331-
fn add(x: int, y: int) { x + y }
1328+
// A lint attribute used to suppress a warning/error
1329+
#[allow(non_camel_case_types)]
1330+
pub type int8_t = i8;
13321331
~~~~~~~~
13331332

13341333
> **Note:** In future versions of Rust, user-provided extensions to the compiler will be able to interpret attributes.
@@ -1341,6 +1340,8 @@ names are effectively reserved. Some significant attributes include:
13411340
* The `cfg` attribute, for conditional-compilation by build-configuration.
13421341
* The `link` attribute, for describing linkage metadata for a crate.
13431342
* The `test` attribute, for marking functions as unit tests.
1343+
* The `allow`, `warn`, `forbid`, and `deny` attributes, for controling lint checks. Lint checks supported
1344+
by the compiler can be found via `rustc -W help`.
13441345

13451346
Other attributes may be added or removed during development of the language.
13461347

0 commit comments

Comments
 (0)