aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/display.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2021-04-03 12:08:29 +0100
committerFlorian Diebold <[email protected]>2021-04-03 12:08:29 +0100
commitc551604b5a0b74a43f5efe567bcbd979daa2f3cc (patch)
treeaba0fc8a8b9dcd3456f47ae5cd28fa672a7a6911 /crates/hir_ty/src/display.rs
parent8289b96216b5d4ddd0b6cf9feccb7af574d022a8 (diff)
Rename Ty::interned to Ty::kind
... since that's the actual method on Chalk side that matches the signature.
Diffstat (limited to 'crates/hir_ty/src/display.rs')
-rw-r--r--crates/hir_ty/src/display.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/hir_ty/src/display.rs b/crates/hir_ty/src/display.rs
index 59fd18c2a..97f1092c6 100644
--- a/crates/hir_ty/src/display.rs
+++ b/crates/hir_ty/src/display.rs
@@ -292,7 +292,7 @@ impl HirDisplay for Ty {
292 return write!(f, "{}", TYPE_HINT_TRUNCATION); 292 return write!(f, "{}", TYPE_HINT_TRUNCATION);
293 } 293 }
294 294
295 match self.interned(&Interner) { 295 match self.kind(&Interner) {
296 TyKind::Never => write!(f, "!")?, 296 TyKind::Never => write!(f, "!")?,
297 TyKind::Str => write!(f, "str")?, 297 TyKind::Str => write!(f, "str")?,
298 TyKind::Scalar(Scalar::Bool) => write!(f, "bool")?, 298 TyKind::Scalar(Scalar::Bool) => write!(f, "bool")?,
@@ -314,7 +314,7 @@ impl HirDisplay for Ty {
314 let ty_display = 314 let ty_display =
315 t.into_displayable(f.db, f.max_size, f.omit_verbose_types, f.display_target); 315 t.into_displayable(f.db, f.max_size, f.omit_verbose_types, f.display_target);
316 316
317 if matches!(self.interned(&Interner), TyKind::Raw(..)) { 317 if matches!(self.kind(&Interner), TyKind::Raw(..)) {
318 write!( 318 write!(
319 f, 319 f,
320 "*{}", 320 "*{}",
@@ -336,7 +336,7 @@ impl HirDisplay for Ty {
336 336
337 // FIXME: all this just to decide whether to use parentheses... 337 // FIXME: all this just to decide whether to use parentheses...
338 let datas; 338 let datas;
339 let predicates: Vec<_> = match t.interned(&Interner) { 339 let predicates: Vec<_> = match t.kind(&Interner) {
340 TyKind::Dyn(dyn_ty) if dyn_ty.bounds.skip_binders().interned().len() > 1 => { 340 TyKind::Dyn(dyn_ty) if dyn_ty.bounds.skip_binders().interned().len() > 1 => {
341 dyn_ty.bounds.skip_binders().interned().iter().cloned().collect() 341 dyn_ty.bounds.skip_binders().interned().iter().cloned().collect()
342 } 342 }
@@ -473,7 +473,7 @@ impl HirDisplay for Ty {
473 let mut default_from = 0; 473 let mut default_from = 0;
474 for (i, parameter) in parameters.iter(&Interner).enumerate() { 474 for (i, parameter) in parameters.iter(&Interner).enumerate() {
475 match ( 475 match (
476 parameter.assert_ty_ref(&Interner).interned(&Interner), 476 parameter.assert_ty_ref(&Interner).kind(&Interner),
477 default_parameters.get(i), 477 default_parameters.get(i),
478 ) { 478 ) {
479 (&TyKind::Unknown, _) | (_, None) => { 479 (&TyKind::Unknown, _) | (_, None) => {