review comments
This commit is contained in:
parent
7d61484b46
commit
c0a0a7d711
2 changed files with 3 additions and 1 deletions
|
@ -245,7 +245,7 @@ impl<'a, 'tcx> Visitor<'tcx> for InteriorVisitor<'a, 'tcx> {
|
||||||
// If this were not the case, then we could conceivably have
|
// If this were not the case, then we could conceivably have
|
||||||
// to create intermediate temporaries.)
|
// to create intermediate temporaries.)
|
||||||
//
|
//
|
||||||
// The type table might not have invormation for this expression
|
// The type table might not have information for this expression
|
||||||
// if it is in a malformed scope. (#66387)
|
// if it is in a malformed scope. (#66387)
|
||||||
if let Some(ty) = self.fcx.tables.borrow().expr_ty_opt(expr) {
|
if let Some(ty) = self.fcx.tables.borrow().expr_ty_opt(expr) {
|
||||||
self.record(ty, scope, Some(expr), expr.span);
|
self.record(ty, scope, Some(expr), expr.span);
|
||||||
|
|
|
@ -3,6 +3,8 @@ async fn f() -> i32 {
|
||||||
if true { //~ ERROR if may be missing an else clause
|
if true { //~ ERROR if may be missing an else clause
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
// An `if` block without `else` causes the type table not to have a type for this expr.
|
||||||
|
// Check that we do not unconditionally access the type table and we don't ICE.
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue