about summary refs log tree commit diff
path: root/src/librustc_errors/annotate_snippet_emitter_writer.rs
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-180/+0
2020-06-09Fix more clippy warningsMatthias Krüger-6/+2
Fixes more of: clippy::unused_unit clippy::op_ref clippy::useless_format clippy::needless_return clippy::useless_conversion clippy::bind_instead_of_map clippy::into_iter_on_ref clippy::redundant_clone clippy::nonminimal_bool clippy::redundant_closure clippy::option_as_ref_deref clippy::len_zero clippy::iter_cloned_collect clippy::filter_next
2020-05-16Fix make sure out primary file comes firstJuan Aguilar Santillana-2/+13
2020-05-08Update annotate-snippets-rs to 0.8.0Juan Aguilar Santillana-123/+81
2020-02-06rustc_errors: hide "in this macro invocation" when redundant, more explicitly.Eduard-Mihai Burtescu-1/+1
2020-02-06rustc: rename -Zexternal-macro-backtrace to -Zmacro-backtrace.Eduard-Mihai Burtescu-4/+4
2020-02-06rustc_errors: split macro backtrace rendering from <*macros> hacks.Eduard-Mihai Burtescu-1/+1
2020-01-16don't clone types that are copyMatthias Krüger-1/+1
found via clippy
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-2/+2
2019-12-22Format the worldMark Rousskov-65/+61
2019-11-15Remove SourceMapper traitMark Rousskov-5/+6
SourceMap is now in the root of all rustc-specific crates, syntax_pos, so there's no need for the trait object to decouple the dependencies between librustc_errors and libsyntax as was needed previously.
2019-10-15Refactor: Rename `db` locals to `diag`Philipp Hansch-7/+7
https://github.com/rust-lang/rust/pull/64272 replaced `DiagnosticBuilder` with `Diagnostic` in some places. This commit just renames the DB variable from `db` to `diag` where it wasn't renamed.
2019-10-13Bring attention to suggestions when the only difference is capitalizationEsteban Küber-0/+4
2019-09-17Replace DiagnosticBuilder with Diagnostic when emitting errorMark Rousskov-4/+8
2019-09-12Box `DiagnosticBuilder`.Nicholas Nethercote-1/+1
It's a large type -- 176 bytes on 64-bit. And it's passed around and returned from a lot of functions, including within PResult. This commit boxes it, which reduces memory traffic. In particular, `PResult` shrinks to 16 bytes in the best case; this reduces instruction counts by up to 2% on various workloads.
2019-09-06Rollup merge of #64206 - phansch:update_issue_number, r=varkorMazdak Farrokhzad-1/+1
annotate-snippet emitter: Update an issue number The tracking issue has been replaced by one with mentoring instructions (#64205).
2019-09-06annotate-snippet emitter: Update issue numberPhilipp Hansch-1/+1
The tracking issue has been replaced by one with mentoring instructions.
2019-09-05annotate-snippet emitter: Deal with multispans from macros, tooPhilipp Hansch-4/+8
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`. Closes #61810
2019-09-01librustc_errors: Extract sugg/subst handling into methodPhilipp Hansch-3/+1
An initial refactoring before working on #61809. This moves the whole block into a method so that it can be reused in the annotate-snippet output. It's already used in the new emitter, but there's no UI tests with suggestions included in this PR. A first look at some UI tests with suggestions showed that there's some more work to do in [annotate-snippet-rs][annotate-snippet-rs] before the new output is closer to the current one.
2019-08-14remove unused Level::PhaseFatalAleksey Kladov-1/+1
2019-07-25librustc_errors: Support ui-testing flag in annotate-snippet emitterPhilipp Hansch-6/+2
This adds support for the `-Z ui-testing` flag to the new annotate-snippet diagnostic emitter. The support for the flag was added to `annotate-snippet-rs` in these PRs: * https://github.com/rust-lang/annotate-snippets-rs/pull/3 * https://github.com/rust-lang/annotate-snippets-rs/pull/5 Closes #61811
2019-06-26Fix clippy::redundant_field_namesIgor Matuszewski-1/+1
2019-06-15Remove unnecessary `.clone()`Shotaro Yamada-1/+1
2019-06-05librustc_errors: Rename AnnotateRs -> AnnotateSnippetPhilipp Hansch-0/+212
The proper name of the library is `annotate-snippet`, not `annotate-rs`, this commit should get rid of any confusing `AnnotateRs` names. 1. Renames `annotate_rs_emitter.rs` to `annotate_snippet_emitter_writer.rs` so that the difference between the `Emitter` trait and the implementers is more clear. 2. Renames `AnnotateRsEmitterWriter` to `AnnotateSnippetEmitterWriter` 3. Renames `HumanReadableErrorType::AnnotateRs` to `HumanReadableErrorType::AnnotateSnippet`