diff --git a/Cargo.lock b/Cargo.lock index 619a1392f..dc930c70b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -157,9 +157,9 @@ checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustc-serialize" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" +checksum = "fe834bc780604f4674073badbad26d7219cadfb4a2275802db12cbae17498401" [[package]] name = "serde" diff --git a/ci/run-docker.sh b/ci/run-docker.sh index 8aa6d84a4..ea77c785d 100755 --- a/ci/run-docker.sh +++ b/ci/run-docker.sh @@ -18,7 +18,7 @@ run() { --volume `pwd`/target:/checkout/target \ --workdir /checkout \ --privileged \ - --env RUSTFLAGS \ + --env RUSTFLAGS="-Lnative=/usr/lib/x86_64-linux-musl/" \ backtrace \ bash \ -c 'PATH=$PATH:/rust/bin exec ci/run.sh' diff --git a/src/print/fuchsia.rs b/src/print/fuchsia.rs index cb872697d..6e0e7ddd0 100644 --- a/src/print/fuchsia.rs +++ b/src/print/fuchsia.rs @@ -336,7 +336,7 @@ fn get_build_id<'a>(info: &'a dl_phdr_info) -> Option<&'a [u8]> { enum Error { /// NameError means that an error occurred while converting a C style string /// into a rust string. - NameError(core::str::Utf8Error), + NameError, /// BuildIDError means that we didn't find a build ID. This could either be /// because the DSO had no build ID or because the segment containing the /// build ID was malformed. @@ -362,8 +362,8 @@ fn for_each_dso(mut visitor: &mut DsoPrinter<'_, '_>) { unsafe { core::slice::from_raw_parts(info.name as *const u8, name_len) }; let name = match core::str::from_utf8(name_slice) { Ok(name) => name, - Err(err) => { - return visitor.error(Error::NameError(err)) as i32; + Err(_) => { + return visitor.error(Error::NameError) as i32; } }; let build_id = match get_build_id(info) { diff --git a/src/windows.rs b/src/windows.rs index e85fbf167..4e72de8a8 100644 --- a/src/windows.rs +++ b/src/windows.rs @@ -7,7 +7,7 @@ //! This module largely exists to integrate into libstd itself where winapi is //! not currently available. -#![allow(bad_style, dead_code)] +#![allow(bad_style, dead_code, unused)] cfg_if::cfg_if! { if #[cfg(feature = "verify-winapi")] { diff --git a/tests/current-exe-mismatch.rs b/tests/current-exe-mismatch.rs index b655827fb..e305b6677 100644 --- a/tests/current-exe-mismatch.rs +++ b/tests/current-exe-mismatch.rs @@ -16,7 +16,7 @@ fn main() { Ok(()) => { println!("test result: ok"); } - Err(EarlyExit::IgnoreTest(_)) => { + Err(EarlyExit::IgnoreTest) => { println!("test result: ignored"); } Err(EarlyExit::IoError(e)) => { @@ -34,7 +34,7 @@ const VAR: &str = "__THE_TEST_YOU_ARE_LUKE"; #[derive(Debug)] enum EarlyExit { - IgnoreTest(String), + IgnoreTest, IoError(std::io::Error), } @@ -47,7 +47,7 @@ impl From for EarlyExit { fn parent() -> Result<(), EarlyExit> { // If we cannot re-exec this test, there's no point in trying to do it. if common::cannot_reexec_the_test() { - return Err(EarlyExit::IgnoreTest("(cannot reexec)".into())); + return Err(EarlyExit::IgnoreTest); } let me = std::env::current_exe().unwrap(); @@ -111,7 +111,7 @@ fn find_interpreter(me: &Path) -> Result { .arg("-l") .arg(me) .output() - .map_err(|_err| EarlyExit::IgnoreTest("readelf invocation failed".into()))?; + .map_err(|_| EarlyExit::IgnoreTest)?; if result.status.success() { let r = BufReader::new(&result.stdout[..]); for line in r.lines() { @@ -124,11 +124,6 @@ fn find_interpreter(me: &Path) -> Result { } } } - - Err(EarlyExit::IgnoreTest( - "could not find interpreter from readelf output".into(), - )) - } else { - Err(EarlyExit::IgnoreTest("readelf returned non-success".into())) } + Err(EarlyExit::IgnoreTest) }