mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Implement do yeet
expression
This commit is contained in:
parent
4a16afa264
commit
346bf5fb5b
9 changed files with 72 additions and 4 deletions
|
@ -465,6 +465,12 @@ impl<'a> InferenceContext<'a> {
|
|||
TyKind::Error.intern(Interner)
|
||||
}
|
||||
}
|
||||
Expr::Yeet { expr } => {
|
||||
if let &Some(expr) = expr {
|
||||
self.infer_expr_inner(expr, &Expectation::None);
|
||||
}
|
||||
TyKind::Never.intern(Interner)
|
||||
}
|
||||
Expr::RecordLit { path, fields, spread, .. } => {
|
||||
let (ty, def_id) = self.resolve_variant(path.as_deref(), false);
|
||||
if let Some(variant) = def_id {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue