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.