Skip to content

Commit d6514d7

Browse files
committed
---
yaml --- r: 32629 b: refs/heads/dist-snap c: da5033f h: refs/heads/master i: 32627: 4ad2806 v: v3
1 parent 6a5bd8b commit d6514d7

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
10-
refs/heads/dist-snap: 864cca14ee00082f67bbf92b60802195ab1c4d38
10+
refs/heads/dist-snap: da5033f99193cda3c95f5518d9591faae1ce5e6a
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/dist-snap/doc/tutorial-borrowed-ptr.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,14 @@ fn compute_distance(p1: &point, p2: &point) -> float {
7070

7171
Now we can call `compute_distance()` in various ways:
7272

73-
~~~ {.xfail-test}
73+
~~~
7474
# type point = {x: float, y: float};
7575
# let on_the_stack : point = {x: 3.0, y: 4.0};
7676
# let shared_box : @point = @{x: 5.0, y: 1.0};
7777
# let unique_box : ~point = ~{x: 7.0, y: 9.0};
7878
# fn compute_distance(p1: &point, p2: &point) -> float { 0f }
79-
compute_distance(&on_the_stack, shared_box)
80-
compute_distance(shared_box, unique_box)
79+
compute_distance(&on_the_stack, shared_box);
80+
compute_distance(shared_box, unique_box);
8181
~~~
8282

8383
Here the `&` operator is used to take the address of the variable
@@ -147,21 +147,21 @@ type rectangle = {origin: point, size: size};
147147
Now again I can define rectangles in a few different ways:
148148

149149
~~~
150-
let rect_stack = &{origin: {x: 1, y: 2}, size: {w: 3, h: 4}};
151-
let rect_shared = @{origin: {x: 3, y: 4}, size: {w: 3, h: 4}};
152-
let rect_unique = ~{origin: {x: 5, y: 6}, size: {w: 3, h: 4}};
150+
let rect_stack = &{origin: {x: 1f, y: 2f}, size: {w: 3f, h: 4f}};
151+
let rect_shared = @{origin: {x: 3f, y: 4f}, size: {w: 3f, h: 4f}};
152+
let rect_unique = ~{origin: {x: 5f, y: 6f}, size: {w: 3f, h: 4f}};
153153
~~~
154154

155155
In each case I can use the `&` operator to extact out individual
156156
subcomponents. For example, I could write:
157157

158-
~~~ {.xfail-test}
158+
~~~
159159
# type point = {x: float, y: float};
160160
# type size = {w: float, h: float}; // as before
161161
# type rectangle = {origin: point, size: size};
162-
# let rect_stack = &{origin: {x: 1, y: 2}, size: {w: 3, h: 4}};
163-
# let rect_shared = @{origin: {x: 3, y: 4}, size: {w: 3, h: 4}};
164-
# let rect_unique = ~{origin: {x: 5, y: 6}, size: {w: 3, h: 4}};
162+
# let rect_stack = &{origin: {x: 1f, y: 2f}, size: {w: 3f, h: 4f}};
163+
# let rect_shared = @{origin: {x: 3f, y: 4f}, size: {w: 3f, h: 4f}};
164+
# let rect_unique = ~{origin: {x: 5f, y: 6f}, size: {w: 3f, h: 4f}};
165165
# fn compute_distance(p1: &point, p2: &point) -> float { 0f }
166166
compute_distance(&rect_stack.origin, &rect_shared.origin);
167167
~~~

0 commit comments

Comments
 (0)