Skip to content

Commit

Permalink
Adapt test case to match current set of emitted warnings. (or lack
Browse files Browse the repository at this point in the history
thereof.)

PR 14739 injected the new message that this removes from one test
case: borrowck-vec-pattern-loan-from-mut.rs

When reviewing the test case, I was not able to convince myself that
the error message was a legitimate thing to start emitting.  Niko did
not see an obvious reason for it either, so I am going to remove it
and wait for someone (maybe Cameron Zwarich) to explain to me why we
should be emitting it.
  • Loading branch information
pnkfelix committed Jun 18, 2014
1 parent 3ddb987 commit 4c2a8bb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fn a() {
let mut v = vec!(1, 2, 3);
let vb: &mut [int] = v.as_mut_slice();
match vb {
[_a, ..tail] => { //~ ERROR cannot use `vb[..]` because it was mutably borrowed
[_a, ..tail] => {
v.push(tail[0] + tail[1]); //~ ERROR cannot borrow
}
_ => {}
Expand Down

6 comments on commit 4c2a8bb

@bors
Copy link
Contributor

@bors bors commented on 4c2a8bb Jun 18, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from nikomatsakis
at pnkfelix@4c2a8bb

@bors
Copy link
Contributor

@bors bors commented on 4c2a8bb Jun 18, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging pnkfelix/rust/fsk-dataflow-revisions = 4c2a8bb into auto

@bors
Copy link
Contributor

@bors bors commented on 4c2a8bb Jun 18, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pnkfelix/rust/fsk-dataflow-revisions = 4c2a8bb merged ok, testing candidate = 4416b32

@bors
Copy link
Contributor

@bors bors commented on 4c2a8bb Jun 18, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 4416b32

@pnkfelix
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This particular commit is noting an issue with PR #14739)

Please sign in to comment.