mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
Change from &mut Vec<Vec<_>>
to &mut [Vec<_>]
, since the outer
`Vec` should not be resized.
This commit is contained in:
parent
f0276129c4
commit
3b903a7d10
@ -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());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user