Skip to content

Commit c0a0a7d

Browse files
committed
review comments
1 parent 7d61484 commit c0a0a7d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/librustc_typeck/check/generator_interior.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ impl<'a, 'tcx> Visitor<'tcx> for InteriorVisitor<'a, 'tcx> {
245245
// If this were not the case, then we could conceivably have
246246
// to create intermediate temporaries.)
247247
//
248-
// The type table might not have invormation for this expression
248+
// The type table might not have information for this expression
249249
// if it is in a malformed scope. (#66387)
250250
if let Some(ty) = self.fcx.tables.borrow().expr_ty_opt(expr) {
251251
self.record(ty, scope, Some(expr), expr.span);

src/test/ui/async-await/issue-66387-if-without-else.rs

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ async fn f() -> i32 {
33
if true { //~ ERROR if may be missing an else clause
44
return 0;
55
}
6+
// An `if` block without `else` causes the type table not to have a type for this expr.
7+
// Check that we do not unconditionally access the type table and we don't ICE.
68
}
79

810
fn main() {}

0 commit comments

Comments
 (0)