File tree Expand file tree Collapse file tree 1 file changed +20
-16
lines changed Expand file tree Collapse file tree 1 file changed +20
-16
lines changed Original file line number Diff line number Diff line change 11
11
#![ deny( improper_ctypes) ]
12
12
#![ feature( libc) ]
13
13
14
+ use types:: * ;
15
+
14
16
extern crate libc;
15
17
16
- trait Mirror { type It ; }
17
- impl < T > Mirror for T { type It = Self ; }
18
- #[ repr( C ) ]
19
- pub struct StructWithProjection ( * mut <StructWithProjection as Mirror >:: It ) ;
20
- #[ repr( C ) ]
21
- pub struct StructWithProjectionAndLifetime < ' a > (
22
- & ' a mut <StructWithProjectionAndLifetime < ' a > as Mirror >:: It
23
- ) ;
24
- pub type I32Pair = ( i32 , i32 ) ;
25
- #[ repr( C ) ]
26
- pub struct ZeroSize ;
27
- pub type RustFn = fn ( ) ;
28
- pub type RustBadRet = extern fn ( ) -> Box < u32 > ;
29
- pub type CVoidRet = ( ) ;
30
- pub struct Foo ;
31
- pub trait Bar { }
18
+ pub mod types {
19
+ pub trait Mirror { type It ; }
20
+ impl < T > Mirror for T { type It = Self ; }
21
+ #[ repr( C ) ]
22
+ pub struct StructWithProjection ( * mut <StructWithProjection as Mirror >:: It ) ;
23
+ #[ repr( C ) ]
24
+ pub struct StructWithProjectionAndLifetime < ' a > (
25
+ & ' a mut <StructWithProjectionAndLifetime < ' a > as Mirror >:: It
26
+ ) ;
27
+ pub type I32Pair = ( i32 , i32 ) ;
28
+ #[ repr( C ) ]
29
+ pub struct ZeroSize ;
30
+ pub type RustFn = fn ( ) ;
31
+ pub type RustBadRet = extern fn ( ) -> Box < u32 > ;
32
+ pub type CVoidRet = ( ) ;
33
+ pub struct Foo ;
34
+ pub trait Bar { }
35
+ }
32
36
33
37
extern {
34
38
pub fn ptr_type1 ( size : * const Foo ) ; //~ ERROR: found struct without
You can’t perform that action at this time.
0 commit comments