Skip to content

Commit ff47f84

Browse files
committed
Add migration guide for reflect attribute
1 parent 9f97aff commit ff47f84

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: "`#[reflect(...)] now supports only parenthesis`"
3+
pull_requests: [21400]
4+
---
5+
6+
Previously, the `#[reflect(...)]` attribute of the `Reflect` derive macro
7+
supported parenthesis, braces, or brackets. Now it supports only parenthesis.
8+
9+
```rust
10+
/// before
11+
#[derive(Clone, Reflect)
12+
#[reflect[Clone]]
13+
14+
/// after
15+
#[derive(Clone, Reflect)
16+
#[reflect(Clone)]
17+
18+
/// before
19+
#[derive(Clone, Reflect)
20+
#[reflect{Clone}]
21+
22+
/// after
23+
#[derive(Clone, Reflect)
24+
#[reflect(Clone)]
25+
```

0 commit comments

Comments
 (0)