changed crate to super to fix compile error in the eg. #825
Conversation
Thanks. The code is correct for the 2015 edition, but using |
@@ -134,8 +141,7 @@ pub mod submodule { | |||
} | |||
} | |||
} | |||
# fn main() {} | |||
fn main(){}; |
ehuss
Jun 2, 2020
Collaborator
These changes should be undone, it breaks the tests.
These changes should be undone, it breaks the tests.
prejrdev
Jun 2, 2020
Author
ok, changed and now it passes the tests.
ok, changed and now it passes the tests.
public_api(); | ||
let doube_limit = rate_limit * 2; |
ehuss
Jun 2, 2020
Collaborator
I'm not sure this really belongs here. This example (especially this my_method
) is here to illustrate the combination of the two rules above. I'm not sure how this relates to those rules?
I'm not sure this really belongs here. This example (especially this my_method
) is here to illustrate the combination of the two rules above. I'm not sure how this relates to those rules?
prejrdev
Jun 2, 2020
Author
rate_limit is private only to the file itself and can't be accessed outside of it. i added it as an example of that fact to contrast with the note about public_api()
rate_limit is private only to the file itself and can't be accessed outside of it. i added it as an example of that fact to contrast with the note about public_api()
@@ -89,9 +89,6 @@ Here's an example of a program which exemplifies the three cases outlined | |||
above: | |||
|
|||
```rust | |||
// This module is private, meaning that no external crate can access this |
ehuss
Jun 6, 2020
Collaborator
Why was this removed?
Why was this removed?
@@ -134,7 +137,6 @@ pub mod submodule { | |||
} | |||
} | |||
} | |||
ehuss
Jun 6, 2020
Collaborator
This whitespace change seems unnecessary. It would probably be best to keep consistency with the rest of the file.
This whitespace change seems unnecessary. It would probably be best to keep consistency with the rest of the file.
pub fn my_method() { | ||
// Any item in the local crate may invoke the helper module's public | ||
// interface through a combination of the two rules above. | ||
crate_helper_module::crate_helper(); | ||
public_api(MAX_RATE); |
ehuss
Jun 6, 2020
Collaborator
It would probably be best to have a comment indicating what this is illustrating.
It would probably be best to have a comment indicating what this is illustrating.
Co-authored-by: Eric Huss <[email protected]>
Co-authored-by: Eric Huss <[email protected]>
Co-authored-by: Eric Huss <[email protected]>
No description provided.