提交 d82d4b66 编写于 作者: N Niko Matsakis

tolerate `None` return from `get_line`

上级 2bade813
......@@ -296,7 +296,7 @@ fn line_from_filemap(fm: &syntax_pos::FileMap,
h_end: usize)
-> DiagnosticSpanLine {
DiagnosticSpanLine {
text: fm.get_line(index).unwrap().to_owned(),
text: fm.get_line(index).unwrap_or("").to_owned(),
highlight_start: h_start,
highlight_end: h_end,
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册