about summary refs log tree commit diff
path: root/src/librustc_errors/diagnostic_builder.rs
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-452/+0
2020-08-18Rollup merge of #75389 - RalfJung:span_label, r=davidtwcoYuki Okushi-5/+9
attempt to improve span_label docs I was still confused by the `span_label` docs, so I did some more digging. However, this needs careful checking as I have no idea if any of this is correct.
2020-08-17attempt to improve span_label docsRalf Jung-5/+9
2020-08-15replaced log with tracingGurpreet Singh-1/+1
2020-06-10On recursive ADT, provide indirection structured suggestionEsteban Küber-0/+13
2020-03-29Suggest correct order for arguments when encountering early constraintsEsteban Küber-0/+14
When encountering constraints before type arguments or lifetimes, suggest the correct order.
2020-03-22remove redundant closures (clippy::redundant_closure)Matthias Krüger-1/+1
2020-03-02Fix a leak in `DiagnosticBuilder::into_diagnostic`.Nicholas Nethercote-6/+5
Fixes #69600.
2020-02-11Run RustFmtjumbatm-1/+5
2020-02-11Invert control in struct_lint_level.jumbatm-1/+2
Caller now passes in a `decorate` function, which is only run if the lint is allowed.
2020-02-02introduce `#![feature(move_ref_pattern)]`Mazdak Farrokhzad-1/+15
2020-01-18remove rustc_error_codes deps except in rustc_driverMazdak Farrokhzad-4/+1
2020-01-08- remove syntax::{span_warn!, span_err!, span_fatal!. struct_err!}Mazdak Farrokhzad-0/+19
- remove syntax::{help!, span_help!, span_note!} - remove unused syntax::{struct_span_fatal, struct_span_err_or_warn!, span_err_or_warn!} - lintify check_for_bindings_named_same_as_variants + conflicting_repr_hints - inline syntax::{struct_span_warn!, diagnostic_used!} - stringify_error_code! -> error_code! & use it more. - find_plugin_registrar: de-fatalize an error - de-fatalize metadata errors - move type_error_struct! to rustc_typeck - struct_span_err! -> rustc_errors
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-1/+1
2019-12-22Format the worldMark Rousskov-63/+26
2019-11-18Specific labels when referring to "expected" and "found" typesEsteban Küber-26/+33
2019-10-22RFC 2027: "first draft" of implementationMathias Blikstad-0/+5
These are a squashed series of commits.
2019-09-23Introduce a diagnostic stashing API.Mazdak Farrokhzad-13/+28
2019-09-17Privatize DiagnosticBuilder constructorsMark Rousskov-2/+3
2019-09-17Take Diagnostic in Handler::emit_diagnosticMark Rousskov-9/+1
2019-09-12Box `DiagnosticBuilder`.Nicholas Nethercote-35/+46
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-07-11Emit dropped unemitted errors to aid in ICE debuggingEsteban Küber-3/+6
2019-06-10Address review commentsPhilipp Hansch-1/+1
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-06-10librustc_errors: Add some more documentationPhilipp Hansch-1/+1
2019-05-10Remove hir::ExprKind::If and replace it with lowering to hir::ExprKind::Match.Mazdak Farrokhzad-0/+12
2019-05-02introduce unescape moduleAleksey Kladov-1/+1
Currently, we deal with escape sequences twice: once when we lex a string, and a second time when we unescape literals. This PR aims to remove this duplication, by introducing a new `unescape` mode as a single source of truth for character escaping rules
2019-03-07fix bad logicEsteban Küber-1/+3
2019-03-06Make `-Z treat-err-as-bug` take a number of errors to be emittedEsteban Küber-1/+1
`-Z treat-err-as-bug=0` will cause `rustc` to panic after the first error is reported. `-Z treat-err-as-bug=2` will cause `rustc` to panic after 3 errors have been reported.
2019-02-24Use ? in some macrosTaiki Endo-3/+3
2019-02-14Rollup merge of #58296 - estebank:hidden-suggestion, r=oli-obkMazdak Farrokhzad-0/+57
Hidden suggestion support Add way to hide suggestion snippet window from cli output to avoid cluttered spans that don't enhance understanding. r? @pietroalbini CC @zackmdavis
2019-02-11Use hidden suggestions for unused imports lintEsteban Küber-0/+18
2019-02-11Add way to completely hide suggestion from cli outputEsteban Küber-0/+19
2019-02-11Expose hidden snippet suggestionsEsteban Küber-0/+20
2019-02-10rustc: doc commentsAlexander Regueiro-2/+2
2019-02-07librustc_errors => 2018Taiki Endo-9/+10
2019-01-26remove `_with_applicability` from suggestion fnsAndy Russell-68/+31
2019-01-17properly deprecate suggestion methodsAndy Russell-34/+56
2018-12-25Remove licensesMark Rousskov-10/+0
2018-10-31Pass suggestions as impl Iterator instead of Vecljedrz-1/+1
2018-10-19Prefer unwrap_or_else to unwrap_or in case of function calls/allocationsljedrz-1/+1
2018-09-20Auto merge of #54241 - vi:suggest_with_applicability, r=estebankbors-21/+53
Remove usages of span_suggestion without Applicability Use `Applicability::Unspecified` for all of them instead. Shall deprecations for the non-`_with_applicability` functions be added? Shall clippy be addressed somehow? r? @estebank
2018-09-18Log when buffering a diagnostic.David Wood-0/+3
This is useful in debugging when and where errors are emitted in logs.
2018-09-17Better trick for allowing trailing comma at forward!Vitaly _Vi Shukela-10/+13
2018-09-17Add -Z dont-buffer-diagnostics, a way to force NLL to immediately emit its ↵Felix S. Klock II-2/+12
diagnostics. This is mainly intended for `rustc` developers who want to see a diagnostic in its original context in the control flow. Two uses cases for that are: * `-Z treat-err-as-bug` which then allows extraction of a stack-trace to the origin of the error (a case that is so important that we make that flag imply this one, effectively). * `RUST_LOG=... rustc`, in which case it is often useful to see the logging statements that occurred immediately prior to the point where the diagnostic was signalled. Drive-by: Added some documentation pointing future devs at HandlerFlags, and documented the fields of `HandlerFlags` itself.
2018-09-17Change diagnostic_builder's forward! macro to enforce trailing argument commaVitaly _Vi Shukela-27/+27
2018-09-17Fix style according to review comments.Vitaly _Vi Shukela-3/+4
2018-09-16Deprecate *_suggestion* that are without explicit applicabilityVitaly _Vi Shukela-0/+11
2018-09-16Add multipart_suggestion_with_applicabilityVitaly _Vi Shukela-0/+17
2018-07-30rustc: Disallow machine applicability in foreign macrosAlex Crichton-19/+64
Recent changes to lints disallowed lints from being emitted against code located in foreign macros, except for future-incompatible lints. For a future incompatible lint, however, the automatic suggestions may not be applicable! This commit updates this code path to force all applicability suggestions made to foreign macros to never be `MachineApplicable`. This should avoid rustfix actually attempting fixing these suggestions, causing non-compiling code to be produced. Closes rust-lang/cargo#5799
2018-07-26Add `-Z borrowck=migrate` flag, use it to link NLL up to AST-borrowck.Felix S. Klock II-19/+0