blob: be3440c25ea66f157f66a8d709c5817d8bfb1ebf [file] [edit]
error: `#[export_stable]` attribute cannot be used on traits
--> $DIR/exportable.rs:135:5
|
LL | #[export_stable]
| ^^^^^^^^^^^^^^^^
|
= help: `#[export_stable]` can be applied to associated types, data types, functions, inherent impl blocks, modules, type aliases, and use statements
error: `#[export_stable]` attribute cannot be used on constants
--> $DIR/exportable.rs:139:5
|
LL | #[export_stable]
| ^^^^^^^^^^^^^^^^
|
= help: `#[export_stable]` can be applied to associated types, data types, functions, inherent impl blocks, modules, type aliases, and use statements
error: private items are not exportable
--> $DIR/exportable.rs:15:5
|
LL | pub struct S;
| ^^^^^^^^^^^^
|
note: is only usable at visibility `pub(crate)`
--> $DIR/exportable.rs:15:5
|
LL | pub struct S;
| ^^^^^^^^^^^^
error: private items are not exportable
--> $DIR/exportable.rs:128:5
|
LL | enum E {
| ^^^^^^
|
note: is only usable at visibility `pub(self)`
--> $DIR/exportable.rs:128:5
|
LL | enum E {
| ^^^^^^
error: only functions with "C" ABI are exportable
--> $DIR/exportable.rs:18:5
|
LL | pub fn foo() -> i32 { 0 }
| ^^^^^^^^^^^^^^^^^^^
error: types with unstable layout are not exportable
--> $DIR/exportable.rs:32:5
|
LL | pub struct S3;
| ^^^^^^^^^^^^^
error: only functions with "C" ABI are exportable
--> $DIR/exportable.rs:38:5
|
LL | pub fn foo1() {}
| ^^^^^^^^^^^^^
error: function with `#[export_stable]` attribute uses type `Box<fn_sig::S>`, which is not exportable
--> $DIR/exportable.rs:49: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:58: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:62:9
|
LL | pub extern "C" fn foo2(self) -> i32 { 0 }
| ^^^^^^^^^^^^^^^^^^^^^^^----^^^^^^^^
| |
| not exportable
error: generic functions are not exportable
--> $DIR/exportable.rs:70:9
|
LL | pub extern "C" fn foo1(&self) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: function with `#[export_stable]` attribute uses type `(u32,)`, which is not exportable
--> $DIR/exportable.rs:86: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:93: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:102: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:106:5
|
LL | pub extern "C" fn foo4() -> impl Copy {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^---------
| |
| not exportable
error: ADT types with private fields are not exportable
--> $DIR/exportable.rs:121:5
|
LL | pub struct S2 {
| ^^^^^^^^^^^^^
|
note: `x` is private
--> $DIR/exportable.rs:123:9
|
LL | x: i32
| ^^^^^^
error: aborting due to 16 previous errors