2023-05-05 15:45:49 +00:00
|
|
|
error: you seem to be trying to pop elements from a `Vec` in a loop
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/manual_while_let_some.rs:21:9
|
2023-05-05 15:45:49 +00:00
|
|
|
|
|
|
|
|
LL | let number = numbers.pop().unwrap();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::manual-while-let-some` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::manual_while_let_some)]`
|
2023-05-05 15:45:49 +00:00
|
|
|
help: consider using a `while..let` loop
|
|
|
|
|
|
|
|
|
LL ~ while let Some(number) = numbers.pop() {
|
|
|
|
LL ~
|
|
|
|
|
|
|
|
|
|
|
|
|
error: you seem to be trying to pop elements from a `Vec` in a loop
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/manual_while_let_some.rs:29:9
|
2023-05-05 15:45:49 +00:00
|
|
|
|
|
|
|
|
LL | let number = val.numbers.pop().unwrap();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: consider using a `while..let` loop
|
|
|
|
|
|
|
|
|
LL ~ while let Some(number) = val.numbers.pop() {
|
|
|
|
LL ~
|
|
|
|
|
|
|
|
|
|
|
|
|
error: you seem to be trying to pop elements from a `Vec` in a loop
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/manual_while_let_some.rs:33:20
|
2023-05-05 15:45:49 +00:00
|
|
|
|
|
|
|
|
LL | accept_i32(numbers.pop().unwrap());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: consider using a `while..let` loop
|
|
|
|
|
|
|
|
|
LL ~ while let Some(element) = numbers.pop() {
|
|
|
|
LL ~ accept_i32(element);
|
|
|
|
|
|
|
|
|
|
|
|
|
error: you seem to be trying to pop elements from a `Vec` in a loop
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/manual_while_let_some.rs:37:20
|
2023-05-05 15:45:49 +00:00
|
|
|
|
|
|
|
|
LL | accept_i32(numbers.pop().expect(""));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: consider using a `while..let` loop
|
|
|
|
|
|
|
|
|
LL ~ while let Some(element) = numbers.pop() {
|
|
|
|
LL ~ accept_i32(element);
|
|
|
|
|
|
|
|
|
|
|
|
|
error: you seem to be trying to pop elements from a `Vec` in a loop
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/manual_while_let_some.rs:80:9
|
2023-05-05 15:45:49 +00:00
|
|
|
|
|
|
|
|
LL | let (a, b) = numbers.pop().unwrap();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: consider using a `while..let` loop
|
|
|
|
|
|
|
|
|
LL ~ while let Some((a, b)) = numbers.pop() {
|
|
|
|
LL ~
|
|
|
|
|
|
|
|
|
|
|
|
|
error: you seem to be trying to pop elements from a `Vec` in a loop
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/manual_while_let_some.rs:84:26
|
2023-05-05 15:45:49 +00:00
|
|
|
|
|
|
|
|
LL | accept_i32_tuple(numbers.pop().unwrap());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: consider using a `while..let` loop
|
|
|
|
|
|
|
|
|
LL ~ while let Some(element) = numbers.pop() {
|
|
|
|
LL ~ accept_i32_tuple(element);
|
|
|
|
|
|
|
|
|
|
|
|
|
error: you seem to be trying to pop elements from a `Vec` in a loop
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/manual_while_let_some.rs:89:9
|
2023-05-05 15:45:49 +00:00
|
|
|
|
|
|
|
|
LL | let Foo { a, b } = results.pop().unwrap();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: consider using a `while..let` loop
|
|
|
|
|
|
|
|
|
LL ~ while let Some(Foo { a, b }) = results.pop() {
|
|
|
|
LL ~
|
|
|
|
|
|
|
|
|
|
|
|
|
error: aborting due to 7 previous errors
|
|
|
|
|