Skip to content

Commit 87f8ee6

Browse files
sjudMark-Simulacrum
authored andcommitted
Add documentation for pub keyword
1 parent 54b7d21 commit 87f8ee6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/libstd/keyword_docs.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -925,9 +925,15 @@ mod mut_keyword {}
925925
//
926926
/// Make an item visible to others.
927927
///
928-
/// The documentation for this keyword is [not yet complete]. Pull requests welcome!
928+
/// The keyword `pub` makes any module, function, or data structure accessible from inside
929+
/// of external modules. The `pub` keyword may also be used in a `use` declaration to re-export
930+
/// an identifier from a namespace.
929931
///
930-
/// [not yet complete]: https://github.com/rust-lang/rust/issues/34601
932+
/// For more information on the `pub` keyword, please see the visibility section
933+
/// of the [reference] and for some examples, see [Rust by Example].
934+
///
935+
/// [reference]:../reference/visibility-and-privacy.html?highlight=pub#visibility-and-privacy
936+
/// [Rust by Example]:../rust-by-example/mod/visibility.html
931937
mod pub_keyword {}
932938

933939
#[doc(keyword = "ref")]

0 commit comments

Comments
 (0)