[INFO] fetching crate wincredentials-bindings 0.1.0... [INFO] testing wincredentials-bindings-0.1.0 against master#caccb4d0368bd918ef6668af8e13834d07040417 for pr-146098-1 [INFO] extracting crate wincredentials-bindings 0.1.0 into /workspace/builds/worker-1-tc1/source [INFO] started tweaking crates.io crate wincredentials-bindings 0.1.0 [INFO] finished tweaking crates.io crate wincredentials-bindings 0.1.0 [INFO] tweaked toml for crates.io crate wincredentials-bindings 0.1.0 written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate wincredentials-bindings 0.1.0 on toolchain caccb4d0368bd918ef6668af8e13834d07040417 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+caccb4d0368bd918ef6668af8e13834d07040417" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+caccb4d0368bd918ef6668af8e13834d07040417" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Locking 10 packages to latest compatible versions [INFO] [stderr] Adding windows v0.21.1 (available: v0.62.1) [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+caccb4d0368bd918ef6668af8e13834d07040417" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded windows_macros v0.21.1 [INFO] [stderr] Downloaded windows_quote v0.21.1 [INFO] [stderr] Downloaded windows v0.21.1 [INFO] [stderr] Downloaded const-sha1 v0.2.0 [INFO] [stderr] Downloaded windows_gen v0.21.1 [INFO] [stderr] Downloaded windows_reader v0.21.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:e90291280db7d1fac5b66fc6dad9f9662629e7365a55743daf9bdf73ebc4ea79" "/opt/rustwide/cargo-home/bin/cargo" "+caccb4d0368bd918ef6668af8e13834d07040417" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] f06f0de70d9acf5b272fe63dd5e73eee9b04f042cddebf069b1fecb17d3457f8 [INFO] running `Command { std: "docker" "start" "-a" "f06f0de70d9acf5b272fe63dd5e73eee9b04f042cddebf069b1fecb17d3457f8", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "f06f0de70d9acf5b272fe63dd5e73eee9b04f042cddebf069b1fecb17d3457f8", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f06f0de70d9acf5b272fe63dd5e73eee9b04f042cddebf069b1fecb17d3457f8", kill_on_drop: false }` [INFO] [stdout] f06f0de70d9acf5b272fe63dd5e73eee9b04f042cddebf069b1fecb17d3457f8 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:e90291280db7d1fac5b66fc6dad9f9662629e7365a55743daf9bdf73ebc4ea79" "/opt/rustwide/cargo-home/bin/cargo" "+caccb4d0368bd918ef6668af8e13834d07040417" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 899dfc82c4c52aaffa44e2ad0d940a338e297a7ade52011ff26478922130658d [INFO] running `Command { std: "docker" "start" "-a" "899dfc82c4c52aaffa44e2ad0d940a338e297a7ade52011ff26478922130658d", kill_on_drop: false }` [INFO] [stderr] Compiling windows_quote v0.21.1 [INFO] [stderr] Compiling windows_reader v0.21.1 [INFO] [stderr] Compiling const-sha1 v0.2.0 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling windows_gen v0.21.1 [INFO] [stderr] Compiling windows_macros v0.21.1 [INFO] [stderr] Compiling windows v0.21.1 [INFO] [stderr] Compiling wincredentials-bindings v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused return value of `Box::::from_raw` that must be used [INFO] [stdout] --> /opt/rustwide/target/debug/build/wincredentials-bindings-ad095a3835195be3/out/windows.rs:1:3872 [INFO] [stdout] | [INFO] [stdout] 1 | ...aram { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: Into... [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 ; type DefaultType = 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 :: Error :: from_win32 ( ) ) } } # [ inline ] # [ track_caller ] pub fn unwrap ( self ) { self . ok ( ) . unwrap ( ) ; } # [ inline ] # [ track_caller ] 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 ( ) ) } } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C ) ] pub struct FILETIME { pub dwLowDateTime : u32 , pub dwHighDateTime : u32 } impl FILETIME { } impl :: std :: default :: Default for FILETIME { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: fmt :: Debug for FILETIME { fn fmt ( & self , fmt : & mut :: std :: fmt :: Formatter < '_ > ) -> :: std :: fmt :: Result { fmt . debug_struct ( "FILETIME" ) . field ( "dwLowDateTime" , & self . dwLowDateTime ) . field ( "dwHighDateTime" , & self . dwHighDateTime ) . finish ( ) } } impl :: std :: cmp :: PartialEq for FILETIME { fn eq ( & self , other : & Self ) -> bool { self . dwLowDateTime == other . dwLowDateTime && self . dwHighDateTime == other . dwHighDateTime } } impl :: std :: cmp :: Eq for FILETIME { } unsafe impl :: windows :: Abi for FILETIME { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PWSTR ( pub * mut u16 ) ; impl PWSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PWSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PWSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { let _ = :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & 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 _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & :: std :: ffi :: OsStr { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for :: std :: ffi :: OsString { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Security { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Credentials { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C ) ] pub struct CREDENTIALW { pub Flags : CRED_FLAGS , pub Type : CRED_TYPE , pub TargetName : super::super::Foundation:: PWSTR , pub Comment : super::super::Foundation:: PWSTR , pub LastWritten : super::super::Foundation:: FILETIME , pub CredentialBlobSize : u32 , pub CredentialBlob : * mut u8 , pub Persist : CRED_PERSIST , pub AttributeCount : u32 , pub Attributes : * mut CREDENTIAL_ATTRIBUTEW , pub TargetAlias : super::super::Foundation:: PWSTR , pub UserName : super::super::Foundation:: PWSTR } impl CREDENTIALW { } impl :: std :: default :: Default for CREDENTIALW { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: fmt :: Debug for CREDENTIALW { fn fmt ( & self , fmt : & mut :: std :: fmt :: Formatter < '_ > ) -> :: std :: fmt :: Result { fmt . debug_struct ( "CREDENTIALW" ) . field ( "Flags" , & self . Flags ) . field ( "Type" , & self . Type ) . field ( "TargetName" , & self . TargetName ) . field ( "Comment" , & self . Comment ) . field ( "LastWritten" , & self . LastWritten ) . field ( "CredentialBlobSize" , & self . CredentialBlobSize ) . field ( "CredentialBlob" , & self . CredentialBlob ) . field ( "Persist" , & self . Persist ) . field ( "AttributeCount" , & self . AttributeCount ) . field ( "Attributes" , & self . Attributes ) . field ( "TargetAlias" , & self . TargetAlias ) . field ( "UserName" , & self . UserName ) . finish ( ) } } impl :: std :: cmp :: PartialEq for CREDENTIALW { fn eq ( & self , other : & Self ) -> bool { self . Flags == other . Flags && self . Type == other . Type && self . TargetName == other . TargetName && self . Comment == other . Comment && self . LastWritten == other . LastWritten && self . CredentialBlobSize == other . CredentialBlobSize && self . CredentialBlob == other . CredentialBlob && self . Persist == other . Persist && self . AttributeCount == other . AttributeCount && self . Attributes == other . Attributes && self . TargetAlias == other . TargetAlias && self . UserName == other . UserName } } impl :: std :: cmp :: Eq for CREDENTIALW { } unsafe impl :: windows :: Abi for CREDENTIALW { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C ) ] pub struct CREDENTIAL_ATTRIBUTEW { pub Keyword : super::super::Foundation:: PWSTR , pub Flags : u32 , pub ValueSize : u32 , pub Value : * mut u8 } impl CREDENTIAL_ATTRIBUTEW { } impl :: std :: default :: Default for CREDENTIAL_ATTRIBUTEW { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: fmt :: Debug for CREDENTIAL_ATTRIBUTEW { fn fmt ( & self , fmt : & mut :: std :: fmt :: Formatter < '_ > ) -> :: std :: fmt :: Result { fmt . debug_struct ( "CREDENTIAL_ATTRIBUTEW" ) . field ( "Keyword" , & self . Keyword ) . field ( "Flags" , & self . Flags ) . field ( "ValueSize" , & self . ValueSize ) . field ( "Value" , & self . Value ) . finish ( ) } } impl :: std :: cmp :: PartialEq for CREDENTIAL_ATTRIBUTEW { fn eq ( & self , other : & Self ) -> bool { self . Keyword == other . Keyword && self . Flags == other . Flags && self . ValueSize == other . ValueSize && self . Value == other . Value } } impl :: std :: cmp :: Eq for CREDENTIAL_ATTRIBUTEW { } unsafe impl :: windows :: Abi for CREDENTIAL_ATTRIBUTEW { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct CRED_FLAGS ( pub u32 ) ; pub const CRED_FLAGS_PASSWORD_FOR_CERT : CRED_FLAGS = CRED_FLAGS ( 1u32 ) ; pub const CRED_FLAGS_PROMPT_NOW : CRED_FLAGS = CRED_FLAGS ( 2u32 ) ; pub const CRED_FLAGS_USERNAME_TARGET : CRED_FLAGS = CRED_FLAGS ( 4u32 ) ; pub const CRED_FLAGS_OWF_CRED_BLOB : CRED_FLAGS = CRED_FLAGS ( 8u32 ) ; pub const CRED_FLAGS_REQUIRE_CONFIRMATION : CRED_FLAGS = CRED_FLAGS ( 16u32 ) ; pub const CRED_FLAGS_WILDCARD_MATCH : CRED_FLAGS = CRED_FLAGS ( 32u32 ) ; pub const CRED_FLAGS_VSM_PROTECTED : CRED_FLAGS = CRED_FLAGS ( 64u32 ) ; pub const CRED_FLAGS_NGC_CERT : CRED_FLAGS = CRED_FLAGS ( 128u32 ) ; pub const CRED_FLAGS_VALID_FLAGS : CRED_FLAGS = CRED_FLAGS ( 61695u32 ) ; pub const CRED_FLAGS_VALID_INPUT_FLAGS : CRED_FLAGS = CRED_FLAGS ( 61599u32 ) ; impl :: std :: convert :: From < u32 > for CRED_FLAGS { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for CRED_FLAGS { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for CRED_FLAGS { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for CRED_FLAGS { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for CRED_FLAGS { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for CRED_FLAGS { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } impl :: std :: ops :: Not for CRED_FLAGS { type Output = Self ; fn not ( self ) -> Self { Self ( self . 0 . not ( ) ) } } # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct CRED_PERSIST ( pub u32 ) ; pub const CRED_PERSIST_NONE : CRED_PERSIST = CRED_PERSIST ( 0u32 ) ; pub const CRED_PERSIST_SESSION : CRED_PERSIST = CRED_PERSIST ( 1u32 ) ; pub const CRED_PERSIST_LOCAL_MACHINE : CRED_PERSIST = CRED_PERSIST ( 2u32 ) ; pub const CRED_PERSIST_ENTERPRISE : CRED_PERSIST = CRED_PERSIST ( 3u32 ) ; impl :: std :: convert :: From < u32 > for CRED_PERSIST { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for CRED_PERSIST { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for CRED_PERSIST { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for CRED_PERSIST { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for CRED_PERSIST { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for CRED_PERSIST { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } impl :: std :: ops :: Not for CRED_PERSIST { type Output = Self ; fn not ( self ) -> Self { Self ( self . 0 . not ( ) ) } } # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct CRED_TYPE ( pub u32 ) ; pub const CRED_TYPE_GENERIC : CRED_TYPE = CRED_TYPE ( 1u32 ) ; pub const CRED_TYPE_DOMAIN_PASSWORD : CRED_TYPE = CRED_TYPE ( 2u32 ) ; pub const CRED_TYPE_DOMAIN_CERTIFICATE : CRED_TYPE = CRED_TYPE ( 3u32 ) ; pub const CRED_TYPE_DOMAIN_VISIBLE_PASSWORD : CRED_TYPE = CRED_TYPE ( 4u32 ) ; pub const CRED_TYPE_GENERIC_CERTIFICATE : CRED_TYPE = CRED_TYPE ( 5u32 ) ; pub const CRED_TYPE_DOMAIN_EXTENDED : CRED_TYPE = CRED_TYPE ( 6u32 ) ; pub const CRED_TYPE_MAXIMUM : CRED_TYPE = CRED_TYPE ( 7u32 ) ; pub const CRED_TYPE_MAXIMUM_EX : CRED_TYPE = CRED_TYPE ( 1007u32 ) ; impl :: std :: convert :: From < u32 > for CRED_TYPE { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for CRED_TYPE { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for CRED_TYPE { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for CRED_TYPE { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for CRED_TYPE { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for CRED_TYPE { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } impl :: std :: ops :: Not for CRED_TYPE { type Output = Self ; fn not ( self ) -> Self { Self ( self . 0 . not ( ) ) } } pub unsafe fn CredDeleteW < 'a , Param0 : :: windows :: IntoParam < 'a , super::super::Foundation:: PWSTR > , > ( targetname : Param0 , r#type : u32 , flags : u32 , ) -> super::super::Foundation:: BOOL { # [ cfg ( windows ) ] { # [ link ( name ="advapi32" ) ] extern "system" { fn CredDeleteW ( targetname : super::super::Foundation:: PWSTR , r#type : u32 , flags : u32 ) -> super::super::Foundation:: BOOL ; } :: std :: mem :: transmute ( CredDeleteW ( targetname . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( r#type ) , :: std :: mem :: transmute ( flags ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn CredFree < > ( buffer : * const :: std :: ffi :: c_void , ) { # [ cfg ( windows ) ] { # [ link ( name ="advapi32" ) ] extern "system" { fn CredFree ( buffer : * const :: std :: ffi :: c_void ) ; } :: std :: mem :: transmute ( CredFree ( :: std :: mem :: transmute ( buffer ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn CredReadW < 'a , Param0 : :: windows :: IntoParam < 'a , super::super::Foundation:: PWSTR > , > ( targetname : Param0 , r#type : u32 , flags : u32 , credential : * mut * mut CREDENTIALW , ) -> super::super::Foundation:: BOOL { # [ cfg ( windows ) ] { # [ link ( name ="advapi32" ) ] extern "system" { fn CredReadW ( targetname : super::super::Foundation:: PWSTR , r#type : u32 , flags : u32 , credential : * mut * mut CREDENTIALW ) -> super::super::Foundation:: BOOL ; } :: std :: mem :: transmute ( CredReadW ( targetname . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( r#type ) , :: std :: mem :: transmute ( flags ) , :: std :: mem :: transmute ( credential ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn CredWriteW < > ( credential : * const CREDENTIALW , flags : u32 , ) -> super::super::Foundation:: BOOL { # [ cfg ( windows ) ] { # [ link ( name ="advapi32" ) ] extern "system" { fn CredWriteW ( credential : * const CREDENTIALW , flags : u32 ) -> super::super::Foundation:: BOOL ; } :: std :: mem :: transmute ( CredWriteW ( :: std :: mem :: transmute ( credential ) , :: std :: mem :: transmute ( flags ) ) ) } # [ 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 System { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod SystemInformation { pub unsafe fn GetSystemTimeAsFileTime < > ( lpsystemtimeasfiletime : * mut super::super::Foundation:: FILETIME , ) { # [ cfg ( windows ) ] { # [ link ( name ="kernel32" ) ] extern "system" { fn GetSystemTimeAsFileTime ( lpsystemtimeasfiletime : * mut super::super::Foundation:: FILETIME ) ; } :: std :: mem :: transmute ( GetSystemTimeAsFileTime ( :: std :: mem :: transmute ( lpsystemtimeasfiletime ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } } } [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 15.55s [INFO] running `Command { std: "docker" "inspect" "899dfc82c4c52aaffa44e2ad0d940a338e297a7ade52011ff26478922130658d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "899dfc82c4c52aaffa44e2ad0d940a338e297a7ade52011ff26478922130658d", kill_on_drop: false }` [INFO] [stdout] 899dfc82c4c52aaffa44e2ad0d940a338e297a7ade52011ff26478922130658d [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:e90291280db7d1fac5b66fc6dad9f9662629e7365a55743daf9bdf73ebc4ea79" "/opt/rustwide/cargo-home/bin/cargo" "+caccb4d0368bd918ef6668af8e13834d07040417" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 8be65123a8c1375be443a59c6fe17f0509727da30e23919118ba9d9e2c170023 [INFO] running `Command { std: "docker" "start" "-a" "8be65123a8c1375be443a59c6fe17f0509727da30e23919118ba9d9e2c170023", kill_on_drop: false }` [INFO] [stderr] Compiling wincredentials-bindings v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused return value of `Box::::from_raw` that must be used [INFO] [stdout] --> /opt/rustwide/target/debug/build/wincredentials-bindings-ad095a3835195be3/out/windows.rs:1:3872 [INFO] [stdout] | [INFO] [stdout] 1 | ...aram { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: Into... [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 ; type DefaultType = 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 :: Error :: from_win32 ( ) ) } } # [ inline ] # [ track_caller ] pub fn unwrap ( self ) { self . ok ( ) . unwrap ( ) ; } # [ inline ] # [ track_caller ] 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 ( ) ) } } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C ) ] pub struct FILETIME { pub dwLowDateTime : u32 , pub dwHighDateTime : u32 } impl FILETIME { } impl :: std :: default :: Default for FILETIME { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: fmt :: Debug for FILETIME { fn fmt ( & self , fmt : & mut :: std :: fmt :: Formatter < '_ > ) -> :: std :: fmt :: Result { fmt . debug_struct ( "FILETIME" ) . field ( "dwLowDateTime" , & self . dwLowDateTime ) . field ( "dwHighDateTime" , & self . dwHighDateTime ) . finish ( ) } } impl :: std :: cmp :: PartialEq for FILETIME { fn eq ( & self , other : & Self ) -> bool { self . dwLowDateTime == other . dwLowDateTime && self . dwHighDateTime == other . dwHighDateTime } } impl :: std :: cmp :: Eq for FILETIME { } unsafe impl :: windows :: Abi for FILETIME { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PWSTR ( pub * mut u16 ) ; impl PWSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PWSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PWSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { let _ = :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & 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 _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & :: std :: ffi :: OsStr { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for :: std :: ffi :: OsString { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Security { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Credentials { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C ) ] pub struct CREDENTIALW { pub Flags : CRED_FLAGS , pub Type : CRED_TYPE , pub TargetName : super::super::Foundation:: PWSTR , pub Comment : super::super::Foundation:: PWSTR , pub LastWritten : super::super::Foundation:: FILETIME , pub CredentialBlobSize : u32 , pub CredentialBlob : * mut u8 , pub Persist : CRED_PERSIST , pub AttributeCount : u32 , pub Attributes : * mut CREDENTIAL_ATTRIBUTEW , pub TargetAlias : super::super::Foundation:: PWSTR , pub UserName : super::super::Foundation:: PWSTR } impl CREDENTIALW { } impl :: std :: default :: Default for CREDENTIALW { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: fmt :: Debug for CREDENTIALW { fn fmt ( & self , fmt : & mut :: std :: fmt :: Formatter < '_ > ) -> :: std :: fmt :: Result { fmt . debug_struct ( "CREDENTIALW" ) . field ( "Flags" , & self . Flags ) . field ( "Type" , & self . Type ) . field ( "TargetName" , & self . TargetName ) . field ( "Comment" , & self . Comment ) . field ( "LastWritten" , & self . LastWritten ) . field ( "CredentialBlobSize" , & self . CredentialBlobSize ) . field ( "CredentialBlob" , & self . CredentialBlob ) . field ( "Persist" , & self . Persist ) . field ( "AttributeCount" , & self . AttributeCount ) . field ( "Attributes" , & self . Attributes ) . field ( "TargetAlias" , & self . TargetAlias ) . field ( "UserName" , & self . UserName ) . finish ( ) } } impl :: std :: cmp :: PartialEq for CREDENTIALW { fn eq ( & self , other : & Self ) -> bool { self . Flags == other . Flags && self . Type == other . Type && self . TargetName == other . TargetName && self . Comment == other . Comment && self . LastWritten == other . LastWritten && self . CredentialBlobSize == other . CredentialBlobSize && self . CredentialBlob == other . CredentialBlob && self . Persist == other . Persist && self . AttributeCount == other . AttributeCount && self . Attributes == other . Attributes && self . TargetAlias == other . TargetAlias && self . UserName == other . UserName } } impl :: std :: cmp :: Eq for CREDENTIALW { } unsafe impl :: windows :: Abi for CREDENTIALW { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C ) ] pub struct CREDENTIAL_ATTRIBUTEW { pub Keyword : super::super::Foundation:: PWSTR , pub Flags : u32 , pub ValueSize : u32 , pub Value : * mut u8 } impl CREDENTIAL_ATTRIBUTEW { } impl :: std :: default :: Default for CREDENTIAL_ATTRIBUTEW { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: fmt :: Debug for CREDENTIAL_ATTRIBUTEW { fn fmt ( & self , fmt : & mut :: std :: fmt :: Formatter < '_ > ) -> :: std :: fmt :: Result { fmt . debug_struct ( "CREDENTIAL_ATTRIBUTEW" ) . field ( "Keyword" , & self . Keyword ) . field ( "Flags" , & self . Flags ) . field ( "ValueSize" , & self . ValueSize ) . field ( "Value" , & self . Value ) . finish ( ) } } impl :: std :: cmp :: PartialEq for CREDENTIAL_ATTRIBUTEW { fn eq ( & self , other : & Self ) -> bool { self . Keyword == other . Keyword && self . Flags == other . Flags && self . ValueSize == other . ValueSize && self . Value == other . Value } } impl :: std :: cmp :: Eq for CREDENTIAL_ATTRIBUTEW { } unsafe impl :: windows :: Abi for CREDENTIAL_ATTRIBUTEW { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct CRED_FLAGS ( pub u32 ) ; pub const CRED_FLAGS_PASSWORD_FOR_CERT : CRED_FLAGS = CRED_FLAGS ( 1u32 ) ; pub const CRED_FLAGS_PROMPT_NOW : CRED_FLAGS = CRED_FLAGS ( 2u32 ) ; pub const CRED_FLAGS_USERNAME_TARGET : CRED_FLAGS = CRED_FLAGS ( 4u32 ) ; pub const CRED_FLAGS_OWF_CRED_BLOB : CRED_FLAGS = CRED_FLAGS ( 8u32 ) ; pub const CRED_FLAGS_REQUIRE_CONFIRMATION : CRED_FLAGS = CRED_FLAGS ( 16u32 ) ; pub const CRED_FLAGS_WILDCARD_MATCH : CRED_FLAGS = CRED_FLAGS ( 32u32 ) ; pub const CRED_FLAGS_VSM_PROTECTED : CRED_FLAGS = CRED_FLAGS ( 64u32 ) ; pub const CRED_FLAGS_NGC_CERT : CRED_FLAGS = CRED_FLAGS ( 128u32 ) ; pub const CRED_FLAGS_VALID_FLAGS : CRED_FLAGS = CRED_FLAGS ( 61695u32 ) ; pub const CRED_FLAGS_VALID_INPUT_FLAGS : CRED_FLAGS = CRED_FLAGS ( 61599u32 ) ; impl :: std :: convert :: From < u32 > for CRED_FLAGS { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for CRED_FLAGS { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for CRED_FLAGS { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for CRED_FLAGS { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for CRED_FLAGS { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for CRED_FLAGS { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } impl :: std :: ops :: Not for CRED_FLAGS { type Output = Self ; fn not ( self ) -> Self { Self ( self . 0 . not ( ) ) } } # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct CRED_PERSIST ( pub u32 ) ; pub const CRED_PERSIST_NONE : CRED_PERSIST = CRED_PERSIST ( 0u32 ) ; pub const CRED_PERSIST_SESSION : CRED_PERSIST = CRED_PERSIST ( 1u32 ) ; pub const CRED_PERSIST_LOCAL_MACHINE : CRED_PERSIST = CRED_PERSIST ( 2u32 ) ; pub const CRED_PERSIST_ENTERPRISE : CRED_PERSIST = CRED_PERSIST ( 3u32 ) ; impl :: std :: convert :: From < u32 > for CRED_PERSIST { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for CRED_PERSIST { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for CRED_PERSIST { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for CRED_PERSIST { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for CRED_PERSIST { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for CRED_PERSIST { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } impl :: std :: ops :: Not for CRED_PERSIST { type Output = Self ; fn not ( self ) -> Self { Self ( self . 0 . not ( ) ) } } # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct CRED_TYPE ( pub u32 ) ; pub const CRED_TYPE_GENERIC : CRED_TYPE = CRED_TYPE ( 1u32 ) ; pub const CRED_TYPE_DOMAIN_PASSWORD : CRED_TYPE = CRED_TYPE ( 2u32 ) ; pub const CRED_TYPE_DOMAIN_CERTIFICATE : CRED_TYPE = CRED_TYPE ( 3u32 ) ; pub const CRED_TYPE_DOMAIN_VISIBLE_PASSWORD : CRED_TYPE = CRED_TYPE ( 4u32 ) ; pub const CRED_TYPE_GENERIC_CERTIFICATE : CRED_TYPE = CRED_TYPE ( 5u32 ) ; pub const CRED_TYPE_DOMAIN_EXTENDED : CRED_TYPE = CRED_TYPE ( 6u32 ) ; pub const CRED_TYPE_MAXIMUM : CRED_TYPE = CRED_TYPE ( 7u32 ) ; pub const CRED_TYPE_MAXIMUM_EX : CRED_TYPE = CRED_TYPE ( 1007u32 ) ; impl :: std :: convert :: From < u32 > for CRED_TYPE { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for CRED_TYPE { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for CRED_TYPE { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for CRED_TYPE { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for CRED_TYPE { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for CRED_TYPE { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } impl :: std :: ops :: Not for CRED_TYPE { type Output = Self ; fn not ( self ) -> Self { Self ( self . 0 . not ( ) ) } } pub unsafe fn CredDeleteW < 'a , Param0 : :: windows :: IntoParam < 'a , super::super::Foundation:: PWSTR > , > ( targetname : Param0 , r#type : u32 , flags : u32 , ) -> super::super::Foundation:: BOOL { # [ cfg ( windows ) ] { # [ link ( name ="advapi32" ) ] extern "system" { fn CredDeleteW ( targetname : super::super::Foundation:: PWSTR , r#type : u32 , flags : u32 ) -> super::super::Foundation:: BOOL ; } :: std :: mem :: transmute ( CredDeleteW ( targetname . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( r#type ) , :: std :: mem :: transmute ( flags ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn CredFree < > ( buffer : * const :: std :: ffi :: c_void , ) { # [ cfg ( windows ) ] { # [ link ( name ="advapi32" ) ] extern "system" { fn CredFree ( buffer : * const :: std :: ffi :: c_void ) ; } :: std :: mem :: transmute ( CredFree ( :: std :: mem :: transmute ( buffer ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn CredReadW < 'a , Param0 : :: windows :: IntoParam < 'a , super::super::Foundation:: PWSTR > , > ( targetname : Param0 , r#type : u32 , flags : u32 , credential : * mut * mut CREDENTIALW , ) -> super::super::Foundation:: BOOL { # [ cfg ( windows ) ] { # [ link ( name ="advapi32" ) ] extern "system" { fn CredReadW ( targetname : super::super::Foundation:: PWSTR , r#type : u32 , flags : u32 , credential : * mut * mut CREDENTIALW ) -> super::super::Foundation:: BOOL ; } :: std :: mem :: transmute ( CredReadW ( targetname . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( r#type ) , :: std :: mem :: transmute ( flags ) , :: std :: mem :: transmute ( credential ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn CredWriteW < > ( credential : * const CREDENTIALW , flags : u32 , ) -> super::super::Foundation:: BOOL { # [ cfg ( windows ) ] { # [ link ( name ="advapi32" ) ] extern "system" { fn CredWriteW ( credential : * const CREDENTIALW , flags : u32 ) -> super::super::Foundation:: BOOL ; } :: std :: mem :: transmute ( CredWriteW ( :: std :: mem :: transmute ( credential ) , :: std :: mem :: transmute ( flags ) ) ) } # [ 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 System { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod SystemInformation { pub unsafe fn GetSystemTimeAsFileTime < > ( lpsystemtimeasfiletime : * mut super::super::Foundation:: FILETIME , ) { # [ cfg ( windows ) ] { # [ link ( name ="kernel32" ) ] extern "system" { fn GetSystemTimeAsFileTime ( lpsystemtimeasfiletime : * mut super::super::Foundation:: FILETIME ) ; } :: std :: mem :: transmute ( GetSystemTimeAsFileTime ( :: std :: mem :: transmute ( lpsystemtimeasfiletime ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } } } [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused return value of `Box::::from_raw` that must be used [INFO] [stdout] --> /opt/rustwide/target/debug/build/wincredentials-bindings-ad095a3835195be3/out/windows.rs:1:3872 [INFO] [stdout] | [INFO] [stdout] 1 | ...aram { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: Into... [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 ; type DefaultType = 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 :: Error :: from_win32 ( ) ) } } # [ inline ] # [ track_caller ] pub fn unwrap ( self ) { self . ok ( ) . unwrap ( ) ; } # [ inline ] # [ track_caller ] 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 ( ) ) } } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C ) ] pub struct FILETIME { pub dwLowDateTime : u32 , pub dwHighDateTime : u32 } impl FILETIME { } impl :: std :: default :: Default for FILETIME { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: fmt :: Debug for FILETIME { fn fmt ( & self , fmt : & mut :: std :: fmt :: Formatter < '_ > ) -> :: std :: fmt :: Result { fmt . debug_struct ( "FILETIME" ) . field ( "dwLowDateTime" , & self . dwLowDateTime ) . field ( "dwHighDateTime" , & self . dwHighDateTime ) . finish ( ) } } impl :: std :: cmp :: PartialEq for FILETIME { fn eq ( & self , other : & Self ) -> bool { self . dwLowDateTime == other . dwLowDateTime && self . dwHighDateTime == other . dwHighDateTime } } impl :: std :: cmp :: Eq for FILETIME { } unsafe impl :: windows :: Abi for FILETIME { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PWSTR ( pub * mut u16 ) ; impl PWSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PWSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PWSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { let _ = :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & 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 _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & :: std :: ffi :: OsStr { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for :: std :: ffi :: OsString { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Security { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Credentials { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C ) ] pub struct CREDENTIALW { pub Flags : CRED_FLAGS , pub Type : CRED_TYPE , pub TargetName : super::super::Foundation:: PWSTR , pub Comment : super::super::Foundation:: PWSTR , pub LastWritten : super::super::Foundation:: FILETIME , pub CredentialBlobSize : u32 , pub CredentialBlob : * mut u8 , pub Persist : CRED_PERSIST , pub AttributeCount : u32 , pub Attributes : * mut CREDENTIAL_ATTRIBUTEW , pub TargetAlias : super::super::Foundation:: PWSTR , pub UserName : super::super::Foundation:: PWSTR } impl CREDENTIALW { } impl :: std :: default :: Default for CREDENTIALW { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: fmt :: Debug for CREDENTIALW { fn fmt ( & self , fmt : & mut :: std :: fmt :: Formatter < '_ > ) -> :: std :: fmt :: Result { fmt . debug_struct ( "CREDENTIALW" ) . field ( "Flags" , & self . Flags ) . field ( "Type" , & self . Type ) . field ( "TargetName" , & self . TargetName ) . field ( "Comment" , & self . Comment ) . field ( "LastWritten" , & self . LastWritten ) . field ( "CredentialBlobSize" , & self . CredentialBlobSize ) . field ( "CredentialBlob" , & self . CredentialBlob ) . field ( "Persist" , & self . Persist ) . field ( "AttributeCount" , & self . AttributeCount ) . field ( "Attributes" , & self . Attributes ) . field ( "TargetAlias" , & self . TargetAlias ) . field ( "UserName" , & self . UserName ) . finish ( ) } } impl :: std :: cmp :: PartialEq for CREDENTIALW { fn eq ( & self , other : & Self ) -> bool { self . Flags == other . Flags && self . Type == other . Type && self . TargetName == other . TargetName && self . Comment == other . Comment && self . LastWritten == other . LastWritten && self . CredentialBlobSize == other . CredentialBlobSize && self . CredentialBlob == other . CredentialBlob && self . Persist == other . Persist && self . AttributeCount == other . AttributeCount && self . Attributes == other . Attributes && self . TargetAlias == other . TargetAlias && self . UserName == other . UserName } } impl :: std :: cmp :: Eq for CREDENTIALW { } unsafe impl :: windows :: Abi for CREDENTIALW { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C ) ] pub struct CREDENTIAL_ATTRIBUTEW { pub Keyword : super::super::Foundation:: PWSTR , pub Flags : u32 , pub ValueSize : u32 , pub Value : * mut u8 } impl CREDENTIAL_ATTRIBUTEW { } impl :: std :: default :: Default for CREDENTIAL_ATTRIBUTEW { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: fmt :: Debug for CREDENTIAL_ATTRIBUTEW { fn fmt ( & self , fmt : & mut :: std :: fmt :: Formatter < '_ > ) -> :: std :: fmt :: Result { fmt . debug_struct ( "CREDENTIAL_ATTRIBUTEW" ) . field ( "Keyword" , & self . Keyword ) . field ( "Flags" , & self . Flags ) . field ( "ValueSize" , & self . ValueSize ) . field ( "Value" , & self . Value ) . finish ( ) } } impl :: std :: cmp :: PartialEq for CREDENTIAL_ATTRIBUTEW { fn eq ( & self , other : & Self ) -> bool { self . Keyword == other . Keyword && self . Flags == other . Flags && self . ValueSize == other . ValueSize && self . Value == other . Value } } impl :: std :: cmp :: Eq for CREDENTIAL_ATTRIBUTEW { } unsafe impl :: windows :: Abi for CREDENTIAL_ATTRIBUTEW { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct CRED_FLAGS ( pub u32 ) ; pub const CRED_FLAGS_PASSWORD_FOR_CERT : CRED_FLAGS = CRED_FLAGS ( 1u32 ) ; pub const CRED_FLAGS_PROMPT_NOW : CRED_FLAGS = CRED_FLAGS ( 2u32 ) ; pub const CRED_FLAGS_USERNAME_TARGET : CRED_FLAGS = CRED_FLAGS ( 4u32 ) ; pub const CRED_FLAGS_OWF_CRED_BLOB : CRED_FLAGS = CRED_FLAGS ( 8u32 ) ; pub const CRED_FLAGS_REQUIRE_CONFIRMATION : CRED_FLAGS = CRED_FLAGS ( 16u32 ) ; pub const CRED_FLAGS_WILDCARD_MATCH : CRED_FLAGS = CRED_FLAGS ( 32u32 ) ; pub const CRED_FLAGS_VSM_PROTECTED : CRED_FLAGS = CRED_FLAGS ( 64u32 ) ; pub const CRED_FLAGS_NGC_CERT : CRED_FLAGS = CRED_FLAGS ( 128u32 ) ; pub const CRED_FLAGS_VALID_FLAGS : CRED_FLAGS = CRED_FLAGS ( 61695u32 ) ; pub const CRED_FLAGS_VALID_INPUT_FLAGS : CRED_FLAGS = CRED_FLAGS ( 61599u32 ) ; impl :: std :: convert :: From < u32 > for CRED_FLAGS { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for CRED_FLAGS { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for CRED_FLAGS { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for CRED_FLAGS { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for CRED_FLAGS { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for CRED_FLAGS { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } impl :: std :: ops :: Not for CRED_FLAGS { type Output = Self ; fn not ( self ) -> Self { Self ( self . 0 . not ( ) ) } } # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct CRED_PERSIST ( pub u32 ) ; pub const CRED_PERSIST_NONE : CRED_PERSIST = CRED_PERSIST ( 0u32 ) ; pub const CRED_PERSIST_SESSION : CRED_PERSIST = CRED_PERSIST ( 1u32 ) ; pub const CRED_PERSIST_LOCAL_MACHINE : CRED_PERSIST = CRED_PERSIST ( 2u32 ) ; pub const CRED_PERSIST_ENTERPRISE : CRED_PERSIST = CRED_PERSIST ( 3u32 ) ; impl :: std :: convert :: From < u32 > for CRED_PERSIST { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for CRED_PERSIST { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for CRED_PERSIST { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for CRED_PERSIST { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for CRED_PERSIST { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for CRED_PERSIST { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } impl :: std :: ops :: Not for CRED_PERSIST { type Output = Self ; fn not ( self ) -> Self { Self ( self . 0 . not ( ) ) } } # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct CRED_TYPE ( pub u32 ) ; pub const CRED_TYPE_GENERIC : CRED_TYPE = CRED_TYPE ( 1u32 ) ; pub const CRED_TYPE_DOMAIN_PASSWORD : CRED_TYPE = CRED_TYPE ( 2u32 ) ; pub const CRED_TYPE_DOMAIN_CERTIFICATE : CRED_TYPE = CRED_TYPE ( 3u32 ) ; pub const CRED_TYPE_DOMAIN_VISIBLE_PASSWORD : CRED_TYPE = CRED_TYPE ( 4u32 ) ; pub const CRED_TYPE_GENERIC_CERTIFICATE : CRED_TYPE = CRED_TYPE ( 5u32 ) ; pub const CRED_TYPE_DOMAIN_EXTENDED : CRED_TYPE = CRED_TYPE ( 6u32 ) ; pub const CRED_TYPE_MAXIMUM : CRED_TYPE = CRED_TYPE ( 7u32 ) ; pub const CRED_TYPE_MAXIMUM_EX : CRED_TYPE = CRED_TYPE ( 1007u32 ) ; impl :: std :: convert :: From < u32 > for CRED_TYPE { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for CRED_TYPE { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for CRED_TYPE { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for CRED_TYPE { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for CRED_TYPE { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for CRED_TYPE { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } impl :: std :: ops :: Not for CRED_TYPE { type Output = Self ; fn not ( self ) -> Self { Self ( self . 0 . not ( ) ) } } pub unsafe fn CredDeleteW < 'a , Param0 : :: windows :: IntoParam < 'a , super::super::Foundation:: PWSTR > , > ( targetname : Param0 , r#type : u32 , flags : u32 , ) -> super::super::Foundation:: BOOL { # [ cfg ( windows ) ] { # [ link ( name ="advapi32" ) ] extern "system" { fn CredDeleteW ( targetname : super::super::Foundation:: PWSTR , r#type : u32 , flags : u32 ) -> super::super::Foundation:: BOOL ; } :: std :: mem :: transmute ( CredDeleteW ( targetname . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( r#type ) , :: std :: mem :: transmute ( flags ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn CredFree < > ( buffer : * const :: std :: ffi :: c_void , ) { # [ cfg ( windows ) ] { # [ link ( name ="advapi32" ) ] extern "system" { fn CredFree ( buffer : * const :: std :: ffi :: c_void ) ; } :: std :: mem :: transmute ( CredFree ( :: std :: mem :: transmute ( buffer ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn CredReadW < 'a , Param0 : :: windows :: IntoParam < 'a , super::super::Foundation:: PWSTR > , > ( targetname : Param0 , r#type : u32 , flags : u32 , credential : * mut * mut CREDENTIALW , ) -> super::super::Foundation:: BOOL { # [ cfg ( windows ) ] { # [ link ( name ="advapi32" ) ] extern "system" { fn CredReadW ( targetname : super::super::Foundation:: PWSTR , r#type : u32 , flags : u32 , credential : * mut * mut CREDENTIALW ) -> super::super::Foundation:: BOOL ; } :: std :: mem :: transmute ( CredReadW ( targetname . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( r#type ) , :: std :: mem :: transmute ( flags ) , :: std :: mem :: transmute ( credential ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn CredWriteW < > ( credential : * const CREDENTIALW , flags : u32 , ) -> super::super::Foundation:: BOOL { # [ cfg ( windows ) ] { # [ link ( name ="advapi32" ) ] extern "system" { fn CredWriteW ( credential : * const CREDENTIALW , flags : u32 ) -> super::super::Foundation:: BOOL ; } :: std :: mem :: transmute ( CredWriteW ( :: std :: mem :: transmute ( credential ) , :: std :: mem :: transmute ( flags ) ) ) } # [ 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 System { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod SystemInformation { pub unsafe fn GetSystemTimeAsFileTime < > ( lpsystemtimeasfiletime : * mut super::super::Foundation:: FILETIME , ) { # [ cfg ( windows ) ] { # [ link ( name ="kernel32" ) ] extern "system" { fn GetSystemTimeAsFileTime ( lpsystemtimeasfiletime : * mut super::super::Foundation:: FILETIME ) ; } :: std :: mem :: transmute ( GetSystemTimeAsFileTime ( :: std :: mem :: transmute ( lpsystemtimeasfiletime ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } } } [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.43s [INFO] running `Command { std: "docker" "inspect" "8be65123a8c1375be443a59c6fe17f0509727da30e23919118ba9d9e2c170023", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8be65123a8c1375be443a59c6fe17f0509727da30e23919118ba9d9e2c170023", kill_on_drop: false }` [INFO] [stdout] 8be65123a8c1375be443a59c6fe17f0509727da30e23919118ba9d9e2c170023 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:e90291280db7d1fac5b66fc6dad9f9662629e7365a55743daf9bdf73ebc4ea79" "/opt/rustwide/cargo-home/bin/cargo" "+caccb4d0368bd918ef6668af8e13834d07040417" "test" "--frozen", kill_on_drop: false }` [INFO] [stdout] 9b2006baf8ec58388b74666cfce297e71dfae8aeebcdc141073da66f8337bd68 [INFO] running `Command { std: "docker" "start" "-a" "9b2006baf8ec58388b74666cfce297e71dfae8aeebcdc141073da66f8337bd68", kill_on_drop: false }` [INFO] [stderr] warning: unused return value of `Box::::from_raw` that must be used [INFO] [stderr] --> /opt/rustwide/target/debug/build/wincredentials-bindings-ad095a3835195be3/out/windows.rs:1:3872 [INFO] [stderr] | [INFO] [stderr] 1 | ...aram { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: Into... [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box` [INFO] [stderr] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stderr] help: use `let _ = ...` to ignore the resulting value [INFO] [stderr] | [INFO] [stderr] 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 ; type DefaultType = 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 :: Error :: from_win32 ( ) ) } } # [ inline ] # [ track_caller ] pub fn unwrap ( self ) { self . ok ( ) . unwrap ( ) ; } # [ inline ] # [ track_caller ] 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 ( ) ) } } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C ) ] pub struct FILETIME { pub dwLowDateTime : u32 , pub dwHighDateTime : u32 } impl FILETIME { } impl :: std :: default :: Default for FILETIME { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: fmt :: Debug for FILETIME { fn fmt ( & self , fmt : & mut :: std :: fmt :: Formatter < '_ > ) -> :: std :: fmt :: Result { fmt . debug_struct ( "FILETIME" ) . field ( "dwLowDateTime" , & self . dwLowDateTime ) . field ( "dwHighDateTime" , & self . dwHighDateTime ) . finish ( ) } } impl :: std :: cmp :: PartialEq for FILETIME { fn eq ( & self , other : & Self ) -> bool { self . dwLowDateTime == other . dwLowDateTime && self . dwHighDateTime == other . dwHighDateTime } } impl :: std :: cmp :: Eq for FILETIME { } unsafe impl :: windows :: Abi for FILETIME { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PWSTR ( pub * mut u16 ) ; impl PWSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PWSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PWSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { let _ = :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & 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 _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & :: std :: ffi :: OsStr { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for :: std :: ffi :: OsString { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Security { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Credentials { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C ) ] pub struct CREDENTIALW { pub Flags : CRED_FLAGS , pub Type : CRED_TYPE , pub TargetName : super::super::Foundation:: PWSTR , pub Comment : super::super::Foundation:: PWSTR , pub LastWritten : super::super::Foundation:: FILETIME , pub CredentialBlobSize : u32 , pub CredentialBlob : * mut u8 , pub Persist : CRED_PERSIST , pub AttributeCount : u32 , pub Attributes : * mut CREDENTIAL_ATTRIBUTEW , pub TargetAlias : super::super::Foundation:: PWSTR , pub UserName : super::super::Foundation:: PWSTR } impl CREDENTIALW { } impl :: std :: default :: Default for CREDENTIALW { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: fmt :: Debug for CREDENTIALW { fn fmt ( & self , fmt : & mut :: std :: fmt :: Formatter < '_ > ) -> :: std :: fmt :: Result { fmt . debug_struct ( "CREDENTIALW" ) . field ( "Flags" , & self . Flags ) . field ( "Type" , & self . Type ) . field ( "TargetName" , & self . TargetName ) . field ( "Comment" , & self . Comment ) . field ( "LastWritten" , & self . LastWritten ) . field ( "CredentialBlobSize" , & self . CredentialBlobSize ) . field ( "CredentialBlob" , & self . CredentialBlob ) . field ( "Persist" , & self . Persist ) . field ( "AttributeCount" , & self . AttributeCount ) . field ( "Attributes" , & self . Attributes ) . field ( "TargetAlias" , & self . TargetAlias ) . field ( "UserName" , & self . UserName ) . finish ( ) } } impl :: std :: cmp :: PartialEq for CREDENTIALW { fn eq ( & self , other : & Self ) -> bool { self . Flags == other . Flags && self . Type == other . Type && self . TargetName == other . TargetName && self . Comment == other . Comment && self . LastWritten == other . LastWritten && self . CredentialBlobSize == other . CredentialBlobSize && self . CredentialBlob == other . CredentialBlob && self . Persist == other . Persist && self . AttributeCount == other . AttributeCount && self . Attributes == other . Attributes && self . TargetAlias == other . TargetAlias && self . UserName == other . UserName } } impl :: std :: cmp :: Eq for CREDENTIALW { } unsafe impl :: windows :: Abi for CREDENTIALW { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C ) ] pub struct CREDENTIAL_ATTRIBUTEW { pub Keyword : super::super::Foundation:: PWSTR , pub Flags : u32 , pub ValueSize : u32 , pub Value : * mut u8 } impl CREDENTIAL_ATTRIBUTEW { } impl :: std :: default :: Default for CREDENTIAL_ATTRIBUTEW { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: fmt :: Debug for CREDENTIAL_ATTRIBUTEW { fn fmt ( & self , fmt : & mut :: std :: fmt :: Formatter < '_ > ) -> :: std :: fmt :: Result { fmt . debug_struct ( "CREDENTIAL_ATTRIBUTEW" ) . field ( "Keyword" , & self . Keyword ) . field ( "Flags" , & self . Flags ) . field ( "ValueSize" , & self . ValueSize ) . field ( "Value" , & self . Value ) . finish ( ) } } impl :: std :: cmp :: PartialEq for CREDENTIAL_ATTRIBUTEW { fn eq ( & self , other : & Self ) -> bool { self . Keyword == other . Keyword && self . Flags == other . Flags && self . ValueSize == other . ValueSize && self . Value == other . Value } } impl :: std :: cmp :: Eq for CREDENTIAL_ATTRIBUTEW { } unsafe impl :: windows :: Abi for CREDENTIAL_ATTRIBUTEW { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct CRED_FLAGS ( pub u32 ) ; pub const CRED_FLAGS_PASSWORD_FOR_CERT : CRED_FLAGS = CRED_FLAGS ( 1u32 ) ; pub const CRED_FLAGS_PROMPT_NOW : CRED_FLAGS = CRED_FLAGS ( 2u32 ) ; pub const CRED_FLAGS_USERNAME_TARGET : CRED_FLAGS = CRED_FLAGS ( 4u32 ) ; pub const CRED_FLAGS_OWF_CRED_BLOB : CRED_FLAGS = CRED_FLAGS ( 8u32 ) ; pub const CRED_FLAGS_REQUIRE_CONFIRMATION : CRED_FLAGS = CRED_FLAGS ( 16u32 ) ; pub const CRED_FLAGS_WILDCARD_MATCH : CRED_FLAGS = CRED_FLAGS ( 32u32 ) ; pub const CRED_FLAGS_VSM_PROTECTED : CRED_FLAGS = CRED_FLAGS ( 64u32 ) ; pub const CRED_FLAGS_NGC_CERT : CRED_FLAGS = CRED_FLAGS ( 128u32 ) ; pub const CRED_FLAGS_VALID_FLAGS : CRED_FLAGS = CRED_FLAGS ( 61695u32 ) ; pub const CRED_FLAGS_VALID_INPUT_FLAGS : CRED_FLAGS = CRED_FLAGS ( 61599u32 ) ; impl :: std :: convert :: From < u32 > for CRED_FLAGS { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for CRED_FLAGS { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for CRED_FLAGS { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for CRED_FLAGS { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for CRED_FLAGS { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for CRED_FLAGS { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } impl :: std :: ops :: Not for CRED_FLAGS { type Output = Self ; fn not ( self ) -> Self { Self ( self . 0 . not ( ) ) } } # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct CRED_PERSIST ( pub u32 ) ; pub const CRED_PERSIST_NONE : CRED_PERSIST = CRED_PERSIST ( 0u32 ) ; pub const CRED_PERSIST_SESSION : CRED_PERSIST = CRED_PERSIST ( 1u32 ) ; pub const CRED_PERSIST_LOCAL_MACHINE : CRED_PERSIST = CRED_PERSIST ( 2u32 ) ; pub const CRED_PERSIST_ENTERPRISE : CRED_PERSIST = CRED_PERSIST ( 3u32 ) ; impl :: std :: convert :: From < u32 > for CRED_PERSIST { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for CRED_PERSIST { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for CRED_PERSIST { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for CRED_PERSIST { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for CRED_PERSIST { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for CRED_PERSIST { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } impl :: std :: ops :: Not for CRED_PERSIST { type Output = Self ; fn not ( self ) -> Self { Self ( self . 0 . not ( ) ) } } # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct CRED_TYPE ( pub u32 ) ; pub const CRED_TYPE_GENERIC : CRED_TYPE = CRED_TYPE ( 1u32 ) ; pub const CRED_TYPE_DOMAIN_PASSWORD : CRED_TYPE = CRED_TYPE ( 2u32 ) ; pub const CRED_TYPE_DOMAIN_CERTIFICATE : CRED_TYPE = CRED_TYPE ( 3u32 ) ; pub const CRED_TYPE_DOMAIN_VISIBLE_PASSWORD : CRED_TYPE = CRED_TYPE ( 4u32 ) ; pub const CRED_TYPE_GENERIC_CERTIFICATE : CRED_TYPE = CRED_TYPE ( 5u32 ) ; pub const CRED_TYPE_DOMAIN_EXTENDED : CRED_TYPE = CRED_TYPE ( 6u32 ) ; pub const CRED_TYPE_MAXIMUM : CRED_TYPE = CRED_TYPE ( 7u32 ) ; pub const CRED_TYPE_MAXIMUM_EX : CRED_TYPE = CRED_TYPE ( 1007u32 ) ; impl :: std :: convert :: From < u32 > for CRED_TYPE { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for CRED_TYPE { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for CRED_TYPE { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for CRED_TYPE { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for CRED_TYPE { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for CRED_TYPE { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } impl :: std :: ops :: Not for CRED_TYPE { type Output = Self ; fn not ( self ) -> Self { Self ( self . 0 . not ( ) ) } } pub unsafe fn CredDeleteW < 'a , Param0 : :: windows :: IntoParam < 'a , super::super::Foundation:: PWSTR > , > ( targetname : Param0 , r#type : u32 , flags : u32 , ) -> super::super::Foundation:: BOOL { # [ cfg ( windows ) ] { # [ link ( name ="advapi32" ) ] extern "system" { fn CredDeleteW ( targetname : super::super::Foundation:: PWSTR , r#type : u32 , flags : u32 ) -> super::super::Foundation:: BOOL ; } :: std :: mem :: transmute ( CredDeleteW ( targetname . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( r#type ) , :: std :: mem :: transmute ( flags ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn CredFree < > ( buffer : * const :: std :: ffi :: c_void , ) { # [ cfg ( windows ) ] { # [ link ( name ="advapi32" ) ] extern "system" { fn CredFree ( buffer : * const :: std :: ffi :: c_void ) ; } :: std :: mem :: transmute ( CredFree ( :: std :: mem :: transmute ( buffer ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn CredReadW < 'a , Param0 : :: windows :: IntoParam < 'a , super::super::Foundation:: PWSTR > , > ( targetname : Param0 , r#type : u32 , flags : u32 , credential : * mut * mut CREDENTIALW , ) -> super::super::Foundation:: BOOL { # [ cfg ( windows ) ] { # [ link ( name ="advapi32" ) ] extern "system" { fn CredReadW ( targetname : super::super::Foundation:: PWSTR , r#type : u32 , flags : u32 , credential : * mut * mut CREDENTIALW ) -> super::super::Foundation:: BOOL ; } :: std :: mem :: transmute ( CredReadW ( targetname . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( r#type ) , :: std :: mem :: transmute ( flags ) , :: std :: mem :: transmute ( credential ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn CredWriteW < > ( credential : * const CREDENTIALW , flags : u32 , ) -> super::super::Foundation:: BOOL { # [ cfg ( windows ) ] { # [ link ( name ="advapi32" ) ] extern "system" { fn CredWriteW ( credential : * const CREDENTIALW , flags : u32 ) -> super::super::Foundation:: BOOL ; } :: std :: mem :: transmute ( CredWriteW ( :: std :: mem :: transmute ( credential ) , :: std :: mem :: transmute ( flags ) ) ) } # [ 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 System { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod SystemInformation { pub unsafe fn GetSystemTimeAsFileTime < > ( lpsystemtimeasfiletime : * mut super::super::Foundation:: FILETIME , ) { # [ cfg ( windows ) ] { # [ link ( name ="kernel32" ) ] extern "system" { fn GetSystemTimeAsFileTime ( lpsystemtimeasfiletime : * mut super::super::Foundation:: FILETIME ) ; } :: std :: mem :: transmute ( GetSystemTimeAsFileTime ( :: std :: mem :: transmute ( lpsystemtimeasfiletime ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } } } [INFO] [stderr] | +++++++ [INFO] [stderr] [INFO] [stderr] warning: `wincredentials-bindings` (lib) generated 1 warning [INFO] [stderr] warning: `wincredentials-bindings` (lib test) generated 1 warning (1 duplicate) [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.07s [INFO] [stderr] Running unittests src/lib.rs (/opt/rustwide/target/debug/deps/wincredentials_bindings-ce77285745d2e18d) [INFO] [stdout] [INFO] [stdout] running 0 tests [INFO] [stdout] [INFO] [stdout] test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s [INFO] [stdout] [INFO] [stderr] Doc-tests wincredentials_bindings [INFO] [stdout] [INFO] [stdout] running 0 tests [INFO] [stdout] [INFO] [stdout] test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "9b2006baf8ec58388b74666cfce297e71dfae8aeebcdc141073da66f8337bd68", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9b2006baf8ec58388b74666cfce297e71dfae8aeebcdc141073da66f8337bd68", kill_on_drop: false }` [INFO] [stdout] 9b2006baf8ec58388b74666cfce297e71dfae8aeebcdc141073da66f8337bd68