diff options
author | Aleksey Kladov <[email protected]> | 2019-10-30 14:19:30 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-10-30 14:43:14 +0000 |
commit | f8ddef875af08f6c67fe69f7803f3926bc6f66bb (patch) | |
tree | ed4704070c4e5bb9db7225b1f5af753b83864661 /crates/ra_hir/src/code_model.rs | |
parent | 16e620c052016010b2f17070a98bdc1e7e849ab3 (diff) |
remove forward pointer for name
Diffstat (limited to 'crates/ra_hir/src/code_model.rs')
-rw-r--r-- | crates/ra_hir/src/code_model.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index de1377aa4..7848d0a3f 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs | |||
@@ -5,7 +5,13 @@ pub(crate) mod docs; | |||
5 | 5 | ||
6 | use std::sync::Arc; | 6 | use std::sync::Arc; |
7 | 7 | ||
8 | use hir_def::{CrateModuleId, ModuleId}; | 8 | use hir_def::{ |
9 | name::{ | ||
10 | self, AsName, BOOL, CHAR, F32, F64, I128, I16, I32, I64, I8, ISIZE, SELF_TYPE, STR, U128, | ||
11 | U16, U32, U64, U8, USIZE, | ||
12 | }, | ||
13 | CrateModuleId, ModuleId, | ||
14 | }; | ||
9 | use ra_db::{CrateId, Edition}; | 15 | use ra_db::{CrateId, Edition}; |
10 | use ra_syntax::ast::{self, NameOwner, TypeAscriptionOwner}; | 16 | use ra_syntax::ast::{self, NameOwner, TypeAscriptionOwner}; |
11 | 17 | ||
@@ -20,10 +26,6 @@ use crate::{ | |||
20 | TypeAliasId, | 26 | TypeAliasId, |
21 | }, | 27 | }, |
22 | impl_block::ImplBlock, | 28 | impl_block::ImplBlock, |
23 | name::{ | ||
24 | BOOL, CHAR, F32, F64, I128, I16, I32, I64, I8, ISIZE, SELF_TYPE, STR, U128, U16, U32, U64, | ||
25 | U8, USIZE, | ||
26 | }, | ||
27 | nameres::{ImportId, ModuleScope, Namespace}, | 29 | nameres::{ImportId, ModuleScope, Namespace}, |
28 | resolve::{Resolver, Scope, TypeNs}, | 30 | resolve::{Resolver, Scope, TypeNs}, |
29 | traits::TraitData, | 31 | traits::TraitData, |
@@ -33,7 +35,7 @@ use crate::{ | |||
33 | }, | 35 | }, |
34 | type_ref::Mutability, | 36 | type_ref::Mutability, |
35 | type_ref::TypeRef, | 37 | type_ref::TypeRef, |
36 | AsName, Either, HasSource, Name, Ty, | 38 | Either, HasSource, Name, Ty, |
37 | }; | 39 | }; |
38 | 40 | ||
39 | /// hir::Crate describes a single crate. It's the main interface with which | 41 | /// hir::Crate describes a single crate. It's the main interface with which |
@@ -898,9 +900,7 @@ impl Trait { | |||
898 | .where_predicates | 900 | .where_predicates |
899 | .iter() | 901 | .iter() |
900 | .filter_map(|pred| match &pred.type_ref { | 902 | .filter_map(|pred| match &pred.type_ref { |
901 | TypeRef::Path(p) if p.as_ident() == Some(&crate::name::SELF_TYPE) => { | 903 | TypeRef::Path(p) if p.as_ident() == Some(&name::SELF_TYPE) => pred.bound.as_path(), |
902 | pred.bound.as_path() | ||
903 | } | ||
904 | _ => None, | 904 | _ => None, |
905 | }) | 905 | }) |
906 | .filter_map(|path| match resolver.resolve_path_in_type_ns_fully(db, path) { | 906 | .filter_map(|path| match resolver.resolve_path_in_type_ns_fully(db, path) { |