rust/compiler/rustc_hir/src
Matthias Krüger 99e4127d85
Rollup merge of #114434 - Nilstrieb:indexing-spans, r=est31
Improve spans for indexing expressions

fixes #114388

Indexing is similar to method calls in having an arbitrary left-hand-side and then something on the right, which is the main part of the expression. Method calls already have a span for that right part, but indexing does not. This means that long method chains that use indexing have really bad spans, especially when the indexing panics and that span in coverted into a panic location.

This does the same thing as method calls for the AST and HIR, storing an extra span which is then put into the `fn_span` field in THIR.

r? compiler-errors
2023-08-04 21:31:57 +02:00
..
arena.rs Also arena-allocate ast::MacroDef to make Item: Copy 2023-04-22 23:00:38 +02:00
def_path_hash_map.rs Use on-disk-hash-table format for DefPathHashMap in hir::definitions. 2021-09-14 13:54:41 +02:00
def.rs Replace RPITIT current impl with new strategy that lowers as a GAT 2023-07-08 18:21:34 -03:00
definitions.rs Split {Idx, IndexVec, IndexSlice} into their own modules 2023-04-24 13:53:35 +00:00
diagnostic_items.rs Introduce get_diagnostic_name 2021-10-06 08:40:28 -05:00
hir_id.rs Removed stable/unstable sort arg from into_sorted_stable_ord, fixed a few misc issues, added collect to UnordItems 2023-06-08 00:38:50 -04:00
hir.rs Improve spans for indexing expressions 2023-08-04 13:17:39 +02:00
intravisit.rs Improve spans for indexing expressions 2023-08-04 13:17:39 +02:00
lang_items.rs Auto merge of #100036 - DrMeepster:box_free_free_box, r=oli-obk 2023-06-17 16:10:57 +00:00
lib.rs Add internal_features lint 2023-08-03 14:50:50 +02:00
pat_util.rs Perform match checking on THIR. 2023-04-03 15:59:21 +00:00
stable_hash_impls.rs Only compute the crate hash when necessary. 2023-03-08 09:30:22 +11:00
target.rs Replace RPITIT current impl with new strategy that lowers as a GAT 2023-07-08 18:21:34 -03:00
tests.rs Only depend on CFG_VERSION in rustc_interface 2023-05-17 23:54:21 -05:00
weak_lang_items.rs Rewrite implementation of #[alloc_error_handler] 2022-10-31 16:32:57 +00:00