Clean up some warnings and use newer nightly compiler

This stops using the deprecated libc::uint32_t and libc::uint64_t
types in favour of the native u32 and u64 types.

It also uses a newer nightly compiler to get rid of the incorrect
"unused no_mangle" warning when compiling incrementally.

Finally the newer compiler prefers us to be explicit when implementing
traits using the new dyn keyword.
This commit is contained in:
Floris Bruynooghe
2019-06-16 15:32:15 +02:00
parent 3a524503f0
commit dc0de47b4b
3 changed files with 73 additions and 86 deletions

View File

@@ -1536,7 +1536,7 @@ impl<T: AsRef<std::ffi::OsStr>> OsStrExt for T {
// Implementation for os_str_to_c_string on windows.
#[allow(dead_code)]
fn os_str_to_c_string_unicode(
os_str: &AsRef<std::ffi::OsStr>,
os_str: &dyn AsRef<std::ffi::OsStr>,
) -> Result<std::ffi::CString, CStringError> {
match os_str.as_ref().to_str() {
Some(val) => std::ffi::CString::new(val.as_bytes()).map_err(|err| match err {