Skip to content

Commit 6edcfbe

Browse files
Aaron1011Centril
andauthored
Apply formatting fixes
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
1 parent 9e777eb commit 6edcfbe

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/librustc_typeck/check/_match.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,12 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
170170
prior_arm_ty = Some(arm_ty);
171171
}
172172

173-
// If all of the arms in the 'match' diverge,
174-
// and we're dealing with an actual 'match' block
175-
// (as opposed to a 'match' desugared from something else'),
173+
// If all of the arms in the `match` diverge,
174+
// and we're dealing with an actual `match` block
175+
// (as opposed to a `match` desugared from something else'),
176176
// we can emit a better note. Rather than pointing
177177
// at a diverging expression in an arbitrary arm,
178-
// we can point at the entire 'match' expression
178+
// we can point at the entire `match` expression
179179
match (all_arms_diverge, match_src) {
180180
(Diverges::Always { .. }, hir::MatchSource::Normal) => {
181181
all_arms_diverge = Diverges::Always {

src/librustc_typeck/check/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -453,15 +453,15 @@ pub enum Diverges {
453453
Always {
454454
/// The `Span` points to the expression
455455
/// that caused us to diverge
456-
/// (e.g. `return`, `break`, etc)
456+
/// (e.g. `return`, `break`, etc).
457457
span: Span,
458-
/// In some cases (e.g. a 'match' expression
458+
/// In some cases (e.g. a `match` expression
459459
/// where all arms diverge), we may be
460460
/// able to provide a more informative
461461
/// message to the user.
462-
/// If this is None, a default messsage
462+
/// If this is `None`, a default messsage
463463
/// will be generated, which is suitable
464-
/// for most cases
464+
/// for most cases.
465465
custom_note: Option<&'static str>
466466
},
467467

@@ -502,7 +502,7 @@ impl Diverges {
502502
fn always(self) -> bool {
503503
// Enum comparison ignores the
504504
// contents of fields, so we just
505-
// fill them in with garbage here
505+
// fill them in with garbage here.
506506
self >= Diverges::Always {
507507
span: DUMMY_SP,
508508
custom_note: None

0 commit comments

Comments
 (0)