Skip to content

Commit 14d3937

Browse files
committed
Use question_mark feature in librustc.
1 parent e10e0bc commit 14d3937

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/librustc/hir/print.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1756,9 +1756,9 @@ impl<'a> State<'a> {
17561756
self.commasep(Inconsistent, &elts[ddpos..], |s, p| s.print_pat(&p))?;
17571757
}
17581758
} else {
1759-
try!(self.commasep(Inconsistent, &elts[..], |s, p| s.print_pat(&p)));
1759+
self.commasep(Inconsistent, &elts[..], |s, p| s.print_pat(&p))?;
17601760
}
1761-
try!(self.pclose());
1761+
self.pclose()?;
17621762
}
17631763
PatKind::Path(None, ref path) => {
17641764
self.print_path(path, true, 0)?;

src/librustc/infer/higher_ranked/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
130130
debug!("higher_ranked_match: skol_map={:?}", skol_map);
131131

132132
// Equate types now that bound regions have been replaced.
133-
try!(self.equate(a_is_expected).relate(&a_match, &b_match));
133+
self.equate(a_is_expected).relate(&a_match, &b_match)?;
134134

135135
// Map each skolemized region to a vector of other regions that it
136136
// must be equated with. (Note that this vector may include other

src/librustc/util/fs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ pub fn link_or_copy<P: AsRef<Path>, Q: AsRef<Path>>(p: P, q: Q) -> io::Result<Li
6868
let p = p.as_ref();
6969
let q = q.as_ref();
7070
if q.exists() {
71-
try!(fs::remove_file(&q));
71+
fs::remove_file(&q)?;
7272
}
7373

7474
match fs::hard_link(p, q) {

0 commit comments

Comments
 (0)