Skip to content

Commit 35df9cc

Browse files
authored
Rollup merge of #69723 - sjud:sjud-doc-request, r=Mark-Simulacrum
Added doc on keyword Pub. Hi, this is my first pull request. I hope it's OK. Please let me know if it would benefit from any changes. Thank you.
2 parents 913a933 + 87f8ee6 commit 35df9cc

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/libstd/keyword_docs.rs

+8-2
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)