1031: Move most things out of ra_ide_api_light r=matklad a=detrumi

This moves everything except `structure` out of `ra_ide_api_light`. So this PR and #1019 finish up #1009, whichever is merged last should probably remove the `ra_ide_api_light` crate.

Also, `LocalEdit` was removed since it wasn't used any more.

Co-authored-by: Wilco Kusee <wilcokusee@gmail.com>
This commit is contained in:
bors[bot] 2019-03-23 17:25:40 +00:00
commit 18a8f48039
8 changed files with 222 additions and 236 deletions

View file

@ -1,6 +1,5 @@
use itertools::Itertools;
use hir::{Problem, source_binder};
use ra_ide_api_light::Severity;
use ra_db::SourceDatabase;
use ra_syntax::{
Location, SourceFile, SyntaxKind, TextRange, SyntaxNode,
@ -11,6 +10,12 @@ use ra_text_edit::{TextEdit, TextEditBuilder};
use crate::{Diagnostic, FileId, FileSystemEdit, SourceChange, SourceFileEdit, db::RootDatabase};
#[derive(Debug, Copy, Clone)]
pub enum Severity {
Error,
WeakWarning,
}
pub(crate) fn diagnostics(db: &RootDatabase, file_id: FileId) -> Vec<Diagnostic> {
let source_file = db.parse(file_id);
let mut res = Vec::new();