Skip to content

move rvalue checking to MIR - #41232

Merged
bors merged 3 commits into
rust-lang:masterfrom
arielb1:mir-rvalues
Apr 12, 2017
Merged

move rvalue checking to MIR#41232
bors merged 3 commits into
rust-lang:masterfrom
arielb1:mir-rvalues

Conversation

@arielb1

Copy link
Copy Markdown
Contributor

No description provided.

@arielb1

Copy link
Copy Markdown
ContributorAuthor

r? @eddyb

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @nikomatsakis

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

@arielb1arielb1 changed the title Move rvalue checking to MIRmove rvalue checking to MIRApr 11, 2017

@eddybeddyb left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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
Copy Markdown
ContributorAuthor

@bors r=eddyb

@bors

bors commented Apr 11, 2017

Copy link
Copy Markdown
Collaborator

📌 Commit 540a069 has been approved by eddyb

TimNN added a commit to TimNN/rust that referenced this pull request Apr 12, 2017
@TimNNTimNN mentioned 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:masterApr 12, 2017
@nikomatsakis

Copy link
Copy Markdown
Contributor

@arielb1 nice to see things moving to MIR :)

Sign up for freeto 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

@arielb1@rust-highfive@bors@nikomatsakis@eddyb