Replace all uses of &foo[] with &foo[..] en masse.

This commit is contained in:
Niko Matsakis
2015-02-18 14:48:57 -05:00
parent 64cd30e0ca
commit 9ea84aeed4
145 changed files with 865 additions and 864 deletions

View File

@@ -196,7 +196,7 @@ impl<'a> StringReader<'a> {
let mut m = m.to_string();
m.push_str(": ");
for c in c.escape_default() { m.push(c) }
self.fatal_span_(from_pos, to_pos, &m[]);
self.fatal_span_(from_pos, to_pos, &m[..]);
}
/// Report a lexical error spanning [`from_pos`, `to_pos`), appending an
@@ -205,7 +205,7 @@ impl<'a> StringReader<'a> {
let mut m = m.to_string();
m.push_str(": ");
for c in c.escape_default() { m.push(c) }
self.err_span_(from_pos, to_pos, &m[]);
self.err_span_(from_pos, to_pos, &m[..]);
}
/// Report a lexical error spanning [`from_pos`, `to_pos`), appending the
@@ -215,7 +215,7 @@ impl<'a> StringReader<'a> {
let from = self.byte_offset(from_pos).to_usize();
let to = self.byte_offset(to_pos).to_usize();
m.push_str(&self.filemap.src[from..to]);
self.fatal_span_(from_pos, to_pos, &m[]);
self.fatal_span_(from_pos, to_pos, &m[..]);
}
/// Advance peek_tok and peek_span to refer to the next token, and
@@ -556,7 +556,7 @@ impl<'a> StringReader<'a> {
self.translate_crlf(start_bpos, string,
"bare CR not allowed in block doc-comment")
} else { string.into_cow() };
token::DocComment(token::intern(&string[]))
token::DocComment(token::intern(&string[..]))
} else {
token::Comment
};