mod scope;
use std::{
cmp::{max, min},
sync::Arc,
};
use ra_syntax::{
TextRange, TextUnit, SyntaxNodeRef,
ast::{self, AstNode, DocCommentsOwner, NameOwner},
};
use ra_db::FileId;
use crate::{
Cancelable,
DefLoc, DefKind, DefId, HirDatabase, SourceItemId,
Module,
};
pub use self::scope::FnScopes;
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub struct FnId(pub(crate) DefId);
pub struct Function {
fn_id: FnId,
}
impl Function {
pub fn guess_from_source(
db: &impl HirDatabase,
file_id: FileId,
fn_def: ast::FnDef,
) -> Cancelable