Rollup merge of #80784 - petrochenkov:nontspan, r=Aaron1011
rustc_parse: Better spans for synthesized token streams I think using the nonterminal span for synthesizing its tokens is a better approximation than using `DUMMY_SP` or the attribute span like #79472 did in `expand.rs`. r? `@Aaron1011`
This commit is contained in:
commit
695f878332
9 changed files with 151 additions and 167 deletions
|
@ -771,7 +771,7 @@ impl fmt::Display for NonterminalKind {
|
|||
}
|
||||
|
||||
impl Nonterminal {
|
||||
fn span(&self) -> Span {
|
||||
pub fn span(&self) -> Span {
|
||||
match self {
|
||||
NtItem(item) => item.span,
|
||||
NtBlock(block) => block.span,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue