mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
⬆️ rust-analyzer
This commit is contained in:
parent
61c744d4fd
commit
a2a1d99545
126 changed files with 2098 additions and 904 deletions
|
@ -1345,5 +1345,36 @@ fn f<F: FnOnce(u8, u16) -> i32>(f: F) {
|
|||
^^ ---
|
||||
"#]],
|
||||
);
|
||||
check(
|
||||
r#"
|
||||
fn f<T, F: FnOnce(&T, u16) -> &T>(f: F) {
|
||||
f($0)
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
(&T, u16) -> &T
|
||||
^^ ---
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn regression_13579() {
|
||||
check(
|
||||
r#"
|
||||
fn f() {
|
||||
take(2)($0);
|
||||
}
|
||||
|
||||
fn take<C, Error>(
|
||||
count: C
|
||||
) -> impl Fn() -> C {
|
||||
move || count
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
() -> i32
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue