mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Support evaluating dyn Trait
methods
This commit is contained in:
parent
a063f000ff
commit
7525a38af5
4 changed files with 197 additions and 60 deletions
|
@ -230,7 +230,14 @@ impl MirLowerCtx<'_> {
|
|||
self.lower_const(c, current, place, expr_id.into())?;
|
||||
return Ok(Some(current))
|
||||
},
|
||||
_ => not_supported!("associated functions and types"),
|
||||
hir_def::AssocItemId::FunctionId(_) => {
|
||||
// FnDefs are zero sized, no action is needed.
|
||||
return Ok(Some(current))
|
||||
}
|
||||
hir_def::AssocItemId::TypeAliasId(_) => {
|
||||
// FIXME: If it is unreachable, use proper error instead of `not_supported`.
|
||||
not_supported!("associated functions and types")
|
||||
},
|
||||
}
|
||||
} else if let Some(variant) = self
|
||||
.infer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue