1027: remove obsolete diagnostic r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2019-03-23 13:32:42 +00:00
commit 5a6a3d0777
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)
}