do not allow rustc::pass_by_value lint
This commit is contained in:
parent
c04106f9f1
commit
7d9130f3b9
1 changed files with 4 additions and 6 deletions
|
|
@ -192,10 +192,9 @@ macro_rules! make_mir_visitor {
|
|||
self.super_constant(constant, location);
|
||||
}
|
||||
|
||||
#[allow(rustc::pass_by_value)]
|
||||
fn visit_ty_const(
|
||||
&mut self,
|
||||
ct: & $($mutability)? ty::Const<'tcx>,
|
||||
ct: $( & $mutability)? ty::Const<'tcx>,
|
||||
location: Location,
|
||||
) {
|
||||
self.super_ty_const(ct, location);
|
||||
|
|
@ -636,7 +635,7 @@ macro_rules! make_mir_visitor {
|
|||
|
||||
Rvalue::Repeat(value, ct) => {
|
||||
self.visit_operand(value, location);
|
||||
self.visit_ty_const(ct, location);
|
||||
self.visit_ty_const($(&$mutability)? *ct, location);
|
||||
}
|
||||
|
||||
Rvalue::ThreadLocalRef(_) => {}
|
||||
|
|
@ -888,16 +887,15 @@ macro_rules! make_mir_visitor {
|
|||
self.visit_span($(& $mutability)? *span);
|
||||
drop(user_ty); // no visit method for this
|
||||
match literal {
|
||||
ConstantKind::Ty(ct) => self.visit_ty_const(ct, location),
|
||||
ConstantKind::Ty(ct) => self.visit_ty_const($(&$mutability)? *ct, location),
|
||||
ConstantKind::Val(_, ty) => self.visit_ty($(& $mutability)? *ty, TyContext::Location(location)),
|
||||
ConstantKind::Unevaluated(_, ty) => self.visit_ty($(& $mutability)? *ty, TyContext::Location(location)),
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(rustc::pass_by_value)]
|
||||
fn super_ty_const(
|
||||
&mut self,
|
||||
_ct: & $($mutability)? ty::Const<'tcx>,
|
||||
_ct: $(& $mutability)? ty::Const<'tcx>,
|
||||
_location: Location,
|
||||
) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue