We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
?
1 parent 002cfdb commit 6968e77Copy full SHA for 6968e77
src/librustc_mir/hair/constant.rs
@@ -17,7 +17,7 @@ crate fn lit_to_const<'a, 'gcx, 'tcx>(
17
) -> Result<ty::Const<'tcx>, LitToConstError> {
18
use syntax::ast::*;
19
20
- let trunc = |n| {
+ let trunc = |n| -> Result<_, LitToConstError> {
21
let param_ty = ParamEnv::reveal_all().and(tcx.lift_to_global(&ty).unwrap());
22
let width = tcx.layout_of(param_ty).map_err(|_| LitToConstError::Reported)?.size;
23
trace!("trunc {} with size {} and shift {}", n, width.bits(), 128 - width.bits());
0 commit comments