From 4f69870d899817d08500558f998f1bab9d0a798d Mon Sep 17 00:00:00 2001 From: Philipp Hansch Date: Wed, 5 Dec 2018 07:39:30 +0100 Subject: [PATCH] Update UI test .stderr files --- tests/ui/collect.stderr | 6 +++--- tests/ui/filter_methods.stderr | 32 ++++++++++++++++---------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/tests/ui/collect.stderr b/tests/ui/collect.stderr index 8f474b0a48aa..7d890638a3a3 100644 --- a/tests/ui/collect.stderr +++ b/tests/ui/collect.stderr @@ -1,13 +1,13 @@ error: you are creating a collection of `Result`s --> $DIR/collect.rs:6:21 | -6 | let option_vec: Vec<_> = b.into_iter() +6 | let option_vec: Vec<_> = b.iter() | ^^^^^^ | - = note: `-D possible-shortcircuiting-collect` implied by `-D warnings` + = note: `-D clippy::possible-shortcircuiting-collect` implied by `-D warnings` help: if you are only interested in the case where all values are `Ok`, try | -6 | let option_vec: Result, _> = b.into_iter() +6 | let option_vec: Result, _> = b.iter() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: you are creating a collection of `Option`s diff --git a/tests/ui/filter_methods.stderr b/tests/ui/filter_methods.stderr index 6adbec44cf94..6cff2bd61ee5 100644 --- a/tests/ui/filter_methods.stderr +++ b/tests/ui/filter_methods.stderr @@ -1,39 +1,39 @@ error: called `filter(p).map(q)` on an `Iterator`. This is more succinctly expressed by calling `.filter_map(..)` instead. - --> $DIR/filter_methods.rs:18:21 + --> $DIR/filter_methods.rs:14:21 | -18 | let _: Vec<_> = vec![5; 6].into_iter() +14 | let _: Vec<_> = vec![5; 6].into_iter() | _____________________^ -19 | | .filter(|&x| x == 0) -20 | | .map(|x| x * 2) +15 | | .filter(|&x| x == 0) +16 | | .map(|x| x * 2) | |_____________________________________________^ | = note: `-D clippy::filter-map` implied by `-D warnings` error: called `filter(p).flat_map(q)` on an `Iterator`. This is more succinctly expressed by calling `.flat_map(..)` and filtering by returning an empty Iterator. - --> $DIR/filter_methods.rs:23:21 + --> $DIR/filter_methods.rs:19:21 | -23 | let _: Vec<_> = vec![5_i8; 6].into_iter() +19 | let _: Vec<_> = vec![5_i8; 6].into_iter() | _____________________^ -24 | | .filter(|&x| x == 0) -25 | | .flat_map(|x| x.checked_mul(2)) +20 | | .filter(|&x| x == 0) +21 | | .flat_map(|x| x.checked_mul(2)) | |_______________________________________________________________^ error: called `filter_map(p).flat_map(q)` on an `Iterator`. This is more succinctly expressed by calling `.flat_map(..)` and filtering by returning an empty Iterator. - --> $DIR/filter_methods.rs:28:21 + --> $DIR/filter_methods.rs:24:21 | -28 | let _: Vec<_> = vec![5_i8; 6].into_iter() +24 | let _: Vec<_> = vec![5_i8; 6].into_iter() | _____________________^ -29 | | .filter_map(|x| x.checked_mul(2)) -30 | | .flat_map(|x| x.checked_mul(2)) +25 | | .filter_map(|x| x.checked_mul(2)) +26 | | .flat_map(|x| x.checked_mul(2)) | |_______________________________________________________________^ error: called `filter_map(p).map(q)` on an `Iterator`. This is more succinctly expressed by only calling `.filter_map(..)` instead. - --> $DIR/filter_methods.rs:33:21 + --> $DIR/filter_methods.rs:29:21 | -33 | let _: Vec<_> = vec![5_i8; 6].into_iter() +29 | let _: Vec<_> = vec![5_i8; 6].into_iter() | _____________________^ -34 | | .filter_map(|x| x.checked_mul(2)) -35 | | .map(|x| x.checked_mul(2)) +30 | | .filter_map(|x| x.checked_mul(2)) +31 | | .map(|x| x.checked_mul(2)) | |__________________________________________________________^ error: aborting due to 4 previous errors