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

move rvalue checking to MIR #41232

Merged
merged 3 commits into from
Apr 12, 2017
Merged

move rvalue checking to MIR #41232

merged 3 commits into from
Apr 12, 2017

Conversation

arielb1
Copy link
Contributor

@arielb1 arielb1 commented Apr 11, 2017

No description provided.

@arielb1
Copy link
Contributor Author

arielb1 commented Apr 11, 2017

r? @eddyb

@rust-highfive rust-highfive assigned eddyb and unassigned nikomatsakis Apr 11, 2017
@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@arielb1 arielb1 changed the title Move rvalue checking to MIR move rvalue checking to MIR Apr 11, 2017
Copy link
Member

@eddyb eddyb left a comment

Choose a reason for hiding this comment

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

r=me, with some clarifications.

let span = local_decl.source_info.span;
let ty = local_decl.ty;
if !ty.is_sized(self.tcx().global_tcx(), self.infcx.param_env(), span) {
if let None = self.reported_errors.replace((ty, span)) {
Copy link
Member

Choose a reason for hiding this comment

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

replace confuses me - insert wouldn't work?


for (local, local_decl) in mir.local_decls.iter_enumerated() {
self.check_local(mir, local, local_decl);
}
Copy link
Member

Choose a reason for hiding this comment

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

Wait, can't there be assignments between, say, two dereferences? Is there any guarantee there would be a Local? If so, a comment would be helpful.

@arielb1
Copy link
Contributor Author

arielb1 commented Apr 11, 2017

@bors r=eddyb

@bors
Copy link
Contributor

bors commented Apr 11, 2017

📌 Commit 540a069 has been approved by eddyb

TimNN added a commit to TimNN/rust that referenced this pull request Apr 12, 2017
bors added a commit that referenced this pull request Apr 12, 2017
Rollup of 9 pull requests

- Successful merges: #41063, #41087, #41141, #41166, #41183, #41205, #41206, #41232, #41243
- Failed merges:
@bors bors merged commit 540a069 into rust-lang:master Apr 12, 2017
@nikomatsakis
Copy link
Contributor

@arielb1 nice to see things moving to MIR :)

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.

5 participants