// lifetimes shouldn't end with a single quote
// if we find one, then this is an invalid character literal
if self.ch_is('\'') {
- self.fatal_span_verbose(start_with_quote, self.next_pos,
- String::from("character literal may only contain one codepoint"))
- .raise();
+ self.err_span_(start_with_quote, self.next_pos,
+ "character literal may only contain one codepoint");
+ self.bump();
+ return Ok(token::Literal(token::Err(Symbol::intern("??")), None))
}
format!("\"{}\"", &self.src[start..end]),
Applicability::MachineApplicable
).emit();
- return Ok(token::Literal(token::Char(Symbol::intern("??")), None))
+ return Ok(token::Literal(token::Err(Symbol::intern("??")), None))
}
if self.ch_is('\n') || self.is_eof() || self.ch_is('/') {
// Only attempt to infer single line string literals. If we encounter
}
}
- self.fatal_span_verbose(start_with_quote, pos,
- String::from("character literal may only contain one codepoint")).raise();
+ self.err_span_(start_with_quote, pos,
+ "character literal may only contain one codepoint");
+ self.bump();
}
let id = if valid {