diff --git a/.gitignore b/.gitignore index 71fcadb3f5..b87f3e393e 100644 --- a/.gitignore +++ b/.gitignore @@ -76,3 +76,6 @@ program fuzzer_libpng* *.patch + +# Sometimes this happens +rustc-ice-* \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 627ec24a50..86b8c4a001 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -148,6 +148,10 @@ all = { level = "deny", priority = -1 } pedantic = { level = "deny", priority = -1 } cargo_common_metadata = "deny" +alloc_instead_of_core = "deny" +std_instead_of_alloc = "deny" +std_instead_of_core = "deny" + # Warn cargo = { level = "warn", priority = -1 } diff --git a/fuzzers/binary_only/qemu_launcher/injection_test/.gitignore b/fuzzers/binary_only/qemu_launcher/injection_test/.gitignore new file mode 100644 index 0000000000..e09ac55d65 --- /dev/null +++ b/fuzzers/binary_only/qemu_launcher/injection_test/.gitignore @@ -0,0 +1,2 @@ +injection_test +static diff --git a/libafl/examples/tui_mock/main.rs b/libafl/examples/tui_mock/main.rs index a6cd121023..f2c6e49c53 100644 --- a/libafl/examples/tui_mock/main.rs +++ b/libafl/examples/tui_mock/main.rs @@ -1,7 +1,8 @@ //! An example for TUI that uses the TUI without any real data. //! This is mainly to fix the UI without having to run a real fuzzer. -use std::{thread::sleep, time::Duration}; +use core::time::Duration; +use std::thread::sleep; use libafl::monitors::{ Monitor, diff --git a/libafl/src/common/nautilus/grammartec/chunkstore.rs b/libafl/src/common/nautilus/grammartec/chunkstore.rs index 91627d74a1..f33a5834f0 100644 --- a/libafl/src/common/nautilus/grammartec/chunkstore.rs +++ b/libafl/src/common/nautilus/grammartec/chunkstore.rs @@ -1,9 +1,6 @@ use alloc::{string::String, vec::Vec}; -use std::{ - fs::File, - io::Write, - sync::{RwLock, atomic::AtomicBool}, -}; +use core::sync::atomic::AtomicBool; +use std::{fs::File, io::Write, sync::RwLock}; use hashbrown::{HashMap, HashSet}; use libafl_bolts::rands::Rand; diff --git a/libafl/src/common/nautilus/grammartec/newtypes.rs b/libafl/src/common/nautilus/grammartec/newtypes.rs index 0e38a7af10..383b97f435 100644 --- a/libafl/src/common/nautilus/grammartec/newtypes.rs +++ b/libafl/src/common/nautilus/grammartec/newtypes.rs @@ -1,4 +1,4 @@ -use std::ops::Add; +use core::ops::Add; use serde::{Deserialize, Serialize}; diff --git a/libafl/src/common/nautilus/grammartec/python_grammar_loader.rs b/libafl/src/common/nautilus/grammartec/python_grammar_loader.rs index 061b15238c..c7288eec60 100644 --- a/libafl/src/common/nautilus/grammartec/python_grammar_loader.rs +++ b/libafl/src/common/nautilus/grammartec/python_grammar_loader.rs @@ -1,6 +1,6 @@ #![allow(clippy::useless_conversion)] // This seems to be a false-positive(?) -use std::{ffi::CString, string::String, vec::Vec}; +use alloc::{ffi::CString, string::String, vec::Vec}; use pyo3::{prelude::*, pyclass, types::IntoPyDict}; diff --git a/libafl/src/common/nautilus/grammartec/recursion_info.rs b/libafl/src/common/nautilus/grammartec/recursion_info.rs index 581f071645..549e1302ef 100644 --- a/libafl/src/common/nautilus/grammartec/recursion_info.rs +++ b/libafl/src/common/nautilus/grammartec/recursion_info.rs @@ -1,5 +1,4 @@ -use alloc::vec::Vec; -use std::fmt; +use alloc::{fmt, vec::Vec}; use hashbrown::HashMap; use libafl_bolts::{ diff --git a/libafl/src/common/nautilus/grammartec/rule.rs b/libafl/src/common/nautilus/grammartec/rule.rs index c3b6984d91..62c4300957 100644 --- a/libafl/src/common/nautilus/grammartec/rule.rs +++ b/libafl/src/common/nautilus/grammartec/rule.rs @@ -25,7 +25,7 @@ static SPLITTER: OnceLock = OnceLock::new(); static TOKENIZER: OnceLock = OnceLock::new(); fn show_bytes(bs: &[u8]) -> String { - use std::{ascii::escape_default, str}; + use core::{ascii::escape_default, str}; let mut visible = String::new(); for &b in bs { @@ -265,7 +265,7 @@ impl Rule { if let Some(sub) = cap.get(1) { //println!("cap.get(1): {}", sub.as_str()); RuleChild::from_nt( - std::str::from_utf8(sub.as_bytes()) + core::str::from_utf8(sub.as_bytes()) .expect("nonterminals need to be valid strings"), ctx, ) diff --git a/libafl/src/common/nautilus/grammartec/tree.rs b/libafl/src/common/nautilus/grammartec/tree.rs index a922c19a83..e679399531 100644 --- a/libafl/src/common/nautilus/grammartec/tree.rs +++ b/libafl/src/common/nautilus/grammartec/tree.rs @@ -1,5 +1,6 @@ use alloc::vec::Vec; -use std::{cmp, io, io::Write, marker::Sized}; +use core::{cmp, marker::Sized}; +use std::io::{Cursor, Write, stdout}; use hashbrown::HashSet; use libafl_bolts::rands::Rand; @@ -28,7 +29,7 @@ enum UnparseStep<'dat> { struct Unparser<'data, 'tree: 'data, 'ctx: 'data, W: Write, T: TreeLike> { tree: &'tree T, stack: Vec>, - buffers: Vec>>, + buffers: Vec>>, w: W, i: usize, ctx: &'ctx Context, @@ -81,10 +82,7 @@ impl<'data, 'tree: 'data, 'ctx: 'data, W: Write, T: TreeLike> Unparser<'data, 't } fn script(&mut self, py: Python, num: usize, expr: &PyObject) -> PyResult<()> { let bufs = self.buffers.split_off(self.buffers.len() - num); - let bufs = bufs - .into_iter() - .map(io::Cursor::into_inner) - .collect::>(); + let bufs = bufs.into_iter().map(Cursor::into_inner).collect::>(); let byte_arrays = bufs.iter().map(|b| PyBytes::new(py, b)); let res = expr.call1(py, PyTuple::new(py, byte_arrays)?)?; let bound = res.bind(py); @@ -103,7 +101,7 @@ impl<'data, 'tree: 'data, 'ctx: 'data, W: Write, T: TreeLike> Unparser<'data, 't } fn push_buffer(&mut self) { - self.buffers.push(io::Cursor::new(vec![])); + self.buffers.push(Cursor::new(vec![])); } fn next_rule(&mut self, nt: NTermId) { @@ -184,7 +182,7 @@ where } fn unparse_print(&self, ctx: &Context) { - self.unparse_to(ctx, &mut io::stdout()); + self.unparse_to(ctx, &mut stdout()); } } diff --git a/libafl/src/common/nautilus/regex_mutator/mod.rs b/libafl/src/common/nautilus/regex_mutator/mod.rs index 00d4525fe1..ea5f13381f 100644 --- a/libafl/src/common/nautilus/regex_mutator/mod.rs +++ b/libafl/src/common/nautilus/regex_mutator/mod.rs @@ -59,7 +59,7 @@ fn append_unicode_range( let a = u32::from_le_bytes(chr_a_buf); let b = u32::from_le_bytes(chr_b_buf); let c = scr.get_range(rand, a as usize, (b + 1) as usize) as u32; - append_char(res, std::char::from_u32(c).unwrap()); + append_char(res, core::char::from_u32(c).unwrap()); } fn append_byte_range( diff --git a/libafl/src/events/broker_hooks/centralized_multi_machine.rs b/libafl/src/events/broker_hooks/centralized_multi_machine.rs index a8d3973045..451ada48bc 100644 --- a/libafl/src/events/broker_hooks/centralized_multi_machine.rs +++ b/libafl/src/events/broker_hooks/centralized_multi_machine.rs @@ -1,9 +1,8 @@ -use std::{ +use alloc::{sync::Arc, vec::Vec}; +use core::{ fmt::{Debug, Display}, marker::PhantomData, slice, - sync::Arc, - vec::Vec, }; #[cfg(feature = "llmp_compression")] diff --git a/libafl/src/events/launcher.rs b/libafl/src/events/launcher.rs index 329da92f75..3f0d7ce8b8 100644 --- a/libafl/src/events/launcher.rs +++ b/libafl/src/events/launcher.rs @@ -12,12 +12,13 @@ //! On `Unix` systems, the [`Launcher`] will use `fork` if the `fork` feature is used for `LibAFL`. //! Else, it will start subsequent nodes with the same commandline, and will set special `env` variables accordingly. +use alloc::string::String; use core::{ fmt::{self, Debug, Formatter}, + net::SocketAddr, num::NonZeroUsize, time::Duration, }; -use std::{net::SocketAddr, string::String}; use libafl_bolts::{ core_affinity::{CoreId, Cores}, @@ -32,13 +33,13 @@ use { events::{CentralizedLlmpHook, StdLlmpEventHook, centralized::CentralizedEventManager}, inputs::Input, }, + alloc::boxed::Box, alloc::string::ToString, libafl_bolts::{ core_affinity::get_core_ids, llmp::{Broker, Brokers, LlmpBroker}, os::{ForkResult, fork}, }, - std::boxed::Box, }; #[cfg(unix)] use { diff --git a/libafl/src/events/llmp/restarting.rs b/libafl/src/events/llmp/restarting.rs index 94ca7a179f..f35bd2821a 100644 --- a/libafl/src/events/llmp/restarting.rs +++ b/libafl/src/events/llmp/restarting.rs @@ -8,11 +8,11 @@ use alloc::string::ToString; use alloc::vec::Vec; use core::{ marker::PhantomData, + net::SocketAddr, num::NonZeroUsize, sync::atomic::{Ordering, compiler_fence}, time::Duration, }; -use std::net::SocketAddr; #[cfg(feature = "std")] use std::net::TcpStream; diff --git a/libafl/src/events/multi_machine.rs b/libafl/src/events/multi_machine.rs index d4c6c0fa05..1b6932641a 100644 --- a/libafl/src/events/multi_machine.rs +++ b/libafl/src/events/multi_machine.rs @@ -1,16 +1,10 @@ -use core::fmt::Display; -use std::{ - boxed::Box, - collections::HashMap, - io::ErrorKind, - process, - sync::{ - Arc, OnceLock, - atomic::{AtomicU64, Ordering}, - }, +use alloc::{boxed::Box, sync::Arc, vec::Vec}; +use core::{ + fmt::Display, + sync::atomic::{AtomicU64, Ordering}, time::Duration, - vec::Vec, }; +use std::{collections::HashMap, io::ErrorKind, process, sync::OnceLock}; use enumflags2::{BitFlags, bitflags}; #[cfg(feature = "llmp_compression")] @@ -407,9 +401,9 @@ where /// Write an [`OwnedTcpMultiMachineMsg`] to a stream. /// Can be read back using [`TcpMultiMachineState::read_msg`]. - async fn write_msg<'a, I: Input>( + async fn write_msg( stream: &mut TcpStream, - msg: &MultiMachineMsg<'a, I>, + msg: &MultiMachineMsg<'_, I>, ) -> Result<(), Error> { let serialized_msg = msg.serialize_as_ref(); let msg_len = u32::to_le_bytes(serialized_msg.len() as u32); @@ -451,9 +445,9 @@ where Ok(()) } - pub(crate) async fn send_interesting_event_to_nodes<'a, I: Input>( + pub(crate) async fn send_interesting_event_to_nodes( &mut self, - msg: &MultiMachineMsg<'a, I>, + msg: &MultiMachineMsg<'_, I>, ) -> Result<(), Error> { log::debug!("Sending interesting events to nodes..."); @@ -503,9 +497,9 @@ where /// Flush the message queue from other nodes and add incoming events to the /// centralized event manager queue. - pub(crate) async fn receive_new_messages_from_nodes<'a, I: Input>( + pub(crate) async fn receive_new_messages_from_nodes( &mut self, - msgs: &mut Vec>, + msgs: &mut Vec>, ) -> Result<(), Error> { log::debug!("Checking for new events from other nodes..."); // let mut nb_received = 0usize; diff --git a/libafl/src/events/tcp.rs b/libafl/src/events/tcp.rs index 3931c9d85a..70bc9a1f3f 100644 --- a/libafl/src/events/tcp.rs +++ b/libafl/src/events/tcp.rs @@ -1,8 +1,9 @@ //! TCP-backed event manager for scalable multi-processed fuzzing -use alloc::vec::Vec; +use alloc::{sync::Arc, vec::Vec}; use core::{ marker::PhantomData, + net::SocketAddr, num::NonZeroUsize, sync::atomic::{Ordering, compiler_fence}, time::Duration, @@ -10,8 +11,7 @@ use core::{ use std::{ env, io::{ErrorKind, Read, Write}, - net::{SocketAddr, TcpListener, TcpStream, ToSocketAddrs}, - sync::Arc, + net::{TcpListener, TcpStream, ToSocketAddrs}, }; #[cfg(feature = "tcp_compression")] diff --git a/libafl/src/executors/command.rs b/libafl/src/executors/command.rs index 6811cfe696..0580e2edad 100644 --- a/libafl/src/executors/command.rs +++ b/libafl/src/executors/command.rs @@ -1,22 +1,23 @@ //! The command executor executes a sub program for each run +#[cfg(all(feature = "intel_pt", target_os = "linux"))] +use alloc::ffi::CString; use alloc::vec::Vec; +#[cfg(all(feature = "intel_pt", target_os = "linux"))] +use core::ffi::CStr; use core::{ fmt::{self, Debug, Formatter}, marker::PhantomData, ops::IndexMut, + time::Duration, }; #[cfg(all(feature = "intel_pt", target_os = "linux"))] -use std::{ - ffi::{CStr, CString}, - os::fd::AsRawFd, -}; +use std::os::fd::AsRawFd; use std::{ ffi::{OsStr, OsString}, io::{Read, Write}, os::unix::ffi::OsStrExt, path::{Path, PathBuf}, process::{Child, Command, Stdio}, - time::Duration, }; #[cfg(all(feature = "intel_pt", target_os = "linux"))] diff --git a/libafl/src/executors/hooks/inprocess.rs b/libafl/src/executors/hooks/inprocess.rs index 6831e1bfc1..f09c7512fb 100644 --- a/libafl/src/executors/hooks/inprocess.rs +++ b/libafl/src/executors/hooks/inprocess.rs @@ -464,7 +464,7 @@ impl InProcessExecutorHandlerData { ); if let Ok(bsod) = bsod { - if let Ok(r) = std::str::from_utf8(&bsod) { + if let Ok(r) = core::str::from_utf8(&bsod) { log::error!("{}", r); } } diff --git a/libafl/src/executors/hooks/unix.rs b/libafl/src/executors/hooks/unix.rs index f7df4d74f5..c8ff701cc5 100644 --- a/libafl/src/executors/hooks/unix.rs +++ b/libafl/src/executors/hooks/unix.rs @@ -238,7 +238,7 @@ pub mod unix_signal_handler { } let _ = writer.flush(); } - if let Ok(r) = std::str::from_utf8(&bsod) { + if let Ok(r) = core::str::from_utf8(&bsod) { log::error!("{}", r); } } @@ -278,7 +278,7 @@ pub mod unix_signal_handler { } let _ = writer.flush(); } - if let Ok(r) = std::str::from_utf8(&bsod) { + if let Ok(r) = core::str::from_utf8(&bsod) { log::error!("{}", r); } } diff --git a/libafl/src/feedbacks/capture_feedback.rs b/libafl/src/feedbacks/capture_feedback.rs index 7d538c3b11..44102131e5 100644 --- a/libafl/src/feedbacks/capture_feedback.rs +++ b/libafl/src/feedbacks/capture_feedback.rs @@ -1,5 +1,6 @@ //! Feedback that captures Timeouts for re-running -use std::{borrow::Cow, cell::RefCell, fmt::Debug, rc::Rc}; +use alloc::{borrow::Cow, rc::Rc}; +use core::{cell::RefCell, fmt::Debug}; use libafl_bolts::{Error, Named}; use serde::{Serialize, de::DeserializeOwned}; diff --git a/libafl/src/feedbacks/nautilus.rs b/libafl/src/feedbacks/nautilus.rs index cea4f282f5..f2c51bb167 100644 --- a/libafl/src/feedbacks/nautilus.rs +++ b/libafl/src/feedbacks/nautilus.rs @@ -25,7 +25,7 @@ pub struct NautilusChunksMetadata { } impl Debug for NautilusChunksMetadata { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!( f, "NautilusChunksMetadata {{ {} }}", diff --git a/libafl/src/feedbacks/new_hash_feedback.rs b/libafl/src/feedbacks/new_hash_feedback.rs index fa91c50d7a..6a825e3cb6 100644 --- a/libafl/src/feedbacks/new_hash_feedback.rs +++ b/libafl/src/feedbacks/new_hash_feedback.rs @@ -1,7 +1,7 @@ //! The [`NewHashFeedback`] uses the backtrace hash and a hashset to only keep novel cases use alloc::{borrow::Cow, string::ToString}; -use std::fmt::Debug; +use core::fmt::Debug; use hashbrown::HashSet; use libafl_bolts::{ diff --git a/libafl/src/fuzzer/mod.rs b/libafl/src/fuzzer/mod.rs index 6b84208c26..787c4d1f36 100644 --- a/libafl/src/fuzzer/mod.rs +++ b/libafl/src/fuzzer/mod.rs @@ -1,9 +1,9 @@ //! The `Fuzzer` is the main struct for a fuzz campaign. use alloc::{string::ToString, vec::Vec}; -use core::{fmt::Debug, time::Duration}; #[cfg(feature = "std")] -use std::hash::Hash; +use core::hash::Hash; +use core::{fmt::Debug, time::Duration}; #[cfg(feature = "std")] use fastbloom::BloomFilter; diff --git a/libafl/src/generators/nautilus.rs b/libafl/src/generators/nautilus.rs index 2691761d59..abb635f170 100644 --- a/libafl/src/generators/nautilus.rs +++ b/libafl/src/generators/nautilus.rs @@ -21,7 +21,7 @@ pub struct NautilusContext { } impl Debug for NautilusContext { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "NautilusContext {{}}",) } } @@ -114,7 +114,7 @@ pub struct NautilusGenerator<'a> { } impl Debug for NautilusGenerator<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "NautilusGenerator {{}}",) } } diff --git a/libafl/src/inputs/multi.rs b/libafl/src/inputs/multi.rs index db1f2c2c5e..342b701181 100644 --- a/libafl/src/inputs/multi.rs +++ b/libafl/src/inputs/multi.rs @@ -1,7 +1,7 @@ //! An input composed of multiple parts identified by a key. -use alloc::{fmt::Debug, string::String, vec::Vec}; -use core::hash::Hash; +use alloc::{string::String, vec::Vec}; +use core::{fmt::Debug, hash::Hash}; use serde::{Serialize, de::DeserializeOwned}; diff --git a/libafl/src/inputs/nautilus.rs b/libafl/src/inputs/nautilus.rs index f120b9e797..ccabb17cb5 100644 --- a/libafl/src/inputs/nautilus.rs +++ b/libafl/src/inputs/nautilus.rs @@ -1,7 +1,9 @@ //! Input for the [`Nautilus`](https://github.com/RUB-SysSec/nautilus) grammar fuzzer methods use alloc::{rc::Rc, vec::Vec}; -use core::cell::RefCell; -use std::hash::{Hash, Hasher}; +use core::{ + cell::RefCell, + hash::{Hash, Hasher}, +}; use libafl_bolts::{HasLen, ownedref::OwnedSlice}; use serde::{Deserialize, Serialize}; diff --git a/libafl/src/inputs/value.rs b/libafl/src/inputs/value.rs index 0a1e255e68..8a263ba31d 100644 --- a/libafl/src/inputs/value.rs +++ b/libafl/src/inputs/value.rs @@ -138,8 +138,8 @@ where mod tests { #[cfg(feature = "std")] use { - super::ValueInput, crate::mutators::numeric::Numeric, alloc::fmt::Debug, - std::any::type_name, + super::ValueInput, crate::mutators::numeric::Numeric, core::any::type_name, + core::fmt::Debug, }; #[cfg(feature = "std")] diff --git a/libafl/src/monitors/mod.rs b/libafl/src/monitors/mod.rs index ae38aeece9..e1806a40d9 100644 --- a/libafl/src/monitors/mod.rs +++ b/libafl/src/monitors/mod.rs @@ -29,10 +29,13 @@ pub mod prometheus; #[cfg(feature = "statsd_monitor")] pub mod statsd; -use alloc::fmt::Debug; #[cfg(feature = "std")] use alloc::vec::Vec; -use core::{fmt, fmt::Write, time::Duration}; +use core::{ + fmt, + fmt::{Debug, Write}, + time::Duration, +}; use libafl_bolts::ClientId; #[cfg(feature = "prometheus_monitor")] diff --git a/libafl/src/monitors/prometheus.rs b/libafl/src/monitors/prometheus.rs index ebecb50122..f615ea48d6 100644 --- a/libafl/src/monitors/prometheus.rs +++ b/libafl/src/monitors/prometheus.rs @@ -27,13 +27,18 @@ //! //! When using docker, you may need to point `prometheus.yml` to the `docker0` interface or `host.docker.internal` -use alloc::{borrow::Cow, fmt::Debug, string::String}; -use core::{fmt, fmt::Write, time::Duration}; -use std::{ - string::ToString, - sync::{Arc, atomic::AtomicU64}, - thread, +use alloc::{ + borrow::Cow, + string::{String, ToString}, + sync::Arc, }; +use core::{ + fmt, + fmt::{Debug, Write}, + sync::atomic::AtomicU64, + time::Duration, +}; +use std::thread; // using thread in order to start the HTTP server in a separate thread use futures::executor::block_on; diff --git a/libafl/src/monitors/tui/mod.rs b/libafl/src/monitors/tui/mod.rs index f251056ef2..ea51b6b28d 100644 --- a/libafl/src/monitors/tui/mod.rs +++ b/libafl/src/monitors/tui/mod.rs @@ -2,17 +2,21 @@ //! //! It's based on [ratatui](https://ratatui.rs/) -use alloc::{borrow::Cow, boxed::Box, string::ToString}; -use std::{ +use alloc::{ + borrow::Cow, + boxed::Box, collections::VecDeque, - fmt::Write as _, + string::{String, ToString}, + sync::Arc, + vec::Vec, +}; +use core::{fmt::Write as _, time::Duration}; +use std::{ io::{self, BufRead, Write}, panic, - string::String, - sync::{Arc, RwLock}, + sync::RwLock, thread, - time::{Duration, Instant}, - vec::Vec, + time::Instant, }; use crossterm::{ diff --git a/libafl/src/monitors/tui/ui.rs b/libafl/src/monitors/tui/ui.rs index b7ba91b8e7..7287d61d17 100644 --- a/libafl/src/monitors/tui/ui.rs +++ b/libafl/src/monitors/tui/ui.rs @@ -1,9 +1,7 @@ //! The UI-specific parts of [`super::TuiMonitor`] -use alloc::{string::ToString, vec::Vec}; -use std::{ - cmp::{max, min}, - sync::{Arc, RwLock}, -}; +use alloc::{string::ToString, sync::Arc, vec::Vec}; +use core::cmp::{max, min}; +use std::sync::RwLock; use ratatui::{ Frame, diff --git a/libafl/src/mutators/hash.rs b/libafl/src/mutators/hash.rs index 5faa20b1a4..7c53105e93 100644 --- a/libafl/src/mutators/hash.rs +++ b/libafl/src/mutators/hash.rs @@ -1,6 +1,7 @@ //! A wrapper around a [`Mutator`] that ensures an input really changed [`MutationResult::Mutated`] //! by hashing pre- and post-mutation -use std::{borrow::Cow, hash::Hash}; +use alloc::borrow::Cow; +use core::hash::Hash; use libafl_bolts::{Error, Named, generic_hash_std}; diff --git a/libafl/src/mutators/nautilus.rs b/libafl/src/mutators/nautilus.rs index 42e9829743..10d3eaec62 100644 --- a/libafl/src/mutators/nautilus.rs +++ b/libafl/src/mutators/nautilus.rs @@ -29,7 +29,7 @@ pub struct NautilusRandomMutator<'a> { } impl Debug for NautilusRandomMutator<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "NautilusRandomMutator {{}}") } } @@ -91,7 +91,7 @@ pub struct NautilusRecursionMutator<'a> { } impl Debug for NautilusRecursionMutator<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "NautilusRecursionMutator {{}}") } } @@ -155,7 +155,7 @@ pub struct NautilusSpliceMutator<'a> { } impl Debug for NautilusSpliceMutator<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "NautilusSpliceMutator {{}}") } } diff --git a/libafl/src/mutators/token_mutations.rs b/libafl/src/mutators/token_mutations.rs index eaebcb960d..58df249555 100644 --- a/libafl/src/mutators/token_mutations.rs +++ b/libafl/src/mutators/token_mutations.rs @@ -2130,7 +2130,7 @@ token2="B" let taint_len = 0; let input_len = 0; let hshape = 0; - let mut vec = std::vec::Vec::new(); + let mut vec = alloc::vec::Vec::new(); let _res = rq.cmp_extend_encoding( pattern, diff --git a/libafl/src/observers/concolic/metadata.rs b/libafl/src/observers/concolic/metadata.rs index c55c54858f..8373ae0656 100644 --- a/libafl/src/observers/concolic/metadata.rs +++ b/libafl/src/observers/concolic/metadata.rs @@ -16,7 +16,7 @@ impl ConcolicMetadata { /// Iterates over all messages in the buffer. Does not consume the buffer. pub fn iter_messages(&self) -> impl Iterator + '_ { let mut parser = MessageFileReader::from_buffer(&self.buffer); - std::iter::from_fn(move || parser.next_message()).flatten() + core::iter::from_fn(move || parser.next_message()).flatten() } pub(crate) fn from_buffer(buffer: Vec) -> Self { diff --git a/libafl/src/observers/concolic/serialization_format.rs b/libafl/src/observers/concolic/serialization_format.rs index 3718d4eb4c..ce96ee0512 100644 --- a/libafl/src/observers/concolic/serialization_format.rs +++ b/libafl/src/observers/concolic/serialization_format.rs @@ -42,10 +42,8 @@ //! //! ... making for a total of 5 bytes. -use std::{ - fmt::{self, Debug, Formatter}, - io::{self, Cursor, Read, Seek, SeekFrom, Write}, -}; +use core::fmt::{self, Debug, Formatter}; +use std::io::{self, Cursor, Read, Seek, SeekFrom, Write}; use bincode::{DefaultOptions, Options}; pub use bincode::{ErrorKind, Result}; diff --git a/libafl/src/observers/stacktrace.rs b/libafl/src/observers/stacktrace.rs index 7ec365b18e..77ca29a8c8 100644 --- a/libafl/src/observers/stacktrace.rs +++ b/libafl/src/observers/stacktrace.rs @@ -1,14 +1,14 @@ //! the ``StacktraceObserver`` looks up the stacktrace on the execution thread and computes a hash for it for dedupe -use alloc::{borrow::Cow, string::String, vec::Vec}; #[cfg(feature = "casr")] +use alloc::string::ToString; +use alloc::{borrow::Cow, string::String, vec::Vec}; +use core::fmt::Debug; +#[cfg(feature = "casr")] +use core::hash::{Hash, Hasher}; +#[cfg(feature = "casr")] +use std::collections::hash_map::DefaultHasher; use std::{ - collections::hash_map::DefaultHasher, - hash::{Hash, Hasher}, - string::ToString, -}; -use std::{ - fmt::Debug, fs::{self, File}, io::Read, path::Path, diff --git a/libafl/src/observers/stdio.rs b/libafl/src/observers/stdio.rs index 853db0a67b..2d3abc78bd 100644 --- a/libafl/src/observers/stdio.rs +++ b/libafl/src/observers/stdio.rs @@ -7,9 +7,8 @@ doc = r"For example, they are supported on the [`crate::executors::CommandExecutor`]." )] -use alloc::borrow::Cow; +use alloc::{borrow::Cow, vec::Vec}; use core::marker::PhantomData; -use std::vec::Vec; use libafl_bolts::Named; use serde::{Deserialize, Serialize}; diff --git a/libafl/src/stages/afl_stats.rs b/libafl/src/stages/afl_stats.rs index 6ab18113c8..d6b8d5a2ca 100644 --- a/libafl/src/stages/afl_stats.rs +++ b/libafl/src/stages/afl_stats.rs @@ -1,9 +1,7 @@ //! Stage to compute and report AFL++ stats -use alloc::{string::String, vec::Vec}; -use core::{marker::PhantomData, time::Duration}; +use alloc::{borrow::Cow, string::String, vec::Vec}; +use core::{fmt::Display, marker::PhantomData, time::Duration}; use std::{ - borrow::Cow, - fmt::Display, fs::{File, OpenOptions}, io::{BufRead, BufReader, Write}, path::{Path, PathBuf}, @@ -563,7 +561,7 @@ where } impl Display for AFLPlotData<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{},", self.relative_time)?; write!(f, "{},", self.cycles_done)?; write!(f, "{},", self.cur_item)?; @@ -586,7 +584,7 @@ impl AFLPlotData<'_> { } } impl Display for AFLFuzzerStats<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { writeln!(f, "start_time : {}", &self.start_time)?; writeln!(f, "start_time : {}", &self.start_time)?; writeln!(f, "last_update : {}", &self.last_update)?; diff --git a/libafl/src/stages/dump.rs b/libafl/src/stages/dump.rs index 7b417e8fdd..95dc6b9ca8 100644 --- a/libafl/src/stages/dump.rs +++ b/libafl/src/stages/dump.rs @@ -1,12 +1,14 @@ //! The [`DumpToDiskStage`] is a stage that dumps the corpus and the solutions to disk to e.g. allow AFL to sync -use alloc::vec::Vec; +use alloc::{ + string::{String, ToString}, + vec::Vec, +}; use core::{clone::Clone, marker::PhantomData}; use std::{ fs::{self, File}, io::Write, path::{Path, PathBuf}, - string::{String, ToString}, }; use libafl_bolts::impl_serdeany; diff --git a/libafl/src/stages/time_tracker.rs b/libafl/src/stages/time_tracker.rs index 0e95e8af9a..ec79de33c0 100644 --- a/libafl/src/stages/time_tracker.rs +++ b/libafl/src/stages/time_tracker.rs @@ -1,5 +1,5 @@ //! Stage that wraps another stage and tracks it's execution time in `State` -use std::{marker::PhantomData, time::Duration}; +use core::{marker::PhantomData, time::Duration}; use libafl_bolts::{Error, current_time}; diff --git a/libafl/src/stages/verify_timeouts.rs b/libafl/src/stages/verify_timeouts.rs index e4b7267491..2c7d5932e3 100644 --- a/libafl/src/stages/verify_timeouts.rs +++ b/libafl/src/stages/verify_timeouts.rs @@ -3,8 +3,8 @@ //! Note: To capture the timeouts, use in conjunction with `CaptureTimeoutFeedback` //! Note: Will NOT work with in process executors due to the potential for restarts/crashes when //! running inputs. -use core::time::Duration; -use std::{cell::RefCell, collections::VecDeque, fmt::Debug, marker::PhantomData, rc::Rc}; +use alloc::{collections::VecDeque, rc::Rc}; +use core::{cell::RefCell, fmt::Debug, marker::PhantomData, time::Duration}; use libafl_bolts::Error; use serde::{Deserialize, Serialize, de::DeserializeOwned}; diff --git a/libafl_bolts/examples/llmp_test/main.rs b/libafl_bolts/examples/llmp_test/main.rs index a4a9fa2d84..2ac4d09413 100644 --- a/libafl_bolts/examples/llmp_test/main.rs +++ b/libafl_bolts/examples/llmp_test/main.rs @@ -3,11 +3,13 @@ This shows how llmp can be used directly, without libafl abstractions */ extern crate alloc; +use core::marker::PhantomData; +#[cfg(all(feature = "std", not(target_os = "haiku")))] +use core::num::NonZeroUsize; #[cfg(not(target_os = "haiku"))] use core::time::Duration; -use std::marker::PhantomData; #[cfg(all(feature = "std", not(target_os = "haiku")))] -use std::{num::NonZeroUsize, thread, time}; +use std::{thread, time}; use libafl_bolts::llmp::{LlmpBrokerInner, LlmpMsgHookResult}; #[cfg(all(feature = "std", not(target_os = "haiku")))] @@ -37,7 +39,7 @@ const SLEEP_BETWEEN_FORWARDS: Duration = Duration::from_millis(5); static LOGGER: SimpleStderrLogger = SimpleStderrLogger::new(); #[cfg(all(feature = "std", not(target_os = "haiku")))] -fn adder_loop(port: u16) -> Result<(), Box> { +fn adder_loop(port: u16) -> Result<(), Box> { let shmem_provider = StdShMemProvider::new()?; let mut client = llmp::LlmpClient::create_attach_to_tcp(shmem_provider, port)?; let mut last_result: u32 = 0; @@ -75,7 +77,7 @@ fn adder_loop(port: u16) -> Result<(), Box> { } #[cfg(all(feature = "std", not(target_os = "haiku")))] -fn large_msg_loop(port: u16) -> Result<(), Box> { +fn large_msg_loop(port: u16) -> Result<(), Box> { let mut client = llmp::LlmpClient::create_attach_to_tcp(StdShMemProvider::new()?, port)?; #[cfg(not(target_vendor = "apple"))] @@ -165,7 +167,7 @@ fn main() { } #[cfg(not(target_os = "haiku"))] -fn main() -> Result<(), Box> { +fn main() -> Result<(), Box> { /* The main node has a broker, and a few worker threads */ use libafl_bolts::llmp::Broker; diff --git a/libafl_bolts/src/build_id.rs b/libafl_bolts/src/build_id.rs index d88762e280..876ac1a661 100644 --- a/libafl_bolts/src/build_id.rs +++ b/libafl_bolts/src/build_id.rs @@ -1,14 +1,11 @@ //! Based on //! (C) Alec Mocatta under license MIT or Apache 2 -use std::{ +use core::{ any::TypeId, - env, - fs::File, hash::{Hash, Hasher}, - io, - sync::OnceLock, }; +use std::{env, fs::File, io, sync::OnceLock}; use uuid::Uuid; diff --git a/libafl_bolts/src/cli.rs b/libafl_bolts/src/cli.rs index 92b4360423..28273e74f7 100644 --- a/libafl_bolts/src/cli.rs +++ b/libafl_bolts/src/cli.rs @@ -64,9 +64,10 @@ #[cfg(feature = "frida_cli")] use alloc::{boxed::Box, string::ToString}; use alloc::{string::String, vec::Vec}; +use core::{net::SocketAddr, time::Duration}; #[cfg(feature = "frida_cli")] use std::error; -use std::{net::SocketAddr, path::PathBuf, time::Duration}; +use std::path::PathBuf; #[cfg(feature = "frida_cli")] use clap::ValueEnum; diff --git a/libafl_bolts/src/fs.rs b/libafl_bolts/src/fs.rs index f85e09bff8..bdf6c7af78 100644 --- a/libafl_bolts/src/fs.rs +++ b/libafl_bolts/src/fs.rs @@ -1,8 +1,8 @@ //! `LibAFL` functionality for filesystem interaction -use alloc::rc::Rc; #[cfg(feature = "std")] use alloc::{borrow::ToOwned, vec::Vec}; +use alloc::{rc::Rc, string::String}; use core::cell::RefCell; #[cfg(feature = "std")] use core::time::Duration; @@ -14,7 +14,6 @@ use std::{ fs::{self, File, OpenOptions, remove_file}, io::{Seek, Write}, path::{Path, PathBuf}, - string::String, }; use crate::Error; diff --git a/libafl_bolts/src/lib.rs b/libafl_bolts/src/lib.rs index 155f6c0900..8b14267418 100644 --- a/libafl_bolts/src/lib.rs +++ b/libafl_bolts/src/lib.rs @@ -145,13 +145,14 @@ use alloc::{borrow::Cow, vec::Vec}; use core::hash::BuildHasher; #[cfg(any(feature = "xxh3", feature = "alloc"))] use core::hash::{Hash, Hasher}; +#[cfg(all(unix, feature = "std"))] +use core::mem; #[cfg(feature = "std")] use std::time::{SystemTime, UNIX_EPOCH}; #[cfg(all(unix, feature = "std"))] use std::{ fs::File, io::{Write, stderr, stdout}, - mem, os::fd::{AsRawFd, FromRawFd, RawFd}, panic, }; diff --git a/libafl_bolts/src/llmp.rs b/libafl_bolts/src/llmp.rs index 75d1919ad5..d51a81be56 100644 --- a/libafl_bolts/src/llmp.rs +++ b/libafl_bolts/src/llmp.rs @@ -57,9 +57,13 @@ Check out the `llmp_test` example in ./examples, or build it with `cargo run --e */ +#[cfg(feature = "std")] +use alloc::boxed::Box; #[cfg(feature = "std")] use alloc::string::ToString; use alloc::{string::String, vec::Vec}; +#[cfg(feature = "std")] +use core::net::SocketAddr; #[cfg(not(target_pointer_width = "64"))] use core::sync::atomic::AtomicU32; #[cfg(target_pointer_width = "64")] @@ -77,10 +81,9 @@ use core::{ }; #[cfg(feature = "std")] use std::{ - boxed::Box, env, io::{ErrorKind, Read, Write}, - net::{SocketAddr, TcpListener, TcpStream, ToSocketAddrs}, + net::{TcpListener, TcpStream, ToSocketAddrs}, sync::mpsc::channel, thread, }; @@ -3864,7 +3867,8 @@ impl LlmpClient { #[cfg(all(unix, feature = "std", not(target_os = "haiku")))] mod tests { - use std::{thread::sleep, time::Duration}; + use core::time::Duration; + use std::thread::sleep; use serial_test::serial; diff --git a/libafl_bolts/src/minibsod.rs b/libafl_bolts/src/minibsod.rs index ee7a8d44cc..5195d3229f 100644 --- a/libafl_bolts/src/minibsod.rs +++ b/libafl_bolts/src/minibsod.rs @@ -1,13 +1,13 @@ //! Implements a mini-bsod generator. //! It dumps all important registers and prints a stacktrace. +#[cfg(unix)] +use alloc::vec::Vec; #[cfg(any(target_vendor = "apple", target_os = "openbsd"))] use core::mem::size_of; use std::io::{BufWriter, Write}; #[cfg(any(target_os = "solaris", target_os = "illumos"))] use std::process::Command; -#[cfg(unix)] -use std::vec::Vec; #[cfg(unix)] use libc::siginfo_t; @@ -999,7 +999,7 @@ fn write_minibsod(writer: &mut BufWriter) -> Result<(), std::io::Er #[cfg(target_vendor = "apple")] fn write_minibsod(writer: &mut BufWriter) -> Result<(), std::io::Error> { - let mut ptask = std::mem::MaybeUninit::::uninit(); + let mut ptask = core::mem::MaybeUninit::::uninit(); // We start by the lowest virtual address from the userland' standpoint let mut addr: mach_vm_address_t = 0; let mut _cnt: mach_msg_type_number_t = 0; @@ -1014,7 +1014,7 @@ fn write_minibsod(writer: &mut BufWriter) -> Result<(), std::io::Er let task = unsafe { ptask.assume_init() }; loop { - let mut pvminfo = std::mem::MaybeUninit::::uninit(); + let mut pvminfo = core::mem::MaybeUninit::::uninit(); _cnt = mach_msg_type_number_t::try_from( size_of::() / size_of::(), ) diff --git a/libafl_bolts/src/os/mod.rs b/libafl_bolts/src/os/mod.rs index 004b8bfb14..f15e33d01b 100644 --- a/libafl_bolts/src/os/mod.rs +++ b/libafl_bolts/src/os/mod.rs @@ -15,15 +15,17 @@ pub use unix_signals::CTRL_C_EXIT; pub mod pipes; #[cfg(all(unix, feature = "std"))] -use alloc::borrow::Cow; +use alloc::{borrow::Cow, ffi::CString}; #[cfg(all(unix, feature = "std"))] use core::ffi::CStr; #[cfg(feature = "std")] use std::{env, process::Command}; #[cfg(all(unix, feature = "std"))] -use std::{ffi::CString, os::fd::RawFd}; -#[cfg(all(unix, feature = "std"))] -use std::{fs::File, os::fd::AsRawFd, sync::OnceLock}; +use std::{ + fs::File, + os::fd::{AsRawFd, RawFd}, + sync::OnceLock, +}; // Allow a few extra features we need for the whole module #[cfg(all(windows, feature = "std"))] diff --git a/libafl_bolts/src/os/pipes.rs b/libafl_bolts/src/os/pipes.rs index 0dea7a5faa..1541623a3f 100644 --- a/libafl_bolts/src/os/pipes.rs +++ b/libafl_bolts/src/os/pipes.rs @@ -1,14 +1,15 @@ //! Unix `pipe` wrapper for `LibAFL` #[cfg(feature = "std")] +use alloc::rc::Rc; +#[cfg(feature = "std")] +use core::{borrow::Borrow, cell::RefCell}; +#[cfg(feature = "std")] use std::{ - borrow::Borrow, - cell::RefCell, io::{self, ErrorKind, Read, Write}, os::{ fd::{AsFd, AsRawFd, OwnedFd}, unix::io::RawFd, }, - rc::Rc, }; #[cfg(feature = "std")] diff --git a/libafl_bolts/src/os/unix_shmem_server.rs b/libafl_bolts/src/os/unix_shmem_server.rs index 4ed95c701d..1ae1dcbbe2 100644 --- a/libafl_bolts/src/os/unix_shmem_server.rs +++ b/libafl_bolts/src/os/unix_shmem_server.rs @@ -5,26 +5,29 @@ Hence, the `unix_shmem_server` keeps track of existing maps, creates new maps fo and forwards them over unix domain sockets. */ +use alloc::{ + rc::{Rc, Weak}, + sync::Arc, +}; #[cfg(feature = "std")] use alloc::{ string::{String, ToString}, vec::Vec, }; use core::{ + cell::RefCell, fmt::Debug, + marker::PhantomData, mem::ManuallyDrop, ops::{Deref, DerefMut}, }; #[cfg(target_vendor = "apple")] use std::fs; use std::{ - cell::RefCell, env, io::{Read, Write}, - marker::PhantomData, os::fd::{AsFd, BorrowedFd}, - rc::{Rc, Weak}, - sync::{Arc, Condvar, Mutex}, + sync::{Condvar, Mutex}, thread::JoinHandle, }; #[cfg(all(feature = "std", unix))] diff --git a/libafl_bolts/src/os/unix_signals.rs b/libafl_bolts/src/os/unix_signals.rs index 3ebed948f7..3b9ddd1041 100644 --- a/libafl_bolts/src/os/unix_signals.rs +++ b/libafl_bolts/src/os/unix_signals.rs @@ -1,4 +1,6 @@ //! Signal handling for unix +#[cfg(feature = "std")] +use alloc::ffi::CString; #[cfg(feature = "alloc")] use alloc::vec::Vec; #[cfg(all(target_vendor = "apple", target_arch = "aarch64"))] @@ -13,8 +15,6 @@ use core::{ fmt::{self, Display, Formatter}, mem, }; -#[cfg(feature = "std")] -use std::ffi::CString; /// armv7 `libc` does not feature a `uncontext_t` implementation #[cfg(target_arch = "arm")] diff --git a/libafl_bolts/src/ownedref.rs b/libafl_bolts/src/ownedref.rs index 74312ba1ac..d3e74022e0 100644 --- a/libafl_bolts/src/ownedref.rs +++ b/libafl_bolts/src/ownedref.rs @@ -1,18 +1,14 @@ //! Wrappers that abstracts references (or pointers) and owned data accesses. // The serialization is towards owned, allowing to serialize pointers without troubles. -use alloc::{ - boxed::Box, - slice::{Iter, IterMut}, - vec::Vec, -}; +use alloc::{boxed::Box, vec::Vec}; use core::{ clone::Clone, fmt::Debug, ops::{Deref, DerefMut, RangeBounds}, ptr::NonNull, slice, - slice::SliceIndex, + slice::{Iter, IterMut, SliceIndex}, }; use serde::{Deserialize, Deserializer, Serialize, Serializer}; diff --git a/libafl_bolts/src/rands/mod.rs b/libafl_bolts/src/rands/mod.rs index d213588053..de8c1c8ffe 100644 --- a/libafl_bolts/src/rands/mod.rs +++ b/libafl_bolts/src/rands/mod.rs @@ -36,10 +36,8 @@ fn random_seed_deterministic() -> u64 { #[cfg(feature = "std")] fn random_seed_from_random_state() -> u64 { - use std::{ - collections::hash_map::RandomState, - hash::{BuildHasher, Hasher}, - }; + use core::hash::{BuildHasher, Hasher}; + use std::collections::hash_map::RandomState; RandomState::new().build_hasher().finish() } diff --git a/libafl_bolts/src/shmem.rs b/libafl_bolts/src/shmem.rs index 3ae501e91d..8780abba3e 100644 --- a/libafl_bolts/src/shmem.rs +++ b/libafl_bolts/src/shmem.rs @@ -194,7 +194,7 @@ impl ShMemId { #[cfg(feature = "alloc")] #[must_use] pub fn as_str(&self) -> &str { - alloc::str::from_utf8(&self.id[..self.null_pos()]).unwrap() + core::str::from_utf8(&self.id[..self.null_pos()]).unwrap() } } @@ -1165,12 +1165,11 @@ pub mod unix_shmem { /// Module containing `ashmem` shared memory support, commonly used on Android. #[cfg(all(any(target_os = "linux", target_os = "android"), feature = "std"))] pub mod ashmem { - use alloc::string::ToString; + use alloc::{ffi::CString, string::ToString}; use core::{ ops::{Deref, DerefMut}, ptr, slice, }; - use std::ffi::CString; use libc::{ MAP_SHARED, O_RDWR, PROT_READ, PROT_WRITE, c_uint, c_ulong, c_void, close, ioctl, mmap, @@ -1386,12 +1385,12 @@ pub mod unix_shmem { any(target_os = "linux", target_os = "android", target_os = "freebsd") ))] pub mod memfd { - use alloc::string::ToString; + use alloc::{ffi::CString, string::ToString}; use core::{ ops::{Deref, DerefMut}, ptr, slice, }; - use std::{ffi::CString, os::fd::IntoRawFd}; + use std::os::fd::IntoRawFd; use libc::{ MAP_SHARED, PROT_READ, PROT_WRITE, c_void, close, fstat, ftruncate, mmap, munmap, @@ -1454,7 +1453,7 @@ pub mod unix_shmem { fn shmem_from_id_and_size(id: ShMemId, map_size: usize) -> Result { let fd = i32::from(id); unsafe { - let mut stat = std::mem::zeroed(); + let mut stat = core::mem::zeroed(); if fstat(fd, &mut stat) == -1 { return Err(Error::unknown( "Failed to map the memfd mapping".to_string(), @@ -1880,11 +1879,11 @@ mod tests { #[cfg(unix)] #[cfg_attr(miri, ignore)] fn test_persist_shmem() -> Result<(), Error> { + use alloc::string::ToString; use core::ffi::CStr; use std::{ env, process::{Command, Stdio}, - string::ToString, }; use crate::shmem::{MmapShMemProvider, ShMem as _, ShMemId}; diff --git a/libafl_bolts/src/staterestore.rs b/libafl_bolts/src/staterestore.rs index f86c3777e7..4db493a905 100644 --- a/libafl_bolts/src/staterestore.rs +++ b/libafl_bolts/src/staterestore.rs @@ -5,14 +5,15 @@ use core::{ hash::{BuildHasher, Hasher}, marker::PhantomData, mem::size_of, - ptr, slice, + ptr, + ptr::read_volatile, + slice, }; use std::{ env::temp_dir, fs::{self, File}, io::{Read, Write}, path::PathBuf, - ptr::read_volatile, }; use ahash::RandomState; diff --git a/libafl_bolts/src/tuples.rs b/libafl_bolts/src/tuples.rs index 42ccfb77cd..e9e1faed1b 100644 --- a/libafl_bolts/src/tuples.rs +++ b/libafl_bolts/src/tuples.rs @@ -1014,11 +1014,11 @@ mod test { fn test_macros() { let mut t = tuple_list!(1, "a"); - tuple_for_each!(f1, std::fmt::Display, t, |x| { + tuple_for_each!(f1, core::fmt::Display, t, |x| { log::info!("{x}"); }); - tuple_for_each_mut!(f2, std::fmt::Display, t, |x| { + tuple_for_each_mut!(f2, core::fmt::Display, t, |x| { log::info!("{x}"); }); } diff --git a/libafl_cc/build.rs b/libafl_cc/build.rs index ec290d72a5..682ef73a43 100644 --- a/libafl_cc/build.rs +++ b/libafl_cc/build.rs @@ -1,3 +1,4 @@ +use core::str; #[cfg(any( target_vendor = "apple", feature = "ddg-instr", @@ -11,7 +12,7 @@ feature = "profiling", ))] use std::path::PathBuf; -use std::{env, fs::File, io::Write, path::Path, process::Command, str}; +use std::{env, fs::File, io::Write, path::Path, process::Command}; #[cfg(target_vendor = "apple")] use glob::glob; diff --git a/libafl_cc/src/ar.rs b/libafl_cc/src/ar.rs index f42abcd8a9..d6fb13d67e 100644 --- a/libafl_cc/src/ar.rs +++ b/libafl_cc/src/ar.rs @@ -1,7 +1,8 @@ //! Ar Wrapper from `LibAFL` // pass to e.g. cmake with -DCMAKE_AR=/path/to/fuzzer/target/release/libafl_ar -use std::{env, path::PathBuf, str::FromStr}; +use core::str::FromStr; +use std::{env, path::PathBuf}; use crate::{Error, LIB_EXT, LIB_PREFIX, ToolWrapper}; diff --git a/libafl_cc/src/cfg.rs b/libafl_cc/src/cfg.rs index f22a19e0b1..64ecc2c856 100644 --- a/libafl_cc/src/cfg.rs +++ b/libafl_cc/src/cfg.rs @@ -1,9 +1,11 @@ //! LLVM style control flow graph with information of AFL-style index of the each //! edges, use together with ``AFLCoverage`` pass having --dump-afl-cfg flag enabled. -use std::{ - collections::{BinaryHeap, HashMap, HashSet}, - marker::PhantomData, -}; + +extern crate alloc; + +use alloc::collections::BinaryHeap; +use core::marker::PhantomData; +use std::collections::{HashMap, HashSet}; use serde::{Deserialize, Serialize}; diff --git a/libafl_cc/src/clang.rs b/libafl_cc/src/clang.rs index bf733b54e7..44bcf802b1 100644 --- a/libafl_cc/src/clang.rs +++ b/libafl_cc/src/clang.rs @@ -1,10 +1,7 @@ //! LLVM compiler Wrapper from `LibAFL` -use std::{ - env, - path::{Path, PathBuf}, - str::FromStr, -}; +use core::{env, str::FromStr}; +use std::path::{Path, PathBuf}; use crate::{CompilerWrapper, Error, LIB_EXT, LIB_PREFIX, ToolWrapper}; diff --git a/libafl_cc/src/lib.rs b/libafl_cc/src/lib.rs index 76de3f3dd2..767a005df5 100644 --- a/libafl_cc/src/lib.rs +++ b/libafl_cc/src/lib.rs @@ -145,7 +145,7 @@ impl Configuration { } } -impl std::str::FromStr for Configuration { +impl str::FromStr for Configuration { type Err = (); fn from_str(input: &str) -> Result { Ok(match input { @@ -159,8 +159,8 @@ impl std::str::FromStr for Configuration { } } -impl std::fmt::Display for Configuration { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { +impl core::fmt::Display for Configuration { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { match self { Configuration::Default => write!(f, ""), Configuration::AddressSanitizer => write!(f, "asan"), diff --git a/libafl_cc/src/libtool.rs b/libafl_cc/src/libtool.rs index 7e944e6fd3..3b38bd1be2 100644 --- a/libafl_cc/src/libtool.rs +++ b/libafl_cc/src/libtool.rs @@ -1,7 +1,8 @@ //! Libtool Wrapper from `LibAFL` // call make passing LIBTOOL=/path/to/target/release/libafl_libtool -use std::{env, path::PathBuf, str::FromStr}; +use core::str::FromStr; +use std::{env, path::PathBuf}; use crate::{Error, LIB_EXT, LIB_PREFIX, ToolWrapper}; diff --git a/libafl_concolic/symcc_runtime/build.rs b/libafl_concolic/symcc_runtime/build.rs index c7a24e4724..4e01f629af 100644 --- a/libafl_concolic/symcc_runtime/build.rs +++ b/libafl_concolic/symcc_runtime/build.rs @@ -1,5 +1,5 @@ +use core::cell::RefCell; use std::{ - cell::RefCell, env, fs::File, io::Write, diff --git a/libafl_concolic/symcc_runtime/src/filter/coverage.rs b/libafl_concolic/symcc_runtime/src/filter/coverage.rs index 1d5e907abd..4cf6adfdb1 100644 --- a/libafl_concolic/symcc_runtime/src/filter/coverage.rs +++ b/libafl_concolic/symcc_runtime/src/filter/coverage.rs @@ -1,8 +1,8 @@ -use std::{ - collections::hash_map::DefaultHasher, +use core::{ hash::{BuildHasher, BuildHasherDefault, Hash, Hasher}, marker::PhantomData, }; +use std::collections::hash_map::DefaultHasher; use libafl_bolts::shmem::ShMem; diff --git a/libafl_concolic/symcc_runtime/src/lib.rs b/libafl_concolic/symcc_runtime/src/lib.rs index b7824b51d7..5a9ee5225c 100644 --- a/libafl_concolic/symcc_runtime/src/lib.rs +++ b/libafl_concolic/symcc_runtime/src/lib.rs @@ -189,12 +189,12 @@ macro_rules! impl_nop_runtime_fn { // special case for expression_unreachable, because it has a different signature in our runtime trait than in the c interface. (pub fn expression_unreachable(expressions: *mut RSymExpr, num_elements: usize), $c_name:ident;) => { // #[expect(clippy::default_trait_access)] - fn expression_unreachable(&mut self, _exprs: &[RSymExpr]) {std::default::Default::default()} + fn expression_unreachable(&mut self, _exprs: &[RSymExpr]) {core::default::Default::default()} }; (pub fn $name:ident($( $arg:ident : $type:ty ),*$(,)?)$( -> $ret:ty)?, $c_name:ident;) => { // #[expect(clippy::default_trait_access)] - fn $name(&mut self, $( _ : $type),*)$( -> Option<$ret>)? {std::default::Default::default()} + fn $name(&mut self, $( _ : $type),*)$( -> Option<$ret>)? {core::default::Default::default()} }; } diff --git a/libafl_frida/src/alloc.rs b/libafl_frida/src/allocator.rs similarity index 97% rename from libafl_frida/src/alloc.rs rename to libafl_frida/src/allocator.rs index 7b07bd4427..161ee59aa2 100644 --- a/libafl_frida/src/alloc.rs +++ b/libafl_frida/src/allocator.rs @@ -7,7 +7,17 @@ target_os = "android" ) ))] -use std::{collections::BTreeMap, ffi::c_void}; +use alloc::collections::BTreeMap; +#[cfg(any( + windows, + target_os = "linux", + target_vendor = "apple", + all( + any(target_arch = "aarch64", target_arch = "x86_64"), + target_os = "android" + ) +))] +use core::ffi::c_void; use backtrace::Backtrace; use frida_gum::{PageProtection, RangeDetails}; @@ -183,12 +193,12 @@ impl Allocator { panic!("ASAN: Allocation is too large: 0x{size:x}"); } - return std::ptr::null_mut(); + return core::ptr::null_mut(); } let rounded_up_size = self.round_up_to_page(size) + 2 * self.page_size; if self.total_allocation_size + rounded_up_size > self.max_total_allocation { - return std::ptr::null_mut(); + return core::ptr::null_mut(); } self.total_allocation_size += rounded_up_size; @@ -212,7 +222,7 @@ impl Allocator { Ok(mapping) => mapping, Err(err) => { log::error!("An error occurred while mapping memory: {err:?}"); - return std::ptr::null_mut(); + return core::ptr::null_mut(); } }; self.current_mapping_addr += ((rounded_up_size @@ -241,7 +251,7 @@ impl Allocator { metadata }; - self.largest_allocation = std::cmp::max(self.largest_allocation, metadata.actual_size); + self.largest_allocation = core::cmp::max(self.largest_allocation, metadata.actual_size); // unpoison the shadow memory for the allocation itself unsafe { Self::unpoison( @@ -308,7 +318,7 @@ impl Allocator { let new_offset = if hint_base == metadata.address { (ptr - address).abs() } else { - std::cmp::min(offset_to_closest, (ptr - address).abs()) + core::cmp::min(offset_to_closest, (ptr - address).abs()) }; if new_offset < offset_to_closest { offset_to_closest = new_offset; @@ -370,7 +380,7 @@ impl Allocator { /// start needs to be a valid address, We need to be able to fill `size / 8` bytes. unsafe fn unpoison(start: usize, size: usize) { unsafe { - std::slice::from_raw_parts_mut(start as *mut u8, size / 8).fill(0xff); + core::slice::from_raw_parts_mut(start as *mut u8, size / 8).fill(0xff); let remainder = size % 8; if remainder > 0 { @@ -387,7 +397,7 @@ impl Allocator { /// start needs to be a valid address, We need to be able to fill `size / 8` bytes. pub unsafe fn poison(start: usize, size: usize) { unsafe { - std::slice::from_raw_parts_mut(start as *mut u8, size / 8).fill(0x0); + core::slice::from_raw_parts_mut(start as *mut u8, size / 8).fill(0x0); let remainder = size % 8; if remainder > 0 { @@ -485,7 +495,7 @@ impl Allocator { let shadow_addr = map_to_shadow!(self, (address as usize)); let shadow_size = size >> 3; - let buf = unsafe { std::slice::from_raw_parts_mut(shadow_addr as *mut u8, shadow_size) }; + let buf = unsafe { core::slice::from_raw_parts_mut(shadow_addr as *mut u8, shadow_size) }; let (prefix, aligned, suffix) = unsafe { buf.align_to::() }; if !prefix.iter().all(|&x| x == 0xff) || !suffix.iter().all(|&x| x == 0xff) @@ -605,7 +615,7 @@ impl Allocator { unsafe { println!( "{:x?}", - std::slice::from_raw_parts(metadata.address as *const u8, metadata.size) + core::slice::from_raw_parts(metadata.address as *const u8, metadata.size) ); }; panic!("ASAN: Crashing target!"); diff --git a/libafl_frida/src/asan/asan_rt.rs b/libafl_frida/src/asan/asan_rt.rs index d2a71e597f..c1a4cffe09 100644 --- a/libafl_frida/src/asan/asan_rt.rs +++ b/libafl_frida/src/asan/asan_rt.rs @@ -6,14 +6,14 @@ even if the target would not have crashed under normal conditions. this helps finding mem errors early. */ -use core::fmt::{self, Debug, Formatter}; -use std::{ +use alloc::rc::Rc; +use core::{ cell::Cell, ffi::{c_char, c_void}, + fmt::{self, Debug, Formatter}, ptr::write_volatile, - rc::Rc, - sync::{Mutex, MutexGuard}, }; +use std::sync::{Mutex, MutexGuard}; use backtrace::Backtrace; use dynasmrt::{DynasmApi, DynasmLabelApi, dynasm}; @@ -47,7 +47,7 @@ use crate::utils::{AccessType, operand_details}; #[cfg(target_arch = "aarch64")] use crate::utils::{instruction_width, writer_register}; use crate::{ - alloc::Allocator, + allocator::Allocator, asan::errors::{ASAN_ERRORS, AsanError, AsanErrors, AsanReadWriteError}, helper::{FridaRuntime, SkipRange}, utils::disas_count, @@ -95,7 +95,7 @@ impl Default for AsanInHookGuard { /// This is a simple way to prevent reentrancy in the hooks when we don't have TLS. /// This is not a perfect solution, as it is global so it orders all threads without TLS. /// However, this is a rare situation and should not affect performance significantly. -use std::sync::atomic::{AtomicU64, Ordering}; +use core::sync::atomic::{AtomicU64, Ordering}; use std::thread; #[derive(Debug)] struct Lock { @@ -612,7 +612,7 @@ impl AsanRuntime { static [<$name:snake:upper _PTR>]: std::sync::OnceLock $return_type> = std::sync::OnceLock::new(); - let _ = [<$name:snake:upper _PTR>].set(unsafe {std::mem::transmute::<*const c_void, extern "C" fn($($param: $param_type),*) -> $return_type>(target_function.0)}).unwrap(); + let _ = [<$name:snake:upper _PTR>].set(unsafe {core::mem::transmute::<*const c_void, extern "C" fn($($param: $param_type),*) -> $return_type>(target_function.0)}).unwrap(); #[allow(non_snake_case)] unsafe extern "C" fn []($($param: $param_type),*) -> $return_type { @@ -662,7 +662,7 @@ impl AsanRuntime { static [<$lib_ident:snake:upper _ $name:snake:upper _PTR>]: std::sync::OnceLock $return_type> = std::sync::OnceLock::new(); - let _ = [<$lib_ident:snake:upper _ $name:snake:upper _PTR>].set(unsafe {std::mem::transmute::<*const c_void, extern "C" fn($($param: $param_type),*) -> $return_type>(target_function.0)}).unwrap(); + let _ = [<$lib_ident:snake:upper _ $name:snake:upper _PTR>].set(unsafe {core::mem::transmute::<*const c_void, extern "C" fn($($param: $param_type),*) -> $return_type>(target_function.0)}).unwrap(); #[allow(non_snake_case)] unsafe extern "C" fn []($($param: $param_type),*) -> $return_type { @@ -707,7 +707,7 @@ impl AsanRuntime { log::warn!("Hooking {} = {:?}", stringify!($name), target_function.0); static [<$name:snake:upper _PTR>]: std::sync::OnceLock $return_type> = std::sync::OnceLock::new(); - let _ = [<$name:snake:upper _PTR>].set(unsafe {std::mem::transmute::<*const c_void, extern "C" fn($($param: $param_type),*) -> $return_type>(target_function.0)}).unwrap_or_else(|e| println!("{:?}", e)); + let _ = [<$name:snake:upper _PTR>].set(unsafe {core::mem::transmute::<*const c_void, extern "C" fn($($param: $param_type),*) -> $return_type>(target_function.0)}).unwrap_or_else(|e| println!("{:?}", e)); #[allow(non_snake_case)] // depends on the values the macro is invoked with #[allow(clippy::redundant_else)] @@ -1522,7 +1522,7 @@ impl AsanRuntime { let instructions: Vec = disas_count( &decoder, - unsafe { std::slice::from_raw_parts(actual_pc as *mut u8, 24) }, + unsafe { core::slice::from_raw_parts(actual_pc as *mut u8, 24) }, 3, ); diff --git a/libafl_frida/src/asan/errors.rs b/libafl_frida/src/asan/errors.rs index 0c1cd4534b..5f8e465bab 100644 --- a/libafl_frida/src/asan/errors.rs +++ b/libafl_frida/src/asan/errors.rs @@ -1,9 +1,8 @@ //! Errors that can be caught by the `libafl_frida` address sanitizer. +use alloc::borrow::Cow; +use core::{fmt::Debug, marker::PhantomData}; use std::{ - borrow::Cow, - fmt::Debug, io::Write, - marker::PhantomData, sync::{Mutex, MutexGuard}, }; @@ -38,7 +37,7 @@ use yaxpeax_x86::amd64::InstDecoder; #[cfg(target_arch = "x86_64")] use crate::asan::asan_rt::ASAN_SAVE_REGISTER_NAMES; use crate::{ - alloc::AllocationMetadata, asan::asan_rt::ASAN_SAVE_REGISTER_COUNT, utils::disas_count, + allocator::AllocationMetadata, asan::asan_rt::ASAN_SAVE_REGISTER_COUNT, utils::disas_count, }; #[derive(Debug, Clone, Serialize, Deserialize)] @@ -263,7 +262,7 @@ impl AsanErrors { #[cfg(target_arch = "x86_64")] let insts = disas_count( &decoder, - unsafe { std::slice::from_raw_parts(start_pc as *mut u8, 15 * 11) }, + unsafe { core::slice::from_raw_parts(start_pc as *mut u8, 15 * 11) }, 11, ); @@ -534,7 +533,7 @@ impl AsanErrors { #[cfg(target_arch = "x86_64")] let insts = disas_count( &decoder, - unsafe { std::slice::from_raw_parts(*start_pc as *mut u8, 15 * 11) }, + unsafe { core::slice::from_raw_parts(*start_pc as *mut u8, 15 * 11) }, 11, ); diff --git a/libafl_frida/src/asan/hook_funcs.rs b/libafl_frida/src/asan/hook_funcs.rs index e523df8a8a..5e2592d672 100644 --- a/libafl_frida/src/asan/hook_funcs.rs +++ b/libafl_frida/src/asan/hook_funcs.rs @@ -1,11 +1,11 @@ //! The allocator hooks for address sanitizer. -use std::ffi::c_void; +use core::ffi::c_void; use backtrace::Backtrace; use libc::{c_char, wchar_t}; use crate::{ - alloc::Allocator, + allocator::Allocator, asan::{ asan_rt::AsanRuntime, errors::{AsanError, AsanErrors}, @@ -21,7 +21,7 @@ unsafe extern "system" { fn memset(s: *mut c_void, c: i32, n: usize) -> *mut c_void; } -use std::ptr; +use core::ptr; #[cfg(windows)] use winapi::um::memoryapi::VirtualQuery; @@ -2371,7 +2371,7 @@ impl AsanRuntime { { panic!("ASAN: Crashing target!"); } - let mn = std::cmp::min(n, unsafe { strlen(src) } + 1); + let mn = core::cmp::min(n, unsafe { strlen(src) } + 1); if !self.allocator_mut().check_shadow(src as *const c_void, mn) && AsanErrors::get_mut_blocking().report_error(AsanError::BadFuncArgRead(( "strncpy".to_string(), diff --git a/libafl_frida/src/cmplog_rt.rs b/libafl_frida/src/cmplog_rt.rs index c695296294..7fa3799610 100644 --- a/libafl_frida/src/cmplog_rt.rs +++ b/libafl_frida/src/cmplog_rt.rs @@ -6,9 +6,9 @@ //! related to the input. //! Read the [`RedQueen`](https://www.ndss-symposium.org/ndss-paper/redqueen-fuzzing-with-input-to-state-correspondence/) paper for the general concepts. +use alloc::rc::Rc; #[cfg(target_arch = "aarch64")] use core::ffi::c_void; -use std::rc::Rc; use dynasmrt::dynasm; #[cfg(target_arch = "aarch64")] diff --git a/libafl_frida/src/coverage_rt.rs b/libafl_frida/src/coverage_rt.rs index 0c8c991963..4cbff1a816 100644 --- a/libafl_frida/src/coverage_rt.rs +++ b/libafl_frida/src/coverage_rt.rs @@ -1,6 +1,7 @@ //! Functionality regarding binary-only coverage collection. -use std::{cell::RefCell, marker::PhantomPinned, pin::Pin, rc::Rc}; +use alloc::rc::Rc; +use core::{cell::RefCell, marker::PhantomPinned, pin::Pin}; #[cfg(target_arch = "aarch64")] use dynasmrt::DynasmLabelApi; diff --git a/libafl_frida/src/drcov_rt.rs b/libafl_frida/src/drcov_rt.rs index ba89652723..37d636915f 100644 --- a/libafl_frida/src/drcov_rt.rs +++ b/libafl_frida/src/drcov_rt.rs @@ -1,9 +1,7 @@ //! Generates `DrCov` traces -use std::{ - hash::{BuildHasher, Hasher}, - path::{Path, PathBuf}, - rc::Rc, -}; +use alloc::rc::Rc; +use core::hash::{BuildHasher, Hasher}; +use std::path::{Path, PathBuf}; use ahash::RandomState; use frida_gum::ModuleMap; diff --git a/libafl_frida/src/executor.rs b/libafl_frida/src/executor.rs index 88f280fd78..709580054c 100644 --- a/libafl_frida/src/executor.rs +++ b/libafl_frida/src/executor.rs @@ -1,7 +1,12 @@ -use core::fmt::{self, Debug, Formatter}; +use alloc::rc::Rc; +use core::{ + cell::RefCell, + ffi::c_void, + fmt::{self, Debug, Formatter}, + marker::PhantomData, +}; #[cfg(all(windows, not(test)))] use std::process::abort; -use std::{cell::RefCell, ffi::c_void, marker::PhantomData, rc::Rc}; use frida_gum::{ Gum, MemoryRange, NativePointer, diff --git a/libafl_frida/src/frida_helper_shutdown_observer.rs b/libafl_frida/src/frida_helper_shutdown_observer.rs index 23ea18eb6e..efcbf92e30 100644 --- a/libafl_frida/src/frida_helper_shutdown_observer.rs +++ b/libafl_frida/src/frida_helper_shutdown_observer.rs @@ -1,4 +1,5 @@ -use std::{borrow::Cow, cell::RefCell, fmt, rc::Rc}; +use alloc::{borrow::Cow, rc::Rc}; +use core::{cell::RefCell, fmt}; use libafl::{executors::ExitKind, inputs::HasTargetBytes, observers::Observer}; use libafl_bolts::{Error, Named}; @@ -65,7 +66,7 @@ impl<'de, RT> Deserialize<'de> for FridaHelperObserver<'_, RT> { { struct FridaHelperObserverVisitor<'a, RT> { // marker: std::marker::PhantomData<&'b mut FridaInstrumentationHelper<'a, RT>>, - marker: std::marker::PhantomData<&'a RT>, + marker: core::marker::PhantomData<&'a RT>, } impl<'de, 'a, RT> Visitor<'de> for FridaHelperObserverVisitor<'a, RT> { @@ -90,7 +91,7 @@ impl<'de, RT> Deserialize<'de> for FridaHelperObserver<'_, RT> { "FridaHelperObserver", &[], // No fields to deserialize FridaHelperObserverVisitor { - marker: std::marker::PhantomData, + marker: core::marker::PhantomData, }, ) } diff --git a/libafl_frida/src/helper.rs b/libafl_frida/src/helper.rs index de40a66551..8ba75b2a9e 100644 --- a/libafl_frida/src/helper.rs +++ b/libafl_frida/src/helper.rs @@ -1,11 +1,13 @@ -use core::fmt::{self, Debug, Formatter}; -use std::{ +use alloc::rc::Rc; +use core::{ any::TypeId, cell::{Ref, RefCell, RefMut}, ffi::CStr, + fmt::{self, Debug, Formatter}, +}; +use std::{ fs::{self, read_to_string}, path::{Path, PathBuf}, - rc::Rc, }; use frida_gum::{ @@ -35,7 +37,7 @@ use crate::cmplog_rt::CmpLogRuntime; use crate::{asan::asan_rt::AsanRuntime, coverage_rt::CoverageRuntime, drcov_rt::DrCovRuntime}; /// The Runtime trait -pub trait FridaRuntime: 'static + Debug + std::any::Any { +pub trait FridaRuntime: 'static + Debug + core::any::Any { /// Initialization fn init( &mut self, @@ -65,7 +67,7 @@ where FR1: Debug, FR2: Debug, { - fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { Debug::fmt(&self.if_runtimes, f)?; Debug::fmt(&self.else_runtimes, f)?; Ok(()) @@ -202,7 +204,7 @@ impl MatchFirstType for FridaRuntimeVec { fn match_first_type(&self) -> Option<&T> { for member in &self.0 { if TypeId::of::() == member.type_id() { - let raw = std::ptr::from_ref::(&**member) as *const T; + let raw = core::ptr::from_ref::(&**member) as *const T; return unsafe { raw.as_ref() }; } } @@ -213,7 +215,7 @@ impl MatchFirstType for FridaRuntimeVec { fn match_first_type_mut(&mut self) -> Option<&mut T> { for member in &mut self.0 { if TypeId::of::() == member.type_id() { - let raw = std::ptr::from_mut::(&mut **member) as *mut T; + let raw = core::ptr::from_mut::(&mut **member) as *mut T; return unsafe { raw.as_mut() }; } } @@ -259,7 +261,7 @@ impl FridaRuntimeTuple for FridaRuntimeVec { #[derive(Debug, Clone, PartialEq, Eq)] pub enum SkipRange { /// An absolute range - Absolute(std::ops::Range), + Absolute(core::ops::Range), /// A range relative to the module with the given name ModuleRelative { @@ -267,7 +269,7 @@ pub enum SkipRange { name: String, /// The address range - range: std::ops::Range, + range: core::ops::Range, }, } @@ -810,14 +812,14 @@ where for _ in 0..512 { mmap_anonymous( None, - std::num::NonZeroUsize::new_unchecked(128 * 1024), + core::num::NonZeroUsize::new_unchecked(128 * 1024), ProtFlags::PROT_NONE, MapFlags::MAP_PRIVATE | MapFlags::MAP_NORESERVE, ) .expect("Failed to map dummy regions for frida workaround"); mmap_anonymous( None, - std::num::NonZeroUsize::new_unchecked(4 * 1024 * 1024), + core::num::NonZeroUsize::new_unchecked(4 * 1024 * 1024), ProtFlags::PROT_NONE, MapFlags::MAP_PRIVATE | MapFlags::MAP_NORESERVE, ) diff --git a/libafl_frida/src/lib.rs b/libafl_frida/src/lib.rs index 4f5d31c636..4c04f7efbf 100644 --- a/libafl_frida/src/lib.rs +++ b/libafl_frida/src/lib.rs @@ -43,8 +43,10 @@ Additional documentation is available in [the `LibAFL` book](https://aflplus.plu ) )] +extern crate alloc; + /// The frida-asan allocator -pub mod alloc; +pub mod allocator; pub mod asan; @@ -325,8 +327,9 @@ impl Default for FridaOptions { #[cfg(test)] mod tests { - use core::num::NonZero; - use std::{cell::RefCell, rc::Rc, sync::OnceLock}; + use alloc::rc::Rc; + use core::{cell::RefCell, num::NonZero}; + use std::sync::OnceLock; use clap::Parser; use frida_gum::Gum; @@ -365,180 +368,182 @@ mod tests { #[expect(clippy::too_many_lines)] unsafe fn test_asan(options: &FuzzerOptions) { - // The names of the functions to run - let tests = vec![ - ("LLVMFuzzerTestOneInput", None), - ("heap_oob_read", Some("heap out-of-bounds read")), - ("heap_oob_write", Some("heap out-of-bounds write")), - ("heap_uaf_write", Some("heap use-after-free write")), - ("heap_uaf_read", Some("heap use-after-free read")), - ("malloc_heap_oob_read", Some("heap out-of-bounds read")), - ("malloc_heap_oob_write", Some("heap out-of-bounds write")), - ( - "malloc_heap_oob_write_0x12", - Some("heap out-of-bounds write"), - ), - ( - "malloc_heap_oob_write_0x14", - Some("heap out-of-bounds write"), - ), - ( - "malloc_heap_oob_write_0x17", - Some("heap out-of-bounds write"), - ), - ( - "malloc_heap_oob_write_0x17_int_at_0x16", - Some("heap out-of-bounds write"), - ), - ( - "malloc_heap_oob_write_0x17_int_at_0x15", - Some("heap out-of-bounds write"), - ), - ("malloc_heap_oob_write_0x17_int_at_0x13", None), - ( - "malloc_heap_oob_write_0x17_int_at_0x14", - Some("heap out-of-bounds write"), - ), - ("malloc_heap_uaf_write", Some("heap use-after-free write")), - ("malloc_heap_uaf_read", Some("heap use-after-free read")), - ( - "heap_oob_memcpy_read", - Some("function arg resulting in bad read"), - ), - ( - "heap_oob_memcpy_write", - Some("function arg resulting in bad write"), - ), - ]; + unsafe { + // The names of the functions to run + let tests = vec![ + ("LLVMFuzzerTestOneInput", None), + ("heap_oob_read", Some("heap out-of-bounds read")), + ("heap_oob_write", Some("heap out-of-bounds write")), + ("heap_uaf_write", Some("heap use-after-free write")), + ("heap_uaf_read", Some("heap use-after-free read")), + ("malloc_heap_oob_read", Some("heap out-of-bounds read")), + ("malloc_heap_oob_write", Some("heap out-of-bounds write")), + ( + "malloc_heap_oob_write_0x12", + Some("heap out-of-bounds write"), + ), + ( + "malloc_heap_oob_write_0x14", + Some("heap out-of-bounds write"), + ), + ( + "malloc_heap_oob_write_0x17", + Some("heap out-of-bounds write"), + ), + ( + "malloc_heap_oob_write_0x17_int_at_0x16", + Some("heap out-of-bounds write"), + ), + ( + "malloc_heap_oob_write_0x17_int_at_0x15", + Some("heap out-of-bounds write"), + ), + ("malloc_heap_oob_write_0x17_int_at_0x13", None), + ( + "malloc_heap_oob_write_0x17_int_at_0x14", + Some("heap out-of-bounds write"), + ), + ("malloc_heap_uaf_write", Some("heap use-after-free write")), + ("malloc_heap_uaf_read", Some("heap use-after-free read")), + ( + "heap_oob_memcpy_read", + Some("function arg resulting in bad read"), + ), + ( + "heap_oob_memcpy_write", + Some("function arg resulting in bad write"), + ), + ]; - //NOTE: RTLD_NOW is required on linux as otherwise the hooks will NOT work + //NOTE: RTLD_NOW is required on linux as otherwise the hooks will NOT work - #[cfg(target_os = "linux")] - let lib = libloading::os::unix::Library::open( - Some(options.clone().harness.unwrap()), - libloading::os::unix::RTLD_NOW, - ) - .unwrap(); - - #[cfg(not(target_os = "linux"))] - let lib = libloading::Library::new(options.clone().harness.unwrap()).unwrap(); - - let coverage = CoverageRuntime::new(); - let asan = AsanRuntime::new(options); - // let mut frida_helper = FridaInstrumentationHelper::new( - // GUM.get().expect("Gum uninitialized"), - // options, - // tuple_list!(coverage, asan), - // ); - let frida_helper = Rc::new(RefCell::new(FridaInstrumentationHelper::new( - GUM.get().expect("Gum uninitialized"), - options, - tuple_list!(coverage, asan), - ))); - - // Run the tests for each function - for test in tests { - let (function_name, expected_error) = test; - log::info!("Testing with harness function {}", function_name); - - let mut corpus = InMemoryCorpus::::new(); - - //TODO - make sure we use the right one - let testcase = Testcase::new(vec![0; 4].into()); - corpus.add(testcase).unwrap(); - - let rand = StdRand::with_seed(0); - - let mut feedback = ConstFeedback::new(true); - - let asan_obs = AsanErrorsObserver::from_static_asan_errors(); - let frida_helper_observer = FridaHelperObserver::new(Rc::clone(&frida_helper)); - - // Feedbacks to recognize an input as solution - let mut objective = feedback_or_fast!( - // true enables the AsanErrorFeedback - feedback_and_fast!( - ConstFeedback::from(true), - AsanErrorsFeedback::new(&asan_obs) - ) - ); - - let mut state = StdState::new( - rand, - corpus, - InMemoryCorpus::::new(), - &mut feedback, - &mut objective, + #[cfg(target_os = "linux")] + let lib = libloading::os::unix::Library::open( + Some(options.clone().harness.unwrap()), + libloading::os::unix::RTLD_NOW, ) .unwrap(); - let mut event_manager = NopEventManager::new(); + #[cfg(not(target_os = "linux"))] + let lib = libloading::Library::new(options.clone().harness.unwrap()).unwrap(); - let mut fuzzer = StdFuzzer::new(StdScheduler::new(), feedback, objective); + let coverage = CoverageRuntime::new(); + let asan = AsanRuntime::new(options); + // let mut frida_helper = FridaInstrumentationHelper::new( + // GUM.get().expect("Gum uninitialized"), + // options, + // tuple_list!(coverage, asan), + // ); + let frida_helper = Rc::new(RefCell::new(FridaInstrumentationHelper::new( + GUM.get().expect("Gum uninitialized"), + options, + tuple_list!(coverage, asan), + ))); - let observers = tuple_list!( - frida_helper_observer, - asan_obs //, - ); + // Run the tests for each function + for test in tests { + let (function_name, expected_error) = test; + log::info!("Testing with harness function {}", function_name); - { - #[cfg(target_os = "linux")] - let target_func: libloading::os::unix::Symbol< - unsafe extern "C" fn(data: *const u8, size: usize) -> i32, - > = lib.get(function_name.as_bytes()).unwrap(); + let mut corpus = InMemoryCorpus::::new(); - #[cfg(not(target_os = "linux"))] - let target_func: libloading::Symbol< - unsafe extern "C" fn(data: *const u8, size: usize) -> i32, - > = lib.get(function_name.as_bytes()).unwrap(); + //TODO - make sure we use the right one + let testcase = Testcase::new(vec![0; 4].into()); + corpus.add(testcase).unwrap(); - let mut harness = |input: &BytesInput| { - let target = input.target_bytes(); - let buf = target.as_slice(); - (target_func)(buf.as_ptr(), buf.len()); - ExitKind::Ok - }; + let rand = StdRand::with_seed(0); - let mut executor = FridaInProcessExecutor::new( - GUM.get().expect("Gum uninitialized"), - InProcessExecutor::new( - &mut harness, - observers, // tuple_list!(), - &mut fuzzer, - &mut state, - &mut event_manager, + let mut feedback = ConstFeedback::new(true); + + let asan_obs = AsanErrorsObserver::from_static_asan_errors(); + let frida_helper_observer = FridaHelperObserver::new(Rc::clone(&frida_helper)); + + // Feedbacks to recognize an input as solution + let mut objective = feedback_or_fast!( + // true enables the AsanErrorFeedback + feedback_and_fast!( + ConstFeedback::from(true), + AsanErrorsFeedback::new(&asan_obs) ) - .unwrap(), - // &mut frida_helper, - Rc::clone(&frida_helper), ); - let mutator = StdScheduledMutator::new(tuple_list!(BitFlipMutator::new())); - let mut stages = tuple_list!(StdMutationalStage::with_max_iterations( - mutator, - NonZero::new(1).unwrap() - )); + let mut state = StdState::new( + rand, + corpus, + InMemoryCorpus::::new(), + &mut feedback, + &mut objective, + ) + .unwrap(); - log::info!("Starting fuzzing!"); - fuzzer - .fuzz_one(&mut stages, &mut executor, &mut state, &mut event_manager) - .unwrap_or_else(|_| panic!("Error in fuzz_one")); + let mut event_manager = NopEventManager::new(); - log::info!("Done fuzzing! Got {} solutions", state.solutions().count()); - if let Some(expected_error) = expected_error { - assert_eq!(state.solutions().count(), 1); - if let Some(error) = AsanErrors::get_mut_blocking().errors.first() { - assert_eq!(error.description(), expected_error); + let mut fuzzer = StdFuzzer::new(StdScheduler::new(), feedback, objective); + + let observers = tuple_list!( + frida_helper_observer, + asan_obs //, + ); + + { + #[cfg(target_os = "linux")] + let target_func: libloading::os::unix::Symbol< + unsafe extern "C" fn(data: *const u8, size: usize) -> i32, + > = lib.get(function_name.as_bytes()).unwrap(); + + #[cfg(not(target_os = "linux"))] + let target_func: libloading::Symbol< + unsafe extern "C" fn(data: *const u8, size: usize) -> i32, + > = lib.get(function_name.as_bytes()).unwrap(); + + let mut harness = |input: &BytesInput| { + let target = input.target_bytes(); + let buf = target.as_slice(); + (target_func)(buf.as_ptr(), buf.len()); + ExitKind::Ok + }; + + let mut executor = FridaInProcessExecutor::new( + GUM.get().expect("Gum uninitialized"), + InProcessExecutor::new( + &mut harness, + observers, // tuple_list!(), + &mut fuzzer, + &mut state, + &mut event_manager, + ) + .unwrap(), + // &mut frida_helper, + Rc::clone(&frida_helper), + ); + + let mutator = StdScheduledMutator::new(tuple_list!(BitFlipMutator::new())); + let mut stages = tuple_list!(StdMutationalStage::with_max_iterations( + mutator, + NonZero::new(1).unwrap() + )); + + log::info!("Starting fuzzing!"); + fuzzer + .fuzz_one(&mut stages, &mut executor, &mut state, &mut event_manager) + .unwrap_or_else(|_| panic!("Error in fuzz_one")); + + log::info!("Done fuzzing! Got {} solutions", state.solutions().count()); + if let Some(expected_error) = expected_error { + assert_eq!(state.solutions().count(), 1); + if let Some(error) = AsanErrors::get_mut_blocking().errors.first() { + assert_eq!(error.description(), expected_error); + } + } else { + assert_eq!(state.solutions().count(), 0); } - } else { - assert_eq!(state.solutions().count(), 0); } } - } - frida_helper - .borrow_mut() - .deinit(GUM.get().expect("Gum uninitialized")); + frida_helper + .borrow_mut() + .deinit(GUM.get().expect("Gum uninitialized")); + } } #[test] diff --git a/libafl_intelpt/src/lib.rs b/libafl_intelpt/src/lib.rs index 921a4b5476..89447d718c 100644 --- a/libafl_intelpt/src/lib.rs +++ b/libafl_intelpt/src/lib.rs @@ -3,7 +3,7 @@ //! This crate interacts with the linux kernel (specifically with perf) and therefore it only works //! on linux hosts -// Just in case this crate will have real no_std support in the future +// Just in case this crate will have real `no_std` support in the future #![no_std] #![cfg(target_arch = "x86_64")] #![cfg(feature = "std")] @@ -12,9 +12,11 @@ #[macro_use] extern crate std; +extern crate alloc; + +use alloc::{borrow::ToOwned, string::String, vec::Vec}; #[cfg(target_os = "linux")] use std::fs; -use std::{borrow::ToOwned, string::String, vec::Vec}; use raw_cpuid::CpuId; diff --git a/libafl_intelpt/src/linux.rs b/libafl_intelpt/src/linux.rs index 786a1c715d..17bd6e1511 100644 --- a/libafl_intelpt/src/linux.rs +++ b/libafl_intelpt/src/linux.rs @@ -1,19 +1,22 @@ -use std::{ +extern crate alloc; + +use alloc::{ borrow::ToOwned, boxed::Box, - ffi::{CStr, CString}, - fmt::Debug, - format, fs, - ops::RangeInclusive, + ffi::CString, + format, + string::{String, ToString}, + vec::Vec, +}; +use core::{ffi::CStr, fmt::Debug, ops::RangeInclusive, ptr}; +use std::{ + fs, os::{ fd::{AsRawFd, FromRawFd, OwnedFd}, raw::c_void, }, path::Path, - ptr, - string::{String, ToString}, sync::LazyLock, - vec::Vec, }; use arbitrary_int::u4; diff --git a/libafl_intelpt/tests/integration_tests_linux.rs b/libafl_intelpt/tests/integration_tests_linux.rs index e385c2b063..ba1726f0ce 100644 --- a/libafl_intelpt/tests/integration_tests_linux.rs +++ b/libafl_intelpt/tests/integration_tests_linux.rs @@ -2,7 +2,8 @@ #![cfg(feature = "libipt")] #![cfg(target_os = "linux")] -use std::{arch::asm, process}; +use core::arch::asm; +use std::process; use libafl_intelpt::{Image, IntelPT, availability}; use nix::{ diff --git a/libafl_libfuzzer/Cargo.toml b/libafl_libfuzzer/Cargo.toml index f79a3f077e..1fc1b21818 100644 --- a/libafl_libfuzzer/Cargo.toml +++ b/libafl_libfuzzer/Cargo.toml @@ -7,6 +7,7 @@ readme = "../README.md" license = "MIT OR Apache-2.0" keywords = ["fuzzing", "testing", "security"] edition = "2024" +rust-version = "1.85" categories = ["development-tools::testing"] include = [ diff --git a/libafl_libfuzzer/build.rs b/libafl_libfuzzer/build.rs index ce15873c30..7179a560f9 100644 --- a/libafl_libfuzzer/build.rs +++ b/libafl_libfuzzer/build.rs @@ -1,5 +1,5 @@ +use core::error::Error; use std::{ - error::Error, fs, fs::File, io::{BufRead, BufReader, BufWriter, Write}, diff --git a/libafl_libfuzzer/runtime/src/merge.rs b/libafl_libfuzzer/runtime/src/merge.rs index 363e2b57f3..ac3ffcea6f 100644 --- a/libafl_libfuzzer/runtime/src/merge.rs +++ b/libafl_libfuzzer/runtime/src/merge.rs @@ -95,7 +95,6 @@ pub fn merge( } } - #[expect(clippy::deref_addrof)] let edges = unsafe { core::mem::take(&mut *(counters_maps_ptr_mut())) }; let edges_observer = MultiMapObserver::new("edges", edges); diff --git a/libafl_libfuzzer/src/lib.rs b/libafl_libfuzzer/src/lib.rs index 8b08c82500..233bb529e9 100644 --- a/libafl_libfuzzer/src/lib.rs +++ b/libafl_libfuzzer/src/lib.rs @@ -111,7 +111,7 @@ ) )] -use std::ffi::{c_char, c_int}; +use core::ffi::{c_char, c_int}; pub use libfuzzer_sys::*; diff --git a/libafl_nyx/src/cmplog.rs b/libafl_nyx/src/cmplog.rs index ef4304c132..6e5e638374 100644 --- a/libafl_nyx/src/cmplog.rs +++ b/libafl_nyx/src/cmplog.rs @@ -1,7 +1,10 @@ //! The Nyx `CmpLog` Observer //! //! Reads and parses the redqueen results written by QEMU-Nyx and adds them to the state as `CmpValuesMetadata`. -use std::borrow::Cow; + +extern crate alloc; + +use alloc::borrow::Cow; use libafl::{ Error, HasMetadata, @@ -43,7 +46,7 @@ impl NyxCmpObserver { impl Observer for NyxCmpObserver where S: HasMetadata + HasExecutions, - I: std::fmt::Debug, + I: core::fmt::Debug, { fn pre_exec(&mut self, _state: &mut S, _input: &I) -> Result<(), Error> { unsafe { diff --git a/libafl_nyx/src/executor.rs b/libafl_nyx/src/executor.rs index ddf8ee0594..9d0ead07ba 100644 --- a/libafl_nyx/src/executor.rs +++ b/libafl_nyx/src/executor.rs @@ -1,6 +1,6 @@ +use core::marker::PhantomData; use std::{ io::{Read, Seek}, - marker::PhantomData, os::fd::AsRawFd, }; @@ -135,11 +135,11 @@ where } impl HasTimeout for NyxExecutor { - fn timeout(&self) -> std::time::Duration { + fn timeout(&self) -> core::time::Duration { self.helper.timeout } - fn set_timeout(&mut self, timeout: std::time::Duration) { + fn set_timeout(&mut self, timeout: core::time::Duration) { let micros = 1000000; let mut timeout_secs = timeout.as_secs(); let mut timeout_micros = timeout.as_micros() - u128::from(timeout.as_secs() * micros); @@ -163,7 +163,7 @@ impl NyxExecutor { /// Mutable borrow may only be used once at a time. pub unsafe fn trace_bits(self) -> &'static mut [u8] { unsafe { - std::slice::from_raw_parts_mut(self.helper.bitmap_buffer, self.helper.bitmap_size) + core::slice::from_raw_parts_mut(self.helper.bitmap_buffer, self.helper.bitmap_size) } } } diff --git a/libafl_nyx/src/helper.rs b/libafl_nyx/src/helper.rs index dc58fe79aa..de67e92fb5 100644 --- a/libafl_nyx/src/helper.rs +++ b/libafl_nyx/src/helper.rs @@ -1,5 +1,6 @@ /// [`NyxHelper`] is used to wrap `NyxProcess` -use std::{fmt::Debug, fs::File, path::Path, time::Duration}; +use core::{fmt::Debug, time::Duration}; +use std::{fs::File, path::Path}; use libafl::Error; use libnyx::{NyxConfig, NyxProcess, NyxProcessRole}; diff --git a/libafl_qemu/libafl_qemu_build/src/build.rs b/libafl_qemu/libafl_qemu_build/src/build.rs index 7d5cb7adba..9597ab5dbe 100644 --- a/libafl_qemu/libafl_qemu_build/src/build.rs +++ b/libafl_qemu/libafl_qemu_build/src/build.rs @@ -1,8 +1,8 @@ +use core::str::FromStr; use std::{ env, fs, path::{Path, PathBuf}, process::Command, - str::FromStr, }; use which::which; diff --git a/libafl_qemu/libafl_qemu_build/src/lib.rs b/libafl_qemu/libafl_qemu_build/src/lib.rs index 903d80b623..8fc22b7c48 100644 --- a/libafl_qemu/libafl_qemu_build/src/lib.rs +++ b/libafl_qemu/libafl_qemu_build/src/lib.rs @@ -1,10 +1,11 @@ // #[rustversion::nightly] -// use std::io::{BufRead, BufReader}; +extern crate alloc; + +use core::hash::Hasher; use std::{ collections::hash_map, env, fs::{self, File}, - hash::Hasher, io::{Read, Seek, SeekFrom, Write}, path::{Path, PathBuf}, process::Command, diff --git a/libafl_qemu/libafl_qemu_sys/src/bindings/x86_64_stub_bindings.rs b/libafl_qemu/libafl_qemu_sys/src/bindings/x86_64_stub_bindings.rs index b4b6d85294..277f5c8724 100644 --- a/libafl_qemu/libafl_qemu_sys/src/bindings/x86_64_stub_bindings.rs +++ b/libafl_qemu/libafl_qemu_sys/src/bindings/x86_64_stub_bindings.rs @@ -139,11 +139,11 @@ where } #[repr(C)] #[derive(Default)] -pub struct __IncompleteArrayField(::std::marker::PhantomData, [T; 0]); +pub struct __IncompleteArrayField(::core::marker::PhantomData, [T; 0]); impl __IncompleteArrayField { #[inline] pub const fn new() -> Self { - __IncompleteArrayField(::std::marker::PhantomData, []) + __IncompleteArrayField(::core::marker::PhantomData, []) } #[inline] pub fn as_ptr(&self) -> *const T { @@ -155,15 +155,15 @@ impl __IncompleteArrayField { } #[inline] pub unsafe fn as_slice(&self, len: usize) -> &[T] { - ::std::slice::from_raw_parts(self.as_ptr(), len) + ::core::slice::from_raw_parts(self.as_ptr(), len) } #[inline] pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] { - ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len) + ::core::slice::from_raw_parts_mut(self.as_mut_ptr(), len) } } -impl ::std::fmt::Debug for __IncompleteArrayField { - fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for __IncompleteArrayField { + fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.write_str("__IncompleteArrayField") } } @@ -181,8 +181,8 @@ pub struct __sigset_t { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of __sigset_t"][::std::mem::size_of::<__sigset_t>() - 128usize]; - ["Alignment of __sigset_t"][::std::mem::align_of::<__sigset_t>() - 8usize]; + ["Size of __sigset_t"][::core::mem::size_of::<__sigset_t>() - 128usize]; + ["Alignment of __sigset_t"][::core::mem::align_of::<__sigset_t>() - 8usize]; ["Offset of field: __sigset_t::__val"][::std::mem::offset_of!(__sigset_t, __val) - 0usize]; }; #[repr(C)] @@ -200,9 +200,9 @@ pub struct __atomic_wide_counter__bindgen_ty_1 { #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of __atomic_wide_counter__bindgen_ty_1"] - [::std::mem::size_of::<__atomic_wide_counter__bindgen_ty_1>() - 8usize]; + [::core::mem::size_of::<__atomic_wide_counter__bindgen_ty_1>() - 8usize]; ["Alignment of __atomic_wide_counter__bindgen_ty_1"] - [::std::mem::align_of::<__atomic_wide_counter__bindgen_ty_1>() - 4usize]; + [::core::mem::align_of::<__atomic_wide_counter__bindgen_ty_1>() - 4usize]; ["Offset of field: __atomic_wide_counter__bindgen_ty_1::__low"] [::std::mem::offset_of!(__atomic_wide_counter__bindgen_ty_1, __low) - 0usize]; ["Offset of field: __atomic_wide_counter__bindgen_ty_1::__high"] @@ -210,9 +210,9 @@ const _: () = { }; #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of __atomic_wide_counter"][::std::mem::size_of::<__atomic_wide_counter>() - 8usize]; + ["Size of __atomic_wide_counter"][::core::mem::size_of::<__atomic_wide_counter>() - 8usize]; ["Alignment of __atomic_wide_counter"] - [::std::mem::align_of::<__atomic_wide_counter>() - 8usize]; + [::core::mem::align_of::<__atomic_wide_counter>() - 8usize]; ["Offset of field: __atomic_wide_counter::__value64"] [::std::mem::offset_of!(__atomic_wide_counter, __value64) - 0usize]; ["Offset of field: __atomic_wide_counter::__value32"] @@ -220,15 +220,15 @@ const _: () = { }; impl Default for __atomic_wide_counter { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for __atomic_wide_counter { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for __atomic_wide_counter { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!(f, "__atomic_wide_counter {{ union }}") } } @@ -240,9 +240,10 @@ pub struct __pthread_internal_list { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of __pthread_internal_list"][::std::mem::size_of::<__pthread_internal_list>() - 16usize]; + ["Size of __pthread_internal_list"] + [::core::mem::size_of::<__pthread_internal_list>() - 16usize]; ["Alignment of __pthread_internal_list"] - [::std::mem::align_of::<__pthread_internal_list>() - 8usize]; + [::core::mem::align_of::<__pthread_internal_list>() - 8usize]; ["Offset of field: __pthread_internal_list::__prev"] [::std::mem::offset_of!(__pthread_internal_list, __prev) - 0usize]; ["Offset of field: __pthread_internal_list::__next"] @@ -250,9 +251,9 @@ const _: () = { }; impl Default for __pthread_internal_list { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -272,8 +273,8 @@ pub struct __pthread_mutex_s { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of __pthread_mutex_s"][::std::mem::size_of::<__pthread_mutex_s>() - 40usize]; - ["Alignment of __pthread_mutex_s"][::std::mem::align_of::<__pthread_mutex_s>() - 8usize]; + ["Size of __pthread_mutex_s"][::core::mem::size_of::<__pthread_mutex_s>() - 40usize]; + ["Alignment of __pthread_mutex_s"][::core::mem::align_of::<__pthread_mutex_s>() - 8usize]; ["Offset of field: __pthread_mutex_s::__lock"] [::std::mem::offset_of!(__pthread_mutex_s, __lock) - 0usize]; ["Offset of field: __pthread_mutex_s::__count"] @@ -293,9 +294,9 @@ const _: () = { }; impl Default for __pthread_mutex_s { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -312,8 +313,8 @@ pub struct __pthread_cond_s { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of __pthread_cond_s"][::std::mem::size_of::<__pthread_cond_s>() - 40usize]; - ["Alignment of __pthread_cond_s"][::std::mem::align_of::<__pthread_cond_s>() - 8usize]; + ["Size of __pthread_cond_s"][::core::mem::size_of::<__pthread_cond_s>() - 40usize]; + ["Alignment of __pthread_cond_s"][::core::mem::align_of::<__pthread_cond_s>() - 8usize]; ["Offset of field: __pthread_cond_s::__wseq"] [::std::mem::offset_of!(__pthread_cond_s, __wseq) - 0usize]; ["Offset of field: __pthread_cond_s::__g1_start"] @@ -329,15 +330,15 @@ const _: () = { }; impl Default for __pthread_cond_s { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for __pthread_cond_s { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for __pthread_cond_s { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!( f, "__pthread_cond_s {{ __wseq: {:?}, __g1_start: {:?}, __g_size: {:?}, __g1_orig_size: {:?}, __wrefs: {:?}, __g_signals: {:?} }}", @@ -360,8 +361,8 @@ pub union pthread_mutex_t { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of pthread_mutex_t"][::std::mem::size_of::() - 40usize]; - ["Alignment of pthread_mutex_t"][::std::mem::align_of::() - 8usize]; + ["Size of pthread_mutex_t"][::core::mem::size_of::() - 40usize]; + ["Alignment of pthread_mutex_t"][::core::mem::align_of::() - 8usize]; ["Offset of field: pthread_mutex_t::__data"] [::std::mem::offset_of!(pthread_mutex_t, __data) - 0usize]; ["Offset of field: pthread_mutex_t::__size"] @@ -371,15 +372,15 @@ const _: () = { }; impl Default for pthread_mutex_t { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for pthread_mutex_t { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for pthread_mutex_t { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!(f, "pthread_mutex_t {{ union }}") } } @@ -392,8 +393,8 @@ pub union pthread_cond_t { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of pthread_cond_t"][::std::mem::size_of::() - 48usize]; - ["Alignment of pthread_cond_t"][::std::mem::align_of::() - 8usize]; + ["Size of pthread_cond_t"][::core::mem::size_of::() - 48usize]; + ["Alignment of pthread_cond_t"][::core::mem::align_of::() - 8usize]; ["Offset of field: pthread_cond_t::__data"] [::std::mem::offset_of!(pthread_cond_t, __data) - 0usize]; ["Offset of field: pthread_cond_t::__size"] @@ -403,15 +404,15 @@ const _: () = { }; impl Default for pthread_cond_t { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for pthread_cond_t { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for pthread_cond_t { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!(f, "pthread_cond_t {{ union }}") } } @@ -469,8 +470,8 @@ pub struct _IO_FILE { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of _IO_FILE"][::std::mem::size_of::<_IO_FILE>() - 216usize]; - ["Alignment of _IO_FILE"][::std::mem::align_of::<_IO_FILE>() - 8usize]; + ["Size of _IO_FILE"][::core::mem::size_of::<_IO_FILE>() - 216usize]; + ["Alignment of _IO_FILE"][::core::mem::align_of::<_IO_FILE>() - 8usize]; ["Offset of field: _IO_FILE::_flags"][::std::mem::offset_of!(_IO_FILE, _flags) - 0usize]; ["Offset of field: _IO_FILE::_IO_read_ptr"] [::std::mem::offset_of!(_IO_FILE, _IO_read_ptr) - 8usize]; @@ -523,9 +524,9 @@ const _: () = { }; impl Default for _IO_FILE { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -533,19 +534,19 @@ impl Default for _IO_FILE { impl _IO_FILE { #[inline] pub fn _flags2(&self) -> ::std::os::raw::c_int { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 24u8) as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 24u8) as u32) } } #[inline] pub fn set__flags2(&mut self, val: ::std::os::raw::c_int) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); self._bitfield_1.set(0usize, 24u8, val as u64) } } #[inline] pub unsafe fn _flags2_raw(this: *const Self) -> ::std::os::raw::c_int { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), 0usize, 24u8, @@ -555,7 +556,7 @@ impl _IO_FILE { #[inline] pub unsafe fn set__flags2_raw(this: *mut Self, val: ::std::os::raw::c_int) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, @@ -568,7 +569,7 @@ impl _IO_FILE { pub fn new_bitfield_1(_flags2: ::std::os::raw::c_int) -> __BindgenBitfieldUnit<[u8; 3usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 24u8, { - let _flags2: u32 = unsafe { ::std::mem::transmute(_flags2) }; + let _flags2: u32 = unsafe { ::core::mem::transmute(_flags2) }; _flags2 as u64 }); __bindgen_bitfield_unit @@ -584,8 +585,8 @@ pub struct __jmp_buf_tag { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of __jmp_buf_tag"][::std::mem::size_of::<__jmp_buf_tag>() - 200usize]; - ["Alignment of __jmp_buf_tag"][::std::mem::align_of::<__jmp_buf_tag>() - 8usize]; + ["Size of __jmp_buf_tag"][::core::mem::size_of::<__jmp_buf_tag>() - 200usize]; + ["Alignment of __jmp_buf_tag"][::core::mem::align_of::<__jmp_buf_tag>() - 8usize]; ["Offset of field: __jmp_buf_tag::__jmpbuf"] [::std::mem::offset_of!(__jmp_buf_tag, __jmpbuf) - 0usize]; ["Offset of field: __jmp_buf_tag::__mask_was_saved"] @@ -602,22 +603,22 @@ pub union sigval { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of sigval"][::std::mem::size_of::() - 8usize]; - ["Alignment of sigval"][::std::mem::align_of::() - 8usize]; + ["Size of sigval"][::core::mem::size_of::() - 8usize]; + ["Alignment of sigval"][::core::mem::align_of::() - 8usize]; ["Offset of field: sigval::sival_int"][::std::mem::offset_of!(sigval, sival_int) - 0usize]; ["Offset of field: sigval::sival_ptr"][::std::mem::offset_of!(sigval, sival_ptr) - 0usize]; }; impl Default for sigval { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for sigval { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for sigval { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!(f, "sigval {{ union }}") } } @@ -643,9 +644,9 @@ pub struct siginfo_t__bindgen_ty_1__bindgen_ty_1 { #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of siginfo_t__bindgen_ty_1__bindgen_ty_1"] - [::std::mem::size_of::() - 8usize]; + [::core::mem::size_of::() - 8usize]; ["Alignment of siginfo_t__bindgen_ty_1__bindgen_ty_1"] - [::std::mem::align_of::() - 4usize]; + [::core::mem::align_of::() - 4usize]; ["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_1::si_pid"] [::std::mem::offset_of!(siginfo_t__bindgen_ty_1__bindgen_ty_1, si_pid) - 0usize]; ["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_1::si_uid"] @@ -661,9 +662,9 @@ pub struct siginfo_t__bindgen_ty_1__bindgen_ty_2 { #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of siginfo_t__bindgen_ty_1__bindgen_ty_2"] - [::std::mem::size_of::() - 16usize]; + [::core::mem::size_of::() - 16usize]; ["Alignment of siginfo_t__bindgen_ty_1__bindgen_ty_2"] - [::std::mem::align_of::() - 8usize]; + [::core::mem::align_of::() - 8usize]; ["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_2::si_tid"] [::std::mem::offset_of!(siginfo_t__bindgen_ty_1__bindgen_ty_2, si_tid) - 0usize]; ["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_2::si_overrun"] @@ -673,15 +674,15 @@ const _: () = { }; impl Default for siginfo_t__bindgen_ty_1__bindgen_ty_2 { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for siginfo_t__bindgen_ty_1__bindgen_ty_2 { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for siginfo_t__bindgen_ty_1__bindgen_ty_2 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!( f, "siginfo_t__bindgen_ty_1__bindgen_ty_2 {{ si_tid: {:?}, si_overrun: {:?}, si_sigval: {:?} }}", @@ -699,9 +700,9 @@ pub struct siginfo_t__bindgen_ty_1__bindgen_ty_3 { #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of siginfo_t__bindgen_ty_1__bindgen_ty_3"] - [::std::mem::size_of::() - 16usize]; + [::core::mem::size_of::() - 16usize]; ["Alignment of siginfo_t__bindgen_ty_1__bindgen_ty_3"] - [::std::mem::align_of::() - 8usize]; + [::core::mem::align_of::() - 8usize]; ["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_3::si_pid"] [::std::mem::offset_of!(siginfo_t__bindgen_ty_1__bindgen_ty_3, si_pid) - 0usize]; ["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_3::si_uid"] @@ -711,15 +712,15 @@ const _: () = { }; impl Default for siginfo_t__bindgen_ty_1__bindgen_ty_3 { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for siginfo_t__bindgen_ty_1__bindgen_ty_3 { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for siginfo_t__bindgen_ty_1__bindgen_ty_3 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!( f, "siginfo_t__bindgen_ty_1__bindgen_ty_3 {{ si_pid: {:?}, si_uid: {:?}, si_sigval: {:?} }}", @@ -739,9 +740,9 @@ pub struct siginfo_t__bindgen_ty_1__bindgen_ty_4 { #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of siginfo_t__bindgen_ty_1__bindgen_ty_4"] - [::std::mem::size_of::() - 32usize]; + [::core::mem::size_of::() - 32usize]; ["Alignment of siginfo_t__bindgen_ty_1__bindgen_ty_4"] - [::std::mem::align_of::() - 8usize]; + [::core::mem::align_of::() - 8usize]; ["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_4::si_pid"] [::std::mem::offset_of!(siginfo_t__bindgen_ty_1__bindgen_ty_4, si_pid) - 0usize]; ["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_4::si_uid"] @@ -775,10 +776,10 @@ pub struct siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1 { #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1"] - [::std::mem::size_of::( + [::core::mem::size_of::( ) - 16usize]; ["Alignment of siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1"] - [::std::mem::align_of::( + [::core::mem::align_of::( ) - 8usize]; ["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1::_lower"] [::std::mem::offset_of!( @@ -793,9 +794,9 @@ const _: () = { }; impl Default for siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1 { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -803,9 +804,9 @@ impl Default for siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1"] - [::std::mem::size_of::() - 16usize]; + [::core::mem::size_of::() - 16usize]; ["Alignment of siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1"] - [::std::mem::align_of::() - 8usize]; + [::core::mem::align_of::() - 8usize]; ["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1::_addr_bnd"][::std::mem::offset_of!( siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1, _addr_bnd @@ -817,15 +818,15 @@ const _: () = { }; impl Default for siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1 { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1 { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!( f, "siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1 {{ union }}" @@ -835,9 +836,9 @@ impl ::std::fmt::Debug for siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1 { #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of siginfo_t__bindgen_ty_1__bindgen_ty_5"] - [::std::mem::size_of::() - 32usize]; + [::core::mem::size_of::() - 32usize]; ["Alignment of siginfo_t__bindgen_ty_1__bindgen_ty_5"] - [::std::mem::align_of::() - 8usize]; + [::core::mem::align_of::() - 8usize]; ["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_5::si_addr"] [::std::mem::offset_of!(siginfo_t__bindgen_ty_1__bindgen_ty_5, si_addr) - 0usize]; ["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_5::si_addr_lsb"] @@ -847,15 +848,15 @@ const _: () = { }; impl Default for siginfo_t__bindgen_ty_1__bindgen_ty_5 { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for siginfo_t__bindgen_ty_1__bindgen_ty_5 { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for siginfo_t__bindgen_ty_1__bindgen_ty_5 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!( f, "siginfo_t__bindgen_ty_1__bindgen_ty_5 {{ si_addr: {:?}, si_addr_lsb: {:?}, _bounds: {:?} }}", @@ -872,9 +873,9 @@ pub struct siginfo_t__bindgen_ty_1__bindgen_ty_6 { #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of siginfo_t__bindgen_ty_1__bindgen_ty_6"] - [::std::mem::size_of::() - 16usize]; + [::core::mem::size_of::() - 16usize]; ["Alignment of siginfo_t__bindgen_ty_1__bindgen_ty_6"] - [::std::mem::align_of::() - 8usize]; + [::core::mem::align_of::() - 8usize]; ["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_6::si_band"] [::std::mem::offset_of!(siginfo_t__bindgen_ty_1__bindgen_ty_6, si_band) - 0usize]; ["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_6::si_fd"] @@ -890,9 +891,9 @@ pub struct siginfo_t__bindgen_ty_1__bindgen_ty_7 { #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of siginfo_t__bindgen_ty_1__bindgen_ty_7"] - [::std::mem::size_of::() - 16usize]; + [::core::mem::size_of::() - 16usize]; ["Alignment of siginfo_t__bindgen_ty_1__bindgen_ty_7"] - [::std::mem::align_of::() - 8usize]; + [::core::mem::align_of::() - 8usize]; ["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_7::_call_addr"] [::std::mem::offset_of!(siginfo_t__bindgen_ty_1__bindgen_ty_7, _call_addr) - 0usize]; ["Offset of field: siginfo_t__bindgen_ty_1__bindgen_ty_7::_syscall"] @@ -902,9 +903,9 @@ const _: () = { }; impl Default for siginfo_t__bindgen_ty_1__bindgen_ty_7 { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -912,9 +913,9 @@ impl Default for siginfo_t__bindgen_ty_1__bindgen_ty_7 { #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of siginfo_t__bindgen_ty_1"] - [::std::mem::size_of::() - 112usize]; + [::core::mem::size_of::() - 112usize]; ["Alignment of siginfo_t__bindgen_ty_1"] - [::std::mem::align_of::() - 8usize]; + [::core::mem::align_of::() - 8usize]; ["Offset of field: siginfo_t__bindgen_ty_1::_pad"] [::std::mem::offset_of!(siginfo_t__bindgen_ty_1, _pad) - 0usize]; ["Offset of field: siginfo_t__bindgen_ty_1::_kill"] @@ -934,15 +935,15 @@ const _: () = { }; impl Default for siginfo_t__bindgen_ty_1 { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for siginfo_t__bindgen_ty_1 { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for siginfo_t__bindgen_ty_1 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!(f, "siginfo_t__bindgen_ty_1 {{ union }}") } } @@ -960,16 +961,16 @@ pub struct _GArray { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of _GArray"][::std::mem::size_of::<_GArray>() - 16usize]; - ["Alignment of _GArray"][::std::mem::align_of::<_GArray>() - 8usize]; + ["Size of _GArray"][::core::mem::size_of::<_GArray>() - 16usize]; + ["Alignment of _GArray"][::core::mem::align_of::<_GArray>() - 8usize]; ["Offset of field: _GArray::data"][::std::mem::offset_of!(_GArray, data) - 0usize]; ["Offset of field: _GArray::len"][::std::mem::offset_of!(_GArray, len) - 8usize]; }; impl Default for _GArray { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -982,16 +983,16 @@ pub struct _GByteArray { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of _GByteArray"][::std::mem::size_of::<_GByteArray>() - 16usize]; - ["Alignment of _GByteArray"][::std::mem::align_of::<_GByteArray>() - 8usize]; + ["Size of _GByteArray"][::core::mem::size_of::<_GByteArray>() - 16usize]; + ["Alignment of _GByteArray"][::core::mem::align_of::<_GByteArray>() - 8usize]; ["Offset of field: _GByteArray::data"][::std::mem::offset_of!(_GByteArray, data) - 0usize]; ["Offset of field: _GByteArray::len"][::std::mem::offset_of!(_GByteArray, len) - 8usize]; }; impl Default for _GByteArray { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -1011,16 +1012,16 @@ pub struct _GSList { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of _GSList"][::std::mem::size_of::<_GSList>() - 16usize]; - ["Alignment of _GSList"][::std::mem::align_of::<_GSList>() - 8usize]; + ["Size of _GSList"][::core::mem::size_of::<_GSList>() - 16usize]; + ["Alignment of _GSList"][::core::mem::align_of::<_GSList>() - 8usize]; ["Offset of field: _GSList::data"][::std::mem::offset_of!(_GSList, data) - 0usize]; ["Offset of field: _GSList::next"][::std::mem::offset_of!(_GSList, next) - 8usize]; }; impl Default for _GSList { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -1100,8 +1101,8 @@ pub struct QEnumLookup { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of QEnumLookup"][::std::mem::size_of::() - 24usize]; - ["Alignment of QEnumLookup"][::std::mem::align_of::() - 8usize]; + ["Size of QEnumLookup"][::core::mem::size_of::() - 24usize]; + ["Alignment of QEnumLookup"][::core::mem::align_of::() - 8usize]; ["Offset of field: QEnumLookup::array"][::std::mem::offset_of!(QEnumLookup, array) - 0usize]; ["Offset of field: QEnumLookup::special_features"] [::std::mem::offset_of!(QEnumLookup, special_features) - 8usize]; @@ -1109,9 +1110,9 @@ const _: () = { }; impl Default for QEnumLookup { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -1127,23 +1128,23 @@ pub struct QemuMutex { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of QemuMutex"][::std::mem::size_of::() - 48usize]; - ["Alignment of QemuMutex"][::std::mem::align_of::() - 8usize]; + ["Size of QemuMutex"][::core::mem::size_of::() - 48usize]; + ["Alignment of QemuMutex"][::core::mem::align_of::() - 8usize]; ["Offset of field: QemuMutex::lock"][::std::mem::offset_of!(QemuMutex, lock) - 0usize]; ["Offset of field: QemuMutex::initialized"] [::std::mem::offset_of!(QemuMutex, initialized) - 40usize]; }; impl Default for QemuMutex { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for QemuMutex { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for QemuMutex { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!( f, "QemuMutex {{ lock: {:?}, initialized: {:?} }}", @@ -1159,23 +1160,23 @@ pub struct QemuCond { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of QemuCond"][::std::mem::size_of::() - 56usize]; - ["Alignment of QemuCond"][::std::mem::align_of::() - 8usize]; + ["Size of QemuCond"][::core::mem::size_of::() - 56usize]; + ["Alignment of QemuCond"][::core::mem::align_of::() - 8usize]; ["Offset of field: QemuCond::cond"][::std::mem::offset_of!(QemuCond, cond) - 0usize]; ["Offset of field: QemuCond::initialized"] [::std::mem::offset_of!(QemuCond, initialized) - 48usize]; }; impl Default for QemuCond { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for QemuCond { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for QemuCond { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!( f, "QemuCond {{ cond: {:?}, initialized: {:?} }}", @@ -1190,8 +1191,8 @@ pub struct QemuThread { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of QemuThread"][::std::mem::size_of::() - 8usize]; - ["Alignment of QemuThread"][::std::mem::align_of::() - 8usize]; + ["Size of QemuThread"][::core::mem::size_of::() - 8usize]; + ["Alignment of QemuThread"][::core::mem::align_of::() - 8usize]; ["Offset of field: QemuThread::thread"][::std::mem::offset_of!(QemuThread, thread) - 0usize]; }; #[repr(C)] @@ -1201,8 +1202,8 @@ pub struct QemuSpin { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of QemuSpin"][::std::mem::size_of::() - 4usize]; - ["Alignment of QemuSpin"][::std::mem::align_of::() - 4usize]; + ["Size of QemuSpin"][::core::mem::size_of::() - 4usize]; + ["Alignment of QemuSpin"][::core::mem::align_of::() - 4usize]; ["Offset of field: QemuSpin::value"][::std::mem::offset_of!(QemuSpin, value) - 0usize]; }; #[repr(C)] @@ -1212,8 +1213,8 @@ pub struct QemuLockCnt { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of QemuLockCnt"][::std::mem::size_of::() - 4usize]; - ["Alignment of QemuLockCnt"][::std::mem::align_of::() - 4usize]; + ["Size of QemuLockCnt"][::core::mem::size_of::() - 4usize]; + ["Alignment of QemuLockCnt"][::core::mem::align_of::() - 4usize]; ["Offset of field: QemuLockCnt::count"][::std::mem::offset_of!(QemuLockCnt, count) - 0usize]; }; #[repr(C)] @@ -1225,25 +1226,25 @@ pub struct MemTxAttrs { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of MemTxAttrs"][::std::mem::size_of::() - 4usize]; - ["Alignment of MemTxAttrs"][::std::mem::align_of::() - 4usize]; + ["Size of MemTxAttrs"][::core::mem::size_of::() - 4usize]; + ["Alignment of MemTxAttrs"][::core::mem::align_of::() - 4usize]; }; impl MemTxAttrs { #[inline] pub fn unspecified(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } } #[inline] pub fn set_unspecified(&mut self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] pub unsafe fn unspecified_raw(this: *const Self) -> ::std::os::raw::c_uint { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8, @@ -1253,7 +1254,7 @@ impl MemTxAttrs { #[inline] pub unsafe fn set_unspecified_raw(this: *mut Self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, @@ -1264,19 +1265,19 @@ impl MemTxAttrs { } #[inline] pub fn secure(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } #[inline] pub fn set_secure(&mut self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] pub unsafe fn secure_raw(this: *const Self) -> ::std::os::raw::c_uint { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8, @@ -1286,7 +1287,7 @@ impl MemTxAttrs { #[inline] pub unsafe fn set_secure_raw(this: *mut Self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, @@ -1297,19 +1298,19 @@ impl MemTxAttrs { } #[inline] pub fn space(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 2u8) as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 2u8) as u32) } } #[inline] pub fn set_space(&mut self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); self._bitfield_1.set(2usize, 2u8, val as u64) } } #[inline] pub unsafe fn space_raw(this: *const Self) -> ::std::os::raw::c_uint { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), 2usize, 2u8, @@ -1319,7 +1320,7 @@ impl MemTxAttrs { #[inline] pub unsafe fn set_space_raw(this: *mut Self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, @@ -1330,19 +1331,19 @@ impl MemTxAttrs { } #[inline] pub fn user(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } #[inline] pub fn set_user(&mut self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] pub unsafe fn user_raw(this: *const Self) -> ::std::os::raw::c_uint { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8, @@ -1352,7 +1353,7 @@ impl MemTxAttrs { #[inline] pub unsafe fn set_user_raw(this: *mut Self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, @@ -1363,19 +1364,19 @@ impl MemTxAttrs { } #[inline] pub fn memory(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } } #[inline] pub fn set_memory(&mut self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); self._bitfield_1.set(5usize, 1u8, val as u64) } } #[inline] pub unsafe fn memory_raw(this: *const Self) -> ::std::os::raw::c_uint { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), 5usize, 1u8, @@ -1385,7 +1386,7 @@ impl MemTxAttrs { #[inline] pub unsafe fn set_memory_raw(this: *mut Self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, @@ -1396,19 +1397,19 @@ impl MemTxAttrs { } #[inline] pub fn requester_id(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 16u8) as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 16u8) as u32) } } #[inline] pub fn set_requester_id(&mut self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); self._bitfield_1.set(6usize, 16u8, val as u64) } } #[inline] pub unsafe fn requester_id_raw(this: *const Self) -> ::std::os::raw::c_uint { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), 6usize, 16u8, @@ -1418,7 +1419,7 @@ impl MemTxAttrs { #[inline] pub unsafe fn set_requester_id_raw(this: *mut Self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), 6usize, @@ -1438,27 +1439,27 @@ impl MemTxAttrs { ) -> __BindgenBitfieldUnit<[u8; 3usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { - let unspecified: u32 = unsafe { ::std::mem::transmute(unspecified) }; + let unspecified: u32 = unsafe { ::core::mem::transmute(unspecified) }; unspecified as u64 }); __bindgen_bitfield_unit.set(1usize, 1u8, { - let secure: u32 = unsafe { ::std::mem::transmute(secure) }; + let secure: u32 = unsafe { ::core::mem::transmute(secure) }; secure as u64 }); __bindgen_bitfield_unit.set(2usize, 2u8, { - let space: u32 = unsafe { ::std::mem::transmute(space) }; + let space: u32 = unsafe { ::core::mem::transmute(space) }; space as u64 }); __bindgen_bitfield_unit.set(4usize, 1u8, { - let user: u32 = unsafe { ::std::mem::transmute(user) }; + let user: u32 = unsafe { ::core::mem::transmute(user) }; user as u64 }); __bindgen_bitfield_unit.set(5usize, 1u8, { - let memory: u32 = unsafe { ::std::mem::transmute(memory) }; + let memory: u32 = unsafe { ::core::mem::transmute(memory) }; memory as u64 }); __bindgen_bitfield_unit.set(6usize, 16u8, { - let requester_id: u32 = unsafe { ::std::mem::transmute(requester_id) }; + let requester_id: u32 = unsafe { ::core::mem::transmute(requester_id) }; requester_id as u64 }); __bindgen_bitfield_unit @@ -1472,8 +1473,8 @@ pub struct QTailQLink { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of QTailQLink"][::std::mem::size_of::() - 16usize]; - ["Alignment of QTailQLink"][::std::mem::align_of::() - 8usize]; + ["Size of QTailQLink"][::core::mem::size_of::() - 16usize]; + ["Alignment of QTailQLink"][::core::mem::align_of::() - 8usize]; ["Offset of field: QTailQLink::tql_next"] [::std::mem::offset_of!(QTailQLink, tql_next) - 0usize]; ["Offset of field: QTailQLink::tql_prev"] @@ -1481,9 +1482,9 @@ const _: () = { }; impl Default for QTailQLink { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -1491,7 +1492,7 @@ impl Default for QTailQLink { #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct Notifier { - pub notify: ::std::option::Option< + pub notify: ::core::option::Option< unsafe extern "C" fn(notifier: *mut Notifier, data: *mut ::std::os::raw::c_void), >, pub node: Notifier__bindgen_ty_1, @@ -1504,9 +1505,9 @@ pub struct Notifier__bindgen_ty_1 { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of Notifier__bindgen_ty_1"][::std::mem::size_of::() - 16usize]; + ["Size of Notifier__bindgen_ty_1"][::core::mem::size_of::() - 16usize]; ["Alignment of Notifier__bindgen_ty_1"] - [::std::mem::align_of::() - 8usize]; + [::core::mem::align_of::() - 8usize]; ["Offset of field: Notifier__bindgen_ty_1::le_next"] [::std::mem::offset_of!(Notifier__bindgen_ty_1, le_next) - 0usize]; ["Offset of field: Notifier__bindgen_ty_1::le_prev"] @@ -1514,30 +1515,30 @@ const _: () = { }; impl Default for Notifier__bindgen_ty_1 { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of Notifier"][::std::mem::size_of::() - 24usize]; - ["Alignment of Notifier"][::std::mem::align_of::() - 8usize]; + ["Size of Notifier"][::core::mem::size_of::() - 24usize]; + ["Alignment of Notifier"][::core::mem::align_of::() - 8usize]; ["Offset of field: Notifier::notify"][::std::mem::offset_of!(Notifier, notify) - 0usize]; ["Offset of field: Notifier::node"][::std::mem::offset_of!(Notifier, node) - 8usize]; }; impl Default for Notifier { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -pub type RCUCBFunc = ::std::option::Option; +pub type RCUCBFunc = ::core::option::Option; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct rcu_head { @@ -1546,16 +1547,16 @@ pub struct rcu_head { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of rcu_head"][::std::mem::size_of::() - 16usize]; - ["Alignment of rcu_head"][::std::mem::align_of::() - 8usize]; + ["Size of rcu_head"][::core::mem::size_of::() - 16usize]; + ["Alignment of rcu_head"][::core::mem::align_of::() - 8usize]; ["Offset of field: rcu_head::next"][::std::mem::offset_of!(rcu_head, next) - 0usize]; ["Offset of field: rcu_head::func"][::std::mem::offset_of!(rcu_head, func) - 8usize]; }; impl Default for rcu_head { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -1567,7 +1568,7 @@ pub struct TypeImpl { } pub type Type = *mut TypeImpl; #[doc = " typedef ObjectPropertyAccessor:\n @obj: the object that owns the property\n @v: the visitor that contains the property data\n @name: the name of the property\n @opaque: the object property opaque\n @errp: a pointer to an Error that is filled if getting/setting fails.\n\n Called when trying to get/set a property."] -pub type ObjectPropertyAccessor = ::std::option::Option< +pub type ObjectPropertyAccessor = ::core::option::Option< unsafe extern "C" fn( obj: *mut Object, v: *mut Visitor, @@ -1577,7 +1578,7 @@ pub type ObjectPropertyAccessor = ::std::option::Option< ), >; #[doc = " typedef ObjectPropertyResolve:\n @obj: the object that owns the property\n @opaque: the opaque registered with the property\n @part: the name of the property\n\n Resolves the #Object corresponding to property @part.\n\n The returned object can also be used as a starting point\n to resolve a relative path starting with \"@part\".\n\n Returns: If @path is the path that led to @obj, the function\n returns the #Object corresponding to \"@path/@part\".\n If \"@path/@part\" is not a valid object path, it returns #NULL."] -pub type ObjectPropertyResolve = ::std::option::Option< +pub type ObjectPropertyResolve = ::core::option::Option< unsafe extern "C" fn( obj: *mut Object, opaque: *mut ::std::os::raw::c_void, @@ -1585,7 +1586,7 @@ pub type ObjectPropertyResolve = ::std::option::Option< ) -> *mut Object, >; #[doc = " typedef ObjectPropertyRelease:\n @obj: the object that owns the property\n @name: the name of the property\n @opaque: the opaque registered with the property\n\n Called when a property is removed from a object."] -pub type ObjectPropertyRelease = ::std::option::Option< +pub type ObjectPropertyRelease = ::core::option::Option< unsafe extern "C" fn( obj: *mut Object, name: *const ::std::os::raw::c_char, @@ -1594,7 +1595,7 @@ pub type ObjectPropertyRelease = ::std::option::Option< >; #[doc = " typedef ObjectPropertyInit:\n @obj: the object that owns the property\n @prop: the property to set\n\n Called when a property is initialized."] pub type ObjectPropertyInit = - ::std::option::Option; + ::core::option::Option; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ObjectProperty { @@ -1611,8 +1612,8 @@ pub struct ObjectProperty { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of ObjectProperty"][::std::mem::size_of::() - 80usize]; - ["Alignment of ObjectProperty"][::std::mem::align_of::() - 8usize]; + ["Size of ObjectProperty"][::core::mem::size_of::() - 80usize]; + ["Alignment of ObjectProperty"][::core::mem::align_of::() - 8usize]; ["Offset of field: ObjectProperty::name"] [::std::mem::offset_of!(ObjectProperty, name) - 0usize]; ["Offset of field: ObjectProperty::type_"] @@ -1634,17 +1635,18 @@ const _: () = { }; impl Default for ObjectProperty { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[doc = " typedef ObjectUnparent:\n @obj: the object that is being removed from the composition tree\n\n Called when an object is being removed from the QOM composition tree.\n The function should remove any backlinks from children objects to @obj."] -pub type ObjectUnparent = ::std::option::Option; +pub type ObjectUnparent = ::core::option::Option; #[doc = " typedef ObjectFree:\n @obj: the object being freed\n\n Called when an object's last reference is removed."] -pub type ObjectFree = ::std::option::Option; +pub type ObjectFree = + ::core::option::Option; #[doc = " struct ObjectClass:\n\n The base for all classes. The only thing that #ObjectClass contains is an\n integer type handle."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -1658,8 +1660,8 @@ pub struct ObjectClass { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of ObjectClass"][::std::mem::size_of::() - 96usize]; - ["Alignment of ObjectClass"][::std::mem::align_of::() - 8usize]; + ["Size of ObjectClass"][::core::mem::size_of::() - 96usize]; + ["Alignment of ObjectClass"][::core::mem::align_of::() - 8usize]; ["Offset of field: ObjectClass::type_"][::std::mem::offset_of!(ObjectClass, type_) - 0usize]; ["Offset of field: ObjectClass::interfaces"] [::std::mem::offset_of!(ObjectClass, interfaces) - 8usize]; @@ -1674,9 +1676,9 @@ const _: () = { }; impl Default for ObjectClass { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -1693,8 +1695,8 @@ pub struct Object { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of Object"][::std::mem::size_of::() - 40usize]; - ["Alignment of Object"][::std::mem::align_of::() - 8usize]; + ["Size of Object"][::core::mem::size_of::() - 40usize]; + ["Alignment of Object"][::core::mem::align_of::() - 8usize]; ["Offset of field: Object::class"][::std::mem::offset_of!(Object, class) - 0usize]; ["Offset of field: Object::free"][::std::mem::offset_of!(Object, free) - 8usize]; ["Offset of field: Object::properties"][::std::mem::offset_of!(Object, properties) - 16usize]; @@ -1703,9 +1705,9 @@ const _: () = { }; impl Default for Object { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -1725,8 +1727,8 @@ pub struct ResettableState { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of ResettableState"][::std::mem::size_of::() - 8usize]; - ["Alignment of ResettableState"][::std::mem::align_of::() - 4usize]; + ["Size of ResettableState"][::core::mem::size_of::() - 8usize]; + ["Alignment of ResettableState"][::core::mem::align_of::() - 4usize]; ["Offset of field: ResettableState::count"] [::std::mem::offset_of!(ResettableState, count) - 0usize]; ["Offset of field: ResettableState::hold_phase_pending"] @@ -1735,9 +1737,9 @@ const _: () = { [::std::mem::offset_of!(ResettableState, exit_phase_in_progress) - 5usize]; }; pub type DeviceRealize = - ::std::option::Option; -pub type DeviceUnrealize = ::std::option::Option; -pub type DeviceReset = ::std::option::Option; + ::core::option::Option; +pub type DeviceUnrealize = ::core::option::Option; +pub type DeviceReset = ::core::option::Option; #[doc = " struct DeviceClass - The base class for all devices.\n @props: Properties accessing state fields.\n @realize: Callback function invoked when the #DeviceState:realized\n property is changed to %true.\n @unrealize: Callback function invoked when the #DeviceState:realized\n property is changed to %false.\n @hotpluggable: indicates if #DeviceClass is hotpluggable, available\n as readonly \"hotpluggable\" property of #DeviceState instance\n"] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -1765,8 +1767,8 @@ pub struct DeviceClass { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of DeviceClass"][::std::mem::size_of::() - 176usize]; - ["Alignment of DeviceClass"][::std::mem::align_of::() - 8usize]; + ["Size of DeviceClass"][::core::mem::size_of::() - 176usize]; + ["Alignment of DeviceClass"][::core::mem::align_of::() - 8usize]; ["Offset of field: DeviceClass::parent_class"] [::std::mem::offset_of!(DeviceClass, parent_class) - 0usize]; ["Offset of field: DeviceClass::categories"] @@ -1791,9 +1793,9 @@ const _: () = { }; impl Default for DeviceClass { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -1816,9 +1818,9 @@ pub struct NamedGPIOList__bindgen_ty_1 { #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of NamedGPIOList__bindgen_ty_1"] - [::std::mem::size_of::() - 16usize]; + [::core::mem::size_of::() - 16usize]; ["Alignment of NamedGPIOList__bindgen_ty_1"] - [::std::mem::align_of::() - 8usize]; + [::core::mem::align_of::() - 8usize]; ["Offset of field: NamedGPIOList__bindgen_ty_1::le_next"] [::std::mem::offset_of!(NamedGPIOList__bindgen_ty_1, le_next) - 0usize]; ["Offset of field: NamedGPIOList__bindgen_ty_1::le_prev"] @@ -1826,17 +1828,17 @@ const _: () = { }; impl Default for NamedGPIOList__bindgen_ty_1 { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of NamedGPIOList"][::std::mem::size_of::() - 40usize]; - ["Alignment of NamedGPIOList"][::std::mem::align_of::() - 8usize]; + ["Size of NamedGPIOList"][::core::mem::size_of::() - 40usize]; + ["Alignment of NamedGPIOList"][::core::mem::align_of::() - 8usize]; ["Offset of field: NamedGPIOList::name"][::std::mem::offset_of!(NamedGPIOList, name) - 0usize]; ["Offset of field: NamedGPIOList::in_"][::std::mem::offset_of!(NamedGPIOList, in_) - 8usize]; ["Offset of field: NamedGPIOList::num_in"] @@ -1847,9 +1849,9 @@ const _: () = { }; impl Default for NamedGPIOList { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -1872,9 +1874,9 @@ pub struct NamedClockList__bindgen_ty_1 { #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of NamedClockList__bindgen_ty_1"] - [::std::mem::size_of::() - 16usize]; + [::core::mem::size_of::() - 16usize]; ["Alignment of NamedClockList__bindgen_ty_1"] - [::std::mem::align_of::() - 8usize]; + [::core::mem::align_of::() - 8usize]; ["Offset of field: NamedClockList__bindgen_ty_1::le_next"] [::std::mem::offset_of!(NamedClockList__bindgen_ty_1, le_next) - 0usize]; ["Offset of field: NamedClockList__bindgen_ty_1::le_prev"] @@ -1882,17 +1884,17 @@ const _: () = { }; impl Default for NamedClockList__bindgen_ty_1 { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of NamedClockList"][::std::mem::size_of::() - 40usize]; - ["Alignment of NamedClockList"][::std::mem::align_of::() - 8usize]; + ["Size of NamedClockList"][::core::mem::size_of::() - 40usize]; + ["Alignment of NamedClockList"][::core::mem::align_of::() - 8usize]; ["Offset of field: NamedClockList::name"] [::std::mem::offset_of!(NamedClockList, name) - 0usize]; ["Offset of field: NamedClockList::clock"] @@ -1906,9 +1908,9 @@ const _: () = { }; impl Default for NamedClockList { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -1920,8 +1922,8 @@ pub struct MemReentrancyGuard { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of MemReentrancyGuard"][::std::mem::size_of::() - 1usize]; - ["Alignment of MemReentrancyGuard"][::std::mem::align_of::() - 1usize]; + ["Size of MemReentrancyGuard"][::core::mem::size_of::() - 1usize]; + ["Alignment of MemReentrancyGuard"][::core::mem::align_of::() - 1usize]; ["Offset of field: MemReentrancyGuard::engaged_in_io"] [::std::mem::offset_of!(MemReentrancyGuard, engaged_in_io) - 0usize]; }; @@ -1932,16 +1934,16 @@ pub struct NamedGPIOListHead { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of NamedGPIOListHead"][::std::mem::size_of::() - 8usize]; - ["Alignment of NamedGPIOListHead"][::std::mem::align_of::() - 8usize]; + ["Size of NamedGPIOListHead"][::core::mem::size_of::() - 8usize]; + ["Alignment of NamedGPIOListHead"][::core::mem::align_of::() - 8usize]; ["Offset of field: NamedGPIOListHead::lh_first"] [::std::mem::offset_of!(NamedGPIOListHead, lh_first) - 0usize]; }; impl Default for NamedGPIOListHead { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -1953,16 +1955,16 @@ pub struct NamedClockListHead { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of NamedClockListHead"][::std::mem::size_of::() - 8usize]; - ["Alignment of NamedClockListHead"][::std::mem::align_of::() - 8usize]; + ["Size of NamedClockListHead"][::core::mem::size_of::() - 8usize]; + ["Alignment of NamedClockListHead"][::core::mem::align_of::() - 8usize]; ["Offset of field: NamedClockListHead::lh_first"] [::std::mem::offset_of!(NamedClockListHead, lh_first) - 0usize]; }; impl Default for NamedClockListHead { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -1974,16 +1976,16 @@ pub struct BusStateHead { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of BusStateHead"][::std::mem::size_of::() - 8usize]; - ["Alignment of BusStateHead"][::std::mem::align_of::() - 8usize]; + ["Size of BusStateHead"][::core::mem::size_of::() - 8usize]; + ["Alignment of BusStateHead"][::core::mem::align_of::() - 8usize]; ["Offset of field: BusStateHead::lh_first"] [::std::mem::offset_of!(BusStateHead, lh_first) - 0usize]; }; impl Default for BusStateHead { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -2032,8 +2034,8 @@ pub struct DeviceState { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of DeviceState"][::std::mem::size_of::() - 160usize]; - ["Alignment of DeviceState"][::std::mem::align_of::() - 8usize]; + ["Size of DeviceState"][::core::mem::size_of::() - 160usize]; + ["Alignment of DeviceState"][::core::mem::align_of::() - 8usize]; ["Offset of field: DeviceState::parent_obj"] [::std::mem::offset_of!(DeviceState, parent_obj) - 0usize]; ["Offset of field: DeviceState::id"][::std::mem::offset_of!(DeviceState, id) - 40usize]; @@ -2071,9 +2073,9 @@ const _: () = { }; impl Default for DeviceState { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -2094,9 +2096,9 @@ pub union BusChild__bindgen_ty_1 { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of BusChild__bindgen_ty_1"][::std::mem::size_of::() - 16usize]; + ["Size of BusChild__bindgen_ty_1"][::core::mem::size_of::() - 16usize]; ["Alignment of BusChild__bindgen_ty_1"] - [::std::mem::align_of::() - 8usize]; + [::core::mem::align_of::() - 8usize]; ["Offset of field: BusChild__bindgen_ty_1::tqe_next"] [::std::mem::offset_of!(BusChild__bindgen_ty_1, tqe_next) - 0usize]; ["Offset of field: BusChild__bindgen_ty_1::tqe_circ"] @@ -2104,22 +2106,22 @@ const _: () = { }; impl Default for BusChild__bindgen_ty_1 { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for BusChild__bindgen_ty_1 { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for BusChild__bindgen_ty_1 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!(f, "BusChild__bindgen_ty_1 {{ union }}") } } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of BusChild"][::std::mem::size_of::() - 48usize]; - ["Alignment of BusChild"][::std::mem::align_of::() - 8usize]; + ["Size of BusChild"][::core::mem::size_of::() - 48usize]; + ["Alignment of BusChild"][::core::mem::align_of::() - 8usize]; ["Offset of field: BusChild::rcu"][::std::mem::offset_of!(BusChild, rcu) - 0usize]; ["Offset of field: BusChild::child"][::std::mem::offset_of!(BusChild, child) - 16usize]; ["Offset of field: BusChild::index"][::std::mem::offset_of!(BusChild, index) - 24usize]; @@ -2127,15 +2129,15 @@ const _: () = { }; impl Default for BusChild { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for BusChild { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for BusChild { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!( f, "BusChild {{ rcu: {:?}, child: {:?}, index: {:?}, sibling: {:?} }}", @@ -2151,8 +2153,8 @@ pub union BusChildHead { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of BusChildHead"][::std::mem::size_of::() - 16usize]; - ["Alignment of BusChildHead"][::std::mem::align_of::() - 8usize]; + ["Size of BusChildHead"][::core::mem::size_of::() - 16usize]; + ["Alignment of BusChildHead"][::core::mem::align_of::() - 8usize]; ["Offset of field: BusChildHead::tqh_first"] [::std::mem::offset_of!(BusChildHead, tqh_first) - 0usize]; ["Offset of field: BusChildHead::tqh_circ"] @@ -2160,15 +2162,15 @@ const _: () = { }; impl Default for BusChildHead { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for BusChildHead { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for BusChildHead { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!(f, "BusChildHead {{ union }}") } } @@ -2180,8 +2182,8 @@ pub struct BusStateEntry { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of BusStateEntry"][::std::mem::size_of::() - 16usize]; - ["Alignment of BusStateEntry"][::std::mem::align_of::() - 8usize]; + ["Size of BusStateEntry"][::core::mem::size_of::() - 16usize]; + ["Alignment of BusStateEntry"][::core::mem::align_of::() - 8usize]; ["Offset of field: BusStateEntry::le_next"] [::std::mem::offset_of!(BusStateEntry, le_next) - 0usize]; ["Offset of field: BusStateEntry::le_prev"] @@ -2189,9 +2191,9 @@ const _: () = { }; impl Default for BusStateEntry { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -2217,8 +2219,8 @@ pub struct BusState { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of BusState"][::std::mem::size_of::() - 120usize]; - ["Alignment of BusState"][::std::mem::align_of::() - 8usize]; + ["Size of BusState"][::core::mem::size_of::() - 120usize]; + ["Alignment of BusState"][::core::mem::align_of::() - 8usize]; ["Offset of field: BusState::obj"][::std::mem::offset_of!(BusState, obj) - 0usize]; ["Offset of field: BusState::parent"][::std::mem::offset_of!(BusState, parent) - 40usize]; ["Offset of field: BusState::name"][::std::mem::offset_of!(BusState, name) - 48usize]; @@ -2235,15 +2237,15 @@ const _: () = { }; impl Default for BusState { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for BusState { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for BusState { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!( f, "BusState {{ obj: {:?}, parent: {:?}, name: {:?}, hotplug_handler: {:?}, max_index: {:?}, realized: {:?}, full: {:?}, num_children: {:?}, children: {:?}, sibling: {:?}, reset: {:?} }}", @@ -2280,27 +2282,27 @@ pub const bfd_flavour_bfd_target_os9k_flavour: bfd_flavour = bfd_flavour(12); pub const bfd_flavour_bfd_target_versados_flavour: bfd_flavour = bfd_flavour(13); pub const bfd_flavour_bfd_target_msdos_flavour: bfd_flavour = bfd_flavour(14); pub const bfd_flavour_bfd_target_evax_flavour: bfd_flavour = bfd_flavour(15); -impl ::std::ops::BitOr for bfd_flavour { +impl ::core::ops::BitOr for bfd_flavour { type Output = Self; #[inline] fn bitor(self, other: Self) -> Self { bfd_flavour(self.0 | other.0) } } -impl ::std::ops::BitOrAssign for bfd_flavour { +impl ::core::ops::BitOrAssign for bfd_flavour { #[inline] fn bitor_assign(&mut self, rhs: bfd_flavour) { self.0 |= rhs.0; } } -impl ::std::ops::BitAnd for bfd_flavour { +impl ::core::ops::BitAnd for bfd_flavour { type Output = Self; #[inline] fn bitand(self, other: Self) -> Self { bfd_flavour(self.0 & other.0) } } -impl ::std::ops::BitAndAssign for bfd_flavour { +impl ::core::ops::BitAndAssign for bfd_flavour { #[inline] fn bitand_assign(&mut self, rhs: bfd_flavour) { self.0 &= rhs.0; @@ -2312,27 +2314,27 @@ pub struct bfd_flavour(pub ::std::os::raw::c_uint); pub const bfd_endian_BFD_ENDIAN_BIG: bfd_endian = bfd_endian(0); pub const bfd_endian_BFD_ENDIAN_LITTLE: bfd_endian = bfd_endian(1); pub const bfd_endian_BFD_ENDIAN_UNKNOWN: bfd_endian = bfd_endian(2); -impl ::std::ops::BitOr for bfd_endian { +impl ::core::ops::BitOr for bfd_endian { type Output = Self; #[inline] fn bitor(self, other: Self) -> Self { bfd_endian(self.0 | other.0) } } -impl ::std::ops::BitOrAssign for bfd_endian { +impl ::core::ops::BitOrAssign for bfd_endian { #[inline] fn bitor_assign(&mut self, rhs: bfd_endian) { self.0 |= rhs.0; } } -impl ::std::ops::BitAnd for bfd_endian { +impl ::core::ops::BitAnd for bfd_endian { type Output = Self; #[inline] fn bitand(self, other: Self) -> Self { bfd_endian(self.0 & other.0) } } -impl ::std::ops::BitAndAssign for bfd_endian { +impl ::core::ops::BitAndAssign for bfd_endian { #[inline] fn bitand_assign(&mut self, rhs: bfd_endian) { self.0 &= rhs.0; @@ -2384,27 +2386,27 @@ pub const bfd_architecture_bfd_arch_ia64: bfd_architecture = bfd_architecture(39 pub const bfd_architecture_bfd_arch_rx: bfd_architecture = bfd_architecture(40); pub const bfd_architecture_bfd_arch_loongarch: bfd_architecture = bfd_architecture(41); pub const bfd_architecture_bfd_arch_last: bfd_architecture = bfd_architecture(42); -impl ::std::ops::BitOr for bfd_architecture { +impl ::core::ops::BitOr for bfd_architecture { type Output = Self; #[inline] fn bitor(self, other: Self) -> Self { bfd_architecture(self.0 | other.0) } } -impl ::std::ops::BitOrAssign for bfd_architecture { +impl ::core::ops::BitOrAssign for bfd_architecture { #[inline] fn bitor_assign(&mut self, rhs: bfd_architecture) { self.0 |= rhs.0; } } -impl ::std::ops::BitAnd for bfd_architecture { +impl ::core::ops::BitAnd for bfd_architecture { type Output = Self; #[inline] fn bitand(self, other: Self) -> Self { bfd_architecture(self.0 & other.0) } } -impl ::std::ops::BitAndAssign for bfd_architecture { +impl ::core::ops::BitAndAssign for bfd_architecture { #[inline] fn bitand_assign(&mut self, rhs: bfd_architecture) { self.0 &= rhs.0; @@ -2428,9 +2430,9 @@ pub union symbol_cache_entry__bindgen_ty_1 { #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of symbol_cache_entry__bindgen_ty_1"] - [::std::mem::size_of::() - 8usize]; + [::core::mem::size_of::() - 8usize]; ["Alignment of symbol_cache_entry__bindgen_ty_1"] - [::std::mem::align_of::() - 8usize]; + [::core::mem::align_of::() - 8usize]; ["Offset of field: symbol_cache_entry__bindgen_ty_1::p"] [::std::mem::offset_of!(symbol_cache_entry__bindgen_ty_1, p) - 0usize]; ["Offset of field: symbol_cache_entry__bindgen_ty_1::i"] @@ -2438,22 +2440,22 @@ const _: () = { }; impl Default for symbol_cache_entry__bindgen_ty_1 { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for symbol_cache_entry__bindgen_ty_1 { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for symbol_cache_entry__bindgen_ty_1 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!(f, "symbol_cache_entry__bindgen_ty_1 {{ union }}") } } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of symbol_cache_entry"][::std::mem::size_of::() - 16usize]; - ["Alignment of symbol_cache_entry"][::std::mem::align_of::() - 8usize]; + ["Size of symbol_cache_entry"][::core::mem::size_of::() - 16usize]; + ["Alignment of symbol_cache_entry"][::core::mem::align_of::() - 8usize]; ["Offset of field: symbol_cache_entry::name"] [::std::mem::offset_of!(symbol_cache_entry, name) - 0usize]; ["Offset of field: symbol_cache_entry::udata"] @@ -2461,15 +2463,15 @@ const _: () = { }; impl Default for symbol_cache_entry { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for symbol_cache_entry { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for symbol_cache_entry { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!( f, "symbol_cache_entry {{ name: {:?}, udata: {:?} }}", @@ -2478,7 +2480,7 @@ impl ::std::fmt::Debug for symbol_cache_entry { } } pub type asymbol = symbol_cache_entry; -pub type fprintf_function = ::std::option::Option< +pub type fprintf_function = ::core::option::Option< unsafe extern "C" fn( f: *mut FILE, fmt: *const ::std::os::raw::c_char, @@ -2493,27 +2495,27 @@ pub const dis_insn_type_dis_jsr: dis_insn_type = dis_insn_type(4); pub const dis_insn_type_dis_condjsr: dis_insn_type = dis_insn_type(5); pub const dis_insn_type_dis_dref: dis_insn_type = dis_insn_type(6); pub const dis_insn_type_dis_dref2: dis_insn_type = dis_insn_type(7); -impl ::std::ops::BitOr for dis_insn_type { +impl ::core::ops::BitOr for dis_insn_type { type Output = Self; #[inline] fn bitor(self, other: Self) -> Self { dis_insn_type(self.0 | other.0) } } -impl ::std::ops::BitOrAssign for dis_insn_type { +impl ::core::ops::BitOrAssign for dis_insn_type { #[inline] fn bitor_assign(&mut self, rhs: dis_insn_type) { self.0 |= rhs.0; } } -impl ::std::ops::BitAnd for dis_insn_type { +impl ::core::ops::BitAnd for dis_insn_type { type Output = Self; #[inline] fn bitand(self, other: Self) -> Self { dis_insn_type(self.0 & other.0) } } -impl ::std::ops::BitAndAssign for dis_insn_type { +impl ::core::ops::BitAndAssign for dis_insn_type { #[inline] fn bitand_assign(&mut self, rhs: dis_insn_type) { self.0 &= rhs.0; @@ -2536,7 +2538,7 @@ pub struct disassemble_info { pub num_symbols: ::std::os::raw::c_int, pub flags: ::std::os::raw::c_ulong, pub private_data: PTR, - pub read_memory_func: ::std::option::Option< + pub read_memory_func: ::core::option::Option< unsafe extern "C" fn( memaddr: bfd_vma, myaddr: *mut bfd_byte, @@ -2544,7 +2546,7 @@ pub struct disassemble_info { info: *mut disassemble_info, ) -> ::std::os::raw::c_int, >, - pub memory_error_func: ::std::option::Option< + pub memory_error_func: ::core::option::Option< unsafe extern "C" fn( status: ::std::os::raw::c_int, memaddr: bfd_vma, @@ -2552,11 +2554,11 @@ pub struct disassemble_info { ), >, pub print_address_func: - ::std::option::Option, - pub print_insn: ::std::option::Option< + ::core::option::Option, + pub print_insn: ::core::option::Option< unsafe extern "C" fn(addr: bfd_vma, info: *mut disassemble_info) -> ::std::os::raw::c_int, >, - pub symbol_at_address_func: ::std::option::Option< + pub symbol_at_address_func: ::core::option::Option< unsafe extern "C" fn(addr: bfd_vma, info: *mut disassemble_info) -> ::std::os::raw::c_int, >, pub buffer: *const bfd_byte, @@ -2581,8 +2583,8 @@ pub struct disassemble_info { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of disassemble_info"][::std::mem::size_of::() - 216usize]; - ["Alignment of disassemble_info"][::std::mem::align_of::() - 8usize]; + ["Size of disassemble_info"][::core::mem::size_of::() - 216usize]; + ["Alignment of disassemble_info"][::core::mem::align_of::() - 8usize]; ["Offset of field: disassemble_info::fprintf_func"] [::std::mem::offset_of!(disassemble_info, fprintf_func) - 0usize]; ["Offset of field: disassemble_info::stream"] @@ -2656,9 +2658,9 @@ const _: () = { }; impl Default for disassemble_info { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -2681,9 +2683,9 @@ pub union CPUBreakpoint__bindgen_ty_1 { #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of CPUBreakpoint__bindgen_ty_1"] - [::std::mem::size_of::() - 16usize]; + [::core::mem::size_of::() - 16usize]; ["Alignment of CPUBreakpoint__bindgen_ty_1"] - [::std::mem::align_of::() - 8usize]; + [::core::mem::align_of::() - 8usize]; ["Offset of field: CPUBreakpoint__bindgen_ty_1::tqe_next"] [::std::mem::offset_of!(CPUBreakpoint__bindgen_ty_1, tqe_next) - 0usize]; ["Offset of field: CPUBreakpoint__bindgen_ty_1::tqe_circ"] @@ -2691,22 +2693,22 @@ const _: () = { }; impl Default for CPUBreakpoint__bindgen_ty_1 { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for CPUBreakpoint__bindgen_ty_1 { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for CPUBreakpoint__bindgen_ty_1 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!(f, "CPUBreakpoint__bindgen_ty_1 {{ union }}") } } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUBreakpoint"][::std::mem::size_of::() - 32usize]; - ["Alignment of CPUBreakpoint"][::std::mem::align_of::() - 8usize]; + ["Size of CPUBreakpoint"][::core::mem::size_of::() - 32usize]; + ["Alignment of CPUBreakpoint"][::core::mem::align_of::() - 8usize]; ["Offset of field: CPUBreakpoint::pc"][::std::mem::offset_of!(CPUBreakpoint, pc) - 0usize]; ["Offset of field: CPUBreakpoint::flags"] [::std::mem::offset_of!(CPUBreakpoint, flags) - 8usize]; @@ -2715,15 +2717,15 @@ const _: () = { }; impl Default for CPUBreakpoint { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for CPUBreakpoint { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for CPUBreakpoint { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!( f, "CPUBreakpoint {{ flags: {:?}, entry: {:?} }}", @@ -2750,9 +2752,9 @@ pub union CPUWatchpoint__bindgen_ty_1 { #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of CPUWatchpoint__bindgen_ty_1"] - [::std::mem::size_of::() - 16usize]; + [::core::mem::size_of::() - 16usize]; ["Alignment of CPUWatchpoint__bindgen_ty_1"] - [::std::mem::align_of::() - 8usize]; + [::core::mem::align_of::() - 8usize]; ["Offset of field: CPUWatchpoint__bindgen_ty_1::tqe_next"] [::std::mem::offset_of!(CPUWatchpoint__bindgen_ty_1, tqe_next) - 0usize]; ["Offset of field: CPUWatchpoint__bindgen_ty_1::tqe_circ"] @@ -2760,22 +2762,22 @@ const _: () = { }; impl Default for CPUWatchpoint__bindgen_ty_1 { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for CPUWatchpoint__bindgen_ty_1 { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for CPUWatchpoint__bindgen_ty_1 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!(f, "CPUWatchpoint__bindgen_ty_1 {{ union }}") } } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUWatchpoint"][::std::mem::size_of::() - 48usize]; - ["Alignment of CPUWatchpoint"][::std::mem::align_of::() - 8usize]; + ["Size of CPUWatchpoint"][::core::mem::size_of::() - 48usize]; + ["Alignment of CPUWatchpoint"][::core::mem::align_of::() - 8usize]; ["Offset of field: CPUWatchpoint::vaddr"] [::std::mem::offset_of!(CPUWatchpoint, vaddr) - 0usize]; ["Offset of field: CPUWatchpoint::len"][::std::mem::offset_of!(CPUWatchpoint, len) - 8usize]; @@ -2790,15 +2792,15 @@ const _: () = { }; impl Default for CPUWatchpoint { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for CPUWatchpoint { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for CPUWatchpoint { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!( f, "CPUWatchpoint {{ hitattrs: {:?}, flags: {:?}, entry: {:?} }}", @@ -2824,9 +2826,9 @@ pub struct CPUTLBEntry__bindgen_ty_1 { #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of CPUTLBEntry__bindgen_ty_1"] - [::std::mem::size_of::() - 32usize]; + [::core::mem::size_of::() - 32usize]; ["Alignment of CPUTLBEntry__bindgen_ty_1"] - [::std::mem::align_of::() - 8usize]; + [::core::mem::align_of::() - 8usize]; ["Offset of field: CPUTLBEntry__bindgen_ty_1::addr_read"] [::std::mem::offset_of!(CPUTLBEntry__bindgen_ty_1, addr_read) - 0usize]; ["Offset of field: CPUTLBEntry__bindgen_ty_1::addr_write"] @@ -2838,22 +2840,22 @@ const _: () = { }; #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUTLBEntry"][::std::mem::size_of::() - 32usize]; - ["Alignment of CPUTLBEntry"][::std::mem::align_of::() - 8usize]; + ["Size of CPUTLBEntry"][::core::mem::size_of::() - 32usize]; + ["Alignment of CPUTLBEntry"][::core::mem::align_of::() - 8usize]; ["Offset of field: CPUTLBEntry::addr_idx"] [::std::mem::offset_of!(CPUTLBEntry, addr_idx) - 0usize]; }; impl Default for CPUTLBEntry { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for CPUTLBEntry { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for CPUTLBEntry { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!(f, "CPUTLBEntry {{ union }}") } } @@ -2865,8 +2867,8 @@ pub struct CPUTLBDescFast { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUTLBDescFast"][::std::mem::size_of::() - 16usize]; - ["Alignment of CPUTLBDescFast"][::std::mem::align_of::() - 8usize]; + ["Size of CPUTLBDescFast"][::core::mem::size_of::() - 16usize]; + ["Alignment of CPUTLBDescFast"][::core::mem::align_of::() - 8usize]; ["Offset of field: CPUTLBDescFast::mask"] [::std::mem::offset_of!(CPUTLBDescFast, mask) - 0usize]; ["Offset of field: CPUTLBDescFast::table"] @@ -2874,9 +2876,9 @@ const _: () = { }; impl Default for CPUTLBDescFast { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -2885,27 +2887,27 @@ pub const OnOffAuto_ON_OFF_AUTO_AUTO: OnOffAuto = OnOffAuto(0); pub const OnOffAuto_ON_OFF_AUTO_ON: OnOffAuto = OnOffAuto(1); pub const OnOffAuto_ON_OFF_AUTO_OFF: OnOffAuto = OnOffAuto(2); pub const OnOffAuto_ON_OFF_AUTO__MAX: OnOffAuto = OnOffAuto(3); -impl ::std::ops::BitOr for OnOffAuto { +impl ::core::ops::BitOr for OnOffAuto { type Output = Self; #[inline] fn bitor(self, other: Self) -> Self { OnOffAuto(self.0 | other.0) } } -impl ::std::ops::BitOrAssign for OnOffAuto { +impl ::core::ops::BitOrAssign for OnOffAuto { #[inline] fn bitor_assign(&mut self, rhs: OnOffAuto) { self.0 |= rhs.0; } } -impl ::std::ops::BitAnd for OnOffAuto { +impl ::core::ops::BitAnd for OnOffAuto { type Output = Self; #[inline] fn bitand(self, other: Self) -> Self { OnOffAuto(self.0 & other.0) } } -impl ::std::ops::BitAndAssign for OnOffAuto { +impl ::core::ops::BitAndAssign for OnOffAuto { #[inline] fn bitand_assign(&mut self, rhs: OnOffAuto) { self.0 &= rhs.0; @@ -2920,27 +2922,27 @@ pub const CpuS390Entitlement_S390_CPU_ENTITLEMENT_MEDIUM: CpuS390Entitlement = CpuS390Entitlement(2); pub const CpuS390Entitlement_S390_CPU_ENTITLEMENT_HIGH: CpuS390Entitlement = CpuS390Entitlement(3); pub const CpuS390Entitlement_S390_CPU_ENTITLEMENT__MAX: CpuS390Entitlement = CpuS390Entitlement(4); -impl ::std::ops::BitOr for CpuS390Entitlement { +impl ::core::ops::BitOr for CpuS390Entitlement { type Output = Self; #[inline] fn bitor(self, other: Self) -> Self { CpuS390Entitlement(self.0 | other.0) } } -impl ::std::ops::BitOrAssign for CpuS390Entitlement { +impl ::core::ops::BitOrAssign for CpuS390Entitlement { #[inline] fn bitor_assign(&mut self, rhs: CpuS390Entitlement) { self.0 |= rhs.0; } } -impl ::std::ops::BitAnd for CpuS390Entitlement { +impl ::core::ops::BitAnd for CpuS390Entitlement { type Output = Self; #[inline] fn bitand(self, other: Self) -> Self { CpuS390Entitlement(self.0 & other.0) } } -impl ::std::ops::BitAndAssign for CpuS390Entitlement { +impl ::core::ops::BitAndAssign for CpuS390Entitlement { #[inline] fn bitand_assign(&mut self, rhs: CpuS390Entitlement) { self.0 &= rhs.0; @@ -2980,27 +2982,27 @@ pub const SysEmuTarget_SYS_EMU_TARGET_X86_64: SysEmuTarget = SysEmuTarget(27); pub const SysEmuTarget_SYS_EMU_TARGET_XTENSA: SysEmuTarget = SysEmuTarget(28); pub const SysEmuTarget_SYS_EMU_TARGET_XTENSAEB: SysEmuTarget = SysEmuTarget(29); pub const SysEmuTarget_SYS_EMU_TARGET__MAX: SysEmuTarget = SysEmuTarget(30); -impl ::std::ops::BitOr for SysEmuTarget { +impl ::core::ops::BitOr for SysEmuTarget { type Output = Self; #[inline] fn bitor(self, other: Self) -> Self { SysEmuTarget(self.0 | other.0) } } -impl ::std::ops::BitOrAssign for SysEmuTarget { +impl ::core::ops::BitOrAssign for SysEmuTarget { #[inline] fn bitor_assign(&mut self, rhs: SysEmuTarget) { self.0 |= rhs.0; } } -impl ::std::ops::BitAnd for SysEmuTarget { +impl ::core::ops::BitAnd for SysEmuTarget { type Output = Self; #[inline] fn bitand(self, other: Self) -> Self { SysEmuTarget(self.0 & other.0) } } -impl ::std::ops::BitAndAssign for SysEmuTarget { +impl ::core::ops::BitAndAssign for SysEmuTarget { #[inline] fn bitand_assign(&mut self, rhs: SysEmuTarget) { self.0 &= rhs.0; @@ -3015,27 +3017,27 @@ pub const CpuS390State_S390_CPU_STATE_CHECK_STOP: CpuS390State = CpuS390State(2) pub const CpuS390State_S390_CPU_STATE_OPERATING: CpuS390State = CpuS390State(3); pub const CpuS390State_S390_CPU_STATE_LOAD: CpuS390State = CpuS390State(4); pub const CpuS390State_S390_CPU_STATE__MAX: CpuS390State = CpuS390State(5); -impl ::std::ops::BitOr for CpuS390State { +impl ::core::ops::BitOr for CpuS390State { type Output = Self; #[inline] fn bitor(self, other: Self) -> Self { CpuS390State(self.0 | other.0) } } -impl ::std::ops::BitOrAssign for CpuS390State { +impl ::core::ops::BitOrAssign for CpuS390State { #[inline] fn bitor_assign(&mut self, rhs: CpuS390State) { self.0 |= rhs.0; } } -impl ::std::ops::BitAnd for CpuS390State { +impl ::core::ops::BitAnd for CpuS390State { type Output = Self; #[inline] fn bitand(self, other: Self) -> Self { CpuS390State(self.0 & other.0) } } -impl ::std::ops::BitAndAssign for CpuS390State { +impl ::core::ops::BitAndAssign for CpuS390State { #[inline] fn bitand_assign(&mut self, rhs: CpuS390State) { self.0 &= rhs.0; @@ -3055,8 +3057,8 @@ pub struct CpuInfoS390 { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CpuInfoS390"][::std::mem::size_of::() - 12usize]; - ["Alignment of CpuInfoS390"][::std::mem::align_of::() - 4usize]; + ["Size of CpuInfoS390"][::core::mem::size_of::() - 12usize]; + ["Alignment of CpuInfoS390"][::core::mem::align_of::() - 4usize]; ["Offset of field: CpuInfoS390::cpu_state"] [::std::mem::offset_of!(CpuInfoS390, cpu_state) - 0usize]; ["Offset of field: CpuInfoS390::has_dedicated"] @@ -3070,9 +3072,9 @@ const _: () = { }; impl Default for CpuInfoS390 { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -3095,30 +3097,30 @@ pub union CpuInfoFast__bindgen_ty_1 { #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of CpuInfoFast__bindgen_ty_1"] - [::std::mem::size_of::() - 12usize]; + [::core::mem::size_of::() - 12usize]; ["Alignment of CpuInfoFast__bindgen_ty_1"] - [::std::mem::align_of::() - 4usize]; + [::core::mem::align_of::() - 4usize]; ["Offset of field: CpuInfoFast__bindgen_ty_1::s390x"] [::std::mem::offset_of!(CpuInfoFast__bindgen_ty_1, s390x) - 0usize]; }; impl Default for CpuInfoFast__bindgen_ty_1 { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for CpuInfoFast__bindgen_ty_1 { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for CpuInfoFast__bindgen_ty_1 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!(f, "CpuInfoFast__bindgen_ty_1 {{ union }}") } } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CpuInfoFast"][::std::mem::size_of::() - 48usize]; - ["Alignment of CpuInfoFast"][::std::mem::align_of::() - 8usize]; + ["Size of CpuInfoFast"][::core::mem::size_of::() - 48usize]; + ["Alignment of CpuInfoFast"][::core::mem::align_of::() - 8usize]; ["Offset of field: CpuInfoFast::cpu_index"] [::std::mem::offset_of!(CpuInfoFast, cpu_index) - 0usize]; ["Offset of field: CpuInfoFast::qom_path"] @@ -3131,15 +3133,15 @@ const _: () = { }; impl Default for CpuInfoFast { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for CpuInfoFast { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for CpuInfoFast { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!( f, "CpuInfoFast {{ qom_path: {:?}, props: {:?}, target: {:?}, u: {:?} }}", @@ -3171,9 +3173,9 @@ pub struct CpuInstanceProperties { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CpuInstanceProperties"][::std::mem::size_of::() - 144usize]; + ["Size of CpuInstanceProperties"][::core::mem::size_of::() - 144usize]; ["Alignment of CpuInstanceProperties"] - [::std::mem::align_of::() - 8usize]; + [::core::mem::align_of::() - 8usize]; ["Offset of field: CpuInstanceProperties::has_node_id"] [::std::mem::offset_of!(CpuInstanceProperties, has_node_id) - 0usize]; ["Offset of field: CpuInstanceProperties::node_id"] @@ -3223,27 +3225,27 @@ pub const ShutdownCause_SHUTDOWN_CAUSE_GUEST_PANIC: ShutdownCause = ShutdownCaus pub const ShutdownCause_SHUTDOWN_CAUSE_SUBSYSTEM_RESET: ShutdownCause = ShutdownCause(9); pub const ShutdownCause_SHUTDOWN_CAUSE_SNAPSHOT_LOAD: ShutdownCause = ShutdownCause(10); pub const ShutdownCause_SHUTDOWN_CAUSE__MAX: ShutdownCause = ShutdownCause(11); -impl ::std::ops::BitOr for ShutdownCause { +impl ::core::ops::BitOr for ShutdownCause { type Output = Self; #[inline] fn bitor(self, other: Self) -> Self { ShutdownCause(self.0 | other.0) } } -impl ::std::ops::BitOrAssign for ShutdownCause { +impl ::core::ops::BitOrAssign for ShutdownCause { #[inline] fn bitor_assign(&mut self, rhs: ShutdownCause) { self.0 |= rhs.0; } } -impl ::std::ops::BitAnd for ShutdownCause { +impl ::core::ops::BitAnd for ShutdownCause { type Output = Self; #[inline] fn bitand(self, other: Self) -> Self { ShutdownCause(self.0 & other.0) } } -impl ::std::ops::BitAndAssign for ShutdownCause { +impl ::core::ops::BitAndAssign for ShutdownCause { #[inline] fn bitand_assign(&mut self, rhs: ShutdownCause) { self.0 &= rhs.0; @@ -3272,21 +3274,21 @@ pub struct SysemuCPUOps { #[derive(Debug, Copy, Clone)] pub struct CPUClass { pub parent_class: DeviceClass, - pub class_by_name: ::std::option::Option< + pub class_by_name: ::core::option::Option< unsafe extern "C" fn(cpu_model: *const ::std::os::raw::c_char) -> *mut ObjectClass, >, - pub parse_features: ::std::option::Option< + pub parse_features: ::core::option::Option< unsafe extern "C" fn( typename: *const ::std::os::raw::c_char, str_: *mut ::std::os::raw::c_char, errp: *mut *mut Error, ), >, - pub has_work: ::std::option::Option bool>, - pub mmu_index: ::std::option::Option< + pub has_work: ::core::option::Option bool>, + pub mmu_index: ::core::option::Option< unsafe extern "C" fn(cpu: *mut CPUState, ifetch: bool) -> ::std::os::raw::c_int, >, - pub memory_rw_debug: ::std::option::Option< + pub memory_rw_debug: ::core::option::Option< unsafe extern "C" fn( cpu: *mut CPUState, addr: vaddr, @@ -3295,22 +3297,22 @@ pub struct CPUClass { is_write: bool, ) -> ::std::os::raw::c_int, >, - pub dump_state: ::std::option::Option< + pub dump_state: ::core::option::Option< unsafe extern "C" fn(cpu: *mut CPUState, arg1: *mut FILE, flags: ::std::os::raw::c_int), >, pub query_cpu_fast: - ::std::option::Option, - pub get_arch_id: ::std::option::Option i64>, - pub set_pc: ::std::option::Option, - pub get_pc: ::std::option::Option vaddr>, - pub gdb_read_register: ::std::option::Option< + ::core::option::Option, + pub get_arch_id: ::core::option::Option i64>, + pub set_pc: ::core::option::Option, + pub get_pc: ::core::option::Option vaddr>, + pub gdb_read_register: ::core::option::Option< unsafe extern "C" fn( cpu: *mut CPUState, buf: *mut GByteArray, reg: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int, >, - pub gdb_write_register: ::std::option::Option< + pub gdb_write_register: ::core::option::Option< unsafe extern "C" fn( cpu: *mut CPUState, buf: *mut u8, @@ -3318,18 +3320,18 @@ pub struct CPUClass { ) -> ::std::os::raw::c_int, >, pub gdb_adjust_breakpoint: - ::std::option::Option vaddr>, + ::core::option::Option vaddr>, pub gdb_core_xml_file: *const ::std::os::raw::c_char, pub gdb_arch_name: - ::std::option::Option *const gchar>, - pub disas_set_info: ::std::option::Option< + ::core::option::Option *const gchar>, + pub disas_set_info: ::core::option::Option< unsafe extern "C" fn(cpu: *mut CPUState, info: *mut disassemble_info), >, pub deprecation_note: *const ::std::os::raw::c_char, pub accel_cpu: *mut AccelCPUClass, pub sysemu_ops: *const SysemuCPUOps, pub tcg_ops: *const TCGCPUOps, - pub init_accel_cpu: ::std::option::Option< + pub init_accel_cpu: ::core::option::Option< unsafe extern "C" fn(accel_cpu: *mut AccelCPUClass, cc: *mut CPUClass), >, pub reset_dump_flags: ::std::os::raw::c_int, @@ -3338,8 +3340,8 @@ pub struct CPUClass { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUClass"][::std::mem::size_of::() - 360usize]; - ["Alignment of CPUClass"][::std::mem::align_of::() - 8usize]; + ["Size of CPUClass"][::core::mem::size_of::() - 360usize]; + ["Alignment of CPUClass"][::core::mem::align_of::() - 8usize]; ["Offset of field: CPUClass::parent_class"] [::std::mem::offset_of!(CPUClass, parent_class) - 0usize]; ["Offset of field: CPUClass::class_by_name"] @@ -3389,9 +3391,9 @@ const _: () = { }; impl Default for CPUClass { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -3423,9 +3425,9 @@ pub struct CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1 { #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1"] - [::std::mem::size_of::() - 3usize]; + [::core::mem::size_of::() - 3usize]; ["Alignment of CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1"] - [::std::mem::align_of::() - 1usize]; + [::core::mem::align_of::() - 1usize]; ["Offset of field: CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1::pte_attrs"] [::std::mem::offset_of!(CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1, pte_attrs) - 0usize]; ["Offset of field: CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1::shareability"][::std::mem::offset_of!( @@ -3438,30 +3440,30 @@ const _: () = { #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of CPUTLBEntryFull__bindgen_ty_1"] - [::std::mem::size_of::() - 3usize]; + [::core::mem::size_of::() - 3usize]; ["Alignment of CPUTLBEntryFull__bindgen_ty_1"] - [::std::mem::align_of::() - 1usize]; + [::core::mem::align_of::() - 1usize]; ["Offset of field: CPUTLBEntryFull__bindgen_ty_1::arm"] [::std::mem::offset_of!(CPUTLBEntryFull__bindgen_ty_1, arm) - 0usize]; }; impl Default for CPUTLBEntryFull__bindgen_ty_1 { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for CPUTLBEntryFull__bindgen_ty_1 { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for CPUTLBEntryFull__bindgen_ty_1 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!(f, "CPUTLBEntryFull__bindgen_ty_1 {{ union }}") } } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUTLBEntryFull"][::std::mem::size_of::() - 32usize]; - ["Alignment of CPUTLBEntryFull"][::std::mem::align_of::() - 8usize]; + ["Size of CPUTLBEntryFull"][::core::mem::size_of::() - 32usize]; + ["Alignment of CPUTLBEntryFull"][::core::mem::align_of::() - 8usize]; ["Offset of field: CPUTLBEntryFull::xlat_section"] [::std::mem::offset_of!(CPUTLBEntryFull, xlat_section) - 0usize]; ["Offset of field: CPUTLBEntryFull::phys_addr"] @@ -3481,15 +3483,15 @@ const _: () = { }; impl Default for CPUTLBEntryFull { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for CPUTLBEntryFull { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for CPUTLBEntryFull { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!( f, "CPUTLBEntryFull {{ attrs: {:?}, slow_flags: {:?}, extra: {:?} }}", @@ -3512,8 +3514,8 @@ pub struct CPUTLBDesc { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUTLBDesc"][::std::mem::size_of::() - 568usize]; - ["Alignment of CPUTLBDesc"][::std::mem::align_of::() - 8usize]; + ["Size of CPUTLBDesc"][::core::mem::size_of::() - 568usize]; + ["Alignment of CPUTLBDesc"][::core::mem::align_of::() - 8usize]; ["Offset of field: CPUTLBDesc::large_page_addr"] [::std::mem::offset_of!(CPUTLBDesc, large_page_addr) - 0usize]; ["Offset of field: CPUTLBDesc::large_page_mask"] @@ -3533,15 +3535,15 @@ const _: () = { }; impl Default for CPUTLBDesc { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for CPUTLBDesc { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for CPUTLBDesc { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!( f, "CPUTLBDesc {{ vtable: {:?}, vfulltlb: {:?}, fulltlb: {:?} }}", @@ -3560,8 +3562,8 @@ pub struct CPUTLBCommon { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUTLBCommon"][::std::mem::size_of::() - 32usize]; - ["Alignment of CPUTLBCommon"][::std::mem::align_of::() - 8usize]; + ["Size of CPUTLBCommon"][::core::mem::size_of::() - 32usize]; + ["Alignment of CPUTLBCommon"][::core::mem::align_of::() - 8usize]; ["Offset of field: CPUTLBCommon::lock"][::std::mem::offset_of!(CPUTLBCommon, lock) - 0usize]; ["Offset of field: CPUTLBCommon::dirty"][::std::mem::offset_of!(CPUTLBCommon, dirty) - 4usize]; ["Offset of field: CPUTLBCommon::full_flush_count"] @@ -3581,23 +3583,23 @@ pub struct CPUTLB { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUTLB"][::std::mem::size_of::() - 9376usize]; - ["Alignment of CPUTLB"][::std::mem::align_of::() - 16usize]; + ["Size of CPUTLB"][::core::mem::size_of::() - 9376usize]; + ["Alignment of CPUTLB"][::core::mem::align_of::() - 16usize]; ["Offset of field: CPUTLB::c"][::std::mem::offset_of!(CPUTLB, c) - 0usize]; ["Offset of field: CPUTLB::d"][::std::mem::offset_of!(CPUTLB, d) - 32usize]; ["Offset of field: CPUTLB::f"][::std::mem::offset_of!(CPUTLB, f) - 9120usize]; }; impl Default for CPUTLB { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for CPUTLB { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for CPUTLB { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!( f, "CPUTLB {{ c: {:?}, d: {:?}, f: {:?} }}", @@ -3620,9 +3622,9 @@ pub struct IcountDecr__bindgen_ty_1 { #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of IcountDecr__bindgen_ty_1"] - [::std::mem::size_of::() - 4usize]; + [::core::mem::size_of::() - 4usize]; ["Alignment of IcountDecr__bindgen_ty_1"] - [::std::mem::align_of::() - 2usize]; + [::core::mem::align_of::() - 2usize]; ["Offset of field: IcountDecr__bindgen_ty_1::low"] [::std::mem::offset_of!(IcountDecr__bindgen_ty_1, low) - 0usize]; ["Offset of field: IcountDecr__bindgen_ty_1::high"] @@ -3630,22 +3632,22 @@ const _: () = { }; #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of IcountDecr"][::std::mem::size_of::() - 4usize]; - ["Alignment of IcountDecr"][::std::mem::align_of::() - 4usize]; + ["Size of IcountDecr"][::core::mem::size_of::() - 4usize]; + ["Alignment of IcountDecr"][::core::mem::align_of::() - 4usize]; ["Offset of field: IcountDecr::u32_"][::std::mem::offset_of!(IcountDecr, u32_) - 0usize]; ["Offset of field: IcountDecr::u16_"][::std::mem::offset_of!(IcountDecr, u16_) - 0usize]; }; impl Default for IcountDecr { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for IcountDecr { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for IcountDecr { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!(f, "IcountDecr {{ union }}") } } @@ -3661,9 +3663,10 @@ pub struct CPUNegativeOffsetState { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUNegativeOffsetState"][::std::mem::size_of::() - 9392usize]; + ["Size of CPUNegativeOffsetState"] + [::core::mem::size_of::() - 9392usize]; ["Alignment of CPUNegativeOffsetState"] - [::std::mem::align_of::() - 16usize]; + [::core::mem::align_of::() - 16usize]; ["Offset of field: CPUNegativeOffsetState::tlb"] [::std::mem::offset_of!(CPUNegativeOffsetState, tlb) - 0usize]; ["Offset of field: CPUNegativeOffsetState::plugin_mem_cbs"] @@ -3675,15 +3678,15 @@ const _: () = { }; impl Default for CPUNegativeOffsetState { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for CPUNegativeOffsetState { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for CPUNegativeOffsetState { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!( f, "CPUNegativeOffsetState {{ tlb: {:?}, plugin_mem_cbs: {:?}, icount_decr: {:?}, can_do_io: {:?} }}", @@ -3785,9 +3788,9 @@ pub struct CPUState__bindgen_ty_1 { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUState__bindgen_ty_1"][::std::mem::size_of::() - 16usize]; + ["Size of CPUState__bindgen_ty_1"][::core::mem::size_of::() - 16usize]; ["Alignment of CPUState__bindgen_ty_1"] - [::std::mem::align_of::() - 8usize]; + [::core::mem::align_of::() - 8usize]; ["Offset of field: CPUState__bindgen_ty_1::sqh_first"] [::std::mem::offset_of!(CPUState__bindgen_ty_1, sqh_first) - 0usize]; ["Offset of field: CPUState__bindgen_ty_1::sqh_last"] @@ -3795,9 +3798,9 @@ const _: () = { }; impl Default for CPUState__bindgen_ty_1 { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -3810,9 +3813,9 @@ pub union CPUState__bindgen_ty_2 { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUState__bindgen_ty_2"][::std::mem::size_of::() - 16usize]; + ["Size of CPUState__bindgen_ty_2"][::core::mem::size_of::() - 16usize]; ["Alignment of CPUState__bindgen_ty_2"] - [::std::mem::align_of::() - 8usize]; + [::core::mem::align_of::() - 8usize]; ["Offset of field: CPUState__bindgen_ty_2::tqe_next"] [::std::mem::offset_of!(CPUState__bindgen_ty_2, tqe_next) - 0usize]; ["Offset of field: CPUState__bindgen_ty_2::tqe_circ"] @@ -3820,15 +3823,15 @@ const _: () = { }; impl Default for CPUState__bindgen_ty_2 { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for CPUState__bindgen_ty_2 { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for CPUState__bindgen_ty_2 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!(f, "CPUState__bindgen_ty_2 {{ union }}") } } @@ -3840,9 +3843,9 @@ pub union CPUState__bindgen_ty_3 { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUState__bindgen_ty_3"][::std::mem::size_of::() - 16usize]; + ["Size of CPUState__bindgen_ty_3"][::core::mem::size_of::() - 16usize]; ["Alignment of CPUState__bindgen_ty_3"] - [::std::mem::align_of::() - 8usize]; + [::core::mem::align_of::() - 8usize]; ["Offset of field: CPUState__bindgen_ty_3::tqh_first"] [::std::mem::offset_of!(CPUState__bindgen_ty_3, tqh_first) - 0usize]; ["Offset of field: CPUState__bindgen_ty_3::tqh_circ"] @@ -3850,15 +3853,15 @@ const _: () = { }; impl Default for CPUState__bindgen_ty_3 { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for CPUState__bindgen_ty_3 { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for CPUState__bindgen_ty_3 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!(f, "CPUState__bindgen_ty_3 {{ union }}") } } @@ -3870,9 +3873,9 @@ pub union CPUState__bindgen_ty_4 { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUState__bindgen_ty_4"][::std::mem::size_of::() - 16usize]; + ["Size of CPUState__bindgen_ty_4"][::core::mem::size_of::() - 16usize]; ["Alignment of CPUState__bindgen_ty_4"] - [::std::mem::align_of::() - 8usize]; + [::core::mem::align_of::() - 8usize]; ["Offset of field: CPUState__bindgen_ty_4::tqh_first"] [::std::mem::offset_of!(CPUState__bindgen_ty_4, tqh_first) - 0usize]; ["Offset of field: CPUState__bindgen_ty_4::tqh_circ"] @@ -3880,22 +3883,22 @@ const _: () = { }; impl Default for CPUState__bindgen_ty_4 { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for CPUState__bindgen_ty_4 { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for CPUState__bindgen_ty_4 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!(f, "CPUState__bindgen_ty_4 {{ union }}") } } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUState"][::std::mem::size_of::() - 10176usize]; - ["Alignment of CPUState"][::std::mem::align_of::() - 16usize]; + ["Size of CPUState"][::core::mem::size_of::() - 10176usize]; + ["Alignment of CPUState"][::core::mem::align_of::() - 16usize]; ["Offset of field: CPUState::parent_obj"] [::std::mem::offset_of!(CPUState, parent_obj) - 0usize]; ["Offset of field: CPUState::cc"][::std::mem::offset_of!(CPUState, cc) - 160usize]; @@ -4008,15 +4011,15 @@ const _: () = { }; impl Default for CPUState { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for CPUState { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for CPUState { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!( f, "CPUState {{ parent_obj: {:?}, cc: {:?}, nr_cores: {:?}, nr_threads: {:?}, thread: {:?}, thread_id: {:?}, running: {:?}, has_waiter: {:?}, halt_cond: {:?}, thread_kicked: {:?}, created: {:?}, stop: {:?}, stopped: {:?}, start_powered_off: {:?}, unplug: {:?}, crash_occurred: {:?}, exit_request: {:?}, exclusive_context_count: {:?}, singlestep_enabled: {:?}, jmp_env: {:?}, work_mutex: {:?}, work_list: {:?}, cpu_ases: {:?}, cpu_ases_count: {:?}, num_ases: {:?}, as: {:?}, memory: {:?}, tb_jmp_cache: {:?}, gdb_regs: {:?}, gdb_num_regs: {:?}, gdb_num_g_regs: {:?}, node: {:?}, breakpoints: {:?}, watchpoints: {:?}, watchpoint_hit: {:?}, opaque: {:?}, kvm_fd: {:?}, kvm_state: {:?}, kvm_run: {:?}, kvm_dirty_gfns: {:?}, kvm_vcpu_stats_fd: {:?}, vcpu_dirty: {:?}, in_ioctl_lock: {:?}, plugin_state: {:?}, cpu_index: {:?}, cluster_index: {:?}, accel: {:?}, throttle_thread_scheduled: {:?}, ignore_memory_transaction_failures: {:?}, prctl_unalign_sigbus: {:?}, iommu_notifiers: {:?}, neg_align: {:?}, neg: {:?} }}", @@ -4106,9 +4109,9 @@ pub union Property__bindgen_ty_1 { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of Property__bindgen_ty_1"][::std::mem::size_of::() - 8usize]; + ["Size of Property__bindgen_ty_1"][::core::mem::size_of::() - 8usize]; ["Alignment of Property__bindgen_ty_1"] - [::std::mem::align_of::() - 8usize]; + [::core::mem::align_of::() - 8usize]; ["Offset of field: Property__bindgen_ty_1::i"] [::std::mem::offset_of!(Property__bindgen_ty_1, i) - 0usize]; ["Offset of field: Property__bindgen_ty_1::u"] @@ -4116,22 +4119,22 @@ const _: () = { }; impl Default for Property__bindgen_ty_1 { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for Property__bindgen_ty_1 { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for Property__bindgen_ty_1 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!(f, "Property__bindgen_ty_1 {{ union }}") } } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of Property"][::std::mem::size_of::() - 88usize]; - ["Alignment of Property"][::std::mem::align_of::() - 8usize]; + ["Size of Property"][::core::mem::size_of::() - 88usize]; + ["Alignment of Property"][::core::mem::align_of::() - 8usize]; ["Offset of field: Property::name"][::std::mem::offset_of!(Property, name) - 0usize]; ["Offset of field: Property::info"][::std::mem::offset_of!(Property, info) - 8usize]; ["Offset of field: Property::offset"][::std::mem::offset_of!(Property, offset) - 16usize]; @@ -4149,15 +4152,15 @@ const _: () = { }; impl Default for Property { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for Property { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for Property { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!( f, "Property {{ name: {:?}, info: {:?}, set_default: {:?}, defval: {:?}, arrayoffset: {:?}, arrayinfo: {:?}, arrayfieldsize: {:?}, link_type: {:?} }}", @@ -4179,7 +4182,7 @@ pub struct PropertyInfo { pub description: *const ::std::os::raw::c_char, pub enum_table: *const QEnumLookup, pub realized_set_allowed: bool, - pub print: ::std::option::Option< + pub print: ::core::option::Option< unsafe extern "C" fn( obj: *mut Object, prop: *mut Property, @@ -4187,9 +4190,10 @@ pub struct PropertyInfo { len: usize, ) -> ::std::os::raw::c_int, >, - pub set_default_value: - ::std::option::Option, - pub create: ::std::option::Option< + pub set_default_value: ::core::option::Option< + unsafe extern "C" fn(op: *mut ObjectProperty, prop: *const Property), + >, + pub create: ::core::option::Option< unsafe extern "C" fn( oc: *mut ObjectClass, name: *const ::std::os::raw::c_char, @@ -4202,8 +4206,8 @@ pub struct PropertyInfo { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of PropertyInfo"][::std::mem::size_of::() - 80usize]; - ["Alignment of PropertyInfo"][::std::mem::align_of::() - 8usize]; + ["Size of PropertyInfo"][::core::mem::size_of::() - 80usize]; + ["Alignment of PropertyInfo"][::core::mem::align_of::() - 8usize]; ["Offset of field: PropertyInfo::name"][::std::mem::offset_of!(PropertyInfo, name) - 0usize]; ["Offset of field: PropertyInfo::description"] [::std::mem::offset_of!(PropertyInfo, description) - 8usize]; @@ -4223,9 +4227,9 @@ const _: () = { }; impl Default for PropertyInfo { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -4239,27 +4243,27 @@ pub const CPUTopoLevel_CPU_TOPO_LEVEL_MODULE: CPUTopoLevel = CPUTopoLevel(3); pub const CPUTopoLevel_CPU_TOPO_LEVEL_DIE: CPUTopoLevel = CPUTopoLevel(4); pub const CPUTopoLevel_CPU_TOPO_LEVEL_PACKAGE: CPUTopoLevel = CPUTopoLevel(5); pub const CPUTopoLevel_CPU_TOPO_LEVEL_MAX: CPUTopoLevel = CPUTopoLevel(6); -impl ::std::ops::BitOr for CPUTopoLevel { +impl ::core::ops::BitOr for CPUTopoLevel { type Output = Self; #[inline] fn bitor(self, other: Self) -> Self { CPUTopoLevel(self.0 | other.0) } } -impl ::std::ops::BitOrAssign for CPUTopoLevel { +impl ::core::ops::BitOrAssign for CPUTopoLevel { #[inline] fn bitor_assign(&mut self, rhs: CPUTopoLevel) { self.0 |= rhs.0; } } -impl ::std::ops::BitAnd for CPUTopoLevel { +impl ::core::ops::BitAnd for CPUTopoLevel { type Output = Self; #[inline] fn bitand(self, other: Self) -> Self { CPUTopoLevel(self.0 & other.0) } } -impl ::std::ops::BitAndAssign for CPUTopoLevel { +impl ::core::ops::BitAndAssign for CPUTopoLevel { #[inline] fn bitand_assign(&mut self, rhs: CPUTopoLevel) { self.0 &= rhs.0; @@ -4279,8 +4283,8 @@ pub struct floatx80 { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of floatx80"][::std::mem::size_of::() - 16usize]; - ["Alignment of floatx80"][::std::mem::align_of::() - 8usize]; + ["Size of floatx80"][::core::mem::size_of::() - 16usize]; + ["Alignment of floatx80"][::core::mem::align_of::() - 8usize]; ["Offset of field: floatx80::low"][::std::mem::offset_of!(floatx80, low) - 0usize]; ["Offset of field: floatx80::high"][::std::mem::offset_of!(floatx80, high) - 8usize]; }; @@ -4291,27 +4295,27 @@ pub const FloatRoundMode_float_round_to_zero: FloatRoundMode = FloatRoundMode(3) pub const FloatRoundMode_float_round_ties_away: FloatRoundMode = FloatRoundMode(4); pub const FloatRoundMode_float_round_to_odd: FloatRoundMode = FloatRoundMode(5); pub const FloatRoundMode_float_round_to_odd_inf: FloatRoundMode = FloatRoundMode(6); -impl ::std::ops::BitOr for FloatRoundMode { +impl ::core::ops::BitOr for FloatRoundMode { type Output = Self; #[inline] fn bitor(self, other: Self) -> Self { FloatRoundMode(self.0 | other.0) } } -impl ::std::ops::BitOrAssign for FloatRoundMode { +impl ::core::ops::BitOrAssign for FloatRoundMode { #[inline] fn bitor_assign(&mut self, rhs: FloatRoundMode) { self.0 |= rhs.0; } } -impl ::std::ops::BitAnd for FloatRoundMode { +impl ::core::ops::BitAnd for FloatRoundMode { type Output = Self; #[inline] fn bitand(self, other: Self) -> Self { FloatRoundMode(self.0 & other.0) } } -impl ::std::ops::BitAndAssign for FloatRoundMode { +impl ::core::ops::BitAndAssign for FloatRoundMode { #[inline] fn bitand_assign(&mut self, rhs: FloatRoundMode) { self.0 &= rhs.0; @@ -4323,27 +4327,27 @@ pub struct FloatRoundMode(pub ::std::os::raw::c_uchar); pub const FloatX80RoundPrec_floatx80_precision_x: FloatX80RoundPrec = FloatX80RoundPrec(0); pub const FloatX80RoundPrec_floatx80_precision_d: FloatX80RoundPrec = FloatX80RoundPrec(1); pub const FloatX80RoundPrec_floatx80_precision_s: FloatX80RoundPrec = FloatX80RoundPrec(2); -impl ::std::ops::BitOr for FloatX80RoundPrec { +impl ::core::ops::BitOr for FloatX80RoundPrec { type Output = Self; #[inline] fn bitor(self, other: Self) -> Self { FloatX80RoundPrec(self.0 | other.0) } } -impl ::std::ops::BitOrAssign for FloatX80RoundPrec { +impl ::core::ops::BitOrAssign for FloatX80RoundPrec { #[inline] fn bitor_assign(&mut self, rhs: FloatX80RoundPrec) { self.0 |= rhs.0; } } -impl ::std::ops::BitAnd for FloatX80RoundPrec { +impl ::core::ops::BitAnd for FloatX80RoundPrec { type Output = Self; #[inline] fn bitand(self, other: Self) -> Self { FloatX80RoundPrec(self.0 & other.0) } } -impl ::std::ops::BitAndAssign for FloatX80RoundPrec { +impl ::core::ops::BitAndAssign for FloatX80RoundPrec { #[inline] fn bitand_assign(&mut self, rhs: FloatX80RoundPrec) { self.0 &= rhs.0; @@ -4370,8 +4374,8 @@ pub struct float_status { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of float_status"][::std::mem::size_of::() - 14usize]; - ["Alignment of float_status"][::std::mem::align_of::() - 2usize]; + ["Size of float_status"][::core::mem::size_of::() - 14usize]; + ["Alignment of float_status"][::core::mem::align_of::() - 2usize]; ["Offset of field: float_status::float_exception_flags"] [::std::mem::offset_of!(float_status, float_exception_flags) - 0usize]; ["Offset of field: float_status::float_rounding_mode"] @@ -4399,9 +4403,9 @@ const _: () = { }; impl Default for float_status { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -4417,8 +4421,8 @@ pub struct SegmentCache { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of SegmentCache"][::std::mem::size_of::() - 24usize]; - ["Alignment of SegmentCache"][::std::mem::align_of::() - 8usize]; + ["Size of SegmentCache"][::core::mem::size_of::() - 24usize]; + ["Alignment of SegmentCache"][::core::mem::align_of::() - 8usize]; ["Offset of field: SegmentCache::selector"] [::std::mem::offset_of!(SegmentCache, selector) - 0usize]; ["Offset of field: SegmentCache::base"][::std::mem::offset_of!(SegmentCache, base) - 8usize]; @@ -4437,8 +4441,8 @@ pub union MMXReg { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of MMXReg"][::std::mem::size_of::() - 8usize]; - ["Alignment of MMXReg"][::std::mem::align_of::() - 8usize]; + ["Size of MMXReg"][::core::mem::size_of::() - 8usize]; + ["Alignment of MMXReg"][::core::mem::align_of::() - 8usize]; ["Offset of field: MMXReg::_b_MMXReg"][::std::mem::offset_of!(MMXReg, _b_MMXReg) - 0usize]; ["Offset of field: MMXReg::_w_MMXReg"][::std::mem::offset_of!(MMXReg, _w_MMXReg) - 0usize]; ["Offset of field: MMXReg::_l_MMXReg"][::std::mem::offset_of!(MMXReg, _l_MMXReg) - 0usize]; @@ -4448,15 +4452,15 @@ const _: () = { }; impl Default for MMXReg { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for MMXReg { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for MMXReg { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!(f, "MMXReg {{ union }}") } } @@ -4467,21 +4471,21 @@ pub union XMMReg { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of XMMReg"][::std::mem::size_of::() - 16usize]; - ["Alignment of XMMReg"][::std::mem::align_of::() - 8usize]; + ["Size of XMMReg"][::core::mem::size_of::() - 16usize]; + ["Alignment of XMMReg"][::core::mem::align_of::() - 8usize]; ["Offset of field: XMMReg::_q_XMMReg"][::std::mem::offset_of!(XMMReg, _q_XMMReg) - 0usize]; }; impl Default for XMMReg { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for XMMReg { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for XMMReg { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!(f, "XMMReg {{ union }}") } } @@ -4493,22 +4497,22 @@ pub union YMMReg { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of YMMReg"][::std::mem::size_of::() - 32usize]; - ["Alignment of YMMReg"][::std::mem::align_of::() - 8usize]; + ["Size of YMMReg"][::core::mem::size_of::() - 32usize]; + ["Alignment of YMMReg"][::core::mem::align_of::() - 8usize]; ["Offset of field: YMMReg::_q_YMMReg"][::std::mem::offset_of!(YMMReg, _q_YMMReg) - 0usize]; ["Offset of field: YMMReg::_x_YMMReg"][::std::mem::offset_of!(YMMReg, _x_YMMReg) - 0usize]; }; impl Default for YMMReg { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for YMMReg { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for YMMReg { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!(f, "YMMReg {{ union }}") } } @@ -4527,8 +4531,8 @@ pub union ZMMReg { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of ZMMReg"][::std::mem::size_of::() - 64usize]; - ["Alignment of ZMMReg"][::std::mem::align_of::() - 8usize]; + ["Size of ZMMReg"][::core::mem::size_of::() - 64usize]; + ["Alignment of ZMMReg"][::core::mem::align_of::() - 8usize]; ["Offset of field: ZMMReg::_b_ZMMReg"][::std::mem::offset_of!(ZMMReg, _b_ZMMReg) - 0usize]; ["Offset of field: ZMMReg::_w_ZMMReg"][::std::mem::offset_of!(ZMMReg, _w_ZMMReg) - 0usize]; ["Offset of field: ZMMReg::_l_ZMMReg"][::std::mem::offset_of!(ZMMReg, _l_ZMMReg) - 0usize]; @@ -4541,15 +4545,15 @@ const _: () = { }; impl Default for ZMMReg { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for ZMMReg { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for ZMMReg { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!(f, "ZMMReg {{ union }}") } } @@ -4561,8 +4565,8 @@ pub struct BNDReg { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of BNDReg"][::std::mem::size_of::() - 16usize]; - ["Alignment of BNDReg"][::std::mem::align_of::() - 8usize]; + ["Size of BNDReg"][::core::mem::size_of::() - 16usize]; + ["Alignment of BNDReg"][::core::mem::align_of::() - 8usize]; ["Offset of field: BNDReg::lb"][::std::mem::offset_of!(BNDReg, lb) - 0usize]; ["Offset of field: BNDReg::ub"][::std::mem::offset_of!(BNDReg, ub) - 8usize]; }; @@ -4574,8 +4578,8 @@ pub struct BNDCSReg { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of BNDCSReg"][::std::mem::size_of::() - 16usize]; - ["Alignment of BNDCSReg"][::std::mem::align_of::() - 8usize]; + ["Size of BNDCSReg"][::core::mem::size_of::() - 16usize]; + ["Alignment of BNDCSReg"][::core::mem::align_of::() - 8usize]; ["Offset of field: BNDCSReg::cfgu"][::std::mem::offset_of!(BNDCSReg, cfgu) - 0usize]; ["Offset of field: BNDCSReg::sts"][::std::mem::offset_of!(BNDCSReg, sts) - 8usize]; }; @@ -4588,22 +4592,22 @@ pub union FPReg { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of FPReg"][::std::mem::size_of::() - 16usize]; - ["Alignment of FPReg"][::std::mem::align_of::() - 16usize]; + ["Size of FPReg"][::core::mem::size_of::() - 16usize]; + ["Alignment of FPReg"][::core::mem::align_of::() - 16usize]; ["Offset of field: FPReg::d"][::std::mem::offset_of!(FPReg, d) - 0usize]; ["Offset of field: FPReg::mmx"][::std::mem::offset_of!(FPReg, mmx) - 0usize]; }; impl Default for FPReg { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for FPReg { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for FPReg { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!(f, "FPReg {{ union }}") } } @@ -4615,8 +4619,8 @@ pub struct MTRRVar { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of MTRRVar"][::std::mem::size_of::() - 16usize]; - ["Alignment of MTRRVar"][::std::mem::align_of::() - 8usize]; + ["Size of MTRRVar"][::core::mem::size_of::() - 16usize]; + ["Alignment of MTRRVar"][::core::mem::align_of::() - 8usize]; ["Offset of field: MTRRVar::base"][::std::mem::offset_of!(MTRRVar, base) - 0usize]; ["Offset of field: MTRRVar::mask"][::std::mem::offset_of!(MTRRVar, mask) - 8usize]; }; @@ -4629,35 +4633,35 @@ pub struct LBREntry { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of LBREntry"][::std::mem::size_of::() - 24usize]; - ["Alignment of LBREntry"][::std::mem::align_of::() - 8usize]; + ["Size of LBREntry"][::core::mem::size_of::() - 24usize]; + ["Alignment of LBREntry"][::core::mem::align_of::() - 8usize]; ["Offset of field: LBREntry::from"][::std::mem::offset_of!(LBREntry, from) - 0usize]; ["Offset of field: LBREntry::to"][::std::mem::offset_of!(LBREntry, to) - 8usize]; ["Offset of field: LBREntry::info"][::std::mem::offset_of!(LBREntry, info) - 16usize]; }; pub const TPRAccess_TPR_ACCESS_READ: TPRAccess = TPRAccess(0); pub const TPRAccess_TPR_ACCESS_WRITE: TPRAccess = TPRAccess(1); -impl ::std::ops::BitOr for TPRAccess { +impl ::core::ops::BitOr for TPRAccess { type Output = Self; #[inline] fn bitor(self, other: Self) -> Self { TPRAccess(self.0 | other.0) } } -impl ::std::ops::BitOrAssign for TPRAccess { +impl ::core::ops::BitOrAssign for TPRAccess { #[inline] fn bitor_assign(&mut self, rhs: TPRAccess) { self.0 |= rhs.0; } } -impl ::std::ops::BitAnd for TPRAccess { +impl ::core::ops::BitAnd for TPRAccess { type Output = Self; #[inline] fn bitand(self, other: Self) -> Self { TPRAccess(self.0 & other.0) } } -impl ::std::ops::BitAndAssign for TPRAccess { +impl ::core::ops::BitAndAssign for TPRAccess { #[inline] fn bitand_assign(&mut self, rhs: TPRAccess) { self.0 &= rhs.0; @@ -4669,27 +4673,27 @@ pub struct TPRAccess(pub ::std::os::raw::c_uint); pub const CacheType_DATA_CACHE: CacheType = CacheType(0); pub const CacheType_INSTRUCTION_CACHE: CacheType = CacheType(1); pub const CacheType_UNIFIED_CACHE: CacheType = CacheType(2); -impl ::std::ops::BitOr for CacheType { +impl ::core::ops::BitOr for CacheType { type Output = Self; #[inline] fn bitor(self, other: Self) -> Self { CacheType(self.0 | other.0) } } -impl ::std::ops::BitOrAssign for CacheType { +impl ::core::ops::BitOrAssign for CacheType { #[inline] fn bitor_assign(&mut self, rhs: CacheType) { self.0 |= rhs.0; } } -impl ::std::ops::BitAnd for CacheType { +impl ::core::ops::BitAnd for CacheType { type Output = Self; #[inline] fn bitand(self, other: Self) -> Self { CacheType(self.0 & other.0) } } -impl ::std::ops::BitAndAssign for CacheType { +impl ::core::ops::BitAndAssign for CacheType { #[inline] fn bitand_assign(&mut self, rhs: CacheType) { self.0 &= rhs.0; @@ -4717,8 +4721,8 @@ pub struct CPUCacheInfo { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUCacheInfo"][::std::mem::size_of::() - 32usize]; - ["Alignment of CPUCacheInfo"][::std::mem::align_of::() - 4usize]; + ["Size of CPUCacheInfo"][::core::mem::size_of::() - 32usize]; + ["Alignment of CPUCacheInfo"][::core::mem::align_of::() - 4usize]; ["Offset of field: CPUCacheInfo::type_"][::std::mem::offset_of!(CPUCacheInfo, type_) - 0usize]; ["Offset of field: CPUCacheInfo::level"][::std::mem::offset_of!(CPUCacheInfo, level) - 4usize]; ["Offset of field: CPUCacheInfo::size"][::std::mem::offset_of!(CPUCacheInfo, size) - 8usize]; @@ -4744,9 +4748,9 @@ const _: () = { }; impl Default for CPUCacheInfo { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -4761,8 +4765,8 @@ pub struct CPUCaches { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUCaches"][::std::mem::size_of::() - 32usize]; - ["Alignment of CPUCaches"][::std::mem::align_of::() - 8usize]; + ["Size of CPUCaches"][::core::mem::size_of::() - 32usize]; + ["Alignment of CPUCaches"][::core::mem::align_of::() - 8usize]; ["Offset of field: CPUCaches::l1d_cache"] [::std::mem::offset_of!(CPUCaches, l1d_cache) - 0usize]; ["Offset of field: CPUCaches::l1i_cache"] @@ -4772,9 +4776,9 @@ const _: () = { }; impl Default for CPUCaches { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -4997,9 +5001,9 @@ pub struct CPUArchState__bindgen_ty_1 {} #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of CPUArchState__bindgen_ty_1"] - [::std::mem::size_of::() - 0usize]; + [::core::mem::size_of::() - 0usize]; ["Alignment of CPUArchState__bindgen_ty_1"] - [::std::mem::align_of::() - 1usize]; + [::core::mem::align_of::() - 1usize]; }; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] @@ -5007,9 +5011,9 @@ pub struct CPUArchState__bindgen_ty_2 {} #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of CPUArchState__bindgen_ty_2"] - [::std::mem::size_of::() - 0usize]; + [::core::mem::size_of::() - 0usize]; ["Alignment of CPUArchState__bindgen_ty_2"] - [::std::mem::align_of::() - 1usize]; + [::core::mem::align_of::() - 1usize]; }; #[repr(C)] #[derive(Copy, Clone)] @@ -5020,9 +5024,9 @@ pub union CPUArchState__bindgen_ty_3 { #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of CPUArchState__bindgen_ty_3"] - [::std::mem::size_of::() - 32usize]; + [::core::mem::size_of::() - 32usize]; ["Alignment of CPUArchState__bindgen_ty_3"] - [::std::mem::align_of::() - 8usize]; + [::core::mem::align_of::() - 8usize]; ["Offset of field: CPUArchState__bindgen_ty_3::cpu_breakpoint"] [::std::mem::offset_of!(CPUArchState__bindgen_ty_3, cpu_breakpoint) - 0usize]; ["Offset of field: CPUArchState__bindgen_ty_3::cpu_watchpoint"] @@ -5030,15 +5034,15 @@ const _: () = { }; impl Default for CPUArchState__bindgen_ty_3 { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for CPUArchState__bindgen_ty_3 { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for CPUArchState__bindgen_ty_3 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!(f, "CPUArchState__bindgen_ty_3 {{ union }}") } } @@ -5048,14 +5052,14 @@ pub struct CPUArchState__bindgen_ty_4 {} #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of CPUArchState__bindgen_ty_4"] - [::std::mem::size_of::() - 0usize]; + [::core::mem::size_of::() - 0usize]; ["Alignment of CPUArchState__bindgen_ty_4"] - [::std::mem::align_of::() - 1usize]; + [::core::mem::align_of::() - 1usize]; }; #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUArchState"][::std::mem::size_of::() - 15008usize]; - ["Alignment of CPUArchState"][::std::mem::align_of::() - 16usize]; + ["Size of CPUArchState"][::core::mem::size_of::() - 15008usize]; + ["Alignment of CPUArchState"][::core::mem::align_of::() - 16usize]; ["Offset of field: CPUArchState::regs"][::std::mem::offset_of!(CPUArchState, regs) - 0usize]; ["Offset of field: CPUArchState::eip"][::std::mem::offset_of!(CPUArchState, eip) - 128usize]; ["Offset of field: CPUArchState::eflags"] @@ -5447,15 +5451,15 @@ const _: () = { }; impl Default for CPUArchState { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for CPUArchState { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for CPUArchState { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!( f, "CPUArchState {{ regs: {:?}, segs: {:?}, ldt: {:?}, tr: {:?}, gdt: {:?}, idt: {:?}, cr: {:?}, pdptrs_valid: {:?}, pdptrs: {:?}, bnd_regs: {:?}, bndcs_regs: {:?}, start_init_save: {:?}, fpstt: {:?}, fptags: {:?}, fpregs: {:?}, fp_status: {:?}, ft0: {:?}, mmx_status: {:?}, sse_status: {:?}, xmm_regs: {:?}, xmm_t0: {:?}, mmx_t0: {:?}, opmask_regs: {:?}, xtilecfg: {:?}, xtiledata: {:?}, msr_ia32_sgxlepubkeyhash: {:?}, msr_fixed_counters: {:?}, msr_gp_counters: {:?}, msr_gp_evtsel: {:?}, end_init_save: {:?}, msr_hv_crash_params: {:?}, msr_hv_synic_sint: {:?}, msr_hv_stimer_config: {:?}, msr_hv_stimer_count: {:?}, msr_rtit_addrs: {:?}, lbr_records: {:?}, error_code: {:?}, exception_is_int: {:?}, dr: {:?}, __bindgen_anon_1: {:?}, old_exception: {:?}, end_reset_fields: {:?}, features: {:?}, user_features: {:?}, cpuid_model: {:?}, cache_info_cpuid2: {:?}, cache_info_cpuid4: {:?}, cache_info_amd: {:?}, mtrr_fixed: {:?}, mtrr_var: {:?}, tsc_valid: {:?}, mce_banks: {:?}, tpr_access_type: {:?}, nr_dies: {:?}, nr_modules: {:?}, avail_cpu_topo: {:?} }}", @@ -5604,9 +5608,9 @@ pub struct ArchCPU__bindgen_ty_1 { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of ArchCPU__bindgen_ty_1"][::std::mem::size_of::() - 16usize]; + ["Size of ArchCPU__bindgen_ty_1"][::core::mem::size_of::() - 16usize]; ["Alignment of ArchCPU__bindgen_ty_1"] - [::std::mem::align_of::() - 4usize]; + [::core::mem::align_of::() - 4usize]; ["Offset of field: ArchCPU__bindgen_ty_1::eax"] [::std::mem::offset_of!(ArchCPU__bindgen_ty_1, eax) - 0usize]; ["Offset of field: ArchCPU__bindgen_ty_1::ebx"] @@ -5618,8 +5622,8 @@ const _: () = { }; #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of ArchCPU"][::std::mem::size_of::() - 25792usize]; - ["Alignment of ArchCPU"][::std::mem::align_of::() - 16usize]; + ["Size of ArchCPU"][::core::mem::size_of::() - 25792usize]; + ["Alignment of ArchCPU"][::core::mem::align_of::() - 16usize]; ["Offset of field: ArchCPU::parent_obj"][::std::mem::offset_of!(ArchCPU, parent_obj) - 0usize]; ["Offset of field: ArchCPU::env"][::std::mem::offset_of!(ArchCPU, env) - 10176usize]; ["Offset of field: ArchCPU::vmsentry"][::std::mem::offset_of!(ArchCPU, vmsentry) - 25184usize]; @@ -5743,15 +5747,15 @@ const _: () = { }; impl Default for ArchCPU { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for ArchCPU { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for ArchCPU { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!( f, "ArchCPU {{ parent_obj: {:?}, env: {:?}, vmsentry: {:?}, hyperv_vendor: {:?}, hyperv_synic_kvm_only: {:?}, hyperv_passthrough: {:?}, hyperv_no_nonarch_cs: {:?}, hyperv_vendor_id: {:?}, hyperv_interface_id: {:?}, hyperv_limits: {:?}, hyperv_enforce_cpuid: {:?}, check_cpuid: {:?}, enforce_cpuid: {:?}, force_features: {:?}, expose_kvm: {:?}, expose_tcg: {:?}, migratable: {:?}, migrate_smi_count: {:?}, max_features: {:?}, vmware_cpuid_freq: {:?}, cache_info_passthrough: {:?}, mwait: {:?}, filtered_features: {:?}, enable_pmu: {:?}, enable_lmce: {:?}, enable_l3_cache: {:?}, l1_cache_per_core: {:?}, legacy_cache: {:?}, legacy_multi_node: {:?}, enable_cpuid_0xb: {:?}, full_cpuid_auto_level: {:?}, vendor_cpuid_only: {:?}, amd_topoext_features_only: {:?}, intel_pt_auto_level: {:?}, fill_mtrr_mask: {:?}, host_phys_bits: {:?}, kvm_pv_enforce_cpuid: {:?}, apic_state: {:?}, cpu_as_root: {:?}, cpu_as_mem: {:?}, smram: {:?}, machine_done: {:?}, kvm_msr_buf: {:?}, xen_vapic: {:?} }}", @@ -5820,8 +5824,8 @@ pub struct RBNode { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of RBNode"][::std::mem::size_of::() - 24usize]; - ["Alignment of RBNode"][::std::mem::align_of::() - 8usize]; + ["Size of RBNode"][::core::mem::size_of::() - 24usize]; + ["Alignment of RBNode"][::core::mem::align_of::() - 8usize]; ["Offset of field: RBNode::rb_parent_color"] [::std::mem::offset_of!(RBNode, rb_parent_color) - 0usize]; ["Offset of field: RBNode::rb_right"][::std::mem::offset_of!(RBNode, rb_right) - 8usize]; @@ -5829,9 +5833,9 @@ const _: () = { }; impl Default for RBNode { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -5843,15 +5847,15 @@ pub struct RBRoot { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of RBRoot"][::std::mem::size_of::() - 8usize]; - ["Alignment of RBRoot"][::std::mem::align_of::() - 8usize]; + ["Size of RBRoot"][::core::mem::size_of::() - 8usize]; + ["Alignment of RBRoot"][::core::mem::align_of::() - 8usize]; ["Offset of field: RBRoot::rb_node"][::std::mem::offset_of!(RBRoot, rb_node) - 0usize]; }; impl Default for RBRoot { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -5864,8 +5868,8 @@ pub struct RBRootLeftCached { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of RBRootLeftCached"][::std::mem::size_of::() - 16usize]; - ["Alignment of RBRootLeftCached"][::std::mem::align_of::() - 8usize]; + ["Size of RBRootLeftCached"][::core::mem::size_of::() - 16usize]; + ["Alignment of RBRootLeftCached"][::core::mem::align_of::() - 8usize]; ["Offset of field: RBRootLeftCached::rb_root"] [::std::mem::offset_of!(RBRootLeftCached, rb_root) - 0usize]; ["Offset of field: RBRootLeftCached::rb_leftmost"] @@ -5873,9 +5877,9 @@ const _: () = { }; impl Default for RBRootLeftCached { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -5890,8 +5894,8 @@ pub struct IntervalTreeNode { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of IntervalTreeNode"][::std::mem::size_of::() - 48usize]; - ["Alignment of IntervalTreeNode"][::std::mem::align_of::() - 8usize]; + ["Size of IntervalTreeNode"][::core::mem::size_of::() - 48usize]; + ["Alignment of IntervalTreeNode"][::core::mem::align_of::() - 8usize]; ["Offset of field: IntervalTreeNode::rb"] [::std::mem::offset_of!(IntervalTreeNode, rb) - 0usize]; ["Offset of field: IntervalTreeNode::start"] @@ -5903,9 +5907,9 @@ const _: () = { }; impl Default for IntervalTreeNode { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -5987,27 +5991,27 @@ pub const MemOp_MO_TESW: MemOp = MemOp(9); pub const MemOp_MO_TESL: MemOp = MemOp(10); pub const MemOp_MO_TESQ: MemOp = MemOp(11); pub const MemOp_MO_SSIZE: MemOp = MemOp(15); -impl ::std::ops::BitOr for MemOp { +impl ::core::ops::BitOr for MemOp { type Output = Self; #[inline] fn bitor(self, other: Self) -> Self { MemOp(self.0 | other.0) } } -impl ::std::ops::BitOrAssign for MemOp { +impl ::core::ops::BitOrAssign for MemOp { #[inline] fn bitor_assign(&mut self, rhs: MemOp) { self.0 |= rhs.0; } } -impl ::std::ops::BitAnd for MemOp { +impl ::core::ops::BitAnd for MemOp { type Output = Self; #[inline] fn bitand(self, other: Self) -> Self { MemOp(self.0 & other.0) } } -impl ::std::ops::BitAndAssign for MemOp { +impl ::core::ops::BitAndAssign for MemOp { #[inline] fn bitand_assign(&mut self, rhs: MemOp) { self.0 &= rhs.0; @@ -6060,8 +6064,8 @@ pub struct image_info { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of image_info"][::std::mem::size_of::() - 264usize]; - ["Alignment of image_info"][::std::mem::align_of::() - 8usize]; + ["Size of image_info"][::core::mem::size_of::() - 264usize]; + ["Alignment of image_info"][::core::mem::align_of::() - 8usize]; ["Offset of field: image_info::load_bias"] [::std::mem::offset_of!(image_info, load_bias) - 0usize]; ["Offset of field: image_info::load_addr"] @@ -6125,9 +6129,9 @@ const _: () = { }; impl Default for image_info { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -6140,16 +6144,16 @@ pub struct tb_tc { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of tb_tc"][::std::mem::size_of::() - 16usize]; - ["Alignment of tb_tc"][::std::mem::align_of::() - 8usize]; + ["Size of tb_tc"][::core::mem::size_of::() - 16usize]; + ["Alignment of tb_tc"][::core::mem::align_of::() - 8usize]; ["Offset of field: tb_tc::ptr"][::std::mem::offset_of!(tb_tc, ptr) - 0usize]; ["Offset of field: tb_tc::size"][::std::mem::offset_of!(tb_tc, size) - 8usize]; }; impl Default for tb_tc { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -6175,8 +6179,8 @@ pub struct TranslationBlock { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of TranslationBlock"][::std::mem::size_of::() - 168usize]; - ["Alignment of TranslationBlock"][::std::mem::align_of::() - 8usize]; + ["Size of TranslationBlock"][::core::mem::size_of::() - 168usize]; + ["Alignment of TranslationBlock"][::core::mem::align_of::() - 8usize]; ["Offset of field: TranslationBlock::pc"] [::std::mem::offset_of!(TranslationBlock, pc) - 0usize]; ["Offset of field: TranslationBlock::cs_base"] @@ -6210,9 +6214,9 @@ const _: () = { }; impl Default for TranslationBlock { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -6259,8 +6263,8 @@ pub struct libafl_breakpoint { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of libafl_breakpoint"][::std::mem::size_of::() - 16usize]; - ["Alignment of libafl_breakpoint"][::std::mem::align_of::() - 8usize]; + ["Size of libafl_breakpoint"][::core::mem::size_of::() - 16usize]; + ["Alignment of libafl_breakpoint"][::core::mem::align_of::() - 8usize]; ["Offset of field: libafl_breakpoint::addr"] [::std::mem::offset_of!(libafl_breakpoint, addr) - 0usize]; ["Offset of field: libafl_breakpoint::next"] @@ -6268,9 +6272,9 @@ const _: () = { }; impl Default for libafl_breakpoint { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -6279,27 +6283,27 @@ pub const libafl_exit_reason_kind_INTERNAL: libafl_exit_reason_kind = libafl_exi pub const libafl_exit_reason_kind_BREAKPOINT: libafl_exit_reason_kind = libafl_exit_reason_kind(1); pub const libafl_exit_reason_kind_CUSTOM_INSN: libafl_exit_reason_kind = libafl_exit_reason_kind(2); pub const libafl_exit_reason_kind_TIMEOUT: libafl_exit_reason_kind = libafl_exit_reason_kind(3); -impl ::std::ops::BitOr for libafl_exit_reason_kind { +impl ::core::ops::BitOr for libafl_exit_reason_kind { type Output = Self; #[inline] fn bitor(self, other: Self) -> Self { libafl_exit_reason_kind(self.0 | other.0) } } -impl ::std::ops::BitOrAssign for libafl_exit_reason_kind { +impl ::core::ops::BitOrAssign for libafl_exit_reason_kind { #[inline] fn bitor_assign(&mut self, rhs: libafl_exit_reason_kind) { self.0 |= rhs.0; } } -impl ::std::ops::BitAnd for libafl_exit_reason_kind { +impl ::core::ops::BitAnd for libafl_exit_reason_kind { type Output = Self; #[inline] fn bitand(self, other: Self) -> Self { libafl_exit_reason_kind(self.0 & other.0) } } -impl ::std::ops::BitAndAssign for libafl_exit_reason_kind { +impl ::core::ops::BitAndAssign for libafl_exit_reason_kind { #[inline] fn bitand_assign(&mut self, rhs: libafl_exit_reason_kind) { self.0 &= rhs.0; @@ -6314,27 +6318,27 @@ pub const libafl_custom_insn_kind_LIBAFL_CUSTOM_INSN_LIBAFL: libafl_custom_insn_ libafl_custom_insn_kind(1); pub const libafl_custom_insn_kind_LIBAFL_CUSTOM_INSN_NYX: libafl_custom_insn_kind = libafl_custom_insn_kind(2); -impl ::std::ops::BitOr for libafl_custom_insn_kind { +impl ::core::ops::BitOr for libafl_custom_insn_kind { type Output = Self; #[inline] fn bitor(self, other: Self) -> Self { libafl_custom_insn_kind(self.0 | other.0) } } -impl ::std::ops::BitOrAssign for libafl_custom_insn_kind { +impl ::core::ops::BitOrAssign for libafl_custom_insn_kind { #[inline] fn bitor_assign(&mut self, rhs: libafl_custom_insn_kind) { self.0 |= rhs.0; } } -impl ::std::ops::BitAnd for libafl_custom_insn_kind { +impl ::core::ops::BitAnd for libafl_custom_insn_kind { type Output = Self; #[inline] fn bitand(self, other: Self) -> Self { libafl_custom_insn_kind(self.0 & other.0) } } -impl ::std::ops::BitAndAssign for libafl_custom_insn_kind { +impl ::core::ops::BitAndAssign for libafl_custom_insn_kind { #[inline] fn bitand_assign(&mut self, rhs: libafl_custom_insn_kind) { self.0 &= rhs.0; @@ -6352,9 +6356,9 @@ pub struct libafl_exit_reason_internal { #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of libafl_exit_reason_internal"] - [::std::mem::size_of::() - 8usize]; + [::core::mem::size_of::() - 8usize]; ["Alignment of libafl_exit_reason_internal"] - [::std::mem::align_of::() - 4usize]; + [::core::mem::align_of::() - 4usize]; ["Offset of field: libafl_exit_reason_internal::cause"] [::std::mem::offset_of!(libafl_exit_reason_internal, cause) - 0usize]; ["Offset of field: libafl_exit_reason_internal::signal"] @@ -6362,9 +6366,9 @@ const _: () = { }; impl Default for libafl_exit_reason_internal { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -6377,9 +6381,9 @@ pub struct libafl_exit_reason_breakpoint { #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of libafl_exit_reason_breakpoint"] - [::std::mem::size_of::() - 8usize]; + [::core::mem::size_of::() - 8usize]; ["Alignment of libafl_exit_reason_breakpoint"] - [::std::mem::align_of::() - 8usize]; + [::core::mem::align_of::() - 8usize]; ["Offset of field: libafl_exit_reason_breakpoint::addr"] [::std::mem::offset_of!(libafl_exit_reason_breakpoint, addr) - 0usize]; }; @@ -6391,17 +6395,17 @@ pub struct libafl_exit_reason_custom_insn { #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of libafl_exit_reason_custom_insn"] - [::std::mem::size_of::() - 4usize]; + [::core::mem::size_of::() - 4usize]; ["Alignment of libafl_exit_reason_custom_insn"] - [::std::mem::align_of::() - 4usize]; + [::core::mem::align_of::() - 4usize]; ["Offset of field: libafl_exit_reason_custom_insn::kind"] [::std::mem::offset_of!(libafl_exit_reason_custom_insn, kind) - 0usize]; }; impl Default for libafl_exit_reason_custom_insn { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -6412,9 +6416,9 @@ pub struct libafl_exit_reason_timeout {} #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of libafl_exit_reason_timeout"] - [::std::mem::size_of::() - 0usize]; + [::core::mem::size_of::() - 0usize]; ["Alignment of libafl_exit_reason_timeout"] - [::std::mem::align_of::() - 1usize]; + [::core::mem::align_of::() - 1usize]; }; #[repr(C)] #[derive(Copy, Clone)] @@ -6435,9 +6439,9 @@ pub union libafl_exit_reason__bindgen_ty_1 { #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of libafl_exit_reason__bindgen_ty_1"] - [::std::mem::size_of::() - 8usize]; + [::core::mem::size_of::() - 8usize]; ["Alignment of libafl_exit_reason__bindgen_ty_1"] - [::std::mem::align_of::() - 8usize]; + [::core::mem::align_of::() - 8usize]; ["Offset of field: libafl_exit_reason__bindgen_ty_1::internal"] [::std::mem::offset_of!(libafl_exit_reason__bindgen_ty_1, internal) - 0usize]; ["Offset of field: libafl_exit_reason__bindgen_ty_1::breakpoint"] @@ -6449,22 +6453,22 @@ const _: () = { }; impl Default for libafl_exit_reason__bindgen_ty_1 { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for libafl_exit_reason__bindgen_ty_1 { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for libafl_exit_reason__bindgen_ty_1 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!(f, "libafl_exit_reason__bindgen_ty_1 {{ union }}") } } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of libafl_exit_reason"][::std::mem::size_of::() - 32usize]; - ["Alignment of libafl_exit_reason"][::std::mem::align_of::() - 8usize]; + ["Size of libafl_exit_reason"][::core::mem::size_of::() - 32usize]; + ["Alignment of libafl_exit_reason"][::core::mem::align_of::() - 8usize]; ["Offset of field: libafl_exit_reason::kind"] [::std::mem::offset_of!(libafl_exit_reason, kind) - 0usize]; ["Offset of field: libafl_exit_reason::cpu"] @@ -6476,15 +6480,15 @@ const _: () = { }; impl Default for libafl_exit_reason { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } -impl ::std::fmt::Debug for libafl_exit_reason { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { +impl ::core::fmt::Debug for libafl_exit_reason { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { write!( f, "libafl_exit_reason {{ kind: {:?}, cpu: {:?}, data: {:?} }}", @@ -6550,8 +6554,8 @@ pub struct libafl_mapinfo { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of libafl_mapinfo"][::std::mem::size_of::() - 48usize]; - ["Alignment of libafl_mapinfo"][::std::mem::align_of::() - 8usize]; + ["Size of libafl_mapinfo"][::core::mem::size_of::() - 48usize]; + ["Alignment of libafl_mapinfo"][::core::mem::align_of::() - 8usize]; ["Offset of field: libafl_mapinfo::start"] [::std::mem::offset_of!(libafl_mapinfo, start) - 0usize]; ["Offset of field: libafl_mapinfo::end"][::std::mem::offset_of!(libafl_mapinfo, end) - 8usize]; @@ -6568,9 +6572,9 @@ const _: () = { }; impl Default for libafl_mapinfo { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -6583,8 +6587,8 @@ pub struct libafl_qemu_sig_ctx { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of libafl_qemu_sig_ctx"][::std::mem::size_of::() - 2usize]; - ["Alignment of libafl_qemu_sig_ctx"][::std::mem::align_of::() - 1usize]; + ["Size of libafl_qemu_sig_ctx"][::core::mem::size_of::() - 2usize]; + ["Alignment of libafl_qemu_sig_ctx"][::core::mem::align_of::() - 1usize]; ["Offset of field: libafl_qemu_sig_ctx::in_qemu_sig_hdlr"] [::std::mem::offset_of!(libafl_qemu_sig_ctx, in_qemu_sig_hdlr) - 0usize]; ["Offset of field: libafl_qemu_sig_ctx::is_target_signal"] @@ -6651,16 +6655,16 @@ unsafe extern "C" { #[derive(Debug, Copy, Clone)] pub struct AccelCPUClass { pub parent_class: ObjectClass, - pub cpu_class_init: ::std::option::Option, - pub cpu_instance_init: ::std::option::Option, - pub cpu_target_realize: ::std::option::Option< + pub cpu_class_init: ::core::option::Option, + pub cpu_instance_init: ::core::option::Option, + pub cpu_target_realize: ::core::option::Option< unsafe extern "C" fn(cpu: *mut CPUState, errp: *mut *mut Error) -> bool, >, } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of AccelCPUClass"][::std::mem::size_of::() - 120usize]; - ["Alignment of AccelCPUClass"][::std::mem::align_of::() - 8usize]; + ["Size of AccelCPUClass"][::core::mem::size_of::() - 120usize]; + ["Alignment of AccelCPUClass"][::core::mem::align_of::() - 8usize]; ["Offset of field: AccelCPUClass::parent_class"] [::std::mem::offset_of!(AccelCPUClass, parent_class) - 0usize]; ["Offset of field: AccelCPUClass::cpu_class_init"] @@ -6672,9 +6676,9 @@ const _: () = { }; impl Default for AccelCPUClass { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -6682,27 +6686,27 @@ impl Default for AccelCPUClass { pub const qemu_plugin_mem_rw_QEMU_PLUGIN_MEM_R: qemu_plugin_mem_rw = qemu_plugin_mem_rw(1); pub const qemu_plugin_mem_rw_QEMU_PLUGIN_MEM_W: qemu_plugin_mem_rw = qemu_plugin_mem_rw(2); pub const qemu_plugin_mem_rw_QEMU_PLUGIN_MEM_RW: qemu_plugin_mem_rw = qemu_plugin_mem_rw(3); -impl ::std::ops::BitOr for qemu_plugin_mem_rw { +impl ::core::ops::BitOr for qemu_plugin_mem_rw { type Output = Self; #[inline] fn bitor(self, other: Self) -> Self { qemu_plugin_mem_rw(self.0 | other.0) } } -impl ::std::ops::BitOrAssign for qemu_plugin_mem_rw { +impl ::core::ops::BitOrAssign for qemu_plugin_mem_rw { #[inline] fn bitor_assign(&mut self, rhs: qemu_plugin_mem_rw) { self.0 |= rhs.0; } } -impl ::std::ops::BitAnd for qemu_plugin_mem_rw { +impl ::core::ops::BitAnd for qemu_plugin_mem_rw { type Output = Self; #[inline] fn bitand(self, other: Self) -> Self { qemu_plugin_mem_rw(self.0 & other.0) } } -impl ::std::ops::BitAndAssign for qemu_plugin_mem_rw { +impl ::core::ops::BitAndAssign for qemu_plugin_mem_rw { #[inline] fn bitand_assign(&mut self, rhs: qemu_plugin_mem_rw) { self.0 &= rhs.0; @@ -6732,8 +6736,8 @@ pub struct CPUPluginState { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUPluginState"][::std::mem::size_of::() - 8usize]; - ["Alignment of CPUPluginState"][::std::mem::align_of::() - 8usize]; + ["Size of CPUPluginState"][::core::mem::size_of::() - 8usize]; + ["Alignment of CPUPluginState"][::core::mem::align_of::() - 8usize]; ["Offset of field: CPUPluginState::event_mask"] [::std::mem::offset_of!(CPUPluginState, event_mask) - 0usize]; }; @@ -6779,27 +6783,27 @@ pub const TCGReg_TCG_REG_RSI: TCGReg = TCGReg(6); pub const TCGReg_TCG_REG_RDI: TCGReg = TCGReg(7); pub const TCGReg_TCG_AREG0: TCGReg = TCGReg(5); pub const TCGReg_TCG_REG_CALL_STACK: TCGReg = TCGReg(4); -impl ::std::ops::BitOr for TCGReg { +impl ::core::ops::BitOr for TCGReg { type Output = Self; #[inline] fn bitor(self, other: Self) -> Self { TCGReg(self.0 | other.0) } } -impl ::std::ops::BitOrAssign for TCGReg { +impl ::core::ops::BitOrAssign for TCGReg { #[inline] fn bitor_assign(&mut self, rhs: TCGReg) { self.0 |= rhs.0; } } -impl ::std::ops::BitAnd for TCGReg { +impl ::core::ops::BitAnd for TCGReg { type Output = Self; #[inline] fn bitand(self, other: Self) -> Self { TCGReg(self.0 & other.0) } } -impl ::std::ops::BitAndAssign for TCGReg { +impl ::core::ops::BitAndAssign for TCGReg { #[inline] fn bitand_assign(&mut self, rhs: TCGReg) { self.0 &= rhs.0; @@ -6816,27 +6820,27 @@ pub const TCGType_TCG_TYPE_V128: TCGType = TCGType(4); pub const TCGType_TCG_TYPE_V256: TCGType = TCGType(5); pub const TCGType_TCG_TYPE_REG: TCGType = TCGType(1); pub const TCGType_TCG_TYPE_PTR: TCGType = TCGType(1); -impl ::std::ops::BitOr for TCGType { +impl ::core::ops::BitOr for TCGType { type Output = Self; #[inline] fn bitor(self, other: Self) -> Self { TCGType(self.0 | other.0) } } -impl ::std::ops::BitOrAssign for TCGType { +impl ::core::ops::BitOrAssign for TCGType { #[inline] fn bitor_assign(&mut self, rhs: TCGType) { self.0 |= rhs.0; } } -impl ::std::ops::BitAnd for TCGType { +impl ::core::ops::BitAnd for TCGType { type Output = Self; #[inline] fn bitand(self, other: Self) -> Self { TCGType(self.0 & other.0) } } -impl ::std::ops::BitAndAssign for TCGType { +impl ::core::ops::BitAndAssign for TCGType { #[inline] fn bitand_assign(&mut self, rhs: TCGType) { self.0 &= rhs.0; @@ -6855,27 +6859,27 @@ pub const TCGTempVal_TEMP_VAL_DEAD: TCGTempVal = TCGTempVal(0); pub const TCGTempVal_TEMP_VAL_REG: TCGTempVal = TCGTempVal(1); pub const TCGTempVal_TEMP_VAL_MEM: TCGTempVal = TCGTempVal(2); pub const TCGTempVal_TEMP_VAL_CONST: TCGTempVal = TCGTempVal(3); -impl ::std::ops::BitOr for TCGTempVal { +impl ::core::ops::BitOr for TCGTempVal { type Output = Self; #[inline] fn bitor(self, other: Self) -> Self { TCGTempVal(self.0 | other.0) } } -impl ::std::ops::BitOrAssign for TCGTempVal { +impl ::core::ops::BitOrAssign for TCGTempVal { #[inline] fn bitor_assign(&mut self, rhs: TCGTempVal) { self.0 |= rhs.0; } } -impl ::std::ops::BitAnd for TCGTempVal { +impl ::core::ops::BitAnd for TCGTempVal { type Output = Self; #[inline] fn bitand(self, other: Self) -> Self { TCGTempVal(self.0 & other.0) } } -impl ::std::ops::BitAndAssign for TCGTempVal { +impl ::core::ops::BitAndAssign for TCGTempVal { #[inline] fn bitand_assign(&mut self, rhs: TCGTempVal) { self.0 &= rhs.0; @@ -6889,27 +6893,27 @@ pub const TCGTempKind_TEMP_TB: TCGTempKind = TCGTempKind(1); pub const TCGTempKind_TEMP_GLOBAL: TCGTempKind = TCGTempKind(2); pub const TCGTempKind_TEMP_FIXED: TCGTempKind = TCGTempKind(3); pub const TCGTempKind_TEMP_CONST: TCGTempKind = TCGTempKind(4); -impl ::std::ops::BitOr for TCGTempKind { +impl ::core::ops::BitOr for TCGTempKind { type Output = Self; #[inline] fn bitor(self, other: Self) -> Self { TCGTempKind(self.0 | other.0) } } -impl ::std::ops::BitOrAssign for TCGTempKind { +impl ::core::ops::BitOrAssign for TCGTempKind { #[inline] fn bitor_assign(&mut self, rhs: TCGTempKind) { self.0 |= rhs.0; } } -impl ::std::ops::BitAnd for TCGTempKind { +impl ::core::ops::BitAnd for TCGTempKind { type Output = Self; #[inline] fn bitand(self, other: Self) -> Self { TCGTempKind(self.0 & other.0) } } -impl ::std::ops::BitAndAssign for TCGTempKind { +impl ::core::ops::BitAndAssign for TCGTempKind { #[inline] fn bitand_assign(&mut self, rhs: TCGTempKind) { self.0 &= rhs.0; @@ -6932,8 +6936,8 @@ pub struct TCGTemp { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of TCGTemp"][::std::mem::size_of::() - 56usize]; - ["Alignment of TCGTemp"][::std::mem::align_of::() - 8usize]; + ["Size of TCGTemp"][::core::mem::size_of::() - 56usize]; + ["Alignment of TCGTemp"][::core::mem::align_of::() - 8usize]; ["Offset of field: TCGTemp::val"][::std::mem::offset_of!(TCGTemp, val) - 8usize]; ["Offset of field: TCGTemp::mem_base"][::std::mem::offset_of!(TCGTemp, mem_base) - 16usize]; ["Offset of field: TCGTemp::mem_offset"][::std::mem::offset_of!(TCGTemp, mem_offset) - 24usize]; @@ -6943,9 +6947,9 @@ const _: () = { }; impl Default for TCGTemp { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -6953,19 +6957,19 @@ impl Default for TCGTemp { impl TCGTemp { #[inline] pub fn reg(&self) -> TCGReg { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) } } #[inline] pub fn set_reg(&mut self, val: TCGReg) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); self._bitfield_1.set(0usize, 8u8, val as u64) } } #[inline] pub unsafe fn reg_raw(this: *const Self) -> TCGReg { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get( + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), 0usize, 8u8, @@ -6975,7 +6979,7 @@ impl TCGTemp { #[inline] pub unsafe fn set_reg_raw(this: *mut Self, val: TCGReg) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); <__BindgenBitfieldUnit<[u8; 6usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, @@ -6986,19 +6990,19 @@ impl TCGTemp { } #[inline] pub fn val_type(&self) -> TCGTempVal { - unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) } } #[inline] pub fn set_val_type(&mut self, val: TCGTempVal) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); self._bitfield_1.set(8usize, 8u8, val as u64) } } #[inline] pub unsafe fn val_type_raw(this: *const Self) -> TCGTempVal { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get( + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), 8usize, 8u8, @@ -7008,7 +7012,7 @@ impl TCGTemp { #[inline] pub unsafe fn set_val_type_raw(this: *mut Self, val: TCGTempVal) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); <__BindgenBitfieldUnit<[u8; 6usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, @@ -7019,19 +7023,19 @@ impl TCGTemp { } #[inline] pub fn base_type(&self) -> TCGType { - unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 8u8) as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 8u8) as u32) } } #[inline] pub fn set_base_type(&mut self, val: TCGType) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); self._bitfield_1.set(16usize, 8u8, val as u64) } } #[inline] pub unsafe fn base_type_raw(this: *const Self) -> TCGType { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get( + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), 16usize, 8u8, @@ -7041,7 +7045,7 @@ impl TCGTemp { #[inline] pub unsafe fn set_base_type_raw(this: *mut Self, val: TCGType) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); <__BindgenBitfieldUnit<[u8; 6usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), 16usize, @@ -7052,19 +7056,19 @@ impl TCGTemp { } #[inline] pub fn type_(&self) -> TCGType { - unsafe { ::std::mem::transmute(self._bitfield_1.get(24usize, 8u8) as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 8u8) as u32) } } #[inline] pub fn set_type(&mut self, val: TCGType) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); self._bitfield_1.set(24usize, 8u8, val as u64) } } #[inline] pub unsafe fn type__raw(this: *const Self) -> TCGType { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get( + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), 24usize, 8u8, @@ -7074,7 +7078,7 @@ impl TCGTemp { #[inline] pub unsafe fn set_type_raw(this: *mut Self, val: TCGType) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); <__BindgenBitfieldUnit<[u8; 6usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), 24usize, @@ -7085,19 +7089,19 @@ impl TCGTemp { } #[inline] pub fn kind(&self) -> TCGTempKind { - unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 3u8) as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(32usize, 3u8) as u32) } } #[inline] pub fn set_kind(&mut self, val: TCGTempKind) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); self._bitfield_1.set(32usize, 3u8, val as u64) } } #[inline] pub unsafe fn kind_raw(this: *const Self) -> TCGTempKind { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get( + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), 32usize, 3u8, @@ -7107,7 +7111,7 @@ impl TCGTemp { #[inline] pub unsafe fn set_kind_raw(this: *mut Self, val: TCGTempKind) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); <__BindgenBitfieldUnit<[u8; 6usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), 32usize, @@ -7118,19 +7122,19 @@ impl TCGTemp { } #[inline] pub fn indirect_reg(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u32) } } #[inline] pub fn set_indirect_reg(&mut self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); self._bitfield_1.set(35usize, 1u8, val as u64) } } #[inline] pub unsafe fn indirect_reg_raw(this: *const Self) -> ::std::os::raw::c_uint { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get( + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), 35usize, 1u8, @@ -7140,7 +7144,7 @@ impl TCGTemp { #[inline] pub unsafe fn set_indirect_reg_raw(this: *mut Self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); <__BindgenBitfieldUnit<[u8; 6usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), 35usize, @@ -7151,19 +7155,19 @@ impl TCGTemp { } #[inline] pub fn indirect_base(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u32) } } #[inline] pub fn set_indirect_base(&mut self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); self._bitfield_1.set(36usize, 1u8, val as u64) } } #[inline] pub unsafe fn indirect_base_raw(this: *const Self) -> ::std::os::raw::c_uint { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get( + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), 36usize, 1u8, @@ -7173,7 +7177,7 @@ impl TCGTemp { #[inline] pub unsafe fn set_indirect_base_raw(this: *mut Self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); <__BindgenBitfieldUnit<[u8; 6usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), 36usize, @@ -7184,19 +7188,19 @@ impl TCGTemp { } #[inline] pub fn mem_coherent(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u32) } } #[inline] pub fn set_mem_coherent(&mut self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); self._bitfield_1.set(37usize, 1u8, val as u64) } } #[inline] pub unsafe fn mem_coherent_raw(this: *const Self) -> ::std::os::raw::c_uint { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get( + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), 37usize, 1u8, @@ -7206,7 +7210,7 @@ impl TCGTemp { #[inline] pub unsafe fn set_mem_coherent_raw(this: *mut Self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); <__BindgenBitfieldUnit<[u8; 6usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), 37usize, @@ -7217,19 +7221,19 @@ impl TCGTemp { } #[inline] pub fn mem_allocated(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(38usize, 1u8) as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(38usize, 1u8) as u32) } } #[inline] pub fn set_mem_allocated(&mut self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); self._bitfield_1.set(38usize, 1u8, val as u64) } } #[inline] pub unsafe fn mem_allocated_raw(this: *const Self) -> ::std::os::raw::c_uint { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get( + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), 38usize, 1u8, @@ -7239,7 +7243,7 @@ impl TCGTemp { #[inline] pub unsafe fn set_mem_allocated_raw(this: *mut Self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); <__BindgenBitfieldUnit<[u8; 6usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), 38usize, @@ -7250,19 +7254,19 @@ impl TCGTemp { } #[inline] pub fn temp_allocated(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(39usize, 1u8) as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(39usize, 1u8) as u32) } } #[inline] pub fn set_temp_allocated(&mut self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); self._bitfield_1.set(39usize, 1u8, val as u64) } } #[inline] pub unsafe fn temp_allocated_raw(this: *const Self) -> ::std::os::raw::c_uint { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get( + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), 39usize, 1u8, @@ -7272,7 +7276,7 @@ impl TCGTemp { #[inline] pub unsafe fn set_temp_allocated_raw(this: *mut Self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); <__BindgenBitfieldUnit<[u8; 6usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), 39usize, @@ -7283,19 +7287,19 @@ impl TCGTemp { } #[inline] pub fn temp_subindex(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(40usize, 2u8) as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(40usize, 2u8) as u32) } } #[inline] pub fn set_temp_subindex(&mut self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); self._bitfield_1.set(40usize, 2u8, val as u64) } } #[inline] pub unsafe fn temp_subindex_raw(this: *const Self) -> ::std::os::raw::c_uint { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get( + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 6usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), 40usize, 2u8, @@ -7305,7 +7309,7 @@ impl TCGTemp { #[inline] pub unsafe fn set_temp_subindex_raw(this: *mut Self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); <__BindgenBitfieldUnit<[u8; 6usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), 40usize, @@ -7330,47 +7334,47 @@ impl TCGTemp { ) -> __BindgenBitfieldUnit<[u8; 6usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 6usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 8u8, { - let reg: u32 = unsafe { ::std::mem::transmute(reg) }; + let reg: u32 = unsafe { ::core::mem::transmute(reg) }; reg as u64 }); __bindgen_bitfield_unit.set(8usize, 8u8, { - let val_type: u32 = unsafe { ::std::mem::transmute(val_type) }; + let val_type: u32 = unsafe { ::core::mem::transmute(val_type) }; val_type as u64 }); __bindgen_bitfield_unit.set(16usize, 8u8, { - let base_type: u32 = unsafe { ::std::mem::transmute(base_type) }; + let base_type: u32 = unsafe { ::core::mem::transmute(base_type) }; base_type as u64 }); __bindgen_bitfield_unit.set(24usize, 8u8, { - let type_: u32 = unsafe { ::std::mem::transmute(type_) }; + let type_: u32 = unsafe { ::core::mem::transmute(type_) }; type_ as u64 }); __bindgen_bitfield_unit.set(32usize, 3u8, { - let kind: u32 = unsafe { ::std::mem::transmute(kind) }; + let kind: u32 = unsafe { ::core::mem::transmute(kind) }; kind as u64 }); __bindgen_bitfield_unit.set(35usize, 1u8, { - let indirect_reg: u32 = unsafe { ::std::mem::transmute(indirect_reg) }; + let indirect_reg: u32 = unsafe { ::core::mem::transmute(indirect_reg) }; indirect_reg as u64 }); __bindgen_bitfield_unit.set(36usize, 1u8, { - let indirect_base: u32 = unsafe { ::std::mem::transmute(indirect_base) }; + let indirect_base: u32 = unsafe { ::core::mem::transmute(indirect_base) }; indirect_base as u64 }); __bindgen_bitfield_unit.set(37usize, 1u8, { - let mem_coherent: u32 = unsafe { ::std::mem::transmute(mem_coherent) }; + let mem_coherent: u32 = unsafe { ::core::mem::transmute(mem_coherent) }; mem_coherent as u64 }); __bindgen_bitfield_unit.set(38usize, 1u8, { - let mem_allocated: u32 = unsafe { ::std::mem::transmute(mem_allocated) }; + let mem_allocated: u32 = unsafe { ::core::mem::transmute(mem_allocated) }; mem_allocated as u64 }); __bindgen_bitfield_unit.set(39usize, 1u8, { - let temp_allocated: u32 = unsafe { ::std::mem::transmute(temp_allocated) }; + let temp_allocated: u32 = unsafe { ::core::mem::transmute(temp_allocated) }; temp_allocated as u64 }); __bindgen_bitfield_unit.set(40usize, 2u8, { - let temp_subindex: u32 = unsafe { ::std::mem::transmute(temp_subindex) }; + let temp_subindex: u32 = unsafe { ::core::mem::transmute(temp_subindex) }; temp_subindex as u64 }); __bindgen_bitfield_unit @@ -7379,27 +7383,27 @@ impl TCGTemp { pub const TCGCallReturnKind_TCG_CALL_RET_NORMAL: TCGCallReturnKind = TCGCallReturnKind(0); pub const TCGCallReturnKind_TCG_CALL_RET_BY_REF: TCGCallReturnKind = TCGCallReturnKind(1); pub const TCGCallReturnKind_TCG_CALL_RET_BY_VEC: TCGCallReturnKind = TCGCallReturnKind(2); -impl ::std::ops::BitOr for TCGCallReturnKind { +impl ::core::ops::BitOr for TCGCallReturnKind { type Output = Self; #[inline] fn bitor(self, other: Self) -> Self { TCGCallReturnKind(self.0 | other.0) } } -impl ::std::ops::BitOrAssign for TCGCallReturnKind { +impl ::core::ops::BitOrAssign for TCGCallReturnKind { #[inline] fn bitor_assign(&mut self, rhs: TCGCallReturnKind) { self.0 |= rhs.0; } } -impl ::std::ops::BitAnd for TCGCallReturnKind { +impl ::core::ops::BitAnd for TCGCallReturnKind { type Output = Self; #[inline] fn bitand(self, other: Self) -> Self { TCGCallReturnKind(self.0 & other.0) } } -impl ::std::ops::BitAndAssign for TCGCallReturnKind { +impl ::core::ops::BitAndAssign for TCGCallReturnKind { #[inline] fn bitand_assign(&mut self, rhs: TCGCallReturnKind) { self.0 &= rhs.0; @@ -7415,27 +7419,27 @@ pub const TCGCallArgumentKind_TCG_CALL_ARG_EXTEND_U: TCGCallArgumentKind = TCGCa pub const TCGCallArgumentKind_TCG_CALL_ARG_EXTEND_S: TCGCallArgumentKind = TCGCallArgumentKind(4); pub const TCGCallArgumentKind_TCG_CALL_ARG_BY_REF: TCGCallArgumentKind = TCGCallArgumentKind(5); pub const TCGCallArgumentKind_TCG_CALL_ARG_BY_REF_N: TCGCallArgumentKind = TCGCallArgumentKind(6); -impl ::std::ops::BitOr for TCGCallArgumentKind { +impl ::core::ops::BitOr for TCGCallArgumentKind { type Output = Self; #[inline] fn bitor(self, other: Self) -> Self { TCGCallArgumentKind(self.0 | other.0) } } -impl ::std::ops::BitOrAssign for TCGCallArgumentKind { +impl ::core::ops::BitOrAssign for TCGCallArgumentKind { #[inline] fn bitor_assign(&mut self, rhs: TCGCallArgumentKind) { self.0 |= rhs.0; } } -impl ::std::ops::BitAnd for TCGCallArgumentKind { +impl ::core::ops::BitAnd for TCGCallArgumentKind { type Output = Self; #[inline] fn bitand(self, other: Self) -> Self { TCGCallArgumentKind(self.0 & other.0) } } -impl ::std::ops::BitAndAssign for TCGCallArgumentKind { +impl ::core::ops::BitAndAssign for TCGCallArgumentKind { #[inline] fn bitand_assign(&mut self, rhs: TCGCallArgumentKind) { self.0 &= rhs.0; @@ -7453,14 +7457,14 @@ pub struct TCGCallArgumentLoc { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of TCGCallArgumentLoc"][::std::mem::size_of::() - 4usize]; - ["Alignment of TCGCallArgumentLoc"][::std::mem::align_of::() - 4usize]; + ["Size of TCGCallArgumentLoc"][::core::mem::size_of::() - 4usize]; + ["Alignment of TCGCallArgumentLoc"][::core::mem::align_of::() - 4usize]; }; impl Default for TCGCallArgumentLoc { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -7468,19 +7472,19 @@ impl Default for TCGCallArgumentLoc { impl TCGCallArgumentLoc { #[inline] pub fn kind(&self) -> TCGCallArgumentKind { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) } } #[inline] pub fn set_kind(&mut self, val: TCGCallArgumentKind) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); self._bitfield_1.set(0usize, 8u8, val as u64) } } #[inline] pub unsafe fn kind_raw(this: *const Self) -> TCGCallArgumentKind { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), 0usize, 8u8, @@ -7490,7 +7494,7 @@ impl TCGCallArgumentLoc { #[inline] pub unsafe fn set_kind_raw(this: *mut Self, val: TCGCallArgumentKind) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, @@ -7501,19 +7505,19 @@ impl TCGCallArgumentLoc { } #[inline] pub fn arg_slot(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) } } #[inline] pub fn set_arg_slot(&mut self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); self._bitfield_1.set(8usize, 8u8, val as u64) } } #[inline] pub unsafe fn arg_slot_raw(this: *const Self) -> ::std::os::raw::c_uint { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), 8usize, 8u8, @@ -7523,7 +7527,7 @@ impl TCGCallArgumentLoc { #[inline] pub unsafe fn set_arg_slot_raw(this: *mut Self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, @@ -7534,19 +7538,19 @@ impl TCGCallArgumentLoc { } #[inline] pub fn ref_slot(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 8u8) as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 8u8) as u32) } } #[inline] pub fn set_ref_slot(&mut self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); self._bitfield_1.set(16usize, 8u8, val as u64) } } #[inline] pub unsafe fn ref_slot_raw(this: *const Self) -> ::std::os::raw::c_uint { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), 16usize, 8u8, @@ -7556,7 +7560,7 @@ impl TCGCallArgumentLoc { #[inline] pub unsafe fn set_ref_slot_raw(this: *mut Self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), 16usize, @@ -7567,19 +7571,19 @@ impl TCGCallArgumentLoc { } #[inline] pub fn arg_idx(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(24usize, 4u8) as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 4u8) as u32) } } #[inline] pub fn set_arg_idx(&mut self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); self._bitfield_1.set(24usize, 4u8, val as u64) } } #[inline] pub unsafe fn arg_idx_raw(this: *const Self) -> ::std::os::raw::c_uint { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), 24usize, 4u8, @@ -7589,7 +7593,7 @@ impl TCGCallArgumentLoc { #[inline] pub unsafe fn set_arg_idx_raw(this: *mut Self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), 24usize, @@ -7600,19 +7604,19 @@ impl TCGCallArgumentLoc { } #[inline] pub fn tmp_subindex(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(28usize, 2u8) as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(28usize, 2u8) as u32) } } #[inline] pub fn set_tmp_subindex(&mut self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); self._bitfield_1.set(28usize, 2u8, val as u64) } } #[inline] pub unsafe fn tmp_subindex_raw(this: *const Self) -> ::std::os::raw::c_uint { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), 28usize, 2u8, @@ -7622,7 +7626,7 @@ impl TCGCallArgumentLoc { #[inline] pub unsafe fn set_tmp_subindex_raw(this: *mut Self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), 28usize, @@ -7641,23 +7645,23 @@ impl TCGCallArgumentLoc { ) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 8u8, { - let kind: u32 = unsafe { ::std::mem::transmute(kind) }; + let kind: u32 = unsafe { ::core::mem::transmute(kind) }; kind as u64 }); __bindgen_bitfield_unit.set(8usize, 8u8, { - let arg_slot: u32 = unsafe { ::std::mem::transmute(arg_slot) }; + let arg_slot: u32 = unsafe { ::core::mem::transmute(arg_slot) }; arg_slot as u64 }); __bindgen_bitfield_unit.set(16usize, 8u8, { - let ref_slot: u32 = unsafe { ::std::mem::transmute(ref_slot) }; + let ref_slot: u32 = unsafe { ::core::mem::transmute(ref_slot) }; ref_slot as u64 }); __bindgen_bitfield_unit.set(24usize, 4u8, { - let arg_idx: u32 = unsafe { ::std::mem::transmute(arg_idx) }; + let arg_idx: u32 = unsafe { ::core::mem::transmute(arg_idx) }; arg_idx as u64 }); __bindgen_bitfield_unit.set(28usize, 2u8, { - let tmp_subindex: u32 = unsafe { ::std::mem::transmute(tmp_subindex) }; + let tmp_subindex: u32 = unsafe { ::core::mem::transmute(tmp_subindex) }; tmp_subindex as u64 }); __bindgen_bitfield_unit @@ -7675,8 +7679,8 @@ pub struct TCGHelperInfo { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of TCGHelperInfo"][::std::mem::size_of::() - 88usize]; - ["Alignment of TCGHelperInfo"][::std::mem::align_of::() - 8usize]; + ["Size of TCGHelperInfo"][::core::mem::size_of::() - 88usize]; + ["Alignment of TCGHelperInfo"][::core::mem::align_of::() - 8usize]; ["Offset of field: TCGHelperInfo::func"][::std::mem::offset_of!(TCGHelperInfo, func) - 0usize]; ["Offset of field: TCGHelperInfo::name"][::std::mem::offset_of!(TCGHelperInfo, name) - 8usize]; ["Offset of field: TCGHelperInfo::init"][::std::mem::offset_of!(TCGHelperInfo, init) - 16usize]; @@ -7684,9 +7688,9 @@ const _: () = { }; impl Default for TCGHelperInfo { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -7694,19 +7698,19 @@ impl Default for TCGHelperInfo { impl TCGHelperInfo { #[inline] pub fn typemask(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 32u8) as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 32u8) as u32) } } #[inline] pub fn set_typemask(&mut self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); self._bitfield_1.set(0usize, 32u8, val as u64) } } #[inline] pub unsafe fn typemask_raw(this: *const Self) -> ::std::os::raw::c_uint { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), 0usize, 32u8, @@ -7716,7 +7720,7 @@ impl TCGHelperInfo { #[inline] pub unsafe fn set_typemask_raw(this: *mut Self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, @@ -7727,19 +7731,19 @@ impl TCGHelperInfo { } #[inline] pub fn flags(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 8u8) as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(32usize, 8u8) as u32) } } #[inline] pub fn set_flags(&mut self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); self._bitfield_1.set(32usize, 8u8, val as u64) } } #[inline] pub unsafe fn flags_raw(this: *const Self) -> ::std::os::raw::c_uint { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), 32usize, 8u8, @@ -7749,7 +7753,7 @@ impl TCGHelperInfo { #[inline] pub unsafe fn set_flags_raw(this: *mut Self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), 32usize, @@ -7760,19 +7764,19 @@ impl TCGHelperInfo { } #[inline] pub fn nr_in(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(40usize, 8u8) as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(40usize, 8u8) as u32) } } #[inline] pub fn set_nr_in(&mut self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); self._bitfield_1.set(40usize, 8u8, val as u64) } } #[inline] pub unsafe fn nr_in_raw(this: *const Self) -> ::std::os::raw::c_uint { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), 40usize, 8u8, @@ -7782,7 +7786,7 @@ impl TCGHelperInfo { #[inline] pub unsafe fn set_nr_in_raw(this: *mut Self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), 40usize, @@ -7793,19 +7797,19 @@ impl TCGHelperInfo { } #[inline] pub fn nr_out(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(48usize, 8u8) as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(48usize, 8u8) as u32) } } #[inline] pub fn set_nr_out(&mut self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); self._bitfield_1.set(48usize, 8u8, val as u64) } } #[inline] pub unsafe fn nr_out_raw(this: *const Self) -> ::std::os::raw::c_uint { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), 48usize, 8u8, @@ -7815,7 +7819,7 @@ impl TCGHelperInfo { #[inline] pub unsafe fn set_nr_out_raw(this: *mut Self, val: ::std::os::raw::c_uint) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), 48usize, @@ -7826,19 +7830,19 @@ impl TCGHelperInfo { } #[inline] pub fn out_kind(&self) -> TCGCallReturnKind { - unsafe { ::std::mem::transmute(self._bitfield_1.get(56usize, 8u8) as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(56usize, 8u8) as u32) } } #[inline] pub fn set_out_kind(&mut self, val: TCGCallReturnKind) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); self._bitfield_1.set(56usize, 8u8, val as u64) } } #[inline] pub unsafe fn out_kind_raw(this: *const Self) -> TCGCallReturnKind { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), 56usize, 8u8, @@ -7848,7 +7852,7 @@ impl TCGHelperInfo { #[inline] pub unsafe fn set_out_kind_raw(this: *mut Self, val: TCGCallReturnKind) { unsafe { - let val: u32 = ::std::mem::transmute(val); + let val: u32 = ::core::mem::transmute(val); <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), 56usize, @@ -7867,23 +7871,23 @@ impl TCGHelperInfo { ) -> __BindgenBitfieldUnit<[u8; 8usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 32u8, { - let typemask: u32 = unsafe { ::std::mem::transmute(typemask) }; + let typemask: u32 = unsafe { ::core::mem::transmute(typemask) }; typemask as u64 }); __bindgen_bitfield_unit.set(32usize, 8u8, { - let flags: u32 = unsafe { ::std::mem::transmute(flags) }; + let flags: u32 = unsafe { ::core::mem::transmute(flags) }; flags as u64 }); __bindgen_bitfield_unit.set(40usize, 8u8, { - let nr_in: u32 = unsafe { ::std::mem::transmute(nr_in) }; + let nr_in: u32 = unsafe { ::core::mem::transmute(nr_in) }; nr_in as u64 }); __bindgen_bitfield_unit.set(48usize, 8u8, { - let nr_out: u32 = unsafe { ::std::mem::transmute(nr_out) }; + let nr_out: u32 = unsafe { ::core::mem::transmute(nr_out) }; nr_out as u64 }); __bindgen_bitfield_unit.set(56usize, 8u8, { - let out_kind: u32 = unsafe { ::std::mem::transmute(out_kind) }; + let out_kind: u32 = unsafe { ::core::mem::transmute(out_kind) }; out_kind as u64 }); __bindgen_bitfield_unit @@ -7901,8 +7905,8 @@ pub struct qemu_plugin_hwaddr { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of qemu_plugin_hwaddr"][::std::mem::size_of::() - 24usize]; - ["Alignment of qemu_plugin_hwaddr"][::std::mem::align_of::() - 8usize]; + ["Size of qemu_plugin_hwaddr"][::core::mem::size_of::() - 24usize]; + ["Alignment of qemu_plugin_hwaddr"][::core::mem::align_of::() - 8usize]; ["Offset of field: qemu_plugin_hwaddr::is_io"] [::std::mem::offset_of!(qemu_plugin_hwaddr, is_io) - 0usize]; ["Offset of field: qemu_plugin_hwaddr::is_store"] @@ -7914,9 +7918,9 @@ const _: () = { }; impl Default for qemu_plugin_hwaddr { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -7981,7 +7985,7 @@ unsafe extern "C" { #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct libafl_custom_gdb_cmd { - pub callback: ::std::option::Option< + pub callback: ::core::option::Option< unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void, arg2: *mut u8, arg3: usize) -> bool, >, pub data: *mut ::std::os::raw::c_void, @@ -7989,9 +7993,9 @@ pub struct libafl_custom_gdb_cmd { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of libafl_custom_gdb_cmd"][::std::mem::size_of::() - 24usize]; + ["Size of libafl_custom_gdb_cmd"][::core::mem::size_of::() - 24usize]; ["Alignment of libafl_custom_gdb_cmd"] - [::std::mem::align_of::() - 8usize]; + [::core::mem::align_of::() - 8usize]; ["Offset of field: libafl_custom_gdb_cmd::callback"] [::std::mem::offset_of!(libafl_custom_gdb_cmd, callback) - 0usize]; ["Offset of field: libafl_custom_gdb_cmd::data"] @@ -8001,16 +8005,16 @@ const _: () = { }; impl Default for libafl_custom_gdb_cmd { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } unsafe extern "C" { pub fn libafl_qemu_add_gdb_cmd( - callback: ::std::option::Option< + callback: ::core::option::Option< unsafe extern "C" fn( arg1: *mut ::std::os::raw::c_void, arg2: *mut u8, @@ -8044,7 +8048,7 @@ unsafe extern "C" { unsafe extern "C" { pub fn libafl_tcg_gen_asan(addr: *mut TCGTemp, size: usize); } -pub type libafl_backdoor_exec_cb = ::std::option::Option< +pub type libafl_backdoor_exec_cb = ::core::option::Option< unsafe extern "C" fn(data: u64, cpu: *mut CPUArchState, pc: target_ulong), >; #[repr(C)] @@ -8057,8 +8061,8 @@ pub struct libafl_backdoor_hook { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of libafl_backdoor_hook"][::std::mem::size_of::() - 112usize]; - ["Alignment of libafl_backdoor_hook"][::std::mem::align_of::() - 8usize]; + ["Size of libafl_backdoor_hook"][::core::mem::size_of::() - 112usize]; + ["Alignment of libafl_backdoor_hook"][::core::mem::align_of::() - 8usize]; ["Offset of field: libafl_backdoor_hook::data"] [::std::mem::offset_of!(libafl_backdoor_hook, data) - 0usize]; ["Offset of field: libafl_backdoor_hook::num"] @@ -8070,9 +8074,9 @@ const _: () = { }; impl Default for libafl_backdoor_hook { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -8090,13 +8094,13 @@ unsafe extern "C" { pub fn libafl_qemu_hook_backdoor_run(pc_next: vaddr); } pub type libafl_block_pre_gen_cb = - ::std::option::Option u64>; -pub type libafl_block_post_gen_cb = ::std::option::Option< + ::core::option::Option u64>; +pub type libafl_block_post_gen_cb = ::core::option::Option< unsafe extern "C" fn(data: u64, pc: target_ulong, block_length: target_ulong), >; -pub type libafl_block_exec_cb = ::std::option::Option; +pub type libafl_block_exec_cb = ::core::option::Option; pub type libafl_block_jit_cb = - ::std::option::Option usize>; + ::core::option::Option usize>; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct libafl_block_hook { @@ -8110,8 +8114,8 @@ pub struct libafl_block_hook { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of libafl_block_hook"][::std::mem::size_of::() - 136usize]; - ["Alignment of libafl_block_hook"][::std::mem::align_of::() - 8usize]; + ["Size of libafl_block_hook"][::core::mem::size_of::() - 136usize]; + ["Alignment of libafl_block_hook"][::core::mem::align_of::() - 8usize]; ["Offset of field: libafl_block_hook::pre_gen_cb"] [::std::mem::offset_of!(libafl_block_hook, pre_gen_cb) - 0usize]; ["Offset of field: libafl_block_hook::post_gen_cb"] @@ -8129,9 +8133,9 @@ const _: () = { }; impl Default for libafl_block_hook { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -8160,15 +8164,15 @@ unsafe extern "C" { pub fn libafl_qemu_hook_block_post_run(tb: *mut TranslationBlock, pc: vaddr); } pub type libafl_cmp_gen_cb = - ::std::option::Option u64>; + ::core::option::Option u64>; pub type libafl_cmp_exec1_cb = - ::std::option::Option; + ::core::option::Option; pub type libafl_cmp_exec2_cb = - ::std::option::Option; + ::core::option::Option; pub type libafl_cmp_exec4_cb = - ::std::option::Option; + ::core::option::Option; pub type libafl_cmp_exec8_cb = - ::std::option::Option; + ::core::option::Option; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct libafl_cmp_hook { @@ -8183,8 +8187,8 @@ pub struct libafl_cmp_hook { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of libafl_cmp_hook"][::std::mem::size_of::() - 384usize]; - ["Alignment of libafl_cmp_hook"][::std::mem::align_of::() - 8usize]; + ["Size of libafl_cmp_hook"][::core::mem::size_of::() - 384usize]; + ["Alignment of libafl_cmp_hook"][::core::mem::align_of::() - 8usize]; ["Offset of field: libafl_cmp_hook::gen_cb"] [::std::mem::offset_of!(libafl_cmp_hook, gen_cb) - 0usize]; ["Offset of field: libafl_cmp_hook::data"] @@ -8204,9 +8208,9 @@ const _: () = { }; impl Default for libafl_cmp_hook { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -8230,12 +8234,12 @@ unsafe extern "C" { invalidate: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -pub type libafl_edge_gen_cb = ::std::option::Option< +pub type libafl_edge_gen_cb = ::core::option::Option< unsafe extern "C" fn(data: u64, src: target_ulong, dst: target_ulong) -> u64, >; -pub type libafl_edge_exec_cb = ::std::option::Option; +pub type libafl_edge_exec_cb = ::core::option::Option; pub type libafl_edge_jit_cb = - ::std::option::Option usize>; + ::core::option::Option usize>; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct libafl_edge_hook { @@ -8249,8 +8253,8 @@ pub struct libafl_edge_hook { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of libafl_edge_hook"][::std::mem::size_of::() - 136usize]; - ["Alignment of libafl_edge_hook"][::std::mem::align_of::() - 8usize]; + ["Size of libafl_edge_hook"][::core::mem::size_of::() - 136usize]; + ["Alignment of libafl_edge_hook"][::core::mem::align_of::() - 8usize]; ["Offset of field: libafl_edge_hook::gen_cb"] [::std::mem::offset_of!(libafl_edge_hook, gen_cb) - 0usize]; ["Offset of field: libafl_edge_hook::jit_cb"] @@ -8268,9 +8272,9 @@ const _: () = { }; impl Default for libafl_edge_hook { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -8309,7 +8313,7 @@ unsafe extern "C" { pub fn libafl_qemu_hook_edge_run(); } pub type libafl_instruction_cb = - ::std::option::Option; + ::core::option::Option; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct libafl_instruction_hook { @@ -8322,9 +8326,9 @@ pub struct libafl_instruction_hook { #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of libafl_instruction_hook"] - [::std::mem::size_of::() - 120usize]; + [::core::mem::size_of::() - 120usize]; ["Alignment of libafl_instruction_hook"] - [::std::mem::align_of::() - 8usize]; + [::core::mem::align_of::() - 8usize]; ["Offset of field: libafl_instruction_hook::data"] [::std::mem::offset_of!(libafl_instruction_hook, data) - 0usize]; ["Offset of field: libafl_instruction_hook::num"] @@ -8338,9 +8342,9 @@ const _: () = { }; impl Default for libafl_instruction_hook { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -8371,13 +8375,13 @@ unsafe extern "C" { unsafe extern "C" { pub fn libafl_qemu_hook_instruction_run(pc_next: vaddr); } -pub type libafl_rw_gen_cb = ::std::option::Option< +pub type libafl_rw_gen_cb = ::core::option::Option< unsafe extern "C" fn(data: u64, pc: target_ulong, addr: *mut TCGTemp, oi: MemOpIdx) -> u64, >; -pub type libafl_rw_exec_cb = ::std::option::Option< +pub type libafl_rw_exec_cb = ::core::option::Option< unsafe extern "C" fn(data: u64, id: u64, pc: target_ulong, addr: target_ulong), >; -pub type libafl_rw_execN_cb = ::std::option::Option< +pub type libafl_rw_execN_cb = ::core::option::Option< unsafe extern "C" fn(data: u64, id: u64, pc: target_ulong, addr: target_ulong, size: usize), >; #[repr(C)] @@ -8395,8 +8399,8 @@ pub struct libafl_rw_hook { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of libafl_rw_hook"][::std::mem::size_of::() - 472usize]; - ["Alignment of libafl_rw_hook"][::std::mem::align_of::() - 8usize]; + ["Size of libafl_rw_hook"][::core::mem::size_of::() - 472usize]; + ["Alignment of libafl_rw_hook"][::core::mem::align_of::() - 8usize]; ["Offset of field: libafl_rw_hook::gen_cb"] [::std::mem::offset_of!(libafl_rw_hook, gen_cb) - 0usize]; ["Offset of field: libafl_rw_hook::data"] @@ -8417,9 +8421,9 @@ const _: () = { }; impl Default for libafl_rw_hook { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -8465,7 +8469,7 @@ unsafe extern "C" { ) -> ::std::os::raw::c_int; } pub type libafl_cpu_run_fn = - ::std::option::Option; + ::core::option::Option; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct libafl_cpu_run_hook { @@ -8477,8 +8481,8 @@ pub struct libafl_cpu_run_hook { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of libafl_cpu_run_hook"][::std::mem::size_of::() - 40usize]; - ["Alignment of libafl_cpu_run_hook"][::std::mem::align_of::() - 8usize]; + ["Size of libafl_cpu_run_hook"][::core::mem::size_of::() - 40usize]; + ["Alignment of libafl_cpu_run_hook"][::core::mem::align_of::() - 8usize]; ["Offset of field: libafl_cpu_run_hook::pre_cpu_run"] [::std::mem::offset_of!(libafl_cpu_run_hook, pre_cpu_run) - 0usize]; ["Offset of field: libafl_cpu_run_hook::post_cpu_run"] @@ -8492,9 +8496,9 @@ const _: () = { }; impl Default for libafl_cpu_run_hook { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -8521,7 +8525,7 @@ unsafe extern "C" { #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct libafl_new_thread_hook { - pub callback: ::std::option::Option< + pub callback: ::core::option::Option< unsafe extern "C" fn(data: u64, cpu: *mut CPUArchState, tid: u32) -> bool, >, pub data: u64, @@ -8530,9 +8534,9 @@ pub struct libafl_new_thread_hook { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of libafl_new_thread_hook"][::std::mem::size_of::() - 32usize]; + ["Size of libafl_new_thread_hook"][::core::mem::size_of::() - 32usize]; ["Alignment of libafl_new_thread_hook"] - [::std::mem::align_of::() - 8usize]; + [::core::mem::align_of::() - 8usize]; ["Offset of field: libafl_new_thread_hook::callback"] [::std::mem::offset_of!(libafl_new_thread_hook, callback) - 0usize]; ["Offset of field: libafl_new_thread_hook::data"] @@ -8544,16 +8548,16 @@ const _: () = { }; impl Default for libafl_new_thread_hook { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } unsafe extern "C" { pub fn libafl_add_new_thread_hook( - callback: ::std::option::Option< + callback: ::core::option::Option< unsafe extern "C" fn(data: u64, env: *mut CPUArchState, tid: u32) -> bool, >, data: u64, @@ -8573,8 +8577,8 @@ pub struct syshook_ret { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of syshook_ret"][::std::mem::size_of::() - 16usize]; - ["Alignment of syshook_ret"][::std::mem::align_of::() - 8usize]; + ["Size of syshook_ret"][::core::mem::size_of::() - 16usize]; + ["Alignment of syshook_ret"][::core::mem::align_of::() - 8usize]; ["Offset of field: syshook_ret::retval"][::std::mem::offset_of!(syshook_ret, retval) - 0usize]; ["Offset of field: syshook_ret::skip_syscall"] [::std::mem::offset_of!(syshook_ret, skip_syscall) - 8usize]; @@ -8582,7 +8586,7 @@ const _: () = { #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct libafl_pre_syscall_hook { - pub callback: ::std::option::Option< + pub callback: ::core::option::Option< unsafe extern "C" fn( data: u64, sys_num: ::std::os::raw::c_int, @@ -8602,9 +8606,10 @@ pub struct libafl_pre_syscall_hook { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of libafl_pre_syscall_hook"][::std::mem::size_of::() - 32usize]; + ["Size of libafl_pre_syscall_hook"] + [::core::mem::size_of::() - 32usize]; ["Alignment of libafl_pre_syscall_hook"] - [::std::mem::align_of::() - 8usize]; + [::core::mem::align_of::() - 8usize]; ["Offset of field: libafl_pre_syscall_hook::callback"] [::std::mem::offset_of!(libafl_pre_syscall_hook, callback) - 0usize]; ["Offset of field: libafl_pre_syscall_hook::data"] @@ -8616,9 +8621,9 @@ const _: () = { }; impl Default for libafl_pre_syscall_hook { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } @@ -8626,7 +8631,7 @@ impl Default for libafl_pre_syscall_hook { #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct libafl_post_syscall_hook { - pub callback: ::std::option::Option< + pub callback: ::core::option::Option< unsafe extern "C" fn( data: u64, ret: target_ulong, @@ -8648,9 +8653,9 @@ pub struct libafl_post_syscall_hook { #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { ["Size of libafl_post_syscall_hook"] - [::std::mem::size_of::() - 32usize]; + [::core::mem::size_of::() - 32usize]; ["Alignment of libafl_post_syscall_hook"] - [::std::mem::align_of::() - 8usize]; + [::core::mem::align_of::() - 8usize]; ["Offset of field: libafl_post_syscall_hook::callback"] [::std::mem::offset_of!(libafl_post_syscall_hook, callback) - 0usize]; ["Offset of field: libafl_post_syscall_hook::data"] @@ -8662,16 +8667,16 @@ const _: () = { }; impl Default for libafl_post_syscall_hook { fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + let mut s = ::core::mem::MaybeUninit::::uninit(); unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } unsafe extern "C" { pub fn libafl_add_pre_syscall_hook( - callback: ::std::option::Option< + callback: ::core::option::Option< unsafe extern "C" fn( data: u64, sys_num: ::std::os::raw::c_int, @@ -8690,7 +8695,7 @@ unsafe extern "C" { } unsafe extern "C" { pub fn libafl_add_post_syscall_hook( - callback: ::std::option::Option< + callback: ::core::option::Option< unsafe extern "C" fn( data: u64, ret: target_ulong, diff --git a/libafl_qemu/libafl_qemu_sys/src/lib.rs b/libafl_qemu/libafl_qemu_sys/src/lib.rs index 9ac068ca19..51f8999faa 100644 --- a/libafl_qemu/libafl_qemu_sys/src/lib.rs +++ b/libafl_qemu/libafl_qemu_sys/src/lib.rs @@ -7,9 +7,9 @@ __Warning__: The documentation is built by default for `x86_64` in `usermode`. T #![cfg_attr(nightly, feature(used_with_arg))] +use core::ffi::c_void; #[cfg(target_os = "linux")] use core::ops::BitAnd; -use std::ffi::c_void; use num_enum::{IntoPrimitive, TryFromPrimitive}; use strum_macros::EnumIter; diff --git a/libafl_qemu/libafl_qemu_sys/src/usermode.rs b/libafl_qemu/libafl_qemu_sys/src/usermode.rs index 6cbce5f4f1..81d065d6e4 100644 --- a/libafl_qemu/libafl_qemu_sys/src/usermode.rs +++ b/libafl_qemu/libafl_qemu_sys/src/usermode.rs @@ -1,7 +1,7 @@ +#[cfg(feature = "python")] +use core::convert::Infallible; #[cfg(target_os = "linux")] use core::{slice::from_raw_parts, str::from_utf8_unchecked}; -#[cfg(feature = "python")] -use std::convert::Infallible; #[cfg(target_os = "linux")] use libc::{c_char, strlen}; diff --git a/libafl_qemu/src/modules/calls.rs b/libafl_qemu/src/modules/calls.rs index ac288a41d3..49e84fb31f 100644 --- a/libafl_qemu/src/modules/calls.rs +++ b/libafl_qemu/src/modules/calls.rs @@ -361,9 +361,7 @@ where iaddr += insn.bytes().len() as GuestAddr; #[cfg(feature = "usermode")] - unsafe { - code = std::slice::from_raw_parts(qemu.g2h(iaddr), 512); - } + code = unsafe { std::slice::from_raw_parts(qemu.g2h(iaddr), 512) }; #[cfg(feature = "systemmode")] if let Err(err) = qemu.read_mem(pc, code) { // TODO handle faults diff --git a/libafl_qemu/src/modules/cmplog.rs b/libafl_qemu/src/modules/cmplog.rs index d73ca697f5..4fee3e5525 100644 --- a/libafl_qemu/src/modules/cmplog.rs +++ b/libafl_qemu/src/modules/cmplog.rs @@ -346,7 +346,7 @@ impl CmpLogRoutinesModule { let mut code = { #[cfg(feature = "usermode")] unsafe { - std::slice::from_raw_parts(qemu.g2h(pc), 512) + std::slice::from_raw_parts(qemu.g2h(pc), 512); } #[cfg(feature = "systemmode")] &mut [0; 512] @@ -389,9 +389,7 @@ impl CmpLogRoutinesModule { iaddr += insn.bytes().len() as GuestAddr; #[cfg(feature = "usermode")] - unsafe { - code = std::slice::from_raw_parts(qemu.g2h(iaddr), 512); - } + code = unsafe { std::slice::from_raw_parts(qemu.g2h(iaddr), 512) }; #[cfg(feature = "systemmode")] unsafe { qemu.read_mem(pc, code); diff --git a/libafl_qemu/src/modules/utils/filters.rs b/libafl_qemu/src/modules/utils/filters.rs index 9859204667..f1d0c19f34 100644 --- a/libafl_qemu/src/modules/utils/filters.rs +++ b/libafl_qemu/src/modules/utils/filters.rs @@ -323,7 +323,7 @@ mod tests { use libafl_bolts::tuples::tuple_list; use crate::modules::{ - EmulatorModule, EmulatorModuleTuple, + EmulatorModule, utils::filters::{ AddressFilter, NopAddressFilter, NopPageFilter, PageFilter, StdAddressFilter, StdPageFilter, diff --git a/libafl_targets/src/drcov.rs b/libafl_targets/src/drcov.rs index cdd5d6900d..f9f4891a8a 100644 --- a/libafl_targets/src/drcov.rs +++ b/libafl_targets/src/drcov.rs @@ -63,7 +63,7 @@ impl From for [u8; 8] { size_of::<[u8; 8]>(), "`DrCovBasicBlockEntry` size changed!" ); - unsafe { std::slice::from_raw_parts(ptr::from_ref(&value).cast::(), 8) } + unsafe { core::slice::from_raw_parts(ptr::from_ref(&value).cast::(), 8) } .try_into() .unwrap() } @@ -75,7 +75,7 @@ impl From<&DrCovBasicBlockEntry> for &[u8] { // The value is a c struct. // Casting its pointer to bytes should be safe. unsafe { - std::slice::from_raw_parts( + core::slice::from_raw_parts( ptr::from_ref(value).cast::(), size_of::(), ) @@ -539,12 +539,8 @@ impl DrCovReader { #[cfg(test)] mod test { - use std::{ - env::temp_dir, - fs, - path::PathBuf, - string::{String, ToString}, - }; + use alloc::string::{String, ToString}; + use std::{env::temp_dir, fs, path::PathBuf}; use rangemap::RangeMap; diff --git a/libafl_targets/src/libfuzzer/mutators.rs b/libafl_targets/src/libfuzzer/mutators.rs index 7ea691bf5b..3e7ad39fb1 100644 --- a/libafl_targets/src/libfuzzer/mutators.rs +++ b/libafl_targets/src/libfuzzer/mutators.rs @@ -1,13 +1,10 @@ use alloc::{ borrow::Cow, + boxed::Box, rc::{Rc, Weak}, + vec::Vec, }; -use std::{ - cell::RefCell, - marker::PhantomData, - ops::Deref, - prelude::rust_2015::{Box, Vec}, -}; +use core::{cell::RefCell, marker::PhantomData, ops::Deref}; use libafl::{ Error, diff --git a/libafl_targets/src/libfuzzer/observers/oom.rs b/libafl_targets/src/libfuzzer/observers/oom.rs index ff3701ff6c..bc8f3b1522 100644 --- a/libafl_targets/src/libfuzzer/observers/oom.rs +++ b/libafl_targets/src/libfuzzer/observers/oom.rs @@ -1,6 +1,9 @@ use alloc::borrow::Cow; -use core::{ffi::c_void, fmt::Debug}; -use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering}; +use core::{ + ffi::c_void, + fmt::Debug, + sync::atomic::{AtomicBool, AtomicUsize, Ordering}, +}; use libafl::{ Error, diff --git a/libafl_targets/src/sancov_8bit.rs b/libafl_targets/src/sancov_8bit.rs index e44a41dfbe..96100d3ebe 100644 --- a/libafl_targets/src/sancov_8bit.rs +++ b/libafl_targets/src/sancov_8bit.rs @@ -11,6 +11,7 @@ pub static mut COUNTERS_MAPS: Vec> = Vec::new(); /// /// # Safety /// The resulting pointer points to a global. Handle with care! +#[must_use] pub unsafe fn counters_maps_ptr() -> *const Vec> { &raw const COUNTERS_MAPS } @@ -29,8 +30,8 @@ pub unsafe fn counters_maps_ptr_mut() -> *mut Vec> { /// You are responsible for ensuring there is no multi-mutability! #[must_use] pub unsafe fn extra_counters() -> Vec> { - let counter_maps = unsafe { &*counters_maps_ptr() }; - counter_maps + let counters_maps = unsafe { &*counters_maps_ptr() }; + counters_maps .iter() .map(|counters| unsafe { OwnedMutSlice::from_raw_parts_mut( @@ -49,8 +50,8 @@ pub unsafe fn extra_counters() -> Vec> { #[expect(clippy::cast_sign_loss)] pub unsafe extern "C" fn __sanitizer_cov_8bit_counters_init(start: *mut u8, stop: *mut u8) { unsafe { - let counter_maps = &mut *counters_maps_ptr_mut(); - for existing in counter_maps { + let counters_maps = &mut *counters_maps_ptr_mut(); + for existing in counters_maps { let range = existing.as_slice_mut().as_mut_ptr() ..=existing .as_slice_mut() @@ -66,9 +67,9 @@ pub unsafe extern "C" fn __sanitizer_cov_8bit_counters_init(start: *mut u8, stop } } - let counter_maps = &mut *counters_maps_ptr_mut(); + let counters_maps = &mut *counters_maps_ptr_mut(); // we didn't overlap; keep going - counter_maps.push(OwnedMutSlice::from_raw_parts_mut( + counters_maps.push(OwnedMutSlice::from_raw_parts_mut( start, stop.offset_from(start) as usize, )); diff --git a/libafl_tinyinst/src/executor.rs b/libafl_tinyinst/src/executor.rs index 84f261dcde..955909e922 100644 --- a/libafl_tinyinst/src/executor.rs +++ b/libafl_tinyinst/src/executor.rs @@ -1,5 +1,9 @@ -use core::{marker::PhantomData, ptr, time::Duration}; -use std::fmt::{Debug, Formatter}; +use core::{ + fmt::{Debug, Formatter}, + marker::PhantomData, + ptr, + time::Duration, +}; use libafl::{ Error, @@ -35,7 +39,7 @@ impl TinyInstExecutor<(), NopShMem, ()> { } impl Debug for TinyInstExecutor { - fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), std::fmt::Error> { + fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), core::fmt::Error> { f.debug_struct("TinyInstExecutor") .field("timeout", &self.timeout) .finish_non_exhaustive() diff --git a/scripts/autofix.sh b/scripts/autofix.sh index b253c90d2d..e50288adbe 100755 --- a/scripts/autofix.sh +++ b/scripts/autofix.sh @@ -17,22 +17,13 @@ echo "[+] Done fixing build" echo echo 'Fixing clippy (might need a "git commit" and a rerun, if "cargo fix" changed the source)' -RUST_BACKTRACE=full cargo +nightly clippy --fix --release --all --all-features --tests --examples --benches --allow-dirty --allow-staged -- -Z macro-backtrace \ - -D clippy::all \ - -D clippy::pedantic \ - -W clippy::similar_names \ - -A clippy::type_repetition_in_bounds \ - -A clippy::missing-errors-doc \ - -A clippy::cast-possible-truncation \ - -A clippy::used-underscore-binding \ - -A clippy::ptr-as-ptr \ - -A clippy::missing-panics-doc \ - -A clippy::missing-docs-in-private-items \ - -A clippy::unseparated-literal-suffix \ - -A clippy::module-name-repetitions \ - -A clippy::unreadable-literal \ +RUST_BACKTRACE=full cargo +nightly clippy --fix --release --all --all-features --tests --examples --benches --allow-dirty --allow-staged --broken-code -- -Z macro-backtrace -cargo +nightly clippy --fix --tests --examples --benches --all-features --allow-dirty --allow-staged +cargo +nightly fmt + +cargo +nightly clippy --fix --tests --examples --benches --all-features --allow-dirty --allow-staged --broken-code + +cargo +nightly fmt echo "[+] Done fixing clippy" echo diff --git a/scripts/precommit.sh b/scripts/precommit.sh index 1740315cdb..c7d226bea0 100755 --- a/scripts/precommit.sh +++ b/scripts/precommit.sh @@ -2,12 +2,19 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" cd "$SCRIPT_DIR/.." || exit 1 +echo "[!] Running precommit script." +echo +echo echo "[*] Formatting this beautiful code" echo "$SCRIPT_DIR"/fmt_all.sh || exit 1 echo echo "[*] Asking clippy how to excel" echo -"$SCRIPT_DIR"/fmt_all.sh || exit 1 +"$SCRIPT_DIR"/clippy.sh || { + echo "[!] Error: clippy wasn't succesful." >&2 + echo "[*] Hint: run scripts/autofix.sh to fix a bunch of errors automatically." >&2 + exit 1 # Exit the script with a non-zero status. +} echo -echo "[!] All done. Ready to commit!" +echo "[!] All done. Ready to commit!" \ No newline at end of file diff --git a/utils/gramatron/construct_automata/src/main.rs b/utils/gramatron/construct_automata/src/main.rs index 0d2e7c4a95..f580cf3d52 100644 --- a/utils/gramatron/construct_automata/src/main.rs +++ b/utils/gramatron/construct_automata/src/main.rs @@ -1,9 +1,11 @@ +extern crate alloc; + +use alloc::{collections::VecDeque, rc::Rc}; use std::{ - collections::{HashSet, VecDeque}, + collections::HashSet, fs, io::{BufReader, Write}, path::{Path, PathBuf}, - rc::Rc, sync::OnceLock, }; diff --git a/utils/libafl_benches/benches/hash_speeds.rs b/utils/libafl_benches/benches/hash_speeds.rs index 527118aa22..2118788c6c 100644 --- a/utils/libafl_benches/benches/hash_speeds.rs +++ b/utils/libafl_benches/benches/hash_speeds.rs @@ -1,6 +1,6 @@ //! Compare the speed of rust hash implementations -use std::{ +use core::{ hash::{BuildHasher, Hasher}, num::NonZero, }; diff --git a/utils/libafl_jumper/src/main.rs b/utils/libafl_jumper/src/main.rs index 2d9c75724b..f8a4472395 100644 --- a/utils/libafl_jumper/src/main.rs +++ b/utils/libafl_jumper/src/main.rs @@ -27,57 +27,59 @@ fn panic(_panic: &PanicInfo<'_>) -> ! { #[inline(never)] #[unsafe(no_mangle)] pub unsafe extern "C" fn libafl_jmp(target: *mut c_void) -> ! { - #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] - asm!( - "jmp {target}", // Jump on x86 - target = in(reg) target, - options(noreturn) - ); + unsafe { + #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] + asm!( + "jmp {target}", // Jump on x86 + target = in(reg) target, + options(noreturn) + ); - #[cfg(target_arch = "arm")] - asm!( - "bx {target}", // Branch and exchange instruction (ARM) - target = in(reg) target, - options(noreturn) - ); + #[cfg(target_arch = "arm")] + asm!( + "bx {target}", // Branch and exchange instruction (ARM) + target = in(reg) target, + options(noreturn) + ); - #[cfg(target_arch = "aarch64")] - asm!( - "br {target}", // Branch register instruction (AArch64) - target = in(reg) target, - options(noreturn) - ); + #[cfg(target_arch = "aarch64")] + asm!( + "br {target}", // Branch register instruction (AArch64) + target = in(reg) target, + options(noreturn) + ); - #[cfg(target_arch = "hexagon")] - asm!( - "jumpr {target}", // Jump register instruction (Hexagon) - target = in(reg) target, - options(noreturn) - ); + #[cfg(target_arch = "hexagon")] + asm!( + "jumpr {target}", // Jump register instruction (Hexagon) + target = in(reg) target, + options(noreturn) + ); - #[cfg(any(target_arch = "powerpc", target_arch = "powerpc64"))] - asm!( - "b {target}", // Branch instruction (PowerPC) - target = in(reg) target, - options(noreturn) - ); + #[cfg(any(target_arch = "powerpc", target_arch = "powerpc64"))] + asm!( + "b {target}", // Branch instruction (PowerPC) + target = in(reg) target, + options(noreturn) + ); - #[cfg(any(target_arch = "riscv32", target_arch = "riscv64"))] - asm!( - "jalr x0, {target}, 0", // Jump and link register (RISC-V) - target = in(reg) target, - options(noreturn) - ); + #[cfg(any(target_arch = "riscv32", target_arch = "riscv64"))] + asm!( + "jalr x0, {target}, 0", // Jump and link register (RISC-V) + target = in(reg) target, + options(noreturn) + ); - #[cfg(target_arch = "mips")] - asm!( - "jr {target}", // Jump register (MIPS) - "nop", // Delay slot - target = in(reg) target, - options(noreturn) - ); + #[cfg(target_arch = "mips")] + asm!( + "jr {target}", // Jump register (MIPS) + "nop", // Delay slot + target = in(reg) target, + options(noreturn) + ); - //unreachable!("asm should have jumped!"); + //unreachable!("asm should have jumped!"); + } } /// The "normal" rust main, mainly for testing