docs: Update multiple file use statement example#13960
Conversation
|
This appears to have legitimate errors on travis |
Update the example to make the usage of `pub mod foo;` much more apparent, as well as using an example where setting the visibility of the module is actually necessary.
|
Do you know what "visibility has no effect inside functions" means in the context of the 3rd snippet of rust code in this pull request? Nothing looked out of the ordinary, and when I tried compiling the code locally it had no problems. Either way, the first two code snippets were already ignored, so I ignored the third one as well. If you want to have them all not ignored, let me know and I will make the fix. |
|
By default, rustdoc will wrap all code snippets in You can mitigate the effects with a doc block that looks like: |
|
Ah, thanks for that tip. I will keep that in mind for future documentation pull requests. |
Update the example to make the usage of `pub mod foo;` much more apparent, as well as using an example where setting the visibility of the module is actually necessary.
…mes` (rust-lang#13960) Fixes rust-lang/rust-clippy#13514 changelog: Added [`elidable_lifetime_names`] to `pedantic` (Split off from [`needless_lifetime`] for suggestions with `'_`) [rust-lang#13960](rust-lang/rust-clippy#13960) changelog: Enhancement: [`needless_lifetime`] No longer lints for elidable lifetimes `'_`, use [`elidable_lifetime_names`] to lint these. [rust-lang#13960](rust-lang/rust-clippy#13960)
Update the example to make the usage of
pub mod foo;much moreapparent, as well as using an example where setting the visibility of
the module is actually necessary.