Refine SemanticModel lifetime bounds (#10221)

## Summary

Corrects/refines some semantic model and related lifetime bounds.

## Test Plan

`cargo check`
This commit is contained in:
Micha Reiser 2024-03-04 09:21:13 +01:00 committed by GitHub
parent 4eac9baf43
commit 64f66cd8fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 46 additions and 40 deletions

View file

@ -48,8 +48,8 @@ impl<'a> Globals<'a> {
builder.finish()
}
pub(crate) fn get(&self, name: &str) -> Option<&TextRange> {
self.0.get(name)
pub(crate) fn get(&self, name: &str) -> Option<TextRange> {
self.0.get(name).copied()
}
pub(crate) fn iter(&self) -> impl Iterator<Item = (&&'a str, &TextRange)> + '_ {