mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Make GenericParams::lifetimes private
This commit is contained in:
parent
be1ea4028b
commit
966798b7ba
8 changed files with 12 additions and 14 deletions
|
@ -163,7 +163,7 @@ impl Generics {
|
|||
fn find_lifetime(&self, lifetime: LifetimeParamId) -> Option<usize> {
|
||||
if lifetime.parent == self.def {
|
||||
let idx = lifetime.local_id.into_raw().into_u32() as usize;
|
||||
debug_assert!(idx <= self.params.lifetimes.len());
|
||||
debug_assert!(idx <= self.params.len_lifetimes());
|
||||
Some(self.params.len_type_or_consts() + idx)
|
||||
} else {
|
||||
debug_assert_eq!(self.parent_generics().map(|it| it.def), Some(lifetime.parent));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue