diff options
| author | Aaron Turon <aturon@mozilla.com> | 2015-01-17 16:15:52 -0800 |
|---|---|---|
| committer | Aaron Turon <aturon@mozilla.com> | 2015-01-21 08:11:07 -0800 |
| commit | a506d4cbfe8f20a2725c7efd9d43359a0bbd0e9e (patch) | |
| tree | d3cc252236786a58efbdd2b3c4bf3f12af88039e /src/libsyntax | |
| parent | 092ba6a8563b5c95f5aa53a705eaba6cc94e2da7 (diff) | |
| download | rust-a506d4cbfe8f20a2725c7efd9d43359a0bbd0e9e.tar.gz rust-a506d4cbfe8f20a2725c7efd9d43359a0bbd0e9e.zip | |
Fallout from stabilization.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/parse/lexer/mod.rs | 6 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs index 4cdafb36eec..7852b077b53 100644 --- a/src/libsyntax/parse/lexer/mod.rs +++ b/src/libsyntax/parse/lexer/mod.rs @@ -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_uint(), - self.byte_offset(end).to_uint())) + f(&self.filemap.src[ + self.byte_offset(start).to_uint().. + self.byte_offset(end).to_uint()]) } /// Converts CRLF to LF in the given string, raising an error on bare CR. diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 83a7504bc49..932c5ce23ea 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -5223,7 +5223,7 @@ impl<'a> Parser<'a> { Some(i) => { let mut err = String::from_str("circular modules: "); let len = included_mod_stack.len(); - for p in included_mod_stack.slice(i, len).iter() { + for p in included_mod_stack[i.. len].iter() { err.push_str(&p.display().as_cow()[]); err.push_str(" -> "); } diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index b59e770c6ba..cf5066ae474 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -1590,7 +1590,7 @@ impl<'a> State<'a> { ident: ast::SpannedIdent, tys: &[P<ast::Ty>], args: &[P<ast::Expr>]) -> IoResult<()> { - let base_args = args.slice_from(1); + let base_args = &args[1..]; try!(self.print_expr(&*args[0])); try!(word(&mut self.s, ".")); try!(self.print_ident(ident.node)); @@ -2312,7 +2312,7 @@ impl<'a> State<'a> { let args = if first { &decl.inputs[] } else { - decl.inputs.slice_from(1) + &decl.inputs[1..] }; for arg in args.iter() { |
