Clean up handling of int/float literal types

'Unknown' int/float types actually never exist as such, they get replaced by
type variables immediately. So the whole `Uncertain<IntTy>` thing was
unnecessary and just led to a bunch of match branches that were never hit.
This commit is contained in:
Florian Diebold
2020-06-06 17:52:00 +02:00
parent a609336d72
commit d66daee849
6 changed files with 33 additions and 104 deletions

View File

@@ -58,7 +58,7 @@ use ra_db::{impl_intern_key, salsa, CrateId};
use crate::{
db::HirDatabase,
primitive::{FloatTy, IntTy, Uncertain},
primitive::{FloatTy, IntTy},
utils::{generics, make_mut_slice, Generics},
};
use display::HirDisplay;
@@ -87,10 +87,10 @@ pub enum TypeCtor {
Char,
/// A primitive integer type. For example, `i32`.
Int(Uncertain<IntTy>),
Int(IntTy),
/// A primitive floating-point type. For example, `f64`.
Float(Uncertain<FloatTy>),
Float(FloatTy),
/// Structures, enumerations and unions.
Adt(AdtId),