mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
remove Cancelable from static&const API
This commit is contained in:
parent
9446be2999
commit
9dd4099d93
2 changed files with 12 additions and 15 deletions
|
@ -333,8 +333,8 @@ impl Const {
|
|||
Const { def_id }
|
||||
}
|
||||
|
||||
pub fn source(&self, db: &impl HirDatabase) -> Cancelable<(HirFileId, TreeArc<ast::ConstDef>)> {
|
||||
Ok(def_id_to_ast(db, self.def_id))
|
||||
pub fn source(&self, db: &impl HirDatabase) -> (HirFileId, TreeArc<ast::ConstDef>) {
|
||||
def_id_to_ast(db, self.def_id)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -348,11 +348,8 @@ impl Static {
|
|||
Static { def_id }
|
||||
}
|
||||
|
||||
pub fn source(
|
||||
&self,
|
||||
db: &impl HirDatabase,
|
||||
) -> Cancelable<(HirFileId, TreeArc<ast::StaticDef>)> {
|
||||
Ok(def_id_to_ast(db, self.def_id))
|
||||
pub fn source(&self, db: &impl HirDatabase) -> (HirFileId, TreeArc<ast::StaticDef>) {
|
||||
def_id_to_ast(db, self.def_id)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -366,8 +363,8 @@ impl Trait {
|
|||
Trait { def_id }
|
||||
}
|
||||
|
||||
pub fn source(&self, db: &impl HirDatabase) -> Cancelable<(HirFileId, TreeArc<ast::TraitDef>)> {
|
||||
Ok(def_id_to_ast(db, self.def_id))
|
||||
pub fn source(&self, db: &impl HirDatabase) -> (HirFileId, TreeArc<ast::TraitDef>) {
|
||||
def_id_to_ast(db, self.def_id)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -381,7 +378,7 @@ impl Type {
|
|||
Type { def_id }
|
||||
}
|
||||
|
||||
pub fn source(&self, db: &impl HirDatabase) -> Cancelable<(HirFileId, TreeArc<ast::TypeDef>)> {
|
||||
Ok(def_id_to_ast(db, self.def_id))
|
||||
pub fn source(&self, db: &impl HirDatabase) -> (HirFileId, TreeArc<ast::TypeDef>) {
|
||||
def_id_to_ast(db, self.def_id)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue