Remove hir krate methods

This commit is contained in:
Aramis Razzaghipour 2021-05-24 09:42:06 +10:00
parent 4fd5248749
commit c32428571c
No known key found for this signature in database
GPG key ID: F788F7E990136003
4 changed files with 11 additions and 59 deletions

View file

@ -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