File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -728,6 +728,20 @@ mod impl_keyword {}
728728/// [`IntoIterator`]: ../book/ch13-04-performance.html
729729/// [range patterns]: ../reference/patterns.html?highlight=range#range-patterns
730730/// [`for`]: keyword.for.html
731+ ///
732+ /// The other use of `in` is with the keyword `pub`. It allows users to declare an item as visible
733+ /// only within a given scope.
734+ ///
735+ /// ## Literal Example:
736+ ///
737+ /// * `pub(in crate::outer_mod) fn outer_mod_visible_fn() {}` - fn is visible in `outer_mod`
738+ ///
739+ /// Starting with the 2018 edition, paths for `pub(in path)` must start with `crate`, `self` or
740+ /// `super`. The 2015 edition may also use paths starting with `::` or modules from the crate root.
741+ ///
742+ /// For more information, see the [Reference].
743+ ///
744+ /// [Reference]: ../reference/visibility-and-privacy.html#pubin-path-pubcrate-pubsuper-and-pubself
731745mod in_keyword { }
732746
733747#[ doc( keyword = "let" ) ]
You can’t perform that action at this time.
0 commit comments