about summary refs log tree commit diff
path: root/src/libstd/keyword_docs.rs
diff options
context:
space:
mode:
authorsjud <sjud@users.noreply.github.com>2020-03-04 19:14:27 -0500
committerMark Rousskov <mark.simulacrum@gmail.com>2020-03-13 11:12:59 -0400
commit87f8ee675e7fa07c34dfdf933300a934e040d2fa (patch)
treee48cca72495a24443bdafba40e89fbb46326ed98 /src/libstd/keyword_docs.rs
parent54b7d21f59a363e53eb1c31d76b40af2ff99321c (diff)
downloadrust-87f8ee675e7fa07c34dfdf933300a934e040d2fa.tar.gz
rust-87f8ee675e7fa07c34dfdf933300a934e040d2fa.zip
Add documentation for pub keyword
Diffstat (limited to 'src/libstd/keyword_docs.rs')
-rw-r--r--src/libstd/keyword_docs.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libstd/keyword_docs.rs b/src/libstd/keyword_docs.rs
index 3c69c1160d5..2702de15b85 100644
--- a/src/libstd/keyword_docs.rs
+++ b/src/libstd/keyword_docs.rs
@@ -925,9 +925,15 @@ mod mut_keyword {}
 //
 /// Make an item visible to others.
 ///
-/// The documentation for this keyword is [not yet complete]. Pull requests welcome!
+/// The keyword `pub` makes any module, function, or data structure accessible from inside
+/// of external modules. The `pub` keyword may also be used in a `use` declaration to re-export
+/// an identifier from a namespace.
 ///
-/// [not yet complete]: https://github.com/rust-lang/rust/issues/34601
+/// For more information on the `pub` keyword, please see the visibility section
+/// of the [reference] and for some examples, see [Rust by Example].
+///
+/// [reference]:../reference/visibility-and-privacy.html?highlight=pub#visibility-and-privacy
+/// [Rust by Example]:../rust-by-example/mod/visibility.html
 mod pub_keyword {}
 
 #[doc(keyword = "ref")]