mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
Ensure hover shows full type declaration
This commit is contained in:
parent
14c167a9f6
commit
3969c7c853
2 changed files with 19 additions and 2 deletions
|
@ -424,6 +424,23 @@ mod tests {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hover_default_generic_type() {
|
||||
check_hover_result(
|
||||
r#"
|
||||
//- /main.rs
|
||||
struct Test<K, T = u8> {
|
||||
k: K,
|
||||
t: T,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let zz<|> = Test { t: 23, k: 33 };
|
||||
}"#,
|
||||
&["Test<i32, u8>"],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hover_some() {
|
||||
let (analysis, position) = single_file_with_position(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue