mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
125 lines
3.1 KiB
Plaintext
125 lines
3.1 KiB
Plaintext
error: using `str.trim().split()` with hard-coded newlines
|
|
--> tests/ui/str_split.rs:58:13
|
|
|
|
|
LL | let _ = s1.trim().split('\n');
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: `-D clippy::str-split-at-newline` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::str_split_at_newline)]`
|
|
help: use `str.lines()` instead
|
|
|
|
|
LL - let _ = s1.trim().split('\n');
|
|
LL + let _ = s1.lines();
|
|
|
|
|
|
|
error: using `str.trim().split()` with hard-coded newlines
|
|
--> tests/ui/str_split.rs:61:13
|
|
|
|
|
LL | let _ = s1.trim().split("\n");
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
help: use `str.lines()` instead
|
|
|
|
|
LL - let _ = s1.trim().split("\n");
|
|
LL + let _ = s1.lines();
|
|
|
|
|
|
|
error: using `str.trim().split()` with hard-coded newlines
|
|
--> tests/ui/str_split.rs:63:13
|
|
|
|
|
LL | let _ = s1.trim().split("\r\n");
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
help: use `str.lines()` instead
|
|
|
|
|
LL - let _ = s1.trim().split("\r\n");
|
|
LL + let _ = s1.lines();
|
|
|
|
|
|
|
error: using `str.trim().split()` with hard-coded newlines
|
|
--> tests/ui/str_split.rs:67:13
|
|
|
|
|
LL | let _ = s2.trim().split('\n');
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
help: use `str.lines()` instead
|
|
|
|
|
LL - let _ = s2.trim().split('\n');
|
|
LL + let _ = s2.lines();
|
|
|
|
|
|
|
error: using `str.trim().split()` with hard-coded newlines
|
|
--> tests/ui/str_split.rs:70:13
|
|
|
|
|
LL | let _ = s2.trim().split("\n");
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
help: use `str.lines()` instead
|
|
|
|
|
LL - let _ = s2.trim().split("\n");
|
|
LL + let _ = s2.lines();
|
|
|
|
|
|
|
error: using `str.trim().split()` with hard-coded newlines
|
|
--> tests/ui/str_split.rs:72:13
|
|
|
|
|
LL | let _ = s2.trim().split("\r\n");
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
help: use `str.lines()` instead
|
|
|
|
|
LL - let _ = s2.trim().split("\r\n");
|
|
LL + let _ = s2.lines();
|
|
|
|
|
|
|
error: using `str.trim().split()` with hard-coded newlines
|
|
--> tests/ui/str_split.rs:77:13
|
|
|
|
|
LL | let _ = s3.trim().split('\n');
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
help: use `str.lines()` instead
|
|
|
|
|
LL - let _ = s3.trim().split('\n');
|
|
LL + let _ = s3.lines();
|
|
|
|
|
|
|
error: using `str.trim().split()` with hard-coded newlines
|
|
--> tests/ui/str_split.rs:80:13
|
|
|
|
|
LL | let _ = s3.trim().split("\n");
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
help: use `str.lines()` instead
|
|
|
|
|
LL - let _ = s3.trim().split("\n");
|
|
LL + let _ = s3.lines();
|
|
|
|
|
|
|
error: using `str.trim().split()` with hard-coded newlines
|
|
--> tests/ui/str_split.rs:82:13
|
|
|
|
|
LL | let _ = s3.trim().split("\r\n");
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
help: use `str.lines()` instead
|
|
|
|
|
LL - let _ = s3.trim().split("\r\n");
|
|
LL + let _ = s3.lines();
|
|
|
|
|
|
|
error: using `str.trim().split()` with hard-coded newlines
|
|
--> tests/ui/str_split.rs:86:13
|
|
|
|
|
LL | let _ = make_str!(s1).trim().split('\n');
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
help: use `str.lines()` instead
|
|
|
|
|
LL - let _ = make_str!(s1).trim().split('\n');
|
|
LL + let _ = make_str!(s1).lines();
|
|
|
|
|
|
|
error: aborting due to 10 previous errors
|
|
|