mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Shrink ra_parser::Event from 32 bytes to 16 bytes
This boxes the Error variant with the assumption that it is rarely constructed
This commit is contained in:
parent
ebaa05a447
commit
ef6d53521f
3 changed files with 3 additions and 3 deletions
|
@ -192,7 +192,7 @@ impl<'t> Parser<'t> {
|
|||
/// structured errors with spans and notes, like rustc
|
||||
/// does.
|
||||
pub(crate) fn error<T: Into<String>>(&mut self, message: T) {
|
||||
let msg = ParseError(message.into());
|
||||
let msg = ParseError(Box::new(message.into()));
|
||||
self.push_event(Event::Error { msg })
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue