@@ -4615,7 +4615,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
4615
4615
local : & ' gcx hir:: Local ,
4616
4616
init : & ' gcx hir:: Expr ) -> Ty < ' tcx >
4617
4617
{
4618
- // FIXME(tschottdorf): contains_explicit_ref_binding() must be removed
4618
+ // FIXME(tschottdorf): ` contains_explicit_ref_binding()` must be removed
4619
4619
// for #42640 (default match binding modes).
4620
4620
//
4621
4621
// See #44848.
@@ -4660,7 +4660,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
4660
4660
}
4661
4661
4662
4662
pub fn check_stmt ( & self , stmt : & ' gcx hir:: Stmt ) {
4663
- // Don't do all the complex logic below for DeclItem.
4663
+ // Don't do all the complex logic below for ` DeclItem` .
4664
4664
match stmt. node {
4665
4665
hir:: StmtKind :: Decl ( ref decl, _) => {
4666
4666
if let hir:: DeclKind :: Item ( _) = decl. node {
@@ -4672,7 +4672,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
4672
4672
4673
4673
self . warn_if_unreachable ( stmt. node . id ( ) , stmt. span , "statement" ) ;
4674
4674
4675
- // Hide the outer diverging and has_errors flags.
4675
+ // Hide the outer diverging and ` has_errors` flags.
4676
4676
let old_diverges = self . diverges . get ( ) ;
4677
4677
let old_has_errors = self . has_errors . get ( ) ;
4678
4678
self . diverges . set ( Diverges :: Maybe ) ;
@@ -4684,19 +4684,20 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
4684
4684
hir:: DeclKind :: Local ( ref l) => {
4685
4685
self . check_decl_local ( & l) ;
4686
4686
}
4687
- hir:: DeclKind :: Item ( _) => { /* ignore for now */ }
4687
+ // Ignore for now.
4688
+ hir:: DeclKind :: Item ( _) => ( )
4688
4689
}
4689
4690
}
4690
4691
hir:: StmtKind :: Expr ( ref expr, _) => {
4691
- // Check with expected type of ()
4692
+ // Check with expected type of `()`.
4692
4693
self . check_expr_has_type_or_error ( & expr, self . tcx . mk_unit ( ) ) ;
4693
4694
}
4694
4695
hir:: StmtKind :: Semi ( ref expr, _) => {
4695
4696
self . check_expr ( & expr) ;
4696
4697
}
4697
4698
}
4698
4699
4699
- // Combine the diverging and has_error flags.
4700
+ // Combine the diverging and ` has_error` flags.
4700
4701
self . diverges . set ( self . diverges . get ( ) | old_diverges) ;
4701
4702
self . has_errors . set ( self . has_errors . get ( ) | old_has_errors) ;
4702
4703
}
0 commit comments