diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-01-22 15:00:21 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-01-22 15:00:21 +0000 |
commit | 9b1465af322e311152a23c1f61f967bda2bffcee (patch) | |
tree | 96de0273a72ddf6a434a82e9db72df942cf1c51c /crates/ra_hir_ty/src/lib.rs | |
parent | a5407ddc05826b208ed8a0026b2ae566bf0a8b70 (diff) | |
parent | 4029e4410245eeb2e1f58adefad1d4cc24898579 (diff) |
Merge #2894
2894: Omit default parameters for references r=matklad a=SomeoneToIgnore
Co-authored-by: Kirill Bulatov <[email protected]>
Diffstat (limited to 'crates/ra_hir_ty/src/lib.rs')
-rw-r--r-- | crates/ra_hir_ty/src/lib.rs | 7 |
1 files changed, 6 insertions, 1 deletions
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 { .. } => { |