diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs
index bd6e5eb67c87c..89dca3e020d38 100644
--- a/src/librustc/session/mod.rs
+++ b/src/librustc/session/mod.rs
@@ -54,24 +54,24 @@ pub mod config;
pub mod filesearch;
pub mod search_paths;
-// Represents the data associated with a compilation
-// session for a single crate.
+/// Represents the data associated with a compilation
+/// session for a single crate.
pub struct Session {
pub target: config::Config,
pub host: Target,
pub opts: config::Options,
pub parse_sess: ParseSess,
- // For a library crate, this is always none
+ /// For a library crate, this is always none
pub entry_fn: RefCell>,
pub entry_type: Cell >,
pub plugin_registrar_fn: Cell >,
pub derive_registrar_fn: Cell >,
pub default_sysroot: Option,
- // The name of the root source file of the crate, in the local file system.
- // `None` means that there is no source file.
+ /// The name of the root source file of the crate, in the local file system.
+ /// `None` means that there is no source file.
pub local_crate_source_file: Option,
- // The directory the compiler has been executed in plus a flag indicating
- // if the value stored here has been affected by path remapping.
+ /// The directory the compiler has been executed in plus a flag indicating
+ /// if the value stored here has been affected by path remapping.
pub working_dir: (String, bool),
pub lint_store: RefCell,
pub buffered_lints: RefCell>,
@@ -83,11 +83,11 @@ pub struct Session {
pub plugin_attributes: RefCell>,
pub crate_types: RefCell>,
pub dependency_formats: RefCell,
- // The crate_disambiguator is constructed out of all the `-C metadata`
- // arguments passed to the compiler. Its value together with the crate-name
- // forms a unique global identifier for the crate. It is used to allow
- // multiple crates with the same name to coexist. See the
- // trans::back::symbol_names module for more information.
+ /// The crate_disambiguator is constructed out of all the `-C metadata`
+ /// arguments passed to the compiler. Its value together with the crate-name
+ /// forms a unique global identifier for the crate. It is used to allow
+ /// multiple crates with the same name to coexist. See the
+ /// trans::back::symbol_names module for more information.
pub crate_disambiguator: RefCell>,
pub features: RefCell,
@@ -143,17 +143,17 @@ pub struct Session {
}
pub struct PerfStats {
- // The accumulated time needed for computing the SVH of the crate
+ /// The accumulated time needed for computing the SVH of the crate
pub svh_time: Cell,
- // The accumulated time spent on computing incr. comp. hashes
+ /// The accumulated time spent on computing incr. comp. hashes
pub incr_comp_hashes_time: Cell,
- // The number of incr. comp. hash computations performed
+ /// The number of incr. comp. hash computations performed
pub incr_comp_hashes_count: Cell,
- // The number of bytes hashed when computing ICH values
+ /// The number of bytes hashed when computing ICH values
pub incr_comp_bytes_hashed: Cell,
- // The accumulated time spent on computing symbol hashes
+ /// The accumulated time spent on computing symbol hashes
pub symbol_hash_time: Cell,
- // The accumulated time spent decoding def path tables from metadata
+ /// The accumulated time spent decoding def path tables from metadata
pub decode_def_path_tables_time: Cell,
}
@@ -804,24 +804,24 @@ pub fn build_session_(sopts: config::Options,
/// Holds data on the current incremental compilation session, if there is one.
#[derive(Debug)]
pub enum IncrCompSession {
- // This is the state the session will be in until the incr. comp. dir is
- // needed.
+ /// This is the state the session will be in until the incr. comp. dir is
+ /// needed.
NotInitialized,
- // This is the state during which the session directory is private and can
- // be modified.
+ /// This is the state during which the session directory is private and can
+ /// be modified.
Active {
session_directory: PathBuf,
lock_file: flock::Lock,
load_dep_graph: bool,
},
- // This is the state after the session directory has been finalized. In this
- // state, the contents of the directory must not be modified any more.
+ /// This is the state after the session directory has been finalized. In this
+ /// state, the contents of the directory must not be modified any more.
Finalized {
session_directory: PathBuf,
},
- // This is an error state that is reached when some compilation error has
- // occurred. It indicates that the contents of the session directory must
- // not be used, since they might be invalid.
+ /// This is an error state that is reached when some compilation error has
+ /// occurred. It indicates that the contents of the session directory must
+ /// not be used, since they might be invalid.
InvalidBecauseOfErrors {
session_directory: PathBuf,
}