33 lines
454 B
Plaintext
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, ...)]`
|