From 9da87c88454379df97a1a065daa14ed1d5817f29 Mon Sep 17 00:00:00 2001 From: Rasmus Thomsen Date: Fri, 24 May 2019 00:44:00 +0200 Subject: community/rust: upgrade to 1.34.2 * Adopt maintainership Closes GH-8057 --- community/rust/minimize-rpath.patch | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'community/rust/minimize-rpath.patch') diff --git a/community/rust/minimize-rpath.patch b/community/rust/minimize-rpath.patch index 8d3be50cbe..1d89d7d5af 100644 --- a/community/rust/minimize-rpath.patch +++ b/community/rust/minimize-rpath.patch @@ -31,7 +31,7 @@ and skip it there. @@ -87,11 +88,13 @@ } - fn get_rpaths_relative_to_output(config: &mut RPathConfig, + fn get_rpaths_relative_to_output(config: &mut RPathConfig<'_>, - libs: &[PathBuf]) -> Vec { - libs.iter().map(|a| get_rpath_relative_to_output(config, a)).collect() + libs: &[PathBuf], @@ -39,15 +39,15 @@ and skip it there. + libs.iter().filter_map(|a| get_rpath_relative_to_output(config, a, omit)).collect() } --fn get_rpath_relative_to_output(config: &mut RPathConfig, lib: &Path) -> String { -+fn get_rpath_relative_to_output(config: &mut RPathConfig, lib: &Path, +-fn get_rpath_relative_to_output(config: &mut RPathConfig<'_>, lib: &Path) -> String { ++fn get_rpath_relative_to_output(config: &mut RPathConfig<'_>, lib: &Path, + omit: &Vec) -> Option { // Mac doesn't appear to support $ORIGIN let prefix = if config.is_like_osx { "@loader_path" @@ -105,10 +108,16 @@ let mut output = cwd.join(&config.out_filename); - output.pop(); + output.pop(); // strip filename let output = fs::canonicalize(&output).unwrap_or(output); - let relative = path_relative_from(&lib, &output).unwrap_or_else(|| - panic!("couldn't create relative path from {:?} to {:?}", output, lib)); @@ -97,4 +97,3 @@ and skip it there. assert_eq!(res, "$ORIGIN/../lib"); } } - -- cgit v1.2.3