diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-27 19:30:38 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-27 19:30:38 +0000 |
commit | c0bb667a7dfaecfefacf0b3b6cb1e483aac6747a (patch) | |
tree | 3780635e0f8987c07db22210408b1816388e5869 /crates/ra_hir/src | |
parent | 385899d2f084ce688324a3db24e71b8b9f55d6e6 (diff) | |
parent | 04735abfaec30461252aecde10bb1d0d344728f1 (diff) |
Merge #2432
2432: Minimize API r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r-- | crates/ra_hir/src/code_model.rs | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index 5a3e24e9e..9488521a9 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs | |||
@@ -29,10 +29,7 @@ use ra_syntax::{ast, AstNode, SyntaxNode}; | |||
29 | use crate::{ | 29 | use crate::{ |
30 | db::{DefDatabase, HirDatabase}, | 30 | db::{DefDatabase, HirDatabase}, |
31 | ty::display::HirFormatter, | 31 | ty::display::HirFormatter, |
32 | ty::{ | 32 | ty::{self, InEnvironment, InferenceResult, TraitEnvironment, Ty, TyDefId, TypeCtor, TypeWalk}, |
33 | self, InEnvironment, InferenceResult, TraitEnvironment, TraitRef, Ty, TyDefId, TypeCtor, | ||
34 | TypeWalk, | ||
35 | }, | ||
36 | CallableDef, Either, HirDisplay, Name, Source, | 33 | CallableDef, Either, HirDisplay, Name, Source, |
37 | }; | 34 | }; |
38 | 35 | ||
@@ -731,10 +728,6 @@ impl Trait { | |||
731 | db.trait_data(self.id).items.iter().map(|(_name, it)| (*it).into()).collect() | 728 | db.trait_data(self.id).items.iter().map(|(_name, it)| (*it).into()).collect() |
732 | } | 729 | } |
733 | 730 | ||
734 | pub fn trait_ref(self, db: &impl HirDatabase) -> TraitRef { | ||
735 | TraitRef::for_trait(db, self.id) | ||
736 | } | ||
737 | |||
738 | pub fn is_auto(self, db: &impl DefDatabase) -> bool { | 731 | pub fn is_auto(self, db: &impl DefDatabase) -> bool { |
739 | db.trait_data(self.id).auto | 732 | db.trait_data(self.id).auto |
740 | } | 733 | } |