We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 793e3b2 commit c6f62b6Copy full SHA for c6f62b6
src/test/bench/shootout-binarytrees.rs
@@ -1,9 +1,9 @@
1
use std;
2
import int;
3
4
-tag tree { nil; node(@tree, @tree, int); }
+tag tree { nil; node(~tree, ~tree, int); }
5
6
-fn item_check(t: @tree) -> int {
+fn item_check(t: ~tree) -> int {
7
alt *t {
8
nil. { ret 0; }
9
node(left, right, item) {
@@ -12,11 +12,11 @@ fn item_check(t: @tree) -> int {
12
}
13
14
15
-fn bottom_up_tree(item: int, depth: int) -> @tree {
+fn bottom_up_tree(item: int, depth: int) -> ~tree {
16
if depth > 0 {
17
- ret @node(bottom_up_tree(2 * item - 1, depth - 1),
+ ret ~node(bottom_up_tree(2 * item - 1, depth - 1),
18
bottom_up_tree(2 * item, depth - 1), item);
19
- } else { ret @nil; }
+ } else { ret ~nil; }
20
21
22
fn main() {
0 commit comments