-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Conversation
@bors r+ |
📌 Commit 9ee4d1a has been approved by |
@oli-obk I am confused by the r+, I didn't change "value" back to "byte" yet. |
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 |
No you mostly convinced me to switch back to bytes. We also speak about "plain (non-pointer) bytes" elsewhere. I also added a test specifically for the int-array fast path. |
... | | ||
LL | | ] | ||
LL | | }; | ||
| |__^ type validation failed: encountered uninitialized bytes at [0] |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
@bors r+ |
📌 Commit 69423bf has been approved by |
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
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