From c14508fd252742e6f7ad99b1519ef1039b1eb80c Mon Sep 17 00:00:00 2001 From: Igor Matuszewski Date: Sun, 20 Jan 2019 00:04:28 +0100 Subject: [PATCH 1/2] Add missing #![feature(rustc_private)] annotation --- src/libfmt_macros/lib.rs | 1 + src/libtest/lib.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libfmt_macros/lib.rs b/src/libfmt_macros/lib.rs index 32ae878909f30..5127c76b55c6d 100644 --- a/src/libfmt_macros/lib.rs +++ b/src/libfmt_macros/lib.rs @@ -11,6 +11,7 @@ test(attr(deny(warnings))))] #![feature(nll)] +#![feature(rustc_private)] pub use self::Piece::*; pub use self::Position::*; diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index 2cc80ddea2df4..fc03e685b6f54 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -25,7 +25,7 @@ #![feature(asm)] #![cfg_attr(stage0, feature(cfg_target_vendor))] #![feature(fnbox)] -#![cfg_attr(any(unix, target_os = "cloudabi"), feature(libc))] +#![cfg_attr(any(unix, target_os = "cloudabi"), feature(libc, rustc_private))] #![feature(nll)] #![feature(set_stdio)] #![feature(panic_unwind)] From ff41abcf8bbeefae4df033d6a1bac1543d67c388 Mon Sep 17 00:00:00 2001 From: Igor Matuszewski Date: Sun, 20 Jan 2019 00:05:10 +0100 Subject: [PATCH 2/2] linkchecker: Update deprecated trim_left_matches usage --- src/tools/linkchecker/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tools/linkchecker/main.rs b/src/tools/linkchecker/main.rs index 59662be349dcb..2cf0fcfd34cd6 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(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(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..];