Rustup
Signed-off-by: Mateusz Mikuła <mati865@gmail.com>
This commit is contained in:
parent
f7b2578aea
commit
fd6542d0de
@ -51,7 +51,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnportableVariant {
|
||||
for var in &def.variants {
|
||||
let variant = &var.node;
|
||||
if let Some(body_id) = variant.disr_expr {
|
||||
let param_env = ty::ParamEnv::empty(traits::Reveal::UserFacing);
|
||||
let param_env = ty::ParamEnv::empty();
|
||||
let did = cx.tcx.hir.body_owner_def_id(body_id);
|
||||
let substs = Substs::identity_for_item(cx.tcx.global_tcx(), did);
|
||||
let instance = ty::Instance::new(did, substs);
|
||||
|
@ -205,7 +205,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NeedlessPassByValue {
|
||||
let sugg = |db: &mut DiagnosticBuilder| {
|
||||
if let ty::TypeVariants::TyAdt(ref def, ..) = ty.sty {
|
||||
if let Some(span) = cx.tcx.hir.span_if_local(def.did) {
|
||||
let param_env = ty::ParamEnv::empty(traits::Reveal::UserFacing);
|
||||
let param_env = ty::ParamEnv::empty();
|
||||
if param_env.can_type_implement_copy(cx.tcx, ty, span).is_ok() {
|
||||
db.span_help(span, "consider marking this type as Copy");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user