Enable rustc_pass_by_value for Span
This commit is contained in:
parent
22c3a71de1
commit
76b13c9eea
8 changed files with 28 additions and 22 deletions
|
@ -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) {
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue