about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2015-11-11 05:33:16 -0500
committerNiko Matsakis <niko@alum.mit.edu>2015-11-11 06:18:50 -0500
commit3b903a7d10ce5ebce0d61e8f41d825b3c9d400f5 (patch)
tree2873806925bcc1cf0a50174216845e92d84a34bb
parentf0276129c443d52aecc97266aa4da8afd1bd3b68 (diff)
downloadrust-3b903a7d10ce5ebce0d61e8f41d825b3c9d400f5.tar.gz
rust-3b903a7d10ce5ebce0d61e8f41d825b3c9d400f5.zip
Change from `&mut Vec<Vec<_>>` to `&mut [Vec<_>]`, since the outer
`Vec` should not be resized.
-rw-r--r--src/librustc_mir/build/matches/test.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_mir/build/matches/test.rs b/src/librustc_mir/build/matches/test.rs
index 8a7722872e7..312ab61ba6c 100644
--- a/src/librustc_mir/build/matches/test.rs
+++ b/src/librustc_mir/build/matches/test.rs
@@ -295,7 +295,7 @@ impl<'a,'tcx> Builder<'a,'tcx> {
                                 test_lvalue: &Lvalue<'tcx>,
                                 test: &Test<'tcx>,
                                 candidate: &Candidate<'pat, 'tcx>,
-                                resulting_candidates: &mut Vec<Vec<Candidate<'pat, 'tcx>>>) {
+                                resulting_candidates: &mut [Vec<Candidate<'pat, 'tcx>>]) {
         // Find the match_pair for this lvalue (if any). At present,
         // afaik, there can be at most one. (In the future, if we
         // adopted a more general `@` operator, there might be more
@@ -394,7 +394,7 @@ impl<'a,'tcx> Builder<'a,'tcx> {
 
     fn add_to_all_candidate_sets<'pat>(&mut self,
                                        candidate: &Candidate<'pat, 'tcx>,
-                                       resulting_candidates: &mut Vec<Vec<Candidate<'pat, 'tcx>>>) {
+                                       resulting_candidates: &mut [Vec<Candidate<'pat, 'tcx>>]) {
         for resulting_candidate in resulting_candidates {
             resulting_candidate.push(candidate.clone());
         }