Skip to content

track which value is "expected"/"actual" in infer #2806

New issue

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

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

Already on GitHub? # to your account

Closed
nikomatsakis opened this issue Jul 5, 2012 · 0 comments
Closed

track which value is "expected"/"actual" in infer #2806

nikomatsakis opened this issue Jul 5, 2012 · 0 comments
Assignees
Labels
A-type-system Area: Type system

Comments

@nikomatsakis
Copy link
Contributor

Right now, infer does not track which value (the sub vs super type) is the "expected" one---that is, it does not track which value came from the user and which did not. This basically requires an extra boolean to be passed around. This leads to confusing error messages such as #2721.

@ghost ghost assigned nikomatsakis Jul 5, 2012
saethlin pushed a commit to saethlin/rust that referenced this issue Mar 16, 2023
Install binaries to the miri toolchain's sysroot

The default install produces this behavior:
```
$ cargo +miri miri --version
miri 0.1.0 (0ba1f4a0 2023-03-05)
$ cargo +nightly miri --version
miri 0.1.0 (0ba1f4a0 2023-03-05)
```
Which is not good. We've effectively erased the toolchain selection, and users may reasonably conclude that their rustup install is broken.

After this change, we now get this:
```
$ cargo +miri miri --version
miri 0.1.0 (0ba1f4a0 2023-03-05)
$ cargo +nightly miri --version
miri 0.1.0 (f63ccaf 2023-03-06)
```

Thanks `@jyn514` who all but wrote this for me.
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
Source changes required by the following upstream commits:

* rust-lang/rust@5a0a1ff0cd move ConstValue into mir
* rust-lang/rust@ea22adbabd adjust constValue::Slice to work for
arbitrary slice types
* rust-lang/rust@c94410c145 rename mir::Constant -> mir::ConstOperand,
mir::ConstKind -> mir::Const

Fixes: rust-lang#2784
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-type-system Area: Type system
Projects
None yet
Development

No branches or pull requests

1 participant