Skip to content

Commit db6fdf6

Browse files
committed
Rollup merge of rust-lang#45172 - oli-obk:patch-8, r=pnkfelix
Upgrade some comments to doc comments
2 parents 7640cda + 1cb9f70 commit db6fdf6

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

src/librustc/session/mod.rs

+27-27
Original file line numberDiff line numberDiff line change
@@ -54,24 +54,24 @@ pub mod config;
5454
pub mod filesearch;
5555
pub mod search_paths;
5656

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.
5959
pub struct Session {
6060
pub target: config::Config,
6161
pub host: Target,
6262
pub opts: config::Options,
6363
pub parse_sess: ParseSess,
64-
// For a library crate, this is always none
64+
/// For a library crate, this is always none
6565
pub entry_fn: RefCell<Option<(NodeId, Span)>>,
6666
pub entry_type: Cell<Option<config::EntryFnType>>,
6767
pub plugin_registrar_fn: Cell<Option<ast::NodeId>>,
6868
pub derive_registrar_fn: Cell<Option<ast::NodeId>>,
6969
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.
7272
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.
7575
pub working_dir: (String, bool),
7676
pub lint_store: RefCell<lint::LintStore>,
7777
pub buffered_lints: RefCell<Option<lint::LintBuffer>>,
@@ -83,11 +83,11 @@ pub struct Session {
8383
pub plugin_attributes: RefCell<Vec<(String, AttributeType)>>,
8484
pub crate_types: RefCell<Vec<config::CrateType>>,
8585
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.
9191
pub crate_disambiguator: RefCell<Option<Symbol>>,
9292
pub features: RefCell<feature_gate::Features>,
9393

@@ -143,17 +143,17 @@ pub struct Session {
143143
}
144144

145145
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
147147
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
149149
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
151151
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
153153
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
155155
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
157157
pub decode_def_path_tables_time: Cell<Duration>,
158158
}
159159

@@ -804,24 +804,24 @@ pub fn build_session_(sopts: config::Options,
804804
/// Holds data on the current incremental compilation session, if there is one.
805805
#[derive(Debug)]
806806
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.
809809
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.
812812
Active {
813813
session_directory: PathBuf,
814814
lock_file: flock::Lock,
815815
load_dep_graph: bool,
816816
},
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.
819819
Finalized {
820820
session_directory: PathBuf,
821821
},
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.
825825
InvalidBecauseOfErrors {
826826
session_directory: PathBuf,
827827
}

0 commit comments

Comments
 (0)