u-riscv64-format-1
authorDebian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Sun, 5 Jan 2020 13:35:46 +0000 (13:35 +0000)
committerXimin Luo <infinity0@debian.org>
Sun, 5 Jan 2020 13:35:46 +0000 (13:35 +0000)
commit 60091ee826b071a122ad4ef4ae833591e1db553b
gpg: Signature made Sat 30 Nov 2019 02:32:46 GMT
gpg:                using RSA key 4628C5D82CFF65D68164A78AF9BA143B95FF6D82
gpg: Can't check signature: No public key
Author: David Tolnay <dtolnay@gmail.com>
Date:   Wed Nov 27 10:28:21 2019 -0800

    Format libstd/os with rustfmt

    This commit applies rustfmt with rust-lang/rust's default settings to
    files in src/libstd/os *that are not involved in any currently open PR*
    to minimize merge conflicts. THe list of files involved in open PRs was
    determined by querying GitHub's GraphQL API with this script:
    https://gist.github.com/dtolnay/aa9c34993dc051a4f344d1b10e4487e8

    With the list of files from the script in outstanding_files, the
    relevant commands were:

        $ find src/libstd/os -name '*.rs' \
            | xargs rustfmt --edition=2018 --unstable-features --skip-children
        $ rg libstd/os outstanding_files | xargs git checkout --

    Repeating this process several months apart should get us coverage of
    most of the rest of the files.

    To confirm no funny business:

        $ git checkout $THIS_COMMIT^
        $ git show --pretty= --name-only $THIS_COMMIT \
            | xargs rustfmt --edition=2018 --unstable-features --skip-children
        $ git diff $THIS_COMMIT  # there should be no difference

Gbp-Pq: Name u-riscv64-format-1.patch

src/libstd/os/linux/raw.rs
src/libstd/os/raw/mod.rs

index 21e1cf8a22b4b18d36999995433f0f91b6a327bc..d9b2236047bdf78184b737556c7f0ece83ff2cc4 100644 (file)
@@ -1,41 +1,53 @@
 //! Linux-specific raw type definitions
 
 #![stable(feature = "raw_ext", since = "1.1.0")]
-#![rustc_deprecated(since = "1.8.0",
-                    reason = "these type aliases are no longer supported by \
-                              the standard library, the `libc` crate on \
-                              crates.io should be used instead for the correct \
-                              definitions")]
+#![rustc_deprecated(
+    since = "1.8.0",
+    reason = "these type aliases are no longer supported by \
+              the standard library, the `libc` crate on \
+              crates.io should be used instead for the correct \
+              definitions"
+)]
 #![allow(deprecated)]
 #![allow(missing_debug_implementations)]
 
 use crate::os::raw::c_ulong;
 
-#[stable(feature = "raw_ext", since = "1.1.0")] pub type dev_t = u64;
-#[stable(feature = "raw_ext", since = "1.1.0")] pub type mode_t = u32;
+#[stable(feature = "raw_ext", since = "1.1.0")]
+pub type dev_t = u64;
+#[stable(feature = "raw_ext", since = "1.1.0")]
+pub type mode_t = u32;
 
 #[stable(feature = "pthread_t", since = "1.8.0")]
 pub type pthread_t = c_ulong;
 
 #[doc(inline)]
 #[stable(feature = "raw_ext", since = "1.1.0")]
-pub use self::arch::{off_t, ino_t, nlink_t, blksize_t, blkcnt_t, stat, time_t};
+pub use self::arch::{blkcnt_t, blksize_t, ino_t, nlink_t, off_t, stat, time_t};
 
-#[cfg(any(target_arch = "x86",
-          target_arch = "le32",
-          target_arch = "powerpc",
-          target_arch = "arm",
-          target_arch = "asmjs",
-          target_arch = "wasm32"))]
+#[cfg(any(
+    target_arch = "x86",
+    target_arch = "le32",
+    target_arch = "powerpc",
+    target_arch = "arm",
+    target_arch = "asmjs",
+    target_arch = "wasm32"
+))]
 mod arch {
     use crate::os::raw::{c_long, c_short, c_uint};
 
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = u64;
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = u64;
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u64;
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = u64;
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = u64;
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type blkcnt_t = u64;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type blksize_t = u64;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type ino_t = u64;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type nlink_t = u64;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type off_t = u64;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type time_t = i64;
 
     #[repr(C)]
     #[derive(Clone)]
@@ -87,20 +99,29 @@ mod arch {
     use crate::os::raw::{c_long, c_ulong};
 
     #[cfg(target_env = "musl")]
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = i64;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type blkcnt_t = i64;
     #[cfg(not(target_env = "musl"))]
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = u64;
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = u64;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type blkcnt_t = u64;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type blksize_t = u64;
     #[cfg(target_env = "musl")]
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u64;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type ino_t = u64;
     #[cfg(not(target_env = "musl"))]
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u64;
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = u64;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type ino_t = u64;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type nlink_t = u64;
     #[cfg(target_env = "musl")]
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = u64;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type off_t = u64;
     #[cfg(not(target_env = "musl"))]
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = u64;
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type off_t = u64;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type time_t = i64;
 
     #[repr(C)]
     #[derive(Clone)]
@@ -149,14 +170,20 @@ mod arch {
 
 #[cfg(target_arch = "hexagon")]
 mod arch {
-    use crate::os::raw::{c_long, c_int, c_longlong, culonglong};
+    use crate::os::raw::{c_int, c_long, c_longlong, culonglong};
 
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = c_longlong;
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = c_long;
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = c_ulonglong;
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = c_uint;
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = c_longlong;
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = c_long;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type blkcnt_t = c_longlong;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type blksize_t = c_long;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type ino_t = c_ulonglong;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type nlink_t = c_uint;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type off_t = c_longlong;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type time_t = c_long;
 
     #[repr(C)]
     #[derive(Clone)]
@@ -199,27 +226,31 @@ mod arch {
         #[stable(feature = "raw_ext", since = "1.1.0")]
         pub st_ctime_nsec: ::c_long,
         #[stable(feature = "raw_ext", since = "1.1.0")]
-        pub __pad3: [::c_int;2],
+        pub __pad3: [::c_int; 2],
     }
 }
 
-#[cfg(any(target_arch = "mips64",
-          target_arch = "s390x",
-          target_arch = "sparc64"))]
+#[cfg(any(target_arch = "mips64", target_arch = "s390x", target_arch = "sparc64"))]
 mod arch {
-    pub use libc::{off_t, ino_t, nlink_t, blksize_t, blkcnt_t, stat, time_t};
+    pub use libc::{blkcnt_t, blksize_t, ino_t, nlink_t, off_t, stat, time_t};
 }
 
 #[cfg(target_arch = "aarch64")]
 mod arch {
-    use crate::os::raw::{c_long, c_int};
+    use crate::os::raw::{c_int, c_long};
 
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = u64;
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = u64;
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u64;
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = u64;
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = u64;
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type blkcnt_t = u64;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type blksize_t = u64;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type ino_t = u64;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type nlink_t = u64;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type off_t = u64;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type time_t = i64;
 
     #[repr(C)]
     #[derive(Clone)]
@@ -268,14 +299,20 @@ mod arch {
 
 #[cfg(any(target_arch = "x86_64", target_arch = "powerpc64"))]
 mod arch {
-    use crate::os::raw::{c_long, c_int};
+    use crate::os::raw::{c_int, c_long};
 
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = u64;
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = u64;
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u64;
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = u64;
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = u64;
-    #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type blkcnt_t = u64;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type blksize_t = u64;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type ino_t = u64;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type nlink_t = u64;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type off_t = u64;
+    #[stable(feature = "raw_ext", since = "1.1.0")]
+    pub type time_t = i64;
 
     #[repr(C)]
     #[derive(Clone)]
index 611a1709c8d91c688fc5014ecad786eec9c5baea..e09012007f2d4d59fe31e425e3bc40ec9418bdc8 100644 (file)
 #![stable(feature = "raw_os", since = "1.1.0")]
 
 #[doc(include = "char.md")]
-#[cfg(any(all(target_os = "linux", any(target_arch = "aarch64",
-                                       target_arch = "arm",
-                                       target_arch = "hexagon",
-                                       target_arch = "powerpc",
-                                       target_arch = "powerpc64",
-                                       target_arch = "s390x")),
-          all(target_os = "android", any(target_arch = "aarch64",
-                                         target_arch = "arm")),
-          all(target_os = "l4re", target_arch = "x86_64"),
-          all(target_os = "freebsd", any(target_arch = "aarch64",
-                                         target_arch = "arm",
-                                         target_arch = "powerpc",
-                                         target_arch = "powerpc64")),
-          all(target_os = "netbsd", any(target_arch = "aarch64",
-                                        target_arch = "arm",
-                                        target_arch = "powerpc")),
-          all(target_os = "openbsd", target_arch = "aarch64"),
-          all(target_os = "vxworks", any(target_arch = "aarch64",
-                                         target_arch = "arm",
-                                         target_arch = "powerpc64",
-                                         target_arch = "powerpc")),
-          all(target_os = "fuchsia", target_arch = "aarch64")))]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_char = u8;
+#[cfg(any(
+    all(
+        target_os = "linux",
+        any(
+            target_arch = "aarch64",
+            target_arch = "arm",
+            target_arch = "hexagon",
+            target_arch = "powerpc",
+            target_arch = "powerpc64",
+            target_arch = "s390x"
+        )
+    ),
+    all(target_os = "android", any(target_arch = "aarch64", target_arch = "arm")),
+    all(target_os = "l4re", target_arch = "x86_64"),
+    all(
+        target_os = "freebsd",
+        any(
+            target_arch = "aarch64",
+            target_arch = "arm",
+            target_arch = "powerpc",
+            target_arch = "powerpc64"
+        )
+    ),
+    all(
+        target_os = "netbsd",
+        any(target_arch = "aarch64", target_arch = "arm", target_arch = "powerpc")
+    ),
+    all(target_os = "openbsd", target_arch = "aarch64"),
+    all(
+        target_os = "vxworks",
+        any(
+            target_arch = "aarch64",
+            target_arch = "arm",
+            target_arch = "powerpc64",
+            target_arch = "powerpc"
+        )
+    ),
+    all(target_os = "fuchsia", target_arch = "aarch64")
+))]
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_char = u8;
 #[doc(include = "char.md")]
-#[cfg(not(any(all(target_os = "linux", any(target_arch = "aarch64",
-                                           target_arch = "arm",
-                                           target_arch = "hexagon",
-                                           target_arch = "powerpc",
-                                           target_arch = "powerpc64",
-                                           target_arch = "s390x")),
-              all(target_os = "android", any(target_arch = "aarch64",
-                                             target_arch = "arm")),
-              all(target_os = "l4re", target_arch = "x86_64"),
-              all(target_os = "freebsd", any(target_arch = "aarch64",
-                                             target_arch = "arm",
-                                             target_arch = "powerpc",
-                                             target_arch = "powerpc64")),
-              all(target_os = "netbsd", any(target_arch = "aarch64",
-                                            target_arch = "arm",
-                                            target_arch = "powerpc")),
-              all(target_os = "openbsd", target_arch = "aarch64"),
-              all(target_os = "vxworks", any(target_arch = "aarch64",
-                                             target_arch = "arm",
-                                             target_arch = "powerpc64",
-                                             target_arch = "powerpc")),
-              all(target_os = "fuchsia", target_arch = "aarch64"))))]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_char = i8;
+#[cfg(not(any(
+    all(
+        target_os = "linux",
+        any(
+            target_arch = "aarch64",
+            target_arch = "arm",
+            target_arch = "hexagon",
+            target_arch = "powerpc",
+            target_arch = "powerpc64",
+            target_arch = "s390x"
+        )
+    ),
+    all(target_os = "android", any(target_arch = "aarch64", target_arch = "arm")),
+    all(target_os = "l4re", target_arch = "x86_64"),
+    all(
+        target_os = "freebsd",
+        any(
+            target_arch = "aarch64",
+            target_arch = "arm",
+            target_arch = "powerpc",
+            target_arch = "powerpc64"
+        )
+    ),
+    all(
+        target_os = "netbsd",
+        any(target_arch = "aarch64", target_arch = "arm", target_arch = "powerpc")
+    ),
+    all(target_os = "openbsd", target_arch = "aarch64"),
+    all(
+        target_os = "vxworks",
+        any(
+            target_arch = "aarch64",
+            target_arch = "arm",
+            target_arch = "powerpc64",
+            target_arch = "powerpc"
+        )
+    ),
+    all(target_os = "fuchsia", target_arch = "aarch64")
+)))]
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_char = i8;
 #[doc(include = "schar.md")]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_schar = i8;
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_schar = i8;
 #[doc(include = "uchar.md")]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_uchar = u8;
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_uchar = u8;
 #[doc(include = "short.md")]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_short = i16;
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_short = i16;
 #[doc(include = "ushort.md")]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_ushort = u16;
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_ushort = u16;
 #[doc(include = "int.md")]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_int = i32;
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_int = i32;
 #[doc(include = "uint.md")]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_uint = u32;
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_uint = u32;
 #[doc(include = "long.md")]
 #[cfg(any(target_pointer_width = "32", windows))]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_long = i32;
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_long = i32;
 #[doc(include = "ulong.md")]
 #[cfg(any(target_pointer_width = "32", windows))]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_ulong = u32;
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_ulong = u32;
 #[doc(include = "long.md")]
 #[cfg(all(target_pointer_width = "64", not(windows)))]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_long = i64;
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_long = i64;
 #[doc(include = "ulong.md")]
 #[cfg(all(target_pointer_width = "64", not(windows)))]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_ulong = u64;
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_ulong = u64;
 #[doc(include = "longlong.md")]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_longlong = i64;
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_longlong = i64;
 #[doc(include = "ulonglong.md")]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_ulonglong = u64;
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_ulonglong = u64;
 #[doc(include = "float.md")]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_float = f32;
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_float = f32;
 #[doc(include = "double.md")]
-#[stable(feature = "raw_os", since = "1.1.0")] pub type c_double = f64;
+#[stable(feature = "raw_os", since = "1.1.0")]
+pub type c_double = f64;
 
 #[stable(feature = "raw_os", since = "1.1.0")]
 #[doc(no_inline)]