Skip to content

Commit

Permalink
Change Scalar to numeric cast
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Oct 15, 2018
1 parent 5beeb53 commit f5cc6b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc/traits/error_reporting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
Some(format!("[{}]", self.tcx.type_of(def.did).to_string())),
));
if let Some(len) = len.val.try_to_scalar().and_then(|scalar| {
scalar.to_u64().ok()
scalar.to_i64().ok()
}) {
flags.push((
"_Self".to_owned(),
Expand Down

0 comments on commit f5cc6b5

Please sign in to comment.