Skip to content

Commit

Permalink
fix stdtest
Browse files Browse the repository at this point in the history
  • Loading branch information
arielb1 committed Jun 8, 2016
1 parent b2100cc commit a673ced
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/libstd/sync/mpsc/spsc_queue.rs
Expand Up @@ -265,15 +265,18 @@ mod tests {

// Ensure the borrowchecker works
match queue.peek() {
Some(vec) => match &**vec {
// Note that `pop` is not allowed here due to borrow
[1] => {}
_ => return
Some(vec) => {
assert_eq!(&*vec, &[1]);
},
None => unreachable!()
}

queue.pop();
match queue.pop() {
Some(vec) => {
assert_eq!(&*vec, &[1]);
},
None => unreachable!()
}
}
}

Expand Down

0 comments on commit a673ced

Please sign in to comment.