mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
Fix term_search filtering enum variant generics incorrectly
This commit is contained in:
parent
8df034d453
commit
db056b4a69
2 changed files with 5 additions and 5 deletions
|
@ -144,7 +144,7 @@ fn f() { let a = A { x: 1, y: true }; let b: i32 = a.x; }"#,
|
|||
term_search,
|
||||
r#"//- minicore: todo, unimplemented, option
|
||||
fn f() { let a: i32 = 1; let b: Option<i32> = todo$0!(); }"#,
|
||||
r#"fn f() { let a: i32 = 1; let b: Option<i32> = Some(a); }"#,
|
||||
r#"fn f() { let a: i32 = 1; let b: Option<i32> = Some::<i32>(a); }"#,
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -156,7 +156,7 @@ fn f() { let a: i32 = 1; let b: Option<i32> = todo$0!(); }"#,
|
|||
enum Option<T> { None, Some(T) }
|
||||
fn f() { let a: i32 = 1; let b: Option<i32> = todo$0!(); }"#,
|
||||
r#"enum Option<T> { None, Some(T) }
|
||||
fn f() { let a: i32 = 1; let b: Option<i32> = Option::Some(a); }"#,
|
||||
fn f() { let a: i32 = 1; let b: Option<i32> = Option::Some::<i32>(a); }"#,
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -168,7 +168,7 @@ fn f() { let a: i32 = 1; let b: Option<i32> = Option::Some(a); }"#,
|
|||
enum Option<T> { None, Some(T) }
|
||||
fn f() { let a: Option<i32> = Option::None; let b: Option<Option<i32>> = todo$0!(); }"#,
|
||||
r#"enum Option<T> { None, Some(T) }
|
||||
fn f() { let a: Option<i32> = Option::None; let b: Option<Option<i32>> = Option::Some(a); }"#,
|
||||
fn f() { let a: Option<i32> = Option::None; let b: Option<Option<i32>> = Option::Some::<Option<i32>>(a); }"#,
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -180,7 +180,7 @@ fn f() { let a: Option<i32> = Option::None; let b: Option<Option<i32>> = Option:
|
|||
enum Foo<T = i32> { Foo(T) }
|
||||
fn f() { let a = 0; let b: Foo = todo$0!(); }"#,
|
||||
r#"enum Foo<T = i32> { Foo(T) }
|
||||
fn f() { let a = 0; let b: Foo = Foo::Foo(a); }"#,
|
||||
fn f() { let a = 0; let b: Foo = Foo::Foo::<i32>(a); }"#,
|
||||
);
|
||||
|
||||
check_assist(
|
||||
|
|
|
@ -2641,7 +2641,7 @@ fn foo() {
|
|||
expect![[r#"
|
||||
lc foo [type+local]
|
||||
ex foo [type]
|
||||
ex Foo::B [type]
|
||||
ex Foo::B::<u32> [type]
|
||||
ev Foo::A(…) [type_could_unify]
|
||||
ev Foo::B [type_could_unify]
|
||||
en Foo [type_could_unify]
|
||||
|
|
Loading…
Reference in a new issue