-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Add detailed diagnostics for E0383. #27699
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
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Manishearth (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
f8a6fe4
to
0e1fce9
Compare
|
||
``` | ||
let mut t = Test { a: 1, b: None}; | ||
let mut u = Test { a: 2, b: Some(Box::new(t))}; // `t` is now uninitialized |
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.
Can we just drop(t)
or move t
elsewhere here (e.g. let u = Box::new(t)
)? The recursive type adds to the confusion.
Thanks for the PR! This looks good, just some minor changes to the code example would be needed. |
This adds detailed diagnostics for E0383, 'partial reinitialization of uninitialized structure'. This is part of rust-lang#24407.
0e1fce9
to
67c7fd7
Compare
@Manishearth Done and ready for re-review! r? @Manishearth |
@bors r+ rollup |
📌 Commit 67c7fd7 has been approved by |
Thanks! |
⌛ Testing commit 67c7fd7 with merge 33f3665... |
…shearth This adds detailed diagnostics for `E0383`, 'partial reinitialization of uninitialized structure'. This is part of rust-lang#24407. r? @Manishearth
⛄ The build was interrupted to prioritize another pull request. |
This adds detailed diagnostics for
E0383
, 'partial reinitialization ofuninitialized structure'.
This is part of #24407.
r? @Manishearth