[INFO] cloning repository https://github.com/tanakh/wsl-get
[INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/tanakh/wsl-get" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftanakh%2Fwsl-get", kill_on_drop: false }`
[INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftanakh%2Fwsl-get'...
[INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }`
[INFO] [stdout] a0ff5f32916ce1b55a55c3220eae4097ba3aa6f6
[INFO] checking tanakh/wsl-get against try#b66808126f24f2f30898306a881e1676824ea80c for pr-133502-23
[INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftanakh%2Fwsl-get" "/workspace/builds/worker-7-tc2/source", kill_on_drop: false }`
[INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc2/source'...
[INFO] [stderr] done.
[INFO] started tweaking git repo https://github.com/tanakh/wsl-get
[INFO] finished tweaking git repo https://github.com/tanakh/wsl-get
[INFO] tweaked toml for git repo https://github.com/tanakh/wsl-get written to /workspace/builds/worker-7-tc2/source/Cargo.toml
[INFO] validating manifest of git repo https://github.com/tanakh/wsl-get on toolchain b66808126f24f2f30898306a881e1676824ea80c
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+b66808126f24f2f30898306a881e1676824ea80c" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }`
[INFO] crate git repo https://github.com/tanakh/wsl-get already has a lockfile, it will not be regenerated
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+b66808126f24f2f30898306a881e1676824ea80c" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }`
[INFO] [stderr]     Blocking waiting for file lock on package cache
[INFO] [stderr]     Updating crates.io index
[INFO] [stderr]     Blocking waiting for file lock on package cache
[ERROR] error running command: no output for 300 seconds
[INFO] checking tanakh/wsl-get against try#b66808126f24f2f30898306a881e1676824ea80c for pr-133502-23
[INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftanakh%2Fwsl-get" "/workspace/builds/worker-7-tc2/source", kill_on_drop: false }`
[INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc2/source'...
[INFO] [stderr] done.
[INFO] started tweaking git repo https://github.com/tanakh/wsl-get
[INFO] finished tweaking git repo https://github.com/tanakh/wsl-get
[INFO] tweaked toml for git repo https://github.com/tanakh/wsl-get written to /workspace/builds/worker-7-tc2/source/Cargo.toml
[INFO] validating manifest of git repo https://github.com/tanakh/wsl-get on toolchain b66808126f24f2f30898306a881e1676824ea80c
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+b66808126f24f2f30898306a881e1676824ea80c" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }`
[INFO] crate git repo https://github.com/tanakh/wsl-get already has a lockfile, it will not be regenerated
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+b66808126f24f2f30898306a881e1676824ea80c" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }`
[INFO] [stderr]     Blocking waiting for file lock on package cache
[INFO] [stderr]     Blocking waiting for file lock on package cache
[INFO] [stderr]  Downloading crates ...
[INFO] [stderr]   Downloaded windows_macros v0.11.0
[INFO] [stderr]   Downloaded const-sha1 v0.2.0
[INFO] [stderr]   Downloaded argopt-impl v0.1.0
[INFO] [stderr]   Downloaded windows v0.11.0
[INFO] [stderr]   Downloaded argopt v0.1.1
[INFO] [stderr]   Downloaded dialoguer v0.8.0
[INFO] [stderr]   Downloaded zeroize v1.3.0
[INFO] [stderr]   Downloaded flate2 v1.0.20
[INFO] [stderr]   Downloaded console v0.14.1
[INFO] [stderr]   Downloaded anyhow v1.0.41
[INFO] [stderr]   Downloaded libc v0.2.97
[INFO] [stderr]   Downloaded windows_gen v0.11.0
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc2/target:/opt/rustwide/target:rw,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" "-m" "1610612736" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:3d5ced03c013a94a2f102a4510f48a6e9184255caf5fd8244f58017bde7f5210" "sleep" "infinity", kill_on_drop: false }`
[INFO] [stdout] f833e113182feb980f01e52299d45d0292b3c478b2b29c72576622cb1e8eea61
[INFO] running `Command { std: "docker" "start" "f833e113182feb980f01e52299d45d0292b3c478b2b29c72576622cb1e8eea61", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "inspect" "f833e113182feb980f01e52299d45d0292b3c478b2b29c72576622cb1e8eea61", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-w" "/opt/rustwide/workdir" "--user" "0:0" "f833e113182feb980f01e52299d45d0292b3c478b2b29c72576622cb1e8eea61" "/opt/rustwide/cargo-home/bin/cargo" "+b66808126f24f2f30898306a881e1676824ea80c" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "inspect" "f833e113182feb980f01e52299d45d0292b3c478b2b29c72576622cb1e8eea61", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-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" "-w" "/opt/rustwide/workdir" "--user" "0:0" "f833e113182feb980f01e52299d45d0292b3c478b2b29c72576622cb1e8eea61" "/opt/rustwide/cargo-home/bin/cargo" "+b66808126f24f2f30898306a881e1676824ea80c" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }`
[INFO] [stderr]    Compiling proc-macro2 v1.0.27
[INFO] [stderr]    Compiling libc v0.2.97
[INFO] [stderr]    Compiling unicode-xid v0.2.2
[INFO] [stderr]    Compiling syn v1.0.73
[INFO] [stderr]    Compiling memchr v2.4.0
[INFO] [stderr]     Checking unicode-width v0.1.8
[INFO] [stderr]    Compiling windows_gen v0.11.0
[INFO] [stderr]    Compiling ident_case v1.0.1
[INFO] [stderr]    Compiling strsim v0.9.3
[INFO] [stderr]    Compiling fnv v1.0.7
[INFO] [stderr]    Compiling proc-macro-error-attr v1.0.4
[INFO] [stderr]    Compiling proc-macro-error v1.0.4
[INFO] [stderr]    Compiling unicode-segmentation v1.7.1
[INFO] [stderr]    Compiling miniz_oxide v0.4.4
[INFO] [stderr]     Checking regex-syntax v0.6.25
[INFO] [stderr]     Checking ansi_term v0.11.0
[INFO] [stderr]    Compiling const-sha1 v0.2.0
[INFO] [stderr]     Checking textwrap v0.11.0
[INFO] [stderr]     Checking strsim v0.8.0
[INFO] [stderr]    Compiling anyhow v1.0.41
[INFO] [stderr]     Checking remove_dir_all v0.5.3
[INFO] [stderr]     Checking zeroize v1.3.0
[INFO] [stderr]     Checking scopeguard v1.1.0
[INFO] [stderr]    Compiling heck v0.3.3
[INFO] [stderr]     Checking aho-corasick v0.7.18
[INFO] [stderr]     Checking getrandom v0.2.3
[INFO] [stderr]     Checking atty v0.2.14
[INFO] [stderr]     Checking terminal_size v0.1.17
[INFO] [stderr]     Checking dirs-sys v0.3.6
[INFO] [stderr]     Checking directories v3.0.2
[INFO] [stderr]     Checking clap v2.33.3
[INFO] [stderr]     Checking rand_core v0.6.3
[INFO] [stderr]    Compiling quote v1.0.9
[INFO] [stderr]     Checking flate2 v1.0.20
[INFO] [stderr]     Checking rand_chacha v0.3.1
[INFO] [stderr]     Checking rand v0.8.4
[INFO] [stderr]     Checking regex v1.5.4
[INFO] [stderr]     Checking tempfile v3.2.0
[INFO] [stderr]     Checking console v0.14.1
[INFO] [stderr]     Checking dialoguer v0.8.0
[INFO] [stderr]    Compiling darling_core v0.10.2
[INFO] [stderr]    Compiling windows_macros v0.11.0
[INFO] [stderr]    Compiling structopt-derive v0.4.14
[INFO] [stderr]    Compiling windows v0.11.0
[INFO] [stderr]    Compiling darling_macro v0.10.2
[INFO] [stderr]     Checking structopt v0.3.21
[INFO] [stderr]    Compiling darling v0.10.2
[INFO] [stderr]    Compiling argopt-impl v0.1.0
[INFO] [stderr]     Checking argopt v0.1.1
[INFO] [stderr]    Compiling wsl-get v0.1.0 (/opt/rustwide/workdir)
[INFO] [stdout] warning: fields `distribution_version`, `default_uid`, and `default_environment_variables` are never read
[INFO] [stdout]   --> src/wsl.rs:62:9
[INFO] [stdout]    |
[INFO] [stdout] 61 | pub struct DistributionConfiguration {
[INFO] [stdout]    |            ------------------------- fields in this struct
[INFO] [stdout] 62 |     pub distribution_version: u32,
[INFO] [stdout]    |         ^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] 63 |     pub default_uid: u32,
[INFO] [stdout]    |         ^^^^^^^^^^^
[INFO] [stdout] 64 |     pub wsl_distribution_flags: WSL_DISTRIBUTION_FLAGS,
[INFO] [stdout] 65 |     pub default_environment_variables: Vec<String>,
[INFO] [stdout]    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]    |
[INFO] [stdout]    = note: `DistributionConfiguration` 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: unused return value of `Box::<T>::from_raw` that must be used
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/wsl-get-8d754686fc65ee5a/out/windows.rs:1:3899
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... if ! value . 0 . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: In...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]   |
[INFO] [stdout]   = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box`
[INFO] [stdout]   = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default
[INFO] [stdout] help: use `let _ = ...` to ignore the resulting value
[INFO] [stdout]   |
[INFO] [stdout] 1 | # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Windows { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Win32 { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Foundation { # [ repr ( transparent ) ] # [ derive ( :: std :: default :: Default , :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: fmt :: Debug ) ] pub struct BOOL ( pub i32 ) ; unsafe impl :: windows :: Abi for BOOL { type Abi = Self ; } impl BOOL { # [ inline ] pub fn as_bool ( self ) -> bool { ! ( self . 0 == 0 ) } # [ inline ] pub fn ok ( self ) -> :: windows :: Result < ( ) > { if self . as_bool ( ) { Ok ( ( ) ) } else { Err ( :: windows :: HRESULT :: from_thread ( ) . into ( ) ) } } # [ inline ] pub fn unwrap ( self ) { self . ok ( ) . unwrap ( ) ; } # [ inline ] pub fn expect ( self , msg : & str ) { self . ok ( ) . expect ( msg ) ; } } impl :: std :: convert :: From < BOOL > for bool { fn from ( value : BOOL ) -> Self { value . as_bool ( ) } } impl :: std :: convert :: From < & BOOL > for bool { fn from ( value : & BOOL ) -> Self { value . as_bool ( ) } } impl :: std :: convert :: From < bool > for BOOL { fn from ( value : bool ) -> Self { if value { BOOL ( 1 ) } else { BOOL ( 0 ) } } } impl :: std :: convert :: From < & bool > for BOOL { fn from ( value : & bool ) -> Self { ( * value ) . into ( ) } } impl :: std :: cmp :: PartialEq < bool > for BOOL { fn eq ( & self , other : & bool ) -> bool { self . as_bool ( ) == * other } } impl :: std :: cmp :: PartialEq < BOOL > for bool { fn eq ( & self , other : & BOOL ) -> bool { * self == other . as_bool ( ) } } impl std :: ops :: Not for BOOL { type Output = Self ; fn not ( self ) -> Self :: Output { if self . as_bool ( ) { BOOL ( 0 ) } else { BOOL ( 1 ) } } } impl < 'a > :: windows :: IntoParam < 'a , BOOL > for bool { fn into_param ( self ) -> :: windows :: Param < 'a , BOOL > { :: windows :: Param :: Owned ( self . into ( ) ) } } # [ repr ( transparent ) ] # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] pub struct HINSTANCE ( pub isize ) ; impl HINSTANCE { } impl :: std :: default :: Default for HINSTANCE { fn default ( ) -> Self { Self ( 0 ) } } impl HINSTANCE { pub const NULL : Self = Self ( 0 ) ; pub fn is_null ( & self ) -> bool { self . 0 == 0 } } impl :: std :: fmt :: Debug for HINSTANCE { fn fmt ( & self , fmt : & mut :: std :: fmt :: Formatter < '_ > ) -> :: std :: fmt :: Result { fmt . debug_struct ( "HINSTANCE" ) . field ( "Value" , & format_args ! ( "{:?}" , self .0 ) ) . finish ( ) } } impl :: std :: cmp :: PartialEq for HINSTANCE { fn eq ( & self , other : & Self ) -> bool { self .0 == other .0 } } impl :: std :: cmp :: Eq for HINSTANCE { } unsafe impl :: windows :: Abi for HINSTANCE { type Abi = Self ; } pub type FARPROC = unsafe extern "system" fn ( ) -> isize ; # [ repr ( transparent ) ] # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: cmp :: Eq , :: std :: fmt :: Debug ) ] pub struct PSTR ( pub * mut u8 ) ; impl PSTR { pub const NULL : Self = Self ( :: std :: ptr :: null_mut ( ) ) ; pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } impl :: std :: cmp :: PartialEq for PSTR { fn eq ( & self , other : & Self ) -> bool { self . 0 == other . 0 } } unsafe impl :: windows :: Abi for PSTR { type Abi = Self ; fn drop_param ( param : & mut :: windows :: Param < Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . 0 . is_null ( ) { unsafe { let _ = :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for & 'a str { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ repr ( transparent ) ] # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: cmp :: Eq , :: std :: fmt :: Debug ) ] pub struct PWSTR ( pub * mut u16 ) ; impl PWSTR { pub const NULL : Self = Self ( :: std :: ptr :: null_mut ( ) ) ; pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PWSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } impl :: std :: cmp :: PartialEq for PWSTR { fn eq ( & self , other : & Self ) -> bool { self . 0 == other . 0 } } unsafe impl :: windows :: Abi for PWSTR { type Abi = Self ; fn drop_param ( param : & mut :: windows :: Param < Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . 0 . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & 'a str { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ repr ( transparent ) ] # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] pub struct HANDLE ( pub isize ) ; impl HANDLE { } impl :: std :: default :: Default for HANDLE { fn default ( ) -> Self { Self ( 0 ) } } impl HANDLE { pub const NULL : Self = Self ( 0 ) ; pub fn is_null ( & self ) -> bool { self . 0 == 0 } } impl :: std :: fmt :: Debug for HANDLE { fn fmt ( & self , fmt : & mut :: std :: fmt :: Formatter < '_ > ) -> :: std :: fmt :: Result { fmt . debug_struct ( "HANDLE" ) . field ( "Value" , & format_args ! ( "{:?}" , self .0 ) ) . finish ( ) } } impl :: std :: cmp :: PartialEq for HANDLE { fn eq ( & self , other : & Self ) -> bool { self .0 == other .0 } } impl :: std :: cmp :: Eq for HANDLE { } unsafe impl :: windows :: Abi for HANDLE { type Abi = Self ; } impl HANDLE { pub const INVALID : Self = Self ( - 1 ) ; pub fn is_invalid ( & self ) -> bool { self . 0 == - 1 } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Com { pub unsafe fn CoTaskMemFree < > ( pv : * mut :: std :: ffi :: c_void , ) { # [ cfg ( windows ) ] { # [ link ( name ="OLE32" ) ] extern "system" { fn CoTaskMemFree ( pv : * mut :: std :: ffi :: c_void ) ; } CoTaskMemFree ( :: std :: mem :: transmute ( pv ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod LibraryLoader { pub unsafe fn FreeLibrary < 'a , > ( hlibmodule : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: HINSTANCE > , ) -> super :: super :: Foundation :: BOOL { # [ cfg ( windows ) ] { # [ link ( name ="KERNEL32" ) ] extern "system" { fn FreeLibrary ( hlibmodule : super :: super :: Foundation :: HINSTANCE ) -> super :: super :: Foundation :: BOOL ; } FreeLibrary ( hlibmodule . into_param ( ) . abi ( ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } pub unsafe fn GetProcAddress < 'a , > ( hmodule : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: HINSTANCE > , lpprocname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PSTR > , ) -> :: std :: option :: Option < super :: super :: Foundation :: FARPROC > { # [ cfg ( windows ) ] { # [ link ( name ="KERNEL32" ) ] extern "system" { fn GetProcAddress ( hmodule : super :: super :: Foundation :: HINSTANCE , lpprocname : super :: super :: Foundation :: PSTR ) -> :: std :: option :: Option < super :: super :: Foundation :: FARPROC > ; } GetProcAddress ( hmodule . into_param ( ) . abi ( ) , lpprocname . into_param ( ) . abi ( ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct LOAD_LIBRARY_FLAGS ( pub u32 ) ; pub const DONT_RESOLVE_DLL_REFERENCES : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 1u32 ) ; pub const LOAD_LIBRARY_AS_DATAFILE : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 2u32 ) ; pub const LOAD_WITH_ALTERED_SEARCH_PATH : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 8u32 ) ; pub const LOAD_IGNORE_CODE_AUTHZ_LEVEL : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 16u32 ) ; pub const LOAD_LIBRARY_AS_IMAGE_RESOURCE : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 32u32 ) ; pub const LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 64u32 ) ; pub const LOAD_LIBRARY_REQUIRE_SIGNED_TARGET : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 128u32 ) ; pub const LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 256u32 ) ; pub const LOAD_LIBRARY_SEARCH_APPLICATION_DIR : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 512u32 ) ; pub const LOAD_LIBRARY_SEARCH_USER_DIRS : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 1024u32 ) ; pub const LOAD_LIBRARY_SEARCH_SYSTEM32 : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 2048u32 ) ; pub const LOAD_LIBRARY_SEARCH_DEFAULT_DIRS : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 4096u32 ) ; pub const LOAD_LIBRARY_SAFE_CURRENT_DIRS : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 8192u32 ) ; pub const LOAD_LIBRARY_SEARCH_SYSTEM32_NO_FORWARDER : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 16384u32 ) ; impl :: std :: convert :: From < u32 > for LOAD_LIBRARY_FLAGS { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for LOAD_LIBRARY_FLAGS { type Abi = Self ; } impl :: std :: ops :: BitOr for LOAD_LIBRARY_FLAGS { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for LOAD_LIBRARY_FLAGS { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for LOAD_LIBRARY_FLAGS { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for LOAD_LIBRARY_FLAGS { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } pub unsafe fn LoadLibraryExW < 'a , > ( lplibfilename : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , hfile : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: HANDLE > , dwflags : LOAD_LIBRARY_FLAGS , ) -> super :: super :: Foundation :: HINSTANCE { # [ cfg ( windows ) ] { # [ link ( name ="KERNEL32" ) ] extern "system" { fn LoadLibraryExW ( lplibfilename : super :: super :: Foundation :: PWSTR , hfile : super :: super :: Foundation :: HANDLE , dwflags : LOAD_LIBRARY_FLAGS ) -> super :: super :: Foundation :: HINSTANCE ; } LoadLibraryExW ( lplibfilename . into_param ( ) . abi ( ) , hfile . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( dwflags ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod SubsystemForLinux { # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct WSL_DISTRIBUTION_FLAGS ( pub u32 ) ; pub const WSL_DISTRIBUTION_FLAGS_NONE : WSL_DISTRIBUTION_FLAGS = WSL_DISTRIBUTION_FLAGS ( 0u32 ) ; pub const WSL_DISTRIBUTION_FLAGS_ENABLE_INTEROP : WSL_DISTRIBUTION_FLAGS = WSL_DISTRIBUTION_FLAGS ( 1u32 ) ; pub const WSL_DISTRIBUTION_FLAGS_APPEND_NT_PATH : WSL_DISTRIBUTION_FLAGS = WSL_DISTRIBUTION_FLAGS ( 2u32 ) ; pub const WSL_DISTRIBUTION_FLAGS_ENABLE_DRIVE_MOUNTING : WSL_DISTRIBUTION_FLAGS = WSL_DISTRIBUTION_FLAGS ( 4u32 ) ; impl :: std :: convert :: From < u32 > for WSL_DISTRIBUTION_FLAGS { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for WSL_DISTRIBUTION_FLAGS { type Abi = Self ; } impl :: std :: ops :: BitOr for WSL_DISTRIBUTION_FLAGS { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for WSL_DISTRIBUTION_FLAGS { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for WSL_DISTRIBUTION_FLAGS { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for WSL_DISTRIBUTION_FLAGS { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } pub unsafe fn WslLaunch < 'a , > ( distributionname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , command : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , usecurrentworkingdirectory : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: BOOL > , stdin : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: HANDLE > , stdout : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: HANDLE > , stderr : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: HANDLE > , process : * mut super :: super :: Foundation :: HANDLE , ) -> :: windows :: HRESULT { # [ cfg ( windows ) ] { # [ link ( name ="onecoreuap" ) ] extern "system" { fn WslLaunch ( distributionname : super :: super :: Foundation :: PWSTR , command : super :: super :: Foundation :: PWSTR , usecurrentworkingdirectory : super :: super :: Foundation :: BOOL , stdin : super :: super :: Foundation :: HANDLE , stdout : super :: super :: Foundation :: HANDLE , stderr : super :: super :: Foundation :: HANDLE , process : * mut super :: super :: Foundation :: HANDLE ) -> :: windows :: HRESULT ; } WslLaunch ( distributionname . into_param ( ) . abi ( ) , command . into_param ( ) . abi ( ) , usecurrentworkingdirectory . into_param ( ) . abi ( ) , stdin . into_param ( ) . abi ( ) , stdout . into_param ( ) . abi ( ) , stderr . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( process ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } pub unsafe fn WslGetDistributionConfiguration < 'a , > ( distributionname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , distributionversion : * mut u32 , defaultuid : * mut u32 , wsldistributionflags : * mut WSL_DISTRIBUTION_FLAGS , defaultenvironmentvariables : * mut * mut super :: super :: Foundation :: PSTR , defaultenvironmentvariablecount : * mut u32 , ) -> :: windows :: HRESULT { # [ cfg ( windows ) ] { # [ link ( name ="onecoreuap" ) ] extern "system" { fn WslGetDistributionConfiguration ( distributionname : super :: super :: Foundation :: PWSTR , distributionversion : * mut u32 , defaultuid : * mut u32 , wsldistributionflags : * mut WSL_DISTRIBUTION_FLAGS , defaultenvironmentvariables : * mut * mut super :: super :: Foundation :: PSTR , defaultenvironmentvariablecount : * mut u32 ) -> :: windows :: HRESULT ; } WslGetDistributionConfiguration ( distributionname . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( distributionversion ) , :: std :: mem :: transmute ( defaultuid ) , :: std :: mem :: transmute ( wsldistributionflags ) , :: std :: mem :: transmute ( defaultenvironmentvariables ) , :: std :: mem :: transmute ( defaultenvironmentvariablecount ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } pub unsafe fn WslConfigureDistribution < 'a , > ( distributionname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , defaultuid : u32 , wsldistributionflags : WSL_DISTRIBUTION_FLAGS , ) -> :: windows :: HRESULT { # [ cfg ( windows ) ] { # [ link ( name ="onecoreuap" ) ] extern "system" { fn WslConfigureDistribution ( distributionname : super :: super :: Foundation :: PWSTR , defaultuid : u32 , wsldistributionflags : WSL_DISTRIBUTION_FLAGS ) -> :: windows :: HRESULT ; } WslConfigureDistribution ( distributionname . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( defaultuid ) , :: std :: mem :: transmute ( wsldistributionflags ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } pub unsafe fn WslLaunchInteractive < 'a , > ( distributionname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , command : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , usecurrentworkingdirectory : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: BOOL > , exitcode : * mut u32 , ) -> :: windows :: HRESULT { # [ cfg ( windows ) ] { # [ link ( name ="onecoreuap" ) ] extern "system" { fn WslLaunchInteractive ( distributionname : super :: super :: Foundation :: PWSTR , command : super :: super :: Foundation :: PWSTR , usecurrentworkingdirectory : super :: super :: Foundation :: BOOL , exitcode : * mut u32 ) -> :: windows :: HRESULT ; } WslLaunchInteractive ( distributionname . into_param ( ) . abi ( ) , command . into_param ( ) . abi ( ) , usecurrentworkingdirectory . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( exitcode ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } pub unsafe fn WslIsDistributionRegistered < 'a , > ( distributionname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , ) -> super :: super :: Foundation :: BOOL { # [ cfg ( windows ) ] { # [ link ( name ="onecoreuap" ) ] extern "system" { fn WslIsDistributionRegistered ( distributionname : super :: super :: Foundation :: PWSTR ) -> super :: super :: Foundation :: BOOL ; } WslIsDistributionRegistered ( distributionname . into_param ( ) . abi ( ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } pub unsafe fn WslUnregisterDistribution < 'a , > ( distributionname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , ) -> :: windows :: HRESULT { # [ cfg ( windows ) ] { # [ link ( name ="onecoreuap" ) ] extern "system" { fn WslUnregisterDistribution ( distributionname : super :: super :: Foundation :: PWSTR ) -> :: windows :: HRESULT ; } WslUnregisterDistribution ( distributionname . into_param ( ) . abi ( ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } pub struct Apis { } impl Apis { } impl :: windows :: RuntimeName for Apis { const NAME : & 'static str ="Windows.Win32.System.SubsystemForLinux.Apis" ; } pub unsafe fn WslRegisterDistribution < 'a , > ( distributionname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , targzfilename : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , ) -> :: windows :: HRESULT { # [ cfg ( windows ) ] { # [ link ( name ="onecoreuap" ) ] extern "system" { fn WslRegisterDistribution ( distributionname : super :: super :: Foundation :: PWSTR , targzfilename : super :: super :: Foundation :: PWSTR ) -> :: windows :: HRESULT ; } WslRegisterDistribution ( distributionname . into_param ( ) . abi ( ) , targzfilename . into_param ( ) . abi ( ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } } } } }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: unused return value of `Box::<T>::from_raw` that must be used
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/wsl-get-8d754686fc65ee5a/out/windows.rs:1:5440
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... if ! value . 0 . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: In...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]   |
[INFO] [stdout]   = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box`
[INFO] [stdout] help: use `let _ = ...` to ignore the resulting value
[INFO] [stdout]   |
[INFO] [stdout] 1 | # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Windows { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Win32 { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Foundation { # [ repr ( transparent ) ] # [ derive ( :: std :: default :: Default , :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: fmt :: Debug ) ] pub struct BOOL ( pub i32 ) ; unsafe impl :: windows :: Abi for BOOL { type Abi = Self ; } impl BOOL { # [ inline ] pub fn as_bool ( self ) -> bool { ! ( self . 0 == 0 ) } # [ inline ] pub fn ok ( self ) -> :: windows :: Result < ( ) > { if self . as_bool ( ) { Ok ( ( ) ) } else { Err ( :: windows :: HRESULT :: from_thread ( ) . into ( ) ) } } # [ inline ] pub fn unwrap ( self ) { self . ok ( ) . unwrap ( ) ; } # [ inline ] pub fn expect ( self , msg : & str ) { self . ok ( ) . expect ( msg ) ; } } impl :: std :: convert :: From < BOOL > for bool { fn from ( value : BOOL ) -> Self { value . as_bool ( ) } } impl :: std :: convert :: From < & BOOL > for bool { fn from ( value : & BOOL ) -> Self { value . as_bool ( ) } } impl :: std :: convert :: From < bool > for BOOL { fn from ( value : bool ) -> Self { if value { BOOL ( 1 ) } else { BOOL ( 0 ) } } } impl :: std :: convert :: From < & bool > for BOOL { fn from ( value : & bool ) -> Self { ( * value ) . into ( ) } } impl :: std :: cmp :: PartialEq < bool > for BOOL { fn eq ( & self , other : & bool ) -> bool { self . as_bool ( ) == * other } } impl :: std :: cmp :: PartialEq < BOOL > for bool { fn eq ( & self , other : & BOOL ) -> bool { * self == other . as_bool ( ) } } impl std :: ops :: Not for BOOL { type Output = Self ; fn not ( self ) -> Self :: Output { if self . as_bool ( ) { BOOL ( 0 ) } else { BOOL ( 1 ) } } } impl < 'a > :: windows :: IntoParam < 'a , BOOL > for bool { fn into_param ( self ) -> :: windows :: Param < 'a , BOOL > { :: windows :: Param :: Owned ( self . into ( ) ) } } # [ repr ( transparent ) ] # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] pub struct HINSTANCE ( pub isize ) ; impl HINSTANCE { } impl :: std :: default :: Default for HINSTANCE { fn default ( ) -> Self { Self ( 0 ) } } impl HINSTANCE { pub const NULL : Self = Self ( 0 ) ; pub fn is_null ( & self ) -> bool { self . 0 == 0 } } impl :: std :: fmt :: Debug for HINSTANCE { fn fmt ( & self , fmt : & mut :: std :: fmt :: Formatter < '_ > ) -> :: std :: fmt :: Result { fmt . debug_struct ( "HINSTANCE" ) . field ( "Value" , & format_args ! ( "{:?}" , self .0 ) ) . finish ( ) } } impl :: std :: cmp :: PartialEq for HINSTANCE { fn eq ( & self , other : & Self ) -> bool { self .0 == other .0 } } impl :: std :: cmp :: Eq for HINSTANCE { } unsafe impl :: windows :: Abi for HINSTANCE { type Abi = Self ; } pub type FARPROC = unsafe extern "system" fn ( ) -> isize ; # [ repr ( transparent ) ] # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: cmp :: Eq , :: std :: fmt :: Debug ) ] pub struct PSTR ( pub * mut u8 ) ; impl PSTR { pub const NULL : Self = Self ( :: std :: ptr :: null_mut ( ) ) ; pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } impl :: std :: cmp :: PartialEq for PSTR { fn eq ( & self , other : & Self ) -> bool { self . 0 == other . 0 } } unsafe impl :: windows :: Abi for PSTR { type Abi = Self ; fn drop_param ( param : & mut :: windows :: Param < Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . 0 . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for & 'a str { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ repr ( transparent ) ] # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: cmp :: Eq , :: std :: fmt :: Debug ) ] pub struct PWSTR ( pub * mut u16 ) ; impl PWSTR { pub const NULL : Self = Self ( :: std :: ptr :: null_mut ( ) ) ; pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PWSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } impl :: std :: cmp :: PartialEq for PWSTR { fn eq ( & self , other : & Self ) -> bool { self . 0 == other . 0 } } unsafe impl :: windows :: Abi for PWSTR { type Abi = Self ; fn drop_param ( param : & mut :: windows :: Param < Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . 0 . is_null ( ) { unsafe { let _ = :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & 'a str { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ repr ( transparent ) ] # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] pub struct HANDLE ( pub isize ) ; impl HANDLE { } impl :: std :: default :: Default for HANDLE { fn default ( ) -> Self { Self ( 0 ) } } impl HANDLE { pub const NULL : Self = Self ( 0 ) ; pub fn is_null ( & self ) -> bool { self . 0 == 0 } } impl :: std :: fmt :: Debug for HANDLE { fn fmt ( & self , fmt : & mut :: std :: fmt :: Formatter < '_ > ) -> :: std :: fmt :: Result { fmt . debug_struct ( "HANDLE" ) . field ( "Value" , & format_args ! ( "{:?}" , self .0 ) ) . finish ( ) } } impl :: std :: cmp :: PartialEq for HANDLE { fn eq ( & self , other : & Self ) -> bool { self .0 == other .0 } } impl :: std :: cmp :: Eq for HANDLE { } unsafe impl :: windows :: Abi for HANDLE { type Abi = Self ; } impl HANDLE { pub const INVALID : Self = Self ( - 1 ) ; pub fn is_invalid ( & self ) -> bool { self . 0 == - 1 } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Com { pub unsafe fn CoTaskMemFree < > ( pv : * mut :: std :: ffi :: c_void , ) { # [ cfg ( windows ) ] { # [ link ( name ="OLE32" ) ] extern "system" { fn CoTaskMemFree ( pv : * mut :: std :: ffi :: c_void ) ; } CoTaskMemFree ( :: std :: mem :: transmute ( pv ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod LibraryLoader { pub unsafe fn FreeLibrary < 'a , > ( hlibmodule : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: HINSTANCE > , ) -> super :: super :: Foundation :: BOOL { # [ cfg ( windows ) ] { # [ link ( name ="KERNEL32" ) ] extern "system" { fn FreeLibrary ( hlibmodule : super :: super :: Foundation :: HINSTANCE ) -> super :: super :: Foundation :: BOOL ; } FreeLibrary ( hlibmodule . into_param ( ) . abi ( ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } pub unsafe fn GetProcAddress < 'a , > ( hmodule : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: HINSTANCE > , lpprocname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PSTR > , ) -> :: std :: option :: Option < super :: super :: Foundation :: FARPROC > { # [ cfg ( windows ) ] { # [ link ( name ="KERNEL32" ) ] extern "system" { fn GetProcAddress ( hmodule : super :: super :: Foundation :: HINSTANCE , lpprocname : super :: super :: Foundation :: PSTR ) -> :: std :: option :: Option < super :: super :: Foundation :: FARPROC > ; } GetProcAddress ( hmodule . into_param ( ) . abi ( ) , lpprocname . into_param ( ) . abi ( ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct LOAD_LIBRARY_FLAGS ( pub u32 ) ; pub const DONT_RESOLVE_DLL_REFERENCES : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 1u32 ) ; pub const LOAD_LIBRARY_AS_DATAFILE : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 2u32 ) ; pub const LOAD_WITH_ALTERED_SEARCH_PATH : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 8u32 ) ; pub const LOAD_IGNORE_CODE_AUTHZ_LEVEL : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 16u32 ) ; pub const LOAD_LIBRARY_AS_IMAGE_RESOURCE : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 32u32 ) ; pub const LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 64u32 ) ; pub const LOAD_LIBRARY_REQUIRE_SIGNED_TARGET : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 128u32 ) ; pub const LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 256u32 ) ; pub const LOAD_LIBRARY_SEARCH_APPLICATION_DIR : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 512u32 ) ; pub const LOAD_LIBRARY_SEARCH_USER_DIRS : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 1024u32 ) ; pub const LOAD_LIBRARY_SEARCH_SYSTEM32 : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 2048u32 ) ; pub const LOAD_LIBRARY_SEARCH_DEFAULT_DIRS : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 4096u32 ) ; pub const LOAD_LIBRARY_SAFE_CURRENT_DIRS : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 8192u32 ) ; pub const LOAD_LIBRARY_SEARCH_SYSTEM32_NO_FORWARDER : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 16384u32 ) ; impl :: std :: convert :: From < u32 > for LOAD_LIBRARY_FLAGS { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for LOAD_LIBRARY_FLAGS { type Abi = Self ; } impl :: std :: ops :: BitOr for LOAD_LIBRARY_FLAGS { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for LOAD_LIBRARY_FLAGS { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for LOAD_LIBRARY_FLAGS { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for LOAD_LIBRARY_FLAGS { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } pub unsafe fn LoadLibraryExW < 'a , > ( lplibfilename : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , hfile : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: HANDLE > , dwflags : LOAD_LIBRARY_FLAGS , ) -> super :: super :: Foundation :: HINSTANCE { # [ cfg ( windows ) ] { # [ link ( name ="KERNEL32" ) ] extern "system" { fn LoadLibraryExW ( lplibfilename : super :: super :: Foundation :: PWSTR , hfile : super :: super :: Foundation :: HANDLE , dwflags : LOAD_LIBRARY_FLAGS ) -> super :: super :: Foundation :: HINSTANCE ; } LoadLibraryExW ( lplibfilename . into_param ( ) . abi ( ) , hfile . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( dwflags ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod SubsystemForLinux { # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct WSL_DISTRIBUTION_FLAGS ( pub u32 ) ; pub const WSL_DISTRIBUTION_FLAGS_NONE : WSL_DISTRIBUTION_FLAGS = WSL_DISTRIBUTION_FLAGS ( 0u32 ) ; pub const WSL_DISTRIBUTION_FLAGS_ENABLE_INTEROP : WSL_DISTRIBUTION_FLAGS = WSL_DISTRIBUTION_FLAGS ( 1u32 ) ; pub const WSL_DISTRIBUTION_FLAGS_APPEND_NT_PATH : WSL_DISTRIBUTION_FLAGS = WSL_DISTRIBUTION_FLAGS ( 2u32 ) ; pub const WSL_DISTRIBUTION_FLAGS_ENABLE_DRIVE_MOUNTING : WSL_DISTRIBUTION_FLAGS = WSL_DISTRIBUTION_FLAGS ( 4u32 ) ; impl :: std :: convert :: From < u32 > for WSL_DISTRIBUTION_FLAGS { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for WSL_DISTRIBUTION_FLAGS { type Abi = Self ; } impl :: std :: ops :: BitOr for WSL_DISTRIBUTION_FLAGS { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for WSL_DISTRIBUTION_FLAGS { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for WSL_DISTRIBUTION_FLAGS { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for WSL_DISTRIBUTION_FLAGS { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } pub unsafe fn WslLaunch < 'a , > ( distributionname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , command : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , usecurrentworkingdirectory : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: BOOL > , stdin : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: HANDLE > , stdout : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: HANDLE > , stderr : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: HANDLE > , process : * mut super :: super :: Foundation :: HANDLE , ) -> :: windows :: HRESULT { # [ cfg ( windows ) ] { # [ link ( name ="onecoreuap" ) ] extern "system" { fn WslLaunch ( distributionname : super :: super :: Foundation :: PWSTR , command : super :: super :: Foundation :: PWSTR , usecurrentworkingdirectory : super :: super :: Foundation :: BOOL , stdin : super :: super :: Foundation :: HANDLE , stdout : super :: super :: Foundation :: HANDLE , stderr : super :: super :: Foundation :: HANDLE , process : * mut super :: super :: Foundation :: HANDLE ) -> :: windows :: HRESULT ; } WslLaunch ( distributionname . into_param ( ) . abi ( ) , command . into_param ( ) . abi ( ) , usecurrentworkingdirectory . into_param ( ) . abi ( ) , stdin . into_param ( ) . abi ( ) , stdout . into_param ( ) . abi ( ) , stderr . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( process ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } pub unsafe fn WslGetDistributionConfiguration < 'a , > ( distributionname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , distributionversion : * mut u32 , defaultuid : * mut u32 , wsldistributionflags : * mut WSL_DISTRIBUTION_FLAGS , defaultenvironmentvariables : * mut * mut super :: super :: Foundation :: PSTR , defaultenvironmentvariablecount : * mut u32 , ) -> :: windows :: HRESULT { # [ cfg ( windows ) ] { # [ link ( name ="onecoreuap" ) ] extern "system" { fn WslGetDistributionConfiguration ( distributionname : super :: super :: Foundation :: PWSTR , distributionversion : * mut u32 , defaultuid : * mut u32 , wsldistributionflags : * mut WSL_DISTRIBUTION_FLAGS , defaultenvironmentvariables : * mut * mut super :: super :: Foundation :: PSTR , defaultenvironmentvariablecount : * mut u32 ) -> :: windows :: HRESULT ; } WslGetDistributionConfiguration ( distributionname . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( distributionversion ) , :: std :: mem :: transmute ( defaultuid ) , :: std :: mem :: transmute ( wsldistributionflags ) , :: std :: mem :: transmute ( defaultenvironmentvariables ) , :: std :: mem :: transmute ( defaultenvironmentvariablecount ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } pub unsafe fn WslConfigureDistribution < 'a , > ( distributionname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , defaultuid : u32 , wsldistributionflags : WSL_DISTRIBUTION_FLAGS , ) -> :: windows :: HRESULT { # [ cfg ( windows ) ] { # [ link ( name ="onecoreuap" ) ] extern "system" { fn WslConfigureDistribution ( distributionname : super :: super :: Foundation :: PWSTR , defaultuid : u32 , wsldistributionflags : WSL_DISTRIBUTION_FLAGS ) -> :: windows :: HRESULT ; } WslConfigureDistribution ( distributionname . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( defaultuid ) , :: std :: mem :: transmute ( wsldistributionflags ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } pub unsafe fn WslLaunchInteractive < 'a , > ( distributionname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , command : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , usecurrentworkingdirectory : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: BOOL > , exitcode : * mut u32 , ) -> :: windows :: HRESULT { # [ cfg ( windows ) ] { # [ link ( name ="onecoreuap" ) ] extern "system" { fn WslLaunchInteractive ( distributionname : super :: super :: Foundation :: PWSTR , command : super :: super :: Foundation :: PWSTR , usecurrentworkingdirectory : super :: super :: Foundation :: BOOL , exitcode : * mut u32 ) -> :: windows :: HRESULT ; } WslLaunchInteractive ( distributionname . into_param ( ) . abi ( ) , command . into_param ( ) . abi ( ) , usecurrentworkingdirectory . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( exitcode ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } pub unsafe fn WslIsDistributionRegistered < 'a , > ( distributionname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , ) -> super :: super :: Foundation :: BOOL { # [ cfg ( windows ) ] { # [ link ( name ="onecoreuap" ) ] extern "system" { fn WslIsDistributionRegistered ( distributionname : super :: super :: Foundation :: PWSTR ) -> super :: super :: Foundation :: BOOL ; } WslIsDistributionRegistered ( distributionname . into_param ( ) . abi ( ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } pub unsafe fn WslUnregisterDistribution < 'a , > ( distributionname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , ) -> :: windows :: HRESULT { # [ cfg ( windows ) ] { # [ link ( name ="onecoreuap" ) ] extern "system" { fn WslUnregisterDistribution ( distributionname : super :: super :: Foundation :: PWSTR ) -> :: windows :: HRESULT ; } WslUnregisterDistribution ( distributionname . into_param ( ) . abi ( ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } pub struct Apis { } impl Apis { } impl :: windows :: RuntimeName for Apis { const NAME : & 'static str ="Windows.Win32.System.SubsystemForLinux.Apis" ; } pub unsafe fn WslRegisterDistribution < 'a , > ( distributionname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , targzfilename : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , ) -> :: windows :: HRESULT { # [ cfg ( windows ) ] { # [ link ( name ="onecoreuap" ) ] extern "system" { fn WslRegisterDistribution ( distributionname : super :: super :: Foundation :: PWSTR , targzfilename : super :: super :: Foundation :: PWSTR ) -> :: windows :: HRESULT ; } WslRegisterDistribution ( distributionname . into_param ( ) . abi ( ) , targzfilename . into_param ( ) . abi ( ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } } } } }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: fields `distribution_version`, `default_uid`, and `default_environment_variables` are never read
[INFO] [stdout]   --> src/wsl.rs:62:9
[INFO] [stdout]    |
[INFO] [stdout] 61 | pub struct DistributionConfiguration {
[INFO] [stdout]    |            ------------------------- fields in this struct
[INFO] [stdout] 62 |     pub distribution_version: u32,
[INFO] [stdout]    |         ^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] 63 |     pub default_uid: u32,
[INFO] [stdout]    |         ^^^^^^^^^^^
[INFO] [stdout] 64 |     pub wsl_distribution_flags: WSL_DISTRIBUTION_FLAGS,
[INFO] [stdout] 65 |     pub default_environment_variables: Vec<String>,
[INFO] [stdout]    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]    |
[INFO] [stdout]    = note: `DistributionConfiguration` 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: unused return value of `Box::<T>::from_raw` that must be used
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/wsl-get-8d754686fc65ee5a/out/windows.rs:1:3899
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... if ! value . 0 . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: In...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]   |
[INFO] [stdout]   = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box`
[INFO] [stdout]   = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default
[INFO] [stdout] help: use `let _ = ...` to ignore the resulting value
[INFO] [stdout]   |
[INFO] [stdout] 1 | # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Windows { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Win32 { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Foundation { # [ repr ( transparent ) ] # [ derive ( :: std :: default :: Default , :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: fmt :: Debug ) ] pub struct BOOL ( pub i32 ) ; unsafe impl :: windows :: Abi for BOOL { type Abi = Self ; } impl BOOL { # [ inline ] pub fn as_bool ( self ) -> bool { ! ( self . 0 == 0 ) } # [ inline ] pub fn ok ( self ) -> :: windows :: Result < ( ) > { if self . as_bool ( ) { Ok ( ( ) ) } else { Err ( :: windows :: HRESULT :: from_thread ( ) . into ( ) ) } } # [ inline ] pub fn unwrap ( self ) { self . ok ( ) . unwrap ( ) ; } # [ inline ] pub fn expect ( self , msg : & str ) { self . ok ( ) . expect ( msg ) ; } } impl :: std :: convert :: From < BOOL > for bool { fn from ( value : BOOL ) -> Self { value . as_bool ( ) } } impl :: std :: convert :: From < & BOOL > for bool { fn from ( value : & BOOL ) -> Self { value . as_bool ( ) } } impl :: std :: convert :: From < bool > for BOOL { fn from ( value : bool ) -> Self { if value { BOOL ( 1 ) } else { BOOL ( 0 ) } } } impl :: std :: convert :: From < & bool > for BOOL { fn from ( value : & bool ) -> Self { ( * value ) . into ( ) } } impl :: std :: cmp :: PartialEq < bool > for BOOL { fn eq ( & self , other : & bool ) -> bool { self . as_bool ( ) == * other } } impl :: std :: cmp :: PartialEq < BOOL > for bool { fn eq ( & self , other : & BOOL ) -> bool { * self == other . as_bool ( ) } } impl std :: ops :: Not for BOOL { type Output = Self ; fn not ( self ) -> Self :: Output { if self . as_bool ( ) { BOOL ( 0 ) } else { BOOL ( 1 ) } } } impl < 'a > :: windows :: IntoParam < 'a , BOOL > for bool { fn into_param ( self ) -> :: windows :: Param < 'a , BOOL > { :: windows :: Param :: Owned ( self . into ( ) ) } } # [ repr ( transparent ) ] # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] pub struct HINSTANCE ( pub isize ) ; impl HINSTANCE { } impl :: std :: default :: Default for HINSTANCE { fn default ( ) -> Self { Self ( 0 ) } } impl HINSTANCE { pub const NULL : Self = Self ( 0 ) ; pub fn is_null ( & self ) -> bool { self . 0 == 0 } } impl :: std :: fmt :: Debug for HINSTANCE { fn fmt ( & self , fmt : & mut :: std :: fmt :: Formatter < '_ > ) -> :: std :: fmt :: Result { fmt . debug_struct ( "HINSTANCE" ) . field ( "Value" , & format_args ! ( "{:?}" , self .0 ) ) . finish ( ) } } impl :: std :: cmp :: PartialEq for HINSTANCE { fn eq ( & self , other : & Self ) -> bool { self .0 == other .0 } } impl :: std :: cmp :: Eq for HINSTANCE { } unsafe impl :: windows :: Abi for HINSTANCE { type Abi = Self ; } pub type FARPROC = unsafe extern "system" fn ( ) -> isize ; # [ repr ( transparent ) ] # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: cmp :: Eq , :: std :: fmt :: Debug ) ] pub struct PSTR ( pub * mut u8 ) ; impl PSTR { pub const NULL : Self = Self ( :: std :: ptr :: null_mut ( ) ) ; pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } impl :: std :: cmp :: PartialEq for PSTR { fn eq ( & self , other : & Self ) -> bool { self . 0 == other . 0 } } unsafe impl :: windows :: Abi for PSTR { type Abi = Self ; fn drop_param ( param : & mut :: windows :: Param < Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . 0 . is_null ( ) { unsafe { let _ = :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for & 'a str { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ repr ( transparent ) ] # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: cmp :: Eq , :: std :: fmt :: Debug ) ] pub struct PWSTR ( pub * mut u16 ) ; impl PWSTR { pub const NULL : Self = Self ( :: std :: ptr :: null_mut ( ) ) ; pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PWSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } impl :: std :: cmp :: PartialEq for PWSTR { fn eq ( & self , other : & Self ) -> bool { self . 0 == other . 0 } } unsafe impl :: windows :: Abi for PWSTR { type Abi = Self ; fn drop_param ( param : & mut :: windows :: Param < Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . 0 . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & 'a str { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ repr ( transparent ) ] # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] pub struct HANDLE ( pub isize ) ; impl HANDLE { } impl :: std :: default :: Default for HANDLE { fn default ( ) -> Self { Self ( 0 ) } } impl HANDLE { pub const NULL : Self = Self ( 0 ) ; pub fn is_null ( & self ) -> bool { self . 0 == 0 } } impl :: std :: fmt :: Debug for HANDLE { fn fmt ( & self , fmt : & mut :: std :: fmt :: Formatter < '_ > ) -> :: std :: fmt :: Result { fmt . debug_struct ( "HANDLE" ) . field ( "Value" , & format_args ! ( "{:?}" , self .0 ) ) . finish ( ) } } impl :: std :: cmp :: PartialEq for HANDLE { fn eq ( & self , other : & Self ) -> bool { self .0 == other .0 } } impl :: std :: cmp :: Eq for HANDLE { } unsafe impl :: windows :: Abi for HANDLE { type Abi = Self ; } impl HANDLE { pub const INVALID : Self = Self ( - 1 ) ; pub fn is_invalid ( & self ) -> bool { self . 0 == - 1 } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Com { pub unsafe fn CoTaskMemFree < > ( pv : * mut :: std :: ffi :: c_void , ) { # [ cfg ( windows ) ] { # [ link ( name ="OLE32" ) ] extern "system" { fn CoTaskMemFree ( pv : * mut :: std :: ffi :: c_void ) ; } CoTaskMemFree ( :: std :: mem :: transmute ( pv ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod LibraryLoader { pub unsafe fn FreeLibrary < 'a , > ( hlibmodule : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: HINSTANCE > , ) -> super :: super :: Foundation :: BOOL { # [ cfg ( windows ) ] { # [ link ( name ="KERNEL32" ) ] extern "system" { fn FreeLibrary ( hlibmodule : super :: super :: Foundation :: HINSTANCE ) -> super :: super :: Foundation :: BOOL ; } FreeLibrary ( hlibmodule . into_param ( ) . abi ( ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } pub unsafe fn GetProcAddress < 'a , > ( hmodule : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: HINSTANCE > , lpprocname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PSTR > , ) -> :: std :: option :: Option < super :: super :: Foundation :: FARPROC > { # [ cfg ( windows ) ] { # [ link ( name ="KERNEL32" ) ] extern "system" { fn GetProcAddress ( hmodule : super :: super :: Foundation :: HINSTANCE , lpprocname : super :: super :: Foundation :: PSTR ) -> :: std :: option :: Option < super :: super :: Foundation :: FARPROC > ; } GetProcAddress ( hmodule . into_param ( ) . abi ( ) , lpprocname . into_param ( ) . abi ( ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct LOAD_LIBRARY_FLAGS ( pub u32 ) ; pub const DONT_RESOLVE_DLL_REFERENCES : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 1u32 ) ; pub const LOAD_LIBRARY_AS_DATAFILE : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 2u32 ) ; pub const LOAD_WITH_ALTERED_SEARCH_PATH : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 8u32 ) ; pub const LOAD_IGNORE_CODE_AUTHZ_LEVEL : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 16u32 ) ; pub const LOAD_LIBRARY_AS_IMAGE_RESOURCE : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 32u32 ) ; pub const LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 64u32 ) ; pub const LOAD_LIBRARY_REQUIRE_SIGNED_TARGET : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 128u32 ) ; pub const LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 256u32 ) ; pub const LOAD_LIBRARY_SEARCH_APPLICATION_DIR : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 512u32 ) ; pub const LOAD_LIBRARY_SEARCH_USER_DIRS : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 1024u32 ) ; pub const LOAD_LIBRARY_SEARCH_SYSTEM32 : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 2048u32 ) ; pub const LOAD_LIBRARY_SEARCH_DEFAULT_DIRS : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 4096u32 ) ; pub const LOAD_LIBRARY_SAFE_CURRENT_DIRS : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 8192u32 ) ; pub const LOAD_LIBRARY_SEARCH_SYSTEM32_NO_FORWARDER : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 16384u32 ) ; impl :: std :: convert :: From < u32 > for LOAD_LIBRARY_FLAGS { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for LOAD_LIBRARY_FLAGS { type Abi = Self ; } impl :: std :: ops :: BitOr for LOAD_LIBRARY_FLAGS { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for LOAD_LIBRARY_FLAGS { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for LOAD_LIBRARY_FLAGS { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for LOAD_LIBRARY_FLAGS { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } pub unsafe fn LoadLibraryExW < 'a , > ( lplibfilename : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , hfile : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: HANDLE > , dwflags : LOAD_LIBRARY_FLAGS , ) -> super :: super :: Foundation :: HINSTANCE { # [ cfg ( windows ) ] { # [ link ( name ="KERNEL32" ) ] extern "system" { fn LoadLibraryExW ( lplibfilename : super :: super :: Foundation :: PWSTR , hfile : super :: super :: Foundation :: HANDLE , dwflags : LOAD_LIBRARY_FLAGS ) -> super :: super :: Foundation :: HINSTANCE ; } LoadLibraryExW ( lplibfilename . into_param ( ) . abi ( ) , hfile . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( dwflags ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod SubsystemForLinux { # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct WSL_DISTRIBUTION_FLAGS ( pub u32 ) ; pub const WSL_DISTRIBUTION_FLAGS_NONE : WSL_DISTRIBUTION_FLAGS = WSL_DISTRIBUTION_FLAGS ( 0u32 ) ; pub const WSL_DISTRIBUTION_FLAGS_ENABLE_INTEROP : WSL_DISTRIBUTION_FLAGS = WSL_DISTRIBUTION_FLAGS ( 1u32 ) ; pub const WSL_DISTRIBUTION_FLAGS_APPEND_NT_PATH : WSL_DISTRIBUTION_FLAGS = WSL_DISTRIBUTION_FLAGS ( 2u32 ) ; pub const WSL_DISTRIBUTION_FLAGS_ENABLE_DRIVE_MOUNTING : WSL_DISTRIBUTION_FLAGS = WSL_DISTRIBUTION_FLAGS ( 4u32 ) ; impl :: std :: convert :: From < u32 > for WSL_DISTRIBUTION_FLAGS { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for WSL_DISTRIBUTION_FLAGS { type Abi = Self ; } impl :: std :: ops :: BitOr for WSL_DISTRIBUTION_FLAGS { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for WSL_DISTRIBUTION_FLAGS { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for WSL_DISTRIBUTION_FLAGS { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for WSL_DISTRIBUTION_FLAGS { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } pub unsafe fn WslLaunch < 'a , > ( distributionname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , command : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , usecurrentworkingdirectory : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: BOOL > , stdin : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: HANDLE > , stdout : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: HANDLE > , stderr : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: HANDLE > , process : * mut super :: super :: Foundation :: HANDLE , ) -> :: windows :: HRESULT { # [ cfg ( windows ) ] { # [ link ( name ="onecoreuap" ) ] extern "system" { fn WslLaunch ( distributionname : super :: super :: Foundation :: PWSTR , command : super :: super :: Foundation :: PWSTR , usecurrentworkingdirectory : super :: super :: Foundation :: BOOL , stdin : super :: super :: Foundation :: HANDLE , stdout : super :: super :: Foundation :: HANDLE , stderr : super :: super :: Foundation :: HANDLE , process : * mut super :: super :: Foundation :: HANDLE ) -> :: windows :: HRESULT ; } WslLaunch ( distributionname . into_param ( ) . abi ( ) , command . into_param ( ) . abi ( ) , usecurrentworkingdirectory . into_param ( ) . abi ( ) , stdin . into_param ( ) . abi ( ) , stdout . into_param ( ) . abi ( ) , stderr . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( process ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } pub unsafe fn WslGetDistributionConfiguration < 'a , > ( distributionname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , distributionversion : * mut u32 , defaultuid : * mut u32 , wsldistributionflags : * mut WSL_DISTRIBUTION_FLAGS , defaultenvironmentvariables : * mut * mut super :: super :: Foundation :: PSTR , defaultenvironmentvariablecount : * mut u32 , ) -> :: windows :: HRESULT { # [ cfg ( windows ) ] { # [ link ( name ="onecoreuap" ) ] extern "system" { fn WslGetDistributionConfiguration ( distributionname : super :: super :: Foundation :: PWSTR , distributionversion : * mut u32 , defaultuid : * mut u32 , wsldistributionflags : * mut WSL_DISTRIBUTION_FLAGS , defaultenvironmentvariables : * mut * mut super :: super :: Foundation :: PSTR , defaultenvironmentvariablecount : * mut u32 ) -> :: windows :: HRESULT ; } WslGetDistributionConfiguration ( distributionname . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( distributionversion ) , :: std :: mem :: transmute ( defaultuid ) , :: std :: mem :: transmute ( wsldistributionflags ) , :: std :: mem :: transmute ( defaultenvironmentvariables ) , :: std :: mem :: transmute ( defaultenvironmentvariablecount ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } pub unsafe fn WslConfigureDistribution < 'a , > ( distributionname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , defaultuid : u32 , wsldistributionflags : WSL_DISTRIBUTION_FLAGS , ) -> :: windows :: HRESULT { # [ cfg ( windows ) ] { # [ link ( name ="onecoreuap" ) ] extern "system" { fn WslConfigureDistribution ( distributionname : super :: super :: Foundation :: PWSTR , defaultuid : u32 , wsldistributionflags : WSL_DISTRIBUTION_FLAGS ) -> :: windows :: HRESULT ; } WslConfigureDistribution ( distributionname . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( defaultuid ) , :: std :: mem :: transmute ( wsldistributionflags ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } pub unsafe fn WslLaunchInteractive < 'a , > ( distributionname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , command : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , usecurrentworkingdirectory : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: BOOL > , exitcode : * mut u32 , ) -> :: windows :: HRESULT { # [ cfg ( windows ) ] { # [ link ( name ="onecoreuap" ) ] extern "system" { fn WslLaunchInteractive ( distributionname : super :: super :: Foundation :: PWSTR , command : super :: super :: Foundation :: PWSTR , usecurrentworkingdirectory : super :: super :: Foundation :: BOOL , exitcode : * mut u32 ) -> :: windows :: HRESULT ; } WslLaunchInteractive ( distributionname . into_param ( ) . abi ( ) , command . into_param ( ) . abi ( ) , usecurrentworkingdirectory . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( exitcode ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } pub unsafe fn WslIsDistributionRegistered < 'a , > ( distributionname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , ) -> super :: super :: Foundation :: BOOL { # [ cfg ( windows ) ] { # [ link ( name ="onecoreuap" ) ] extern "system" { fn WslIsDistributionRegistered ( distributionname : super :: super :: Foundation :: PWSTR ) -> super :: super :: Foundation :: BOOL ; } WslIsDistributionRegistered ( distributionname . into_param ( ) . abi ( ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } pub unsafe fn WslUnregisterDistribution < 'a , > ( distributionname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , ) -> :: windows :: HRESULT { # [ cfg ( windows ) ] { # [ link ( name ="onecoreuap" ) ] extern "system" { fn WslUnregisterDistribution ( distributionname : super :: super :: Foundation :: PWSTR ) -> :: windows :: HRESULT ; } WslUnregisterDistribution ( distributionname . into_param ( ) . abi ( ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } pub struct Apis { } impl Apis { } impl :: windows :: RuntimeName for Apis { const NAME : & 'static str ="Windows.Win32.System.SubsystemForLinux.Apis" ; } pub unsafe fn WslRegisterDistribution < 'a , > ( distributionname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , targzfilename : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , ) -> :: windows :: HRESULT { # [ cfg ( windows ) ] { # [ link ( name ="onecoreuap" ) ] extern "system" { fn WslRegisterDistribution ( distributionname : super :: super :: Foundation :: PWSTR , targzfilename : super :: super :: Foundation :: PWSTR ) -> :: windows :: HRESULT ; } WslRegisterDistribution ( distributionname . into_param ( ) . abi ( ) , targzfilename . into_param ( ) . abi ( ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } } } } }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: unused return value of `Box::<T>::from_raw` that must be used
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/wsl-get-8d754686fc65ee5a/out/windows.rs:1:5440
[INFO] [stdout]   |
[INFO] [stdout] 1 | ... if ! value . 0 . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: In...
[INFO] [stdout]   |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]   |
[INFO] [stdout]   = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box`
[INFO] [stdout] help: use `let _ = ...` to ignore the resulting value
[INFO] [stdout]   |
[INFO] [stdout] 1 | # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Windows { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Win32 { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Foundation { # [ repr ( transparent ) ] # [ derive ( :: std :: default :: Default , :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: fmt :: Debug ) ] pub struct BOOL ( pub i32 ) ; unsafe impl :: windows :: Abi for BOOL { type Abi = Self ; } impl BOOL { # [ inline ] pub fn as_bool ( self ) -> bool { ! ( self . 0 == 0 ) } # [ inline ] pub fn ok ( self ) -> :: windows :: Result < ( ) > { if self . as_bool ( ) { Ok ( ( ) ) } else { Err ( :: windows :: HRESULT :: from_thread ( ) . into ( ) ) } } # [ inline ] pub fn unwrap ( self ) { self . ok ( ) . unwrap ( ) ; } # [ inline ] pub fn expect ( self , msg : & str ) { self . ok ( ) . expect ( msg ) ; } } impl :: std :: convert :: From < BOOL > for bool { fn from ( value : BOOL ) -> Self { value . as_bool ( ) } } impl :: std :: convert :: From < & BOOL > for bool { fn from ( value : & BOOL ) -> Self { value . as_bool ( ) } } impl :: std :: convert :: From < bool > for BOOL { fn from ( value : bool ) -> Self { if value { BOOL ( 1 ) } else { BOOL ( 0 ) } } } impl :: std :: convert :: From < & bool > for BOOL { fn from ( value : & bool ) -> Self { ( * value ) . into ( ) } } impl :: std :: cmp :: PartialEq < bool > for BOOL { fn eq ( & self , other : & bool ) -> bool { self . as_bool ( ) == * other } } impl :: std :: cmp :: PartialEq < BOOL > for bool { fn eq ( & self , other : & BOOL ) -> bool { * self == other . as_bool ( ) } } impl std :: ops :: Not for BOOL { type Output = Self ; fn not ( self ) -> Self :: Output { if self . as_bool ( ) { BOOL ( 0 ) } else { BOOL ( 1 ) } } } impl < 'a > :: windows :: IntoParam < 'a , BOOL > for bool { fn into_param ( self ) -> :: windows :: Param < 'a , BOOL > { :: windows :: Param :: Owned ( self . into ( ) ) } } # [ repr ( transparent ) ] # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] pub struct HINSTANCE ( pub isize ) ; impl HINSTANCE { } impl :: std :: default :: Default for HINSTANCE { fn default ( ) -> Self { Self ( 0 ) } } impl HINSTANCE { pub const NULL : Self = Self ( 0 ) ; pub fn is_null ( & self ) -> bool { self . 0 == 0 } } impl :: std :: fmt :: Debug for HINSTANCE { fn fmt ( & self , fmt : & mut :: std :: fmt :: Formatter < '_ > ) -> :: std :: fmt :: Result { fmt . debug_struct ( "HINSTANCE" ) . field ( "Value" , & format_args ! ( "{:?}" , self .0 ) ) . finish ( ) } } impl :: std :: cmp :: PartialEq for HINSTANCE { fn eq ( & self , other : & Self ) -> bool { self .0 == other .0 } } impl :: std :: cmp :: Eq for HINSTANCE { } unsafe impl :: windows :: Abi for HINSTANCE { type Abi = Self ; } pub type FARPROC = unsafe extern "system" fn ( ) -> isize ; # [ repr ( transparent ) ] # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: cmp :: Eq , :: std :: fmt :: Debug ) ] pub struct PSTR ( pub * mut u8 ) ; impl PSTR { pub const NULL : Self = Self ( :: std :: ptr :: null_mut ( ) ) ; pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } impl :: std :: cmp :: PartialEq for PSTR { fn eq ( & self , other : & Self ) -> bool { self . 0 == other . 0 } } unsafe impl :: windows :: Abi for PSTR { type Abi = Self ; fn drop_param ( param : & mut :: windows :: Param < Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . 0 . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for & 'a str { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ repr ( transparent ) ] # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: cmp :: Eq , :: std :: fmt :: Debug ) ] pub struct PWSTR ( pub * mut u16 ) ; impl PWSTR { pub const NULL : Self = Self ( :: std :: ptr :: null_mut ( ) ) ; pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PWSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } impl :: std :: cmp :: PartialEq for PWSTR { fn eq ( & self , other : & Self ) -> bool { self . 0 == other . 0 } } unsafe impl :: windows :: Abi for PWSTR { type Abi = Self ; fn drop_param ( param : & mut :: windows :: Param < Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . 0 . is_null ( ) { unsafe { let _ = :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & 'a str { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ repr ( transparent ) ] # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] pub struct HANDLE ( pub isize ) ; impl HANDLE { } impl :: std :: default :: Default for HANDLE { fn default ( ) -> Self { Self ( 0 ) } } impl HANDLE { pub const NULL : Self = Self ( 0 ) ; pub fn is_null ( & self ) -> bool { self . 0 == 0 } } impl :: std :: fmt :: Debug for HANDLE { fn fmt ( & self , fmt : & mut :: std :: fmt :: Formatter < '_ > ) -> :: std :: fmt :: Result { fmt . debug_struct ( "HANDLE" ) . field ( "Value" , & format_args ! ( "{:?}" , self .0 ) ) . finish ( ) } } impl :: std :: cmp :: PartialEq for HANDLE { fn eq ( & self , other : & Self ) -> bool { self .0 == other .0 } } impl :: std :: cmp :: Eq for HANDLE { } unsafe impl :: windows :: Abi for HANDLE { type Abi = Self ; } impl HANDLE { pub const INVALID : Self = Self ( - 1 ) ; pub fn is_invalid ( & self ) -> bool { self . 0 == - 1 } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Com { pub unsafe fn CoTaskMemFree < > ( pv : * mut :: std :: ffi :: c_void , ) { # [ cfg ( windows ) ] { # [ link ( name ="OLE32" ) ] extern "system" { fn CoTaskMemFree ( pv : * mut :: std :: ffi :: c_void ) ; } CoTaskMemFree ( :: std :: mem :: transmute ( pv ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod LibraryLoader { pub unsafe fn FreeLibrary < 'a , > ( hlibmodule : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: HINSTANCE > , ) -> super :: super :: Foundation :: BOOL { # [ cfg ( windows ) ] { # [ link ( name ="KERNEL32" ) ] extern "system" { fn FreeLibrary ( hlibmodule : super :: super :: Foundation :: HINSTANCE ) -> super :: super :: Foundation :: BOOL ; } FreeLibrary ( hlibmodule . into_param ( ) . abi ( ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } pub unsafe fn GetProcAddress < 'a , > ( hmodule : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: HINSTANCE > , lpprocname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PSTR > , ) -> :: std :: option :: Option < super :: super :: Foundation :: FARPROC > { # [ cfg ( windows ) ] { # [ link ( name ="KERNEL32" ) ] extern "system" { fn GetProcAddress ( hmodule : super :: super :: Foundation :: HINSTANCE , lpprocname : super :: super :: Foundation :: PSTR ) -> :: std :: option :: Option < super :: super :: Foundation :: FARPROC > ; } GetProcAddress ( hmodule . into_param ( ) . abi ( ) , lpprocname . into_param ( ) . abi ( ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct LOAD_LIBRARY_FLAGS ( pub u32 ) ; pub const DONT_RESOLVE_DLL_REFERENCES : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 1u32 ) ; pub const LOAD_LIBRARY_AS_DATAFILE : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 2u32 ) ; pub const LOAD_WITH_ALTERED_SEARCH_PATH : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 8u32 ) ; pub const LOAD_IGNORE_CODE_AUTHZ_LEVEL : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 16u32 ) ; pub const LOAD_LIBRARY_AS_IMAGE_RESOURCE : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 32u32 ) ; pub const LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 64u32 ) ; pub const LOAD_LIBRARY_REQUIRE_SIGNED_TARGET : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 128u32 ) ; pub const LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 256u32 ) ; pub const LOAD_LIBRARY_SEARCH_APPLICATION_DIR : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 512u32 ) ; pub const LOAD_LIBRARY_SEARCH_USER_DIRS : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 1024u32 ) ; pub const LOAD_LIBRARY_SEARCH_SYSTEM32 : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 2048u32 ) ; pub const LOAD_LIBRARY_SEARCH_DEFAULT_DIRS : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 4096u32 ) ; pub const LOAD_LIBRARY_SAFE_CURRENT_DIRS : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 8192u32 ) ; pub const LOAD_LIBRARY_SEARCH_SYSTEM32_NO_FORWARDER : LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS ( 16384u32 ) ; impl :: std :: convert :: From < u32 > for LOAD_LIBRARY_FLAGS { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for LOAD_LIBRARY_FLAGS { type Abi = Self ; } impl :: std :: ops :: BitOr for LOAD_LIBRARY_FLAGS { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for LOAD_LIBRARY_FLAGS { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for LOAD_LIBRARY_FLAGS { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for LOAD_LIBRARY_FLAGS { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } pub unsafe fn LoadLibraryExW < 'a , > ( lplibfilename : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , hfile : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: HANDLE > , dwflags : LOAD_LIBRARY_FLAGS , ) -> super :: super :: Foundation :: HINSTANCE { # [ cfg ( windows ) ] { # [ link ( name ="KERNEL32" ) ] extern "system" { fn LoadLibraryExW ( lplibfilename : super :: super :: Foundation :: PWSTR , hfile : super :: super :: Foundation :: HANDLE , dwflags : LOAD_LIBRARY_FLAGS ) -> super :: super :: Foundation :: HINSTANCE ; } LoadLibraryExW ( lplibfilename . into_param ( ) . abi ( ) , hfile . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( dwflags ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod SubsystemForLinux { # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct WSL_DISTRIBUTION_FLAGS ( pub u32 ) ; pub const WSL_DISTRIBUTION_FLAGS_NONE : WSL_DISTRIBUTION_FLAGS = WSL_DISTRIBUTION_FLAGS ( 0u32 ) ; pub const WSL_DISTRIBUTION_FLAGS_ENABLE_INTEROP : WSL_DISTRIBUTION_FLAGS = WSL_DISTRIBUTION_FLAGS ( 1u32 ) ; pub const WSL_DISTRIBUTION_FLAGS_APPEND_NT_PATH : WSL_DISTRIBUTION_FLAGS = WSL_DISTRIBUTION_FLAGS ( 2u32 ) ; pub const WSL_DISTRIBUTION_FLAGS_ENABLE_DRIVE_MOUNTING : WSL_DISTRIBUTION_FLAGS = WSL_DISTRIBUTION_FLAGS ( 4u32 ) ; impl :: std :: convert :: From < u32 > for WSL_DISTRIBUTION_FLAGS { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for WSL_DISTRIBUTION_FLAGS { type Abi = Self ; } impl :: std :: ops :: BitOr for WSL_DISTRIBUTION_FLAGS { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for WSL_DISTRIBUTION_FLAGS { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for WSL_DISTRIBUTION_FLAGS { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for WSL_DISTRIBUTION_FLAGS { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } pub unsafe fn WslLaunch < 'a , > ( distributionname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , command : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , usecurrentworkingdirectory : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: BOOL > , stdin : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: HANDLE > , stdout : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: HANDLE > , stderr : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: HANDLE > , process : * mut super :: super :: Foundation :: HANDLE , ) -> :: windows :: HRESULT { # [ cfg ( windows ) ] { # [ link ( name ="onecoreuap" ) ] extern "system" { fn WslLaunch ( distributionname : super :: super :: Foundation :: PWSTR , command : super :: super :: Foundation :: PWSTR , usecurrentworkingdirectory : super :: super :: Foundation :: BOOL , stdin : super :: super :: Foundation :: HANDLE , stdout : super :: super :: Foundation :: HANDLE , stderr : super :: super :: Foundation :: HANDLE , process : * mut super :: super :: Foundation :: HANDLE ) -> :: windows :: HRESULT ; } WslLaunch ( distributionname . into_param ( ) . abi ( ) , command . into_param ( ) . abi ( ) , usecurrentworkingdirectory . into_param ( ) . abi ( ) , stdin . into_param ( ) . abi ( ) , stdout . into_param ( ) . abi ( ) , stderr . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( process ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } pub unsafe fn WslGetDistributionConfiguration < 'a , > ( distributionname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , distributionversion : * mut u32 , defaultuid : * mut u32 , wsldistributionflags : * mut WSL_DISTRIBUTION_FLAGS , defaultenvironmentvariables : * mut * mut super :: super :: Foundation :: PSTR , defaultenvironmentvariablecount : * mut u32 , ) -> :: windows :: HRESULT { # [ cfg ( windows ) ] { # [ link ( name ="onecoreuap" ) ] extern "system" { fn WslGetDistributionConfiguration ( distributionname : super :: super :: Foundation :: PWSTR , distributionversion : * mut u32 , defaultuid : * mut u32 , wsldistributionflags : * mut WSL_DISTRIBUTION_FLAGS , defaultenvironmentvariables : * mut * mut super :: super :: Foundation :: PSTR , defaultenvironmentvariablecount : * mut u32 ) -> :: windows :: HRESULT ; } WslGetDistributionConfiguration ( distributionname . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( distributionversion ) , :: std :: mem :: transmute ( defaultuid ) , :: std :: mem :: transmute ( wsldistributionflags ) , :: std :: mem :: transmute ( defaultenvironmentvariables ) , :: std :: mem :: transmute ( defaultenvironmentvariablecount ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } pub unsafe fn WslConfigureDistribution < 'a , > ( distributionname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , defaultuid : u32 , wsldistributionflags : WSL_DISTRIBUTION_FLAGS , ) -> :: windows :: HRESULT { # [ cfg ( windows ) ] { # [ link ( name ="onecoreuap" ) ] extern "system" { fn WslConfigureDistribution ( distributionname : super :: super :: Foundation :: PWSTR , defaultuid : u32 , wsldistributionflags : WSL_DISTRIBUTION_FLAGS ) -> :: windows :: HRESULT ; } WslConfigureDistribution ( distributionname . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( defaultuid ) , :: std :: mem :: transmute ( wsldistributionflags ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } pub unsafe fn WslLaunchInteractive < 'a , > ( distributionname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , command : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , usecurrentworkingdirectory : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: BOOL > , exitcode : * mut u32 , ) -> :: windows :: HRESULT { # [ cfg ( windows ) ] { # [ link ( name ="onecoreuap" ) ] extern "system" { fn WslLaunchInteractive ( distributionname : super :: super :: Foundation :: PWSTR , command : super :: super :: Foundation :: PWSTR , usecurrentworkingdirectory : super :: super :: Foundation :: BOOL , exitcode : * mut u32 ) -> :: windows :: HRESULT ; } WslLaunchInteractive ( distributionname . into_param ( ) . abi ( ) , command . into_param ( ) . abi ( ) , usecurrentworkingdirectory . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( exitcode ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } pub unsafe fn WslIsDistributionRegistered < 'a , > ( distributionname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , ) -> super :: super :: Foundation :: BOOL { # [ cfg ( windows ) ] { # [ link ( name ="onecoreuap" ) ] extern "system" { fn WslIsDistributionRegistered ( distributionname : super :: super :: Foundation :: PWSTR ) -> super :: super :: Foundation :: BOOL ; } WslIsDistributionRegistered ( distributionname . into_param ( ) . abi ( ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } pub unsafe fn WslUnregisterDistribution < 'a , > ( distributionname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , ) -> :: windows :: HRESULT { # [ cfg ( windows ) ] { # [ link ( name ="onecoreuap" ) ] extern "system" { fn WslUnregisterDistribution ( distributionname : super :: super :: Foundation :: PWSTR ) -> :: windows :: HRESULT ; } WslUnregisterDistribution ( distributionname . into_param ( ) . abi ( ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } pub struct Apis { } impl Apis { } impl :: windows :: RuntimeName for Apis { const NAME : & 'static str ="Windows.Win32.System.SubsystemForLinux.Apis" ; } pub unsafe fn WslRegisterDistribution < 'a , > ( distributionname : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , targzfilename : impl :: windows :: IntoParam < 'a , super :: super :: Foundation :: PWSTR > , ) -> :: windows :: HRESULT { # [ cfg ( windows ) ] { # [ link ( name ="onecoreuap" ) ] extern "system" { fn WslRegisterDistribution ( distributionname : super :: super :: Foundation :: PWSTR , targzfilename : super :: super :: Foundation :: PWSTR ) -> :: windows :: HRESULT ; } WslRegisterDistribution ( distributionname . into_param ( ) . abi ( ) , targzfilename . into_param ( ) . abi ( ) ) } # [ cfg ( not ( windows ) ) ] { unimplemented ! ( "Unsupported target OS" ) ; } } } } } }
[INFO] [stdout]   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stderr]     Finished `dev` profile [unoptimized + debuginfo] target(s) in 17.65s
[INFO] running `Command { std: "docker" "inspect" "f833e113182feb980f01e52299d45d0292b3c478b2b29c72576622cb1e8eea61", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "f833e113182feb980f01e52299d45d0292b3c478b2b29c72576622cb1e8eea61", kill_on_drop: false }`
[INFO] [stdout] f833e113182feb980f01e52299d45d0292b3c478b2b29c72576622cb1e8eea61
