mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
fix: comletion detail shows {unknown}
for impl Trait
in return position
This commit is contained in:
parent
66c232d03b
commit
f972adc201
2 changed files with 42 additions and 3 deletions
|
@ -602,3 +602,42 @@ fn func() {
|
|||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn detail_impl_trait_in_return_position() {
|
||||
check_empty(
|
||||
r"
|
||||
//- minicore: sized
|
||||
trait Trait<T> {}
|
||||
fn foo<U>() -> impl Trait<U> {}
|
||||
fn main() {
|
||||
self::$0
|
||||
}
|
||||
",
|
||||
expect![[r"
|
||||
tt Trait
|
||||
fn main() fn()
|
||||
fn foo() fn() -> impl Trait<U>
|
||||
"]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn detail_async_fn() {
|
||||
// FIXME: #11438
|
||||
check_empty(
|
||||
r#"
|
||||
//- minicore: future, sized
|
||||
trait Trait<T> {}
|
||||
async fn foo() -> u8 {}
|
||||
fn main() {
|
||||
self::$0
|
||||
}
|
||||
"#,
|
||||
expect![[r"
|
||||
tt Trait
|
||||
fn main() fn()
|
||||
fn foo() async fn() -> impl Future<Output = u8>
|
||||
"]],
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue