mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
internal: Add StaticLifetime to hir API
This commit is contained in:
parent
abb3ed5db6
commit
aaa5426fec
14 changed files with 70 additions and 40 deletions
|
@ -756,15 +756,7 @@ fn closure_ty(
|
|||
}
|
||||
|
||||
fn definition_mod_path(db: &RootDatabase, def: &Definition) -> Option<String> {
|
||||
if matches!(
|
||||
def,
|
||||
Definition::GenericParam(_)
|
||||
| Definition::BuiltinType(_)
|
||||
| Definition::Local(_)
|
||||
| Definition::Label(_)
|
||||
| Definition::BuiltinAttr(_)
|
||||
| Definition::ToolModule(_)
|
||||
) {
|
||||
if matches!(def, Definition::GenericParam(_) | Definition::Local(_) | Definition::Label(_)) {
|
||||
return None;
|
||||
}
|
||||
def.module(db).map(|module| path(db, module, definition_owner_name(db, def)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue