diff --git a/src/librustc_typeck/check/_match.rs b/src/librustc_typeck/check/_match.rs index 86774466ba5..034cba0f12a 100644 --- a/src/librustc_typeck/check/_match.rs +++ b/src/librustc_typeck/check/_match.rs @@ -170,12 +170,12 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { prior_arm_ty = Some(arm_ty); } - // If all of the arms in the 'match' diverge, - // and we're dealing with an actual 'match' block - // (as opposed to a 'match' desugared from something else'), + // If all of the arms in the `match` diverge, + // and we're dealing with an actual `match` block + // (as opposed to a `match` desugared from something else'), // we can emit a better note. Rather than pointing // at a diverging expression in an arbitrary arm, - // we can point at the entire 'match' expression + // we can point at the entire `match` expression match (all_arms_diverge, match_src) { (Diverges::Always { .. }, hir::MatchSource::Normal) => { all_arms_diverge = Diverges::Always { diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index f6f3173e81c..e424aa67908 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -453,15 +453,15 @@ pub enum Diverges { Always { /// The `Span` points to the expression /// that caused us to diverge - /// (e.g. `return`, `break`, etc) + /// (e.g. `return`, `break`, etc). span: Span, - /// In some cases (e.g. a 'match' expression + /// In some cases (e.g. a `match` expression /// where all arms diverge), we may be /// able to provide a more informative /// message to the user. - /// If this is None, a default messsage + /// If this is `None`, a default messsage /// will be generated, which is suitable - /// for most cases + /// for most cases. custom_note: Option<&'static str> }, @@ -502,7 +502,7 @@ impl Diverges { fn always(self) -> bool { // Enum comparison ignores the // contents of fields, so we just - // fill them in with garbage here + // fill them in with garbage here. self >= Diverges::Always { span: DUMMY_SP, custom_note: None