Open
Description
extern crate libc;
fn main() {
let a: libc::ssize_t = 0;
let () = a;
}
$ rustc show-typedef.rs
show-typedef.rs:4:17: 4:19 error: mismatched types: expected `i64`, found `()` (expected i64, found ())
show-typedef.rs:4 let () = a;
^~
error: aborting due to previous error
It would be great if rustc
could show libc::ssize_t
as well as i64
in the error message. Compare it with GCC 4.9
$ g++49 show-typedef.cpp
show-typedef.cpp: In function 'int main()':
show-typedef.cpp:3:28: error: invalid operands of types 'void' and 'const size_type {aka const long unsigned int}' to binary 'operator+'
(void)0 + std::string::npos;
^
#include <string>
int main() {
(void)0 + std::string::npos;
}
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsCategory: An issue proposing an enhancement or a PR with one.Call for participation: Hard difficulty. Experience needed to fix: A lot.Relevant to the compiler team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.