Skip to content

Commit b6f6001

Browse files
committed
---
yaml --- r: 80989 b: refs/heads/snap-stage3 c: 55f528f h: refs/heads/master i: 80987: 9193ad1 v: v3
1 parent 432c568 commit b6f6001

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 4c6bf4872012c010f84dc7fa2cdfe87522533f89
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: db78fdc10c0cf6c02005c0b8daefe9cf47aa806f
4+
refs/heads/snap-stage3: 55f528f5af84769b178dd0ff075d1c1fa2329f5a
55
refs/heads/try: 70152ff55722878cde684ee6462c14c65f2c4729
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libstd/util.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,6 @@ pub fn id<T>(x: T) -> T { x }
2323
#[inline]
2424
pub fn ignore<T>(_x: T) { }
2525

26-
/// Sets `*ptr` to `new_value`, invokes `op()`, and then restores the
27-
/// original value of `*ptr`.
28-
///
29-
/// NB: This function accepts `@mut T` and not `&mut T` to avoid
30-
/// an obvious borrowck hazard. Typically passing in `&mut T` will
31-
/// cause borrow check errors because it freezes whatever location
32-
/// that `&mut T` is stored in (either statically or dynamically).
33-
#[inline]
34-
pub fn with<T,R>(
35-
ptr: @mut T,
36-
value: T,
37-
op: &fn() -> R) -> R
38-
{
39-
let prev = replace(ptr, value);
40-
let result = op();
41-
*ptr = prev;
42-
return result;
43-
}
44-
4526
/**
4627
* Swap the values at two mutable locations of the same type, without
4728
* deinitialising or copying either one.

0 commit comments

Comments
 (0)