Skip to content

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

Merged
merged 2 commits into from
Aug 13, 2015
Merged

Conversation

nathankleyn
Copy link
Contributor

This adds detailed diagnostics for E0383, 'partial reinitialization of
uninitialized structure'.

This is part of #24407.

r? @Manishearth

@rust-highfive
Copy link
Contributor

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.


```
let mut t = Test { a: 1, b: None};
let mut u = Test { a: 2, b: Some(Box::new(t))}; // `t` is now uninitialized
Copy link
Member

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.

@Manishearth
Copy link
Member

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.
@nathankleyn
Copy link
Contributor Author

@Manishearth Done and ready for re-review!

r? @Manishearth

@Manishearth
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 13, 2015

📌 Commit 67c7fd7 has been approved by Manishearth

@Manishearth
Copy link
Member

Thanks!

@bors
Copy link
Collaborator

bors commented Aug 13, 2015

⌛ Testing commit 67c7fd7 with merge 33f3665...

Manishearth added a commit to Manishearth/rust that referenced this pull request Aug 13, 2015
…shearth

This adds detailed diagnostics for `E0383`, 'partial reinitialization of
uninitialized structure'.

This is part of rust-lang#24407.

r? @Manishearth
@bors
Copy link
Collaborator

bors commented Aug 13, 2015

⛄ The build was interrupted to prioritize another pull request.

bors added a commit that referenced this pull request Aug 13, 2015
@bors bors merged commit 67c7fd7 into rust-lang:master Aug 13, 2015
@nathankleyn nathankleyn deleted the diagnostics-383 branch August 13, 2015 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants