File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -728,6 +728,20 @@ mod impl_keyword {}
728
728
/// [`IntoIterator`]: ../book/ch13-04-performance.html
729
729
/// [range patterns]: ../reference/patterns.html?highlight=range#range-patterns
730
730
/// [`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
731
745
mod in_keyword { }
732
746
733
747
#[ doc( keyword = "let" ) ]
You can’t perform that action at this time.
0 commit comments