Skip to content

Commit

Permalink
Merge pull request #582 from saethlin/rustc-serialize
Browse files Browse the repository at this point in the history
Fix CI
  • Loading branch information
ChrisDenton authored Feb 16, 2024
2 parents 7b7c103 + bcd6212 commit 0249531
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 17 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ci/run-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
6 changes: 3 additions & 3 deletions src/print/fuchsia.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")] {
Expand Down
15 changes: 5 additions & 10 deletions tests/current-exe-mismatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)) => {
Expand All @@ -34,7 +34,7 @@ const VAR: &str = "__THE_TEST_YOU_ARE_LUKE";

#[derive(Debug)]
enum EarlyExit {
IgnoreTest(String),
IgnoreTest,
IoError(std::io::Error),
}

Expand All @@ -47,7 +47,7 @@ impl From<std::io::Error> 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();
Expand Down Expand Up @@ -111,7 +111,7 @@ fn find_interpreter(me: &Path) -> Result<PathBuf, EarlyExit> {
.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() {
Expand All @@ -124,11 +124,6 @@ fn find_interpreter(me: &Path) -> Result<PathBuf, EarlyExit> {
}
}
}

Err(EarlyExit::IgnoreTest(
"could not find interpreter from readelf output".into(),
))
} else {
Err(EarlyExit::IgnoreTest("readelf returned non-success".into()))
}
Err(EarlyExit::IgnoreTest)
}

0 comments on commit 0249531

Please sign in to comment.