about summary refs log tree commit diff
path: root/compiler/rustc_ast/src/util
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2021-12-03 03:06:36 +0100
committerest31 <MTest31@outlook.com>2021-12-09 00:01:29 +0100
commit15de4cbc4b49be2fbf082fe02f877d5f774569a5 (patch)
tree185c0d685770003282b3797223288a765c2b21cb /compiler/rustc_ast/src/util
parente6b883c74f49f32cb5d1cbad3457f2b8805a4a38 (diff)
downloadrust-15de4cbc4b49be2fbf082fe02f877d5f774569a5.tar.gz
rust-15de4cbc4b49be2fbf082fe02f877d5f774569a5.zip
Remove redundant [..]s
Diffstat (limited to 'compiler/rustc_ast/src/util')
-rw-r--r--compiler/rustc_ast/src/util/literal.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_ast/src/util/literal.rs b/compiler/rustc_ast/src/util/literal.rs
index 9c6ad47427d..8a41aec0819 100644
--- a/compiler/rustc_ast/src/util/literal.rs
+++ b/compiler/rustc_ast/src/util/literal.rs
@@ -57,7 +57,7 @@ impl LitKind {
                 // string in the token.
                 let s = symbol.as_str();
                 let symbol =
-                    if s.contains(&['\\', '\r'][..]) {
+                    if s.contains(&['\\', '\r']) {
                         let mut buf = String::with_capacity(s.len());
                         let mut error = Ok(());
                         unescape_literal(&s, Mode::Str, &mut |_, unescaped_char| {