diff options
| author | bors <bors@rust-lang.org> | 2014-10-31 02:27:15 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-10-31 02:27:15 +0000 |
| commit | 221fc1e3cdcc208e1bb7debcc2de27d47c847747 (patch) | |
| tree | 5e2d393fe5a4a94cd6a09d93f4ddcf5a4f6aecaa /src/libregex | |
| parent | a12d06b73fcb38cf23dfe71da725428a1094395f (diff) | |
| parent | 6fcba8826fd26028341a35d88b07208378ac05ea (diff) | |
| download | rust-221fc1e3cdcc208e1bb7debcc2de27d47c847747.tar.gz rust-221fc1e3cdcc208e1bb7debcc2de27d47c847747.zip | |
auto merge of #18459 : alexcrichton/rust/rollup, r=alexcrichton
Diffstat (limited to 'src/libregex')
| -rw-r--r-- | src/libregex/compile.rs | 6 | ||||
| -rw-r--r-- | src/libregex/lib.rs | 2 | ||||
| -rw-r--r-- | src/libregex/parse.rs | 2 | ||||
| -rw-r--r-- | src/libregex/vm.rs | 10 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/libregex/compile.rs b/src/libregex/compile.rs index 53d2ea62a2a..2b82b620e39 100644 --- a/src/libregex/compile.rs +++ b/src/libregex/compile.rs @@ -157,7 +157,7 @@ impl<'r> Compiler<'r> { if cap >= len { self.names.grow(10 + cap - len, None) } - *self.names.get_mut(cap) = name; + self.names[cap] = name; self.push(Save(2 * cap)); self.compile(*x); @@ -243,7 +243,7 @@ impl<'r> Compiler<'r> { /// `panic!` is called. #[inline] fn set_split(&mut self, i: InstIdx, pc1: InstIdx, pc2: InstIdx) { - let split = self.insts.get_mut(i); + let split = &mut self.insts[i]; match *split { Split(_, _) => *split = Split(pc1, pc2), _ => panic!("BUG: Invalid split index."), @@ -263,7 +263,7 @@ impl<'r> Compiler<'r> { /// `panic!` is called. #[inline] fn set_jump(&mut self, i: InstIdx, pc: InstIdx) { - let jmp = self.insts.get_mut(i); + let jmp = &mut self.insts[i]; match *jmp { Jump(_) => *jmp = Jump(pc), _ => panic!("BUG: Invalid jump index."), diff --git a/src/libregex/lib.rs b/src/libregex/lib.rs index 691dd2a3a6c..f3633a006b1 100644 --- a/src/libregex/lib.rs +++ b/src/libregex/lib.rs @@ -370,7 +370,7 @@ #![allow(unknown_features)] #![feature(macro_rules, phase, slicing_syntax)] -#![deny(missing_doc)] +#![deny(missing_docs)] #[cfg(test)] extern crate "test" as stdtest; diff --git a/src/libregex/parse.rs b/src/libregex/parse.rs index d71cc9cb511..3115161682f 100644 --- a/src/libregex/parse.rs +++ b/src/libregex/parse.rs @@ -978,7 +978,7 @@ fn combine_ranges(unordered: Vec<(char, char)>) -> Vec<(char, char)> { } match which { None => ordered.push((us, ue)), - Some(i) => *ordered.get_mut(i) = (us, ue), + Some(i) => ordered[i] = (us, ue), } } ordered.sort(); diff --git a/src/libregex/vm.rs b/src/libregex/vm.rs index 0a4dca9125a..ce06828e764 100644 --- a/src/libregex/vm.rs +++ b/src/libregex/vm.rs @@ -461,13 +461,13 @@ impl Threads { } fn add(&mut self, pc: uint, groups: &[Option<uint>], empty: bool) { - let t = self.queue.get_mut(self.size); + let t = &mut self.queue[self.size]; t.pc = pc; match (empty, self.which) { (_, Exists) | (true, _) => {}, (false, Location) => { - *t.groups.get_mut(0) = groups[0]; - *t.groups.get_mut(1) = groups[1]; + t.groups[0] = groups[0]; + t.groups[1] = groups[1]; } (false, Submatches) => { for (slot, val) in t.groups.iter_mut().zip(groups.iter()) { @@ -475,7 +475,7 @@ impl Threads { } } } - *self.sparse.get_mut(pc) = self.size; + self.sparse[pc] = self.size; self.size += 1; } @@ -497,7 +497,7 @@ impl Threads { #[inline] fn groups<'r>(&'r mut self, i: uint) -> &'r mut [Option<uint>] { - self.queue.get_mut(i).groups.as_mut_slice() + self.queue[i].groups.as_mut_slice() } } |
