auto merge of #14882 : pcwalton/rust/drop-underscore, r=nikomatsakis

This code didn't do anything, but was a vestige of the old semantics for
`let _ = ...`.

Closes #10488. (As near as I can tell anyhow.)

r? @nikomatsakis
This commit is contained in:
bors 2014-06-16 15:06:48 +00:00
commit 0b32d42a5d

View file

@ -972,23 +972,9 @@ pub fn ignore_lhs(_bcx: &Block, local: &ast::Local) -> bool {
pub fn init_local<'a>(bcx: &'a Block<'a>, local: &ast::Local)
-> &'a Block<'a> {
debug!("init_local(bcx={}, local.id={:?})",
bcx.to_str(), local.id);
debug!("init_local(bcx={}, local.id={:?})", bcx.to_str(), local.id);
let _indenter = indenter();
let _icx = push_ctxt("init_local");
if ignore_lhs(bcx, local) {
// Handle let _ = e; just like e;
match local.init {
Some(ref init) => {
return controlflow::trans_stmt_semi(bcx, &**init)
}
None => { return bcx; }
}
}
_match::store_local(bcx, local)
}