File tree Expand file tree Collapse file tree 2 files changed +1
-20
lines changed Expand file tree Collapse file tree 2 files changed +1
-20
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: 0e4d1fc8cae42e15e00f71d9f439b01bb25a86ae
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 6c08cc2db4f98e9f07ae7d50338396c4123c2f0a
5
- refs/heads/try: db78fdc10c0cf6c02005c0b8daefe9cf47aa806f
5
+ refs/heads/try: 55f528f5af84769b178dd0ff075d1c1fa2329f5a
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
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