Add an example of collapse_debuginfo

This commit is contained in:
Eric Huss 2024-04-27 10:53:08 -07:00
parent c495b9660f
commit 2d51a2aec4
1 changed files with 9 additions and 0 deletions

View File

@ -157,5 +157,14 @@ For built-in macros the default is `yes`.
> **Note**: `rustc` has a `-C collapse-macro-debuginfo` CLI option to override both the default collapsing behavior and `#[collapse_debuginfo]` attributes.
```rust
#[collapse_debuginfo(yes)]
macro_rules! example {
() => {
println!("hello!");
};
}
```
[attribute]: ../attributes.md
[_MetaListIdents_]: ../attributes.md#meta-item-attribute-syntax