Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

annotate-snippet emitter: Deal with multispans in macros correctly #61810

Closed
phansch opened this issue Jun 13, 2019 · 1 comment · Fixed by #64189
Closed

annotate-snippet emitter: Deal with multispans in macros correctly #61810

phansch opened this issue Jun 13, 2019 · 1 comment · Fixed by #64189
Labels
A-diagnostics Area: Messages for errors, warnings, and lints E-help-wanted Call for participation: Help is requested to fix this issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@phansch
Copy link
Member

phansch commented Jun 13, 2019

Part of #59346

To properly handle macro spans in diagnostics output, we have to decouple some emitter.rs code first.

Relevant FIXME:

// FIXME(#59346): Add `fix_multispans_in_std_macros` function from emitter.rs

emitter.rs equivalent:

fn fix_multispans_in_std_macros(&mut self,

  • We first have to decouple the fix_multispans_in_std_macros
    method from EmitterWriter so that the code can be re-used in
    AnnotateSnippetEmitterWriter without duplicating it.
@phansch

This comment has been minimized.

@rustbot rustbot added A-diagnostics Area: Messages for errors, warnings, and lints E-help-wanted Call for participation: Help is requested to fix this issue. labels Jun 13, 2019
@estebank estebank added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Aug 27, 2019
Centril added a commit to Centril/rust that referenced this issue Sep 6, 2019
annotate-snippet emitter: Deal with multispans from macros, too

This moves the two methods from the `EmitterWriter` impl to trait
default methods in the `Emitter` trait so that they can be re-used by
the `AnnotateSnippetEmitterWriter`.

r? @estebank

Closes rust-lang#61810
Centril added a commit to Centril/rust that referenced this issue Sep 6, 2019
annotate-snippet emitter: Deal with multispans from macros, too

This moves the two methods from the `EmitterWriter` impl to trait
default methods in the `Emitter` trait so that they can be re-used by
the `AnnotateSnippetEmitterWriter`.

r? @estebank

Closes rust-lang#61810
@bors bors closed this as completed in 159d249 Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints E-help-wanted Call for participation: Help is requested to fix this issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants