Skip to content

Commit 0249531

Browse files
authored
Merge pull request #582 from saethlin/rustc-serialize
Fix CI
2 parents 7b7c103 + bcd6212 commit 0249531

File tree

5 files changed

+12
-17
lines changed

5 files changed

+12
-17
lines changed

Cargo.lock

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ci/run-docker.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ run() {
1818
--volume `pwd`/target:/checkout/target \
1919
--workdir /checkout \
2020
--privileged \
21-
--env RUSTFLAGS \
21+
--env RUSTFLAGS="-Lnative=/usr/lib/x86_64-linux-musl/" \
2222
backtrace \
2323
bash \
2424
-c 'PATH=$PATH:/rust/bin exec ci/run.sh'

src/print/fuchsia.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ fn get_build_id<'a>(info: &'a dl_phdr_info) -> Option<&'a [u8]> {
336336
enum Error {
337337
/// NameError means that an error occurred while converting a C style string
338338
/// into a rust string.
339-
NameError(core::str::Utf8Error),
339+
NameError,
340340
/// BuildIDError means that we didn't find a build ID. This could either be
341341
/// because the DSO had no build ID or because the segment containing the
342342
/// build ID was malformed.
@@ -362,8 +362,8 @@ fn for_each_dso(mut visitor: &mut DsoPrinter<'_, '_>) {
362362
unsafe { core::slice::from_raw_parts(info.name as *const u8, name_len) };
363363
let name = match core::str::from_utf8(name_slice) {
364364
Ok(name) => name,
365-
Err(err) => {
366-
return visitor.error(Error::NameError(err)) as i32;
365+
Err(_) => {
366+
return visitor.error(Error::NameError) as i32;
367367
}
368368
};
369369
let build_id = match get_build_id(info) {

src/windows.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//! This module largely exists to integrate into libstd itself where winapi is
88
//! not currently available.
99
10-
#![allow(bad_style, dead_code)]
10+
#![allow(bad_style, dead_code, unused)]
1111

1212
cfg_if::cfg_if! {
1313
if #[cfg(feature = "verify-winapi")] {

tests/current-exe-mismatch.rs

+5-10
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ fn main() {
1616
Ok(()) => {
1717
println!("test result: ok");
1818
}
19-
Err(EarlyExit::IgnoreTest(_)) => {
19+
Err(EarlyExit::IgnoreTest) => {
2020
println!("test result: ignored");
2121
}
2222
Err(EarlyExit::IoError(e)) => {
@@ -34,7 +34,7 @@ const VAR: &str = "__THE_TEST_YOU_ARE_LUKE";
3434

3535
#[derive(Debug)]
3636
enum EarlyExit {
37-
IgnoreTest(String),
37+
IgnoreTest,
3838
IoError(std::io::Error),
3939
}
4040

@@ -47,7 +47,7 @@ impl From<std::io::Error> for EarlyExit {
4747
fn parent() -> Result<(), EarlyExit> {
4848
// If we cannot re-exec this test, there's no point in trying to do it.
4949
if common::cannot_reexec_the_test() {
50-
return Err(EarlyExit::IgnoreTest("(cannot reexec)".into()));
50+
return Err(EarlyExit::IgnoreTest);
5151
}
5252

5353
let me = std::env::current_exe().unwrap();
@@ -111,7 +111,7 @@ fn find_interpreter(me: &Path) -> Result<PathBuf, EarlyExit> {
111111
.arg("-l")
112112
.arg(me)
113113
.output()
114-
.map_err(|_err| EarlyExit::IgnoreTest("readelf invocation failed".into()))?;
114+
.map_err(|_| EarlyExit::IgnoreTest)?;
115115
if result.status.success() {
116116
let r = BufReader::new(&result.stdout[..]);
117117
for line in r.lines() {
@@ -124,11 +124,6 @@ fn find_interpreter(me: &Path) -> Result<PathBuf, EarlyExit> {
124124
}
125125
}
126126
}
127-
128-
Err(EarlyExit::IgnoreTest(
129-
"could not find interpreter from readelf output".into(),
130-
))
131-
} else {
132-
Err(EarlyExit::IgnoreTest("readelf returned non-success".into()))
133127
}
128+
Err(EarlyExit::IgnoreTest)
134129
}

0 commit comments

Comments
 (0)