diff options
| author | David Tolnay <dtolnay@gmail.com> | 2018-11-21 01:58:27 -0800 |
|---|---|---|
| committer | David Tolnay <dtolnay@gmail.com> | 2018-11-21 03:11:22 -0800 |
| commit | e4be2b4e6411d1b144305adab6b8874d7d3448d9 (patch) | |
| tree | 545aa2a3c8ffef90fb9159630e8f089b7f89e801 /tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-abort.diff | |
| parent | 64ff255ac63856c1dfe2021a62349984e4039788 (diff) | |
| download | rust-e4be2b4e6411d1b144305adab6b8874d7d3448d9.tar.gz rust-e4be2b4e6411d1b144305adab6b8874d7d3448d9.zip | |
Downgrade needless_pass_by_value to allow by default
I noticed that I suppress this lint in many of my projects.
https://github.com/search?q=needless_pass_by_value+user%3Adtolnay&type=Code
https://github.com/search?q=needless_pass_by_value+user%3Aserde-rs&type=Code
Upon further inspection, this lint has a *long* history of false
positives (and several remaining).
Generally I feel that this lint is the definition of pedantic and should
not be linted by default.
#[derive(Debug)]
enum How {
ThisWay,
ThatWay,
}
// Are we really better off forcing the call sites to write f(&_)...?
fn f(how: How) {
println!("You want to do it {:?}", how);
}
fn main() {
f(How::ThatWay);
}
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-abort.diff')
0 files changed, 0 insertions, 0 deletions
