Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6968e77

Browse files
committedMay 13, 2019
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

Lines changed: 1 addition & 1 deletion
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)
Please sign in to comment.