Commit f9b39d2
gccrs: add error check if derive has wrong item
Derive may only be applied to structs, enums and unions.
gcc/rust/ChangeLog:
* expand/rust-expand-visitor.cc(ExpandVisitor::expand_inner_items):
Add check and error.
gcc/testsuite/ChangeLog:
* rust/compile/issue-3971.rs: New test.
Signed-off-by: Lucas Ly Ba <lucas.ly-ba@outlook.com>1 parent b92a684 commit f9b39d2
File tree
2 files changed
+21
-0
lines changed- gcc
- rust/expand
- testsuite/rust/compile
2 files changed
+21
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
180 | 181 | | |
181 | 182 | | |
182 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
183 | 193 | | |
184 | 194 | | |
185 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments