Skip to content

Incorrect type in 'mismatched types' error #516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
brson opened this issue Jun 17, 2011 · 0 comments
Closed

Incorrect type in 'mismatched types' error #516

brson opened this issue Jun 17, 2011 · 0 comments
Labels
A-type-system Area: Type system

Comments

@brson
Copy link
Contributor

brson commented Jun 17, 2011

fn main() {
  auto x = true;
  auto y = 1;
  auto z = x + y;
}

reports "error: mismatched types: expected bool but found bool (types differ)". Should be "bool but found int". Also, the reported span encompasses the entire binop when it should probably just cover the y variable.

brson added a commit that referenced this issue Jun 23, 2011
This is so that subsequent reports about type mismatches get the types
correct.

Issue #516
brson added a commit that referenced this issue Jun 23, 2011
This makes the error message correctly identify the term that wasn't the
expected type. Issue #516.
@brson brson closed this as completed Jun 23, 2011
keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this issue Dec 12, 2017
Correct solaris libc definitions:

* pthread_t is defined as uint_t, so must be c_uint, not uintptr_t, just
  as pthread_key_t is already defined
* fd_set is defined as long, so must be i32/i64 based on
  target_pointer_width; this also fixes an indirect endianness issue
  encountered on sparc
* FD_SETSIZE should be defined as 65536 when target_pointer_width = 64

Fixes rust-lang#515
keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this issue Dec 12, 2017
Auto merge of rust-lang#516 - binarycrusader:master, r=alexcrichton
pdietl pushed a commit to pdietl/rust that referenced this issue Apr 23, 2020
ZuseZ4 pushed a commit to EnzymeAD/rust that referenced this issue Mar 7, 2023
* Add primitive loop rematerialization

* Rematerialize loops

* Add and fix test
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-type-system Area: Type system
Projects
None yet
Development

No branches or pull requests

1 participant