mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Intern consts & lifetimes
Slight memory usage reduction.
This commit is contained in:
parent
37cb6805af
commit
90656f8674
2 changed files with 20 additions and 7 deletions
|
@ -75,7 +75,7 @@ impl TyExt for Ty {
|
|||
}
|
||||
fn as_reference(&self) -> Option<(&Ty, Lifetime, Mutability)> {
|
||||
match self.kind(&Interner) {
|
||||
TyKind::Ref(mutability, lifetime, ty) => Some((ty, *lifetime, *mutability)),
|
||||
TyKind::Ref(mutability, lifetime, ty) => Some((ty, lifetime.clone(), *mutability)),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue