|
| 1 | +error: attribute should be applied to a free function, impl method or static, foreign static |
| 2 | + --> $DIR/linkage.rs:6:1 |
| 3 | + | |
| 4 | +LL | #[linkage = "weak"] |
| 5 | + | ^^^^^^^^^^^^^^^^^^^ |
| 6 | +LL | type InvalidTy = (); |
| 7 | + | -------------------- not a free function, impl method or static, foreign static |
| 8 | + |
| 9 | +error: attribute should be applied to a free function, impl method or static, foreign static |
| 10 | + --> $DIR/linkage.rs:9:1 |
| 11 | + | |
| 12 | +LL | #[linkage = "weak"] |
| 13 | + | ^^^^^^^^^^^^^^^^^^^ |
| 14 | +LL | mod invalid_module {} |
| 15 | + | --------------------- not a free function, impl method or static, foreign static |
| 16 | + |
| 17 | +error: attribute should be applied to a free function, impl method or static, foreign static |
| 18 | + --> $DIR/linkage.rs:12:1 |
| 19 | + | |
| 20 | +LL | #[linkage = "weak"] |
| 21 | + | ^^^^^^^^^^^^^^^^^^^ |
| 22 | +LL | struct F; |
| 23 | + | --------- not a free function, impl method or static, foreign static |
| 24 | + |
| 25 | +error: attribute should be applied to a free function, impl method or static, foreign static |
| 26 | + --> $DIR/linkage.rs:15:1 |
| 27 | + | |
| 28 | +LL | #[linkage = "weak"] |
| 29 | + | ^^^^^^^^^^^^^^^^^^^ |
| 30 | +LL | / impl F { |
| 31 | +LL | | #[linkage = "weak"] |
| 32 | +LL | | fn valid(&self) {} |
| 33 | +LL | | } |
| 34 | + | |_- not a free function, impl method or static, foreign static |
| 35 | + |
| 36 | +error: attribute should be applied to a free function, impl method or static, foreign static |
| 37 | + --> $DIR/linkage.rs:23:5 |
| 38 | + | |
| 39 | +LL | #[linkage = "weak"] |
| 40 | + | ^^^^^^^^^^^^^^^^^^^ |
| 41 | +LL | / { |
| 42 | +LL | | 1 |
| 43 | +LL | | }; |
| 44 | + | |_____- not a free function, impl method or static, foreign static |
| 45 | + |
| 46 | +error: attribute should be applied to a free function, impl method or static, foreign static |
| 47 | + --> $DIR/linkage.rs:36:13 |
| 48 | + | |
| 49 | +LL | let _ = #[linkage = "weak"] |
| 50 | + | ^^^^^^^^^^^^^^^^^^^ |
| 51 | +LL | (|| 1); |
| 52 | + | ------ not a free function, impl method or static, foreign static |
| 53 | + |
| 54 | +error: aborting due to 6 previous errors |
| 55 | + |
0 commit comments