forked from rust-lang/rust
    
        
        - 
                Notifications
    You must be signed in to change notification settings 
- Fork 0
Note defined attributes
        klutzy edited this page Nov 11, 2013 
        ·
        14 revisions
      
    This page catalogs the item attributes known to the compiler or used by convention. See Rust Reference Manual for documentation of frequently used attributes.
- link
- name
- vers
- uuid
- url
- comment, license, copyright - (actually not used now)
- crate_type
- no_std - Don't link libstd automatically
- no_uv
- feature - Enable experimental/unstable features. See src/librustc/front/feature_gate.rsfor feature list.
- no_main
- doc
- doc(hidden)
- allow, deny, forbid, warn - Set lint options
- cfg - #[cfg(unix)],#[cfg(target_os = "linux")],#[cfg(stage0)],#[cfg(test)], ...
- deprecated, experimental, unstable, stable, locked, frozen - item stability
- export_name, no_mangle - Set exported name of item
- link_section
- address_insignificant
- crate_map
- static_assert
- unsafe_destructor
- unsafe_no_drop_flag
- no_freeze, no_send
- packed (struct only)
- simd (tuple struct only(?))
- repr (enum only)
- deriving
- path
- link_name
- link_args
- nolink - Don't perform the default linking for a native module
- macro_escape
- no_implicit_prelude
- test
- bench
- should_fail - The test case should fail.
- ignore - Ignore test on some configuration e.g. (#[ignore(cfg(windows))]) or on any case (#[ignore])
- reason - #[ignore(reason = "not implemented yet")]
- inline
- always, never
- lang
- fixed_stack_segment
- main
- start - Program entry point
- no_split_stack
- cold
- rust_stack
- !resolve_unexported - internally used to build test binary. Ignore any privacy rules
- abi - use extern "ABI" fnsyntax
- auto_encode, auto_decode - use #[deriving(Encodable)]and#[deriving(Decodable)]
- fast_ffi - just remove it