提交 14d3937e 编写于 作者: A Ahmed Charles

Use question_mark feature in librustc.

上级 e10e0bcf
......@@ -1756,9 +1756,9 @@ pub fn print_pat(&mut self, pat: &hir::Pat) -> io::Result<()> {
self.commasep(Inconsistent, &elts[ddpos..], |s, p| s.print_pat(&p))?;
}
} else {
try!(self.commasep(Inconsistent, &elts[..], |s, p| s.print_pat(&p)));
self.commasep(Inconsistent, &elts[..], |s, p| s.print_pat(&p))?;
}
try!(self.pclose());
self.pclose()?;
}
PatKind::Path(None, ref path) => {
self.print_path(path, true, 0)?;
......
......@@ -130,7 +130,7 @@ pub fn higher_ranked_match<T, U>(&mut self,
debug!("higher_ranked_match: skol_map={:?}", skol_map);
// Equate types now that bound regions have been replaced.
try!(self.equate(a_is_expected).relate(&a_match, &b_match));
self.equate(a_is_expected).relate(&a_match, &b_match)?;
// Map each skolemized region to a vector of other regions that it
// must be equated with. (Note that this vector may include other
......
......@@ -68,7 +68,7 @@ pub fn link_or_copy<P: AsRef<Path>, Q: AsRef<Path>>(p: P, q: Q) -> io::Result<Li
let p = p.as_ref();
let q = q.as_ref();
if q.exists() {
try!(fs::remove_file(&q));
fs::remove_file(&q)?;
}
match fs::hard_link(p, q) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册