Skip to content

Commit c9c964f

Browse files
committed
Fix some comment formatting.
1 parent d7f5319 commit c9c964f

File tree

4 files changed

+16
-12
lines changed

4 files changed

+16
-12
lines changed

compiler/rustc_expand/src/config.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,11 @@ pub fn features(sess: &Session, krate_attrs: &[Attribute], crate_name: Symbol) -
9999
// If the declared feature is unstable, record it.
100100
if let Some(f) = UNSTABLE_FEATURES.iter().find(|f| name == f.feature.name) {
101101
(f.set_enabled)(&mut features);
102-
// When the ICE comes from core, alloc or std (approximation of the standard library), there's a chance
103-
// that the person hitting the ICE may be using -Zbuild-std or similar with an untested target.
104-
// The bug is probably in the standard library and not the compiler in that case, but that doesn't
105-
// really matter - we want a bug report.
102+
// When the ICE comes from core, alloc or std (approximation of the standard
103+
// library), there's a chance that the person hitting the ICE may be using
104+
// -Zbuild-std or similar with an untested target. The bug is probably in the
105+
// standard library and not the compiler in that case, but that doesn't really
106+
// matter - we want a bug report.
106107
if features.internal(name)
107108
&& ![sym::core, sym::alloc, sym::std].contains(&crate_name)
108109
{

compiler/rustc_expand/src/expand.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -505,8 +505,9 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
505505

506506
let (fragment, collected_invocations) =
507507
self.collect_invocations(fragment, &derive_placeholders);
508-
// We choose to expand any derive invocations associated with this macro invocation
509-
// *before* any macro invocations collected from the output fragment
508+
// We choose to expand any derive invocations associated with this macro
509+
// invocation *before* any macro invocations collected from the output
510+
// fragment.
510511
derive_invocations.extend(collected_invocations);
511512
(fragment, derive_invocations)
512513
}

compiler/rustc_expand/src/mbe/diagnostics.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ pub(super) fn failed_to_match_macro<'cx>(
2828
) -> Box<dyn MacResult + 'cx> {
2929
let psess = &cx.sess.psess;
3030

31-
// An error occurred, try the expansion again, tracking the expansion closely for better diagnostics.
31+
// An error occurred, try the expansion again, tracking the expansion closely for better
32+
// diagnostics.
3233
let mut tracker = CollectTrackerAndEmitter::new(cx, sp);
3334

3435
let try_success_result = try_match_macro(psess, name, &arg, lhses, &mut tracker);

compiler/rustc_expand/src/mbe/macro_rules.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ pub(super) trait Tracker<'matcher> {
157157
/// This is called before trying to match next MatcherLoc on the current token.
158158
fn before_match_loc(&mut self, _parser: &TtParser, _matcher: &'matcher MatcherLoc) {}
159159

160-
/// This is called after an arm has been parsed, either successfully or unsuccessfully. When this is called,
161-
/// `before_match_loc` was called at least once (with a `MatcherLoc::Eof`).
160+
/// This is called after an arm has been parsed, either successfully or unsuccessfully. When
161+
/// this is called, `before_match_loc` was called at least once (with a `MatcherLoc::Eof`).
162162
fn after_arm(&mut self, _result: &NamedParseResult<Self::Failure>) {}
163163

164164
/// For tracing.
@@ -169,7 +169,8 @@ pub(super) trait Tracker<'matcher> {
169169
}
170170
}
171171

172-
/// A noop tracker that is used in the hot path of the expansion, has zero overhead thanks to monomorphization.
172+
/// A noop tracker that is used in the hot path of the expansion, has zero overhead thanks to
173+
/// monomorphization.
173174
pub(super) struct NoopTracker;
174175

175176
impl<'matcher> Tracker<'matcher> for NoopTracker {
@@ -492,7 +493,7 @@ pub fn compile_declarative_macro(
492493
.pop()
493494
.unwrap();
494495
// We don't handle errors here, the driver will abort
495-
// after parsing/expansion. we can report every error in every macro this way.
496+
// after parsing/expansion. We can report every error in every macro this way.
496497
check_emission(check_lhs_nt_follows(sess, def, &tt));
497498
return tt;
498499
}
@@ -528,7 +529,7 @@ pub fn compile_declarative_macro(
528529
check_emission(check_rhs(sess, rhs));
529530
}
530531

531-
// don't abort iteration early, so that errors for multiple lhses can be reported
532+
// Don't abort iteration early, so that errors for multiple lhses can be reported.
532533
for lhs in &lhses {
533534
check_emission(check_lhs_no_empty_seq(sess, slice::from_ref(lhs)));
534535
}

0 commit comments

Comments
 (0)