Skip to content

Commit f5cc6b5

Browse files
committed
Change Scalar to numeric cast
1 parent 5beeb53 commit f5cc6b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc/traits/error_reporting.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
425425
Some(format!("[{}]", self.tcx.type_of(def.did).to_string())),
426426
));
427427
if let Some(len) = len.val.try_to_scalar().and_then(|scalar| {
428-
scalar.to_u64().ok()
428+
scalar.to_i64().ok()
429429
}) {
430430
flags.push((
431431
"_Self".to_owned(),

0 commit comments

Comments
 (0)