1
Fork 0

Enable rustc_pass_by_value for Span

This commit is contained in:
Mark Rousskov 2022-02-23 08:11:17 -05:00
parent 22c3a71de1
commit 76b13c9eea
8 changed files with 28 additions and 22 deletions

View file

@ -162,6 +162,9 @@ macro_rules! make_mir_visitor {
self.super_constant(constant, location);
}
// The macro results in a false positive of sorts, where &mut Span
// is fine, but &Span is not; just allow the lint.
#[allow(rustc::pass_by_value)]
fn visit_span(&mut self,
span: & $($mutability)? Span) {
self.super_span(span);
@ -869,6 +872,9 @@ macro_rules! make_mir_visitor {
}
}
// The macro results in a false positive of sorts, where &mut Span
// is fine, but &Span is not; just allow the lint.
#[allow(rustc::pass_by_value)]
fn super_span(&mut self, _span: & $($mutability)? Span) {
}