about summary refs log tree commit diff
path: root/compiler/rustc_parse/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-07-24 07:48:04 +0000
committerbors <bors@rust-lang.org>2023-07-24 07:48:04 +0000
commit155a5c2862c2939aa8464456ca9f358fbb213005 (patch)
tree8dbb005d85f43380be22df2c80bd1337bf1f75d5 /compiler/rustc_parse/src
parentbccefd280755e52b60d721bb6e5ff2556180a57b (diff)
parentaf2b370100cdc1767772af738a3259875bba38f3 (diff)
downloadrust-155a5c2862c2939aa8464456ca9f358fbb213005.tar.gz
rust-155a5c2862c2939aa8464456ca9f358fbb213005.zip
Auto merge of #113978 - matthiaskrgr:clippy_072023_style, r=fee1-dead
couple of clippy::style changes

    comparison_to_empty
    iter_nth_zero
    for_kv_map
    manual_next_back
    redundant_pattern

    get_first
    single_char_add_str
    unnecessary_mut_passed
    manual_map
    manual_is_ascii_check
Diffstat (limited to 'compiler/rustc_parse/src')
-rw-r--r--compiler/rustc_parse/src/lexer/unescape_error_reporting.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/lexer/unescape_error_reporting.rs b/compiler/rustc_parse/src/lexer/unescape_error_reporting.rs
index 461a34b67db..d1f852b1a40 100644
--- a/compiler/rustc_parse/src/lexer/unescape_error_reporting.rs
+++ b/compiler/rustc_parse/src/lexer/unescape_error_reporting.rs
@@ -27,7 +27,7 @@ pub(crate) fn emit_unescape_error(
         lit, span_with_quotes, mode, range, error
     );
     let last_char = || {
-        let c = lit[range.clone()].chars().rev().next().unwrap();
+        let c = lit[range.clone()].chars().next_back().unwrap();
         let span = span.with_lo(span.hi() - BytePos(c.len_utf8() as u32));
         (c, span)
     };