Skip to content

Commit 3e3209a

Browse files
committed
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.
2 parents 6843d8c + 1777047 commit 3e3209a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/doc/guide.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3325,7 +3325,8 @@ To do that, we'll need to make a new module. Make a new file, `src/lib.rs`,
33253325
and put this in it:
33263326

33273327
```{rust}
3328-
fn add_three_times_four(x: int) -> int {
3328+
# fn main() {}
3329+
pub fn add_three_times_four(x: int) -> int {
33293330
(x + 3) * 4
33303331
}
33313332
```

0 commit comments

Comments
 (0)