about summary refs log tree commit diff
path: root/src/librustc_errors/diagnostic.rs
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-586/+0
2020-08-18Rollup merge of #75389 - RalfJung:span_label, r=davidtwcoYuki Okushi-7/+8
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-7/+8
2020-08-14Rework `rustc_serialize`Matthew Jasper-3/+3
- Move the type parameter from `encode` and `decode` methods to the trait. - Remove `UseSpecialized(En|De)codable` traits. - Remove blanket impls for references. - Add `RefDecodable` trait to allow deserializing to arena-allocated references safely. - Remove ability to (de)serialize HIR. - Create proc-macros `(Ty)?(En|De)codable` to help implement these new traits.
2020-06-10On recursive ADT, provide indirection structured suggestionEsteban Küber-0/+23
2020-05-27Fix spacing of expected/found notes without a labelEsteban Küber-3/+12
2020-02-29use .to_string() instead of format!() macro to create stringsMatthias Krüger-3/+3
2020-02-11Invert control in struct_lint_level.jumbatm-0/+1
Caller now passes in a `decorate` function, which is only run if the lint is allowed.
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-1/+1
2019-12-22Format the worldMark Rousskov-87/+67
2019-12-08async/await: more improvements to non-send errorsDavid Wood-0/+10
Signed-off-by: David Wood <david@davidtw.co>
2019-11-23review comments: remove unnecessary `&str` to `String` conversionsEsteban Küber-2/+2
2019-11-23Highlight parts of fn in type errorsEsteban Küber-0/+7
When a type error arises between two fn items, fn pointers or tuples, highlight only the differing parts of each.
2019-11-21Auto merge of #66610 - alexreg:trait-upcasting-cosmetic, r=Centrilbors-1/+1
Aggregation of drive-by cosmetic changes for trait-upcasting PR Cherry-picked from #60900. As requested by @Centril (and @nikomatsakis, I believe). r? @Centril
2019-11-21Aggregation of drive-by cosmetic changes.Alexander Regueiro-1/+1
2019-11-21Auto merge of #66389 - estebank:type-err-labels, r=petrochenkovbors-32/+44
Specific labels when referring to "expected" and "found" types
2019-11-18Auto merge of #58281 - mark-i-m:synthesis, r=estebankbors-1/+15
Add outlives suggestions for some lifetime errors This PR implements suggestion diagnostics for some lifetime mismatch errors. When the borrow checker finds that some lifetime 'a doesn't outlive some other lifetime 'b that it should outlive, then in addition to the current lifetime error, we also emit a suggestion for how to fix the problem by adding a bound: - If a and b are normal named regions, suggest to add the bound `'a: 'b` - If b is static, suggest to replace a with static - If b also needs to outlive a, they must be the same, so suggest unifying them We start with a simpler implementation that avoids diagnostic regression or implementation complexity: - We only makes suggestions for lifetimes the user can already name (eg not closure regions or elided regions) - For now, we only emit a help note, not an actually suggestion because it is significantly easier. Finally, there is one hack: it seems that implicit regions in async fn are given the name '_ incorrectly. To avoid suggesting '_: 'x, we simply filter out such lifetimes by name. For more info, see this internals thread: https://internals.rust-lang.org/t/mechanical-suggestions-for-some-borrow-checker-errors/9049/3 TL;DR Make suggestions to add a `where 'a: 'b` constraint for some lifetime errors. Details are in the paper linked from the internals thread above. r? @estebank TODO - [x] Clean up code - [x] Only make idiomatic suggestions - [x] don't suggest naming `&'a self` - [x] rather than `'a: 'static`, suggest replacing `'a` with `'static` - [x] rather than `'a: 'b, 'b: 'a`, suggest replacing `'a` with `'b` or vice versa - [x] Performance (maybe need a perf run when this is closer to the finish line?) - perf run was clean... - EDIT: perf run seems to only check non-error performance... How do we check that error performance didn't regress? - [x] Needs ui tests - [x] Integrate the `help` message into the main lifetime `error`
2019-11-18Specific labels when referring to "expected" and "found" typesEsteban Küber-32/+44
2019-11-03Auto merge of #65779 - kevgrasso:E0308highlight, r=estebankbors-2/+2
Highlight only relevant parts of type path in type errors Resolves #57413. Unfortunately the current Rust UI testing setup can't test that the correct colors are being used in a given output, so here's a screenshot of a small test program I wrote: ![image](https://user-images.githubusercontent.com/480789/67530063-f272af00-f68b-11e9-9f96-a211fc7666d4.png)
2019-10-27implement outlive suggestionsMark Mansi-1/+15
2019-10-23debug messages addedKevyn Grasso-2/+2
2019-10-22RFC 2027: "first draft" of implementationMathias Blikstad-0/+26
These are a squashed series of commits.
2019-10-03review commentsEsteban Küber-41/+43
2019-10-03review commentsEsteban Küber-6/+35
2019-08-14remove unused Level::PhaseFatalAleksey Kladov-1/+0
2019-08-12DiagnosticBuilder docsRalf Jung-0/+6
2019-06-26Fix clippy::redundant_field_namesIgor Matuszewski-1/+1
2019-03-23Tweak unsupported negative trait bounds messageEsteban Küber-1/+1
2019-02-14Rollup merge of #58296 - estebank:hidden-suggestion, r=oli-obkMazdak Farrokhzad-4/+75
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-2/+28
2019-02-11Add way to completely hide suggestion from cli outputEsteban Küber-0/+21
2019-02-11Expose hidden snippet suggestionsEsteban Küber-0/+23
2019-02-11Add way to hide suggestion snippet window from cli outputEsteban Küber-4/+5
2019-02-10rustc: doc commentsAlexander Regueiro-1/+1
2019-02-07librustc_errors => 2018Taiki Endo-6/+6
2019-01-26remove `_with_applicability` from suggestion fnsAndy Russell-88/+26
2018-12-25Remove licensesMark Rousskov-10/+0
2018-11-23Keep label on moved spans and point at macro invocation on parse errorEsteban Küber-0/+11
2018-10-31Pass suggestions as impl Iterator instead of Vecljedrz-3/+3
2018-10-10A handful of random string-related improvementsljedrz-4/+4
2018-09-17Whitespace fix again.Vitaly _Vi Shukela-3/+3
2018-09-17Fix style according to review comments.Vitaly _Vi Shukela-4/+4
2018-09-16trailing whitespace fixVitaly _Vi Shukela-1/+1
2018-09-16Deprecate *_suggestion* that are without explicit applicabilityVitaly _Vi Shukela-0/+4
2018-09-16Add multipart_suggestion_with_applicabilityVitaly _Vi Shukela-2/+15
2018-07-26Add `-Z borrowck=migrate` flag, use it to link NLL up to AST-borrowck.Felix S. Klock II-0/+19
2018-07-20proc_macro: don't use DiagnosticBuilder for building up Diagnostics.Eduard-Mihai Burtescu-1/+1
2018-07-14Deny bare trait objects in src/librustc_errorsljedrz-4/+4
Enforce `#![deny(bare_trait_objects)]` in `src/librustc_errors`.
2018-05-28Auto merge of #50724 - zackmdavis:applicability_rush, r=Manishearthbors-0/+17
add suggestion applicabilities to librustc and libsyntax A down payment on #50723. Interested in feedback on whether my `MaybeIncorrect` vs. `MachineApplicable` judgement calls are well-calibrated (and that we have a consensus on what this means). r? @Manishearth cc @killercup @estebank
2018-05-21Improve the diagnostic around impl Trait <-> generic param mismatchOliver Schneider-0/+19