diff options
| author | est31 <MTest31@outlook.com> | 2021-12-03 03:06:36 +0100 |
|---|---|---|
| committer | est31 <MTest31@outlook.com> | 2021-12-09 00:01:29 +0100 |
| commit | 15de4cbc4b49be2fbf082fe02f877d5f774569a5 (patch) | |
| tree | 185c0d685770003282b3797223288a765c2b21cb /compiler/rustc_parse/src | |
| parent | e6b883c74f49f32cb5d1cbad3457f2b8805a4a38 (diff) | |
| download | rust-15de4cbc4b49be2fbf082fe02f877d5f774569a5.tar.gz rust-15de4cbc4b49be2fbf082fe02f877d5f774569a5.zip | |
Remove redundant [..]s
Diffstat (limited to 'compiler/rustc_parse/src')
| -rw-r--r-- | compiler/rustc_parse/src/parser/diagnostics.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_parse/src/parser/diagnostics.rs b/compiler/rustc_parse/src/parser/diagnostics.rs index 8e2e6eaee58..25beed1ecf9 100644 --- a/compiler/rustc_parse/src/parser/diagnostics.rs +++ b/compiler/rustc_parse/src/parser/diagnostics.rs @@ -306,7 +306,7 @@ impl<'a> Parser<'a> { } } - let expect = tokens_to_string(&expected[..]); + let expect = tokens_to_string(&expected); let actual = super::token_descr(&self.token); let (msg_exp, (label_sp, label_exp)) = if expected.len() > 1 { let short_expect = if expected.len() > 6 { @@ -909,7 +909,7 @@ impl<'a> Parser<'a> { // So far we have parsed `foo<bar<`, consume the rest of the type args. let modifiers = [(token::Lt, 1), (token::Gt, -1), (token::BinOp(token::Shr), -2)]; - self.consume_tts(1, &modifiers[..]); + self.consume_tts(1, &modifiers); if !&[token::OpenDelim(token::Paren), token::ModSep] .contains(&self.token.kind) @@ -1001,7 +1001,7 @@ impl<'a> Parser<'a> { // Consume the fn call arguments. let modifiers = [(token::OpenDelim(token::Paren), 1), (token::CloseDelim(token::Paren), -1)]; - self.consume_tts(1, &modifiers[..]); + self.consume_tts(1, &modifiers); if self.token.kind == token::Eof { // Not entirely sure that what we consumed were fn arguments, rollback. |
