aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/inlay_hints.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-04-04 12:30:07 +0100
committerGitHub <[email protected]>2021-04-04 12:30:07 +0100
commit082996032054031bd1b68ee45ab04293f4877e91 (patch)
treeccf4586bbb70ef9ebf429a2c79a5f409549ebf73 /crates/ide/src/inlay_hints.rs
parentc9bcbf9a43eb0bf1a5255f704080305e568f0a36 (diff)
parentcde3857897955558ed0e60cf8158e18d5c75d188 (diff)
Merge #8327
8327: Move `Ty` creation methods out of `Ty` (Chalk move preparation) r=flodiebold a=flodiebold When we'll move to using `chalk_ir::Ty` (#8313), we won't be able to have our own inherent methods on `Ty` anymore, so we need to move the helpers elsewhere. This adds a `TyBuilder` that allows easily constructing `Ty` and related types (`TraitRef`, `ProjectionTy`, `Substitution`). It also replaces `SubstsBuilder`. `TyBuilder` can construct different things based on its type parameter; e.g. if it has an `AdtId`, we're constructing an ADT type, but if it has a `TraitId`, we're constructing a `TraitRef`. The common thing for all of them is that we need to build a `Substitution`, so the API stays the same for all of them except at the beginning and end. We also use `TyBuilder` to house various one-shot methods for constructing types, e.g. `TyBuilder::unit()`. Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/ide/src/inlay_hints.rs')
-rw-r--r--crates/ide/src/inlay_hints.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide/src/inlay_hints.rs b/crates/ide/src/inlay_hints.rs
index f73edf8b6..d5ef054d8 100644
--- a/crates/ide/src/inlay_hints.rs
+++ b/crates/ide/src/inlay_hints.rs
@@ -234,7 +234,7 @@ fn hint_iterator(
234 hir::AssocItem::TypeAlias(alias) if alias.name(db) == known::Item => Some(alias), 234 hir::AssocItem::TypeAlias(alias) if alias.name(db) == known::Item => Some(alias),
235 _ => None, 235 _ => None,
236 })?; 236 })?;
237 if let Some(ty) = ty.normalize_trait_assoc_type(db, iter_trait, &[], assoc_type_item) { 237 if let Some(ty) = ty.normalize_trait_assoc_type(db, &[], assoc_type_item) {
238 const LABEL_START: &str = "impl Iterator<Item = "; 238 const LABEL_START: &str = "impl Iterator<Item = ";
239 const LABEL_END: &str = ">"; 239 const LABEL_END: &str = ">";
240 240