Skip to content

Commit 729c50d

Browse files
authored
Rollup merge of rust-lang#57764 - Xanewok:tiny-tweaks, r=nikomatsakis
Fix some minor warnings Since apparently RLS works when initialized in the root repository (:tada:) I decided to fix some of the issues it caught. There are a lot of unused attribute warnings left on `rustc_on_unimplemented` and `rustc_layout_scalar_valid_range_start` but I imagine we can't do much about it due to 2-stage compilation?
2 parents f1d90a9 + ff41abc commit 729c50d

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/libfmt_macros/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
test(attr(deny(warnings))))]
1212

1313
#![feature(nll)]
14+
#![feature(rustc_private)]
1415

1516
pub use self::Piece::*;
1617
pub use self::Position::*;

src/libtest/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#![feature(asm)]
2626
#![cfg_attr(stage0, feature(cfg_target_vendor))]
2727
#![feature(fnbox)]
28-
#![cfg_attr(any(unix, target_os = "cloudabi"), feature(libc))]
28+
#![cfg_attr(any(unix, target_os = "cloudabi"), feature(libc, rustc_private))]
2929
#![feature(nll)]
3030
#![feature(set_stdio)]
3131
#![feature(panic_unwind)]

src/tools/linkchecker/main.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ impl FileEntry {
7878
fn parse_ids(&mut self, file: &Path, contents: &str, errors: &mut bool) {
7979
if self.ids.is_empty() {
8080
with_attrs_in_source(contents, " id", |fragment, i, _| {
81-
let frag = fragment.trim_left_matches("#").to_owned();
81+
let frag = fragment.trim_start_matches("#").to_owned();
8282
let encoded = small_url_encode(&frag);
8383
if !self.ids.insert(frag) {
8484
*errors = true;
@@ -343,7 +343,7 @@ fn with_attrs_in_source<F: FnMut(&str, usize, &str)>(contents: &str, attr: &str,
343343
Some(i) => i,
344344
None => continue,
345345
};
346-
if rest[..pos_equals].trim_left_matches(" ") != "" {
346+
if rest[..pos_equals].trim_start_matches(" ") != "" {
347347
continue;
348348
}
349349

@@ -355,7 +355,7 @@ fn with_attrs_in_source<F: FnMut(&str, usize, &str)>(contents: &str, attr: &str,
355355
};
356356
let quote_delim = rest.as_bytes()[pos_quote] as char;
357357

358-
if rest[..pos_quote].trim_left_matches(" ") != "" {
358+
if rest[..pos_quote].trim_start_matches(" ") != "" {
359359
continue;
360360
}
361361
let rest = &rest[pos_quote + 1..];

0 commit comments

Comments
 (0)