rollup merge of #21258: aturon/stab-3-index

Conflicts:
	src/libcore/ops.rs
	src/librustc_typeck/astconv.rs
	src/libstd/io/mem.rs
	src/libsyntax/parse/lexer/mod.rs
This commit is contained in:
Alex Crichton
2015-01-21 11:53:49 -08:00
59 changed files with 352 additions and 429 deletions

View File

@@ -271,9 +271,9 @@ impl<'a> StringReader<'a> {
fn with_str_from_to<T, F>(&self, start: BytePos, end: BytePos, f: F) -> T where
F: FnOnce(&str) -> T,
{
f(self.filemap.src.slice(
self.byte_offset(start).to_usize(),
self.byte_offset(end).to_usize()))
f(self.filemap.src[
self.byte_offset(start).to_usize()..
self.byte_offset(end).to_usize()])
}
/// Converts CRLF to LF in the given string, raising an error on bare CR.