add working code example
This commit is contained in:
parent
320d049e87
commit
e09d782609
@ -19,6 +19,16 @@ The `#[optimize]` attribute should be used as follows:
|
||||
- `#[optimize(speed)]` -- instructs the optimization pipeline to generate code
|
||||
that's faster rather than smaller
|
||||
|
||||
For example:
|
||||
```
|
||||
#![feature(optimize_attribute)]
|
||||
|
||||
#[optimize(size)]
|
||||
pub fn something() {}
|
||||
|
||||
fn main() {}
|
||||
```
|
||||
|
||||
See [RFC 2412] for more details.
|
||||
|
||||
[RFC 2412]: https://rust-lang.github.io/rfcs/2412-optimize-attr.html
|
||||
|
Loading…
Reference in New Issue
Block a user