Skip to content

Don't emit memcpy's for zero-sized types #27944

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 1 commit into from
Aug 23, 2015
Merged

Conversation

dotdash
Copy link
Contributor

@dotdash dotdash commented Aug 22, 2015

r? @eddyb

@eddyb
Copy link
Member

eddyb commented Aug 22, 2015

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 22, 2015

📌 Commit 5914e8a has been approved by eddyb

@@ -956,6 +956,10 @@ pub fn memcpy_ty<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
t: Ty<'tcx>) {
let _icx = push_ctxt("memcpy_ty");
let ccx = bcx.ccx();
if type_is_zero_size(bcx.ccx(), t) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't ccx be cleaner than bcx.ccx() ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, copy-pasted that line, will fix.

@dotdash
Copy link
Contributor Author

dotdash commented Aug 22, 2015

@bors r=eddby e75abd3

@arielb1
Copy link
Contributor

arielb1 commented Aug 22, 2015

@bors r=eddyb e75abd3

@bors
Copy link
Collaborator

bors commented Aug 23, 2015

⌛ Testing commit e75abd3 with merge c97acc3...

bors added a commit that referenced this pull request Aug 23, 2015
@bors bors merged commit e75abd3 into rust-lang:master Aug 23, 2015
@dotdash dotdash deleted the zst_memcpy branch January 15, 2016 08:40
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