mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
recover from missing type annotation
This commit is contained in:
parent
244ee65bbe
commit
049f0a6d2c
2 changed files with 20 additions and 0 deletions
|
@ -2556,6 +2556,20 @@ fn f() {
|
|||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn infer_missing_type() {
|
||||
check_types(
|
||||
r#"
|
||||
struct S;
|
||||
|
||||
fn f() {
|
||||
let s: = S;
|
||||
//^ S
|
||||
}
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn infer_type_alias_variant() {
|
||||
check_infer(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue