-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.E-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.Call for participation: Hard difficulty. Experience needed to fix: A lot.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
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;
}
nsmaciej, kornelski, estebank, ryoqun, jiftoo and 1 more
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.E-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.Call for participation: Hard difficulty. Experience needed to fix: A lot.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.