Skip to content

Commit 5f891c5

Browse files
committed
Fixes
1 parent 3f9f574 commit 5f891c5

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/libcore/macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ macro_rules! debug_assert_eq {
189189
($($arg:tt)*) => (if cfg!(debug_assertions) { assert_eq!($($arg)*); })
190190
}
191191

192+
/// Helper macro for unwrapping `Result` values while returning early with an
192193
/// error if the value of the expression is `Err`. Can only be used in
193194
/// functions that return `Result` because of the early return of `Err` that
194195
/// it provides.
@@ -228,7 +229,6 @@ macro_rules! try {
228229
}
229230
})
230231
}
231-
/// Helper macro for unwrapping `Result` values while returning early with an
232232
#[cfg(not(stage0))]
233233
#[macro_export]
234234
#[stable(feature = "rust1", since = "1.0.0")]

src/librustc/hir/lowering.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1531,11 +1531,11 @@ impl<'a> LoweringContext<'a> {
15311531
e.span,
15321532
hir::PopUnstableBlock,
15331533
ThinVec::new());
1534-
1534+
15351535
let path = self.std_path(e.span, &["ops", "Carrier", "translate"]);
15361536
let path = self.expr_path(path, ThinVec::new());
15371537
let call = self.expr_call(e.span, path, hir_vec![sub_expr]);
1538-
1538+
15391539
self.signal_block_expr(hir_vec![],
15401540
call,
15411541
e.span,

src/test/run-pass/try-operator-custom.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ impl<U, V> Carrier for MyResult<U, V> {
3333
where T: Carrier<Success=U, Error=V>
3434
{
3535
match self {
36-
MyResult::Awesome(u) => T::from_success(u.into()),
37-
MyResult::Terrible(e) => T::from_error(e.into()),
36+
MyResult::Awesome(u) => T::from_success(u),
37+
MyResult::Terrible(e) => T::from_error(e),
3838
}
3939
}
4040
}

0 commit comments

Comments
 (0)