mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
Update ui tests
This commit is contained in:
parent
40cff2d99f
commit
a1971414ec
@ -4,7 +4,8 @@
|
||||
clippy::result_filter_map,
|
||||
clippy::needless_borrow,
|
||||
clippy::option_filter_map,
|
||||
clippy::redundant_closure
|
||||
clippy::redundant_closure,
|
||||
clippy::unnecessary_get_then_check
|
||||
)]
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
@ -4,7 +4,8 @@
|
||||
clippy::result_filter_map,
|
||||
clippy::needless_borrow,
|
||||
clippy::option_filter_map,
|
||||
clippy::redundant_closure
|
||||
clippy::redundant_closure,
|
||||
clippy::unnecessary_get_then_check
|
||||
)]
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
@ -1,5 +1,5 @@
|
||||
error: `filter` for `is_some` on iterator over `Option`
|
||||
--> tests/ui/iter_filter_is_some.rs:14:58
|
||||
--> tests/ui/iter_filter_is_some.rs:15:58
|
||||
|
|
||||
LL | let _ = vec![Some(1), None, Some(3)].into_iter().filter(Option::is_some);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `flatten` instead: `flatten()`
|
||||
@ -8,55 +8,55 @@ LL | let _ = vec![Some(1), None, Some(3)].into_iter().filter(Option::is_
|
||||
= help: to override `-D warnings` add `#[allow(clippy::iter_filter_is_some)]`
|
||||
|
||||
error: `filter` for `is_some` on iterator over `Option`
|
||||
--> tests/ui/iter_filter_is_some.rs:16:58
|
||||
--> tests/ui/iter_filter_is_some.rs:17:58
|
||||
|
|
||||
LL | let _ = vec![Some(1), None, Some(3)].into_iter().filter(|a| a.is_some());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `flatten` instead: `flatten()`
|
||||
|
||||
error: `filter` for `is_some` on iterator over `Option`
|
||||
--> tests/ui/iter_filter_is_some.rs:19:58
|
||||
--> tests/ui/iter_filter_is_some.rs:20:58
|
||||
|
|
||||
LL | let _ = vec![Some(1), None, Some(3)].into_iter().filter(|o| { o.is_some() });
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `flatten` instead: `flatten()`
|
||||
|
||||
error: `filter` for `is_some` on iterator over `Option`
|
||||
--> tests/ui/iter_filter_is_some.rs:26:14
|
||||
--> tests/ui/iter_filter_is_some.rs:27:14
|
||||
|
|
||||
LL | .filter(std::option::Option::is_some);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `flatten` instead: `flatten()`
|
||||
|
||||
error: `filter` for `is_some` on iterator over `Option`
|
||||
--> tests/ui/iter_filter_is_some.rs:31:14
|
||||
--> tests/ui/iter_filter_is_some.rs:32:14
|
||||
|
|
||||
LL | .filter(|a| std::option::Option::is_some(a));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `flatten` instead: `flatten()`
|
||||
|
||||
error: `filter` for `is_some` on iterator over `Option`
|
||||
--> tests/ui/iter_filter_is_some.rs:34:58
|
||||
--> tests/ui/iter_filter_is_some.rs:35:58
|
||||
|
|
||||
LL | let _ = vec![Some(1), None, Some(3)].into_iter().filter(|a| { std::option::Option::is_some(a) });
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `flatten` instead: `flatten()`
|
||||
|
||||
error: `filter` for `is_some` on iterator over `Option`
|
||||
--> tests/ui/iter_filter_is_some.rs:39:58
|
||||
--> tests/ui/iter_filter_is_some.rs:40:58
|
||||
|
|
||||
LL | let _ = vec![Some(1), None, Some(3)].into_iter().filter(|&a| a.is_some());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `flatten` instead: `flatten()`
|
||||
|
||||
error: `filter` for `is_some` on iterator over `Option`
|
||||
--> tests/ui/iter_filter_is_some.rs:43:58
|
||||
--> tests/ui/iter_filter_is_some.rs:44:58
|
||||
|
|
||||
LL | let _ = vec![Some(1), None, Some(3)].into_iter().filter(|&o| { o.is_some() });
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `flatten` instead: `flatten()`
|
||||
|
||||
error: `filter` for `is_some` on iterator over `Option`
|
||||
--> tests/ui/iter_filter_is_some.rs:48:58
|
||||
--> tests/ui/iter_filter_is_some.rs:49:58
|
||||
|
|
||||
LL | let _ = vec![Some(1), None, Some(3)].into_iter().filter(|ref a| a.is_some());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `flatten` instead: `flatten()`
|
||||
|
||||
error: `filter` for `is_some` on iterator over `Option`
|
||||
--> tests/ui/iter_filter_is_some.rs:52:58
|
||||
--> tests/ui/iter_filter_is_some.rs:53:58
|
||||
|
|
||||
LL | let _ = vec![Some(1), None, Some(3)].into_iter().filter(|ref o| { o.is_some() });
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `flatten` instead: `flatten()`
|
||||
|
Loading…
Reference in New Issue
Block a user