mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Don't use Substs for Ref/Raw/Array/Slice
This commit is contained in:
parent
af466f8542
commit
42217738e0
10 changed files with 103 additions and 116 deletions
|
@ -276,20 +276,17 @@ impl HirDisplay for Ty {
|
|||
&TyKind::Scalar(Scalar::Float(t)) => write!(f, "{}", primitive::float_ty_to_string(t))?,
|
||||
&TyKind::Scalar(Scalar::Int(t)) => write!(f, "{}", primitive::int_ty_to_string(t))?,
|
||||
&TyKind::Scalar(Scalar::Uint(t)) => write!(f, "{}", primitive::uint_ty_to_string(t))?,
|
||||
TyKind::Slice(parameters) => {
|
||||
let t = parameters.as_single();
|
||||
TyKind::Slice(t) => {
|
||||
write!(f, "[")?;
|
||||
t.hir_fmt(f)?;
|
||||
write!(f, "]")?;
|
||||
}
|
||||
TyKind::Array(parameters) => {
|
||||
let t = parameters.as_single();
|
||||
TyKind::Array(t) => {
|
||||
write!(f, "[")?;
|
||||
t.hir_fmt(f)?;
|
||||
write!(f, "; _]")?;
|
||||
}
|
||||
TyKind::Raw(m, parameters) | TyKind::Ref(m, parameters) => {
|
||||
let t = parameters.as_single();
|
||||
TyKind::Raw(m, t) | TyKind::Ref(m, t) => {
|
||||
let ty_display =
|
||||
t.into_displayable(f.db, f.max_size, f.omit_verbose_types, f.display_target);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue