Open
Description
Part of #59346
In order for the new AnnotateSnippetEmitterWriter
to include suggestions in the output, we essentially have to pass &db.suggestions
to emit_messages_default
and deal with a couple of edge-cases.
Relevant FIXME
:
rust/src/librustc_errors/annotate_snippet_emitter_writer.rs
Lines 35 to 36 in 57a3300
emitter.rs
equivalent:
rust/src/librustc_errors/emitter.rs
Lines 84 to 115 in 0e4a56b
- The tricky part is figuring out the first half of the conditional. We probably need it in the new emitter, too. Is it enough to just copy it over? Maybe extract that code so that the code is shared in both emitters?
- Otherwise it's just passing
&db.suggestions
through - Should take into account the MAX_SUGGESTIONS value somewhere (add a UI test for this)
This issue has been assigned to @phansch via this comment.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
phansch commentedon Jun 13, 2019
[-]annotate_snippet emitter: Include suggestions in output[/-][+]annotate-snippet emitter: Include suggestions in output[/+]phansch commentedon Jun 13, 2019
phansch commentedon Aug 31, 2019
@rustbot claim
librustc_errors: Extract sugg/subst handling into method
Rollup merge of rust-lang#64058 - phansch:refactor_out_method, r=este…
Rollup merge of rust-lang#64058 - phansch:refactor_out_method, r=este…
Rollup merge of rust-lang#64058 - phansch:refactor_out_method, r=este…
Rollup merge of rust-lang#64058 - phansch:refactor_out_method, r=este…
6 remaining items