mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
Add support for yiled keyword
This commit is contained in:
parent
d9b1fa6da3
commit
85cd3524e2
8 changed files with 95 additions and 27 deletions
|
@ -367,6 +367,13 @@ impl<'a> InferenceContext<'a> {
|
|||
}
|
||||
Ty::simple(TypeCtor::Never)
|
||||
}
|
||||
Expr::Yield { expr } => {
|
||||
// FIXME: track yield type for coercion
|
||||
if let Some(expr) = expr {
|
||||
self.infer_expr(*expr, &Expectation::none());
|
||||
}
|
||||
Ty::simple(TypeCtor::Never)
|
||||
}
|
||||
Expr::RecordLit { path, fields, spread } => {
|
||||
let (ty, def_id) = self.resolve_variant(path.as_ref());
|
||||
if let Some(variant) = def_id {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue