|
| 1 | +error: attributes cannot be applied to generic type arguments |
| 2 | + --> $DIR/attribute-on-type.rs:7:18 |
| 3 | + | |
| 4 | +LL | let foo: Foo<#[cfg(not(wrong))] String> = todo!(); |
| 5 | + | ^^^^^^^^^^^^^^^^^^ attributes are not allowed here |
| 6 | + |
| 7 | +error: attributes cannot be applied to generic type arguments |
| 8 | + --> $DIR/attribute-on-type.rs:10:23 |
| 9 | + | |
| 10 | +LL | let _generic: Box<#[attr] i32> = Box::new(1); |
| 11 | + | ^^^^^^^ attributes are not allowed here |
| 12 | + |
| 13 | +error: attributes cannot be applied to a type |
| 14 | + --> $DIR/attribute-on-type.rs:13:22 |
| 15 | + | |
| 16 | +LL | let _assignment: #[attr] i32 = Box::new(1); |
| 17 | + | ^^^^^^^ attributes are not allowed here |
| 18 | + |
| 19 | +error: attributes cannot be applied to generic type arguments |
| 20 | + --> $DIR/attribute-on-type.rs:16:23 |
| 21 | + | |
| 22 | +LL | let _complex: Vec<#[derive(Debug)] String> = vec![]; |
| 23 | + | ^^^^^^^^^^^^^^^^ attributes are not allowed here |
| 24 | + |
| 25 | +error: attributes cannot be applied to generic type arguments |
| 26 | + --> $DIR/attribute-on-type.rs:19:26 |
| 27 | + | |
| 28 | +LL | let _nested: Box<Vec<#[cfg(feature = "test")] u64>> = Box::new(vec![]); |
| 29 | + | ^^^^^^^^^^^^^^^^^^^^^^^^ attributes are not allowed here |
| 30 | + |
| 31 | +error: attributes cannot be applied to a function parameter's type |
| 32 | + --> $DIR/attribute-on-type.rs:23:14 |
| 33 | + | |
| 34 | +LL | fn f(_param: #[attr] i32) {} |
| 35 | + | ^^^^^^^ attributes are not allowed here |
| 36 | + |
| 37 | +error: attributes cannot be applied to a type |
| 38 | + --> $DIR/attribute-on-type.rs:26:11 |
| 39 | + | |
| 40 | +LL | fn g() -> #[attr] i32 { 0 } |
| 41 | + | ^^^^^^^ attributes are not allowed here |
| 42 | + |
| 43 | +error: attributes cannot be applied to a type |
| 44 | + --> $DIR/attribute-on-type.rs:30:12 |
| 45 | + | |
| 46 | +LL | field: #[attr] i32, |
| 47 | + | ^^^^^^^ attributes are not allowed here |
| 48 | + |
| 49 | +error: attributes cannot be applied to a type |
| 50 | + --> $DIR/attribute-on-type.rs:32:14 |
| 51 | + | |
| 52 | +LL | field1: (#[attr] i32, i32), |
| 53 | + | ^^^^^^^ attributes are not allowed here |
| 54 | + |
| 55 | +error: attributes cannot be applied to a type |
| 56 | + --> $DIR/attribute-on-type.rs:36:15 |
| 57 | + | |
| 58 | +LL | type Tuple = (#[attr] i32, String); |
| 59 | + | ^^^^^^^ attributes are not allowed here |
| 60 | + |
| 61 | +error: attributes cannot be applied to a type |
| 62 | + --> $DIR/attribute-on-type.rs:39:6 |
| 63 | + | |
| 64 | +LL | impl #[attr] S {} |
| 65 | + | ^^^^^^^ attributes are not allowed here |
| 66 | + |
| 67 | +error: aborting due to 11 previous errors |
| 68 | + |
0 commit comments