about summary refs log tree commit diff
path: root/library/std/src/sys/unix/android.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-03-24 01:32:32 +0000
committerbors <bors@rust-lang.org>2021-03-24 01:32:32 +0000
commitdb492ecd5ba6bd82205612cebb9034710653f0c2 (patch)
treeb7c353ead50b6fac246982ac11529822593427bb /library/std/src/sys/unix/android.rs
parent673d0db5e393e9c64897005b470bfeb6d5aec61b (diff)
parent5c0d880e4be68c98affee9cc5d40519dcf1e3b7b (diff)
downloadrust-db492ecd5ba6bd82205612cebb9034710653f0c2.tar.gz
rust-db492ecd5ba6bd82205612cebb9034710653f0c2.zip
Auto merge of #83432 - Dylan-DPC:rollup-4z5f6al, r=Dylan-DPC
Rollup of 9 pull requests

Successful merges:

 - #83051 (Sidebar trait items order)
 - #83313 (Only enable assert_dep_graph when query-dep-graph is enabled.)
 - #83353 (Add internal io::Error::new_const to avoid allocations.)
 - #83391 (Allow not emitting `uwtable` on Android)
 - #83392 (Change `-W help` to display edition level.)
 - #83393 (Codeblock tooltip position)
 - #83399 (rustdoc: Record crate name instead of using `None`)
 - #83405 (Slight visual improvements to warning boxes in the docs)
 - #83415 (Remove unnecessary `Option` wrapping around `Crate.module`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src/sys/unix/android.rs')
-rw-r--r--library/std/src/sys/unix/android.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/std/src/sys/unix/android.rs b/library/std/src/sys/unix/android.rs
index ea05ee3d7ce..cf6aa31b7cf 100644
--- a/library/std/src/sys/unix/android.rs
+++ b/library/std/src/sys/unix/android.rs
@@ -96,7 +96,7 @@ pub fn ftruncate64(fd: c_int, size: u64) -> io::Result<()> {
             Some(f) => cvt_r(|| f(fd, size as i64)).map(drop),
             None => {
                 if size > i32::MAX as u64 {
-                    Err(io::Error::new(io::ErrorKind::InvalidInput, "cannot truncate >2GB"))
+                    Err(io::Error::new_const(io::ErrorKind::InvalidInput, &"cannot truncate >2GB"))
                 } else {
                     cvt_r(|| ftruncate(fd, size as i32)).map(drop)
                 }
@@ -123,7 +123,7 @@ pub unsafe fn cvt_pread64(
         if let Ok(o) = offset.try_into() {
             cvt(pread(fd, buf, count, o))
         } else {
-            Err(io::Error::new(io::ErrorKind::InvalidInput, "cannot pread >2GB"))
+            Err(io::Error::new_const(io::ErrorKind::InvalidInput, &"cannot pread >2GB"))
         }
     })
 }
@@ -141,7 +141,7 @@ pub unsafe fn cvt_pwrite64(
         if let Ok(o) = offset.try_into() {
             cvt(pwrite(fd, buf, count, o))
         } else {
-            Err(io::Error::new(io::ErrorKind::InvalidInput, "cannot pwrite >2GB"))
+            Err(io::Error::new_const(io::ErrorKind::InvalidInput, &"cannot pwrite >2GB"))
         }
     })
 }