about summary refs log tree commit diff
path: root/library/core/src/ffi
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-07-29 08:13:50 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2024-07-29 08:26:52 +1000
commit84ac80f1921afc243d71fd0caaa4f2838c294102 (patch)
tree29006db815bf547dfd0129910b23b8c54675bd98 /library/core/src/ffi
parent118f9350c5b902e462a6dcc4325670f3da701600 (diff)
Reformat `use` declarations.
The previous commit updated `rustfmt.toml` appropriately. This commit is
the outcome of running `x fmt --all` with the new formatting options.
Diffstat (limited to 'library/core/src/ffi')
-rw-r--r--library/core/src/ffi/c_str.rs9
-rw-r--r--library/core/src/ffi/mod.rs13
-rw-r--r--library/core/src/ffi/va_list.rs1
3 files changed, 7 insertions, 16 deletions
diff --git a/library/core/src/ffi/c_str.rs b/library/core/src/ffi/c_str.rs
index ae42ae3baf4..b1f731c5fe0 100644
--- a/library/core/src/ffi/c_str.rs
+++ b/library/core/src/ffi/c_str.rs
@@ -3,16 +3,11 @@
 use crate::cmp::Ordering;
 use crate::error::Error;
 use crate::ffi::c_char;
-use crate::fmt;
-use crate::intrinsics;
 use crate::iter::FusedIterator;
 use crate::marker::PhantomData;
-use crate::ops;
-use crate::ptr::addr_of;
-use crate::ptr::NonNull;
-use crate::slice;
+use crate::ptr::{addr_of, NonNull};
 use crate::slice::memchr;
-use crate::str;
+use crate::{fmt, intrinsics, ops, slice, str};
 
 // FIXME: because this is doc(inline)d, we *have* to use intra-doc links because the actual link
 //   depends on where the item is being documented. however, since this is libcore, we can't
diff --git a/library/core/src/ffi/mod.rs b/library/core/src/ffi/mod.rs
index 93426b90c70..ec1f9052a15 100644
--- a/library/core/src/ffi/mod.rs
+++ b/library/core/src/ffi/mod.rs
@@ -9,19 +9,16 @@
 #![stable(feature = "core_ffi", since = "1.30.0")]
 #![allow(non_camel_case_types)]
 
-use crate::fmt;
-
-#[doc(no_inline)]
+#[doc(inline)]
 #[stable(feature = "core_c_str", since = "1.64.0")]
-pub use self::c_str::FromBytesWithNulError;
-
+pub use self::c_str::CStr;
 #[doc(no_inline)]
 #[stable(feature = "cstr_from_bytes_until_nul", since = "1.69.0")]
 pub use self::c_str::FromBytesUntilNulError;
-
-#[doc(inline)]
+#[doc(no_inline)]
 #[stable(feature = "core_c_str", since = "1.64.0")]
-pub use self::c_str::CStr;
+pub use self::c_str::FromBytesWithNulError;
+use crate::fmt;
 
 #[unstable(feature = "c_str_module", issue = "112134")]
 pub mod c_str;
diff --git a/library/core/src/ffi/va_list.rs b/library/core/src/ffi/va_list.rs
index dda9e30c24b..3a224e4d8fe 100644
--- a/library/core/src/ffi/va_list.rs
+++ b/library/core/src/ffi/va_list.rs
@@ -3,7 +3,6 @@
 //! Better known as "varargs".
 
 use crate::ffi::c_void;
-
 #[allow(unused_imports)]
 use crate::fmt;
 use crate::marker::PhantomData;