File tree Expand file tree Collapse file tree 2 files changed +1
-20
lines changed
branches/snap-stage3/src/libstd Expand file tree Collapse file tree 2 files changed +1
-20
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: 4c6bf4872012c010f84dc7fa2cdfe87522533f89
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
- refs/heads/snap-stage3: db78fdc10c0cf6c02005c0b8daefe9cf47aa806f
4
+ refs/heads/snap-stage3: 55f528f5af84769b178dd0ff075d1c1fa2329f5a
5
5
refs/heads/try: 70152ff55722878cde684ee6462c14c65f2c4729
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
Original file line number Diff line number Diff line change @@ -23,25 +23,6 @@ pub fn id<T>(x: T) -> T { x }
23
23
#[ inline]
24
24
pub fn ignore < T > ( _x : T ) { }
25
25
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
-
45
26
/**
46
27
* Swap the values at two mutable locations of the same type, without
47
28
* deinitialising or copying either one.
You can’t perform that action at this time.
0 commit comments