diff options
Diffstat (limited to 'crates/hir_ty/src/method_resolution.rs')
-rw-r--r-- | crates/hir_ty/src/method_resolution.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/crates/hir_ty/src/method_resolution.rs b/crates/hir_ty/src/method_resolution.rs index 3c817701d..66d8de959 100644 --- a/crates/hir_ty/src/method_resolution.rs +++ b/crates/hir_ty/src/method_resolution.rs | |||
@@ -16,7 +16,7 @@ use rustc_hash::{FxHashMap, FxHashSet}; | |||
16 | use crate::{ | 16 | use crate::{ |
17 | autoderef, | 17 | autoderef, |
18 | db::HirDatabase, | 18 | db::HirDatabase, |
19 | primitive::{FloatTy, IntTy, UintTy}, | 19 | primitive::{self, FloatTy, IntTy, UintTy}, |
20 | utils::all_super_traits, | 20 | utils::all_super_traits, |
21 | ApplicationTy, Canonical, DebruijnIndex, InEnvironment, Scalar, Substs, TraitEnvironment, | 21 | ApplicationTy, Canonical, DebruijnIndex, InEnvironment, Scalar, Substs, TraitEnvironment, |
22 | TraitRef, Ty, TyKind, TypeCtor, TypeWalk, | 22 | TraitRef, Ty, TyKind, TypeCtor, TypeWalk, |
@@ -225,8 +225,12 @@ impl Ty { | |||
225 | FloatTy::F32 => lang_item_crate!("f32", "f32_runtime"), | 225 | FloatTy::F32 => lang_item_crate!("f32", "f32_runtime"), |
226 | FloatTy::F64 => lang_item_crate!("f64", "f64_runtime"), | 226 | FloatTy::F64 => lang_item_crate!("f64", "f64_runtime"), |
227 | }, | 227 | }, |
228 | TypeCtor::Scalar(Scalar::Int(t)) => lang_item_crate!(t.ty_to_string()), | 228 | TypeCtor::Scalar(Scalar::Int(t)) => { |
229 | TypeCtor::Scalar(Scalar::Uint(t)) => lang_item_crate!(t.ty_to_string()), | 229 | lang_item_crate!(primitive::int_ty_to_string(t)) |
230 | } | ||
231 | TypeCtor::Scalar(Scalar::Uint(t)) => { | ||
232 | lang_item_crate!(primitive::uint_ty_to_string(t)) | ||
233 | } | ||
230 | TypeCtor::Str => lang_item_crate!("str_alloc", "str"), | 234 | TypeCtor::Str => lang_item_crate!("str_alloc", "str"), |
231 | TypeCtor::Slice => lang_item_crate!("slice_alloc", "slice"), | 235 | TypeCtor::Slice => lang_item_crate!("slice_alloc", "slice"), |
232 | TypeCtor::RawPtr(Mutability::Shared) => lang_item_crate!("const_ptr"), | 236 | TypeCtor::RawPtr(Mutability::Shared) => lang_item_crate!("const_ptr"), |