mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
syntax: return owned string instead of leaking string
This commit is contained in:
parent
4ecaad98e0
commit
5ff3299dd6
16 changed files with 27 additions and 27 deletions
|
@ -445,7 +445,7 @@ impl<'db> SemanticsImpl<'db> {
|
|||
}
|
||||
};
|
||||
gpl.lifetime_params()
|
||||
.find(|tp| tp.lifetime().as_ref().map(|lt| lt.text()) == Some(text))
|
||||
.find(|tp| tp.lifetime().as_ref().map(|lt| lt.text()).as_ref() == Some(&text))
|
||||
})?;
|
||||
let src = self.find_file(lifetime_param.syntax().clone()).with_value(lifetime_param);
|
||||
ToDef::to_def(self, src)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue