Rustup to rustc 1.25.0-nightly (7d6e5b9da 2018-01-27)

This commit is contained in:
Seiichi Uchida
2018-01-28 16:28:48 +09:00
parent 0a4634397c
commit e40bc64f4f
2 changed files with 4 additions and 4 deletions
+2 -1
View File
@@ -1167,7 +1167,8 @@ fn check_fold_with_op(
then {
// Span containing `.fold(...)`
let fold_span = fold_args[0].span.next_point().with_hi(fold_args[2].span.hi() + BytePos(1));
let next_point = cx.sess().codemap().next_point(fold_args[0].span);
let fold_span = next_point.with_hi(fold_args[2].span.hi() + BytePos(1));
let sugg = if replacement_has_args {
format!(
+2 -3
View File
@@ -502,9 +502,8 @@ fn suggest_prepend_item(&mut self, cx: &T, item: Span, msg: &str, new_item: &str
fn suggest_remove_item(&mut self, cx: &T, item: Span, msg: &str) {
let mut remove_span = item;
let fmpos = cx.sess()
.codemap()
.lookup_byte_offset(remove_span.next_point().hi());
let hi = cx.sess().codemap().next_point(remove_span).hi();
let fmpos = cx.sess().codemap().lookup_byte_offset(hi);
if let Some(ref src) = fmpos.fm.src {
let non_whitespace_offset = src[fmpos.pos.to_usize()..].find(|c| c != ' ' && c != '\t' && c != '\n');