mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
Minor refactoring
This commit is contained in:
parent
fc055281a5
commit
f5e1b0f97c
2 changed files with 32 additions and 21 deletions
|
@ -9,7 +9,7 @@ use std::iter;
|
|||
use std::sync::Arc;
|
||||
|
||||
use hir_def::{
|
||||
builtin_type::BuiltinType,
|
||||
builtin_type::{BuiltinFloat, BuiltinInt, BuiltinType},
|
||||
path::{GenericArg, PathSegment},
|
||||
type_ref::{TypeBound, TypeRef},
|
||||
};
|
||||
|
@ -657,10 +657,10 @@ fn type_for_builtin(def: BuiltinType) -> Ty {
|
|||
BuiltinType::Char => TypeCtor::Char,
|
||||
BuiltinType::Bool => TypeCtor::Bool,
|
||||
BuiltinType::Str => TypeCtor::Str,
|
||||
BuiltinType::Int { signedness, bitness } => {
|
||||
BuiltinType::Int(BuiltinInt { signedness, bitness }) => {
|
||||
TypeCtor::Int(IntTy { signedness, bitness }.into())
|
||||
}
|
||||
BuiltinType::Float { bitness } => TypeCtor::Float(FloatTy { bitness }.into()),
|
||||
BuiltinType::Float(BuiltinFloat { bitness }) => TypeCtor::Float(FloatTy { bitness }.into()),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue