diff options
| author | Eduardo Broto <ebroto@tutanota.com> | 2020-10-31 09:33:40 +0100 |
|---|---|---|
| committer | Eduardo Broto <ebroto@tutanota.com> | 2020-10-31 09:33:40 +0100 |
| commit | 9d73371663ec67558700b43a55d606caa71a7f71 (patch) | |
| tree | be08801aa67ac6c18a669003823d285e0933ad83 /tests/ui/methods_fixable.fixed | |
| parent | 1c8c3d14ef6f9ab297103c526ba4b6023822aa87 (diff) | |
| parent | 084b203988e04bcf89d3b2d6bbc77b65ecfab553 (diff) | |
| download | rust-9d73371663ec67558700b43a55d606caa71a7f71.tar.gz rust-9d73371663ec67558700b43a55d606caa71a7f71.zip | |
Merge remote-tracking branch 'upstream/master' into rustup
Diffstat (limited to 'tests/ui/methods_fixable.fixed')
| -rw-r--r-- | tests/ui/methods_fixable.fixed | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/methods_fixable.fixed b/tests/ui/methods_fixable.fixed new file mode 100644 index 00000000000..ee7c1b0da6d --- /dev/null +++ b/tests/ui/methods_fixable.fixed @@ -0,0 +1,11 @@ +// run-rustfix + +#![warn(clippy::filter_next)] + +/// Checks implementation of `FILTER_NEXT` lint. +fn main() { + let v = vec![3, 2, 1, 0, -1, -2, -3]; + + // Single-line case. + let _ = v.iter().find(|&x| *x < 0); +} |
