From 2a2dde1494cec11a885e899d737904f920bd183b Mon Sep 17 00:00:00 2001 From: David Cook Date: Tue, 28 Jan 2020 19:04:16 -0600 Subject: [PATCH] Try fixing test on i686-unknown-linux-gnu --- tests/run-pass/libc.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/run-pass/libc.rs b/tests/run-pass/libc.rs index 8ba97e2e4356..25f96b472b23 100644 --- a/tests/run-pass/libc.rs +++ b/tests/run-pass/libc.rs @@ -5,6 +5,7 @@ extern crate libc; +use std::convert::TryInto; use std::env::temp_dir; use std::fs::{File, remove_file}; use std::io::Write; @@ -25,7 +26,7 @@ fn main() { libc::posix_fadvise( file.as_raw_fd(), 0, - bytes.len() as i64, + bytes.len().try_into().unwrap(), libc::POSIX_FADV_DONTNEED, ) };