diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-03-20 22:08:30 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-03-20 22:08:30 +0000 |
commit | 1eb3bf41d75a8c744a0ecb586d4a2e92a1175c08 (patch) | |
tree | 6c2ddb0c296c566e9074eb316fafdce8807bcef2 /crates/ra_hir/src/ty/lower.rs | |
parent | 8b61ea127c596e4305acffa0d9180e48bd57f6c4 (diff) | |
parent | f5165af9a7cdf9e43db0a95e717a47fa2bdf6c25 (diff) |
Merge #1003
1003: make Name::new private r=flodiebold a=matklad
This maybe is overengineering, but it seems cool to keep names completely opaque.
r? @flodiebold
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/ty/lower.rs')
-rw-r--r-- | crates/ra_hir/src/ty/lower.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/ty/lower.rs b/crates/ra_hir/src/ty/lower.rs index 278f592d3..389a2fc68 100644 --- a/crates/ra_hir/src/ty/lower.rs +++ b/crates/ra_hir/src/ty/lower.rs | |||
@@ -63,9 +63,9 @@ impl Ty { | |||
63 | pub(crate) fn from_hir_path(db: &impl HirDatabase, resolver: &Resolver, path: &Path) -> Self { | 63 | pub(crate) fn from_hir_path(db: &impl HirDatabase, resolver: &Resolver, path: &Path) -> Self { |
64 | if let Some(name) = path.as_ident() { | 64 | if let Some(name) = path.as_ident() { |
65 | // TODO handle primitive type names in resolver as well? | 65 | // TODO handle primitive type names in resolver as well? |
66 | if let Some(int_ty) = primitive::UncertainIntTy::from_name(name) { | 66 | if let Some(int_ty) = primitive::UncertainIntTy::from_type_name(name) { |
67 | return Ty::Int(int_ty); | 67 | return Ty::Int(int_ty); |
68 | } else if let Some(float_ty) = primitive::UncertainFloatTy::from_name(name) { | 68 | } else if let Some(float_ty) = primitive::UncertainFloatTy::from_type_name(name) { |
69 | return Ty::Float(float_ty); | 69 | return Ty::Float(float_ty); |
70 | } else if let Some(known) = name.as_known_name() { | 70 | } else if let Some(known) = name.as_known_name() { |
71 | match known { | 71 | match known { |