1
Fork 0
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 inline format!() args up to and including rustc_middle 2023-07-30 13:18:33 +02:00
rustc_abi Add internal_features lint 2023-08-03 14:50:50 +02:00
rustc_arena Add internal_features lint 2023-08-03 14:50:50 +02:00
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 inline format!() args up to and including rustc_middle 2023-07-30 13:18:33 +02:00
rustc_ast_pretty Improve spans for indexing expressions 2023-08-04 13:17:39 +02:00
rustc_attr [rustc_attr][nit] Replace filter + is_some with map_or. 2023-08-01 12:39:32 -07:00
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 Forbid old-style simd_shuffleN intrinsics 2023-08-03 09:29:00 +00:00
rustc_codegen_gcc Forbid old-style simd_shuffleN intrinsics 2023-08-03 09:29:00 +00:00
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 Rollup merge of #114372 - RalfJung:const-pointer-as-int, r=oli-obk 2023-08-03 17:29:08 +02:00
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 Use a builder instead of boolean/option arguments 2023-07-25 13:51:15 +00:00
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 Add internal_features lint 2023-08-03 14:50:50 +02:00
rustc_errors Add internal_features lint 2023-08-03 14:50:50 +02:00
rustc_expand Add internal_features lint 2023-08-03 14:50:50 +02:00
rustc_feature Add internal_features lint 2023-08-03 14:50:50 +02:00
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 Add internal_features lint 2023-08-03 14:50:50 +02:00
rustc_index Add internal_features lint 2023-08-03 14:50:50 +02:00
rustc_infer don't ICE on higher ranked hidden types 2023-08-04 15:11:09 +00:00
rustc_interface replace atty crate with std's isTerminal 2023-07-26 18:09:50 +03:00
rustc_lexer Update lexer emoji diagnostics to Unicode 15.0 2023-07-29 08:47:21 +08:00
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 Auto merge of #113339 - lqd:respect-filters, r=tmiasko 2023-08-01 23:15:20 +00:00
rustc_log inline format!() args up to and including rustc_middle 2023-07-30 13:18:33 +02:00
rustc_macros Add internal_features lint 2023-08-03 14:50:50 +02:00
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 Use upvar_tys in more places, make it a list 2023-08-01 23:19:31 +00:00
rustc_mir_transform Rollup merge of #113534 - oli-obk:simd_shuffle_dehackify, r=workingjubilee 2023-08-04 07:25:45 +02:00
rustc_monomorphize avoid 'miri' when refering to the shared interpreter 2023-08-02 16:52:03 +02:00
rustc_parse Rollup merge of #114434 - Nilstrieb:indexing-spans, r=est31 2023-08-04 21:31:57 +02:00
rustc_parse_format Fix unit tests 2023-07-19 16:37:09 +00:00
rustc_passes Improve spans for indexing expressions 2023-08-04 13:17:39 +02:00
rustc_plugin_impl
rustc_privacy Remove constness from TraitPredicate 2023-08-02 15:38:00 +00:00
rustc_query_impl Add internal_features lint 2023-08-03 14:50:50 +02:00
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 Add internal_features lint 2023-08-03 14:50:50 +02:00
rustc_smir clean up, use opaque types 2023-08-01 17:48:20 +03:00
rustc_span Rollup merge of #114351 - ttsugriy:sort-by-words, r=fee1-dead 2023-08-04 21:31:56 +02:00
rustc_symbol_mangling avoid 'miri' when refering to the shared interpreter 2023-08-02 16:52:03 +02:00
rustc_target Add internal_features lint 2023-08-03 14:50:50 +02:00
rustc_trait_selection Rollup merge of #114434 - Nilstrieb:indexing-spans, r=est31 2023-08-04 21:31:57 +02:00
rustc_traits
rustc_transmute Don't attempt to compute layout of type referencing error 2023-07-27 18:24:08 +00:00
rustc_ty_utils Rollup merge of #114079 - compiler-errors:closure-upvars, r=oli-obk 2023-08-02 13:46:54 +02:00
rustc_type_ir Rollup merge of #114355 - compiler-errors:resolve_vars_early, r=lcnr 2023-08-04 09:18:59 +02:00