auto merge of #16268 : cakebaker/rust/make_fn_add_three_times_four_public, r=steveklabnik
To avoid a compilation error when running the tests the function has to be public.
This commit is contained in:
commit
3e3209ab4a
@ -3325,7 +3325,8 @@ To do that, we'll need to make a new module. Make a new file, `src/lib.rs`,
|
||||
and put this in it:
|
||||
|
||||
```{rust}
|
||||
fn add_three_times_four(x: int) -> int {
|
||||
# fn main() {}
|
||||
pub fn add_three_times_four(x: int) -> int {
|
||||
(x + 3) * 4
|
||||
}
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user