diff options
Diffstat (limited to 'crates/ra_hir_ty/src')
-rw-r--r-- | crates/ra_hir_ty/src/lower.rs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/crates/ra_hir_ty/src/lower.rs b/crates/ra_hir_ty/src/lower.rs index f8331d257..091c60f4f 100644 --- a/crates/ra_hir_ty/src/lower.rs +++ b/crates/ra_hir_ty/src/lower.rs | |||
@@ -363,7 +363,7 @@ pub(super) fn substs_from_path_segment( | |||
363 | } | 363 | } |
364 | 364 | ||
365 | impl TraitRef { | 365 | impl TraitRef { |
366 | pub(crate) fn from_path( | 366 | fn from_path( |
367 | db: &impl HirDatabase, | 367 | db: &impl HirDatabase, |
368 | resolver: &Resolver, | 368 | resolver: &Resolver, |
369 | path: &Path, | 369 | path: &Path, |
@@ -377,7 +377,7 @@ impl TraitRef { | |||
377 | Some(TraitRef::from_resolved_path(db, resolver, resolved.into(), segment, explicit_self_ty)) | 377 | Some(TraitRef::from_resolved_path(db, resolver, resolved.into(), segment, explicit_self_ty)) |
378 | } | 378 | } |
379 | 379 | ||
380 | pub(super) fn from_resolved_path( | 380 | pub(crate) fn from_resolved_path( |
381 | db: &impl HirDatabase, | 381 | db: &impl HirDatabase, |
382 | resolver: &Resolver, | 382 | resolver: &Resolver, |
383 | resolved: TraitId, | 383 | resolved: TraitId, |
@@ -391,7 +391,7 @@ impl TraitRef { | |||
391 | TraitRef { trait_: resolved, substs } | 391 | TraitRef { trait_: resolved, substs } |
392 | } | 392 | } |
393 | 393 | ||
394 | pub(crate) fn from_hir( | 394 | fn from_hir( |
395 | db: &impl HirDatabase, | 395 | db: &impl HirDatabase, |
396 | resolver: &Resolver, | 396 | resolver: &Resolver, |
397 | type_ref: &TypeRef, | 397 | type_ref: &TypeRef, |
@@ -415,11 +415,6 @@ impl TraitRef { | |||
415 | substs_from_path_segment(db, resolver, segment, Some(resolved.into()), !has_self_param) | 415 | substs_from_path_segment(db, resolver, segment, Some(resolved.into()), !has_self_param) |
416 | } | 416 | } |
417 | 417 | ||
418 | pub fn for_trait(db: &impl HirDatabase, trait_: TraitId) -> TraitRef { | ||
419 | let substs = Substs::identity(&db.generic_params(trait_.into())); | ||
420 | TraitRef { trait_, substs } | ||
421 | } | ||
422 | |||
423 | pub(crate) fn from_type_bound( | 418 | pub(crate) fn from_type_bound( |
424 | db: &impl HirDatabase, | 419 | db: &impl HirDatabase, |
425 | resolver: &Resolver, | 420 | resolver: &Resolver, |