-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
Using libc v0.2.7 and rustc 1.8.0-nightly (34af2de 2016-02-05)
extern crate libc;
fn test() {
let x = 1 as *mut libc::c_void;
let y = 1 as *mut std::os::raw::c_void;
let z = if true { x } else { y };
}
src/lib.rs:26:13: 26:37 error: if and else have incompatible types:
expected `*mut libc::c_void`,
found `*mut std::os::raw::c_void`
(expected enum `libc::c_void`,
found enum `std::os::raw::c_void`) [E0308]
src/lib.rs:26 let z = if true { x } else { y };
These must be compatible, otherwise we cause incompatibilities in the ecosystem.
ebkalderon, saturday06 and gnzlbg
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.