@@ -81,6 +81,7 @@ crate fn ensure_trailing_slash(v: &str) -> impl fmt::Display + '_ {
81
81
} )
82
82
}
83
83
84
+ /// Shared mutable state used in [`Context`] and elsewhere.
84
85
crate struct SharedContext < ' tcx > {
85
86
crate tcx : TyCtxt < ' tcx > ,
86
87
/// The path to the crate root source minus the file name.
@@ -96,16 +97,16 @@ crate struct SharedContext<'tcx> {
96
97
/// The local file sources we've emitted and their respective url-paths.
97
98
crate local_sources : FxHashMap < PathBuf , String > ,
98
99
/// Whether the collapsed pass ran
99
- crate collapsed : bool ,
100
+ collapsed : bool ,
100
101
/// The base-URL of the issue tracker for when an item has been tagged with
101
102
/// an issue number.
102
- crate issue_tracker_base_url : Option < String > ,
103
+ issue_tracker_base_url : Option < String > ,
103
104
/// The directories that have already been created in this doc run. Used to reduce the number
104
105
/// of spurious `create_dir_all` calls.
105
- crate created_dirs : RefCell < FxHashSet < PathBuf > > ,
106
+ created_dirs : RefCell < FxHashSet < PathBuf > > ,
106
107
/// This flag indicates whether listings of modules (in the side bar and documentation itself)
107
108
/// should be ordered alphabetically or in order of appearance (in the source code).
108
- crate sort_modules_alphabetically : bool ,
109
+ sort_modules_alphabetically : bool ,
109
110
/// Additional CSS files to be added to the generated docs.
110
111
crate style_files : Vec < StylePath > ,
111
112
/// Suffix to be added on resource files (if suffix is "-v2" then "light.css" becomes
@@ -118,7 +119,7 @@ crate struct SharedContext<'tcx> {
118
119
crate fs : DocFS ,
119
120
/// The default edition used to parse doctests.
120
121
crate edition : Edition ,
121
- crate codes : ErrorCodes ,
122
+ codes : ErrorCodes ,
122
123
playground : Option < markdown:: Playground > ,
123
124
/// The map used to ensure all generated 'id=' attributes are unique.
124
125
id_map : RefCell < IdMap > ,
@@ -128,11 +129,11 @@ crate struct SharedContext<'tcx> {
128
129
all : RefCell < AllTypes > ,
129
130
/// Storage for the errors produced while generating documentation so they
130
131
/// can be printed together at the end.
131
- crate errors : Receiver < String > ,
132
+ errors : Receiver < String > ,
132
133
/// `None` by default, depends on the `generate-redirect-map` option flag. If this field is set
133
134
/// to `Some(...)`, it'll store redirections and then generate a JSON file at the top level of
134
135
/// the crate.
135
- crate redirections : Option < RefCell < FxHashMap < String , String > > > ,
136
+ redirections : Option < RefCell < FxHashMap < String , String > > > ,
136
137
}
137
138
138
139
impl SharedContext < ' _ > {
0 commit comments