<?xml version="1.0" encoding='utf-8'?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" title="Attribute (programming) - Page 20 - Wikipedia">
<p>
<a accesskey="1" href="page.php?w=Attribute_(programming)&amp;p=19">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Attribute_%28programming%29&amp;p=21">3.Next</a>
</p>
<p>are a type of <a href="page.php?w=Macro_%28computer_science%29">procedural macro</a>, which acts on <a href="page.php?w=Rust_syntax">Rust syntax</a> by consuming and producing code.</p>

<p>Many macros are defined in the language, but new ones are created using procedural macros. The following are some examples of usage of existing macros:<syntaxhighlight lang="rust">// Marks a function as inline<br/>
#[inline]fn add(a: i32, b: i32) -> i32 {    a + b}</syntaxhighlight></p>

<p>// Allows unused variables<br/>
#[allow(unused_variables)]fn example()</p><p>
<a accesskey="1" href="page.php?w=Attribute_(programming)&amp;p=19">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Attribute_%28programming%29&amp;p=21">3.Next</a>
</p>

<do type="prev" label="Search">
        <go href="search.wml"/>
</do>

</card>
</wml>
