]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/write.rs
Add 'library/portable-simd/' from commit '1ce1c645cf27c4acdefe6ec8a11d1f0491954a99'
[rust.git] / src / tools / clippy / clippy_lints / src / write.rs
index 4553ac704a28fff86690c069cf17ac3be49ca532..85d1f65c51f0911aaf1ab76ffb36ce496a759536 100644 (file)
@@ -299,7 +299,7 @@ fn is_build_script(cx: &EarlyContext<'_>) -> bool {
                     let nl_span = match (dest, only_nl) {
                         // Special case of `write!(buf, "\n")`: Mark everything from the end of
                         // `buf` for removal so no trailing comma [`writeln!(buf, )`] remains.
-                        (Some(dest_expr), true) => Span::new(dest_expr.span.hi(), nl_span.hi(), nl_span.ctxt()),
+                        (Some(dest_expr), true) => nl_span.with_lo(dest_expr.span.hi()),
                         _ => nl_span,
                     };
                     span_lint_and_then(