Skip to content

Commit f877fa5

Browse files
committed
8733: Make docs more precise and add description of known problems
1 parent 9ae9164 commit f877fa5

File tree

1 file changed

+6
-1
lines changed
  • clippy_lints/src/methods

1 file changed

+6
-1
lines changed

clippy_lints/src/methods/mod.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3784,7 +3784,7 @@ declare_clippy_lint! {
37843784
///
37853785
/// ### Why is this bad?
37863786
///
3787-
/// Hard-coding the line endings makes the code less portable. `str.lines` should be used instead.
3787+
/// Hard-coding the line endings makes the code less compatible. `str.lines` should be used instead.
37883788
///
37893789
/// ### Example
37903790
/// ```no_run
@@ -3793,6 +3793,11 @@ declare_clippy_lint! {
37933793
/// Use instead:
37943794
/// ```no_run
37953795
/// "some\ntext\nwith\nnewlines\n".lines();
3796+
///
3797+
/// ### Known Problems
3798+
///
3799+
/// This lint cannot detect if the split is intentionally restricted to a single type of newline (`\n` or `\r\n`),
3800+
/// for example during the parsing of a specific file format in which precisely one newline type is valid.
37963801
/// ```
37973802
#[clippy::version = "1.76.0"]
37983803
pub STR_SPLIT_AT_NEWLINE,

0 commit comments

Comments
 (0)