aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_ty')
-rw-r--r--crates/ra_hir_ty/src/display.rs2
-rw-r--r--crates/ra_hir_ty/src/lib.rs7
2 files changed, 7 insertions, 2 deletions
diff --git a/crates/ra_hir_ty/src/display.rs b/crates/ra_hir_ty/src/display.rs
index 37def7c03..d1ff85f0f 100644
--- a/crates/ra_hir_ty/src/display.rs
+++ b/crates/ra_hir_ty/src/display.rs
@@ -9,7 +9,7 @@ pub struct HirFormatter<'a, 'b, DB> {
9 fmt: &'a mut fmt::Formatter<'b>, 9 fmt: &'a mut fmt::Formatter<'b>,
10 buf: String, 10 buf: String,
11 curr_size: usize, 11 curr_size: usize,
12 max_size: Option<usize>, 12 pub(crate) max_size: Option<usize>,
13 omit_verbose_types: bool, 13 omit_verbose_types: bool,
14} 14}
15 15
diff --git a/crates/ra_hir_ty/src/lib.rs b/crates/ra_hir_ty/src/lib.rs
index d63f862dc..908e4862d 100644
--- a/crates/ra_hir_ty/src/lib.rs
+++ b/crates/ra_hir_ty/src/lib.rs
@@ -855,7 +855,12 @@ impl HirDisplay for ApplicationTy {
855 } 855 }
856 TypeCtor::Ref(m) => { 856 TypeCtor::Ref(m) => {
857 let t = self.parameters.as_single(); 857 let t = self.parameters.as_single();
858 write!(f, "&{}{}", m.as_keyword_for_ref(), t.display(f.db))?; 858 let ty_display = if f.omit_verbose_types() {
859 t.display_truncated(f.db, f.max_size)
860 } else {
861 t.display(f.db)
862 };
863 write!(f, "&{}{}", m.as_keyword_for_ref(), ty_display)?;
859 } 864 }
860 TypeCtor::Never => write!(f, "!")?, 865 TypeCtor::Never => write!(f, "!")?,
861 TypeCtor::Tuple { .. } => { 866 TypeCtor::Tuple { .. } => {