mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Shrink TypeRef
from 16 from 32 bytes
Only references and arrays need to be boxed, and they comprise only 9.4% of the types (according to counting on r-a's code). This saves 17mb.
This commit is contained in:
parent
061e5d7f71
commit
bf7edd3783
10 changed files with 178 additions and 149 deletions
|
@ -2420,8 +2420,8 @@ impl SelfParam {
|
|||
func_data
|
||||
.params
|
||||
.first()
|
||||
.map(|¶m| match func_data.types_map[param] {
|
||||
TypeRef::Reference(.., mutability) => match mutability {
|
||||
.map(|¶m| match &func_data.types_map[param] {
|
||||
TypeRef::Reference(ref_) => match ref_.mutability {
|
||||
hir_def::type_ref::Mutability::Shared => Access::Shared,
|
||||
hir_def::type_ref::Mutability::Mut => Access::Exclusive,
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue