Commit de77683
authored
library/windows_targets: Fix macro expansion error in 'link' macro rust-lang#144415
A recent change altered the definition of the link! macro when the windows_raw_dylib feature is enabled, changing its syntax from pub macro {..} to pub macro($tt:tt) {..} in rust-lang#143592
This change introduced a build failure with the error: "macros that expand to items must be delimited with braces or followed by a semicolon".
We revert this change, making it consistent with the link! macro when the windows_raw_dylib feature is not enabled.
For the case when it is not enabled, it also makes use of code repetition in order to avoid the macro expansion error. If instead we try to reuse the code, as seen in rust-lang#144415, we run into the same issue of "macros that expand to items must be delimited with braces or followed by a semicolon"1 parent 5d22242 commit de77683
1 file changed
+9
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
38 | 45 | | |
39 | 46 | | |
40 | 47 | | |
| |||
0 commit comments