File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 6f52ba7cc52a55bf0542b9183e3bf26c52a388d9
2
+ refs/heads/master: 0d15ae4f7a2429e70d7085e538e7ce305ef6a468
Original file line number Diff line number Diff line change @@ -5,15 +5,21 @@ import std._str;
5
5
6
6
type t = tag ( make_t ( str ) , clam ( ) ) ;
7
7
8
- fn main ( ) {
9
- let str s = "hi" ; // ref up
8
+ fn foo ( str s) {
10
9
let t x = make_t ( s) ; // ref up
11
10
12
11
alt ( x) {
13
- case ( make_t ( y) ) { log y; } // ref up and ref down
12
+ case ( make_t ( y) ) { log y; } // ref up then down
14
13
case ( _) { log "?" ; fail; }
15
14
}
16
15
17
16
log _str. refcount ( s) ;
18
- check ( _str. refcount ( s) == 2 u) ;
17
+ check ( _str. refcount ( s) == 3 u) ;
18
+ }
19
+
20
+ fn main ( ) {
21
+ let str s = "hi" ; // ref up
22
+ foo ( s) ; // ref up then down
23
+ log _str. refcount ( s) ;
24
+ check ( _str. refcount ( s) == 1 u) ;
19
25
}
You can’t perform that action at this time.
0 commit comments