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 10333a5 commit 4b3dd4bCopy full SHA for 4b3dd4b
doc/tutorial.md
@@ -738,6 +738,7 @@ can have its fields extracted with dot notation and not just destructuring.
738
For example:
739
740
~~~~
741
+# use core::float;
742
# struct Point {x: float, y: float}
743
# fn square(x: float) -> float { x * x }
744
enum Shape {
@@ -2280,6 +2281,7 @@ struct level. Note that fields and methods are _public_ by default.
2280
2281
2282
~~~
2283
mod farm {
2284
+# use farm;
2285
# pub fn make_me_a_farm() -> farm::Farm { farm::Farm { chickens: ~[], cows: ~[], farmer: Human(0) } }
2286
pub struct Farm {
2287
priv mut chickens: ~[Chicken],
0 commit comments