1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
|
error: private items are not exportable
--> $DIR/exportable.rs:10:5
|
LL | pub struct S;
| ^^^^^^^^^^^^
|
note: is only usable at visibility `pub(crate)`
--> $DIR/exportable.rs:10:5
|
LL | pub struct S;
| ^^^^^^^^^^^^
error: private items are not exportable
--> $DIR/exportable.rs:123:5
|
LL | enum E {
| ^^^^^^
|
note: is only usable at visibility `pub(self)`
--> $DIR/exportable.rs:123:5
|
LL | enum E {
| ^^^^^^
error: trait's are not exportable
--> $DIR/exportable.rs:131:5
|
LL | pub trait Trait {}
| ^^^^^^^^^^^^^^^
error: constant's are not exportable
--> $DIR/exportable.rs:135:5
|
LL | pub const C: i32 = 0;
| ^^^^^^^^^^^^^^^^
error: only functions with "C" ABI are exportable
--> $DIR/exportable.rs:13:5
|
LL | pub fn foo() -> i32 { 0 }
| ^^^^^^^^^^^^^^^^^^^
error: types with unstable layout are not exportable
--> $DIR/exportable.rs:27:5
|
LL | pub struct S3;
| ^^^^^^^^^^^^^
error: only functions with "C" ABI are exportable
--> $DIR/exportable.rs:33:5
|
LL | pub fn foo1() {}
| ^^^^^^^^^^^^^
error: function with `#[export_stable]` attribute uses type `Box<fn_sig::S>`, which is not exportable
--> $DIR/exportable.rs:44:5
|
LL | pub extern "C" fn foo3(x: Box<S>) -> i32 { 0 }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^------^^^^^^^^
| |
| not exportable
error: method with `#[export_stable]` attribute uses type `&impl_item::S`, which is not exportable
--> $DIR/exportable.rs:53:9
|
LL | pub extern "C" fn foo1(&self) -> i32 { 0 }
| ^^^^^^^^^^^^^^^^^^^^^^^-----^^^^^^^^
| |
| not exportable
error: method with `#[export_stable]` attribute uses type `impl_item::S`, which is not exportable
--> $DIR/exportable.rs:57:9
|
LL | pub extern "C" fn foo2(self) -> i32 { 0 }
| ^^^^^^^^^^^^^^^^^^^^^^^----^^^^^^^^
| |
| not exportable
error: generic functions are not exportable
--> $DIR/exportable.rs:65:9
|
LL | pub extern "C" fn foo1(&self) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: function with `#[export_stable]` attribute uses type `(u32,)`, which is not exportable
--> $DIR/exportable.rs:81:5
|
LL | pub extern "C" fn foo1(x: <S as Trait>::Type) -> u32 { x.0 }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^------------------^^^^^^^^
| |
| not exportable
error: function with `#[export_stable]` attribute uses type `[i32; 4]`, which is not exportable
--> $DIR/exportable.rs:88:5
|
LL | pub extern "C" fn foo2(_x: Type) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^----^
| |
| not exportable
error: function with `#[export_stable]` attribute uses type `extern "C" fn()`, which is not exportable
--> $DIR/exportable.rs:97:5
|
LL | pub extern "C" fn foo3(_x: S::Type) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^-------^
| |
| not exportable
error: function with `#[export_stable]` attribute uses type `impl Copy`, which is not exportable
--> $DIR/exportable.rs:101:5
|
LL | pub extern "C" fn foo4() -> impl Copy {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^---------
| |
| not exportable
error: ADT types with private fields are not exportable
--> $DIR/exportable.rs:116:5
|
LL | pub struct S2 {
| ^^^^^^^^^^^^^
|
note: `x` is private
--> $DIR/exportable.rs:118:9
|
LL | x: i32
| ^^^^^^
error: aborting due to 16 previous errors
|