@@ -54,24 +54,24 @@ pub mod config;
54
54
pub mod filesearch;
55
55
pub mod search_paths;
56
56
57
- // Represents the data associated with a compilation
58
- // session for a single crate.
57
+ /// Represents the data associated with a compilation
58
+ /// session for a single crate.
59
59
pub struct Session {
60
60
pub target : config:: Config ,
61
61
pub host : Target ,
62
62
pub opts : config:: Options ,
63
63
pub parse_sess : ParseSess ,
64
- // For a library crate, this is always none
64
+ /// For a library crate, this is always none
65
65
pub entry_fn : RefCell < Option < ( NodeId , Span ) > > ,
66
66
pub entry_type : Cell < Option < config:: EntryFnType > > ,
67
67
pub plugin_registrar_fn : Cell < Option < ast:: NodeId > > ,
68
68
pub derive_registrar_fn : Cell < Option < ast:: NodeId > > ,
69
69
pub default_sysroot : Option < PathBuf > ,
70
- // The name of the root source file of the crate, in the local file system.
71
- // `None` means that there is no source file.
70
+ /// The name of the root source file of the crate, in the local file system.
71
+ /// `None` means that there is no source file.
72
72
pub local_crate_source_file : Option < String > ,
73
- // The directory the compiler has been executed in plus a flag indicating
74
- // if the value stored here has been affected by path remapping.
73
+ /// The directory the compiler has been executed in plus a flag indicating
74
+ /// if the value stored here has been affected by path remapping.
75
75
pub working_dir : ( String , bool ) ,
76
76
pub lint_store : RefCell < lint:: LintStore > ,
77
77
pub buffered_lints : RefCell < Option < lint:: LintBuffer > > ,
@@ -83,11 +83,11 @@ pub struct Session {
83
83
pub plugin_attributes : RefCell < Vec < ( String , AttributeType ) > > ,
84
84
pub crate_types : RefCell < Vec < config:: CrateType > > ,
85
85
pub dependency_formats : RefCell < dependency_format:: Dependencies > ,
86
- // The crate_disambiguator is constructed out of all the `-C metadata`
87
- // arguments passed to the compiler. Its value together with the crate-name
88
- // forms a unique global identifier for the crate. It is used to allow
89
- // multiple crates with the same name to coexist. See the
90
- // trans::back::symbol_names module for more information.
86
+ /// The crate_disambiguator is constructed out of all the `-C metadata`
87
+ /// arguments passed to the compiler. Its value together with the crate-name
88
+ /// forms a unique global identifier for the crate. It is used to allow
89
+ /// multiple crates with the same name to coexist. See the
90
+ /// trans::back::symbol_names module for more information.
91
91
pub crate_disambiguator : RefCell < Option < Symbol > > ,
92
92
pub features : RefCell < feature_gate:: Features > ,
93
93
@@ -143,17 +143,17 @@ pub struct Session {
143
143
}
144
144
145
145
pub struct PerfStats {
146
- // The accumulated time needed for computing the SVH of the crate
146
+ /// The accumulated time needed for computing the SVH of the crate
147
147
pub svh_time : Cell < Duration > ,
148
- // The accumulated time spent on computing incr. comp. hashes
148
+ /// The accumulated time spent on computing incr. comp. hashes
149
149
pub incr_comp_hashes_time : Cell < Duration > ,
150
- // The number of incr. comp. hash computations performed
150
+ /// The number of incr. comp. hash computations performed
151
151
pub incr_comp_hashes_count : Cell < u64 > ,
152
- // The number of bytes hashed when computing ICH values
152
+ /// The number of bytes hashed when computing ICH values
153
153
pub incr_comp_bytes_hashed : Cell < u64 > ,
154
- // The accumulated time spent on computing symbol hashes
154
+ /// The accumulated time spent on computing symbol hashes
155
155
pub symbol_hash_time : Cell < Duration > ,
156
- // The accumulated time spent decoding def path tables from metadata
156
+ /// The accumulated time spent decoding def path tables from metadata
157
157
pub decode_def_path_tables_time : Cell < Duration > ,
158
158
}
159
159
@@ -804,24 +804,24 @@ pub fn build_session_(sopts: config::Options,
804
804
/// Holds data on the current incremental compilation session, if there is one.
805
805
#[ derive( Debug ) ]
806
806
pub enum IncrCompSession {
807
- // This is the state the session will be in until the incr. comp. dir is
808
- // needed.
807
+ /// This is the state the session will be in until the incr. comp. dir is
808
+ /// needed.
809
809
NotInitialized ,
810
- // This is the state during which the session directory is private and can
811
- // be modified.
810
+ /// This is the state during which the session directory is private and can
811
+ /// be modified.
812
812
Active {
813
813
session_directory : PathBuf ,
814
814
lock_file : flock:: Lock ,
815
815
load_dep_graph : bool ,
816
816
} ,
817
- // This is the state after the session directory has been finalized. In this
818
- // state, the contents of the directory must not be modified any more.
817
+ /// This is the state after the session directory has been finalized. In this
818
+ /// state, the contents of the directory must not be modified any more.
819
819
Finalized {
820
820
session_directory : PathBuf ,
821
821
} ,
822
- // This is an error state that is reached when some compilation error has
823
- // occurred. It indicates that the contents of the session directory must
824
- // not be used, since they might be invalid.
822
+ /// This is an error state that is reached when some compilation error has
823
+ /// occurred. It indicates that the contents of the session directory must
824
+ /// not be used, since they might be invalid.
825
825
InvalidBecauseOfErrors {
826
826
session_directory : PathBuf ,
827
827
}
0 commit comments