Skip to content

Commit 05c9b98

Browse files
authored
Merge pull request #702 from Josef-Friedrich/fix-mismatched-lifetime-syntaxes-warnings
Fix the new mismatched_lifetime_syntaxes warnings added in Rust 1.89
2 parents cce5fd6 + cb35fba commit 05c9b98

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

crates/emmylua_code_analysis/src/compilation/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ impl LuaCompilation {
2424
compilation
2525
}
2626

27-
pub fn get_semantic_model(&self, file_id: FileId) -> Option<SemanticModel> {
27+
pub fn get_semantic_model(&'_ self, file_id: FileId) -> Option<SemanticModel<'_>> {
2828
let cache = LuaInferCache::new(file_id, Default::default());
2929
let tree = self.db.get_vfs().get_syntax_tree(&file_id)?;
3030
Some(SemanticModel::new(

crates/emmylua_code_analysis/src/semantic/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,19 @@ impl<'a> SemanticModel<'a> {
8383
}
8484
}
8585

86-
pub fn get_document(&self) -> LuaDocument {
86+
pub fn get_document(&'_ self) -> LuaDocument<'_> {
8787
self.db.get_vfs().get_document(&self.file_id).unwrap()
8888
}
8989

9090
pub fn get_module(&self) -> Option<&ModuleInfo> {
9191
self.db.get_module_index().get_module(self.file_id)
9292
}
9393

94-
pub fn get_document_by_file_id(&self, file_id: FileId) -> Option<LuaDocument> {
94+
pub fn get_document_by_file_id(&'_ self, file_id: FileId) -> Option<LuaDocument<'_>> {
9595
self.db.get_vfs().get_document(&file_id)
9696
}
9797

98-
pub fn get_document_by_uri(&self, uri: &Uri) -> Option<LuaDocument> {
98+
pub fn get_document_by_uri(&'_ self, uri: &Uri) -> Option<LuaDocument<'_>> {
9999
let file_id = self.db.get_vfs().get_file_id(&uri)?;
100100
self.db.get_vfs().get_document(&file_id)
101101
}

crates/emmylua_code_analysis/src/vfs/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ impl Vfs {
121121
if let Some(s) = opt { Some(s) } else { None }
122122
}
123123

124-
pub fn get_document(&self, id: &FileId) -> Option<LuaDocument> {
124+
pub fn get_document(&self, id: &FileId) -> Option<LuaDocument<'_>> {
125125
let path = self.file_path_map.get(&id.id)?;
126126
let text = self.get_file_content(id)?;
127127
let line_index = self.line_index_map.get(id)?;

crates/emmylua_ls/src/handlers/fold_range/builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ impl FoldingRangeBuilder<'_> {
2525
&self.root
2626
}
2727

28-
pub fn get_document(&self) -> &LuaDocument {
28+
pub fn get_document(&'_ self) -> &'_ LuaDocument<'_> {
2929
self.document
3030
}
3131

0 commit comments

Comments
 (0)