fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
853 B26 linesraw
1error: methods called `new` usually return `Self`
2  --> $DIR/methods.rs:103:5
3   |
4LL | /     fn new() -> i32 {
5LL | |         0
6LL | |     }
7   | |_____^
8   |
9   = note: `-D clippy::new-ret-no-self` implied by `-D warnings`
10   = help: to override `-D warnings` add `#[allow(clippy::new_ret_no_self)]`
11
12error: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead
13  --> $DIR/methods.rs:124:13
14   |
15LL |       let _ = v.iter().filter(|&x| {
16   |  _____________^
17LL | |                                 *x < 0
18LL | |                             }
19LL | |                    ).next();
20   | |___________________________^
21   |
22   = note: `-D clippy::filter-next` implied by `-D warnings`
23   = help: to override `-D warnings` add `#[allow(clippy::filter_next)]`
24
25error: aborting due to 2 previous errors
26