diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2021-12-15 14:39:23 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2021-12-15 17:32:14 +1100 |
| commit | 056d48a2c97860b2cce936f310331e606076fa01 (patch) | |
| tree | c456e6021abf01fe5350f022926a9974795c071f /compiler/rustc_parse/src | |
| parent | 8cddcd39ba2189da859a5164804556190906ee2a (diff) | |
| download | rust-056d48a2c97860b2cce936f310331e606076fa01.tar.gz rust-056d48a2c97860b2cce936f310331e606076fa01.zip | |
Remove unnecessary sigils around `Symbol::as_str()` calls.
Diffstat (limited to 'compiler/rustc_parse/src')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index 8a2ef296c76..3eef6160b73 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -1608,7 +1608,7 @@ impl<'a> Parser<'a> { next_token.kind { if self.token.span.hi() == next_token.span.lo() { - let s = String::from("0.") + &symbol.as_str(); + let s = String::from("0.") + symbol.as_str(); let kind = TokenKind::lit(token::Float, Symbol::intern(&s), suffix); return Some(Token::new(kind, self.token.span.to(next_token.span))); } @@ -1698,7 +1698,7 @@ impl<'a> Parser<'a> { LitError::InvalidFloatSuffix => { let suf = suffix.expect("suffix error with no suffix"); let suf = suf.as_str(); - if looks_like_width_suffix(&['f'], &suf) { + if looks_like_width_suffix(&['f'], suf) { // If it looks like a width, try to be helpful. let msg = format!("invalid width `{}` for float literal", &suf[1..]); self.struct_span_err(span, &msg).help("valid widths are 32 and 64").emit(); |
