Add suggestion for bad block fragment error
This commit is contained in:
parent
04075b3202
commit
2cc7782cfd
5 changed files with 32 additions and 0 deletions
|
@ -2186,6 +2186,10 @@ impl<'a> Parser<'a> {
|
|||
self.sess.emit_err(errors::InvalidBlockMacroSegment {
|
||||
span: self.token.span,
|
||||
context: lo.to(self.token.span),
|
||||
wrap: errors::WrapInExplicitBlock {
|
||||
lo: self.token.span.shrink_to_lo(),
|
||||
hi: self.token.span.shrink_to_hi(),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue