Skip to content

Commit 0b32d42

Browse files
committed
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
2 parents 8a5c5b6 + 1a852a6 commit 0b32d42

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

Diff for: src/librustc/middle/trans/base.rs

+1-15
Original file line numberDiff line numberDiff line change
@@ -972,23 +972,9 @@ pub fn ignore_lhs(_bcx: &Block, local: &ast::Local) -> bool {
972972

973973
pub fn init_local<'a>(bcx: &'a Block<'a>, local: &ast::Local)
974974
-> &'a Block<'a> {
975-
976-
debug!("init_local(bcx={}, local.id={:?})",
977-
bcx.to_str(), local.id);
975+
debug!("init_local(bcx={}, local.id={:?})", bcx.to_str(), local.id);
978976
let _indenter = indenter();
979-
980977
let _icx = push_ctxt("init_local");
981-
982-
if ignore_lhs(bcx, local) {
983-
// Handle let _ = e; just like e;
984-
match local.init {
985-
Some(ref init) => {
986-
return controlflow::trans_stmt_semi(bcx, &**init)
987-
}
988-
None => { return bcx; }
989-
}
990-
}
991-
992978
_match::store_local(bcx, local)
993979
}
994980

0 commit comments

Comments
 (0)