pname,
prog.status))
.note(&format!("{:?}", &cmd))
- .note(&*escape_string(&output[..]))
+ .note(&escape_string(&output[..]))
.emit();
sess.abort_if_errors();
}
match llvm::diagnostic::Diagnostic::unpack(info) {
llvm::diagnostic::InlineAsm(inline) => {
report_inline_asm(cgcx,
- &*llvm::twine_to_string(inline.message),
+ &llvm::twine_to_string(inline.message),
inline.cookie);
}
&name.as_str(),
&qualname,
&self.span.snippet(expr.span),
- &ty_to_string(&*typ),
+ &ty_to_string(&typ),
self.cur_scope);
// walk type and init value
for field in variant.node.data.fields() {
self.process_struct_field_def(field, variant.node.data.id());
- self.visit_ty(&*field.node.ty);
+ self.visit_ty(&field.node.ty);
}
}
self.process_generic_params(ty_params, item.span, &enum_data.qualname, enum_data.id);
self.cur_scope);
}
Fn(ref decl, _, _, _, ref ty_params, ref body) =>
- self.process_fn(item, &**decl, ty_params, &**body),
+ self.process_fn(item, &decl, ty_params, &body),
Static(ref typ, _, ref expr) =>
self.process_static_or_const_item(item, typ, expr),
Const(ref typ, ref expr) =>
}
Ty(ref ty, ref ty_params) => {
let qualname = format!("::{}", self.tcx.map.path_to_string(item.id));
- let value = ty_to_string(&**ty);
+ let value = ty_to_string(&ty);
let sub_span = self.span.sub_span_after_keyword(item.span, keywords::Type);
self.fmt.typedef_str(item.span, sub_span, item.id, &qualname, &value);
- self.visit_ty(&**ty);
+ self.visit_ty(&ty);
self.process_generic_params(ty_params, item.span, &qualname, item.id);
}
Mac(_) => (),
}
}
if let Some(ref ty) = param.default {
- self.visit_ty(&**ty);
+ self.visit_ty(&ty);
}
}
}
self.process_const(trait_item.id,
trait_item.ident.name,
trait_item.span,
- &*ty,
- &*expr);
+ &ty,
+ &expr);
}
ast::TraitItemKind::Method(ref sig, ref body) => {
self.process_method(sig,
}
}
ast::ExprKind::TupField(ref sub_ex, idx) => {
- self.visit_expr(&**sub_ex);
+ self.visit_expr(&sub_ex);
let hir_node = lower_expr(self.save_ctxt.lcx, sub_ex);
let ty = &self.tcx.expr_ty_adjusted(&hir_node).sty;
// walk arg and return types
for arg in &decl.inputs {
- self.visit_ty(&*arg.ty);
+ self.visit_ty(&arg.ty);
}
if let ast::FunctionRetTy::Ty(ref ret_ty) = decl.output {
- self.visit_ty(&**ret_ty);
+ self.visit_ty(&ret_ty);
}
// walk the body
- self.nest(ex.id, |v| v.visit_block(&**body));
+ self.nest(ex.id, |v| v.visit_block(&body));
}
ast::ExprKind::ForLoop(ref pattern, ref subexpression, ref block, _) |
ast::ExprKind::WhileLet(ref pattern, ref subexpression, ref block, _) => {
match item.node {
hir::ItemImpl(_, _, _, _, ref ty, _) => {
let mut result = String::from("<");
- result.push_str(&rustc_front::print::pprust::ty_to_string(&**ty));
+ result.push_str(&rustc_front::print::pprust::ty_to_string(&ty));
match self.tcx.trait_of_item(self.tcx.map.local_def_id(id)) {
Some(def_id) => {
match *self {
ConstantValue(ConstantExpr(lit_expr), _) => {
let lit_ty = bcx.tcx().node_id_to_type(lit_expr.id);
- let expr = consts::const_expr(ccx, &*lit_expr, bcx.fcx.param_substs, None, Yes);
+ let expr = consts::const_expr(ccx, &lit_expr, bcx.fcx.param_substs, None, Yes);
let llval = match expr {
Ok((llval, _)) => llval,
Err(err) => bcx.ccx().sess().span_fatal(lit_expr.span, &err.description()),
SingleResult(Result::new(bcx, lit_datum.val))
}
ConstantRange(ConstantExpr(ref l1), ConstantExpr(ref l2), _) => {
- let l1 = match consts::const_expr(ccx, &**l1, bcx.fcx.param_substs, None, Yes) {
+ let l1 = match consts::const_expr(ccx, &l1, bcx.fcx.param_substs, None, Yes) {
Ok((l1, _)) => l1,
Err(err) => bcx.ccx().sess().span_fatal(l1.span, &err.description()),
};
- let l2 = match consts::const_expr(ccx, &**l2, bcx.fcx.param_substs, None, Yes) {
+ let l2 = match consts::const_expr(ccx, &l2, bcx.fcx.param_substs, None, Yes) {
Ok((l2, _)) => l2,
Err(err) => bcx.ccx().sess().span_fatal(l2.span, &err.description()),
};
RangeResult(Result::new(bcx, l1), Result::new(bcx, l2))
}
Variant(disr_val, ref repr, _, _) => {
- SingleResult(Result::new(bcx, adt::trans_case(bcx, &**repr, disr_val)))
+ SingleResult(Result::new(bcx, adt::trans_case(bcx, &repr, disr_val)))
}
SliceLengthEqual(length, _) => {
SingleResult(Result::new(bcx, C_uint(ccx, length)))
pat = match pat.node {
hir::PatIdent(_, ref path, Some(ref inner)) => {
bound_ptrs.push((path.node.name, val.val));
- &**inner
+ &inner
},
_ => break
}
pats[col] = pat;
Match {
pats: pats,
- data: &*br.data,
+ data: &br.data,
bound_ptrs: bound_ptrs,
pat_renaming_map: br.pat_renaming_map,
}
let mut bound_ptrs = br.bound_ptrs.clone();
match this.node {
hir::PatIdent(_, ref path, None) => {
- if pat_is_binding(&dm.borrow(), &*this) {
+ if pat_is_binding(&dm.borrow(), &this) {
bound_ptrs.push((path.node.name, val.val));
}
}
// Collect all of the matches that can match against anything.
enter_match(bcx, dm, m, col, val, |pats| {
- if pat_is_binding_or_wild(&dm.borrow(), &*pats[col]) {
+ if pat_is_binding_or_wild(&dm.borrow(), &pats[col]) {
let mut r = pats[..col].to_vec();
r.extend_from_slice(&pats[col + 1..]);
Some(r)
let ctor = match opt {
&ConstantValue(ConstantExpr(expr), _) => check_match::ConstantValue(
- const_eval::eval_const_expr(bcx.tcx(), &*expr)
+ const_eval::eval_const_expr(bcx.tcx(), &expr)
),
&ConstantRange(ConstantExpr(lo), ConstantExpr(hi), _) => check_match::ConstantRange(
- const_eval::eval_const_expr(bcx.tcx(), &*lo),
- const_eval::eval_const_expr(bcx.tcx(), &*hi)
+ const_eval::eval_const_expr(bcx.tcx(), &lo),
+ const_eval::eval_const_expr(bcx.tcx(), &hi)
),
&SliceLengthEqual(n, _) =>
check_match::Slice(n),
let opt = match cur.node {
hir::PatLit(ref l) => {
- ConstantValue(ConstantExpr(&**l), debug_loc)
+ ConstantValue(ConstantExpr(&l), debug_loc)
}
hir::PatIdent(..) | hir::PatEnum(..) | hir::PatStruct(..) => {
// This is either an enum variant or a variable binding.
}
}
hir::PatRange(ref l1, ref l2) => {
- ConstantRange(ConstantExpr(&**l1), ConstantExpr(&**l2), debug_loc)
+ ConstantRange(ConstantExpr(&l1), ConstantExpr(&l2), debug_loc)
}
hir::PatVec(ref before, None, ref after) => {
SliceLengthEqual(before.len() + after.len(), debug_loc)
fn pick_column_to_specialize(def_map: &RefCell<DefMap>, m: &[Match]) -> Option<usize> {
fn pat_score(def_map: &RefCell<DefMap>, pat: &hir::Pat) -> usize {
match pat.node {
- hir::PatIdent(_, _, Some(ref inner)) => pat_score(def_map, &**inner),
+ hir::PatIdent(_, _, Some(ref inner)) => pat_score(def_map, &inner),
_ if pat_is_refutable(&def_map.borrow(), pat) => 1,
_ => 0
}
match data.arm.guard {
Some(ref guard_expr) => {
bcx = compile_guard(bcx,
- &**guard_expr,
+ &guard_expr,
m[0].data,
&m[1..m.len()],
vals,
};
let adt_vals = if any_irrefutable_adt_pat(bcx.tcx(), m, col) {
let repr = adt::represent_type(bcx.ccx(), left_ty);
- let arg_count = adt::num_args(&*repr, Disr(0));
+ let arg_count = adt::num_args(&repr, Disr(0));
let (arg_count, struct_val) = if type_is_sized(bcx.tcx(), left_ty) {
(arg_count, val.val)
} else {
};
let mut field_vals: Vec<ValueRef> = (0..arg_count).map(|ix|
// By definition, these are all sized
- adt::trans_field_ptr(bcx, &*repr, adt::MaybeSizedValue::sized(struct_val), Disr(0), ix)
+ adt::trans_field_ptr(bcx, &repr, adt::MaybeSizedValue::sized(struct_val), Disr(0), ix)
).collect();
match left_ty.sty {
let meta = Load(bcx, expr::get_meta(bcx, val.val));
let struct_val = adt::MaybeSizedValue::unsized_(struct_val, meta);
- let data = adt::trans_field_ptr(bcx, &*repr, struct_val, Disr(0), arg_count);
+ let data = adt::trans_field_ptr(bcx, &repr, struct_val, Disr(0), arg_count);
Store(bcx, data, expr::get_dataptr(bcx, scratch));
Store(bcx, meta, expr::get_meta(bcx, scratch));
field_vals.push(scratch);
match *opt {
Variant(disr_val, ref repr, _, _) => {
let ExtractedBlock {vals: argvals, bcx: new_bcx} =
- extract_variant_args(opt_cx, &**repr, disr_val, val);
+ extract_variant_args(opt_cx, &repr, disr_val, val);
size = argvals.len();
unpacked = argvals;
opt_cx = new_bcx;
let tcx = bcx.tcx();
let reassigned = is_discr_reassigned(bcx, discr, body);
let mut bindings_map = FnvHashMap();
- pat_bindings(&tcx.def_map, &*pat, |bm, p_id, span, path1| {
+ pat_bindings(&tcx.def_map, &pat, |bm, p_id, span, path1| {
let name = path1.node;
let variable_ty = node_id_type(bcx, p_id);
let llvariable_ty = type_of::type_of(ccx, variable_ty);
let arm_datas: Vec<ArmData> = arms.iter().map(|arm| ArmData {
bodycx: fcx.new_id_block("case_body", arm.body.id),
arm: arm,
- bindings_map: create_bindings_map(bcx, &*arm.pats[0], discr_expr, &*arm.body)
+ bindings_map: create_bindings_map(bcx, &arm.pats[0], discr_expr, &arm.body)
}).collect();
let mut pat_renaming_map = if scope_cx.sess().opts.debuginfo != NoDebugInfo {
let mut matches = Vec::new();
for (arm_data, pats) in arm_datas.iter().zip(&arm_pats) {
matches.extend(pats.iter().map(|p| Match {
- pats: vec![&**p],
+ pats: vec![&p],
data: arm_data,
bound_ptrs: Vec::new(),
pat_renaming_map: pat_renaming_map.as_ref()
// insert bindings into the lllocals map and add cleanups
let cs = fcx.push_custom_cleanup_scope();
bcx = insert_lllocals(bcx, &arm_data.bindings_map, Some(cleanup::CustomScope(cs)));
- bcx = expr::trans_into(bcx, &*arm_data.arm.body, dest);
+ bcx = expr::trans_into(bcx, &arm_data.arm.body, dest);
bcx = fcx.pop_and_trans_custom_cleanup_scope(bcx, cs);
arm_cxs.push(bcx);
}
let _icx = push_ctxt("match::store_local");
let mut bcx = bcx;
let tcx = bcx.tcx();
- let pat = &*local.pat;
+ let pat = &local.pat;
fn create_dummy_locals<'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>,
pat: &hir::Pat)
return mk_binding_alloca(
bcx, pat.id, name, var_scope, (),
"_match::store_local",
- |(), bcx, Datum { val: v, .. }| expr::trans_into(bcx, &**init_expr,
+ |(), bcx, Datum { val: v, .. }| expr::trans_into(bcx, &init_expr,
expr::SaveIn(v)));
}
// General path.
let init_datum =
- unpack_datum!(bcx, expr::trans_to_lvalue(bcx, &**init_expr, "let"));
+ unpack_datum!(bcx, expr::trans_to_lvalue(bcx, &init_expr, "let"));
if bcx.sess().asm_comments() {
add_comment(bcx, "creating zeroable ref llval");
}
let ccx = bcx.ccx();
match pat.node {
hir::PatIdent(pat_binding_mode, ref path1, ref inner) => {
- if pat_is_binding(&tcx.def_map.borrow(), &*pat) {
+ if pat_is_binding(&tcx.def_map.borrow(), &pat) {
// Allocate the stack slot where the value of this
// binding will live and place it into the appropriate
// map.
}
if let Some(ref inner_pat) = *inner {
- bcx = bind_irrefutable_pat(bcx, &**inner_pat, val, cleanup_scope);
+ bcx = bind_irrefutable_pat(bcx, &inner_pat, val, cleanup_scope);
}
}
hir::PatEnum(_, ref sub_pats) => {
let repr = adt::represent_node(bcx, pat.id);
let vinfo = ccx.tcx().lookup_adt_def(enum_id).variant_with_id(var_id);
let args = extract_variant_args(bcx,
- &*repr,
+ &repr,
Disr::from(vinfo.disr_val),
val);
if let Some(ref sub_pat) = *sub_pats {
for (i, &argval) in args.vals.iter().enumerate() {
bcx = bind_irrefutable_pat(
bcx,
- &*sub_pat[i],
+ &sub_pat[i],
MatchInput::from_val(argval),
cleanup_scope);
}
let repr = adt::represent_node(bcx, pat.id);
let val = adt::MaybeSizedValue::sized(val.val);
for (i, elem) in elems.iter().enumerate() {
- let fldptr = adt::trans_field_ptr(bcx, &*repr,
+ let fldptr = adt::trans_field_ptr(bcx, &repr,
val, Disr(0), i);
bcx = bind_irrefutable_pat(
bcx,
- &**elem,
+ &elem,
MatchInput::from_val(fldptr),
cleanup_scope);
}
let field_idx = pat_v.field_index(name);
let mut fldptr = adt::trans_field_ptr(
bcx,
- &*pat_repr,
+ &pat_repr,
val,
pat_v.discr,
field_idx);
fldptr = scratch;
}
bcx = bind_irrefutable_pat(bcx,
- &*f.node.pat,
+ &f.node.pat,
MatchInput::from_val(fldptr),
cleanup_scope);
}
let repr = adt::represent_node(bcx, pat.id);
let val = adt::MaybeSizedValue::sized(val.val);
for (i, elem) in elems.iter().enumerate() {
- let fldptr = adt::trans_field_ptr(bcx, &*repr, val, Disr(0), i);
+ let fldptr = adt::trans_field_ptr(bcx, &repr, val, Disr(0), i);
bcx = bind_irrefutable_pat(
bcx,
- &**elem,
+ &elem,
MatchInput::from_val(fldptr),
cleanup_scope);
}
val.val
};
bcx = bind_irrefutable_pat(
- bcx, &**inner, MatchInput::from_val(val), cleanup_scope);
+ bcx, &inner, MatchInput::from_val(val), cleanup_scope);
}
hir::PatRegion(ref inner, _) => {
let pat_ty = node_id_type(bcx, inner.id);
};
bcx = bind_irrefutable_pat(
bcx,
- &**inner,
+ &inner,
MatchInput::from_val(val),
cleanup_scope);
}
.fold(bcx, |bcx, (inner, elem)| {
bind_irrefutable_pat(
bcx,
- &**inner,
+ &inner,
MatchInput::from_val(elem),
cleanup_scope)
});
for (i, out) in ia.outputs.iter().enumerate() {
constraints.push(out.constraint.clone());
- let out_datum = unpack_datum!(bcx, expr::trans(bcx, &*out.expr));
+ let out_datum = unpack_datum!(bcx, expr::trans(bcx, &out.expr));
if out.is_indirect {
bcx = callee::trans_arg_datum(bcx,
- expr_ty(bcx, &*out.expr),
+ expr_ty(bcx, &out.expr),
out_datum,
cleanup::CustomScope(temp_scope),
callee::DontAutorefArg,
outputs.push(out_datum.val);
if out.is_rw {
bcx = callee::trans_arg_datum(bcx,
- expr_ty(bcx, &*out.expr),
+ expr_ty(bcx, &out.expr),
out_datum,
cleanup::CustomScope(temp_scope),
callee::DontAutorefArg,
for &(ref c, ref input) in &ia.inputs {
constraints.push((*c).clone());
- let in_datum = unpack_datum!(bcx, expr::trans(bcx, &**input));
+ let in_datum = unpack_datum!(bcx, expr::trans(bcx, &input));
bcx = callee::trans_arg_datum(bcx,
- expr_ty(bcx, &**input),
+ expr_ty(bcx, &input),
in_datum,
cleanup::CustomScope(temp_scope),
callee::DontAutorefArg,
return bcx;
}
-
let repr = adt::represent_type(cx.ccx(), t);
let VariantInfo { fields, discr } = VariantInfo::from_ty(cx.tcx(), t, None);
for (i, &Field(_, field_ty)) in fields.iter().enumerate() {
- let llfld_a = adt::trans_field_ptr(cx, &*repr, value, Disr::from(discr), i);
+ let llfld_a = adt::trans_field_ptr(cx, &repr, value, Disr::from(discr), i);
let val = if common::type_is_sized(cx.tcx(), field_ty) {
llfld_a
ty::TyClosure(_, ref substs) => {
let repr = adt::represent_type(cx.ccx(), t);
for (i, upvar_ty) in substs.upvar_tys.iter().enumerate() {
- let llupvar = adt::trans_field_ptr(cx, &*repr, value, Disr(0), i);
+ let llupvar = adt::trans_field_ptr(cx, &repr, value, Disr(0), i);
cx = f(cx, llupvar, upvar_ty);
}
}
ty::TyTuple(ref args) => {
let repr = adt::represent_type(cx.ccx(), t);
for (i, arg) in args.iter().enumerate() {
- let llfld_a = adt::trans_field_ptr(cx, &*repr, value, Disr(0), i);
+ let llfld_a = adt::trans_field_ptr(cx, &repr, value, Disr(0), i);
cx = f(cx, llfld_a, *arg);
}
}
// NB: we must hit the discriminant first so that structural
// comparison know not to proceed when the discriminants differ.
- match adt::trans_switch(cx, &*repr, av, false) {
+ match adt::trans_switch(cx, &repr, av, false) {
(_match::Single, None) => {
if n_variants != 0 {
assert!(n_variants == 1);
- cx = iter_variant(cx, &*repr, adt::MaybeSizedValue::sized(av),
+ cx = iter_variant(cx, &repr, adt::MaybeSizedValue::sized(av),
&en.variants[0], substs, &mut f);
}
}
let variant_cx = fcx.new_temp_block(&format!("enum-iter-variant-{}",
&variant.disr_val
.to_string()));
- let case_val = adt::trans_case(cx, &*repr, Disr::from(variant.disr_val));
+ let case_val = adt::trans_case(cx, &repr, Disr::from(variant.disr_val));
AddCase(llswitch, case_val, variant_cx.llbb);
let variant_cx = iter_variant(variant_cx,
- &*repr,
+ &repr,
value,
variant,
substs,
Some(hir_map::NodeExpr(ex)) => {
if let hir::ExprRet(Some(ref ret_expr)) = ex.node {
let mut visitor = FindNestedReturn::new();
- intravisit::walk_expr(&mut visitor, &**ret_expr);
+ intravisit::walk_expr(&mut visitor, &ret_expr);
if visitor.found {
return true;
}
let repr = adt::represent_type(ccx, result_ty.unwrap());
let mut llarg_idx = fcx.arg_offset() as c_uint;
for (i, arg_ty) in arg_tys.into_iter().enumerate() {
- let lldestptr = adt::trans_field_ptr(bcx, &*repr, dest_val, Disr::from(disr), i);
+ let lldestptr = adt::trans_field_ptr(bcx, &repr, dest_val, Disr::from(disr), i);
if common::type_is_fat_ptr(bcx.tcx(), arg_ty) {
Store(bcx,
get_param(fcx.llfn, llarg_idx),
}
}
}
- adt::trans_set_discr(bcx, &*repr, dest, disr);
+ adt::trans_set_discr(bcx, &repr, dest, disr);
}
finish_fn(&fcx, bcx, result_ty, DebugLoc::None);
let sess = &ccx.tcx().sess;
sess.span_note_without_error(sp,
- &*format!("total size: {} bytes", llsize_of_real(ccx, llty)));
+ &format!("total size: {} bytes", llsize_of_real(ccx, llty)));
match *avar {
adt::General(..) => {
for (i, var) in enum_def.variants.iter().enumerate() {
ccx.tcx()
.sess
.span_note_without_error(var.span,
- &*format!("variant data: {} bytes", sizes[i]));
+ &format!("variant data: {} bytes", sizes[i]));
}
}
_ => {}
let empty_substs = ccx.tcx().mk_substs(Substs::trans_empty());
if abi != Abi::Rust {
foreign::trans_rust_fn_with_foreign_abi(ccx,
- &**decl,
- &**body,
+ &decl,
+ &body,
&item.attrs,
llfn,
empty_substs,
None);
} else {
trans_fn(ccx,
- &**decl,
- &**body,
+ &decl,
+ &body,
llfn,
empty_substs,
item.id,
hir::ForeignItemFn(..) => {
let abi = ccx.tcx().map.get_foreign_abi(id);
let ty = ccx.tcx().node_id_to_type(ni.id);
- let name = foreign::link_name(&*ni);
+ let name = foreign::link_name(&ni);
foreign::register_foreign_item_fn(ccx, abi, ty, &name, &ni.attrs)
}
hir::ForeignItemStatic(..) => {
- foreign::register_static(ccx, &*ni)
+ foreign::register_static(ccx, &ni)
}
}
}
let mut llargs = Vec::new();
let arg_tys = match args {
- ArgExprs(a) => a.iter().map(|x| common::expr_ty_adjusted(bcx, &**x)).collect(),
+ ArgExprs(a) => a.iter().map(|x| common::expr_ty_adjusted(bcx, &x)).collect(),
_ => panic!("expected arg exprs.")
};
bcx = trans_args(bcx,
// Translate the `self` argument first.
if !ignore_self {
- let arg_datum = unpack_datum!(bcx, expr::trans(bcx, &*arg_exprs[0]));
+ let arg_datum = unpack_datum!(bcx, expr::trans(bcx, &arg_exprs[0]));
bcx = trans_arg_datum(bcx,
args[0],
arg_datum,
match tuple_type.sty {
ty::TyTuple(ref field_types) => {
let tuple_datum = unpack_datum!(bcx,
- expr::trans(bcx, &**tuple_expr));
+ expr::trans(bcx, &tuple_expr));
let tuple_lvalue_datum =
unpack_datum!(bcx,
tuple_datum.to_lvalue_datum(bcx,
"args",
tuple_expr.id));
let repr = adt::represent_type(bcx.ccx(), tuple_type);
- let repr_ptr = &*repr;
+ let repr_ptr = &repr;
for (i, field_type) in field_types.iter().enumerate() {
let arg_datum = tuple_lvalue_datum.get_element(
bcx,
}
let arg_ty = if i >= num_formal_args {
assert!(variadic);
- common::expr_ty_adjusted(cx, &**arg_expr)
+ common::expr_ty_adjusted(cx, &arg_expr)
} else {
arg_tys[i]
};
- let arg_datum = unpack_datum!(bcx, expr::trans(bcx, &**arg_expr));
+ let arg_datum = unpack_datum!(bcx, expr::trans(bcx, &arg_expr));
bcx = trans_arg_datum(bcx, arg_ty, arg_datum,
arg_cleanup_scope,
DontAutorefArg,
for (i, freevar) in freevars.iter().enumerate() {
let datum = expr::trans_local_var(bcx, freevar.def);
let upvar_slot_dest = adt::trans_field_ptr(
- bcx, &*repr, adt::MaybeSizedValue::sized(dest_addr), Disr(0), i);
+ bcx, &repr, adt::MaybeSizedValue::sized(dest_addr), Disr(0), i);
let upvar_id = ty::UpvarId { var_id: freevar.def.var_id(),
closure_expr_id: id };
match tcx.upvar_capture(upvar_id).unwrap() {
}
}
}
- adt::trans_set_discr(bcx, &*repr, dest_addr, Disr(0));
+ adt::trans_set_discr(bcx, &repr, dest_addr, Disr(0));
Some(bcx)
}
fn get_ref<'a>(&'a self) -> &'a mir::Mir<'tcx> {
match *self {
CachedMir::Ref(r) => r,
- CachedMir::Owned(ref rc) => &**rc,
+ CachedMir::Owned(ref rc) => &rc,
}
}
}
let substs = ccx.tcx().mk_substs(node_id_substs(ccx, node, param_substs));
match fn_like.body().expr {
Some(ref expr) => {
- const_expr(ccx, &**expr, substs, Some(&fn_args), trueconst).map(|(res, _)| res)
+ const_expr(ccx, &expr, substs, Some(&fn_args), trueconst).map(|(res, _)| res)
},
None => Ok(C_nil(ccx)),
}
let map_list = |exprs: &[P<hir::Expr>]| -> Result<Vec<ValueRef>, ConstEvalFailure> {
exprs.iter()
- .map(|e| const_expr(cx, &**e, param_substs, fn_args, trueconst).map(|(l, _)| l))
+ .map(|e| const_expr(cx, &e, param_substs, fn_args, trueconst).map(|(l, _)| l))
.collect::<Vec<Result<ValueRef, ConstEvalFailure>>>()
.into_iter()
.collect()
};
let _icx = push_ctxt("const_expr");
Ok(match e.node {
- hir::ExprLit(ref lit) => const_lit(cx, e, &**lit),
+ hir::ExprLit(ref lit) => const_lit(cx, e, &lit),
hir::ExprBinary(b, ref e1, ref e2) => {
/* Neither type is bottom, and we expect them to be unified
* already, so the following is safe. */
- let (te1, ty) = try!(const_expr(cx, &**e1, param_substs, fn_args, trueconst));
+ let (te1, ty) = try!(const_expr(cx, &e1, param_substs, fn_args, trueconst));
debug!("const_expr_unadjusted: te1={}, ty={:?}",
cx.tn().val_to_string(te1),
ty);
let is_float = ty.is_fp();
let signed = ty.is_signed();
- let (te2, _) = try!(const_expr(cx, &**e2, param_substs, fn_args, trueconst));
+ let (te2, _) = try!(const_expr(cx, &e2, param_substs, fn_args, trueconst));
try!(check_binary_expr_validity(cx, e, ty, te1, te2, trueconst));
} } // unsafe { match b.node {
},
hir::ExprUnary(u, ref inner_e) => {
- let (te, ty) = try!(const_expr(cx, &**inner_e, param_substs, fn_args, trueconst));
+ let (te, ty) = try!(const_expr(cx, &inner_e, param_substs, fn_args, trueconst));
try!(check_unary_expr_validity(cx, e, ty, te, trueconst));
} }
},
hir::ExprField(ref base, field) => {
- let (bv, bt) = try!(const_expr(cx, &**base, param_substs, fn_args, trueconst));
+ let (bv, bt) = try!(const_expr(cx, &base, param_substs, fn_args, trueconst));
let brepr = adt::represent_type(cx, bt);
let vinfo = VariantInfo::from_ty(cx.tcx(), bt, None);
let ix = vinfo.field_index(field.node);
- adt::const_get_field(cx, &*brepr, bv, vinfo.discr, ix)
+ adt::const_get_field(cx, &brepr, bv, vinfo.discr, ix)
},
hir::ExprTupField(ref base, idx) => {
- let (bv, bt) = try!(const_expr(cx, &**base, param_substs, fn_args, trueconst));
+ let (bv, bt) = try!(const_expr(cx, &base, param_substs, fn_args, trueconst));
let brepr = adt::represent_type(cx, bt);
let vinfo = VariantInfo::from_ty(cx.tcx(), bt, None);
- adt::const_get_field(cx, &*brepr, bv, vinfo.discr, idx.node)
+ adt::const_get_field(cx, &brepr, bv, vinfo.discr, idx.node)
},
hir::ExprIndex(ref base, ref index) => {
- let (bv, bt) = try!(const_expr(cx, &**base, param_substs, fn_args, trueconst));
+ let (bv, bt) = try!(const_expr(cx, &base, param_substs, fn_args, trueconst));
let iv = match eval_const_expr_partial(cx.tcx(), &index, ExprTypeChecked, None) {
Ok(ConstVal::Int(i)) => i as u64,
Ok(ConstVal::Uint(u)) => u,
hir::ExprCast(ref base, _) => {
let t_cast = ety;
let llty = type_of::type_of(cx, t_cast);
- let (v, t_expr) = try!(const_expr(cx, &**base, param_substs, fn_args, trueconst));
+ let (v, t_expr) = try!(const_expr(cx, &base, param_substs, fn_args, trueconst));
debug!("trans_const_cast({:?} as {:?})", t_expr, t_cast);
if expr::cast_is_noop(cx.tcx(), base, t_expr, t_cast) {
return Ok(v);
) {
(CastTy::Int(IntTy::CEnum), CastTy::Int(_)) => {
let repr = adt::represent_type(cx, t_expr);
- let discr = adt::const_get_discrim(cx, &*repr, v);
+ let discr = adt::const_get_discrim(cx, &repr, v);
let iv = C_integral(cx.int_type(), discr.0, false);
- let s = adt::is_discr_signed(&*repr) as Bool;
+ let s = adt::is_discr_signed(&repr) as Bool;
llvm::LLVMConstIntCast(iv, llty.to_ref(), s)
},
(CastTy::Int(_), CastTy::Int(_)) => {
} else {
// If this isn't the address of a static, then keep going through
// normal constant evaluation.
- let (v, ty) = try!(const_expr(cx, &**sub, param_substs, fn_args, trueconst));
+ let (v, ty) = try!(const_expr(cx, &sub, param_substs, fn_args, trueconst));
addr_of(cx, v, type_of::align_of(cx, ty), "ref")
}
},
hir::ExprAddrOf(hir::MutMutable, ref sub) => {
- let (v, ty) = try!(const_expr(cx, &**sub, param_substs, fn_args, trueconst));
+ let (v, ty) = try!(const_expr(cx, &sub, param_substs, fn_args, trueconst));
addr_of_mut(cx, v, type_of::align_of(cx, ty), "ref_mut_slice")
},
hir::ExprTup(ref es) => {
let repr = adt::represent_type(cx, ety);
let vals = try!(map_list(&es[..]));
- adt::trans_const(cx, &*repr, Disr(0), &vals[..])
+ adt::trans_const(cx, &repr, Disr(0), &vals[..])
},
hir::ExprStruct(_, ref fs, ref base_opt) => {
let repr = adt::represent_type(cx, ety);
let base_val = match *base_opt {
Some(ref base) => Some(try!(const_expr(
cx,
- &**base,
+ &base,
param_substs,
fn_args,
trueconst,
let cs = fields.iter().enumerate().map(|(ix, &Field(f_name, _))| {
match (fs.iter().find(|f| f_name == f.name.node), base_val) {
(Some(ref f), _) => {
- const_expr(cx, &*f.expr, param_substs, fn_args, trueconst).map(|(l, _)| l)
+ const_expr(cx, &f.expr, param_substs, fn_args, trueconst).map(|(l, _)| l)
},
- (_, Some((bv, _))) => Ok(adt::const_get_field(cx, &*repr, bv, discr, ix)),
+ (_, Some((bv, _))) => Ok(adt::const_get_field(cx, &repr, bv, discr, ix)),
(_, None) => cx.sess().span_bug(e.span, "missing struct field"),
}
})
if ety.is_simd() {
C_vector(&cs[..])
} else {
- adt::trans_const(cx, &*repr, discr, &cs[..])
+ adt::trans_const(cx, &repr, discr, &cs[..])
}
},
hir::ExprVec(ref es) => {
let vs = es.iter()
.map(|e| const_expr(
cx,
- &**e,
+ &e,
param_substs,
fn_args,
trueconst,
let unit_ty = ety.sequence_element_type(cx.tcx());
let llunitty = type_of::type_of(cx, unit_ty);
let n = cx.tcx().eval_repeat_count(count);
- let unit_val = try!(const_expr(cx, &**elem, param_substs, fn_args, trueconst)).0;
+ let unit_val = try!(const_expr(cx, &elem, param_substs, fn_args, trueconst)).0;
let vs = vec![unit_val; n];
if val_ty(unit_val) != llunitty {
C_struct(cx, &vs[..], false)
match vinfo.kind() {
ty::VariantKind::Unit => {
let repr = adt::represent_type(cx, ety);
- adt::trans_const(cx, &*repr, Disr::from(vinfo.disr_val), &[])
+ adt::trans_const(cx, &repr, Disr::from(vinfo.disr_val), &[])
}
ty::VariantKind::Tuple => {
expr::trans_def_fn_unadjusted(cx, e, def, param_substs).val
loop {
callee = match callee.node {
hir::ExprBlock(ref block) => match block.expr {
- Some(ref tail) => &**tail,
+ Some(ref tail) => &tail,
None => break,
},
_ => break,
C_vector(&arg_vals[..])
} else {
let repr = adt::represent_type(cx, ety);
- adt::trans_const(cx, &*repr, Disr(0), &arg_vals[..])
+ adt::trans_const(cx, &repr, Disr(0), &arg_vals[..])
}
}
Def::Variant(enum_did, variant_did) => {
let repr = adt::represent_type(cx, ety);
let vinfo = cx.tcx().lookup_adt_def(enum_did).variant_with_id(variant_did);
adt::trans_const(cx,
- &*repr,
+ &repr,
Disr::from(vinfo.disr_val),
&arg_vals[..])
}
try!(const_fn_call(cx, MethodCallKey(method_call),
method_did, &arg_vals, param_substs, trueconst))
},
- hir::ExprType(ref e, _) => try!(const_expr(cx, &**e, param_substs, fn_args, trueconst)).0,
+ hir::ExprType(ref e, _) => try!(const_expr(cx, &e, param_substs, fn_args, trueconst)).0,
hir::ExprBlock(ref block) => {
match block.expr {
Some(ref expr) => try!(const_expr(
cx,
- &**expr,
+ &expr,
param_substs,
fn_args,
trueconst,
match s.node {
hir::StmtExpr(ref e, _) | hir::StmtSemi(ref e, _) => {
- bcx = trans_stmt_semi(bcx, &**e);
+ bcx = trans_stmt_semi(bcx, &e);
}
hir::StmtDecl(ref d, _) => {
match d.node {
hir::DeclLocal(ref local) => {
- bcx = init_local(bcx, &**local);
- debuginfo::create_local_var_metadata(bcx, &**local);
+ bcx = init_local(bcx, &local);
+ debuginfo::create_local_var_metadata(bcx, &local);
}
// Inner items are visited by `trans_item`/`trans_meth`.
hir::DeclItem(_) => {},
match b.expr {
Some(ref e) => {
if !bcx.unreachable.get() {
- bcx = expr::trans_into(bcx, &**e, dest);
+ bcx = expr::trans_into(bcx, &e, dest);
}
}
None => {
if let Some(cv) = const_to_opt_uint(cond_val) {
if cv == 1 {
// if true { .. } [else { .. }]
- bcx = trans_block(bcx, &*thn, dest);
+ bcx = trans_block(bcx, &thn, dest);
trans::debuginfo::clear_source_location(bcx.fcx);
} else {
if let Some(elexpr) = els {
- bcx = expr::trans_into(bcx, &*elexpr, dest);
+ bcx = expr::trans_into(bcx, &elexpr, dest);
trans::debuginfo::clear_source_location(bcx.fcx);
}
}
let name = format!("then-block-{}-", thn.id);
let then_bcx_in = bcx.fcx.new_id_block(&name[..], thn.id);
- let then_bcx_out = trans_block(then_bcx_in, &*thn, dest);
+ let then_bcx_out = trans_block(then_bcx_in, &thn, dest);
trans::debuginfo::clear_source_location(bcx.fcx);
let cond_source_loc = cond.debug_loc();
match els {
Some(elexpr) => {
let else_bcx_in = bcx.fcx.new_id_block("else-block", elexpr.id);
- let else_bcx_out = expr::trans_into(else_bcx_in, &*elexpr, dest);
+ let else_bcx_out = expr::trans_into(else_bcx_in, &elexpr, dest);
next_bcx = bcx.fcx.join_blocks(if_id,
&[then_bcx_out, else_bcx_out]);
CondBr(bcx, cond_val, then_bcx_in.llbb, else_bcx_in.llbb, cond_source_loc);
let mut bcx = bcx;
let dest = match (fcx.llretslotptr.get(), retval_expr) {
(Some(_), Some(retval_expr)) => {
- let ret_ty = expr_ty_adjusted(bcx, &*retval_expr);
+ let ret_ty = expr_ty_adjusted(bcx, &retval_expr);
expr::SaveIn(fcx.get_ret_slot(bcx, ty::FnConverging(ret_ty), "ret_slot"))
}
_ => expr::Ignore,
};
if let Some(x) = retval_expr {
- bcx = expr::trans_into(bcx, &*x, dest);
+ bcx = expr::trans_into(bcx, &x, dest);
match dest {
expr::SaveIn(slot) if fcx.needs_ret_allocas => {
Store(bcx, slot, fcx.llretslotptr.get().unwrap());
// Push argument identifiers onto the stack so arguments integrate nicely
// with variable shadowing.
for arg in args {
- pat_util::pat_bindings_ident(def_map, &*arg.pat, |_, node_id, _, path1| {
+ pat_util::pat_bindings_ident(def_map, &arg.pat, |_, node_id, _, path1| {
scope_stack.push(ScopeStackEntry { scope_metadata: fn_metadata,
name: Some(path1.node.unhygienic_name) });
scope_map.insert(node_id, fn_metadata);
match statement.node {
hir::StmtDecl(ref decl, _) =>
- walk_decl(cx, &**decl, scope_stack, scope_map),
+ walk_decl(cx, &decl, scope_stack, scope_map),
hir::StmtExpr(ref exp, _) |
hir::StmtSemi(ref exp, _) =>
- walk_expr(cx, &**exp, scope_stack, scope_map),
+ walk_expr(cx, &exp, scope_stack, scope_map),
}
}
if let Some(ref exp) = block.expr {
- walk_expr(cx, &**exp, scope_stack, scope_map);
+ walk_expr(cx, &exp, scope_stack, scope_map);
}
}
codemap::Spanned { node: hir::DeclLocal(ref local), .. } => {
scope_map.insert(local.id, scope_stack.last().unwrap().scope_metadata);
- walk_pattern(cx, &*local.pat, scope_stack, scope_map);
+ walk_pattern(cx, &local.pat, scope_stack, scope_map);
if let Some(ref exp) = local.init {
- walk_expr(cx, &**exp, scope_stack, scope_map);
+ walk_expr(cx, &exp, scope_stack, scope_map);
}
}
_ => ()
// Check if this is a binding. If so we need to put it on the
// scope stack and maybe introduce an artificial scope
- if pat_util::pat_is_binding(&def_map.borrow(), &*pat) {
+ if pat_util::pat_is_binding(&def_map.borrow(), &pat) {
let name = path1.node.unhygienic_name;
scope_map.insert(pat.id, scope_stack.last().unwrap().scope_metadata);
if let Some(ref sub_pat) = *sub_pat_opt {
- walk_pattern(cx, &**sub_pat, scope_stack, scope_map);
+ walk_pattern(cx, &sub_pat, scope_stack, scope_map);
}
}
if let Some(ref sub_pats) = *sub_pats_opt {
for p in sub_pats {
- walk_pattern(cx, &**p, scope_stack, scope_map);
+ walk_pattern(cx, &p, scope_stack, scope_map);
}
}
}
node: hir::FieldPat { pat: ref sub_pat, .. },
..
} in field_pats {
- walk_pattern(cx, &**sub_pat, scope_stack, scope_map);
+ walk_pattern(cx, &sub_pat, scope_stack, scope_map);
}
}
scope_map.insert(pat.id, scope_stack.last().unwrap().scope_metadata);
for sub_pat in sub_pats {
- walk_pattern(cx, &**sub_pat, scope_stack, scope_map);
+ walk_pattern(cx, &sub_pat, scope_stack, scope_map);
}
}
hir::PatBox(ref sub_pat) | hir::PatRegion(ref sub_pat, _) => {
scope_map.insert(pat.id, scope_stack.last().unwrap().scope_metadata);
- walk_pattern(cx, &**sub_pat, scope_stack, scope_map);
+ walk_pattern(cx, &sub_pat, scope_stack, scope_map);
}
hir::PatLit(ref exp) => {
scope_map.insert(pat.id, scope_stack.last().unwrap().scope_metadata);
- walk_expr(cx, &**exp, scope_stack, scope_map);
+ walk_expr(cx, &exp, scope_stack, scope_map);
}
hir::PatRange(ref exp1, ref exp2) => {
scope_map.insert(pat.id, scope_stack.last().unwrap().scope_metadata);
- walk_expr(cx, &**exp1, scope_stack, scope_map);
- walk_expr(cx, &**exp2, scope_stack, scope_map);
+ walk_expr(cx, &exp1, scope_stack, scope_map);
+ walk_expr(cx, &exp2, scope_stack, scope_map);
}
hir::PatVec(ref front_sub_pats, ref middle_sub_pats, ref back_sub_pats) => {
scope_map.insert(pat.id, scope_stack.last().unwrap().scope_metadata);
for sub_pat in front_sub_pats {
- walk_pattern(cx, &**sub_pat, scope_stack, scope_map);
+ walk_pattern(cx, &sub_pat, scope_stack, scope_map);
}
if let Some(ref sub_pat) = *middle_sub_pats {
- walk_pattern(cx, &**sub_pat, scope_stack, scope_map);
+ walk_pattern(cx, &sub_pat, scope_stack, scope_map);
}
for sub_pat in back_sub_pats {
- walk_pattern(cx, &**sub_pat, scope_stack, scope_map);
+ walk_pattern(cx, &sub_pat, scope_stack, scope_map);
}
}
}
hir::ExprAddrOf(_, ref sub_exp) |
hir::ExprField(ref sub_exp, _) |
hir::ExprTupField(ref sub_exp, _) =>
- walk_expr(cx, &**sub_exp, scope_stack, scope_map),
+ walk_expr(cx, &sub_exp, scope_stack, scope_map),
hir::ExprBox(ref sub_expr) => {
- walk_expr(cx, &**sub_expr, scope_stack, scope_map);
+ walk_expr(cx, &sub_expr, scope_stack, scope_map);
}
hir::ExprRet(ref exp_opt) => match *exp_opt {
- Some(ref sub_exp) => walk_expr(cx, &**sub_exp, scope_stack, scope_map),
+ Some(ref sub_exp) => walk_expr(cx, &sub_exp, scope_stack, scope_map),
None => ()
},
hir::ExprUnary(_, ref sub_exp) => {
- walk_expr(cx, &**sub_exp, scope_stack, scope_map);
+ walk_expr(cx, &sub_exp, scope_stack, scope_map);
}
hir::ExprAssignOp(_, ref lhs, ref rhs) |
hir::ExprIndex(ref lhs, ref rhs) |
hir::ExprBinary(_, ref lhs, ref rhs) => {
- walk_expr(cx, &**lhs, scope_stack, scope_map);
- walk_expr(cx, &**rhs, scope_stack, scope_map);
+ walk_expr(cx, &lhs, scope_stack, scope_map);
+ walk_expr(cx, &rhs, scope_stack, scope_map);
}
hir::ExprRange(ref start, ref end) => {
- start.as_ref().map(|e| walk_expr(cx, &**e, scope_stack, scope_map));
- end.as_ref().map(|e| walk_expr(cx, &**e, scope_stack, scope_map));
+ start.as_ref().map(|e| walk_expr(cx, &e, scope_stack, scope_map));
+ end.as_ref().map(|e| walk_expr(cx, &e, scope_stack, scope_map));
}
hir::ExprVec(ref init_expressions) |
hir::ExprTup(ref init_expressions) => {
for ie in init_expressions {
- walk_expr(cx, &**ie, scope_stack, scope_map);
+ walk_expr(cx, &ie, scope_stack, scope_map);
}
}
hir::ExprAssign(ref sub_exp1, ref sub_exp2) |
hir::ExprRepeat(ref sub_exp1, ref sub_exp2) => {
- walk_expr(cx, &**sub_exp1, scope_stack, scope_map);
- walk_expr(cx, &**sub_exp2, scope_stack, scope_map);
+ walk_expr(cx, &sub_exp1, scope_stack, scope_map);
+ walk_expr(cx, &sub_exp2, scope_stack, scope_map);
}
hir::ExprIf(ref cond_exp, ref then_block, ref opt_else_exp) => {
- walk_expr(cx, &**cond_exp, scope_stack, scope_map);
+ walk_expr(cx, &cond_exp, scope_stack, scope_map);
with_new_scope(cx,
then_block.span,
scope_stack,
scope_map,
|cx, scope_stack, scope_map| {
- walk_block(cx, &**then_block, scope_stack, scope_map);
+ walk_block(cx, &then_block, scope_stack, scope_map);
});
match *opt_else_exp {
Some(ref else_exp) =>
- walk_expr(cx, &**else_exp, scope_stack, scope_map),
+ walk_expr(cx, &else_exp, scope_stack, scope_map),
_ => ()
}
}
hir::ExprWhile(ref cond_exp, ref loop_body, _) => {
- walk_expr(cx, &**cond_exp, scope_stack, scope_map);
+ walk_expr(cx, &cond_exp, scope_stack, scope_map);
with_new_scope(cx,
loop_body.span,
scope_stack,
scope_map,
|cx, scope_stack, scope_map| {
- walk_block(cx, &**loop_body, scope_stack, scope_map);
+ walk_block(cx, &loop_body, scope_stack, scope_map);
})
}
scope_stack,
scope_map,
|cx, scope_stack, scope_map| {
- walk_block(cx, &**block, scope_stack, scope_map);
+ walk_block(cx, &block, scope_stack, scope_map);
})
}
scope_map,
|cx, scope_stack, scope_map| {
for &hir::Arg { pat: ref pattern, .. } in &decl.inputs {
- walk_pattern(cx, &**pattern, scope_stack, scope_map);
+ walk_pattern(cx, &pattern, scope_stack, scope_map);
}
- walk_block(cx, &**block, scope_stack, scope_map);
+ walk_block(cx, &block, scope_stack, scope_map);
})
}
hir::ExprCall(ref fn_exp, ref args) => {
- walk_expr(cx, &**fn_exp, scope_stack, scope_map);
+ walk_expr(cx, &fn_exp, scope_stack, scope_map);
for arg_exp in args {
- walk_expr(cx, &**arg_exp, scope_stack, scope_map);
+ walk_expr(cx, &arg_exp, scope_stack, scope_map);
}
}
hir::ExprMethodCall(_, _, ref args) => {
for arg_exp in args {
- walk_expr(cx, &**arg_exp, scope_stack, scope_map);
+ walk_expr(cx, &arg_exp, scope_stack, scope_map);
}
}
hir::ExprMatch(ref discriminant_exp, ref arms, _) => {
- walk_expr(cx, &**discriminant_exp, scope_stack, scope_map);
+ walk_expr(cx, &discriminant_exp, scope_stack, scope_map);
// For each arm we have to first walk the pattern as these might
// introduce new artificial scopes. It should be sufficient to
scope_map,
|cx, scope_stack, scope_map| {
for pat in &arm_ref.pats {
- walk_pattern(cx, &**pat, scope_stack, scope_map);
+ walk_pattern(cx, &pat, scope_stack, scope_map);
}
if let Some(ref guard_exp) = arm_ref.guard {
- walk_expr(cx, &**guard_exp, scope_stack, scope_map)
+ walk_expr(cx, &guard_exp, scope_stack, scope_map)
}
- walk_expr(cx, &*arm_ref.body, scope_stack, scope_map);
+ walk_expr(cx, &arm_ref.body, scope_stack, scope_map);
})
}
}
hir::ExprStruct(_, ref fields, ref base_exp) => {
for &hir::Field { expr: ref exp, .. } in fields {
- walk_expr(cx, &**exp, scope_stack, scope_map);
+ walk_expr(cx, &exp, scope_stack, scope_map);
}
match *base_exp {
- Some(ref exp) => walk_expr(cx, &**exp, scope_stack, scope_map),
+ Some(ref exp) => walk_expr(cx, &exp, scope_stack, scope_map),
None => ()
}
}
.. }) => {
// inputs, outputs: Vec<(String, P<Expr>)>
for &(_, ref exp) in inputs {
- walk_expr(cx, &**exp, scope_stack, scope_map);
+ walk_expr(cx, &exp, scope_stack, scope_map);
}
for out in outputs {
- walk_expr(cx, &*out.expr, scope_stack, scope_map);
+ walk_expr(cx, &out.expr, scope_stack, scope_map);
}
}
}
let def_map = &cx.tcx().def_map;
let locals = bcx.fcx.lllocals.borrow();
- pat_util::pat_bindings(def_map, &*local.pat, |_, node_id, span, var_name| {
+ pat_util::pat_bindings(def_map, &local.pat, |_, node_id, span, var_name| {
let datum = match locals.get(&node_id) {
Some(datum) => datum,
None => {
.fn_metadata;
let locals = bcx.fcx.lllocals.borrow();
- pat_util::pat_bindings(def_map, &*arg.pat, |_, node_id, span, var_name| {
+ pat_util::pat_bindings(def_map, &arg.pat, |_, node_id, span, var_name| {
let datum = match locals.get(&node_id) {
Some(v) => v,
None => {
let scope_map = create_scope_map::create_scope_map(cx,
&fn_decl.inputs,
- &*top_level_block,
+ &top_level_block,
fn_metadata,
fn_ast_id);
pub fn mangled_name_of_contained_item(&self, item_name: &str) -> String {
fn fill_nested(node: &NamespaceTreeNode, output: &mut String) {
match node.parent {
- Some(ref parent) => fill_nested(&*parent.upgrade().unwrap(), output),
+ Some(ref parent) => fill_nested(&parent.upgrade().unwrap(), output),
None => {}
}
let string = node.name.as_str();
pub fn contains_nodebug_attribute(attributes: &[ast::Attribute]) -> bool {
attributes.iter().any(|attr| {
- let meta_item: &ast::MetaItem = &*attr.node.value;
+ let meta_item: &ast::MetaItem = &attr.node.value;
match meta_item.node {
ast::MetaItemKind::Word(ref value) => &value[..] == "no_debug",
_ => false
match expr.node {
hir::ExprType(ref e, _) => {
- trans(bcx, &**e)
+ trans(bcx, &e)
}
hir::ExprPath(..) => {
trans_def(bcx, expr, bcx.def(expr.id))
}
hir::ExprField(ref base, name) => {
- trans_rec_field(bcx, &**base, name.node)
+ trans_rec_field(bcx, &base, name.node)
}
hir::ExprTupField(ref base, idx) => {
- trans_rec_tup_field(bcx, &**base, idx.node)
+ trans_rec_tup_field(bcx, &base, idx.node)
}
hir::ExprIndex(ref base, ref idx) => {
- trans_index(bcx, expr, &**base, &**idx, MethodCall::expr(expr.id))
+ trans_index(bcx, expr, &base, &idx, MethodCall::expr(expr.id))
}
hir::ExprBox(ref contents) => {
// Special case for `Box<T>`
let box_ty = expr_ty(bcx, expr);
- let contents_ty = expr_ty(bcx, &**contents);
+ let contents_ty = expr_ty(bcx, &contents);
match box_ty.sty {
ty::TyBox(..) => {
- trans_uniq_expr(bcx, expr, box_ty, &**contents, contents_ty)
+ trans_uniq_expr(bcx, expr, box_ty, &contents, contents_ty)
}
_ => bcx.sess().span_bug(expr.span,
"expected unique box")
}
}
- hir::ExprLit(ref lit) => trans_immediate_lit(bcx, expr, &**lit),
+ hir::ExprLit(ref lit) => trans_immediate_lit(bcx, expr, &lit),
hir::ExprBinary(op, ref lhs, ref rhs) => {
- trans_binary(bcx, expr, op, &**lhs, &**rhs)
+ trans_binary(bcx, expr, op, &lhs, &rhs)
}
hir::ExprUnary(op, ref x) => {
- trans_unary(bcx, expr, op, &**x)
+ trans_unary(bcx, expr, op, &x)
}
hir::ExprAddrOf(_, ref x) => {
match x.node {
false);
fcx.push_ast_cleanup_scope(cleanup_debug_loc);
let datum = unpack_datum!(
- bcx, tvec::trans_slice_vec(bcx, expr, &**x));
+ bcx, tvec::trans_slice_vec(bcx, expr, &x));
bcx = fcx.pop_and_trans_ast_cleanup_scope(bcx, x.id);
DatumBlock::new(bcx, datum)
}
_ => {
- trans_addr_of(bcx, expr, &**x)
+ trans_addr_of(bcx, expr, &x)
}
}
}
hir::ExprCast(ref val, _) => {
// Datum output mode means this is a scalar cast:
- trans_imm_cast(bcx, &**val, expr.id)
+ trans_imm_cast(bcx, &val, expr.id)
}
_ => {
bcx.tcx().sess.span_bug(
bcx,
vinfo.fields[ix].1,
|srcval| {
- adt::trans_field_ptr(bcx, &*repr, srcval, vinfo.discr, ix)
+ adt::trans_field_ptr(bcx, &repr, srcval, vinfo.discr, ix)
});
if type_is_sized(bcx.tcx(), d.ty) {
controlflow::trans_break(bcx, expr, label_opt.map(|l| l.node.name))
}
hir::ExprType(ref e, _) => {
- trans_into(bcx, &**e, Ignore)
+ trans_into(bcx, &e, Ignore)
}
hir::ExprAgain(label_opt) => {
controlflow::trans_cont(bcx, expr, label_opt.map(|l| l.node.name))
// directly. This avoids having to manage a return slot when
// it won't actually be used anyway.
if let &Some(ref x) = ex {
- bcx = trans_into(bcx, &**x, Ignore);
+ bcx = trans_into(bcx, &x, Ignore);
}
// Mark the end of the block as unreachable. Once we get to
// a return expression, there's no more we should be doing
}
}
hir::ExprWhile(ref cond, ref body, _) => {
- controlflow::trans_while(bcx, expr, &**cond, &**body)
+ controlflow::trans_while(bcx, expr, &cond, &body)
}
hir::ExprLoop(ref body, _) => {
- controlflow::trans_loop(bcx, expr, &**body)
+ controlflow::trans_loop(bcx, expr, &body)
}
hir::ExprAssign(ref dst, ref src) => {
- let src_datum = unpack_datum!(bcx, trans(bcx, &**src));
- let dst_datum = unpack_datum!(bcx, trans_to_lvalue(bcx, &**dst, "assign"));
+ let src_datum = unpack_datum!(bcx, trans(bcx, &src));
+ let dst_datum = unpack_datum!(bcx, trans_to_lvalue(bcx, &dst, "assign"));
if bcx.fcx.type_needs_drop(dst_datum.ty) {
// If there are destructors involved, make sure we
.contains_key(&MethodCall::expr(expr.id));
if has_method_map {
- let dst = unpack_datum!(bcx, trans(bcx, &**dst));
- let src_datum = unpack_datum!(bcx, trans(bcx, &**src));
+ let dst = unpack_datum!(bcx, trans(bcx, &dst));
+ let src_datum = unpack_datum!(bcx, trans(bcx, &src));
trans_overloaded_op(bcx, expr, MethodCall::expr(expr.id), dst,
Some((src_datum, src.id)), None, false).bcx
} else {
- trans_assign_op(bcx, expr, op, &**dst, &**src)
+ trans_assign_op(bcx, expr, op, &dst, &src)
}
}
hir::ExprInlineAsm(ref a) => {
match expr.node {
hir::ExprType(ref e, _) => {
- trans_into(bcx, &**e, dest)
+ trans_into(bcx, &e, dest)
}
hir::ExprPath(..) => {
trans_def_dps_unadjusted(bcx, expr, bcx.def(expr.id), dest)
}
hir::ExprIf(ref cond, ref thn, ref els) => {
- controlflow::trans_if(bcx, expr.id, &**cond, &**thn, els.as_ref().map(|e| &**e), dest)
+ controlflow::trans_if(bcx, expr.id, &cond, &thn, els.as_ref().map(|e| &**e), dest)
}
hir::ExprMatch(ref discr, ref arms, _) => {
- _match::trans_match(bcx, expr, &**discr, &arms[..], dest)
+ _match::trans_match(bcx, expr, &discr, &arms[..], dest)
}
hir::ExprBlock(ref blk) => {
- controlflow::trans_block(bcx, &**blk, dest)
+ controlflow::trans_block(bcx, &blk, dest)
}
hir::ExprStruct(_, ref fields, ref base) => {
trans_struct(bcx,
if bcx.tcx().is_method_call(expr.id) {
trans_overloaded_call(bcx,
expr,
- &**f,
+ &f,
&args[..],
Some(dest))
} else {
callee::trans_call(bcx,
expr,
- &**f,
+ &f,
callee::ArgExprs(&args[..]),
dest)
}
hir::ExprMethodCall(_, _, ref args) => {
callee::trans_method_call(bcx,
expr,
- &*args[0],
+ &args[0],
callee::ArgExprs(&args[..]),
dest)
}
hir::ExprBinary(op, ref lhs, ref rhs) => {
// if not overloaded, would be RvalueDatumExpr
- let lhs = unpack_datum!(bcx, trans(bcx, &**lhs));
- let rhs_datum = unpack_datum!(bcx, trans(bcx, &**rhs));
+ let lhs = unpack_datum!(bcx, trans(bcx, &lhs));
+ let rhs_datum = unpack_datum!(bcx, trans(bcx, &rhs));
trans_overloaded_op(bcx, expr, MethodCall::expr(expr.id), lhs,
Some((rhs_datum, rhs.id)), Some(dest),
!rustc_front::util::is_by_value_binop(op.node)).bcx
}
hir::ExprUnary(op, ref subexpr) => {
// if not overloaded, would be RvalueDatumExpr
- let arg = unpack_datum!(bcx, trans(bcx, &**subexpr));
+ let arg = unpack_datum!(bcx, trans(bcx, &subexpr));
trans_overloaded_op(bcx, expr, MethodCall::expr(expr.id),
arg, None, Some(dest), !rustc_front::util::is_by_value_unop(op)).bcx
}
hir::ExprIndex(ref base, ref idx) => {
// if not overloaded, would be RvalueDatumExpr
- let base = unpack_datum!(bcx, trans(bcx, &**base));
- let idx_datum = unpack_datum!(bcx, trans(bcx, &**idx));
+ let base = unpack_datum!(bcx, trans(bcx, &base));
+ let idx_datum = unpack_datum!(bcx, trans(bcx, &idx));
trans_overloaded_op(bcx, expr, MethodCall::expr(expr.id), base,
Some((idx_datum, idx.id)), Some(dest), true).bcx
}
// Nullary variant.
let ty = expr_ty(bcx, ref_expr);
let repr = adt::represent_type(bcx.ccx(), ty);
- adt::trans_set_discr(bcx, &*repr, lldest, Disr::from(variant.disr_val));
+ adt::trans_set_discr(bcx, &repr, lldest, Disr::from(variant.disr_val));
return bcx;
}
}
match ty.sty {
ty::TyStruct(def, _) if def.has_dtor() => {
let repr = adt::represent_type(bcx.ccx(), ty);
- adt::trans_set_discr(bcx, &*repr, lldest, Disr(0));
+ adt::trans_set_discr(bcx, &repr, lldest, Disr(0));
}
_ => {}
}
let mut vec_val = C_undef(llty);
for &(i, ref e) in fields {
- let block_datum = trans(bcx, &**e);
+ let block_datum = trans(bcx, &e);
bcx = block_datum.bcx;
let position = C_uint(bcx.ccx(), i);
let value = block_datum.datum.to_llscalarish(bcx);
// First, trans field expressions to temporary scratch values.
let scratch_vals: Vec<_> = fields.iter().map(|&(i, ref e)| {
- let datum = unpack_datum!(bcx, trans(bcx, &**e));
+ let datum = unpack_datum!(bcx, trans(bcx, &e));
(i, datum)
}).collect();
assert_eq!(discr, Disr(0));
let addr = adt::MaybeSizedValue::sized(addr);
- match expr_kind(bcx.tcx(), &*base.expr) {
+ match expr_kind(bcx.tcx(), &base.expr) {
ExprKind::RvalueDps | ExprKind::RvalueDatum if !bcx.fcx.type_needs_drop(ty) => {
- bcx = trans_into(bcx, &*base.expr, SaveIn(addr.value));
+ bcx = trans_into(bcx, &base.expr, SaveIn(addr.value));
},
ExprKind::RvalueStmt => {
bcx.tcx().sess.bug("unexpected expr kind for struct base expr")
}
_ => {
- let base_datum = unpack_datum!(bcx, trans_to_lvalue(bcx, &*base.expr, "base"));
+ let base_datum = unpack_datum!(bcx, trans_to_lvalue(bcx, &base.expr, "base"));
for &(i, t) in &base.fields {
let datum = base_datum.get_element(
- bcx, t, |srcval| adt::trans_field_ptr(bcx, &*repr, srcval, discr, i));
+ bcx, t, |srcval| adt::trans_field_ptr(bcx, &repr, srcval, discr, i));
assert!(type_is_sized(bcx.tcx(), datum.ty));
- let dest = adt::trans_field_ptr(bcx, &*repr, addr, discr, i);
+ let dest = adt::trans_field_ptr(bcx, &repr, addr, discr, i);
bcx = datum.store_to(bcx, dest);
}
}
// Finally, move scratch field values into actual field locations
for (i, datum) in scratch_vals {
- let dest = adt::trans_field_ptr(bcx, &*repr, addr, discr, i);
+ let dest = adt::trans_field_ptr(bcx, &repr, addr, discr, i);
bcx = datum.store_to(bcx, dest);
}
} else {
// No base means we can write all fields directly in place.
let addr = adt::MaybeSizedValue::sized(addr);
for &(i, ref e) in fields {
- let dest = adt::trans_field_ptr(bcx, &*repr, addr, discr, i);
- let e_ty = expr_ty_adjusted(bcx, &**e);
- bcx = trans_into(bcx, &**e, SaveIn(dest));
+ let dest = adt::trans_field_ptr(bcx, &repr, addr, discr, i);
+ let e_ty = expr_ty_adjusted(bcx, &e);
+ bcx = trans_into(bcx, &e, SaveIn(dest));
let scope = cleanup::CustomScope(custom_cleanup_scope);
fcx.schedule_lifetime_end(scope, dest);
// FIXME: nonzeroing move should generalize to fields
}
}
- adt::trans_set_discr(bcx, &*repr, addr, discr);
+ adt::trans_set_discr(bcx, &repr, addr, discr);
fcx.pop_custom_cleanup_scope(custom_cleanup_scope);
let datum = unpack_datum!(
bcx, datum.to_lvalue_datum(bcx, "trans_imm_cast", expr.id));
let llexpr_ptr = datum.to_llref();
- let discr = adt::trans_get_discr(bcx, &*repr, llexpr_ptr,
+ let discr = adt::trans_get_discr(bcx, &repr, llexpr_ptr,
Some(Type::i64(ccx)), true);
ll_t_in = val_ty(discr);
- (discr, adt::is_discr_signed(&*repr))
+ (discr, adt::is_discr_signed(&repr))
} else {
(datum.to_llscalarish(bcx), t_in.is_signed())
};
let lhs = immediate_rvalue(lhs, dst.ty);
// Evaluate RHS - FIXME(#28160) this sucks
- let rhs = unpack_datum!(bcx, trans(bcx, &*src));
+ let rhs = unpack_datum!(bcx, trans(bcx, &src));
let rhs = unpack_datum!(bcx, rhs.to_rvalue_datum(bcx, "assign_op_rhs"));
// Perform computation and store the result
};
let sig = &ty.sig.0;
for (input, ty) in decl.inputs.iter().zip(&sig.inputs) {
- check(&*input.ty, *ty)
+ check(&input.ty, *ty)
}
if let hir::Return(ref ty) = decl.output {
- check(&**ty, sig.output.unwrap())
+ check(&ty, sig.output.unwrap())
}
}
}
abi => {
let ty = ccx.tcx().node_id_to_type(foreign_item.id);
match ty.sty {
- ty::TyBareFn(_, bft) => gate_simd_ffi(ccx.tcx(), &**decl, bft),
+ ty::TyBareFn(_, bft) => gate_simd_ffi(ccx.tcx(), &decl, bft),
_ => ccx.tcx().sess.span_bug(foreign_item.span,
"foreign fn's sty isn't a bare_fn_ty?")
}
assert!(type_is_sized(bcx.tcx(), t), "Precondition: caller must ensure t is sized");
let repr = adt::represent_type(bcx.ccx(), t);
- let drop_flag = unpack_datum!(bcx, adt::trans_drop_flag_ptr(bcx, &*repr, struct_data));
+ let drop_flag = unpack_datum!(bcx, adt::trans_drop_flag_ptr(bcx, &repr, struct_data));
let loaded = load_ty(bcx, drop_flag.val, bcx.tcx().dtor_type());
let drop_flag_llty = type_of(bcx.fcx.ccx, bcx.tcx().dtor_type());
let init_val = C_integral(drop_flag_llty, adt::DTOR_NEEDED as u64, false);
// Don't use type_of::sizing_type_of because that expects t to be sized.
assert!(!t.is_simd());
let repr = adt::represent_type(ccx, t);
- let sizing_type = adt::sizing_type_context_of(ccx, &*repr, true);
+ let sizing_type = adt::sizing_type_context_of(ccx, &repr, true);
debug!("DST {} sizing_type: {}", t, sizing_type.to_string());
let sized_size = llsize_of_alloc(ccx, sizing_type.prefix());
let sized_align = llalign_of_min(ccx, sizing_type.prefix());
_ => ccx.sess().bug("instantiate_inline: item has a \
non-enum, non-struct parent")
}
- trans_item(ccx, &**item);
+ trans_item(ccx, &item);
my_id
}
FoundAst::FoundParent(_, _) => {
// efficient (these are done efficiently implicitly in C
// with the `__m128i` type and so this means Rust doesn't
// lose out there).
- let expr = &*arg_exprs[0];
+ let expr = &arg_exprs[0];
let datum = unpack_datum!(bcx, expr::trans(bcx, expr));
let datum = unpack_datum!(bcx, datum.to_rvalue_datum(bcx, "transmute_temp"));
let val = if datum.kind.is_by_ref() {
expr::SaveIn(d) => expr::SaveIn(PointerCast(bcx, d, llintype.ptr_to())),
expr::Ignore => expr::Ignore
};
- bcx = expr::trans_into(bcx, &*arg_exprs[0], dest);
+ bcx = expr::trans_into(bcx, &arg_exprs[0], dest);
dest
};
}
};
- let simple = get_simple_intrinsic(ccx, &*foreign_item);
+ let simple = get_simple_intrinsic(ccx, &foreign_item);
let llval = match (simple, &*name) {
(Some(llfn), _) => {
Call(bcx, llfn, &llargs, None, call_debug_location)
match val_ty.sty {
ty::TyEnum(..) => {
let repr = adt::represent_type(ccx, *val_ty);
- adt::trans_get_discr(bcx, &*repr, llargs[0],
+ adt::trans_get_discr(bcx, &repr, llargs[0],
Some(llret_ty), true)
}
_ => C_null(llret_ty)
assert!(!bcx.fcx.type_needs_drop(arg_type));
let repr = adt::represent_type(bcx.ccx(), arg_type);
- let repr_ptr = &*repr;
+ let repr_ptr = &repr;
let arg = adt::MaybeSizedValue::sized(llarg);
(0..contents.len())
.map(|i| {
assert_eq!(adt_def.variants.len(), targets.len());
for (adt_variant, target) in adt_def.variants.iter().zip(targets) {
let llval = bcx.with_block(|bcx|
- adt::trans_case(bcx, &*repr, Disr::from(adt_variant.disr_val))
+ adt::trans_case(bcx, &repr, Disr::from(adt_variant.disr_val))
);
let llbb = self.llblock(*target);
build::AddCase(switch, llval, llbb)
let repr = adt::represent_type(bcx.ccx(), dest.ty.to_ty(bcx.tcx()));
let disr = Disr::from(adt_def.variants[index].disr_val);
bcx.with_block(|bcx| {
- adt::trans_set_discr(bcx, &*repr, dest.llval, Disr::from(disr));
+ adt::trans_set_discr(bcx, &repr, dest.llval, Disr::from(disr));
});
for (i, operand) in operands.iter().enumerate() {
let op = self.trans_operand(&bcx, operand);
if !common::type_is_zero_size(bcx.ccx(), op.ty) {
let val = adt::MaybeSizedValue::sized(dest.llval);
let lldest_i = bcx.with_block(|bcx| {
- adt::trans_field_ptr(bcx, &*repr, val, disr, i)
+ adt::trans_field_ptr(bcx, &repr, val, disr, i)
});
self.store_operand(&bcx, lldest_i, op);
}
let repr = adt::represent_type(bcx.ccx(), operand.ty);
let llval = operand.immediate();
let discr = bcx.with_block(|bcx| {
- adt::trans_get_discr(bcx, &*repr, llval, None, true)
+ adt::trans_get_discr(bcx, &repr, llval, None, true)
});
- (discr, common::val_ty(discr), adt::is_discr_signed(&*repr))
+ (discr, common::val_ty(discr), adt::is_discr_signed(&repr))
} else {
(operand.immediate(), ll_t_in, operand.ty.is_signed())
};
if needs_body {
if abi != Abi::Rust {
foreign::trans_rust_fn_with_foreign_abi(
- ccx, &**decl, &**body, &[], d, psubsts, fn_node_id,
+ ccx, &decl, &body, &[], d, psubsts, fn_node_id,
Some(&hash[..]));
} else {
trans_fn(ccx,
- &**decl,
- &**body,
+ &decl,
+ &body,
d,
psubsts,
fn_node_id,
match dest {
Ignore => {
for element in elements {
- bcx = expr::trans_into(bcx, &**element, Ignore);
+ bcx = expr::trans_into(bcx, &element, Ignore);
}
}
let lleltptr = GEPi(bcx, lldest, &[i]);
debug!("writing index {} with lleltptr={}",
i, bcx.val_to_string(lleltptr));
- bcx = expr::trans_into(bcx, &**element,
+ bcx = expr::trans_into(bcx, &element,
SaveIn(lleltptr));
let scope = cleanup::CustomScope(temp_scope);
// Issue #30822: mark memory as dropped after running destructor
hir::ExprRepeat(ref element, ref count_expr) => {
match dest {
Ignore => {
- return expr::trans_into(bcx, &**element, Ignore);
+ return expr::trans_into(bcx, &element, Ignore);
}
SaveIn(lldest) => {
- match bcx.tcx().eval_repeat_count(&**count_expr) {
- 0 => expr::trans_into(bcx, &**element, Ignore),
- 1 => expr::trans_into(bcx, &**element, SaveIn(lldest)),
+ match bcx.tcx().eval_repeat_count(&count_expr) {
+ 0 => expr::trans_into(bcx, &element, Ignore),
+ 1 => expr::trans_into(bcx, &element, SaveIn(lldest)),
count => {
- let elem = unpack_datum!(bcx, expr::trans(bcx, &**element));
+ let elem = unpack_datum!(bcx, expr::trans(bcx, &element));
let bcx = iter_vec_loop(bcx, lldest, vt,
C_uint(bcx.ccx(), count),
|set_bcx, lleltptr, _| {
},
hir::ExprVec(ref es) => es.len(),
hir::ExprRepeat(_, ref count_expr) => {
- bcx.tcx().eval_repeat_count(&**count_expr)
+ bcx.tcx().eval_repeat_count(&count_expr)
}
_ => bcx.tcx().sess.span_bug(content_expr.span,
"unexpected vec content")
ty::TyTuple(..) | ty::TyEnum(..) | ty::TyClosure(..) => {
let repr = adt::represent_type(cx, t);
- adt::sizing_type_of(cx, &*repr, false)
+ adt::sizing_type_of(cx, &repr, false)
}
ty::TyStruct(..) => {
Type::vector(&llet, n)
} else {
let repr = adt::represent_type(cx, t);
- adt::sizing_type_of(cx, &*repr, false)
+ adt::sizing_type_of(cx, &repr, false)
}
}
let repr = adt::represent_type(cx, t);
let tps = substs.types.get_slice(subst::TypeSpace);
let name = llvm_type_name(cx, def.did, tps);
- adt::incomplete_type_of(cx, &*repr, &name[..])
+ adt::incomplete_type_of(cx, &repr, &name[..])
}
ty::TyClosure(..) => {
// Only create the named struct, but don't fill it in. We
// inherited from their environment, so we use entire
// contents of the VecPerParamSpace to construct the llvm
// name
- adt::incomplete_type_of(cx, &*repr, "closure")
+ adt::incomplete_type_of(cx, &repr, "closure")
}
ty::TyBox(ty) |
ty::TyTuple(ref tys) if tys.is_empty() => Type::nil(cx),
ty::TyTuple(..) => {
let repr = adt::represent_type(cx, t);
- adt::type_of(cx, &*repr)
+ adt::type_of(cx, &repr)
}
ty::TyStruct(def, ref substs) => {
if t.is_simd() {
let repr = adt::represent_type(cx, t);
let tps = substs.types.get_slice(subst::TypeSpace);
let name = llvm_type_name(cx, def.did, tps);
- adt::incomplete_type_of(cx, &*repr, &name[..])
+ adt::incomplete_type_of(cx, &repr, &name[..])
}
}
ty::TyEnum(..) | ty::TyStruct(..) | ty::TyClosure(..)
if !t.is_simd() => {
let repr = adt::represent_type(cx, t);
- adt::finish_type_of(cx, &*repr, &mut llty);
+ adt::finish_type_of(cx, &repr, &mut llty);
}
_ => ()
}