Skip to content
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

reword Miri validity errors: undefined -> uninitialized #71164

Merged
merged 3 commits into from
Apr 17, 2020

Conversation

RalfJung
Copy link
Member

I don't think we say "undefined value" or anything like that anywhere in the docs or so, but we do use the term "uninitialized memory", so I think we should do the same here.

Longer-term, I think we should also internally rename "undef" to "uninit".

r? @oli-obk

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 15, 2020
@oli-obk
Copy link
Contributor

oli-obk commented Apr 16, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Apr 16, 2020

📌 Commit 9ee4d1a has been approved by oli-obk

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 16, 2020
@RalfJung
Copy link
Member Author

@oli-obk I am confused by the r+, I didn't change "value" back to "byte" yet.

@oli-obk
Copy link
Contributor

oli-obk commented Apr 16, 2020

I have no strong preference, was just explaining my reasoning of how I think the naming came to be. I thought you still liked the value naming.

@RalfJung
Copy link
Member Author

No you mostly convinced me to switch back to bytes. We also speak about "plain (non-pointer) bytes" elsewhere.
@bors r-

I also added a test specifically for the int-array fast path.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 16, 2020
... |
LL | | ]
LL | | };
| |__^ type validation failed: encountered uninitialized bytes at [0]
Copy link
Contributor

@oli-obk oli-obk Apr 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should dump the memory of constants at some point and have diagnostics point into them (but in general it's useless for validation to point to the entire constant's span, just pointing to the name should suffice)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it's not great -- but also pre-existing.

@oli-obk
Copy link
Contributor

oli-obk commented Apr 16, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Apr 16, 2020

📌 Commit 69423bf has been approved by oli-obk

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 16, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 17, 2020
Rollup of 7 pull requests

Successful merges:

 - rust-lang#70578 (Add long error explanation for E0657)
 - rust-lang#70910 (Hides default fns inside Fuse impl to avoid exposing it to any crate)
 - rust-lang#71164 (reword Miri validity errors: undefined -> uninitialized)
 - rust-lang#71182 (Add some regression tests)
 - rust-lang#71206 (Miri error messages: avoid try terminology)
 - rust-lang#71220 (Dogfood or_patterns in the standard library)
 - rust-lang#71225 (Fix typo in Default trait docs: Provides -> Provide)

Failed merges:

r? @ghost
@bors bors merged commit 5280d15 into rust-lang:master Apr 17, 2020
@RalfJung RalfJung deleted the uninit-not-undef branch April 17, 2020 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants