File tree 2 files changed +54
-0
lines changed
2 files changed +54
-0
lines changed Original file line number Diff line number Diff line change
1
+ #![ feature( extern_types) ]
2
+
3
+ trait Trait {
4
+ #[ inline] //~ ERROR attribute should be applied to function or closure
5
+ const X : u32 ;
6
+
7
+ #[ inline] //~ ERROR attribute should be applied to function or closure
8
+ type T ;
9
+ }
10
+
11
+ extern {
12
+ #[ inline] //~ ERROR attribute should be applied to function or closure
13
+ static X : u32 ;
14
+
15
+ #[ inline] //~ ERROR attribute should be applied to function or closure
16
+ type T ;
17
+ }
18
+
19
+ fn main ( ) { }
Original file line number Diff line number Diff line change
1
+ error[E0518]: attribute should be applied to function or closure
2
+ --> $DIR/inline-trait-and-foreign-items.rs:12:5
3
+ |
4
+ LL | #[inline]
5
+ | ^^^^^^^^^
6
+ LL | static X: u32;
7
+ | -------------- not a function or closure
8
+
9
+ error[E0518]: attribute should be applied to function or closure
10
+ --> $DIR/inline-trait-and-foreign-items.rs:15:5
11
+ |
12
+ LL | #[inline]
13
+ | ^^^^^^^^^
14
+ LL | type T;
15
+ | ------- not a function or closure
16
+
17
+ error[E0518]: attribute should be applied to function or closure
18
+ --> $DIR/inline-trait-and-foreign-items.rs:4:5
19
+ |
20
+ LL | #[inline]
21
+ | ^^^^^^^^^
22
+ LL | const X: u32;
23
+ | ------------- not a function or closure
24
+
25
+ error[E0518]: attribute should be applied to function or closure
26
+ --> $DIR/inline-trait-and-foreign-items.rs:7:5
27
+ |
28
+ LL | #[inline]
29
+ | ^^^^^^^^^
30
+ LL | type T;
31
+ | ------- not a function or closure
32
+
33
+ error: aborting due to 4 previous errors
34
+
35
+ For more information about this error, try `rustc --explain E0518`.
You can’t perform that action at this time.
0 commit comments