diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-04-17 15:59:07 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-04-18 10:57:10 -0700 |
| commit | 675b82657e7d9fd4c824ff3c6dbead1edd1ab515 (patch) | |
| tree | ac2ffc0405647555976c3b6b90e98a4e9398eb11 /src/libsyntax | |
| parent | 7d3b0bf3912fabf52fdd6926900e578e55af1b49 (diff) | |
| download | rust-675b82657e7d9fd4c824ff3c6dbead1edd1ab515.tar.gz rust-675b82657e7d9fd4c824ff3c6dbead1edd1ab515.zip | |
Update the rest of the compiler with ~[T] changes
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ext/format.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libsyntax/ext/format.rs b/src/libsyntax/ext/format.rs index 86c7ae28ac2..84021f6362b 100644 --- a/src/libsyntax/ext/format.rs +++ b/src/libsyntax/ext/format.rs @@ -20,7 +20,6 @@ use rsparse = parse; use std::fmt::parse; use collections::{HashMap, HashSet}; -use std::slice; #[deriving(Eq)] enum ArgumentType { @@ -609,7 +608,7 @@ impl<'a, 'b> Context<'a, 'b> { fn to_expr(&self, extra: @ast::Expr) -> @ast::Expr { let mut lets = Vec::new(); let mut locals = Vec::new(); - let mut names = slice::from_fn(self.name_positions.len(), |_| None); + let mut names = Vec::from_fn(self.name_positions.len(), |_| None); let mut pats = Vec::new(); let mut heads = Vec::new(); @@ -673,7 +672,7 @@ impl<'a, 'b> Context<'a, 'b> { let lname = self.ecx.ident_of(format!("__arg{}", *name)); pats.push(self.ecx.pat_ident(e.span, lname)); heads.push(self.ecx.expr_addr_of(e.span, e)); - names[*self.name_positions.get(name)] = + *names.get_mut(*self.name_positions.get(name)) = Some(self.format_arg(e.span, Named((*name).clone()), self.ecx.expr_ident(e.span, lname))); |
