Skip to content

Commit 6968e77

Browse files
committed
Fix new ? inference errors in librustc_mir
1 parent 002cfdb commit 6968e77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_mir/hair/constant.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ crate fn lit_to_const<'a, 'gcx, 'tcx>(
1717
) -> Result<ty::Const<'tcx>, LitToConstError> {
1818
use syntax::ast::*;
1919

20-
let trunc = |n| {
20+
let trunc = |n| -> Result<_, LitToConstError> {
2121
let param_ty = ParamEnv::reveal_all().and(tcx.lift_to_global(&ty).unwrap());
2222
let width = tcx.layout_of(param_ty).map_err(|_| LitToConstError::Reported)?.size;
2323
trace!("trunc {} with size {} and shift {}", n, width.bits(), 128 - width.bits());

0 commit comments

Comments
 (0)