Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some minor warnings #57764

Merged
merged 2 commits into from
Jan 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/libfmt_macros/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
test(attr(deny(warnings))))]

#![feature(nll)]
#![feature(rustc_private)]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to is_xid_{start, continue}


pub use self::Piece::*;
pub use self::Position::*;
Expand Down
2 changes: 1 addition & 1 deletion src/libtest/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any libc usage was warned against due to missing rustc_private annotation

#![feature(nll)]
#![feature(set_stdio)]
#![feature(panic_unwind)]
Expand Down
6 changes: 3 additions & 3 deletions src/tools/linkchecker/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand All @@ -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..];
Expand Down