mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
Rustup to rustc 1.25.0-nightly (7d6e5b9da 2018-01-27)
This commit is contained in:
@@ -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!(
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user