Introduce TypeInfo

This commit is contained in:
Lukas Wirth 2021-08-02 20:42:25 +02:00
parent 29506b5a26
commit 25ff7171c4
32 changed files with 127 additions and 124 deletions

View file

@ -123,7 +123,7 @@ fn highlight_exit_points(
}
}
ast::Expr::MethodCallExpr(_) | ast::Expr::CallExpr(_) | ast::Expr::MacroCall(_) => {
if sema.type_of_expr(&expr).map_or(false, |ty| ty.is_never()) {
if sema.type_of_expr(&expr).map_or(false, |ty| ty.ty.is_never()) {
highlights
.push(HighlightedRange { access: None, range: expr.syntax().text_range() });
}