librustc: Remove useless code to handle let _ = ...

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.)
This commit is contained in:
Patrick Walton 2014-06-13 17:57:36 -07:00
parent 3851d68a27
commit 1a852a6df7

View File

@ -969,23 +969,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)
}