Skip to content

Commit eea06de

Browse files
committed
Fix some comments.
- It's `--print`, not `--prints`. - `-Ztime` and `-Ztime-passes` print to stderr, not stdout.
1 parent 0922559 commit eea06de

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

compiler/rustc_data_structures/src/profiling.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,10 @@ pub struct SelfProfilerRef {
158158
// actually enabled.
159159
event_filter_mask: EventFilter,
160160

161-
// Print verbose generic activities to stdout
161+
// Print verbose generic activities to stderr.
162162
print_verbose_generic_activities: bool,
163163

164-
// Print extra verbose generic activities to stdout
164+
// Print extra verbose generic activities to stderr.
165165
print_extra_verbose_generic_activities: bool,
166166
}
167167

@@ -214,7 +214,7 @@ impl SelfProfilerRef {
214214
/// Start profiling a verbose generic activity. Profiling continues until the
215215
/// VerboseTimingGuard returned from this call is dropped. In addition to recording
216216
/// a measureme event, "verbose" generic activities also print a timing entry to
217-
/// stdout if the compiler is invoked with -Ztime or -Ztime-passes.
217+
/// stderr if the compiler is invoked with -Ztime or -Ztime-passes.
218218
pub fn verbose_generic_activity<'a>(
219219
&'a self,
220220
event_label: &'static str,
@@ -228,7 +228,7 @@ impl SelfProfilerRef {
228228
/// Start profiling an extra verbose generic activity. Profiling continues until the
229229
/// VerboseTimingGuard returned from this call is dropped. In addition to recording
230230
/// a measureme event, "extra verbose" generic activities also print a timing entry to
231-
/// stdout if the compiler is invoked with -Ztime-passes.
231+
/// stderr if the compiler is invoked with -Ztime-passes.
232232
pub fn extra_verbose_generic_activity<'a, A>(
233233
&'a self,
234234
event_label: &'static str,

compiler/rustc_driver/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ pub struct TimePassesCallbacks {
128128

129129
impl Callbacks for TimePassesCallbacks {
130130
fn config(&mut self, config: &mut interface::Config) {
131-
// If a --prints=... option has been given, we don't print the "total"
132-
// time because it will mess up the --prints output. See #64339.
131+
// If a --print=... option has been given, we don't print the "total"
132+
// time because it will mess up the --print output. See #64339.
133133
self.time_passes = config.opts.prints.is_empty() && config.opts.time_passes();
134134
config.opts.trimmed_def_paths = TrimmedDefPaths::GoodPath;
135135
}

0 commit comments

Comments
 (0)