Compile errors with time-0.1.30 under msys64


#1

Likely introduced by a cargo update:

emabee@devmachine MINGW64 /c/dev/rust/projects/flexi_logger
$ cargo build
Compiling time v0.1.30
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:408:40: 408:43 error: mismatched types:
expected *const winapi::minwindef::FILETIME,
found &winapi::minwindef::FILETIME
(expected struct winapi::minwindef::FILETIME,
found a different struct winapi::minwindef::FILETIME) [E0308]
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:408 call!(FileTimeToSystemTime(&ft, &mut out));
^~~
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:395:5: 402:6 note: in expansion of call!
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:408:13: 408:56 note: expansion site
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:408:40: 408:43 help: run rustc --explain E0308 to see a detailed explanation
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:410:27: 410:31 error: mismatched types:
expected &winapi::minwinbase::SYSTEMTIME,
found &winapi::minwinbase::SYSTEMTIME
(expected struct winapi::minwinbase::SYSTEMTIME,
found a different struct winapi::minwinbase::SYSTEMTIME) [E0308]
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:410 system_time_to_tm(&out, tm);
^~~~
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:410:27: 410:31 help: run rustc --explain E0308 to see a detailed explanation
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:419:40: 419:43 error: mismatched types:
expected *const winapi::minwindef::FILETIME,
found &winapi::minwindef::FILETIME
(expected struct winapi::minwindef::FILETIME,
found a different struct winapi::minwindef::FILETIME) [E0308]
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:419 call!(FileTimeToSystemTime(&ft, &mut utc));
^~~
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:395:5: 402:6 note: in expansion of call!
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:419:13: 419:56 note: expansion site
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:419:40: 419:43 help: run rustc --explain E0308 to see a detailed explanation
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:422:31: 422:37 error: mismatched types:
expected &winapi::minwinbase::SYSTEMTIME,
found &winapi::minwinbase::SYSTEMTIME
(expected struct winapi::minwinbase::SYSTEMTIME,
found a different struct winapi::minwinbase::SYSTEMTIME) [E0308]
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:422 system_time_to_tm(&local, tm);
^~~~~~
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:422:31: 422:37 help: run rustc --explain E0308 to see a detailed explanation
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:434:40: 434:49 error: mismatched types:
expected *const winapi::minwinbase::SYSTEMTIME,
found &winapi::minwinbase::SYSTEMTIME
(expected struct winapi::minwinbase::SYSTEMTIME,
found a different struct winapi::minwinbase::SYSTEMTIME) [E0308]
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:434 call!(SystemTimeToFileTime(&sys_time, &mut ft));
^~~~~~~~~
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:395:5: 402:6 note: in expansion of call!
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:434:13: 434:61 note: expansion site
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:434:40: 434:49 help: run rustc --explain E0308 to see a detailed explanation
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:435:39: 435:42 error: mismatched types:
expected &winapi::minwindef::FILETIME,
found &winapi::minwindef::FILETIME
(expected struct winapi::minwindef::FILETIME,
found a different struct winapi::minwindef::FILETIME) [E0308]
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:435 file_time_to_unix_seconds(&ft)
^~~
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:435:39: 435:42 help: run rustc --explain E0308 to see a detailed explanation
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:445:51: 445:64 error: mismatched types:
expected *const winapi::minwinbase::SYSTEMTIME,
found &mut winapi::minwinbase::SYSTEMTIME
(expected struct winapi::minwinbase::SYSTEMTIME,
found a different struct winapi::minwinbase::SYSTEMTIME) [E0308]
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:445 &mut sys_time, &mut utc));
^~~~~~~~~~~~~
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:395:5: 402:6 note: in expansion of call!
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:444:13: 445:77 note: expansion site
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:445:51: 445:64 help: run rustc --explain E0308 to see a detailed explanation
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:447:39: 447:42 error: mismatched types:
expected &winapi::minwindef::FILETIME,
found &winapi::minwindef::FILETIME
(expected struct winapi::minwindef::FILETIME,
found a different struct winapi::minwindef::FILETIME) [E0308]
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:447 file_time_to_unix_seconds(&ft)
^~~
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:447:39: 447:42 help: run rustc --explain E0308 to see a detailed explanation
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:455:40: 455:43 error: mismatched types:
expected &winapi::minwindef::FILETIME,
found &winapi::minwindef::FILETIME
(expected struct winapi::minwindef::FILETIME,
found a different struct winapi::minwindef::FILETIME) [E0308]
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:455 (file_time_to_unix_seconds(&ft), file_time_to_nsec(&ft))
^~~
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:455:40: 455:43 help: run rustc --explain E0308 to see a detailed explanation
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:455:64: 455:67 error: mismatched types:
expected &winapi::minwindef::FILETIME,
found &winapi::minwindef::FILETIME
(expected struct winapi::minwindef::FILETIME,
found a different struct winapi::minwindef::FILETIME) [E0308]
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:455 (file_time_to_unix_seconds(&ft), file_time_to_nsec(&ft))
^~~
C:\msys64\home\emabee.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.30\src\sys.rs:455:64: 455:67 help: run rustc --explain E0308 to see a detailed explanation
error: aborting due to 10 previous errors
Could not compile time.

To learn more, run the command again with --verbose.

emabee@devmachine MINGW64 /c/dev/rust/projects/flexi_logger
$ rustc --version
rustc 1.1.0 (35ceea399 2015-06-19)

emabee@devmachine MINGW64 /c/dev/rust/projects/flexi_logger
$ cargo --version
cargo 0.2.0-nightly (a483581 2015-05-14) (built 2015-05-16)

emabee@devmachine MINGW64 /c/dev/rust/projects/flexi_logger
$ which cargo
/c/Program Files/Rust stable 1.1/bin/cargo


#2

You have multiple conflicting versions of winapi. Please update to time:0.1.31 which fixes this issue.