Fix deprecations for self-rebuild
This commit is contained in:
parent
a87304bdb0
commit
f712684d1b
57
0001-Backport-deprecation-fixes-from-commit-b7f030e.patch
Normal file
57
0001-Backport-deprecation-fixes-from-commit-b7f030e.patch
Normal file
@ -0,0 +1,57 @@
|
||||
From 55030c7543d8e877ec7a6b577a51422c38f01259 Mon Sep 17 00:00:00 2001
|
||||
From: Josh Stone <jistone@redhat.com>
|
||||
Date: Fri, 1 Mar 2019 09:27:45 -0800
|
||||
Subject: [PATCH] Backport deprecation fixes from commit b7f030e
|
||||
|
||||
---
|
||||
src/tools/linkchecker/main.rs | 6 +++---
|
||||
src/tools/tidy/src/features.rs | 2 +-
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/tools/linkchecker/main.rs b/src/tools/linkchecker/main.rs
|
||||
index 59662be349dc..2cf0fcfd34cd 100644
|
||||
--- a/src/tools/linkchecker/main.rs
|
||||
+++ b/src/tools/linkchecker/main.rs
|
||||
@@ -78,7 +78,7 @@ impl FileEntry {
|
||||
fn parse_ids(&mut self, file: &Path, contents: &str, errors: &mut bool) {
|
||||
if self.ids.is_empty() {
|
||||
with_attrs_in_source(contents, " id", |fragment, i, _| {
|
||||
- let frag = fragment.trim_left_matches("#").to_owned();
|
||||
+ let frag = fragment.trim_start_matches("#").to_owned();
|
||||
let encoded = small_url_encode(&frag);
|
||||
if !self.ids.insert(frag) {
|
||||
*errors = true;
|
||||
@@ -343,7 +343,7 @@ fn with_attrs_in_source<F: FnMut(&str, usize, &str)>(contents: &str, attr: &str,
|
||||
Some(i) => i,
|
||||
None => continue,
|
||||
};
|
||||
- if rest[..pos_equals].trim_left_matches(" ") != "" {
|
||||
+ if rest[..pos_equals].trim_start_matches(" ") != "" {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -355,7 +355,7 @@ fn with_attrs_in_source<F: FnMut(&str, usize, &str)>(contents: &str, attr: &str,
|
||||
};
|
||||
let quote_delim = rest.as_bytes()[pos_quote] as char;
|
||||
|
||||
- if rest[..pos_quote].trim_left_matches(" ") != "" {
|
||||
+ if rest[..pos_quote].trim_start_matches(" ") != "" {
|
||||
continue;
|
||||
}
|
||||
let rest = &rest[pos_quote + 1..];
|
||||
diff --git a/src/tools/tidy/src/features.rs b/src/tools/tidy/src/features.rs
|
||||
index 2435a0cfd4e3..bf2cfbf32fc7 100644
|
||||
--- a/src/tools/tidy/src/features.rs
|
||||
+++ b/src/tools/tidy/src/features.rs
|
||||
@@ -188,7 +188,7 @@ pub fn collect_lang_features(base_src_path: &Path, bad: &mut bool) -> Features {
|
||||
}
|
||||
|
||||
let mut parts = line.split(',');
|
||||
- let level = match parts.next().map(|l| l.trim().trim_left_matches('(')) {
|
||||
+ let level = match parts.next().map(|l| l.trim().trim_start_matches('(')) {
|
||||
Some("active") => Status::Unstable,
|
||||
Some("removed") => Status::Removed,
|
||||
Some("accepted") => Status::Stable,
|
||||
--
|
||||
2.20.1
|
||||
|
@ -54,7 +54,7 @@
|
||||
|
||||
Name: rust
|
||||
Version: 1.33.0
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: The Rust Programming Language
|
||||
License: (ASL 2.0 or MIT) and (BSD and MIT)
|
||||
# ^ written as: (rust itself) and (bundled libraries)
|
||||
@ -78,6 +78,9 @@ Patch2: 0001-rust-gdb-relax-the-GDB-version-regex.patch
|
||||
# We do have the necessary fix in our LLVM 7.
|
||||
Patch3: rust-pr57840-llvm7-debuginfo-variants.patch
|
||||
|
||||
# https://github.com/rust-lang/rust/issues/58845
|
||||
Patch4: 0001-Backport-deprecation-fixes-from-commit-b7f030e.patch
|
||||
|
||||
# Get the Rust triple for any arch.
|
||||
%{lua: function rust_triple(arch)
|
||||
local abi = "gnu"
|
||||
@ -411,6 +414,7 @@ pushd vendor/rls-analysis
|
||||
popd
|
||||
%patch2 -p1
|
||||
%patch3 -p1 -R
|
||||
%patch4 -p1
|
||||
|
||||
%if "%{python}" == "python3"
|
||||
sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure
|
||||
@ -691,6 +695,9 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py*
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Mar 01 2019 Josh Stone <jistone@redhat.com> - 1.33.0-2
|
||||
- Fix deprecations for self-rebuild
|
||||
|
||||
* Thu Feb 28 2019 Josh Stone <jistone@redhat.com> - 1.33.0-1
|
||||
- Update to 1.33.0.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user