]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #8007 - birkenfeld:octal_escapes, r=xFrednet
authorbors <bors@rust-lang.org>
Mon, 22 Nov 2021 20:29:53 +0000 (20:29 +0000)
committerbors <bors@rust-lang.org>
Mon, 22 Nov 2021 20:29:53 +0000 (20:29 +0000)
Add new lint `octal_escapes`

This checks for sequences in strings that would be octal character
escapes in C, but are not supported in Rust.  It suggests either
to use the `\x00` escape, or an equivalent hex escape if the octal
was intended.

Fixes #7981

---

*Please write a short comment explaining your change (or "none" for internal only changes)*

changelog: Add new lint [`octal_escapes`], which checks for literals like `"\033[0m"`.


Trivial merge