doc: Fix an inexplicable error in a tutorial example
This code was wrong but apparently worked before removing struct deref. I don't know why.
This commit is contained in:
parent
ec69dea6f7
commit
01af682c64
|
@ -2595,7 +2595,7 @@ the `priv` keyword:
|
||||||
mod farm {
|
mod farm {
|
||||||
# pub type Chicken = int;
|
# pub type Chicken = int;
|
||||||
# struct Human(int);
|
# struct Human(int);
|
||||||
# impl Human { fn rest(&self) { } }
|
# impl Human { pub fn rest(&self) { } }
|
||||||
# pub fn make_me_a_farm() -> Farm { Farm { chickens: ~[], farmer: Human(0) } }
|
# pub fn make_me_a_farm() -> Farm { Farm { chickens: ~[], farmer: Human(0) } }
|
||||||
pub struct Farm {
|
pub struct Farm {
|
||||||
priv chickens: ~[Chicken],
|
priv chickens: ~[Chicken],
|
||||||
|
|
Loading…
Reference in New Issue