rust/compiler
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
..
rustc
rustc_abi
rustc_arena
rustc_ast Improve spans for indexing expressions 2023-08-04 13:17:39 +02:00
rustc_ast_lowering Improve spans for indexing expressions 2023-08-04 13:17:39 +02:00
rustc_ast_passes
rustc_ast_pretty Improve spans for indexing expressions 2023-08-04 13:17:39 +02:00
rustc_attr
rustc_baked_icu_data
rustc_borrowck Rollup merge of #114434 - Nilstrieb:indexing-spans, r=est31 2023-08-04 21:31:57 +02:00
rustc_builtin_macros Rollup merge of #114434 - Nilstrieb:indexing-spans, r=est31 2023-08-04 21:31:57 +02:00
rustc_codegen_cranelift
rustc_codegen_gcc
rustc_codegen_llvm Auto merge of #114350 - erikdesjardins:ident, r=tmiasko 2023-08-04 07:17:02 +00:00
rustc_codegen_ssa Rollup merge of #114427 - Enselic:rustc_codegen_ssa-fixme, r=Nilstrieb 2023-08-04 09:18:59 +02:00
rustc_const_eval
rustc_data_structures Rollup merge of #114418 - klensy:parking_lot, r=oli-obk 2023-08-04 21:31:56 +02:00
rustc_driver
rustc_driver_impl
rustc_error_codes Rollup merge of #113534 - oli-obk:simd_shuffle_dehackify, r=workingjubilee 2023-08-04 07:25:45 +02:00
rustc_error_messages
rustc_errors
rustc_expand
rustc_feature
rustc_fluent_macro
rustc_fs_util
rustc_graphviz
rustc_hir Rollup merge of #114434 - Nilstrieb:indexing-spans, r=est31 2023-08-04 21:31:57 +02:00
rustc_hir_analysis Rollup merge of #114253 - fmease:compute-variances-for-lazy-ty-aliases, r=oli-obk 2023-08-04 09:18:58 +02:00
rustc_hir_pretty Improve spans for indexing expressions 2023-08-04 13:17:39 +02:00
rustc_hir_typeck Rollup merge of #114434 - Nilstrieb:indexing-spans, r=est31 2023-08-04 21:31:57 +02:00
rustc_incremental
rustc_index
rustc_infer don't ICE on higher ranked hidden types 2023-08-04 15:11:09 +00:00
rustc_interface
rustc_lexer
rustc_lint Rollup merge of #114434 - Nilstrieb:indexing-spans, r=est31 2023-08-04 21:31:57 +02:00
rustc_lint_defs Auto merge of #114414 - cjgillot:early-unnameable-test, r=petrochenkov 2023-08-04 14:13:11 +00:00
rustc_llvm
rustc_log
rustc_macros
rustc_metadata Rollup merge of #114253 - fmease:compute-variances-for-lazy-ty-aliases, r=oli-obk 2023-08-04 09:18:58 +02:00
rustc_middle Auto merge of #114036 - compiler-errors:upcast-to-fewer-assocs, r=lcnr 2023-08-04 10:55:22 +00:00
rustc_mir_build Rollup merge of #114434 - Nilstrieb:indexing-spans, r=est31 2023-08-04 21:31:57 +02:00
rustc_mir_dataflow
rustc_mir_transform Rollup merge of #113534 - oli-obk:simd_shuffle_dehackify, r=workingjubilee 2023-08-04 07:25:45 +02:00
rustc_monomorphize
rustc_parse Rollup merge of #114434 - Nilstrieb:indexing-spans, r=est31 2023-08-04 21:31:57 +02:00
rustc_parse_format
rustc_passes Improve spans for indexing expressions 2023-08-04 13:17:39 +02:00
rustc_plugin_impl
rustc_privacy
rustc_query_impl
rustc_query_system replace few explicit use of parking_lot with rustc_data_structures::sync onces 2023-08-04 18:41:56 +03:00
rustc_resolve Rollup merge of #114434 - Nilstrieb:indexing-spans, r=est31 2023-08-04 21:31:57 +02:00
rustc_serialize
rustc_session
rustc_smir
rustc_span Rollup merge of #114351 - ttsugriy:sort-by-words, r=fee1-dead 2023-08-04 21:31:56 +02:00
rustc_symbol_mangling
rustc_target
rustc_trait_selection Rollup merge of #114434 - Nilstrieb:indexing-spans, r=est31 2023-08-04 21:31:57 +02:00
rustc_traits
rustc_transmute
rustc_ty_utils
rustc_type_ir Rollup merge of #114355 - compiler-errors:resolve_vars_early, r=lcnr 2023-08-04 09:18:59 +02:00