]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_typeck/check/mod.rs
Auto merge of #52568 - oli-obk:span_bug_error, r=varkor
[rust.git] / src / librustc_typeck / check / mod.rs
index 4af89d2148dfc5c0684ccac1abf87af3f120573c..2cfeb2513926b45753855b8754a9885212706127 100644 (file)
@@ -857,9 +857,6 @@ fn typeck_tables_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
             fcx.require_type_is_sized(expected_type, body.value.span, traits::ConstSized);
 
             // Gather locals in statics (because of block expressions).
-            // This is technically unnecessary because locals in static items are forbidden,
-            // but prevents type checking from blowing up before const checking can properly
-            // emit an error.
             GatherLocalsVisitor { fcx: &fcx }.visit_body(body);
 
             fcx.check_expr_coercable_to_type(&body.value, expected_type);