mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-13 09:49:11 +03:00
Drop some apparently-unreachable code
This commit is contained in:
parent
63c7b90113
commit
4c02a38a99
@ -421,10 +421,6 @@ fn eval_and_format<'a>(src: &str) -> Result<String, SyntaxError<'a>> {
|
||||
gen_and_eval_llvm(src, Triple::host(), OptLevel::Normal).map(format_output)
|
||||
}
|
||||
|
||||
fn report_parse_error(fail: SyntaxError) {
|
||||
println!("TODO Gracefully report parse error in repl: {:?}", fail);
|
||||
}
|
||||
|
||||
pub fn main() -> io::Result<()> {
|
||||
use rustyline::error::ReadlineError;
|
||||
use rustyline::Editor;
|
||||
@ -463,8 +459,9 @@ pub fn main() -> io::Result<()> {
|
||||
Ok(output) => {
|
||||
println!("{}", output);
|
||||
}
|
||||
Err(fail) => {
|
||||
report_parse_error(fail);
|
||||
Err(_) => {
|
||||
// This seems to be unreachable in practice.
|
||||
unreachable!();
|
||||
}
|
||||
}
|
||||
|
||||
@ -498,13 +495,9 @@ pub fn main() -> io::Result<()> {
|
||||
println!("{}", output);
|
||||
pending_src.clear();
|
||||
}
|
||||
// Err(Fail {
|
||||
// reason: FailReason::Eof(_),
|
||||
// ..
|
||||
// }) => {}
|
||||
Err(fail) => {
|
||||
report_parse_error(fail);
|
||||
pending_src.clear();
|
||||
Err(_) => {
|
||||
// This seems to be unreachable in practice.
|
||||
unreachable!();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user