-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
use rustc::hir;
use rustc::hir::def_id::DefId;
use rustc::infer;
IndexVec::new(),
None,
local_decls_for_sig(&sig, span),
+ IndexVec::new(),
sig.inputs().len(),
vec![],
span,
debug!("build_clone_shim(def_id={:?})", def_id);
let mut builder = CloneShimBuilder::new(tcx, def_id, self_ty);
- let is_copy = !self_ty.moves_by_default(tcx, tcx.param_env(def_id), builder.span);
+ let is_copy = self_ty.is_copy_modulo_regions(tcx, tcx.param_env(def_id), builder.span);
let dest = Place::Local(RETURN_PLACE);
let src = Place::Local(Local::new(1+0)).deref();
IndexVec::new(),
None,
self.local_decls,
+ IndexVec::new(),
self.sig.inputs().len(),
vec![],
self.span,
span: self.span,
ty: func_ty,
user_ty: None,
- literal: ty::Const::zero_sized(self.tcx, func_ty),
+ literal: tcx.intern_lazy_const(ty::LazyConst::Evaluated(
+ ty::Const::zero_sized(func_ty),
+ )),
});
let ref_loc = self.make_place(
span: self.span,
ty: self.tcx.types.usize,
user_ty: None,
- literal: ty::Const::from_usize(self.tcx, value),
+ literal: self.tcx.intern_lazy_const(ty::LazyConst::Evaluated(
+ ty::Const::from_usize(self.tcx, value),
+ )),
}
}
span,
ty,
user_ty: None,
- literal: ty::Const::zero_sized(tcx, ty),
+ literal: tcx.intern_lazy_const(ty::LazyConst::Evaluated(
+ ty::Const::zero_sized(ty)
+ )),
}),
vec![rcvr])
}
IndexVec::new(),
None,
local_decls,
+ IndexVec::new(),
sig.inputs().len(),
vec![],
span,
IndexVec::new(),
None,
local_decls,
+ IndexVec::new(),
sig.inputs().len(),
vec![],
span,