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