mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 15:15:24 +00:00
Remove hir krate methods
This commit is contained in:
parent
4fd5248749
commit
c32428571c
4 changed files with 11 additions and 59 deletions
|
@ -227,7 +227,7 @@ pub(crate) fn runnable_fn(sema: &Semantics<RootDatabase>, def: hir::Function) ->
|
|||
let func = def.source(sema.db)?;
|
||||
let name_string = def.name(sema.db).to_string();
|
||||
|
||||
let root = def.krate(sema.db)?.root_module(sema.db);
|
||||
let root = def.module(sema.db).krate().root_module(sema.db);
|
||||
|
||||
let kind = if name_string == "main" && def.module(sema.db) == root {
|
||||
RunnableKind::Bin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue