about summary refs log tree commit diff
path: root/src/librustc/infer/error_reporting/note.rs
AgeCommit message (Collapse)AuthorLines
2020-02-16Move librustc/{traits,infer} to librustc_infer.Camille GILLOT-702/+0
2020-01-18remove rustc_error_codes deps except in rustc_driverMazdak Farrokhzad-2/+0
2020-01-10nix syntax::errors & prefer rustc_errors over errorsMazdak Farrokhzad-1/+1
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 rustc::infer::error_reporting::{note_and_explain_free_region, ↵Camille GILLOT-35/+70
note_and_explain_region} free functions.
2019-12-22Format the worldMark Rousskov-271/+467
2019-12-03Include a span in more `expected...found` notesAaron Hill-6/+14
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-14Update to use new librustc_error_codes libraryGuillaume Gomez-0/+2
2019-09-12Shrink `SubregionOrigin`.Nicholas Nethercote-2/+2
It's currently 120 bytes on x86-64, due to one oversized variant (`Subtype`). This commit boxes `Subtype`'s contents, reducing the size of `SubregionOrigin` to 32 bytes. The change speeds things up by avoiding lots of `memcpy` calls, mostly relating to `RegionConstraintData::constraints`, which is a `BTreeMap` with `SubregionOrigin` values.
2019-06-20rename hir::map::name_by_hir_id to ::nameljedrz-4/+4
2019-06-20replace NodeId with HirId in infer::SubregionOriginljedrz-2/+2
2019-06-14Unify all uses of 'gcx and 'tcx.Eduard-Mihai Burtescu-1/+1
2019-05-05rustc: rename all occurences of "freevar" to "upvar".Eduard-Mihai Burtescu-2/+2
2019-02-13Rename rustc_errors dependency in rust 2018 cratesTaiki Endo-1/+1
2019-02-10Auto merge of #58151 - ljedrz:HirIdify_rustc, r=Zoxcbors-4/+2
Partially HirId-ify rustc Another step towards https://github.com/rust-lang/rust/pull/57578.
2019-02-05rustc: partially HirIdifyljedrz-4/+2
2019-02-05move librustc to 2018Mark Mansi-5/+5
2019-01-02improve handling for subtypeNiko Matsakis-0/+20
Still not great, but good enough to land this PR.
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-06Use a function to access the Hir map to be able to turn it into a query laterJohn Kåre Alsaker-6/+6
2018-11-14capture_disjoint_fields(rust-lang#53488)Blitzerr-2/+2
Refactoring out the HirId of the UpvarId in another struct.
2018-09-29don't elide lifetimes in paths in librustc/Zack M. Davis-1/+1
This seemed like a good way to kick the tires on the elided-lifetimes-in-paths lint (#52069)—seems to work! This was also pretty tedious—it sure would be nice if `cargo fix` worked on this codebase (#53896)!
2018-01-26Tweak presentation on lifetime trait mismatchEsteban Küber-6/+4
2017-11-15convert EXTRA_REQUIREMENT_IN_IMPL into a hard errorNiko Matsakis-4/+2
cc #37166
2017-09-08Use NodeId/HirId instead of DefId for local variables.Eduard-Mihai Burtescu-9/+9
2017-09-01rustc: rename CodeExtent to Scope and RegionMaps to ScopeTree.Eduard-Mihai Burtescu-37/+39
2017-09-01rustc: take TyCtxt and RegionMaps in CodeMap::span.Eduard-Mihai Burtescu-48/+64
2017-08-11Use DefIndex instead of NodeId in UpvarId.Michael Woerister-9/+9
2017-05-09Improve E0477 error messageGuillaume Gomez-2/+9
2017-04-30intern CodeExtentsNiko Matsakis-2/+2
Make a `CodeExtent<'tcx>` be something allocated in an arena instead of an index into the `RegionMaps`.
2017-04-11Highlight and simplify mismatched typesEsteban Küber-0/+2
Shorten mismatched types errors by replacing subtypes that are not different with `_`, and highlighting only the subtypes that are different. Given a file ```rust struct X<T1, T2> { x: T1, y: T2, } fn foo() -> X<X<String, String>, String> { X { x: X {x: "".to_string(), y: 2}, y: "".to_string()} } fn bar() -> Option<String> { "".to_string() } ``` provide the following output ```rust error[E0308]: mismatched types --> file.rs:6:5 | 6 | X { x: X {x: "".to_string(), y: 2}, y: "".to_string()} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `std::string::String`, found {integer} | = note: expected type `X<X<_, std::string::String>, _>` ^^^^^^^^^^^^^^^^^^^ // < highlighted found type `X<X<_, {integer}>, _>` ^^^^^^^^^ // < highlighted error[E0308]: mismatched types --> file.rs:6:5 | 10 | "".to_string() | ^^^^^^^^^^^^^^ expected struct `std::option::Option`, found `std::string::String` | = note: expected type `Option<std::string::String>` ^^^^^^^ ^ // < highlighted found type `std::string::String` ```
2017-02-27Format note.rs with rustfmtCengiz Can-253/+220
2017-02-27Lower moved fn's visibility to supermoduleCengiz Can-2/+2
2017-02-27Move two large error_reporting fn's to a separate fileCengiz Can-0/+465