mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 14:51:48 +00:00
Introduce TypeInfo
This commit is contained in:
parent
29506b5a26
commit
25ff7171c4
32 changed files with 127 additions and 124 deletions
|
@ -609,9 +609,13 @@ impl<'db, 'sema> Matcher<'db, 'sema> {
|
|||
expr: &ast::Expr,
|
||||
) -> Result<usize, MatchFailed> {
|
||||
use hir::HirDisplay;
|
||||
let code_type = self.sema.type_of_expr(expr).ok_or_else(|| {
|
||||
match_error!("Failed to get receiver type for `{}`", expr.syntax().text())
|
||||
})?;
|
||||
let code_type = self
|
||||
.sema
|
||||
.type_of_expr(expr)
|
||||
.ok_or_else(|| {
|
||||
match_error!("Failed to get receiver type for `{}`", expr.syntax().text())
|
||||
})?
|
||||
.ty;
|
||||
// Temporary needed to make the borrow checker happy.
|
||||
let res = code_type
|
||||
.autoderef(self.sema.db)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue