Skip to content

Commit 64fcd59

Browse files
committed
---
yaml --- r: 36350 b: refs/heads/try2 c: d106ef8 h: refs/heads/master v: v3
1 parent e28ed30 commit 64fcd59

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
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
55
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: d701fcd8a52fdd1cf85516c546edcc8de9b5d400
8+
refs/heads/try2: d106ef88e6a87d726630fea997699d4255fb5ebb
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
1010
refs/heads/dist-snap: 22efa39382d41b084fde1719df7ae8ce5697d8c9
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try2/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)