[INFO] fetching crate rust_swig 0.5.1... [INFO] testing rust_swig-0.5.1 against try#b83b707f97d809763b7861afa7638871f3339a33 for pr-145838-1 [INFO] extracting crate rust_swig 0.5.1 into /workspace/builds/worker-6-tc2/source [INFO] started tweaking crates.io crate rust_swig 0.5.1 [INFO] finished tweaking crates.io crate rust_swig 0.5.1 [INFO] tweaked toml for crates.io crate rust_swig 0.5.1 written to /workspace/builds/worker-6-tc2/source/Cargo.toml [INFO] validating manifest of crates.io crate rust_swig 0.5.1 on toolchain b83b707f97d809763b7861afa7638871f3339a33 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+b83b707f97d809763b7861afa7638871f3339a33" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+b83b707f97d809763b7861afa7638871f3339a33" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Locking 67 packages to latest compatible versions [INFO] [stderr] Adding bitflags v1.3.2 (available: v2.9.3) [INFO] [stderr] Adding env_logger v0.7.1 (available: v0.11.8) [INFO] [stderr] Adding heck v0.3.3 (available: v0.5.0) [INFO] [stderr] Adding jni-sys v0.3.0 (available: v0.4.0) [INFO] [stderr] Adding petgraph v0.5.1 (available: v0.8.2) [INFO] [stderr] Adding pulldown-cmark v0.7.2 (available: v0.13.0) [INFO] [stderr] Adding rustc-hash v1.1.0 (available: v2.1.1) [INFO] [stderr] Adding smol_str v0.1.24 (available: v0.3.2) [INFO] [stderr] Adding strum v0.18.0 (available: v0.27.2) [INFO] [stderr] Adding syn v1.0.109 (available: v2.0.106) [INFO] [stderr] Adding which v3.1.1 (available: v8.0.0) [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+b83b707f97d809763b7861afa7638871f3339a33" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+b83b707f97d809763b7861afa7638871f3339a33" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] e8671b8a4b57d0a4e6d0a5b12d98722493a5c2a3c3f6c3b5de26caf90d86e088 [INFO] running `Command { std: "docker" "start" "-a" "e8671b8a4b57d0a4e6d0a5b12d98722493a5c2a3c3f6c3b5de26caf90d86e088", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e8671b8a4b57d0a4e6d0a5b12d98722493a5c2a3c3f6c3b5de26caf90d86e088", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e8671b8a4b57d0a4e6d0a5b12d98722493a5c2a3c3f6c3b5de26caf90d86e088", kill_on_drop: false }` [INFO] [stdout] e8671b8a4b57d0a4e6d0a5b12d98722493a5c2a3c3f6c3b5de26caf90d86e088 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+b83b707f97d809763b7861afa7638871f3339a33" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 6ec568e01be6f9d001e5f8eec240ee6d41bd2da42aed124b7e9e45f09eff0021 [INFO] running `Command { std: "docker" "start" "-a" "6ec568e01be6f9d001e5f8eec240ee6d41bd2da42aed124b7e9e45f09eff0021", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.101 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling serde v1.0.219 [INFO] [stderr] Compiling unicode-segmentation v1.12.0 [INFO] [stderr] Compiling hashbrown v0.12.3 [INFO] [stderr] Compiling fixedbitset v0.2.0 [INFO] [stderr] Compiling indexmap v1.9.3 [INFO] [stderr] Compiling which v3.1.1 [INFO] [stderr] Compiling rustc-hash v1.1.0 [INFO] [stderr] Compiling heck v0.3.3 [INFO] [stderr] Compiling quote v1.0.40 [INFO] [stderr] Compiling petgraph v0.5.1 [INFO] [stderr] Compiling smol_str v0.1.24 [INFO] [stderr] Compiling rust_swig v0.5.1 (/opt/rustwide/workdir) [INFO] [stderr] Compiling strum_macros v0.18.0 [INFO] [stderr] Compiling strum v0.18.0 [INFO] [stdout] warning: method `name` is never used [INFO] [stdout] --> src/typemap/utils.rs:26:8 [INFO] [stdout] | [INFO] [stdout] 25 | pub(crate) trait ForeignTypeInfoT { [INFO] [stdout] | ---------------- method in this trait [INFO] [stdout] 26 | fn name(&self) -> &str; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `output` is never used [INFO] [stdout] --> src/typemap/utils.rs:41:8 [INFO] [stdout] | [INFO] [stdout] 39 | pub(crate) trait ForeignMethodSignature { [INFO] [stdout] | ---------------------- method in this trait [INFO] [stdout] 40 | type FI: ForeignTypeInfoT; [INFO] [stdout] 41 | fn output(&self) -> &dyn ForeignTypeInfoT; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `span` is never read [INFO] [stdout] --> src/types.rs:126:16 [INFO] [stdout] | [INFO] [stdout] 125 | pub(crate) struct FnDecl { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] 126 | pub(crate) span: Span, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `FnDecl` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/typemap/ast.rs:721:41 [INFO] [stdout] | [INFO] [stdout] 721 | pub(crate) fn get_trait_bounds(generic: &syn::Generics) -> GenericTraitBoundVec { [INFO] [stdout] | ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 721 | pub(crate) fn get_trait_bounds(generic: &syn::Generics) -> GenericTraitBoundVec<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/typemap/ast/subst_map.rs:33:28 [INFO] [stdout] | [INFO] [stdout] 33 | pub(crate) fn as_slice(&self) -> &[TyParamsSubstItem] { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | | | [INFO] [stdout] | | | the same lifetime is hidden here [INFO] [stdout] | | the same lifetime is elided here [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 33 | pub(crate) fn as_slice(&self) -> &[TyParamsSubstItem<'_>] { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/typemap/typemap_macro.rs:193:9 [INFO] [stdout] | [INFO] [stdout] 193 | &self, [INFO] [stdout] | ^^^^^ the lifetime is elided here [INFO] [stdout] ... [INFO] [stdout] 197 | ) -> Option [INFO] [stdout] | ^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 197 | ) -> Option> [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 27.86s [INFO] running `Command { std: "docker" "inspect" "6ec568e01be6f9d001e5f8eec240ee6d41bd2da42aed124b7e9e45f09eff0021", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6ec568e01be6f9d001e5f8eec240ee6d41bd2da42aed124b7e9e45f09eff0021", kill_on_drop: false }` [INFO] [stdout] 6ec568e01be6f9d001e5f8eec240ee6d41bd2da42aed124b7e9e45f09eff0021 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+b83b707f97d809763b7861afa7638871f3339a33" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] e0a3c52cc351239c4d70485b700a11f673f2efbae7bcc9983263a357c62a4200 [INFO] running `Command { std: "docker" "start" "-a" "e0a3c52cc351239c4d70485b700a11f673f2efbae7bcc9983263a357c62a4200", kill_on_drop: false }` [INFO] [stderr] Compiling rustix v1.0.8 [INFO] [stderr] Compiling regex-automata v0.4.10 [INFO] [stderr] Compiling pulldown-cmark v0.7.2 [INFO] [stderr] Compiling getopts v0.2.24 [INFO] [stderr] Compiling humantime v1.3.0 [INFO] [stderr] Compiling getrandom v0.3.3 [INFO] [stderr] Compiling once_cell v1.21.3 [INFO] [stderr] Compiling jni-sys v0.3.0 [INFO] [stdout] warning: method `name` is never used [INFO] [stdout] --> src/typemap/utils.rs:26:8 [INFO] [stdout] | [INFO] [stdout] 25 | pub(crate) trait ForeignTypeInfoT { [INFO] [stdout] | ---------------- method in this trait [INFO] [stdout] 26 | fn name(&self) -> &str; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `output` is never used [INFO] [stdout] --> src/typemap/utils.rs:41:8 [INFO] [stdout] | [INFO] [stdout] 39 | pub(crate) trait ForeignMethodSignature { [INFO] [stdout] | ---------------------- method in this trait [INFO] [stdout] 40 | type FI: ForeignTypeInfoT; [INFO] [stdout] 41 | fn output(&self) -> &dyn ForeignTypeInfoT; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `span` is never read [INFO] [stdout] --> src/types.rs:126:16 [INFO] [stdout] | [INFO] [stdout] 125 | pub(crate) struct FnDecl { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] 126 | pub(crate) span: Span, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `FnDecl` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/typemap/ast.rs:721:41 [INFO] [stdout] | [INFO] [stdout] 721 | pub(crate) fn get_trait_bounds(generic: &syn::Generics) -> GenericTraitBoundVec { [INFO] [stdout] | ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 721 | pub(crate) fn get_trait_bounds(generic: &syn::Generics) -> GenericTraitBoundVec<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/typemap/ast/subst_map.rs:33:28 [INFO] [stdout] | [INFO] [stdout] 33 | pub(crate) fn as_slice(&self) -> &[TyParamsSubstItem] { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | | | [INFO] [stdout] | | | the same lifetime is hidden here [INFO] [stdout] | | the same lifetime is elided here [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 33 | pub(crate) fn as_slice(&self) -> &[TyParamsSubstItem<'_>] { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/typemap/typemap_macro.rs:193:9 [INFO] [stdout] | [INFO] [stdout] 193 | &self, [INFO] [stdout] | ^^^^^ the lifetime is elided here [INFO] [stdout] ... [INFO] [stdout] 197 | ) -> Option [INFO] [stdout] | ^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 197 | ) -> Option> [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling tempfile v3.21.0 [INFO] [stderr] Compiling regex v1.11.2 [INFO] [stderr] Compiling env_logger v0.7.1 [INFO] [stderr] Compiling rust_swig v0.5.1 (/opt/rustwide/workdir) [INFO] [stdout] warning: fields `ignore`, `no_run`, `should_panic`, and `template` are never read [INFO] [stdout] --> tests/test_code_in_readme.rs:69:5 [INFO] [stdout] | [INFO] [stdout] 66 | struct Test { [INFO] [stdout] | ---- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 69 | ignore: bool, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 70 | no_run: bool, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 71 | should_panic: bool, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] 72 | template: Option, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Test` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `JAVA_LANG_STRING` is never used [INFO] [stdout] --> /opt/rustwide/target/debug/build/rust_swig-55443b2942b1a697/out/jni-include.rs:59:1059 [INFO] [stdout] | [INFO] [stdout] 59 | ...UE : jmethodID = :: std :: ptr :: null_mut () ; static mut JAVA_LANG_STRING : jclass = :: std :: ptr :: null_mut () ; static mut JAVA_... [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> /opt/rustwide/target/debug/build/rust_swig-55443b2942b1a697/out/jni-include.rs:1:7405 [INFO] [stdout] | [INFO] [stdout] 1 | ... : Vec :: new () , } } fn get_jni_env (& self) -> JniEnvHolder { assert ! (! self . java_vm . is_null ()) ; let mut env : * mut JNIEnv... [INFO] [stdout] | ^^^^^^ ^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 1 | macro_rules ! foreign_typemap { ($ ($ tree : tt) *) => { } ; } # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] mod swig_foreign_types_map { } # [allow (dead_code)] mod internal_aliases { use super :: * ; pub type JStringOptStr = jstring ; pub type JOptionalInt = jobject ; pub type JInteger = jobject ; pub type JByte = jobject ; pub type JShort = jobject ; pub type JFloat = jobject ; pub type JDouble = jobject ; pub type JOptionalDouble = jobject ; pub type JLong = jobject ; pub type JOptionalLong = jobject ; # [repr (transparent)] pub struct JForeignObjectsArray < T : SwigForeignClass > { pub (crate) inner : jobjectArray , pub (crate) _marker : :: std :: marker :: PhantomData < T > , } pub type JStringPath = jstring ; } # [doc = " Default JNI_VERSION"] const SWIG_JNI_VERSION : jint = JNI_VERSION_1_6 as jint ; # [doc = " Marker for what to cache in JNI_OnLoad"] # [allow (unused_macros)] macro_rules ! swig_jni_find_class { ($ id : ident , $ path : expr) => { unsafe { $ id } } ; ($ id : ident , $ path : expr ,) => { unsafe { $ id } } ; } # [allow (unused_macros)] macro_rules ! swig_jni_get_method_id { ($ global_id : ident , $ class_id : ident , $ name : expr , $ sig : expr) => { unsafe { $ global_id } } ; ($ global_id : ident , $ class_id : ident , $ name : expr , $ sig : expr ,) => { unsafe { $ global_id } } ; } # [allow (unused_macros)] macro_rules ! swig_jni_get_static_method_id { ($ global_id : ident , $ class_id : ident , $ name : expr , $ sig : expr) => { unsafe { $ global_id } } ; ($ global_id : ident , $ class_id : ident , $ name : expr , $ sig : expr ,) => { unsafe { $ global_id } } ; } # [allow (unused_macros)] macro_rules ! swig_jni_get_field_id { ($ global_id : ident , $ class_id : ident , $ name : expr , $ sig : expr) => { unsafe { $ global_id } } ; ($ global_id : ident , $ class_id : ident , $ name : expr , $ sig : expr ,) => { unsafe { $ global_id } } ; } # [allow (unused_macros)] macro_rules ! swig_jni_get_static_field_id { ($ global_id : ident , $ class_id : ident , $ name : expr , $ sig : expr) => { unsafe { $ global_id } } ; ($ global_id : ident , $ class_id : ident , $ name : expr , $ sig : expr ,) => { unsafe { $ global_id } } ; } # [allow (dead_code)] # [doc = "swig_ replace"] trait SwigInto < T > { fn swig_into (self , env : * mut JNIEnv) -> T ; } # [allow (dead_code)] # [doc = "swig_ replace"] trait SwigFrom < T > { fn swig_from (_ : T , env : * mut JNIEnv) -> Self ; } # [allow (dead_code)] # [doc = "swig_ replace"] trait SwigDeref { type Target : ? Sized ; fn swig_deref (& self) -> & Self :: Target ; } # [allow (dead_code)] # [doc = "swig_ replace"] trait SwigDerefMut { type Target : ? Sized ; fn swig_deref_mut (& mut self) -> & mut Self :: Target ; } # [allow (unused_macros)] macro_rules ! swig_c_str { ($ lit : expr) => { concat ! ($ lit , "\0") . as_ptr () as * const :: std :: os :: raw :: c_char } ; } # [allow (unused_macros)] macro_rules ! swig_assert_eq_size { ($ x : ty , $ ($ xs : ty) ,+ $ (,) *) => { $ (let _ = :: std :: mem :: transmute ::<$ x , $ xs >;) + } ; } # [cfg (target_pointer_width = "32")] pub unsafe fn jlong_to_pointer < T > (val : jlong) -> * mut T { (val as u32) as * mut T } # [cfg (target_pointer_width = "64")] pub unsafe fn jlong_to_pointer < T > (val : jlong) -> * mut T { val as * mut T } foreign_typemap ! ((r_type) () ; (f_type) "void" ;) ; foreign_typemap ! ((r_type) jbyte ; (f_type) "byte" ;) ; foreign_typemap ! ((r_type) jshort ; (f_type) "short" ;) ; foreign_typemap ! ((r_type) jint ; (f_type) "int" ;) ; foreign_typemap ! ((r_type) jlong ; (f_type) "long" ;) ; foreign_typemap ! ((r_type) jfloat ; (f_type) "float" ;) ; foreign_typemap ! ((r_type) jdouble ; (f_type) "double" ;) ; foreign_typemap ! ((r_type) jstring ; (f_type , option = "NoNullAnnotations") "String" ; (f_type , option = "NullAnnotations") "@NonNull String" ;) ; # [allow (dead_code)] pub trait SwigForeignClass { type PointedType ; fn jni_class () -> jclass ; fn jni_class_pointer_field () -> jfieldID ; fn box_object (x : Self) -> jlong ; fn unbox_object (x : jlong) -> Self ; fn to_pointer (x : jlong) -> :: std :: ptr :: NonNull < Self :: PointedType > ; } # [allow (dead_code)] pub trait SwigForeignCLikeEnum { fn as_jint (& self) -> jint ; # [doc = " # Panics"] # [doc = " Panics on error"] fn from_jint (_ : jint) -> Self ; } impl < T : SwigForeignCLikeEnum > SwigFrom < T > for jint { fn swig_from (x : T , _ : * mut JNIEnv) -> jint { x . as_jint () } } impl < T : SwigForeignCLikeEnum > SwigFrom < jint > for T { fn swig_from (x : jint , _ : * mut JNIEnv) -> T { T :: from_jint (x) } } # [allow (dead_code)] pub struct JavaString { string : jstring , chars : * const :: std :: os :: raw :: c_char , env : * mut JNIEnv , } # [allow (dead_code)] impl JavaString { pub fn new (env : * mut JNIEnv , js : jstring) -> JavaString { let chars = if ! js . is_null () { unsafe { (* * env) . GetStringUTFChars . unwrap () (env , js , :: std :: ptr :: null_mut ()) } } else { :: std :: ptr :: null_mut () } ; JavaString { string : js , chars : chars , env : env , } } pub fn to_str (& self) -> & str { if ! self . chars . is_null () { let s = unsafe { :: std :: ffi :: CStr :: from_ptr (self . chars) } ; s . to_str () . unwrap () } else { "" } } } # [allow (dead_code)] impl Drop for JavaString { fn drop (& mut self) { assert ! (! self . env . is_null ()) ; if ! self . string . is_null () { assert ! (! self . chars . is_null ()) ; unsafe { (* * self . env) . ReleaseStringUTFChars . unwrap () (self . env , self . string , self . chars) } ; self . env = :: std :: ptr :: null_mut () ; self . chars = :: std :: ptr :: null_mut () ; } } } impl SwigDeref for JavaString { type Target = str ; fn swig_deref (& self) -> & Self :: Target { self . to_str () } } # [allow (dead_code)] struct JavaCallback { java_vm : * mut JavaVM , this : jobject , methods : Vec < jmethodID > , } # [doc = " According to JNI spec it should be safe to"] # [doc = " pass pointer to JavaVm and jobject (global) across threads"] unsafe impl Send for JavaCallback { } # [allow (dead_code)] struct JniEnvHolder < 'a > { env : Option < * mut JNIEnv > , callback : & 'a JavaCallback , need_detach : bool , } # [allow (dead_code)] impl < 'a > Drop for JniEnvHolder < 'a > { fn drop (& mut self) { if self . need_detach { let res = unsafe { (* * self . callback . java_vm) . DetachCurrentThread . unwrap () (self . callback . java_vm) } ; if res != 0 { log :: error ! ("JniEnvHolder: DetachCurrentThread failed: {}" , res) ; } } } } # [allow (dead_code)] impl JavaCallback { fn new (obj : jobject , env : * mut JNIEnv) -> JavaCallback { let mut java_vm : * mut JavaVM = :: std :: ptr :: null_mut () ; let ret = unsafe { (* * env) . GetJavaVM . unwrap () (env , & mut java_vm) } ; assert_eq ! (0 , ret , "GetJavaVm failed") ; let global_obj = unsafe { (* * env) . NewGlobalRef . unwrap () (env , obj) } ; assert ! (! global_obj . is_null ()) ; JavaCallback { java_vm , this : global_obj , methods : Vec :: new () , } } fn get_jni_env (& self) -> JniEnvHolder<'_> { assert ! (! self . java_vm . is_null ()) ; let mut env : * mut JNIEnv = :: std :: ptr :: null_mut () ; let res = unsafe { (* * self . java_vm) . GetEnv . unwrap () (self . java_vm , (& mut env) as * mut * mut JNIEnv as * mut * mut :: std :: os :: raw :: c_void , SWIG_JNI_VERSION ,) } ; if res == (JNI_OK as jint) { return JniEnvHolder { env : Some (env) , callback : self , need_detach : false , } ; } if res != (JNI_EDETACHED as jint) { panic ! ("get_jni_env: GetEnv return error `{}`" , res) ; } trait ConvertPtr < T > { fn convert_ptr (self) -> T ; } impl ConvertPtr < * mut * mut :: std :: os :: raw :: c_void > for * mut * mut JNIEnv { fn convert_ptr (self) -> * mut * mut :: std :: os :: raw :: c_void { self as * mut * mut :: std :: os :: raw :: c_void } } impl ConvertPtr < * mut * mut JNIEnv > for * mut * mut JNIEnv { fn convert_ptr (self) -> * mut * mut JNIEnv { self } } let res = unsafe { (* * self . java_vm) . AttachCurrentThread . unwrap () (self . java_vm , (& mut env as * mut * mut JNIEnv) . convert_ptr () , :: std :: ptr :: null_mut () ,) } ; if res != 0 { log :: error ! ("JavaCallback::get_jnienv: AttachCurrentThread failed: {}" , res) ; JniEnvHolder { env : None , callback : self , need_detach : false , } } else { assert ! (! env . is_null ()) ; JniEnvHolder { env : Some (env) , callback : self , need_detach : true , } } } } # [allow (dead_code)] impl Drop for JavaCallback { fn drop (& mut self) { let env = self . get_jni_env () ; if let Some (env) = env . env { assert ! (! env . is_null ()) ; unsafe { (* * env) . DeleteGlobalRef . unwrap () (env , self . this) } ; } else { log :: error ! ("JavaCallback::drop failed, can not get JNIEnv") ; } } } # [allow (dead_code)] fn jni_throw (env : * mut JNIEnv , ex_class : jclass , message : & str) { let c_message = :: std :: ffi :: CString :: new (message) . unwrap () ; let res = unsafe { (* * env) . ThrowNew . unwrap () (env , ex_class , c_message . as_ptr ()) } ; if res != 0 { log :: error ! ("JNI ThrowNew({}) failed for class {:?} failed" , message , ex_class) ; } } # [allow (dead_code)] fn jni_throw_exception (env : * mut JNIEnv , message : & str) { let exception_class = swig_jni_find_class ! (JAVA_LANG_EXCEPTION , "java/lang/Exception") ; jni_throw (env , exception_class , message) } # [allow (dead_code)] fn object_to_jobject < T : SwigForeignClass > (env : * mut JNIEnv , obj : T) -> jobject { let jcls = < T > :: jni_class () ; assert ! (! jcls . is_null ()) ; let field_id = < T > :: jni_class_pointer_field () ; assert ! (! field_id . is_null ()) ; let jobj : jobject = unsafe { (* * env) . AllocObject . unwrap () (env , jcls) } ; assert ! (! jobj . is_null () , "object_to_jobject: AllocObject failed") ; let ret : jlong = < T > :: box_object (obj) ; unsafe { (* * env) . SetLongField . unwrap () (env , jobj , field_id , ret) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("object_to_jobject: Can not set mNativeObj field: catch exception") ; } } jobj } foreign_typemap ! (($ p : r_type) < T : SwigForeignClass > Vec < T > => internal_aliases :: JForeignObjectsArray < T > { $ out = vec_of_objects_to_jobject_array (env , $ p) ; } ; ($ p : f_type , option = "NoNullAnnotations") => "swig_f_type!(T) []" ; ($ p : f_type , option = "NullAnnotations") => "@NonNull swig_f_type!(T, NoNullAnnotations) []" ;) ; # [allow (dead_code)] fn jobject_array_to_vec_of_objects < T : SwigForeignClass + Clone > (env : * mut JNIEnv , arr : internal_aliases :: JForeignObjectsArray < T > ,) -> Vec < T > { let field_id = < T > :: jni_class_pointer_field () ; assert ! (! field_id . is_null ()) ; let length = unsafe { (* * env) . GetArrayLength . unwrap () (env , arr . inner) } ; let len = < usize as :: std :: convert :: TryFrom < jsize > > :: try_from (length) . expect ("invalid jsize, in jsize => usize conversation") ; let mut result = Vec :: with_capacity (len) ; for i in 0 .. length { let native : & mut T = unsafe { let obj = (* * env) . GetObjectArrayElement . unwrap () (env , arr . inner , i) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("Failed to retrieve element {} from this `jobjectArray'" , i) ; } let ptr = (* * env) . GetLongField . unwrap () (env , obj , field_id) ; let native = (jlong_to_pointer (ptr) as * mut T) . as_mut () . unwrap () ; (* * env) . DeleteLocalRef . unwrap () (env , obj) ; native } ; result . push (native . clone ()) ; } result } foreign_typemap ! (($ p : r_type) < T : SwigForeignClass + Clone > Vec < T > <= internal_aliases :: JForeignObjectsArray < T > { $ out = jobject_array_to_vec_of_objects (env , $ p) ; } ; ($ p : f_type , option = "NoNullAnnotations") <= "swig_f_type!(T) []" ; ($ p : f_type , option = "NullAnnotations") <= "@NonNull swig_f_type!(T, NoNullAnnotations) []" ;) ; # [allow (dead_code)] fn vec_of_objects_to_jobject_array < T : SwigForeignClass > (env : * mut JNIEnv , mut arr : Vec < T > ,) -> internal_aliases :: JForeignObjectsArray < T > { let jcls : jclass = < T > :: jni_class () ; assert ! (! jcls . is_null ()) ; let arr_len = < jsize as :: std :: convert :: TryFrom < usize > > :: try_from (arr . len ()) . expect ("invalid usize, in usize => to jsize conversation") ; let obj_arr : jobjectArray = unsafe { (* * env) . NewObjectArray . unwrap () (env , arr_len , jcls , :: std :: ptr :: null_mut ()) } ; assert ! (! obj_arr . is_null ()) ; let field_id = < T > :: jni_class_pointer_field () ; assert ! (! field_id . is_null ()) ; for (i , r_obj) in arr . drain (..) . enumerate () { let jobj : jobject = unsafe { (* * env) . AllocObject . unwrap () (env , jcls) } ; assert ! (! jobj . is_null ()) ; let r_obj : jlong = < T > :: box_object (r_obj) ; unsafe { (* * env) . SetLongField . unwrap () (env , jobj , field_id , r_obj) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("Can not mNativeObj field: catch exception") ; } (* * env) . SetObjectArrayElement . unwrap () (env , obj_arr , i as jsize , jobj) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("SetObjectArrayElement({}) failed" , i) ; } (* * env) . DeleteLocalRef . unwrap () (env , jobj) ; } } internal_aliases :: JForeignObjectsArray { inner : obj_arr , _marker : :: std :: marker :: PhantomData , } } # [allow (dead_code)] trait JniInvalidValue { fn jni_invalid_value () -> Self ; } impl < T > JniInvalidValue for * const T { fn jni_invalid_value () -> Self { :: std :: ptr :: null () } } impl < T > JniInvalidValue for * mut T { fn jni_invalid_value () -> Self { :: std :: ptr :: null_mut () } } impl JniInvalidValue for () { fn jni_invalid_value () { } } impl < T : SwigForeignClass > JniInvalidValue for internal_aliases :: JForeignObjectsArray < T > { fn jni_invalid_value () -> Self { Self { inner : :: std :: ptr :: null_mut () , _marker : :: std :: marker :: PhantomData , } } } macro_rules ! impl_jni_jni_invalid_value { ($ ($ type : ty) *) => ($ (impl JniInvalidValue for $ type { fn jni_invalid_value () -> Self { <$ type >:: default () } }) *) } impl_jni_jni_invalid_value ! { jbyte jshort jint jlong jfloat jdouble } foreign_typemap ! (($ p : r_type) < T > Result < T , & str > => swig_i_type ! (T) { $ out = match $ p { Ok (x) => { swig_from_rust_to_i_type ! (T , x , ret) ret } Err (msg) => { jni_throw_exception (env , msg) ; return < swig_i_type ! (T) >:: jni_invalid_value () ; } } ; } ; ($ p : f_type , unique_prefix = "/*Result*/") => "/*Result*/swig_f_type!(T)" "swig_foreign_from_i_type!(T, $p)" ;) ; foreign_typemap ! (($ p : r_type) < T > Result < T , String > => swig_i_type ! (T) { $ out = match $ p { Ok (x) => { swig_from_rust_to_i_type ! (T , x , ret) ret } Err (msg) => { jni_throw_exception (env , & msg) ; return < swig_i_type ! (T) >:: jni_invalid_value () ; } } ; } ; ($ p : f_type , unique_prefix = "/*Result*/") => "/*Result*/swig_f_type!(T)" "swig_foreign_from_i_type!(T, $p)" ;) ; foreign_typemap ! (($ p : r_type) bool => jboolean { $ out = if $ p { 1 as jboolean } else { 0 as jboolean } ; } ; ($ p : f_type) => "boolean" ; ($ p : r_type) bool <= jboolean { $ out = $ p != 0 ; } ; ($ p : f_type) <= "boolean" ;) ; foreign_typemap ! (($ p : r_type) SystemTime => jlong { let since_unix_epoch = $ p . duration_since (:: std :: time :: UNIX_EPOCH) . expect ("SystemTime to Unix time conv. error") ; $ out = < i64 as :: std :: convert :: TryFrom < u64 >>:: try_from (since_unix_epoch . as_secs () * 1_000 + u64 :: from (since_unix_epoch . subsec_millis ()) ,) . expect ("SystemTime: milleseconds u64 to i64 convert error") ; } ; ($ p : f_type , option = "NoNullAnnotations") => "java.util.Date" "$out = new java.util.Date($p);" ; ($ p : f_type , option = "NullAnnotations") => "@NonNull java.util.Date" "$out = new java.util.Date($p);" ;) ; foreign_typemap ! (($ p : r_type) jbyte => i8 { $ out = $ p ; } ; ($ p : r_type) jbyte <= i8 { $ out = $ p ; } ;) ; foreign_typemap ! (($ p : r_type) u8 => jshort { $ out = jshort :: from ($ p) ; } ;) ; foreign_typemap ! (($ p : r_type) u8 <= jshort { $ out = < u8 as :: std :: convert :: TryFrom < jshort >>:: try_from ($ p) . expect ("invalid jshort, in jshort => u8 conversation") ; } ;) ; foreign_typemap ! (($ p : r_type) i16 => jshort { $ out = $ p ; } ; ($ p : r_type) i16 <= jshort { $ out = $ p ; } ;) ; foreign_typemap ! (($ p : r_type) u16 => jint { $ out = jint :: from ($ p) ; } ; ($ p : r_type) u16 <= jint { $ out = < u16 as :: std :: convert :: TryFrom < jint >>:: try_from ($ p) . expect ("invalid jint, in jint => u16 conversation") ; } ;) ; foreign_typemap ! (($ p : r_type) jint => i32 { $ out = $ p ; } ; ($ p : r_type) jint <= i32 { $ out = $ p ; } ;) ; foreign_typemap ! (($ p : r_type) u32 => jlong { $ out = jlong :: from ($ p) ; } ; ($ p : r_type) u32 <= jlong { $ out = < u32 as :: std :: convert :: TryFrom < jlong >>:: try_from ($ p) . expect ("invalid jlong, in jlong => u32 conversation") ; } ;) ; foreign_typemap ! (($ p : r_type) i64 => jlong { $ out = $ p ; } ; ($ p : r_type) i64 <= jlong { $ out = $ p ; } ;) ; foreign_typemap ! (($ p : r_type) u64 => jlong { $ out = < jlong as :: std :: convert :: TryFrom < u64 >>:: try_from ($ p) . expect ("invalid u64, in u64 => jlong conversation") ; } ; ($ p : r_type) u64 <= jlong { $ out = < u64 as :: std :: convert :: TryFrom < jlong >>:: try_from ($ p) . expect ("invalid jlong, in jlong => u64 conversation") ; } ;) ; # [allow (dead_code)] pub fn u64_to_jlong_checked (x : u64) -> jlong { < jlong as :: std :: convert :: TryFrom < u64 > > :: try_from (x) . expect ("invalid u64, in u64 => jlong conversation") } foreign_typemap ! (($ p : r_type) f32 => jfloat { $ out = $ p ; } ; ($ p : r_type) f32 <= jfloat { $ out = $ p ; } ;) ; foreign_typemap ! (($ p : r_type) f64 => jdouble { $ out = $ p ; } ; ($ p : r_type) f64 <= jdouble { $ out = $ p ; } ;) ; impl < 'a > SwigFrom < & 'a str > for jstring { fn swig_from (x : & 'a str , env : * mut JNIEnv) -> Self { let x = :: std :: ffi :: CString :: new (x) . unwrap () ; unsafe { (* * env) . NewStringUTF . unwrap () (env , x . as_ptr ()) } } } impl SwigInto < JavaString > for jstring { fn swig_into (self , env : * mut JNIEnv) -> JavaString { JavaString :: new (env , self) } } impl SwigFrom < String > for jstring { fn swig_from (x : String , env : * mut JNIEnv) -> Self { from_std_string_jstring (x , env) } } # [allow (dead_code)] fn from_std_string_jstring (x : String , env : * mut JNIEnv) -> jstring { let x = x . into_bytes () ; unsafe { let x = :: std :: ffi :: CString :: from_vec_unchecked (x) ; (* * env) . NewStringUTF . unwrap () (env , x . as_ptr ()) } } foreign_typemap ! (($ p : r_type) usize <= jlong { $ out = < usize as :: std :: convert :: TryFrom < jlong >>:: try_from ($ p) . expect ("invalid jlong, in jlong => usize conversation") ; } ;) ; foreign_typemap ! (($ p : r_type) & Path <= internal_aliases :: JStringPath { let jstr = JavaString :: new (env , $ p) ; $ out = Path :: new (jstr . to_str ()) ; } ; ($ p : f_type , option = "NoNullAnnotations" , unique_prefix = "/*Path*/") <= "/*Path*/String" ; ($ p : f_type , option = "NullAnnotations" , unique_prefix = "/*Path*/") <= "/*Path*/@NonNull String" ;) ; # [doc = "swig_ replace"] impl SwigInto < jobjectArray > for Vec < String > { fn swig_into (mut self , env : * mut JNIEnv) -> jobjectArray { let jcls : jclass = swig_jni_find_class ! (JAVA_LANG_STRING , "java/lang/String") ; assert ! (! jcls . is_null ()) ; let obj_arr : jobjectArray = unsafe { (* * env) . NewObjectArray . unwrap () (env , self . len () as jsize , jcls , :: std :: ptr :: null_mut ()) } ; assert ! (! obj_arr . is_null ()) ; for (i , r_str) in self . drain (..) . enumerate () { let jstr : jstring = jstring :: swig_from (r_str , env) ; assert ! (! jstr . is_null ()) ; unsafe { (* * env) . SetObjectArrayElement . unwrap () (env , obj_arr , i as jsize , jstr) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("SetObjectArrayElement({}) failed" , i) ; } (* * env) . DeleteLocalRef . unwrap () (env , jstr) ; } } obj_arr } } macro_rules ! define_array_handling_code { ($ ([jni_arr_type = $ jni_arr_type : ident , rust_arr_wrapper = $ rust_arr_wrapper : ident , jni_get_array_elements = $ jni_get_array_elements : ident , jni_elem_type = $ jni_elem_type : ident , rust_elem_type = $ rust_elem_type : ident , jni_release_array_elements = $ jni_release_array_elements : ident , jni_new_array = $ jni_new_array : ident , jni_set_array_region = $ jni_set_array_region : ident]) ,*) => { $ (# [allow (dead_code)] struct $ rust_arr_wrapper { array : $ jni_arr_type , data : * mut $ jni_elem_type , env : * mut JNIEnv , } # [allow (dead_code)] impl $ rust_arr_wrapper { fn new (env : * mut JNIEnv , array : $ jni_arr_type) -> $ rust_arr_wrapper { assert ! (! array . is_null ()) ; let data = unsafe { (** env) .$ jni_get_array_elements . unwrap () (env , array , :: std :: ptr :: null_mut ()) } ; $ rust_arr_wrapper { array , data , env } } fn to_slice (& self) -> & [$ rust_elem_type] { unsafe { let len : jsize = (** self . env) . GetArrayLength . unwrap () (self . env , self . array) ; assert ! ((len as u64) <= (usize :: max_value () as u64)) ; :: std :: slice :: from_raw_parts (self . data , len as usize) } } fn from_slice_to_raw (arr : & [$ rust_elem_type] , env : * mut JNIEnv) -> $ jni_arr_type { assert ! ((arr . len () as u64) <= (jsize :: max_value () as u64)) ; let jarr : $ jni_arr_type = unsafe { (** env) .$ jni_new_array . unwrap () (env , arr . len () as jsize) } ; assert ! (! jarr . is_null ()) ; unsafe { (** env) .$ jni_set_array_region . unwrap () (env , jarr , 0 , arr . len () as jsize , arr . as_ptr ()) ; if (** env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("{}:{} {} failed" , file ! () , line ! () , stringify ! ($ jni_set_array_region)) ; } } jarr } } # [allow (dead_code)] impl Drop for $ rust_arr_wrapper { fn drop (& mut self) { assert ! (! self . env . is_null ()) ; assert ! (! self . array . is_null ()) ; unsafe { (** self . env) .$ jni_release_array_elements . unwrap () (self . env , self . array , self . data , JNI_ABORT as jint ,) } ; } }) * } } define_array_handling_code ! ([jni_arr_type = jbyteArray , rust_arr_wrapper = JavaByteArray , jni_get_array_elements = GetByteArrayElements , jni_elem_type = jbyte , rust_elem_type = i8 , jni_release_array_elements = ReleaseByteArrayElements , jni_new_array = NewByteArray , jni_set_array_region = SetByteArrayRegion] , [jni_arr_type = jshortArray , rust_arr_wrapper = JavaShortArray , jni_get_array_elements = GetShortArrayElements , jni_elem_type = jshort , rust_elem_type = i16 , jni_release_array_elements = ReleaseShortArrayElements , jni_new_array = NewShortArray , jni_set_array_region = SetShortArrayRegion] , [jni_arr_type = jintArray , rust_arr_wrapper = JavaIntArray , jni_get_array_elements = GetIntArrayElements , jni_elem_type = jint , rust_elem_type = i32 , jni_release_array_elements = ReleaseIntArrayElements , jni_new_array = NewIntArray , jni_set_array_region = SetIntArrayRegion] , [jni_arr_type = jlongArray , rust_arr_wrapper = JavaLongArray , jni_get_array_elements = GetLongArrayElements , jni_elem_type = jlong , rust_elem_type = i64 , jni_release_array_elements = ReleaseLongArrayElements , jni_new_array = NewLongArray , jni_set_array_region = SetLongArrayRegion] , [jni_arr_type = jfloatArray , rust_arr_wrapper = JavaFloatArray , jni_get_array_elements = GetFloatArrayElements , jni_elem_type = jfloat , rust_elem_type = f32 , jni_release_array_elements = ReleaseFloatArrayElements , jni_new_array = NewFloatArray , jni_set_array_region = SetFloatArrayRegion] , [jni_arr_type = jdoubleArray , rust_arr_wrapper = JavaDoubleArray , jni_get_array_elements = GetDoubleArrayElements , jni_elem_type = jdouble , rust_elem_type = f64 , jni_release_array_elements = ReleaseDoubleArrayElements , jni_new_array = NewDoubleArray , jni_set_array_region = SetDoubleArrayRegion]) ; impl < T > SwigDeref for Vec < T > { type Target = [T] ; fn swig_deref (& self) -> & Self :: Target { & * self } } impl SwigDeref for JavaIntArray { type Target = [i32] ; fn swig_deref (& self) -> & Self :: Target { self . to_slice () } } impl SwigFrom < jintArray > for JavaIntArray { fn swig_from (x : jintArray , env : * mut JNIEnv) -> Self { JavaIntArray :: new (env , x) } } impl < 'a > SwigInto < jintArray > for & 'a [i32] { fn swig_into (self , env : * mut JNIEnv) -> jintArray { JavaIntArray :: from_slice_to_raw (self , env) } } impl SwigDeref for JavaLongArray { type Target = [i64] ; fn swig_deref (& self) -> & Self :: Target { self . to_slice () } } impl SwigFrom < jlongArray > for JavaLongArray { fn swig_from (x : jlongArray , env : * mut JNIEnv) -> Self { JavaLongArray :: new (env , x) } } impl < 'a > SwigInto < jlongArray > for & 'a [i64] { fn swig_into (self , env : * mut JNIEnv) -> jlongArray { JavaLongArray :: from_slice_to_raw (self , env) } } impl SwigDeref for JavaFloatArray { type Target = [f32] ; fn swig_deref (& self) -> & Self :: Target { self . to_slice () } } impl SwigFrom < jfloatArray > for JavaFloatArray { fn swig_from (x : jfloatArray , env : * mut JNIEnv) -> Self { JavaFloatArray :: new (env , x) } } impl < 'a > SwigInto < jfloatArray > for & 'a [f32] { fn swig_into (self , env : * mut JNIEnv) -> jfloatArray { JavaFloatArray :: from_slice_to_raw (self , env) } } impl SwigDeref for JavaDoubleArray { type Target = [f64] ; fn swig_deref (& self) -> & Self :: Target { self . to_slice () } } impl SwigFrom < jdoubleArray > for JavaDoubleArray { fn swig_from (x : jdoubleArray , env : * mut JNIEnv) -> Self { JavaDoubleArray :: new (env , x) } } impl < 'a > SwigInto < jdoubleArray > for & 'a [f64] { fn swig_into (self , env : * mut JNIEnv) -> jdoubleArray { JavaDoubleArray :: from_slice_to_raw (self , env) } } impl SwigDeref for JavaByteArray { type Target = [i8] ; fn swig_deref (& self) -> & Self :: Target { self . to_slice () } } impl SwigFrom < jbyteArray > for JavaByteArray { fn swig_from (x : jbyteArray , env : * mut JNIEnv) -> Self { JavaByteArray :: new (env , x) } } impl < 'a > SwigInto < jbyteArray > for & 'a [i8] { fn swig_into (self , env : * mut JNIEnv) -> jbyteArray { JavaByteArray :: from_slice_to_raw (self , env) } } impl SwigDeref for JavaShortArray { type Target = [i16] ; fn swig_deref (& self) -> & Self :: Target { self . to_slice () } } impl SwigFrom < jshortArray > for JavaShortArray { fn swig_from (x : jshortArray , env : * mut JNIEnv) -> Self { JavaShortArray :: new (env , x) } } impl < 'a > SwigInto < jshortArray > for & 'a [i16] { fn swig_into (self , env : * mut JNIEnv) -> jshortArray { JavaShortArray :: from_slice_to_raw (self , env) } } impl SwigDeref for String { type Target = str ; fn swig_deref (& self) -> & str { self } } impl < T > SwigDeref for Arc < Mutex < T > > { type Target = Mutex < T > ; fn swig_deref (& self) -> & Mutex < T > { self } } impl < 'a , T > SwigFrom < & 'a Mutex < T > > for MutexGuard < 'a , T > { fn swig_from (m : & 'a Mutex < T > , _ : * mut JNIEnv) -> MutexGuard < 'a , T > { m . lock () . unwrap () } } impl < 'a , T > SwigDeref for MutexGuard < 'a , T > { type Target = T ; fn swig_deref (& self) -> & T { self } } impl < 'a , T > SwigDerefMut for MutexGuard < 'a , T > { type Target = T ; fn swig_deref_mut (& mut self) -> & mut T { self } } impl < T > SwigDeref for Rc < T > { type Target = T ; fn swig_deref (& self) -> & T { self } } impl < 'a , T > SwigDeref for & 'a Rc < T > { type Target = T ; fn swig_deref (& self) -> & T { self } } impl < 'a , T > SwigFrom < & 'a RefCell < T > > for Ref < 'a , T > { fn swig_from (m : & 'a RefCell < T > , _ : * mut JNIEnv) -> Ref < 'a , T > { m . borrow () } } impl < 'a , T > SwigFrom < & 'a RefCell < T > > for RefMut < 'a , T > { fn swig_from (m : & 'a RefCell < T > , _ : * mut JNIEnv) -> RefMut < 'a , T > { m . borrow_mut () } } impl < 'a , T > SwigDeref for Ref < 'a , T > { type Target = T ; fn swig_deref (& self) -> & T { self } } impl < 'a , T > SwigDerefMut for RefMut < 'a , T > { type Target = T ; fn swig_deref_mut (& mut self) -> & mut T { self } } impl < T : SwigForeignClass > SwigDeref for T { type Target = T ; fn swig_deref (& self) -> & T { self } } impl < T : SwigForeignClass > SwigDerefMut for T { type Target = T ; fn swig_deref_mut (& mut self) -> & mut T { self } } # [cfg (target_pointer_width = "32")] impl SwigFrom < isize > for jint { fn swig_from (x : isize , _ : * mut JNIEnv) -> Self { x as jint } } # [cfg (target_pointer_width = "64")] impl SwigFrom < isize > for jlong { fn swig_from (x : isize , _ : * mut JNIEnv) -> Self { x as jlong } } # [cfg (target_pointer_width = "32")] impl SwigFrom < usize > for jlong { fn swig_from (x : usize , _ : * mut JNIEnv) -> Self { x as jlong } } # [cfg (target_pointer_width = "64")] impl SwigFrom < usize > for jlong { fn swig_from (x : usize , _ : * mut JNIEnv) -> Self { let x = x as u64 ; u64_to_jlong_checked (x) } } impl < 'a > SwigInto < String > for & 'a str { fn swig_into (self , _ : * mut JNIEnv) -> String { self . into () } } # [allow (dead_code)] fn to_java_util_optional_double (env : * mut JNIEnv , x : Option < f64 > ,) -> internal_aliases :: JOptionalDouble { let class : jclass = swig_jni_find_class ! (JAVA_UTIL_OPTIONAL_DOUBLE , "java/util/OptionalDouble") ; assert ! (! class . is_null () ,) ; match x { Some (val) => { let of_m : jmethodID = swig_jni_get_static_method_id ! (JAVA_UTIL_OPTIONAL_DOUBLE_OF , JAVA_UTIL_OPTIONAL_DOUBLE , "of" , "(D)Ljava/util/OptionalDouble;") ; assert ! (! of_m . is_null ()) ; let ret = unsafe { let ret = (* * env) . CallStaticObjectMethod . unwrap () (env , class , of_m , val) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("OptionalDouble.of failed: catch exception") ; } ret } ; assert ! (! ret . is_null ()) ; ret } None => { let empty_m : jmethodID = swig_jni_get_static_method_id ! (JAVA_UTIL_OPTIONAL_DOUBLE_EMPTY , JAVA_UTIL_OPTIONAL_DOUBLE , "empty" , "()Ljava/util/OptionalDouble;") ; assert ! (! empty_m . is_null ()) ; let ret = unsafe { let ret = (* * env) . CallStaticObjectMethod . unwrap () (env , class , empty_m) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("OptionalDouble.empty failed: catch exception") ; } ret } ; assert ! (! ret . is_null ()) ; ret } } } # [allow (dead_code)] fn from_java_lang_double_to_rust (env : * mut JNIEnv , x : internal_aliases :: JDouble) -> Option < f64 > { if x . is_null () { None } else { let x = unsafe { (* * env) . NewLocalRef . unwrap () (env , x) } ; if x . is_null () { None } else { let class : jclass = swig_jni_find_class ! (JAVA_LANG_DOUBLE , "java/lang/Double") ; assert ! (! class . is_null ()) ; let double_value_m : jmethodID = swig_jni_get_method_id ! (JAVA_LANG_DOUBLE_DOUBLE_VALUE_METHOD , JAVA_LANG_DOUBLE , "doubleValue" , "()D" ,) ; assert ! (! double_value_m . is_null () ,) ; let ret : f64 = unsafe { let ret = (* * env) . CallDoubleMethod . unwrap () (env , x , double_value_m) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("Double.doubleValue failed: catch exception") ; } (* * env) . DeleteLocalRef . unwrap () (env , x) ; ret } ; Some (ret) } } } foreign_typemap ! (($ p : r_type) Option < f64 > <= internal_aliases :: JDouble { $ out = from_java_lang_double_to_rust (env , $ p) ; } ; (f_type , option = "NoNullAnnotations") <= "Double" ; (f_type , option = "NullAnnotations") <= "@Nullable Double" ;) ; foreign_typemap ! (($ p : r_type) Option < f64 > => internal_aliases :: JOptionalDouble { $ out = to_java_util_optional_double (env , $ p) ; } ; (f_type , option = "NoNullAnnotations") => "java.util.OptionalDouble" ; (f_type , option = "NullAnnotations") => "@NonNull java.util.OptionalDouble" ;) ; # [allow (dead_code)] fn from_java_lang_float_to_rust (env : * mut JNIEnv , x : internal_aliases :: JFloat) -> Option < f32 > { if x . is_null () { None } else { let x = unsafe { (* * env) . NewLocalRef . unwrap () (env , x) } ; if x . is_null () { None } else { let class : jclass = swig_jni_find_class ! (JAVA_LANG_FLOAT , "java/lang/Float") ; assert ! (! class . is_null ()) ; let float_value_m : jmethodID = swig_jni_get_method_id ! (JAVA_LANG_FLOAT_FLOAT_VALUE , JAVA_LANG_FLOAT , "floatValue" , "()F") ; assert ! (! float_value_m . is_null ()) ; let ret : f32 = unsafe { let ret = (* * env) . CallFloatMethod . unwrap () (env , x , float_value_m) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("Float.floatValue failed: catch exception") ; } (* * env) . DeleteLocalRef . unwrap () (env , x) ; ret } ; Some (ret) } } } foreign_typemap ! (($ p : r_type) Option < f32 > <= internal_aliases :: JFloat { $ out = from_java_lang_float_to_rust (env , $ p) ; } ; (f_type , option = "NoNullAnnotations") <= "Float" ; (f_type , option = "NullAnnotations") <= "@Nullable Float" ;) ; foreign_typemap ! (($ p : r_type) Option < f32 > => internal_aliases :: JOptionalDouble { $ out = to_java_util_optional_double (env , $ p . map (f64 :: from)) ; } ;) ; # [allow (dead_code)] fn to_java_util_optional_long (env : * mut JNIEnv , x : Option < i64 >) -> internal_aliases :: JOptionalLong { let class : jclass = swig_jni_find_class ! (JAVA_UTIL_OPTIONAL_LONG , "java/util/OptionalLong") ; assert ! (! class . is_null () ,) ; match x { Some (val) => { let of_m : jmethodID = swig_jni_get_static_method_id ! (JAVA_UTIL_OPTIONAL_LONG_OF , JAVA_UTIL_OPTIONAL_LONG , "of" , "(J)Ljava/util/OptionalLong;") ; assert ! (! of_m . is_null ()) ; let ret = unsafe { let ret = (* * env) . CallStaticObjectMethod . unwrap () (env , class , of_m , val) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("OptionalLong.of failed: catch exception") ; } ret } ; assert ! (! ret . is_null ()) ; ret } None => { let empty_m : jmethodID = swig_jni_get_static_method_id ! (JAVA_UTIL_OPTIONAL_LONG_EMPTY , JAVA_UTIL_OPTIONAL_LONG , "empty" , "()Ljava/util/OptionalLong;" ,) ; assert ! (! empty_m . is_null ()) ; let ret = unsafe { let ret = (* * env) . CallStaticObjectMethod . unwrap () (env , class , empty_m) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("OptionalLong.empty failed: catch exception") ; } ret } ; assert ! (! ret . is_null ()) ; ret } } } # [allow (dead_code)] fn from_java_lang_long_to_rust (env : * mut JNIEnv , x : internal_aliases :: JLong) -> Option < i64 > { if x . is_null () { None } else { let x = unsafe { (* * env) . NewLocalRef . unwrap () (env , x) } ; if x . is_null () { None } else { let class : jclass = swig_jni_find_class ! (JAVA_LANG_LONG , "java/lang/Long") ; assert ! (! class . is_null ()) ; let long_value_m : jmethodID = swig_jni_get_method_id ! (JAVA_LANG_LONG_LONG_VALUE , JAVA_LANG_LONG , "longValue" , "()J") ; assert ! (! long_value_m . is_null ()) ; let ret : i64 = unsafe { let ret = (* * env) . CallLongMethod . unwrap () (env , x , long_value_m) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("Long.longValue failed: catch exception") ; } (* * env) . DeleteLocalRef . unwrap () (env , x) ; ret } ; Some (ret) } } } foreign_typemap ! (($ p : r_type) Option < i64 > <= internal_aliases :: JLong { $ out = from_java_lang_long_to_rust (env , $ p) ; } ; (f_type , option = "NoNullAnnotations") <= "Long" ; (f_type , option = "NullAnnotations") <= "@Nullable Long" ;) ; foreign_typemap ! (($ p : r_type) Option < i64 > => internal_aliases :: JOptionalLong { $ out = to_java_util_optional_long (env , $ p) ; } ; (f_type , option = "NoNullAnnotations") => "java.util.OptionalLong" ; (f_type , option = "NullAnnotations") => "@NonNull java.util.OptionalLong" ;) ; # [allow (dead_code)] fn from_java_lang_int_to_rust (env : * mut JNIEnv , x : internal_aliases :: JInteger) -> Option < i32 > { if x . is_null () { None } else { let x = unsafe { (* * env) . NewLocalRef . unwrap () (env , x) } ; if x . is_null () { None } else { let class : jclass = swig_jni_find_class ! (JAVA_LANG_INTEGER , "java/lang/Integer") ; assert ! (! class . is_null ()) ; let int_value_m : jmethodID = swig_jni_get_method_id ! (JAVA_LANG_INTEGER_INT_VALUE , JAVA_LANG_INTEGER , "intValue" , "()I") ; assert ! (! int_value_m . is_null () ,) ; let ret : i32 = unsafe { let ret = (* * env) . CallIntMethod . unwrap () (env , x , int_value_m) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("Integer.intValue failed: catch exception") ; } (* * env) . DeleteLocalRef . unwrap () (env , x) ; ret } ; Some (ret) } } } # [allow (dead_code)] fn from_java_lang_byte_to_rust (env : * mut JNIEnv , x : internal_aliases :: JByte) -> Option < i8 > { if x . is_null () { None } else { let x = unsafe { (* * env) . NewLocalRef . unwrap () (env , x) } ; if x . is_null () { None } else { let class : jclass = swig_jni_find_class ! (JAVA_LANG_BYTE , "java/lang/Byte") ; assert ! (! class . is_null ()) ; let byte_value_m : jmethodID = swig_jni_get_method_id ! (JAVA_LANG_BYTE_BYTE_VALUE , JAVA_LANG_BYTE , "byteValue" , "()B") ; assert ! (! byte_value_m . is_null () ,) ; let ret : i8 = unsafe { let ret = (* * env) . CallByteMethod . unwrap () (env , x , byte_value_m) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("Byte.byteValue failed: catch exception") ; } (* * env) . DeleteLocalRef . unwrap () (env , x) ; ret } ; Some (ret) } } } # [allow (dead_code)] fn from_java_lang_short_to_rust (env : * mut JNIEnv , x : internal_aliases :: JByte) -> Option < i16 > { if x . is_null () { None } else { let x = unsafe { (* * env) . NewLocalRef . unwrap () (env , x) } ; if x . is_null () { None } else { let class : jclass = swig_jni_find_class ! (JAVA_LANG_SHORT , "java/lang/Short") ; assert ! (! class . is_null ()) ; let short_value_m : jmethodID = swig_jni_get_method_id ! (JAVA_LANG_SHORT_SHORT_VALUE , JAVA_LANG_SHORT , "shortValue" , "()S") ; assert ! (! short_value_m . is_null ()) ; let ret : i16 = unsafe { let ret = (* * env) . CallShortMethod . unwrap () (env , x , short_value_m) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("Short.shortValue failed: catch exception") ; } (* * env) . DeleteLocalRef . unwrap () (env , x) ; ret } ; Some (ret) } } } foreign_typemap ! (($ p : r_type) Option < i32 > <= internal_aliases :: JInteger { $ out = from_java_lang_int_to_rust (env , $ p) ; } ; (f_type , option = "NoNullAnnotations") <= "Integer" ; (f_type , option = "NullAnnotations") <= "@Nullable Integer" ;) ; # [allow (dead_code)] fn to_java_util_optional_int (env : * mut JNIEnv , x : Option < i32 >) -> jobject { let class : jclass = swig_jni_find_class ! (JAVA_UTIL_OPTIONAL_INT , "java/util/OptionalInt") ; assert ! (! class . is_null () ,) ; match x { Some (val) => { let of_m : jmethodID = swig_jni_get_static_method_id ! (JAVA_UTIL_OPTIONAL_INT_OF , JAVA_UTIL_OPTIONAL_INT , "of" , "(I)Ljava/util/OptionalInt;") ; assert ! (! of_m . is_null ()) ; let ret = unsafe { let ret = (* * env) . CallStaticObjectMethod . unwrap () (env , class , of_m , val) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("OptionalInt.of failed: catch exception") ; } ret } ; assert ! (! ret . is_null ()) ; ret } None => { let empty_m : jmethodID = swig_jni_get_static_method_id ! (JAVA_UTIL_OPTIONAL_INT_EMPTY , JAVA_UTIL_OPTIONAL_INT , "empty" , "()Ljava/util/OptionalInt;") ; assert ! (! empty_m . is_null ()) ; let ret = unsafe { let ret = (* * env) . CallStaticObjectMethod . unwrap () (env , class , empty_m) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("OptionalInt.empty failed: catch exception") ; } ret } ; assert ! (! ret . is_null ()) ; ret } } } foreign_typemap ! (($ p : r_type) Option < i32 > => internal_aliases :: JOptionalInt { $ out = to_java_util_optional_int (env , $ p) ; } ; (f_type , option = "NoNullAnnotations") => "java.util.OptionalInt" ; (f_type , option = "NullAnnotations") => "@NonNull java.util.OptionalInt" ;) ; foreign_typemap ! (($ p : r_type) Option < i8 > <= internal_aliases :: JByte { $ out = from_java_lang_byte_to_rust (env , $ p) ; } ; (f_type , option = "NoNullAnnotations") <= "Byte" ; (f_type , option = "NullAnnotations") <= "@Nullable Byte" ;) ; foreign_typemap ! (($ p : r_type) Option < i8 > => internal_aliases :: JOptionalInt { $ out = to_java_util_optional_int (env , $ p . map (i32 :: from)) ; } ;) ; foreign_typemap ! (($ p : r_type) Option < i16 > <= internal_aliases :: JShort { $ out = from_java_lang_short_to_rust (env , $ p) ; } ; (f_type , option = "NoNullAnnotations") <= "Short" ; (f_type , option = "NullAnnotations") <= "@Nullable Short" ;) ; foreign_typemap ! (($ p : r_type) Option < i16 > => internal_aliases :: JOptionalInt { $ out = to_java_util_optional_int (env , $ p . map (i32 :: from)) ; } ;) ; foreign_typemap ! (($ p : r_type) < T : SwigForeignClass > Option < T > => jlong { $ out = match $ p { Some (x) => { let ptr = < swig_subst_type ! (T) >:: box_object (x) ; debug_assert_ne ! (0 , ptr) ; ptr } None => 0 , } ; } ; ($ p : f_type , option = "NoNullAnnotations") => "java.util.Optional" r#" [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `name` is never used [INFO] [stdout] --> src/typemap/utils.rs:26:8 [INFO] [stdout] | [INFO] [stdout] 25 | pub(crate) trait ForeignTypeInfoT { [INFO] [stdout] | ---------------- method in this trait [INFO] [stdout] 26 | fn name(&self) -> &str; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `output` is never used [INFO] [stdout] --> src/typemap/utils.rs:41:8 [INFO] [stdout] | [INFO] [stdout] 39 | pub(crate) trait ForeignMethodSignature { [INFO] [stdout] | ---------------------- method in this trait [INFO] [stdout] 40 | type FI: ForeignTypeInfoT; [INFO] [stdout] 41 | fn output(&self) -> &dyn ForeignTypeInfoT; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `span` is never read [INFO] [stdout] --> src/types.rs:126:16 [INFO] [stdout] | [INFO] [stdout] 125 | pub(crate) struct FnDecl { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] 126 | pub(crate) span: Span, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `FnDecl` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/typemap/ast.rs:721:41 [INFO] [stdout] | [INFO] [stdout] 721 | pub(crate) fn get_trait_bounds(generic: &syn::Generics) -> GenericTraitBoundVec { [INFO] [stdout] | ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 721 | pub(crate) fn get_trait_bounds(generic: &syn::Generics) -> GenericTraitBoundVec<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/typemap/ast/subst_map.rs:33:28 [INFO] [stdout] | [INFO] [stdout] 33 | pub(crate) fn as_slice(&self) -> &[TyParamsSubstItem] { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | | | [INFO] [stdout] | | | the same lifetime is hidden here [INFO] [stdout] | | the same lifetime is elided here [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 33 | pub(crate) fn as_slice(&self) -> &[TyParamsSubstItem<'_>] { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/typemap/typemap_macro.rs:193:9 [INFO] [stdout] | [INFO] [stdout] 193 | &self, [INFO] [stdout] | ^^^^^ the lifetime is elided here [INFO] [stdout] ... [INFO] [stdout] 197 | ) -> Option [INFO] [stdout] | ^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 197 | ) -> Option> [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 22.94s [INFO] running `Command { std: "docker" "inspect" "e0a3c52cc351239c4d70485b700a11f673f2efbae7bcc9983263a357c62a4200", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e0a3c52cc351239c4d70485b700a11f673f2efbae7bcc9983263a357c62a4200", kill_on_drop: false }` [INFO] [stdout] e0a3c52cc351239c4d70485b700a11f673f2efbae7bcc9983263a357c62a4200 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+b83b707f97d809763b7861afa7638871f3339a33" "test" "--frozen", kill_on_drop: false }` [INFO] [stdout] 574e99e04a9131280a34a660474e1f6cf2e1f403206349a6566cd104e3674216 [INFO] running `Command { std: "docker" "start" "-a" "574e99e04a9131280a34a660474e1f6cf2e1f403206349a6566cd104e3674216", kill_on_drop: false }` [INFO] [stderr] warning: method `name` is never used [INFO] [stderr] --> src/typemap/utils.rs:26:8 [INFO] [stderr] | [INFO] [stderr] 25 | pub(crate) trait ForeignTypeInfoT { [INFO] [stderr] | ---------------- method in this trait [INFO] [stderr] 26 | fn name(&self) -> &str; [INFO] [stderr] | ^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stderr] [INFO] [stderr] warning: method `output` is never used [INFO] [stderr] --> src/typemap/utils.rs:41:8 [INFO] [stderr] | [INFO] [stderr] 39 | pub(crate) trait ForeignMethodSignature { [INFO] [stderr] | ---------------------- method in this trait [INFO] [stderr] 40 | type FI: ForeignTypeInfoT; [INFO] [stderr] 41 | fn output(&self) -> &dyn ForeignTypeInfoT; [INFO] [stderr] | ^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: field `span` is never read [INFO] [stderr] --> src/types.rs:126:16 [INFO] [stderr] | [INFO] [stderr] 125 | pub(crate) struct FnDecl { [INFO] [stderr] | ------ field in this struct [INFO] [stderr] 126 | pub(crate) span: Span, [INFO] [stderr] | ^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `FnDecl` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stderr] [INFO] [stderr] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stderr] --> src/typemap/ast.rs:721:41 [INFO] [stderr] | [INFO] [stderr] 721 | pub(crate) fn get_trait_bounds(generic: &syn::Generics) -> GenericTraitBoundVec { [INFO] [stderr] | ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stderr] | | [INFO] [stderr] | the lifetime is elided here [INFO] [stderr] | [INFO] [stderr] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stderr] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stderr] help: use `'_` for type paths [INFO] [stderr] | [INFO] [stderr] 721 | pub(crate) fn get_trait_bounds(generic: &syn::Generics) -> GenericTraitBoundVec<'_> { [INFO] [stderr] | ++++ [INFO] [stderr] [INFO] [stderr] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stderr] --> src/typemap/ast/subst_map.rs:33:28 [INFO] [stderr] | [INFO] [stderr] 33 | pub(crate) fn as_slice(&self) -> &[TyParamsSubstItem] { [INFO] [stderr] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | | | | [INFO] [stderr] | | | the same lifetime is hidden here [INFO] [stderr] | | the same lifetime is elided here [INFO] [stderr] | the lifetime is elided here [INFO] [stderr] | [INFO] [stderr] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stderr] help: use `'_` for type paths [INFO] [stderr] | [INFO] [stderr] 33 | pub(crate) fn as_slice(&self) -> &[TyParamsSubstItem<'_>] { [INFO] [stderr] | ++++ [INFO] [stderr] [INFO] [stderr] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stderr] --> src/typemap/typemap_macro.rs:193:9 [INFO] [stderr] | [INFO] [stderr] 193 | &self, [INFO] [stderr] | ^^^^^ the lifetime is elided here [INFO] [stderr] ... [INFO] [stderr] 197 | ) -> Option [INFO] [stderr] | ^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stderr] | [INFO] [stderr] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stderr] help: use `'_` for type paths [INFO] [stderr] | [INFO] [stderr] 197 | ) -> Option> [INFO] [stderr] | ++++ [INFO] [stderr] [INFO] [stderr] warning: `rust_swig` (lib) generated 6 warnings (run `cargo fix --lib -p rust_swig` to apply 3 suggestions) [INFO] [stderr] warning: static `JAVA_LANG_STRING` is never used [INFO] [stderr] --> /opt/rustwide/target/debug/build/rust_swig-55443b2942b1a697/out/jni-include.rs:59:1059 [INFO] [stderr] | [INFO] [stderr] 59 | ...UE : jmethodID = :: std :: ptr :: null_mut () ; static mut JAVA_LANG_STRING : jclass = :: std :: ptr :: null_mut () ; static mut JAVA_... [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stderr] [INFO] [stderr] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stderr] --> /opt/rustwide/target/debug/build/rust_swig-55443b2942b1a697/out/jni-include.rs:1:7405 [INFO] [stderr] | [INFO] [stderr] 1 | ... : Vec :: new () , } } fn get_jni_env (& self) -> JniEnvHolder { assert ! (! self . java_vm . is_null ()) ; let mut env : * mut JNIEnv... [INFO] [stderr] | ^^^^^^ ^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stderr] | | [INFO] [stderr] | the lifetime is elided here [INFO] [stderr] | [INFO] [stderr] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stderr] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stderr] help: use `'_` for type paths [INFO] [stderr] | [INFO] [stderr] 1 | macro_rules ! foreign_typemap { ($ ($ tree : tt) *) => { } ; } # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] # [doc = "swig_ replace"] mod swig_foreign_types_map { } # [allow (dead_code)] mod internal_aliases { use super :: * ; pub type JStringOptStr = jstring ; pub type JOptionalInt = jobject ; pub type JInteger = jobject ; pub type JByte = jobject ; pub type JShort = jobject ; pub type JFloat = jobject ; pub type JDouble = jobject ; pub type JOptionalDouble = jobject ; pub type JLong = jobject ; pub type JOptionalLong = jobject ; # [repr (transparent)] pub struct JForeignObjectsArray < T : SwigForeignClass > { pub (crate) inner : jobjectArray , pub (crate) _marker : :: std :: marker :: PhantomData < T > , } pub type JStringPath = jstring ; } # [doc = " Default JNI_VERSION"] const SWIG_JNI_VERSION : jint = JNI_VERSION_1_6 as jint ; # [doc = " Marker for what to cache in JNI_OnLoad"] # [allow (unused_macros)] macro_rules ! swig_jni_find_class { ($ id : ident , $ path : expr) => { unsafe { $ id } } ; ($ id : ident , $ path : expr ,) => { unsafe { $ id } } ; } # [allow (unused_macros)] macro_rules ! swig_jni_get_method_id { ($ global_id : ident , $ class_id : ident , $ name : expr , $ sig : expr) => { unsafe { $ global_id } } ; ($ global_id : ident , $ class_id : ident , $ name : expr , $ sig : expr ,) => { unsafe { $ global_id } } ; } # [allow (unused_macros)] macro_rules ! swig_jni_get_static_method_id { ($ global_id : ident , $ class_id : ident , $ name : expr , $ sig : expr) => { unsafe { $ global_id } } ; ($ global_id : ident , $ class_id : ident , $ name : expr , $ sig : expr ,) => { unsafe { $ global_id } } ; } # [allow (unused_macros)] macro_rules ! swig_jni_get_field_id { ($ global_id : ident , $ class_id : ident , $ name : expr , $ sig : expr) => { unsafe { $ global_id } } ; ($ global_id : ident , $ class_id : ident , $ name : expr , $ sig : expr ,) => { unsafe { $ global_id } } ; } # [allow (unused_macros)] macro_rules ! swig_jni_get_static_field_id { ($ global_id : ident , $ class_id : ident , $ name : expr , $ sig : expr) => { unsafe { $ global_id } } ; ($ global_id : ident , $ class_id : ident , $ name : expr , $ sig : expr ,) => { unsafe { $ global_id } } ; } # [allow (dead_code)] # [doc = "swig_ replace"] trait SwigInto < T > { fn swig_into (self , env : * mut JNIEnv) -> T ; } # [allow (dead_code)] # [doc = "swig_ replace"] trait SwigFrom < T > { fn swig_from (_ : T , env : * mut JNIEnv) -> Self ; } # [allow (dead_code)] # [doc = "swig_ replace"] trait SwigDeref { type Target : ? Sized ; fn swig_deref (& self) -> & Self :: Target ; } # [allow (dead_code)] # [doc = "swig_ replace"] trait SwigDerefMut { type Target : ? Sized ; fn swig_deref_mut (& mut self) -> & mut Self :: Target ; } # [allow (unused_macros)] macro_rules ! swig_c_str { ($ lit : expr) => { concat ! ($ lit , "\0") . as_ptr () as * const :: std :: os :: raw :: c_char } ; } # [allow (unused_macros)] macro_rules ! swig_assert_eq_size { ($ x : ty , $ ($ xs : ty) ,+ $ (,) *) => { $ (let _ = :: std :: mem :: transmute ::<$ x , $ xs >;) + } ; } # [cfg (target_pointer_width = "32")] pub unsafe fn jlong_to_pointer < T > (val : jlong) -> * mut T { (val as u32) as * mut T } # [cfg (target_pointer_width = "64")] pub unsafe fn jlong_to_pointer < T > (val : jlong) -> * mut T { val as * mut T } foreign_typemap ! ((r_type) () ; (f_type) "void" ;) ; foreign_typemap ! ((r_type) jbyte ; (f_type) "byte" ;) ; foreign_typemap ! ((r_type) jshort ; (f_type) "short" ;) ; foreign_typemap ! ((r_type) jint ; (f_type) "int" ;) ; foreign_typemap ! ((r_type) jlong ; (f_type) "long" ;) ; foreign_typemap ! ((r_type) jfloat ; (f_type) "float" ;) ; foreign_typemap ! ((r_type) jdouble ; (f_type) "double" ;) ; foreign_typemap ! ((r_type) jstring ; (f_type , option = "NoNullAnnotations") "String" ; (f_type , option = "NullAnnotations") "@NonNull String" ;) ; # [allow (dead_code)] pub trait SwigForeignClass { type PointedType ; fn jni_class () -> jclass ; fn jni_class_pointer_field () -> jfieldID ; fn box_object (x : Self) -> jlong ; fn unbox_object (x : jlong) -> Self ; fn to_pointer (x : jlong) -> :: std :: ptr :: NonNull < Self :: PointedType > ; } # [allow (dead_code)] pub trait SwigForeignCLikeEnum { fn as_jint (& self) -> jint ; # [doc = " # Panics"] # [doc = " Panics on error"] fn from_jint (_ : jint) -> Self ; } impl < T : SwigForeignCLikeEnum > SwigFrom < T > for jint { fn swig_from (x : T , _ : * mut JNIEnv) -> jint { x . as_jint () } } impl < T : SwigForeignCLikeEnum > SwigFrom < jint > for T { fn swig_from (x : jint , _ : * mut JNIEnv) -> T { T :: from_jint (x) } } # [allow (dead_code)] pub struct JavaString { string : jstring , chars : * const :: std :: os :: raw :: c_char , env : * mut JNIEnv , } # [allow (dead_code)] impl JavaString { pub fn new (env : * mut JNIEnv , js : jstring) -> JavaString { let chars = if ! js . is_null () { unsafe { (* * env) . GetStringUTFChars . unwrap () (env , js , :: std :: ptr :: null_mut ()) } } else { :: std :: ptr :: null_mut () } ; JavaString { string : js , chars : chars , env : env , } } pub fn to_str (& self) -> & str { if ! self . chars . is_null () { let s = unsafe { :: std :: ffi :: CStr :: from_ptr (self . chars) } ; s . to_str () . unwrap () } else { "" } } } # [allow (dead_code)] impl Drop for JavaString { fn drop (& mut self) { assert ! (! self . env . is_null ()) ; if ! self . string . is_null () { assert ! (! self . chars . is_null ()) ; unsafe { (* * self . env) . ReleaseStringUTFChars . unwrap () (self . env , self . string , self . chars) } ; self . env = :: std :: ptr :: null_mut () ; self . chars = :: std :: ptr :: null_mut () ; } } } impl SwigDeref for JavaString { type Target = str ; fn swig_deref (& self) -> & Self :: Target { self . to_str () } } # [allow (dead_code)] struct JavaCallback { java_vm : * mut JavaVM , this : jobject , methods : Vec < jmethodID > , } # [doc = " According to JNI spec it should be safe to"] # [doc = " pass pointer to JavaVm and jobject (global) across threads"] unsafe impl Send for JavaCallback { } # [allow (dead_code)] struct JniEnvHolder < 'a > { env : Option < * mut JNIEnv > , callback : & 'a JavaCallback , need_detach : bool , } # [allow (dead_code)] impl < 'a > Drop for JniEnvHolder < 'a > { fn drop (& mut self) { if self . need_detach { let res = unsafe { (* * self . callback . java_vm) . DetachCurrentThread . unwrap () (self . callback . java_vm) } ; if res != 0 { log :: error ! ("JniEnvHolder: DetachCurrentThread failed: {}" , res) ; } } } } # [allow (dead_code)] impl JavaCallback { fn new (obj : jobject , env : * mut JNIEnv) -> JavaCallback { let mut java_vm : * mut JavaVM = :: std :: ptr :: null_mut () ; let ret = unsafe { (* * env) . GetJavaVM . unwrap () (env , & mut java_vm) } ; assert_eq ! (0 , ret , "GetJavaVm failed") ; let global_obj = unsafe { (* * env) . NewGlobalRef . unwrap () (env , obj) } ; assert ! (! global_obj . is_null ()) ; JavaCallback { java_vm , this : global_obj , methods : Vec :: new () , } } fn get_jni_env (& self) -> JniEnvHolder<'_> { assert ! (! self . java_vm . is_null ()) ; let mut env : * mut JNIEnv = :: std :: ptr :: null_mut () ; let res = unsafe { (* * self . java_vm) . GetEnv . unwrap () (self . java_vm , (& mut env) as * mut * mut JNIEnv as * mut * mut :: std :: os :: raw :: c_void , SWIG_JNI_VERSION ,) } ; if res == (JNI_OK as jint) { return JniEnvHolder { env : Some (env) , callback : self , need_detach : false , } ; } if res != (JNI_EDETACHED as jint) { panic ! ("get_jni_env: GetEnv return error `{}`" , res) ; } trait ConvertPtr < T > { fn convert_ptr (self) -> T ; } impl ConvertPtr < * mut * mut :: std :: os :: raw :: c_void > for * mut * mut JNIEnv { fn convert_ptr (self) -> * mut * mut :: std :: os :: raw :: c_void { self as * mut * mut :: std :: os :: raw :: c_void } } impl ConvertPtr < * mut * mut JNIEnv > for * mut * mut JNIEnv { fn convert_ptr (self) -> * mut * mut JNIEnv { self } } let res = unsafe { (* * self . java_vm) . AttachCurrentThread . unwrap () (self . java_vm , (& mut env as * mut * mut JNIEnv) . convert_ptr () , :: std :: ptr :: null_mut () ,) } ; if res != 0 { log :: error ! ("JavaCallback::get_jnienv: AttachCurrentThread failed: {}" , res) ; JniEnvHolder { env : None , callback : self , need_detach : false , } } else { assert ! (! env . is_null ()) ; JniEnvHolder { env : Some (env) , callback : self , need_detach : true , } } } } # [allow (dead_code)] impl Drop for JavaCallback { fn drop (& mut self) { let env = self . get_jni_env () ; if let Some (env) = env . env { assert ! (! env . is_null ()) ; unsafe { (* * env) . DeleteGlobalRef . unwrap () (env , self . this) } ; } else { log :: error ! ("JavaCallback::drop failed, can not get JNIEnv") ; } } } # [allow (dead_code)] fn jni_throw (env : * mut JNIEnv , ex_class : jclass , message : & str) { let c_message = :: std :: ffi :: CString :: new (message) . unwrap () ; let res = unsafe { (* * env) . ThrowNew . unwrap () (env , ex_class , c_message . as_ptr ()) } ; if res != 0 { log :: error ! ("JNI ThrowNew({}) failed for class {:?} failed" , message , ex_class) ; } } # [allow (dead_code)] fn jni_throw_exception (env : * mut JNIEnv , message : & str) { let exception_class = swig_jni_find_class ! (JAVA_LANG_EXCEPTION , "java/lang/Exception") ; jni_throw (env , exception_class , message) } # [allow (dead_code)] fn object_to_jobject < T : SwigForeignClass > (env : * mut JNIEnv , obj : T) -> jobject { let jcls = < T > :: jni_class () ; assert ! (! jcls . is_null ()) ; let field_id = < T > :: jni_class_pointer_field () ; assert ! (! field_id . is_null ()) ; let jobj : jobject = unsafe { (* * env) . AllocObject . unwrap () (env , jcls) } ; assert ! (! jobj . is_null () , "object_to_jobject: AllocObject failed") ; let ret : jlong = < T > :: box_object (obj) ; unsafe { (* * env) . SetLongField . unwrap () (env , jobj , field_id , ret) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("object_to_jobject: Can not set mNativeObj field: catch exception") ; } } jobj } foreign_typemap ! (($ p : r_type) < T : SwigForeignClass > Vec < T > => internal_aliases :: JForeignObjectsArray < T > { $ out = vec_of_objects_to_jobject_array (env , $ p) ; } ; ($ p : f_type , option = "NoNullAnnotations") => "swig_f_type!(T) []" ; ($ p : f_type , option = "NullAnnotations") => "@NonNull swig_f_type!(T, NoNullAnnotations) []" ;) ; # [allow (dead_code)] fn jobject_array_to_vec_of_objects < T : SwigForeignClass + Clone > (env : * mut JNIEnv , arr : internal_aliases :: JForeignObjectsArray < T > ,) -> Vec < T > { let field_id = < T > :: jni_class_pointer_field () ; assert ! (! field_id . is_null ()) ; let length = unsafe { (* * env) . GetArrayLength . unwrap () (env , arr . inner) } ; let len = < usize as :: std :: convert :: TryFrom < jsize > > :: try_from (length) . expect ("invalid jsize, in jsize => usize conversation") ; let mut result = Vec :: with_capacity (len) ; for i in 0 .. length { let native : & mut T = unsafe { let obj = (* * env) . GetObjectArrayElement . unwrap () (env , arr . inner , i) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("Failed to retrieve element {} from this `jobjectArray'" , i) ; } let ptr = (* * env) . GetLongField . unwrap () (env , obj , field_id) ; let native = (jlong_to_pointer (ptr) as * mut T) . as_mut () . unwrap () ; (* * env) . DeleteLocalRef . unwrap () (env , obj) ; native } ; result . push (native . clone ()) ; } result } foreign_typemap ! (($ p : r_type) < T : SwigForeignClass + Clone > Vec < T > <= internal_aliases :: JForeignObjectsArray < T > { $ out = jobject_array_to_vec_of_objects (env , $ p) ; } ; ($ p : f_type , option = "NoNullAnnotations") <= "swig_f_type!(T) []" ; ($ p : f_type , option = "NullAnnotations") <= "@NonNull swig_f_type!(T, NoNullAnnotations) []" ;) ; # [allow (dead_code)] fn vec_of_objects_to_jobject_array < T : SwigForeignClass > (env : * mut JNIEnv , mut arr : Vec < T > ,) -> internal_aliases :: JForeignObjectsArray < T > { let jcls : jclass = < T > :: jni_class () ; assert ! (! jcls . is_null ()) ; let arr_len = < jsize as :: std :: convert :: TryFrom < usize > > :: try_from (arr . len ()) . expect ("invalid usize, in usize => to jsize conversation") ; let obj_arr : jobjectArray = unsafe { (* * env) . NewObjectArray . unwrap () (env , arr_len , jcls , :: std :: ptr :: null_mut ()) } ; assert ! (! obj_arr . is_null ()) ; let field_id = < T > :: jni_class_pointer_field () ; assert ! (! field_id . is_null ()) ; for (i , r_obj) in arr . drain (..) . enumerate () { let jobj : jobject = unsafe { (* * env) . AllocObject . unwrap () (env , jcls) } ; assert ! (! jobj . is_null ()) ; let r_obj : jlong = < T > :: box_object (r_obj) ; unsafe { (* * env) . SetLongField . unwrap () (env , jobj , field_id , r_obj) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("Can not mNativeObj field: catch exception") ; } (* * env) . SetObjectArrayElement . unwrap () (env , obj_arr , i as jsize , jobj) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("SetObjectArrayElement({}) failed" , i) ; } (* * env) . DeleteLocalRef . unwrap () (env , jobj) ; } } internal_aliases :: JForeignObjectsArray { inner : obj_arr , _marker : :: std :: marker :: PhantomData , } } # [allow (dead_code)] trait JniInvalidValue { fn jni_invalid_value () -> Self ; } impl < T > JniInvalidValue for * const T { fn jni_invalid_value () -> Self { :: std :: ptr :: null () } } impl < T > JniInvalidValue for * mut T { fn jni_invalid_value () -> Self { :: std :: ptr :: null_mut () } } impl JniInvalidValue for () { fn jni_invalid_value () { } } impl < T : SwigForeignClass > JniInvalidValue for internal_aliases :: JForeignObjectsArray < T > { fn jni_invalid_value () -> Self { Self { inner : :: std :: ptr :: null_mut () , _marker : :: std :: marker :: PhantomData , } } } macro_rules ! impl_jni_jni_invalid_value { ($ ($ type : ty) *) => ($ (impl JniInvalidValue for $ type { fn jni_invalid_value () -> Self { <$ type >:: default () } }) *) } impl_jni_jni_invalid_value ! { jbyte jshort jint jlong jfloat jdouble } foreign_typemap ! (($ p : r_type) < T > Result < T , & str > => swig_i_type ! (T) { $ out = match $ p { Ok (x) => { swig_from_rust_to_i_type ! (T , x , ret) ret } Err (msg) => { jni_throw_exception (env , msg) ; return < swig_i_type ! (T) >:: jni_invalid_value () ; } } ; } ; ($ p : f_type , unique_prefix = "/*Result*/") => "/*Result*/swig_f_type!(T)" "swig_foreign_from_i_type!(T, $p)" ;) ; foreign_typemap ! (($ p : r_type) < T > Result < T , String > => swig_i_type ! (T) { $ out = match $ p { Ok (x) => { swig_from_rust_to_i_type ! (T , x , ret) ret } Err (msg) => { jni_throw_exception (env , & msg) ; return < swig_i_type ! (T) >:: jni_invalid_value () ; } } ; } ; ($ p : f_type , unique_prefix = "/*Result*/") => "/*Result*/swig_f_type!(T)" "swig_foreign_from_i_type!(T, $p)" ;) ; foreign_typemap ! (($ p : r_type) bool => jboolean { $ out = if $ p { 1 as jboolean } else { 0 as jboolean } ; } ; ($ p : f_type) => "boolean" ; ($ p : r_type) bool <= jboolean { $ out = $ p != 0 ; } ; ($ p : f_type) <= "boolean" ;) ; foreign_typemap ! (($ p : r_type) SystemTime => jlong { let since_unix_epoch = $ p . duration_since (:: std :: time :: UNIX_EPOCH) . expect ("SystemTime to Unix time conv. error") ; $ out = < i64 as :: std :: convert :: TryFrom < u64 >>:: try_from (since_unix_epoch . as_secs () * 1_000 + u64 :: from (since_unix_epoch . subsec_millis ()) ,) . expect ("SystemTime: milleseconds u64 to i64 convert error") ; } ; ($ p : f_type , option = "NoNullAnnotations") => "java.util.Date" "$out = new java.util.Date($p);" ; ($ p : f_type , option = "NullAnnotations") => "@NonNull java.util.Date" "$out = new java.util.Date($p);" ;) ; foreign_typemap ! (($ p : r_type) jbyte => i8 { $ out = $ p ; } ; ($ p : r_type) jbyte <= i8 { $ out = $ p ; } ;) ; foreign_typemap ! (($ p : r_type) u8 => jshort { $ out = jshort :: from ($ p) ; } ;) ; foreign_typemap ! (($ p : r_type) u8 <= jshort { $ out = < u8 as :: std :: convert :: TryFrom < jshort >>:: try_from ($ p) . expect ("invalid jshort, in jshort => u8 conversation") ; } ;) ; foreign_typemap ! (($ p : r_type) i16 => jshort { $ out = $ p ; } ; ($ p : r_type) i16 <= jshort { $ out = $ p ; } ;) ; foreign_typemap ! (($ p : r_type) u16 => jint { $ out = jint :: from ($ p) ; } ; ($ p : r_type) u16 <= jint { $ out = < u16 as :: std :: convert :: TryFrom < jint >>:: try_from ($ p) . expect ("invalid jint, in jint => u16 conversation") ; } ;) ; foreign_typemap ! (($ p : r_type) jint => i32 { $ out = $ p ; } ; ($ p : r_type) jint <= i32 { $ out = $ p ; } ;) ; foreign_typemap ! (($ p : r_type) u32 => jlong { $ out = jlong :: from ($ p) ; } ; ($ p : r_type) u32 <= jlong { $ out = < u32 as :: std :: convert :: TryFrom < jlong >>:: try_from ($ p) . expect ("invalid jlong, in jlong => u32 conversation") ; } ;) ; foreign_typemap ! (($ p : r_type) i64 => jlong { $ out = $ p ; } ; ($ p : r_type) i64 <= jlong { $ out = $ p ; } ;) ; foreign_typemap ! (($ p : r_type) u64 => jlong { $ out = < jlong as :: std :: convert :: TryFrom < u64 >>:: try_from ($ p) . expect ("invalid u64, in u64 => jlong conversation") ; } ; ($ p : r_type) u64 <= jlong { $ out = < u64 as :: std :: convert :: TryFrom < jlong >>:: try_from ($ p) . expect ("invalid jlong, in jlong => u64 conversation") ; } ;) ; # [allow (dead_code)] pub fn u64_to_jlong_checked (x : u64) -> jlong { < jlong as :: std :: convert :: TryFrom < u64 > > :: try_from (x) . expect ("invalid u64, in u64 => jlong conversation") } foreign_typemap ! (($ p : r_type) f32 => jfloat { $ out = $ p ; } ; ($ p : r_type) f32 <= jfloat { $ out = $ p ; } ;) ; foreign_typemap ! (($ p : r_type) f64 => jdouble { $ out = $ p ; } ; ($ p : r_type) f64 <= jdouble { $ out = $ p ; } ;) ; impl < 'a > SwigFrom < & 'a str > for jstring { fn swig_from (x : & 'a str , env : * mut JNIEnv) -> Self { let x = :: std :: ffi :: CString :: new (x) . unwrap () ; unsafe { (* * env) . NewStringUTF . unwrap () (env , x . as_ptr ()) } } } impl SwigInto < JavaString > for jstring { fn swig_into (self , env : * mut JNIEnv) -> JavaString { JavaString :: new (env , self) } } impl SwigFrom < String > for jstring { fn swig_from (x : String , env : * mut JNIEnv) -> Self { from_std_string_jstring (x , env) } } # [allow (dead_code)] fn from_std_string_jstring (x : String , env : * mut JNIEnv) -> jstring { let x = x . into_bytes () ; unsafe { let x = :: std :: ffi :: CString :: from_vec_unchecked (x) ; (* * env) . NewStringUTF . unwrap () (env , x . as_ptr ()) } } foreign_typemap ! (($ p : r_type) usize <= jlong { $ out = < usize as :: std :: convert :: TryFrom < jlong >>:: try_from ($ p) . expect ("invalid jlong, in jlong => usize conversation") ; } ;) ; foreign_typemap ! (($ p : r_type) & Path <= internal_aliases :: JStringPath { let jstr = JavaString :: new (env , $ p) ; $ out = Path :: new (jstr . to_str ()) ; } ; ($ p : f_type , option = "NoNullAnnotations" , unique_prefix = "/*Path*/") <= "/*Path*/String" ; ($ p : f_type , option = "NullAnnotations" , unique_prefix = "/*Path*/") <= "/*Path*/@NonNull String" ;) ; # [doc = "swig_ replace"] impl SwigInto < jobjectArray > for Vec < String > { fn swig_into (mut self , env : * mut JNIEnv) -> jobjectArray { let jcls : jclass = swig_jni_find_class ! (JAVA_LANG_STRING , "java/lang/String") ; assert ! (! jcls . is_null ()) ; let obj_arr : jobjectArray = unsafe { (* * env) . NewObjectArray . unwrap () (env , self . len () as jsize , jcls , :: std :: ptr :: null_mut ()) } ; assert ! (! obj_arr . is_null ()) ; for (i , r_str) in self . drain (..) . enumerate () { let jstr : jstring = jstring :: swig_from (r_str , env) ; assert ! (! jstr . is_null ()) ; unsafe { (* * env) . SetObjectArrayElement . unwrap () (env , obj_arr , i as jsize , jstr) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("SetObjectArrayElement({}) failed" , i) ; } (* * env) . DeleteLocalRef . unwrap () (env , jstr) ; } } obj_arr } } macro_rules ! define_array_handling_code { ($ ([jni_arr_type = $ jni_arr_type : ident , rust_arr_wrapper = $ rust_arr_wrapper : ident , jni_get_array_elements = $ jni_get_array_elements : ident , jni_elem_type = $ jni_elem_type : ident , rust_elem_type = $ rust_elem_type : ident , jni_release_array_elements = $ jni_release_array_elements : ident , jni_new_array = $ jni_new_array : ident , jni_set_array_region = $ jni_set_array_region : ident]) ,*) => { $ (# [allow (dead_code)] struct $ rust_arr_wrapper { array : $ jni_arr_type , data : * mut $ jni_elem_type , env : * mut JNIEnv , } # [allow (dead_code)] impl $ rust_arr_wrapper { fn new (env : * mut JNIEnv , array : $ jni_arr_type) -> $ rust_arr_wrapper { assert ! (! array . is_null ()) ; let data = unsafe { (** env) .$ jni_get_array_elements . unwrap () (env , array , :: std :: ptr :: null_mut ()) } ; $ rust_arr_wrapper { array , data , env } } fn to_slice (& self) -> & [$ rust_elem_type] { unsafe { let len : jsize = (** self . env) . GetArrayLength . unwrap () (self . env , self . array) ; assert ! ((len as u64) <= (usize :: max_value () as u64)) ; :: std :: slice :: from_raw_parts (self . data , len as usize) } } fn from_slice_to_raw (arr : & [$ rust_elem_type] , env : * mut JNIEnv) -> $ jni_arr_type { assert ! ((arr . len () as u64) <= (jsize :: max_value () as u64)) ; let jarr : $ jni_arr_type = unsafe { (** env) .$ jni_new_array . unwrap () (env , arr . len () as jsize) } ; assert ! (! jarr . is_null ()) ; unsafe { (** env) .$ jni_set_array_region . unwrap () (env , jarr , 0 , arr . len () as jsize , arr . as_ptr ()) ; if (** env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("{}:{} {} failed" , file ! () , line ! () , stringify ! ($ jni_set_array_region)) ; } } jarr } } # [allow (dead_code)] impl Drop for $ rust_arr_wrapper { fn drop (& mut self) { assert ! (! self . env . is_null ()) ; assert ! (! self . array . is_null ()) ; unsafe { (** self . env) .$ jni_release_array_elements . unwrap () (self . env , self . array , self . data , JNI_ABORT as jint ,) } ; } }) * } } define_array_handling_code ! ([jni_arr_type = jbyteArray , rust_arr_wrapper = JavaByteArray , jni_get_array_elements = GetByteArrayElements , jni_elem_type = jbyte , rust_elem_type = i8 , jni_release_array_elements = ReleaseByteArrayElements , jni_new_array = NewByteArray , jni_set_array_region = SetByteArrayRegion] , [jni_arr_type = jshortArray , rust_arr_wrapper = JavaShortArray , jni_get_array_elements = GetShortArrayElements , jni_elem_type = jshort , rust_elem_type = i16 , jni_release_array_elements = ReleaseShortArrayElements , jni_new_array = NewShortArray , jni_set_array_region = SetShortArrayRegion] , [jni_arr_type = jintArray , rust_arr_wrapper = JavaIntArray , jni_get_array_elements = GetIntArrayElements , jni_elem_type = jint , rust_elem_type = i32 , jni_release_array_elements = ReleaseIntArrayElements , jni_new_array = NewIntArray , jni_set_array_region = SetIntArrayRegion] , [jni_arr_type = jlongArray , rust_arr_wrapper = JavaLongArray , jni_get_array_elements = GetLongArrayElements , jni_elem_type = jlong , rust_elem_type = i64 , jni_release_array_elements = ReleaseLongArrayElements , jni_new_array = NewLongArray , jni_set_array_region = SetLongArrayRegion] , [jni_arr_type = jfloatArray , rust_arr_wrapper = JavaFloatArray , jni_get_array_elements = GetFloatArrayElements , jni_elem_type = jfloat , rust_elem_type = f32 , jni_release_array_elements = ReleaseFloatArrayElements , jni_new_array = NewFloatArray , jni_set_array_region = SetFloatArrayRegion] , [jni_arr_type = jdoubleArray , rust_arr_wrapper = JavaDoubleArray , jni_get_array_elements = GetDoubleArrayElements , jni_elem_type = jdouble , rust_elem_type = f64 , jni_release_array_elements = ReleaseDoubleArrayElements , jni_new_array = NewDoubleArray , jni_set_array_region = SetDoubleArrayRegion]) ; impl < T > SwigDeref for Vec < T > { type Target = [T] ; fn swig_deref (& self) -> & Self :: Target { & * self } } impl SwigDeref for JavaIntArray { type Target = [i32] ; fn swig_deref (& self) -> & Self :: Target { self . to_slice () } } impl SwigFrom < jintArray > for JavaIntArray { fn swig_from (x : jintArray , env : * mut JNIEnv) -> Self { JavaIntArray :: new (env , x) } } impl < 'a > SwigInto < jintArray > for & 'a [i32] { fn swig_into (self , env : * mut JNIEnv) -> jintArray { JavaIntArray :: from_slice_to_raw (self , env) } } impl SwigDeref for JavaLongArray { type Target = [i64] ; fn swig_deref (& self) -> & Self :: Target { self . to_slice () } } impl SwigFrom < jlongArray > for JavaLongArray { fn swig_from (x : jlongArray , env : * mut JNIEnv) -> Self { JavaLongArray :: new (env , x) } } impl < 'a > SwigInto < jlongArray > for & 'a [i64] { fn swig_into (self , env : * mut JNIEnv) -> jlongArray { JavaLongArray :: from_slice_to_raw (self , env) } } impl SwigDeref for JavaFloatArray { type Target = [f32] ; fn swig_deref (& self) -> & Self :: Target { self . to_slice () } } impl SwigFrom < jfloatArray > for JavaFloatArray { fn swig_from (x : jfloatArray , env : * mut JNIEnv) -> Self { JavaFloatArray :: new (env , x) } } impl < 'a > SwigInto < jfloatArray > for & 'a [f32] { fn swig_into (self , env : * mut JNIEnv) -> jfloatArray { JavaFloatArray :: from_slice_to_raw (self , env) } } impl SwigDeref for JavaDoubleArray { type Target = [f64] ; fn swig_deref (& self) -> & Self :: Target { self . to_slice () } } impl SwigFrom < jdoubleArray > for JavaDoubleArray { fn swig_from (x : jdoubleArray , env : * mut JNIEnv) -> Self { JavaDoubleArray :: new (env , x) } } impl < 'a > SwigInto < jdoubleArray > for & 'a [f64] { fn swig_into (self , env : * mut JNIEnv) -> jdoubleArray { JavaDoubleArray :: from_slice_to_raw (self , env) } } impl SwigDeref for JavaByteArray { type Target = [i8] ; fn swig_deref (& self) -> & Self :: Target { self . to_slice () } } impl SwigFrom < jbyteArray > for JavaByteArray { fn swig_from (x : jbyteArray , env : * mut JNIEnv) -> Self { JavaByteArray :: new (env , x) } } impl < 'a > SwigInto < jbyteArray > for & 'a [i8] { fn swig_into (self , env : * mut JNIEnv) -> jbyteArray { JavaByteArray :: from_slice_to_raw (self , env) } } impl SwigDeref for JavaShortArray { type Target = [i16] ; fn swig_deref (& self) -> & Self :: Target { self . to_slice () } } impl SwigFrom < jshortArray > for JavaShortArray { fn swig_from (x : jshortArray , env : * mut JNIEnv) -> Self { JavaShortArray :: new (env , x) } } impl < 'a > SwigInto < jshortArray > for & 'a [i16] { fn swig_into (self , env : * mut JNIEnv) -> jshortArray { JavaShortArray :: from_slice_to_raw (self , env) } } impl SwigDeref for String { type Target = str ; fn swig_deref (& self) -> & str { self } } impl < T > SwigDeref for Arc < Mutex < T > > { type Target = Mutex < T > ; fn swig_deref (& self) -> & Mutex < T > { self } } impl < 'a , T > SwigFrom < & 'a Mutex < T > > for MutexGuard < 'a , T > { fn swig_from (m : & 'a Mutex < T > , _ : * mut JNIEnv) -> MutexGuard < 'a , T > { m . lock () . unwrap () } } impl < 'a , T > SwigDeref for MutexGuard < 'a , T > { type Target = T ; fn swig_deref (& self) -> & T { self } } impl < 'a , T > SwigDerefMut for MutexGuard < 'a , T > { type Target = T ; fn swig_deref_mut (& mut self) -> & mut T { self } } impl < T > SwigDeref for Rc < T > { type Target = T ; fn swig_deref (& self) -> & T { self } } impl < 'a , T > SwigDeref for & 'a Rc < T > { type Target = T ; fn swig_deref (& self) -> & T { self } } impl < 'a , T > SwigFrom < & 'a RefCell < T > > for Ref < 'a , T > { fn swig_from (m : & 'a RefCell < T > , _ : * mut JNIEnv) -> Ref < 'a , T > { m . borrow () } } impl < 'a , T > SwigFrom < & 'a RefCell < T > > for RefMut < 'a , T > { fn swig_from (m : & 'a RefCell < T > , _ : * mut JNIEnv) -> RefMut < 'a , T > { m . borrow_mut () } } impl < 'a , T > SwigDeref for Ref < 'a , T > { type Target = T ; fn swig_deref (& self) -> & T { self } } impl < 'a , T > SwigDerefMut for RefMut < 'a , T > { type Target = T ; fn swig_deref_mut (& mut self) -> & mut T { self } } impl < T : SwigForeignClass > SwigDeref for T { type Target = T ; fn swig_deref (& self) -> & T { self } } impl < T : SwigForeignClass > SwigDerefMut for T { type Target = T ; fn swig_deref_mut (& mut self) -> & mut T { self } } # [cfg (target_pointer_width = "32")] impl SwigFrom < isize > for jint { fn swig_from (x : isize , _ : * mut JNIEnv) -> Self { x as jint } } # [cfg (target_pointer_width = "64")] impl SwigFrom < isize > for jlong { fn swig_from (x : isize , _ : * mut JNIEnv) -> Self { x as jlong } } # [cfg (target_pointer_width = "32")] impl SwigFrom < usize > for jlong { fn swig_from (x : usize , _ : * mut JNIEnv) -> Self { x as jlong } } # [cfg (target_pointer_width = "64")] impl SwigFrom < usize > for jlong { fn swig_from (x : usize , _ : * mut JNIEnv) -> Self { let x = x as u64 ; u64_to_jlong_checked (x) } } impl < 'a > SwigInto < String > for & 'a str { fn swig_into (self , _ : * mut JNIEnv) -> String { self . into () } } # [allow (dead_code)] fn to_java_util_optional_double (env : * mut JNIEnv , x : Option < f64 > ,) -> internal_aliases :: JOptionalDouble { let class : jclass = swig_jni_find_class ! (JAVA_UTIL_OPTIONAL_DOUBLE , "java/util/OptionalDouble") ; assert ! (! class . is_null () ,) ; match x { Some (val) => { let of_m : jmethodID = swig_jni_get_static_method_id ! (JAVA_UTIL_OPTIONAL_DOUBLE_OF , JAVA_UTIL_OPTIONAL_DOUBLE , "of" , "(D)Ljava/util/OptionalDouble;") ; assert ! (! of_m . is_null ()) ; let ret = unsafe { let ret = (* * env) . CallStaticObjectMethod . unwrap () (env , class , of_m , val) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("OptionalDouble.of failed: catch exception") ; } ret } ; assert ! (! ret . is_null ()) ; ret } None => { let empty_m : jmethodID = swig_jni_get_static_method_id ! (JAVA_UTIL_OPTIONAL_DOUBLE_EMPTY , JAVA_UTIL_OPTIONAL_DOUBLE , "empty" , "()Ljava/util/OptionalDouble;") ; assert ! (! empty_m . is_null ()) ; let ret = unsafe { let ret = (* * env) . CallStaticObjectMethod . unwrap () (env , class , empty_m) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("OptionalDouble.empty failed: catch exception") ; } ret } ; assert ! (! ret . is_null ()) ; ret } } } # [allow (dead_code)] fn from_java_lang_double_to_rust (env : * mut JNIEnv , x : internal_aliases :: JDouble) -> Option < f64 > { if x . is_null () { None } else { let x = unsafe { (* * env) . NewLocalRef . unwrap () (env , x) } ; if x . is_null () { None } else { let class : jclass = swig_jni_find_class ! (JAVA_LANG_DOUBLE , "java/lang/Double") ; assert ! (! class . is_null ()) ; let double_value_m : jmethodID = swig_jni_get_method_id ! (JAVA_LANG_DOUBLE_DOUBLE_VALUE_METHOD , JAVA_LANG_DOUBLE , "doubleValue" , "()D" ,) ; assert ! (! double_value_m . is_null () ,) ; let ret : f64 = unsafe { let ret = (* * env) . CallDoubleMethod . unwrap () (env , x , double_value_m) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("Double.doubleValue failed: catch exception") ; } (* * env) . DeleteLocalRef . unwrap () (env , x) ; ret } ; Some (ret) } } } foreign_typemap ! (($ p : r_type) Option < f64 > <= internal_aliases :: JDouble { $ out = from_java_lang_double_to_rust (env , $ p) ; } ; (f_type , option = "NoNullAnnotations") <= "Double" ; (f_type , option = "NullAnnotations") <= "@Nullable Double" ;) ; foreign_typemap ! (($ p : r_type) Option < f64 > => internal_aliases :: JOptionalDouble { $ out = to_java_util_optional_double (env , $ p) ; } ; (f_type , option = "NoNullAnnotations") => "java.util.OptionalDouble" ; (f_type , option = "NullAnnotations") => "@NonNull java.util.OptionalDouble" ;) ; # [allow (dead_code)] fn from_java_lang_float_to_rust (env : * mut JNIEnv , x : internal_aliases :: JFloat) -> Option < f32 > { if x . is_null () { None } else { let x = unsafe { (* * env) . NewLocalRef . unwrap () (env , x) } ; if x . is_null () { None } else { let class : jclass = swig_jni_find_class ! (JAVA_LANG_FLOAT , "java/lang/Float") ; assert ! (! class . is_null ()) ; let float_value_m : jmethodID = swig_jni_get_method_id ! (JAVA_LANG_FLOAT_FLOAT_VALUE , JAVA_LANG_FLOAT , "floatValue" , "()F") ; assert ! (! float_value_m . is_null ()) ; let ret : f32 = unsafe { let ret = (* * env) . CallFloatMethod . unwrap () (env , x , float_value_m) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("Float.floatValue failed: catch exception") ; } (* * env) . DeleteLocalRef . unwrap () (env , x) ; ret } ; Some (ret) } } } foreign_typemap ! (($ p : r_type) Option < f32 > <= internal_aliases :: JFloat { $ out = from_java_lang_float_to_rust (env , $ p) ; } ; (f_type , option = "NoNullAnnotations") <= "Float" ; (f_type , option = "NullAnnotations") <= "@Nullable Float" ;) ; foreign_typemap ! (($ p : r_type) Option < f32 > => internal_aliases :: JOptionalDouble { $ out = to_java_util_optional_double (env , $ p . map (f64 :: from)) ; } ;) ; # [allow (dead_code)] fn to_java_util_optional_long (env : * mut JNIEnv , x : Option < i64 >) -> internal_aliases :: JOptionalLong { let class : jclass = swig_jni_find_class ! (JAVA_UTIL_OPTIONAL_LONG , "java/util/OptionalLong") ; assert ! (! class . is_null () ,) ; match x { Some (val) => { let of_m : jmethodID = swig_jni_get_static_method_id ! (JAVA_UTIL_OPTIONAL_LONG_OF , JAVA_UTIL_OPTIONAL_LONG , "of" , "(J)Ljava/util/OptionalLong;") ; assert ! (! of_m . is_null ()) ; let ret = unsafe { let ret = (* * env) . CallStaticObjectMethod . unwrap () (env , class , of_m , val) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("OptionalLong.of failed: catch exception") ; } ret } ; assert ! (! ret . is_null ()) ; ret } None => { let empty_m : jmethodID = swig_jni_get_static_method_id ! (JAVA_UTIL_OPTIONAL_LONG_EMPTY , JAVA_UTIL_OPTIONAL_LONG , "empty" , "()Ljava/util/OptionalLong;" ,) ; assert ! (! empty_m . is_null ()) ; let ret = unsafe { let ret = (* * env) . CallStaticObjectMethod . unwrap () (env , class , empty_m) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("OptionalLong.empty failed: catch exception") ; } ret } ; assert ! (! ret . is_null ()) ; ret } } } # [allow (dead_code)] fn from_java_lang_long_to_rust (env : * mut JNIEnv , x : internal_aliases :: JLong) -> Option < i64 > { if x . is_null () { None } else { let x = unsafe { (* * env) . NewLocalRef . unwrap () (env , x) } ; if x . is_null () { None } else { let class : jclass = swig_jni_find_class ! (JAVA_LANG_LONG , "java/lang/Long") ; assert ! (! class . is_null ()) ; let long_value_m : jmethodID = swig_jni_get_method_id ! (JAVA_LANG_LONG_LONG_VALUE , JAVA_LANG_LONG , "longValue" , "()J") ; assert ! (! long_value_m . is_null ()) ; let ret : i64 = unsafe { let ret = (* * env) . CallLongMethod . unwrap () (env , x , long_value_m) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("Long.longValue failed: catch exception") ; } (* * env) . DeleteLocalRef . unwrap () (env , x) ; ret } ; Some (ret) } } } foreign_typemap ! (($ p : r_type) Option < i64 > <= internal_aliases :: JLong { $ out = from_java_lang_long_to_rust (env , $ p) ; } ; (f_type , option = "NoNullAnnotations") <= "Long" ; (f_type , option = "NullAnnotations") <= "@Nullable Long" ;) ; foreign_typemap ! (($ p : r_type) Option < i64 > => internal_aliases :: JOptionalLong { $ out = to_java_util_optional_long (env , $ p) ; } ; (f_type , option = "NoNullAnnotations") => "java.util.OptionalLong" ; (f_type , option = "NullAnnotations") => "@NonNull java.util.OptionalLong" ;) ; # [allow (dead_code)] fn from_java_lang_int_to_rust (env : * mut JNIEnv , x : internal_aliases :: JInteger) -> Option < i32 > { if x . is_null () { None } else { let x = unsafe { (* * env) . NewLocalRef . unwrap () (env , x) } ; if x . is_null () { None } else { let class : jclass = swig_jni_find_class ! (JAVA_LANG_INTEGER , "java/lang/Integer") ; assert ! (! class . is_null ()) ; let int_value_m : jmethodID = swig_jni_get_method_id ! (JAVA_LANG_INTEGER_INT_VALUE , JAVA_LANG_INTEGER , "intValue" , "()I") ; assert ! (! int_value_m . is_null () ,) ; let ret : i32 = unsafe { let ret = (* * env) . CallIntMethod . unwrap () (env , x , int_value_m) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("Integer.intValue failed: catch exception") ; } (* * env) . DeleteLocalRef . unwrap () (env , x) ; ret } ; Some (ret) } } } # [allow (dead_code)] fn from_java_lang_byte_to_rust (env : * mut JNIEnv , x : internal_aliases :: JByte) -> Option < i8 > { if x . is_null () { None } else { let x = unsafe { (* * env) . NewLocalRef . unwrap () (env , x) } ; if x . is_null () { None } else { let class : jclass = swig_jni_find_class ! (JAVA_LANG_BYTE , "java/lang/Byte") ; assert ! (! class . is_null ()) ; let byte_value_m : jmethodID = swig_jni_get_method_id ! (JAVA_LANG_BYTE_BYTE_VALUE , JAVA_LANG_BYTE , "byteValue" , "()B") ; assert ! (! byte_value_m . is_null () ,) ; let ret : i8 = unsafe { let ret = (* * env) . CallByteMethod . unwrap () (env , x , byte_value_m) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("Byte.byteValue failed: catch exception") ; } (* * env) . DeleteLocalRef . unwrap () (env , x) ; ret } ; Some (ret) } } } # [allow (dead_code)] fn from_java_lang_short_to_rust (env : * mut JNIEnv , x : internal_aliases :: JByte) -> Option < i16 > { if x . is_null () { None } else { let x = unsafe { (* * env) . NewLocalRef . unwrap () (env , x) } ; if x . is_null () { None } else { let class : jclass = swig_jni_find_class ! (JAVA_LANG_SHORT , "java/lang/Short") ; assert ! (! class . is_null ()) ; let short_value_m : jmethodID = swig_jni_get_method_id ! (JAVA_LANG_SHORT_SHORT_VALUE , JAVA_LANG_SHORT , "shortValue" , "()S") ; assert ! (! short_value_m . is_null ()) ; let ret : i16 = unsafe { let ret = (* * env) . CallShortMethod . unwrap () (env , x , short_value_m) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("Short.shortValue failed: catch exception") ; } (* * env) . DeleteLocalRef . unwrap () (env , x) ; ret } ; Some (ret) } } } foreign_typemap ! (($ p : r_type) Option < i32 > <= internal_aliases :: JInteger { $ out = from_java_lang_int_to_rust (env , $ p) ; } ; (f_type , option = "NoNullAnnotations") <= "Integer" ; (f_type , option = "NullAnnotations") <= "@Nullable Integer" ;) ; # [allow (dead_code)] fn to_java_util_optional_int (env : * mut JNIEnv , x : Option < i32 >) -> jobject { let class : jclass = swig_jni_find_class ! (JAVA_UTIL_OPTIONAL_INT , "java/util/OptionalInt") ; assert ! (! class . is_null () ,) ; match x { Some (val) => { let of_m : jmethodID = swig_jni_get_static_method_id ! (JAVA_UTIL_OPTIONAL_INT_OF , JAVA_UTIL_OPTIONAL_INT , "of" , "(I)Ljava/util/OptionalInt;") ; assert ! (! of_m . is_null ()) ; let ret = unsafe { let ret = (* * env) . CallStaticObjectMethod . unwrap () (env , class , of_m , val) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("OptionalInt.of failed: catch exception") ; } ret } ; assert ! (! ret . is_null ()) ; ret } None => { let empty_m : jmethodID = swig_jni_get_static_method_id ! (JAVA_UTIL_OPTIONAL_INT_EMPTY , JAVA_UTIL_OPTIONAL_INT , "empty" , "()Ljava/util/OptionalInt;") ; assert ! (! empty_m . is_null ()) ; let ret = unsafe { let ret = (* * env) . CallStaticObjectMethod . unwrap () (env , class , empty_m) ; if (* * env) . ExceptionCheck . unwrap () (env) != 0 { panic ! ("OptionalInt.empty failed: catch exception") ; } ret } ; assert ! (! ret . is_null ()) ; ret } } } foreign_typemap ! (($ p : r_type) Option < i32 > => internal_aliases :: JOptionalInt { $ out = to_java_util_optional_int (env , $ p) ; } ; (f_type , option = "NoNullAnnotations") => "java.util.OptionalInt" ; (f_type , option = "NullAnnotations") => "@NonNull java.util.OptionalInt" ;) ; foreign_typemap ! (($ p : r_type) Option < i8 > <= internal_aliases :: JByte { $ out = from_java_lang_byte_to_rust (env , $ p) ; } ; (f_type , option = "NoNullAnnotations") <= "Byte" ; (f_type , option = "NullAnnotations") <= "@Nullable Byte" ;) ; foreign_typemap ! (($ p : r_type) Option < i8 > => internal_aliases :: JOptionalInt { $ out = to_java_util_optional_int (env , $ p . map (i32 :: from)) ; } ;) ; foreign_typemap ! (($ p : r_type) Option < i16 > <= internal_aliases :: JShort { $ out = from_java_lang_short_to_rust (env , $ p) ; } ; (f_type , option = "NoNullAnnotations") <= "Short" ; (f_type , option = "NullAnnotations") <= "@Nullable Short" ;) ; foreign_typemap ! (($ p : r_type) Option < i16 > => internal_aliases :: JOptionalInt { $ out = to_java_util_optional_int (env , $ p . map (i32 :: from)) ; } ;) ; foreign_typemap ! (($ p : r_type) < T : SwigForeignClass > Option < T > => jlong { $ out = match $ p { Some (x) => { let ptr = < swig_subst_type ! (T) >:: box_object (x) ; debug_assert_ne ! (0 , ptr) ; ptr } None => 0 , } ; } ; ($ p : f_type , option = "NoNullAnnotations") => "java.util.Optional" r#" [INFO] [stderr] | ++++ [INFO] [stderr] [INFO] [stderr] warning: fields `ignore`, `no_run`, `should_panic`, and `template` are never read [INFO] [stderr] --> tests/test_code_in_readme.rs:69:5 [INFO] [stderr] | [INFO] [stderr] 66 | struct Test { [INFO] [stderr] | ---- fields in this struct [INFO] [stderr] ... [INFO] [stderr] 69 | ignore: bool, [INFO] [stderr] | ^^^^^^ [INFO] [stderr] 70 | no_run: bool, [INFO] [stderr] | ^^^^^^ [INFO] [stderr] 71 | should_panic: bool, [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] 72 | template: Option, [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `Test` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stderr] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stderr] [INFO] [stderr] warning: `rust_swig` (lib test) generated 6 warnings (6 duplicates) [INFO] [stderr] warning: `rust_swig` (test "test_includes_syntax") generated 2 warnings (run `cargo fix --test "test_includes_syntax"` to apply 1 suggestion) [INFO] [stderr] warning: `rust_swig` (test "test_code_in_readme") generated 1 warning [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.13s [INFO] [stderr] Running unittests src/lib.rs (/opt/rustwide/target/debug/deps/rust_swig-e2a4915f3147c039) [INFO] [stdout] [INFO] [stdout] running 52 tests [INFO] [stdout] test code_parse::tests::test_parse_foreign_callback_multi_traits ... ok [INFO] [stdout] test code_parse::tests::test_parse_foreign_enum ... ok [INFO] [stdout] test code_parse::tests::test_parse_foreign_callback_simple ... ok [INFO] [stdout] test code_parse::tests::test_parse_foreign_callback_path ... ok [INFO] [stdout] test code_parse::tests::test_do_parse_foreigner_class ... ok [INFO] [stdout] test typemap::ast::tests::test_is_second_subst_of_first_char_pointer ... ok [INFO] [stdout] test typemap::ast::tests::test_is_second_subst_of_first_extern_c_fn_ptr ... ok [INFO] [stdout] test typemap::ast::tests::test_is_second_subst_of_first_impl_fnonce_no_ret ... ok [INFO] [stdout] test typemap::ast::tests::test_is_second_subst_of_first_impl_fnonce_with_ret ... ok [INFO] [stdout] test typemap::ast::tests::test_is_second_subst_of_first_pointer ... ok [INFO] [stdout] test typemap::ast::tests::test_list_lifetimes ... ok [INFO] [stdout] test code_parse::tests::test_parse_foreign_class_with_copy_derive ... ok [INFO] [stdout] test typemap::ast::tests::test_jlong_to_option_wrong_conv ... ok [INFO] [stdout] test typemap::ast::tests::test_replace_all_types_with ... ok [INFO] [stdout] test typemap::ast::tests::test_work_with_rc ... ok [INFO] [stdout] test typemap::ast::tests::test_is_second_subst_of_first_span ... ok [INFO] [stdout] test typemap::ast::tests::test_work_with_option ... ok [INFO] [stdout] test typemap::ast::tests::test_parse_type_spanned_macro ... ok [INFO] [stdout] test typemap::parse::tests::test_double_map_err ... ok [INFO] [stdout] test typemap::parse::tests::test_extract_trait_param_type ... ok [INFO] [stdout] test typemap::parse::tests::test_get_foreigner_hint_for_generic ... ok [INFO] [stdout] test typemap::parse::tests::test_my_syn_attrs_to_hashmap ... ok [INFO] [stdout] test typemap::parse::tests::test_parse_cfg_target_width ... ok [INFO] [stdout] test typemap::ast::tests::test_get_trait_bounds ... ok [INFO] [stdout] test typemap::parse::tests::test_parse_deref ... ok [INFO] [stdout] test typemap::ast::tests::generic_type_conv_find ... ok [INFO] [stdout] test typemap::parse::tests::test_parse_foreign_types_map_mod ... ok [INFO] [stdout] test typemap::ast::tests::test_work_with_result ... ok [INFO] [stdout] test typemap::parse::tests::test_parse_macros_conv ... ok [INFO] [stdout] test typemap::parse::tests::test_parse_conv_impl_with_type_params ... ok [INFO] [stdout] test typemap::merge::tests::test_merge ... ok [INFO] [stdout] test typemap::parse::tests::test_parse_trait_with_code ... ok [INFO] [stdout] test typemap::parse::tests::test_parsing_only_types_map_mod ... ok [INFO] [stdout] test typemap::typemap_macro::tests::test_foreign_typemap_bare_fn ... ok [INFO] [stdout] test typemap::typemap_macro::tests::test_foreign_typemap_callback_to_future ... ok [INFO] [stdout] test typemap::typemap_macro::tests::test_foreign_typemap_cpp_pair_expand ... ok [INFO] [stdout] test typemap::typemap_macro::tests::test_foreign_typemap_cpp_ruststring ... ok [INFO] [stdout] test typemap::typemap_macro::tests::test_foreign_typemap_cpp_str ... ok [INFO] [stdout] test typemap::typemap_macro::tests::test_foreign_typemap_java_datetime ... ok [INFO] [stdout] test typemap::typemap_macro::tests::test_foreign_typemap_jboolean ... ok [INFO] [stdout] test typemap::typemap_macro::tests::test_foreign_typemap_qdatetime ... ok [INFO] [stdout] test typemap::typemap_macro::tests::test_foreign_typemap_qstring ... ok [INFO] [stdout] test typemap::typemap_macro::tests::test_foreign_typemap_simple_generic ... ok [INFO] [stdout] test typemap::typemap_macro::tests::test_foreign_typemap_simple_typemap ... ok [INFO] [stdout] test typemap::typemap_macro::tests::test_foreign_typemap_unique_prefix ... ok [INFO] [stdout] test typemap::ast::tests::test_normalize_ty ... FAILED [INFO] [stdout] test typemap::parse::tests::test_unpack_first_associated_type ... FAILED [INFO] [stdout] test typemap::typemap_macro::tests::test_foreign_typemap_cpp_bool ... FAILED [INFO] [stdout] test typemap::typemap_macro::tests::test_foreign_typemap_cpp_pair_syntax ... FAILED [INFO] [stdout] test typemap::typemap_macro::tests::test_expand_generic_type_with_ptr ... FAILED [INFO] [stdout] test typemap::tests::test_try_build_path ... ok [INFO] [stdout] test typemap::parse::tests::test_parse_main_lang_typemaps ... ok [INFO] [stdout] [INFO] [stdout] failures: [INFO] [stdout] [INFO] [stdout] ---- typemap::ast::tests::test_normalize_ty stdout ---- [INFO] [stdout] [INFO] [stdout] thread 'typemap::ast::tests::test_normalize_ty' (33) panicked at src/typemap/ast/tests.rs:12:5: [INFO] [stdout] assertion `left == right` failed [INFO] [stdout] left: "()" [INFO] [stdout] right: "( )" [INFO] [stdout] stack backtrace: [INFO] [stdout] 0: 0x622ed3b1fb22 - std::backtrace_rs::backtrace::libunwind::trace::h589a96ef7638b383 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9 [INFO] [stdout] 1: 0x622ed3b1fb22 - std::backtrace_rs::backtrace::trace_unsynchronized::h23a30a7548c40de4 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14 [INFO] [stdout] 2: 0x622ed3b1fb22 - std::sys::backtrace::_print_fmt::h87dabd6535c8c07a [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/sys/backtrace.rs:66:9 [INFO] [stdout] 3: 0x622ed3b1fb22 - ::fmt::hffd20ad4e5eca8ab [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/sys/backtrace.rs:39:26 [INFO] [stdout] 4: 0x622ed3b30acf - core::fmt::rt::Argument::fmt::h75c83e3fd5ce2419 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/fmt/rt.rs:173:76 [INFO] [stdout] 5: 0x622ed3b30acf - core::fmt::write::h6d9d3a7cfd7b84f5 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/fmt/mod.rs:1468:25 [INFO] [stdout] 6: 0x622ed3aecf33 - std::io::default_write_fmt::he11a713685e2464d [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/io/mod.rs:639:11 [INFO] [stdout] 7: 0x622ed3aecf33 - std::io::Write::write_fmt::h9d08f7e050bd2612 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/io/mod.rs:1954:13 [INFO] [stdout] 8: 0x622ed3af8d32 - std::sys::backtrace::BacktraceLock::print::hb28797143397220e [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/sys/backtrace.rs:42:9 [INFO] [stdout] 9: 0x622ed3afd7df - std::panicking::default_hook::{{closure}}::h7555113b62983743 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:301:27 [INFO] [stdout] 10: 0x622ed3afd671 - std::panicking::default_hook::h2714b564abe8d914 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:325:9 [INFO] [stdout] 11: 0x622ed3930efe - as core::ops::function::Fn>::call::h0e9de8cceb22406e [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/alloc/src/boxed.rs:1999:9 [INFO] [stdout] 12: 0x622ed3930efe - test::test_main_with_exit_callback::{{closure}}::h8125bd66cf4739d0 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/test/src/lib.rs:145:21 [INFO] [stdout] 13: 0x622ed3afdf2e - as core::ops::function::Fn>::call::h1fd0a0802eaec16b [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/alloc/src/boxed.rs:1999:9 [INFO] [stdout] 14: 0x622ed3afdf2e - std::panicking::panic_with_hook::h190dc82263685ec5 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:842:13 [INFO] [stdout] 15: 0x622ed3afdc4a - std::panicking::panic_handler::{{closure}}::h8b036a1b366643ac [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:707:13 [INFO] [stdout] 16: 0x622ed3af8e69 - std::sys::backtrace::__rust_end_short_backtrace::h45affcfc0c830da8 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/sys/backtrace.rs:174:18 [INFO] [stdout] 17: 0x622ed3ae112d - __rustc[9b67c8562bba447b]::rust_begin_unwind [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:698:5 [INFO] [stdout] 18: 0x622ed3b395f0 - core::panicking::panic_fmt::hc084f85b1e76c16d [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/panicking.rs:75:14 [INFO] [stdout] 19: 0x622ed3b393a3 - core::panicking::assert_failed_inner::h1215dc8d5a90adff [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/panicking.rs:439:17 [INFO] [stdout] 20: 0x622ed353dc3d - core::panicking::assert_failed::h0062f86aa78b7673 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/panicking.rs:394:5 [INFO] [stdout] 21: 0x622ed35c3893 - rust_swig::typemap::ast::tests::test_normalize_ty::h9f19e61a9367a68a [INFO] [stdout] at /opt/rustwide/workdir/src/typemap/ast/tests.rs:12:5 [INFO] [stdout] 22: 0x622ed35c3ed7 - rust_swig::typemap::ast::tests::test_normalize_ty::{{closure}}::h0db7d0e679540fb0 [INFO] [stdout] at /opt/rustwide/workdir/src/typemap/ast/tests.rs:8:23 [INFO] [stdout] 23: 0x622ed3650c76 - core::ops::function::FnOnce::call_once::hd678701d41333e61 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 24: 0x622ed3930cbb - core::ops::function::FnOnce::call_once::hdbf42be2a49fb464 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 25: 0x622ed3930cbb - test::__rust_begin_short_backtrace::h8ae08814d38cb356 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/test/src/lib.rs:663:18 [INFO] [stdout] 26: 0x622ed39467a5 - test::run_test_in_process::{{closure}}::h54574ee4f414d690 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/test/src/lib.rs:686:74 [INFO] [stdout] 27: 0x622ed39467a5 - as core::ops::function::FnOnce<()>>::call_once::h01a0b7e7aad1a501 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 28: 0x622ed39467a5 - std::panicking::catch_unwind::do_call::h23820e817c5612cd [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:590:40 [INFO] [stdout] 29: 0x622ed39467a5 - std::panicking::catch_unwind::h89c73a1febce5587 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:553:19 [INFO] [stdout] 30: 0x622ed39467a5 - std::panic::catch_unwind::h6f55caf410861914 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panic.rs:359:14 [INFO] [stdout] 31: 0x622ed39467a5 - test::run_test_in_process::h4db851878e5d3983 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/test/src/lib.rs:686:27 [INFO] [stdout] 32: 0x622ed39467a5 - test::run_test::{{closure}}::h57e8c5acaceacd24 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/test/src/lib.rs:607:43 [INFO] [stdout] 33: 0x622ed391d194 - test::run_test::{{closure}}::he775ccc3a9d3b97e [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/test/src/lib.rs:637:41 [INFO] [stdout] 34: 0x622ed391d194 - std::sys::backtrace::__rust_begin_short_backtrace::hcd94d85d7765225a [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/sys/backtrace.rs:158:18 [INFO] [stdout] 35: 0x622ed39209da - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::ha814de8393f07830 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/thread/mod.rs:559:17 [INFO] [stdout] 36: 0x622ed39209da - as core::ops::function::FnOnce<()>>::call_once::h8deb00af0abdeaf1 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 37: 0x622ed39209da - std::panicking::catch_unwind::do_call::h1917979b0c279ea2 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:590:40 [INFO] [stdout] 38: 0x622ed39209da - std::panicking::catch_unwind::h791ad91fee6ce34e [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:553:19 [INFO] [stdout] 39: 0x622ed39209da - std::panic::catch_unwind::h982b8f40ed9c3cce [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panic.rs:359:14 [INFO] [stdout] 40: 0x622ed39209da - std::thread::Builder::spawn_unchecked_::{{closure}}::h545e54700c945db4 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/thread/mod.rs:557:30 [INFO] [stdout] 41: 0x622ed39209da - core::ops::function::FnOnce::call_once{{vtable.shim}}::hb427481a5227d78a [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 42: 0x622ed3af30ef - as core::ops::function::FnOnce>::call_once::h1d452951a81e9d0a [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/alloc/src/boxed.rs:1985:9 [INFO] [stdout] 43: 0x622ed3af30ef - std::sys::pal::unix::thread::Thread::new::thread_start::h29c84e109630689a [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/sys/pal/unix/thread.rs:118:17 [INFO] [stdout] 44: 0x7392c50aaaa4 - [INFO] [stdout] 45: 0x7392c5137a34 - clone [INFO] [stdout] 46: 0x0 - [INFO] [stdout] [INFO] [stdout] ---- typemap::parse::tests::test_unpack_first_associated_type stdout ---- [INFO] [stdout] [INFO] [stdout] thread 'typemap::parse::tests::test_unpack_first_associated_type' (52) panicked at src/typemap/parse.rs:1074:9: [INFO] [stdout] assertion `left == right` failed [INFO] [stdout] left: "[ T ]" [INFO] [stdout] right: "[T]" [INFO] [stdout] stack backtrace: [INFO] [stdout] 0: 0x622ed3b1fb22 - std::backtrace_rs::backtrace::libunwind::trace::h589a96ef7638b383 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9 [INFO] [stdout] 1: 0x622ed3b1fb22 - std::backtrace_rs::backtrace::trace_unsynchronized::h23a30a7548c40de4 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14 [INFO] [stdout] 2: 0x622ed3b1fb22 - std::sys::backtrace::_print_fmt::h87dabd6535c8c07a [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/sys/backtrace.rs:66:9 [INFO] [stdout] 3: 0x622ed3b1fb22 - ::fmt::hffd20ad4e5eca8ab [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/sys/backtrace.rs:39:26 [INFO] [stdout] 4: 0x622ed3b30acf - core::fmt::rt::Argument::fmt::h75c83e3fd5ce2419 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/fmt/rt.rs:173:76 [INFO] [stdout] 5: 0x622ed3b30acf - core::fmt::write::h6d9d3a7cfd7b84f5 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/fmt/mod.rs:1468:25 [INFO] [stdout] 6: 0x622ed3aecf33 - std::io::default_write_fmt::he11a713685e2464d [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/io/mod.rs:639:11 [INFO] [stdout] 7: 0x622ed3aecf33 - std::io::Write::write_fmt::h9d08f7e050bd2612 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/io/mod.rs:1954:13 [INFO] [stdout] 8: 0x622ed3af8d32 - std::sys::backtrace::BacktraceLock::print::hb28797143397220e [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/sys/backtrace.rs:42:9 [INFO] [stdout] 9: 0x622ed3afd7df - std::panicking::default_hook::{{closure}}::h7555113b62983743 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:301:27 [INFO] [stdout] 10: 0x622ed3afd671 - std::panicking::default_hook::h2714b564abe8d914 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:325:9 [INFO] [stdout] 11: 0x622ed3930efe - as core::ops::function::Fn>::call::h0e9de8cceb22406e [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/alloc/src/boxed.rs:1999:9 [INFO] [stdout] 12: 0x622ed3930efe - test::test_main_with_exit_callback::{{closure}}::h8125bd66cf4739d0 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/test/src/lib.rs:145:21 [INFO] [stdout] 13: 0x622ed3afdf2e - as core::ops::function::Fn>::call::h1fd0a0802eaec16b [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/alloc/src/boxed.rs:1999:9 [INFO] [stdout] 14: 0x622ed3afdf2e - std::panicking::panic_with_hook::h190dc82263685ec5 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:842:13 [INFO] [stdout] 15: 0x622ed3afdc4a - std::panicking::panic_handler::{{closure}}::h8b036a1b366643ac [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:707:13 [INFO] [stdout] 16: 0x622ed3af8e69 - std::sys::backtrace::__rust_end_short_backtrace::h45affcfc0c830da8 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/sys/backtrace.rs:174:18 [INFO] [stdout] 17: 0x622ed3ae112d - __rustc[9b67c8562bba447b]::rust_begin_unwind [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:698:5 [INFO] [stdout] 18: 0x622ed3b395f0 - core::panicking::panic_fmt::hc084f85b1e76c16d [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/panicking.rs:75:14 [INFO] [stdout] 19: 0x622ed3b393a3 - core::panicking::assert_failed_inner::h1215dc8d5a90adff [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/panicking.rs:439:17 [INFO] [stdout] 20: 0x622ed353e225 - core::panicking::assert_failed::hfd13004c241e9438 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/panicking.rs:394:5 [INFO] [stdout] 21: 0x622ed35a4a34 - rust_swig::typemap::parse::tests::test_unpack_first_associated_type::h4ee58880f94ee605 [INFO] [stdout] at /opt/rustwide/workdir/src/typemap/parse.rs:1074:9 [INFO] [stdout] 22: 0x622ed35a4aa7 - rust_swig::typemap::parse::tests::test_unpack_first_associated_type::{{closure}}::h9dc94e9595f3aea7 [INFO] [stdout] at /opt/rustwide/workdir/src/typemap/parse.rs:1064:43 [INFO] [stdout] 23: 0x622ed3650ba6 - core::ops::function::FnOnce::call_once::hd159521fb5f4f6e4 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 24: 0x622ed3930cbb - core::ops::function::FnOnce::call_once::hdbf42be2a49fb464 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 25: 0x622ed3930cbb - test::__rust_begin_short_backtrace::h8ae08814d38cb356 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/test/src/lib.rs:663:18 [INFO] [stdout] 26: 0x622ed39467a5 - test::run_test_in_process::{{closure}}::h54574ee4f414d690 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/test/src/lib.rs:686:74 [INFO] [stdout] 27: 0x622ed39467a5 - as core::ops::function::FnOnce<()>>::call_once::h01a0b7e7aad1a501 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 28: 0x622ed39467a5 - std::panicking::catch_unwind::do_call::h23820e817c5612cd [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:590:40 [INFO] [stdout] 29: 0x622ed39467a5 - std::panicking::catch_unwind::h89c73a1febce5587 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:553:19 [INFO] [stdout] 30: 0x622ed39467a5 - std::panic::catch_unwind::h6f55caf410861914 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panic.rs:359:14 [INFO] [stdout] 31: 0x622ed39467a5 - test::run_test_in_process::h4db851878e5d3983 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/test/src/lib.rs:686:27 [INFO] [stdout] 32: 0x622ed39467a5 - test::run_test::{{closure}}::h57e8c5acaceacd24 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/test/src/lib.rs:607:43 [INFO] [stdout] 33: 0x622ed391d194 - test::run_test::{{closure}}::he775ccc3a9d3b97e [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/test/src/lib.rs:637:41 [INFO] [stdout] 34: 0x622ed391d194 - std::sys::backtrace::__rust_begin_short_backtrace::hcd94d85d7765225a [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/sys/backtrace.rs:158:18 [INFO] [stdout] 35: 0x622ed39209da - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::ha814de8393f07830 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/thread/mod.rs:559:17 [INFO] [stdout] 36: 0x622ed39209da - as core::ops::function::FnOnce<()>>::call_once::h8deb00af0abdeaf1 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 37: 0x622ed39209da - std::panicking::catch_unwind::do_call::h1917979b0c279ea2 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:590:40 [INFO] [stdout] 38: 0x622ed39209da - std::panicking::catch_unwind::h791ad91fee6ce34e [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:553:19 [INFO] [stdout] 39: 0x622ed39209da - std::panic::catch_unwind::h982b8f40ed9c3cce [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panic.rs:359:14 [INFO] [stdout] 40: 0x622ed39209da - std::thread::Builder::spawn_unchecked_::{{closure}}::h545e54700c945db4 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/thread/mod.rs:557:30 [INFO] [stdout] 41: 0x622ed39209da - core::ops::function::FnOnce::call_once{{vtable.shim}}::hb427481a5227d78a [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 42: 0x622ed3af30ef - as core::ops::function::FnOnce>::call_once::h1d452951a81e9d0a [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/alloc/src/boxed.rs:1985:9 [INFO] [stdout] 43: 0x622ed3af30ef - std::sys::pal::unix::thread::Thread::new::thread_start::h29c84e109630689a [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/sys/pal/unix/thread.rs:118:17 [INFO] [stdout] 44: 0x7392c50aaaa4 - [INFO] [stdout] 45: 0x7392c5137a34 - clone [INFO] [stdout] 46: 0x0 - [INFO] [stdout] [INFO] [stdout] ---- typemap::typemap_macro::tests::test_foreign_typemap_cpp_bool stdout ---- [INFO] [stdout] rule TypeMapConvRuleInfo { src_id: SourceId(None), span: bytes(91..97), rtype_generics: None, rtype_left_to_right: Some(RTypeConvRule { left_ty: Path(TypePath { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: bool, span: bytes(99..103) }, arguments: None }] } }), right_ty: Some(Path(TypePath { qself: None, path: Path { leading_colon: Some(Colon2), segments: [PathSegment { ident: Ident { sym: std, span: bytes(110..113) }, arguments: None }, Colon2, PathSegment { ident: Ident { sym: os, span: bytes(117..119) }, arguments: None }, Colon2, PathSegment { ident: Ident { sym: raw, span: bytes(123..126) }, arguments: None }, Colon2, PathSegment { ident: Ident { sym: c_char, span: bytes(130..136) }, arguments: None }] } })), code: Some(TypeConvCode { span: (SourceId(None), bytes(139..174)), code: "let mut {to_var}: {to_var_type} = if {from_var} { 1 } else { 0 } ;", params: ["{to_var}", "{from_var}"] }) }), rtype_right_to_left: Some(RTypeConvRule { left_ty: Path(TypePath { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: bool, span: bytes(247..251) }, arguments: None }] } }), right_ty: Some(Path(TypePath { qself: None, path: Path { leading_colon: Some(Colon2), segments: [PathSegment { ident: Ident { sym: std, span: bytes(258..261) }, arguments: None }, Colon2, PathSegment { ident: Ident { sym: os, span: bytes(265..267) }, arguments: None }, Colon2, PathSegment { ident: Ident { sym: raw, span: bytes(271..274) }, arguments: None }, Colon2, PathSegment { ident: Ident { sym: c_char, span: bytes(278..284) }, arguments: None }] } })), code: Some(TypeConvCode { span: (SourceId(None), bytes(287..309)), code: "let mut {to_var}: {to_var_type} = ({from_var} != 0) ;", params: ["{to_var}", "{from_var}"] }) }), ftype_left_to_right: [FTypeConvRule { req_modules: [], cfg_option: None, left_right_ty: OnlyRight(FTypeName { name: "bool", sp: bytes(199..205) }), input_to_output: false, unique_prefix: None, code: Some(TypeConvCode { span: (SourceId(None), bytes(206..227)), code: "{to_var_type} = ({from_var} != 0);", params: ["{from_var}", "{to_var_type}"] }) }], ftype_right_to_left: [FTypeConvRule { req_modules: [], cfg_option: None, left_right_ty: OnlyRight(FTypeName { name: "bool", sp: bytes(334..340) }), input_to_output: false, unique_prefix: None, code: Some(TypeConvCode { span: (SourceId(None), bytes(341..363)), code: "{to_var_type} = {from_var} ? 1 : 0;", params: ["{from_var}", "{to_var_type}"] }) }], c_types: None, generic_c_types: None, f_code: [], generic_aliases: [] } [INFO] [stdout] [INFO] [stdout] thread 'typemap::typemap_macro::tests::test_foreign_typemap_cpp_bool' (57) panicked at src/typemap/typemap_macro/tests.rs:77:5: [INFO] [stdout] assertion `left == right` failed [INFO] [stdout] left: RTypeConvRule { left_ty: Path(TypePath { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: bool }, arguments: None }] } }), right_ty: Some(Path(TypePath { qself: None, path: Path { leading_colon: Some(Colon2), segments: [PathSegment { ident: Ident { sym: std }, arguments: None }, Colon2, PathSegment { ident: Ident { sym: os }, arguments: None }, Colon2, PathSegment { ident: Ident { sym: raw }, arguments: None }, Colon2, PathSegment { ident: Ident { sym: c_char }, arguments: None }] } })), code: Some(TypeConvCode { span: (SourceId(None), bytes(0..0)), code: "let mut {to_var}: {to_var_type} = ( {from_var} != 0 ) ;", params: ["{to_var}", "{from_var}"] }) } [INFO] [stdout] right: RTypeConvRule { left_ty: Path(TypePath { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: bool, span: bytes(247..251) }, arguments: None }] } }), right_ty: Some(Path(TypePath { qself: None, path: Path { leading_colon: Some(Colon2), segments: [PathSegment { ident: Ident { sym: std, span: bytes(258..261) }, arguments: None }, Colon2, PathSegment { ident: Ident { sym: os, span: bytes(265..267) }, arguments: None }, Colon2, PathSegment { ident: Ident { sym: raw, span: bytes(271..274) }, arguments: None }, Colon2, PathSegment { ident: Ident { sym: c_char, span: bytes(278..284) }, arguments: None }] } })), code: Some(TypeConvCode { span: (SourceId(None), bytes(287..309)), code: "let mut {to_var}: {to_var_type} = ({from_var} != 0) ;", params: ["{to_var}", "{from_var}"] }) } [INFO] [stdout] stack backtrace: [INFO] [stdout] 0: 0x622ed3b1fb22 - std::backtrace_rs::backtrace::libunwind::trace::h589a96ef7638b383 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9 [INFO] [stdout] 1: 0x622ed3b1fb22 - std::backtrace_rs::backtrace::trace_unsynchronized::h23a30a7548c40de4 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14 [INFO] [stdout] 2: 0x622ed3b1fb22 - std::sys::backtrace::_print_fmt::h87dabd6535c8c07a [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/sys/backtrace.rs:66:9 [INFO] [stdout] 3: 0x622ed3b1fb22 - ::fmt::hffd20ad4e5eca8ab [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/sys/backtrace.rs:39:26 [INFO] [stdout] 4: 0x622ed3b30acf - core::fmt::rt::Argument::fmt::h75c83e3fd5ce2419 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/fmt/rt.rs:173:76 [INFO] [stdout] 5: 0x622ed3b30acf - core::fmt::write::h6d9d3a7cfd7b84f5 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/fmt/mod.rs:1468:25 [INFO] [stdout] 6: 0x622ed3aecf33 - std::io::default_write_fmt::he11a713685e2464d [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/io/mod.rs:639:11 [INFO] [stdout] 7: 0x622ed3aecf33 - std::io::Write::write_fmt::h9d08f7e050bd2612 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/io/mod.rs:1954:13 [INFO] [stdout] 8: 0x622ed3af8d32 - std::sys::backtrace::BacktraceLock::print::hb28797143397220e [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/sys/backtrace.rs:42:9 [INFO] [stdout] 9: 0x622ed3afd7df - std::panicking::default_hook::{{closure}}::h7555113b62983743 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:301:27 [INFO] [stdout] 10: 0x622ed3afd671 - std::panicking::default_hook::h2714b564abe8d914 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:325:9 [INFO] [stdout] 11: 0x622ed3930efe - as core::ops::function::Fn>::call::h0e9de8cceb22406e [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/alloc/src/boxed.rs:1999:9 [INFO] [stdout] 12: 0x622ed3930efe - test::test_main_with_exit_callback::{{closure}}::h8125bd66cf4739d0 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/test/src/lib.rs:145:21 [INFO] [stdout] 13: 0x622ed3afdf2e - as core::ops::function::Fn>::call::h1fd0a0802eaec16b [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/alloc/src/boxed.rs:1999:9 [INFO] [stdout] 14: 0x622ed3afdf2e - std::panicking::panic_with_hook::h190dc82263685ec5 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:842:13 [INFO] [stdout] 15: 0x622ed3afdc4a - std::panicking::panic_handler::{{closure}}::h8b036a1b366643ac [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:707:13 [INFO] [stdout] 16: 0x622ed3af8e69 - std::sys::backtrace::__rust_end_short_backtrace::h45affcfc0c830da8 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/sys/backtrace.rs:174:18 [INFO] [stdout] 17: 0x622ed3ae112d - __rustc[9b67c8562bba447b]::rust_begin_unwind [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:698:5 [INFO] [stdout] 18: 0x622ed3b395f0 - core::panicking::panic_fmt::hc084f85b1e76c16d [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/panicking.rs:75:14 [INFO] [stdout] 19: 0x622ed3b393a3 - core::panicking::assert_failed_inner::h1215dc8d5a90adff [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/panicking.rs:439:17 [INFO] [stdout] 20: 0x622ed353def2 - core::panicking::assert_failed::h7c1b5a7a97b1ec22 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/panicking.rs:394:5 [INFO] [stdout] 21: 0x622ed35778a5 - rust_swig::typemap::typemap_macro::tests::test_foreign_typemap_cpp_bool::hb7c174d40df4e002 [INFO] [stdout] at /opt/rustwide/workdir/src/typemap/typemap_macro/tests.rs:77:5 [INFO] [stdout] 22: 0x622ed35782a7 - rust_swig::typemap::typemap_macro::tests::test_foreign_typemap_cpp_bool::{{closure}}::hdea167f6601f36f1 [INFO] [stdout] at /opt/rustwide/workdir/src/typemap/typemap_macro/tests.rs:47:35 [INFO] [stdout] 23: 0x622ed364f1f6 - core::ops::function::FnOnce::call_once::h4868f14321153cff [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 24: 0x622ed3930cbb - core::ops::function::FnOnce::call_once::hdbf42be2a49fb464 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 25: 0x622ed3930cbb - test::__rust_begin_short_backtrace::h8ae08814d38cb356 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/test/src/lib.rs:663:18 [INFO] [stdout] 26: 0x622ed39467a5 - test::run_test_in_process::{{closure}}::h54574ee4f414d690 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/test/src/lib.rs:686:74 [INFO] [stdout] 27: 0x622ed39467a5 - as core::ops::function::FnOnce<()>>::call_once::h01a0b7e7aad1a501 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 28: 0x622ed39467a5 - std::panicking::catch_unwind::do_call::h23820e817c5612cd [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:590:40 [INFO] [stdout] 29: 0x622ed39467a5 - std::panicking::catch_unwind::h89c73a1febce5587 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:553:19 [INFO] [stdout] 30: 0x622ed39467a5 - std::panic::catch_unwind::h6f55caf410861914 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panic.rs:359:14 [INFO] [stdout] 31: 0x622ed39467a5 - test::run_test_in_process::h4db851878e5d3983 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/test/src/lib.rs:686:27 [INFO] [stdout] 32: 0x622ed39467a5 - test::run_test::{{closure}}::h57e8c5acaceacd24 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/test/src/lib.rs:607:43 [INFO] [stdout] 33: 0x622ed391d194 - test::run_test::{{closure}}::he775ccc3a9d3b97e [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/test/src/lib.rs:637:41 [INFO] [stdout] 34: 0x622ed391d194 - std::sys::backtrace::__rust_begin_short_backtrace::hcd94d85d7765225a [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/sys/backtrace.rs:158:18 [INFO] [stdout] 35: 0x622ed39209da - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::ha814de8393f07830 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/thread/mod.rs:559:17 [INFO] [stdout] 36: 0x622ed39209da - as core::ops::function::FnOnce<()>>::call_once::h8deb00af0abdeaf1 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 37: 0x622ed39209da - std::panicking::catch_unwind::do_call::h1917979b0c279ea2 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:590:40 [INFO] [stdout] 38: 0x622ed39209da - std::panicking::catch_unwind::h791ad91fee6ce34e [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:553:19 [INFO] [stdout] 39: 0x622ed39209da - std::panic::catch_unwind::h982b8f40ed9c3cce [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panic.rs:359:14 [INFO] [stdout] 40: 0x622ed39209da - std::thread::Builder::spawn_unchecked_::{{closure}}::h545e54700c945db4 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/thread/mod.rs:557:30 [INFO] [stdout] 41: 0x622ed39209da - core::ops::function::FnOnce::call_once{{vtable.shim}}::hb427481a5227d78a [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 42: 0x622ed3af30ef - as core::ops::function::FnOnce>::call_once::h1d452951a81e9d0a [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/alloc/src/boxed.rs:1985:9 [INFO] [stdout] 43: 0x622ed3af30ef - std::sys::pal::unix::thread::Thread::new::thread_start::h29c84e109630689a [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/sys/pal/unix/thread.rs:118:17 [INFO] [stdout] 44: 0x7392c50aaaa4 - [INFO] [stdout] 45: 0x7392c5137a34 - clone [INFO] [stdout] 46: 0x0 - [INFO] [stdout] [INFO] [stdout] ---- typemap::typemap_macro::tests::test_foreign_typemap_cpp_pair_syntax stdout ---- [INFO] [stdout] rule!!!: TypeMapConvRuleInfo { src_id: SourceId(None), span: bytes(395..499), rtype_generics: Some(Generics { lt_token: Some(Lt), params: [Type(TypeParam { attrs: [], ident: Ident { sym: T1, span: bytes(667..669) }, colon_token: None, bounds: [], eq_token: None, default: None }), Comma, Type(TypeParam { attrs: [], ident: Ident { sym: T2, span: bytes(672..674) }, colon_token: None, bounds: [], eq_token: None, default: None })], gt_token: Some(Gt), where_clause: None }), rtype_left_to_right: Some(RTypeConvRule { left_ty: Tuple(TypeTuple { paren_token: Paren, elems: [Path(TypePath { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: T1, span: bytes(678..680) }, arguments: None }] } }), Comma, Path(TypePath { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: T2, span: bytes(683..685) }, arguments: None }] } })] }), right_ty: Some(Macro(TypeMacro { mac: Macro { path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: CRustPair, span: bytes(690..699) }, arguments: None }] }, bang_token: Bang, delimiter: Paren(Paren), tokens: TokenStream [] } })), code: Some(TypeConvCode { span: (SourceId(None), bytes(707..860)), code: "swig_from_rust_to_i_type ! (T1 , {from_var} . 0 , p0) ; swig_from_rust_to_i_type ! (T2 , {from_var} . 1 , p1) ; let mut {to_var}: {to_var_type} = CRustPair ! () { first : p0 , second : p1 , } ;", params: ["{to_var}", "{from_var}"] }) }), rtype_right_to_left: Some(RTypeConvRule { left_ty: Tuple(TypeTuple { paren_token: Paren, elems: [Path(TypePath { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: T1, span: bytes(893..895) }, arguments: None }] } }), Comma, Path(TypePath { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: T2, span: bytes(898..900) }, arguments: None }] } })] }), right_ty: Some(Macro(TypeMacro { mac: Macro { path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: CRustPair, span: bytes(905..914) }, arguments: None }] }, bang_token: Bang, delimiter: Paren(Paren), tokens: TokenStream [] } })), code: Some(TypeConvCode { span: (SourceId(None), bytes(922..1048)), code: "swig_from_i_type_to_rust ! (T1 , {from_var} . first , p0) ; swig_from_i_type_to_rust ! (T2 , {from_var} . second , p1) ; let mut {to_var}: {to_var_type} = (p0 , p1) ;", params: ["{to_var}", "{from_var}"] }) }), ftype_left_to_right: [FTypeConvRule { req_modules: [ModuleName { name: "\"rust_tuple.h\"", sp: bytes(1084..1102) }, ModuleName { name: "", sp: bytes(1105..1116) }], cfg_option: None, left_right_ty: OnlyRight(FTypeName { name: "std::pair", sp: bytes(1122..1169) }), input_to_output: false, unique_prefix: None, code: Some(TypeConvCode { span: (SourceId(None), bytes(1170..1269)), code: "std::make_pair(swig_foreign_from_i_type!(T1, {from_var}.first), swig_foreign_from_i_type!(T2, {from_var}.second))", params: ["{from_var}"] }) }], ftype_right_to_left: [FTypeConvRule { req_modules: [ModuleName { name: "\"rust_tuple.h\"", sp: bytes(1303..1321) }, ModuleName { name: "", sp: bytes(1324..1335) }], cfg_option: None, left_right_ty: OnlyRight(FTypeName { name: "std::pair", sp: bytes(1341..1388) }), input_to_output: false, unique_prefix: None, code: Some(TypeConvCode { span: (SourceId(None), bytes(1389..1485)), code: "CRustPair!() { swig_foreign_to_i_type!(T1, {from_var}.first), swig_foreign_to_i_type!(T2, {from_var}.second) }", params: ["{from_var}"] }) }], c_types: None, generic_c_types: Some(GenericCItems { header_name: ModuleName { name: "rust_tuple.h", sp: bytes(528..542) }, types: TokenStream [Punct { char: '#', spacing: Alone, span: bytes(545..546) }, Group { delimiter: Bracket, stream: TokenStream [Ident { sym: repr, span: bytes(548..552) }, Group { delimiter: Parenthesis, stream: TokenStream [Ident { sym: C, span: bytes(554..555) }], span: bytes(553..556) }], span: bytes(547..557) }, Ident { sym: pub, span: bytes(558..561) }, Ident { sym: struct, span: bytes(562..568) }, Ident { sym: CRustPair, span: bytes(569..578) }, Punct { char: '!', spacing: Alone, span: bytes(579..580) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: bytes(581..583) }, Group { delimiter: Brace, stream: TokenStream [Ident { sym: first, span: bytes(586..591) }, Punct { char: ':', spacing: Alone, span: bytes(592..593) }, Ident { sym: swig_i_type, span: bytes(594..605) }, Punct { char: '!', spacing: Alone, span: bytes(606..607) }, Group { delimiter: Parenthesis, stream: TokenStream [Ident { sym: T1, span: bytes(609..611) }], span: bytes(608..612) }, Punct { char: ',', spacing: Alone, span: bytes(613..614) }, Ident { sym: second, span: bytes(615..621) }, Punct { char: ':', spacing: Alone, span: bytes(622..623) }, Ident { sym: swig_i_type, span: bytes(624..635) }, Punct { char: '!', spacing: Alone, span: bytes(636..637) }, Group { delimiter: Parenthesis, stream: TokenStream [Ident { sym: T2, span: bytes(639..641) }], span: bytes(638..642) }, Punct { char: ',', spacing: Alone, span: bytes(643..644) }], span: bytes(584..646) }] }), f_code: [], generic_aliases: [GenericAlias { alias: Ident { sym: CRustPair, span: bytes(412..421) }, value: TokenStream [Ident { sym: swig_concat_idents, span: bytes(424..442) }, Punct { char: '!', spacing: Alone, span: bytes(443..444) }, Group { delimiter: Parenthesis, stream: TokenStream [Ident { sym: CRustPair, span: bytes(446..455) }, Punct { char: ',', spacing: Alone, span: bytes(456..457) }, Ident { sym: swig_i_type, span: bytes(458..469) }, Punct { char: '!', spacing: Alone, span: bytes(470..471) }, Group { delimiter: Parenthesis, stream: TokenStream [Ident { sym: T1, span: bytes(473..475) }], span: bytes(472..476) }, Punct { char: ',', spacing: Alone, span: bytes(477..478) }, Ident { sym: swig_i_type, span: bytes(479..490) }, Punct { char: '!', spacing: Alone, span: bytes(491..492) }, Group { delimiter: Parenthesis, stream: TokenStream [Ident { sym: T2, span: bytes(494..496) }], span: bytes(493..497) }], span: bytes(445..498) }] }] } [INFO] [stdout] [INFO] [stdout] thread 'typemap::typemap_macro::tests::test_foreign_typemap_cpp_pair_syntax' (59) panicked at src/typemap/typemap_macro/tests.rs:429:5: [INFO] [stdout] assertion `left == right` failed [INFO] [stdout] left: RTypeConvRule { left_ty: Tuple(TypeTuple { paren_token: Paren, elems: [Path(TypePath { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: T1 }, arguments: None }] } }), Comma, Path(TypePath { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: T2 }, arguments: None }] } })] }), right_ty: Some(Macro(TypeMacro { mac: Macro { path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: CRustPair }, arguments: None }] }, bang_token: Bang, delimiter: Paren(Paren), tokens: TokenStream [] } })), code: Some(TypeConvCode { span: (SourceId(None), bytes(0..0)), code: "swig_from_rust_to_i_type ! ( T1 , {from_var} . 0 , p0 ) ; swig_from_rust_to_i_type ! ( T2 , {from_var} . 1 , p1 ) ; let mut {to_var}: {to_var_type} = CRustPair ! ( ) { first : p0 , second : p1 , } ;", params: ["{to_var}", "{from_var}"] }) } [INFO] [stdout] right: RTypeConvRule { left_ty: Tuple(TypeTuple { paren_token: Paren, elems: [Path(TypePath { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: T1, span: bytes(678..680) }, arguments: None }] } }), Comma, Path(TypePath { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: T2, span: bytes(683..685) }, arguments: None }] } })] }), right_ty: Some(Macro(TypeMacro { mac: Macro { path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: CRustPair, span: bytes(690..699) }, arguments: None }] }, bang_token: Bang, delimiter: Paren(Paren), tokens: TokenStream [] } })), code: Some(TypeConvCode { span: (SourceId(None), bytes(707..860)), code: "swig_from_rust_to_i_type ! (T1 , {from_var} . 0 , p0) ; swig_from_rust_to_i_type ! (T2 , {from_var} . 1 , p1) ; let mut {to_var}: {to_var_type} = CRustPair ! () { first : p0 , second : p1 , } ;", params: ["{to_var}", "{from_var}"] }) } [INFO] [stdout] stack backtrace: [INFO] [stdout] 0: 0x622ed3b1fb22 - std::backtrace_rs::backtrace::libunwind::trace::h589a96ef7638b383 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9 [INFO] [stdout] 1: 0x622ed3b1fb22 - std::backtrace_rs::backtrace::trace_unsynchronized::h23a30a7548c40de4 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14 [INFO] [stdout] 2: 0x622ed3b1fb22 - std::sys::backtrace::_print_fmt::h87dabd6535c8c07a [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/sys/backtrace.rs:66:9 [INFO] [stdout] 3: 0x622ed3b1fb22 - ::fmt::hffd20ad4e5eca8ab [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/sys/backtrace.rs:39:26 [INFO] [stdout] 4: 0x622ed3b30acf - core::fmt::rt::Argument::fmt::h75c83e3fd5ce2419 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/fmt/rt.rs:173:76 [INFO] [stdout] 5: 0x622ed3b30acf - core::fmt::write::h6d9d3a7cfd7b84f5 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/fmt/mod.rs:1468:25 [INFO] [stdout] 6: 0x622ed3aecf33 - std::io::default_write_fmt::he11a713685e2464d [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/io/mod.rs:639:11 [INFO] [stdout] 7: 0x622ed3aecf33 - std::io::Write::write_fmt::h9d08f7e050bd2612 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/io/mod.rs:1954:13 [INFO] [stdout] 8: 0x622ed3af8d32 - std::sys::backtrace::BacktraceLock::print::hb28797143397220e [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/sys/backtrace.rs:42:9 [INFO] [stdout] 9: 0x622ed3afd7df - std::panicking::default_hook::{{closure}}::h7555113b62983743 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:301:27 [INFO] [stdout] 10: 0x622ed3afd671 - std::panicking::default_hook::h2714b564abe8d914 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:325:9 [INFO] [stdout] 11: 0x622ed3930efe - as core::ops::function::Fn>::call::h0e9de8cceb22406e [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/alloc/src/boxed.rs:1999:9 [INFO] [stdout] 12: 0x622ed3930efe - test::test_main_with_exit_callback::{{closure}}::h8125bd66cf4739d0 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/test/src/lib.rs:145:21 [INFO] [stdout] 13: 0x622ed3afdf2e - as core::ops::function::Fn>::call::h1fd0a0802eaec16b [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/alloc/src/boxed.rs:1999:9 [INFO] [stdout] 14: 0x622ed3afdf2e - std::panicking::panic_with_hook::h190dc82263685ec5 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:842:13 [INFO] [stdout] 15: 0x622ed3afdc4a - std::panicking::panic_handler::{{closure}}::h8b036a1b366643ac [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:707:13 [INFO] [stdout] 16: 0x622ed3af8e69 - std::sys::backtrace::__rust_end_short_backtrace::h45affcfc0c830da8 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/sys/backtrace.rs:174:18 [INFO] [stdout] 17: 0x622ed3ae112d - __rustc[9b67c8562bba447b]::rust_begin_unwind [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:698:5 [INFO] [stdout] 18: 0x622ed3b395f0 - core::panicking::panic_fmt::hc084f85b1e76c16d [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/panicking.rs:75:14 [INFO] [stdout] 19: 0x622ed3b393a3 - core::panicking::assert_failed_inner::h1215dc8d5a90adff [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/panicking.rs:439:17 [INFO] [stdout] 20: 0x622ed353def2 - core::panicking::assert_failed::h7c1b5a7a97b1ec22 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/panicking.rs:394:5 [INFO] [stdout] 21: 0x622ed358118d - rust_swig::typemap::typemap_macro::tests::test_foreign_typemap_cpp_pair_syntax::he688ade108e71a29 [INFO] [stdout] at /opt/rustwide/workdir/src/typemap/typemap_macro/tests.rs:429:5 [INFO] [stdout] 22: 0x622ed3581ca7 - rust_swig::typemap::typemap_macro::tests::test_foreign_typemap_cpp_pair_syntax::{{closure}}::h451c3f92095332bb [INFO] [stdout] at /opt/rustwide/workdir/src/typemap/typemap_macro/tests.rs:413:42 [INFO] [stdout] 23: 0x622ed3650206 - core::ops::function::FnOnce::call_once::ha19f9aaf44bba7c7 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 24: 0x622ed3930cbb - core::ops::function::FnOnce::call_once::hdbf42be2a49fb464 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 25: 0x622ed3930cbb - test::__rust_begin_short_backtrace::h8ae08814d38cb356 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/test/src/lib.rs:663:18 [INFO] [stdout] 26: 0x622ed39467a5 - test::run_test_in_process::{{closure}}::h54574ee4f414d690 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/test/src/lib.rs:686:74 [INFO] [stdout] 27: 0x622ed39467a5 - as core::ops::function::FnOnce<()>>::call_once::h01a0b7e7aad1a501 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 28: 0x622ed39467a5 - std::panicking::catch_unwind::do_call::h23820e817c5612cd [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:590:40 [INFO] [stdout] 29: 0x622ed39467a5 - std::panicking::catch_unwind::h89c73a1febce5587 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:553:19 [INFO] [stdout] 30: 0x622ed39467a5 - std::panic::catch_unwind::h6f55caf410861914 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panic.rs:359:14 [INFO] [stdout] 31: 0x622ed39467a5 - test::run_test_in_process::h4db851878e5d3983 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/test/src/lib.rs:686:27 [INFO] [stdout] 32: 0x622ed39467a5 - test::run_test::{{closure}}::h57e8c5acaceacd24 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/test/src/lib.rs:607:43 [INFO] [stdout] 33: 0x622ed391d194 - test::run_test::{{closure}}::he775ccc3a9d3b97e [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/test/src/lib.rs:637:41 [INFO] [stdout] 34: 0x622ed391d194 - std::sys::backtrace::__rust_begin_short_backtrace::hcd94d85d7765225a [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/sys/backtrace.rs:158:18 [INFO] [stdout] 35: 0x622ed39209da - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::ha814de8393f07830 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/thread/mod.rs:559:17 [INFO] [stdout] 36: 0x622ed39209da - as core::ops::function::FnOnce<()>>::call_once::h8deb00af0abdeaf1 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 37: 0x622ed39209da - std::panicking::catch_unwind::do_call::h1917979b0c279ea2 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:590:40 [INFO] [stdout] 38: 0x622ed39209da - std::panicking::catch_unwind::h791ad91fee6ce34e [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:553:19 [INFO] [stdout] 39: 0x622ed39209da - std::panic::catch_unwind::h982b8f40ed9c3cce [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panic.rs:359:14 [INFO] [stdout] 40: 0x622ed39209da - std::thread::Builder::spawn_unchecked_::{{closure}}::h545e54700c945db4 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/thread/mod.rs:557:30 [INFO] [stdout] 41: 0x622ed39209da - core::ops::function::FnOnce::call_once{{vtable.shim}}::hb427481a5227d78a [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 42: 0x622ed3af30ef - as core::ops::function::FnOnce>::call_once::h1d452951a81e9d0a [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/alloc/src/boxed.rs:1985:9 [INFO] [stdout] 43: 0x622ed3af30ef - std::sys::pal::unix::thread::Thread::new::thread_start::h29c84e109630689a [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/sys/pal/unix/thread.rs:118:17 [INFO] [stdout] 44: 0x7392c50aaaa4 - [INFO] [stdout] 45: 0x7392c5137a34 - clone [INFO] [stdout] 46: 0x0 - [INFO] [stdout] [INFO] [stdout] ---- typemap::typemap_macro::tests::test_expand_generic_type_with_ptr stdout ---- [INFO] [stdout] rule TypeMapConvRuleInfo { src_id: SourceId(None), span: bytes(169..175), rtype_generics: Some(Generics { lt_token: Some(Lt), params: [Type(TypeParam { attrs: [], ident: Ident { sym: T, span: bytes(179..180) }, colon_token: None, bounds: [], eq_token: None, default: None })], gt_token: Some(Gt), where_clause: None }), rtype_left_to_right: None, rtype_right_to_left: Some(RTypeConvRule { left_ty: Path(TypePath { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: Option, span: bytes(183..189) }, arguments: AngleBracketed(AngleBracketedGenericArguments { colon2_token: None, lt_token: Lt, args: [Type(Reference(TypeReference { and_token: And, lifetime: None, mutability: None, elem: Path(TypePath { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: T, span: bytes(194..195) }, arguments: None }] } }) }))], gt_token: Gt }) }] } }), right_ty: Some(Ptr(TypePtr { star_token: Star, const_token: Some(Const), mutability: None, elem: Macro(TypeMacro { mac: Macro { path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: swig_i_type, span: bytes(209..220) }, arguments: None }] }, bang_token: Bang, delimiter: Paren(Paren), tokens: TokenStream [Ident { sym: T, span: bytes(224..225) }] } }) })), code: Some(TypeConvCode { span: (SourceId(None), bytes(229..287)), code: "let mut {to_var}: {to_var_type} = if ! {from_var} . is_null () { Some (o) } else { None } ;", params: ["{to_var}", "{from_var}"] }) }), ftype_left_to_right: [], ftype_right_to_left: [FTypeConvRule { req_modules: [], cfg_option: None, left_right_ty: OnlyRight(FTypeName { name: "/*opt ref*/const swig_f_type!(T) *", sp: bytes(342..378) }), input_to_output: false, unique_prefix: Some(SpannedSmolStr { sp: bytes(324..337), value: "/*opt ref*/" }), code: Some(TypeConvCode { span: (SourceId(None), bytes(379..480)), code: "\n {to_var_type} = ({from_var} != nullptr) ? static_cast(* {from_var}) : nullptr;\n", params: ["{from_var}", "{to_var_type}"] }) }], c_types: None, generic_c_types: None, f_code: [], generic_aliases: [] } [INFO] [stdout] [INFO] [stdout] thread 'typemap::typemap_macro::tests::test_expand_generic_type_with_ptr' (54) panicked at src/typemap/typemap_macro/tests.rs:534:5: [INFO] [stdout] assertion `left == right` failed [INFO] [stdout] left: RTypeConvRule { left_ty: Path(TypePath { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: Option }, arguments: AngleBracketed(AngleBracketedGenericArguments { colon2_token: None, lt_token: Lt, args: [Type(Reference(TypeReference { and_token: And, lifetime: None, mutability: None, elem: Path(TypePath { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: u32 }, arguments: None }] } }) }))], gt_token: Gt }) }] } }), right_ty: Some(Ptr(TypePtr { star_token: Star, const_token: Some(Const), mutability: None, elem: Path(TypePath { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: u32 }, arguments: None }] } }) })), code: Some(TypeConvCode { span: (SourceId(None), bytes(0..0)), code: "let mut {to_var}: {to_var_type} = if ! {from_var} . is_null ( ) { Some ( o ) } else { None } ;", params: ["{to_var}", "{from_var}"] }) } [INFO] [stdout] right: RTypeConvRule { left_ty: Path(TypePath { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: Option, span: bytes(183..189) }, arguments: AngleBracketed(AngleBracketedGenericArguments { colon2_token: None, lt_token: Lt, args: [Type(Reference(TypeReference { and_token: And, lifetime: None, mutability: None, elem: Path(TypePath { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: u32 }, arguments: None }] } }) }))], gt_token: Gt }) }] } }), right_ty: Some(Ptr(TypePtr { star_token: Star, const_token: Some(Const), mutability: None, elem: Path(TypePath { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: u32 }, arguments: None }] } }) })), code: Some(TypeConvCode { span: (SourceId(None), bytes(229..287)), code: "let mut {to_var}: {to_var_type} = if ! {from_var} . is_null () { Some (o) } else { None } ;", params: ["{to_var}", "{from_var}"] }) } [INFO] [stdout] stack backtrace: [INFO] [stdout] 0: 0x622ed3b1fb22 - std::backtrace_rs::backtrace::libunwind::trace::h589a96ef7638b383 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9 [INFO] [stdout] 1: 0x622ed3b1fb22 - std::backtrace_rs::backtrace::trace_unsynchronized::h23a30a7548c40de4 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14 [INFO] [stdout] 2: 0x622ed3b1fb22 - std::sys::backtrace::_print_fmt::h87dabd6535c8c07a [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/sys/backtrace.rs:66:9 [INFO] [stdout] 3: 0x622ed3b1fb22 - ::fmt::hffd20ad4e5eca8ab [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/sys/backtrace.rs:39:26 [INFO] [stdout] 4: 0x622ed3b30acf - core::fmt::rt::Argument::fmt::h75c83e3fd5ce2419 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/fmt/rt.rs:173:76 [INFO] [stdout] 5: 0x622ed3b30acf - core::fmt::write::h6d9d3a7cfd7b84f5 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/fmt/mod.rs:1468:25 [INFO] [stdout] 6: 0x622ed3aecf33 - std::io::default_write_fmt::he11a713685e2464d [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/io/mod.rs:639:11 [INFO] [stdout] 7: 0x622ed3aecf33 - std::io::Write::write_fmt::h9d08f7e050bd2612 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/io/mod.rs:1954:13 [INFO] [stdout] 8: 0x622ed3af8d32 - std::sys::backtrace::BacktraceLock::print::hb28797143397220e [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/sys/backtrace.rs:42:9 [INFO] [stdout] 9: 0x622ed3afd7df - std::panicking::default_hook::{{closure}}::h7555113b62983743 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:301:27 [INFO] [stdout] 10: 0x622ed3afd671 - std::panicking::default_hook::h2714b564abe8d914 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:325:9 [INFO] [stdout] 11: 0x622ed3930efe - as core::ops::function::Fn>::call::h0e9de8cceb22406e [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/alloc/src/boxed.rs:1999:9 [INFO] [stdout] 12: 0x622ed3930efe - test::test_main_with_exit_callback::{{closure}}::h8125bd66cf4739d0 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/test/src/lib.rs:145:21 [INFO] [stdout] 13: 0x622ed3afdf2e - as core::ops::function::Fn>::call::h1fd0a0802eaec16b [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/alloc/src/boxed.rs:1999:9 [INFO] [stdout] 14: 0x622ed3afdf2e - std::panicking::panic_with_hook::h190dc82263685ec5 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:842:13 [INFO] [stdout] 15: 0x622ed3afdc4a - std::panicking::panic_handler::{{closure}}::h8b036a1b366643ac [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:707:13 [INFO] [stdout] 16: 0x622ed3af8e69 - std::sys::backtrace::__rust_end_short_backtrace::h45affcfc0c830da8 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/sys/backtrace.rs:174:18 [INFO] [stdout] 17: 0x622ed3ae112d - __rustc[9b67c8562bba447b]::rust_begin_unwind [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:698:5 [INFO] [stdout] 18: 0x622ed3b395f0 - core::panicking::panic_fmt::hc084f85b1e76c16d [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/panicking.rs:75:14 [INFO] [stdout] 19: 0x622ed3b393a3 - core::panicking::assert_failed_inner::h1215dc8d5a90adff [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/panicking.rs:439:17 [INFO] [stdout] 20: 0x622ed353def2 - core::panicking::assert_failed::h7c1b5a7a97b1ec22 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/panicking.rs:394:5 [INFO] [stdout] 21: 0x622ed357ab99 - rust_swig::typemap::typemap_macro::tests::test_expand_generic_type_with_ptr::h7dff9f863eea7ca3 [INFO] [stdout] at /opt/rustwide/workdir/src/typemap/typemap_macro/tests.rs:534:5 [INFO] [stdout] 22: 0x622ed357ae57 - rust_swig::typemap::typemap_macro::tests::test_expand_generic_type_with_ptr::{{closure}}::h4ba4f638a1d9a07b [INFO] [stdout] at /opt/rustwide/workdir/src/typemap/typemap_macro/tests.rs:503:39 [INFO] [stdout] 23: 0x622ed3650336 - core::ops::function::FnOnce::call_once::ha74d2b2bdd78619b [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 24: 0x622ed3930cbb - core::ops::function::FnOnce::call_once::hdbf42be2a49fb464 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 25: 0x622ed3930cbb - test::__rust_begin_short_backtrace::h8ae08814d38cb356 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/test/src/lib.rs:663:18 [INFO] [stdout] 26: 0x622ed39467a5 - test::run_test_in_process::{{closure}}::h54574ee4f414d690 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/test/src/lib.rs:686:74 [INFO] [stdout] 27: 0x622ed39467a5 - as core::ops::function::FnOnce<()>>::call_once::h01a0b7e7aad1a501 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 28: 0x622ed39467a5 - std::panicking::catch_unwind::do_call::h23820e817c5612cd [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:590:40 [INFO] [stdout] 29: 0x622ed39467a5 - std::panicking::catch_unwind::h89c73a1febce5587 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:553:19 [INFO] [stdout] 30: 0x622ed39467a5 - std::panic::catch_unwind::h6f55caf410861914 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panic.rs:359:14 [INFO] [stdout] 31: 0x622ed39467a5 - test::run_test_in_process::h4db851878e5d3983 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/test/src/lib.rs:686:27 [INFO] [stdout] 32: 0x622ed39467a5 - test::run_test::{{closure}}::h57e8c5acaceacd24 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/test/src/lib.rs:607:43 [INFO] [stdout] 33: 0x622ed391d194 - test::run_test::{{closure}}::he775ccc3a9d3b97e [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/test/src/lib.rs:637:41 [INFO] [stdout] 34: 0x622ed391d194 - std::sys::backtrace::__rust_begin_short_backtrace::hcd94d85d7765225a [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/sys/backtrace.rs:158:18 [INFO] [stdout] 35: 0x622ed39209da - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::ha814de8393f07830 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/thread/mod.rs:559:17 [INFO] [stdout] 36: 0x622ed39209da - as core::ops::function::FnOnce<()>>::call_once::h8deb00af0abdeaf1 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/panic/unwind_safe.rs:272:9 [INFO] [stdout] 37: 0x622ed39209da - std::panicking::catch_unwind::do_call::h1917979b0c279ea2 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:590:40 [INFO] [stdout] 38: 0x622ed39209da - std::panicking::catch_unwind::h791ad91fee6ce34e [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panicking.rs:553:19 [INFO] [stdout] 39: 0x622ed39209da - std::panic::catch_unwind::h982b8f40ed9c3cce [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/panic.rs:359:14 [INFO] [stdout] 40: 0x622ed39209da - std::thread::Builder::spawn_unchecked_::{{closure}}::h545e54700c945db4 [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/thread/mod.rs:557:30 [INFO] [stdout] 41: 0x622ed39209da - core::ops::function::FnOnce::call_once{{vtable.shim}}::hb427481a5227d78a [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/ops/function.rs:253:5 [INFO] [stdout] 42: 0x622ed3af30ef - as core::ops::function::FnOnce>::call_once::h1d452951a81e9d0a [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/alloc/src/boxed.rs:1985:9 [INFO] [stdout] 43: 0x622ed3af30ef - std::sys::pal::unix::thread::Thread::new::thread_start::h29c84e109630689a [INFO] [stdout] at /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/std/src/sys/pal/unix/thread.rs:118:17 [INFO] [stdout] 44: 0x7392c50aaaa4 - [INFO] [stdout] 45: 0x7392c5137a34 - clone [INFO] [stdout] 46: 0x0 - [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] failures: [INFO] [stdout] typemap::ast::tests::test_normalize_ty [INFO] [stdout] typemap::parse::tests::test_unpack_first_associated_type [INFO] [stdout] typemap::typemap_macro::tests::test_expand_generic_type_with_ptr [INFO] [stdout] typemap::typemap_macro::tests::test_foreign_typemap_cpp_bool [INFO] [stdout] typemap::typemap_macro::tests::test_foreign_typemap_cpp_pair_syntax [INFO] [stdout] [INFO] [stdout] test result: FAILED. 47 passed; 5 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.36s [INFO] [stdout] [INFO] [stderr] error: test failed, to rerun pass `--lib` [INFO] running `Command { std: "docker" "inspect" "574e99e04a9131280a34a660474e1f6cf2e1f403206349a6566cd104e3674216", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "574e99e04a9131280a34a660474e1f6cf2e1f403206349a6566cd104e3674216", kill_on_drop: false }` [INFO] [stdout] 574e99e04a9131280a34a660474e1f6cf2e1f403206349a6566cd104e3674216