Skip to content

Commit 4b3dd4b

Browse files
committed
doc: Fix some broken tutorial examples. rs=bustage
1 parent 10333a5 commit 4b3dd4b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

doc/tutorial.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,7 @@ can have its fields extracted with dot notation and not just destructuring.
738738
For example:
739739

740740
~~~~
741+
# use core::float;
741742
# struct Point {x: float, y: float}
742743
# fn square(x: float) -> float { x * x }
743744
enum Shape {
@@ -2280,6 +2281,7 @@ struct level. Note that fields and methods are _public_ by default.
22802281

22812282
~~~
22822283
mod farm {
2284+
# use farm;
22832285
# pub fn make_me_a_farm() -> farm::Farm { farm::Farm { chickens: ~[], cows: ~[], farmer: Human(0) } }
22842286
pub struct Farm {
22852287
priv mut chickens: ~[Chicken],

0 commit comments

Comments
 (0)