mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Omit default types for hover pop-ups
This commit is contained in:
parent
4ed78f80f4
commit
f407ac2be3
1 changed files with 3 additions and 3 deletions
|
@ -250,7 +250,7 @@ pub(crate) fn type_of(db: &RootDatabase, frange: FileRange) -> Option<String> {
|
|||
} else {
|
||||
return None;
|
||||
};
|
||||
Some(ty.display(db).to_string())
|
||||
Some(ty.display_truncated(db, None).to_string())
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
@ -425,7 +425,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
fn hover_default_generic_type() {
|
||||
fn hover_omits_default_generic_types() {
|
||||
check_hover_result(
|
||||
r#"
|
||||
//- /main.rs
|
||||
|
@ -437,7 +437,7 @@ struct Test<K, T = u8> {
|
|||
fn main() {
|
||||
let zz<|> = Test { t: 23, k: 33 };
|
||||
}"#,
|
||||
&["Test<i32, u8>"],
|
||||
&["Test<i32>"],
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue