Files
mist-website/content/docs/guide/attributes.mdx
T
2026-07-03 10:23:45 +02:00

33 lines
454 B
Plaintext

---
title: Attributes
description: Inner and outer attributes for modules, items, and metadata.
icon: Hash
---
Inner attributes apply to the containing module:
```mist
#![allow(unused_variables)]
```
Outer attributes apply to the next item:
```mist
#[derive(Debug, Clone)]
struct Point {
i32 x,
i32 y,
}
#[test]
void my_test()
{
assert_eq!(1, 1);
}
```
Attribute syntax:
- `#[path]`
- `#[path = literal]`
- `#[path(item1, item2, ...)]`