manual: refine ECMA-335 reference for attributes
This commit is contained in:
parent
d2648cc23f
commit
838a57ba9e
|
@ -1685,10 +1685,10 @@ attr : ident [ '=' literal
|
|||
~~~~
|
||||
|
||||
Static entities in Rust -- crates, modules and items -- may have _attributes_
|
||||
applied to them. Attributes in Rust are modeled on Attributes in ECMA-335, C#.
|
||||
An attribute is a general, free-form metadatum that is interpreted according
|
||||
to name, convention, and language and compiler version. Attributes may appear
|
||||
as any of:
|
||||
applied to them. Attributes in Rust are modeled on Attributes in ECMA-335,
|
||||
with the syntax coming from ECMA-334 (C#). An attribute is a general,
|
||||
free-form metadatum that is interpreted according to name, convention, and
|
||||
language and compiler version. Attributes may appear as any of:
|
||||
|
||||
* A single identifier, the attribute name
|
||||
* An identifier followed by the equals sign '=' and a literal, providing a
|
||||
|
@ -1881,8 +1881,8 @@ For any lint check `C`:
|
|||
* `deny(C)` signals an error after encountering a violation of `C`,
|
||||
* `allow(C)` overrides the check for `C` so that violations will go
|
||||
unreported,
|
||||
* `forbid(C)` is the same as `deny(C)`, but also forbids uses of
|
||||
`allow(C)` within the attribute.
|
||||
* `forbid(C)` is the same as `deny(C)`, but also forbids changing the lint
|
||||
level afterwards.
|
||||
|
||||
The lint checks supported by the compiler can be found via `rustc -W help`,
|
||||
along with their default settings.
|
||||
|
|
Loading…
Reference in New Issue