mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
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 {
|
||||
# pub type Chicken = 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 struct Farm {
|
||||
priv chickens: ~[Chicken],
|
||||
|
Loading…
Reference in New Issue
Block a user