fix: pattern completions in let-stmt
This commit is contained in:
parent
70e9582f4c
commit
9dd4e3ecec
2 changed files with 2 additions and 2 deletions
|
|
@ -1334,7 +1334,7 @@ fn pattern_context_for(
|
|||
.map_or((PatternRefutability::Irrefutable, false), |node| {
|
||||
let refutability = match_ast! {
|
||||
match node {
|
||||
ast::LetStmt(let_) => return (PatternRefutability::Irrefutable, let_.ty().is_some()),
|
||||
ast::LetStmt(let_) => return (PatternRefutability::Refutable, let_.ty().is_some()),
|
||||
ast::Param(param) => {
|
||||
let has_type_ascription = param.ty().is_some();
|
||||
param_ctx = (|| {
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ enum SingleVariantEnum {
|
|||
}
|
||||
use SingleVariantEnum::Variant;
|
||||
fn foo() {
|
||||
let a$0
|
||||
for a$0
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue