Remove unnecessary sigils around Symbol::as_str()
calls.
This commit is contained in:
parent
8cddcd39ba
commit
056d48a2c9
104 changed files with 189 additions and 192 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue