about summary refs log tree commit diff
path: root/src/librustc/infer/error_reporting/mod.rs
AgeCommit message (Collapse)AuthorLines
2020-02-16Move librustc/{traits,infer} to librustc_infer.Camille GILLOT-2099/+0
2020-02-14Improve opaque type lifetime errorsMatthew Jasper-4/+2
* Use better span for member constraint errors * Avoid a bad suggestion * Don't report member constraint errors if we have other universal region errors.
2020-02-11Invert control in struct_lint_level.jumbatm-1/+1
Caller now passes in a `decorate` function, which is only run if the lint is allowed.
2020-02-06index ReEmpty by universeNiko Matsakis-2/+33
We now make `'empty` indexed by a universe index, resulting in a region lattice like this: ``` static ----------+-----...------+ (greatest) | | | early-bound and | | free regions | | | | | scope regions | | | | | empty(root) placeholder(U1) | | / | | / placeholder(Un) empty(U1) -- / | / ... / | / empty(Un) -------- (smallest) ``` Therefore, `exists<A> { forall<B> { B: A } }` is now unprovable, because A must be at least Empty(U1) and B is placeholder(U2), and hence the two regions are unrelated.
2020-01-25Use better bound names in `-Zverbose` modeEsteban Küber-3/+7
2020-01-18remove rustc_error_codes deps except in rustc_driverMazdak Farrokhzad-1/+0
2020-01-17Use named fields for `hir::ItemKind::Impl`Dylan MacKenzie-1/+1
2020-01-16don't clone types that are copyMatthias Krüger-1/+1
found via clippy
2020-01-10nix syntax::errors & prefer rustc_errors over errorsMazdak Farrokhzad-6/+4
2020-01-08remove unnecessary `Debug`Esteban Küber-1/+1
2020-01-08reduce code duplicationEsteban Küber-35/+35
2020-01-08review commentsEsteban Küber-26/+40
2020-01-08review commentsEsteban Küber-16/+34
2020-01-08review comment: wordingEsteban Küber-6/+8
2020-01-08Point at the def span of trait refs E0277Esteban Küber-1/+8
2020-01-08review commentsEsteban Küber-17/+23
2020-01-08Point at opaque and closure type definitions in type errorsEsteban Küber-5/+92
2020-01-08- remove syntax::{span_warn!, span_err!, span_fatal!. struct_err!}Mazdak Farrokhzad-1/+1
- 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-07Make ↵Camille GILLOT-1/+2
rustc::traits::object_safety::{astconv_object_safety_violations,is_vtable_safe_method,object_safety_violations} free functions.
2020-01-07Make ↵Camille GILLOT-1/+2
rustc::traits::error_reporting::{recursive_type_with_infinite_size_error, report_object_safety_error} free functions.
2020-01-07Make rustc::infer::error_reporting::{note_and_explain_free_region, ↵Camille GILLOT-88/+89
note_and_explain_region} free functions.
2020-01-07Remove private methods from TyCtxt impl block: rustc::infer::error_reporting.Camille GILLOT-107/+107
2020-01-06Auto merge of #67886 - Centril:rustc_hir_canon_imports, r=nagisabors-5/+6
Nix `rustc_hir` reexports in rustc::hir r? @Zoxc cc @Mark-Simulacrum
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-5/+6
2020-01-05Add backticks to various diagnosticsvarkor-10/+10
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-1/+1
2019-12-30discriminant -> scrutineeMazdak Farrokhzad-5/+5
2019-12-30Blame user type in pat type error.Mazdak Farrokhzad-2/+5
2019-12-30refactor and fix this-expression-has-type noteMazdak Farrokhzad-0/+1
2019-12-30MatchExpressionArmPattern -> PatternMazdak Farrokhzad-1/+1
Current name is too specific for incoming changes.
2019-12-30MatchExpressionArmPattern: Use more generic wording.Mazdak Farrokhzad-1/+1
The existing wording was inappropriate for e.g. `if let Ok(_) = expr { .. }`. The diagnostic would leak the fact that we desugar to a `match`.
2019-12-22Format the worldMark Rousskov-182/+142
2019-12-22Auto merge of #66931 - cjgillot:hirene-preamble, r=eddybbors-3/+3
Allocate HIR on an arena 1/4 This PR is the first in a series of 4, aiming at allocating the HIR on an arena, as a memory optimisation. 1. This first PR lays the groundwork and migrates some low-hanging fruits. 2. The second PR will migrate `hir::Expr`, `hir::Pat` and related. 3. The third PR will migrate `hir::Ty` and related. 4. The final PR will be dedicated to eventual cleanups. In order to make the transition as gradual as possible, some lowering routines receive `Box`-allocated data and move it into the arena. This is a bit wasteful, but hopefully temporary. Nonetheless, special care should be taken to avoid double arena allocations. Work mentored by @Zoxc.
2019-12-21Use Arena inside hir::ImplItem.Camille GILLOT-1/+1
2019-12-21Use Arena inside hir::TraitItem.Camille GILLOT-1/+1
2019-12-21Use Arena inside hir::Item.Camille GILLOT-1/+1
2019-12-20Check associated type implementations for generic mismatchesMatthew Jasper-0/+2
2019-12-10Deduplicate logicEsteban Küber-0/+1
2019-12-03Include a span in more `expected...found` notesAaron Hill-5/+10
In most places, we use a span when emitting `expected...found` errors. However, there were a couple of places where we didn't use any span, resulting in hard-to-interpret error messages. This commit attaches the relevant span to these notes, and additionally switches over to using `note_expected_found` instead of manually formatting the message
2019-11-29allow customising ty::TraitRef's printing behaviorMikhail Babenko-2/+14
fix clippy allow customising ty::TraitRef's printing behavior fix clippy stylistic fix
2019-11-26Rollup merge of #66754 - estebank:rustdoc-capitalization, r=Dylan-DPCTyler Mandry-10/+5
Various tweaks to diagnostic output
2019-11-25Fix capitalization when mentioning different crate versions in E0308Esteban Küber-10/+5
2019-11-23review comments: remove unnecessary `&str` to `String` conversionsEsteban Küber-20/+20
2019-11-23Highlight parts of fn in type errorsEsteban Küber-3/+174
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-6/+8
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-6/+8
2019-11-18review commentsEsteban Küber-4/+2
2019-11-18Remove E0308 note when primary label has all infoEsteban Küber-16/+33
2019-11-18Specific labels when referring to "expected" and "found" typesEsteban Küber-14/+20
2019-11-14Update to use new librustc_error_codes libraryGuillaume Gomez-0/+2