remove obsolete diagnostic

This commit is contained in:
Aleksey Kladov 2019-03-23 16:31:11 +03:00
parent bce55c749a
commit 46a21b07e6
2 changed files with 0 additions and 22 deletions

View File

@ -98,7 +98,6 @@ pub enum ModuleSource {
#[derive(Clone, Debug, Hash, PartialEq, Eq)]
pub enum Problem {
UnresolvedModule { candidate: RelativePathBuf },
NotDirOwner { move_to: RelativePathBuf, candidate: RelativePathBuf },
}
impl Module {

View File

@ -152,27 +152,6 @@ fn check_module(
fix: Some(fix),
}
}
Problem::NotDirOwner { move_to, candidate } => {
let move_file = FileSystemEdit::MoveFile {
src: file_id,
dst_source_root: source_root,
dst_path: move_to.clone(),
};
let create_file =
FileSystemEdit::CreateFile { source_root, path: move_to.join(candidate) };
let fix = SourceChange {
label: "move file and create module".to_string(),
source_file_edits: Vec::new(),
file_system_edits: vec![move_file, create_file],
cursor_position: None,
};
Diagnostic {
range: name_node.range(),
message: "can't declare module at this location".to_string(),
severity: Severity::Error,
fix: Some(fix),
}
}
};
acc.push(diag)
}