rust/compiler/rustc_builtin_macros/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
..
assert Improve spans for indexing expressions 2023-08-04 13:17:39 +02:00
deriving inline format!() args up to and including rustc_middle 2023-07-30 13:18:33 +02:00
format_foreign Use as_deref in compiler (but only where it makes sense) 2022-11-16 21:58:58 +00:00
alloc_error_handler.rs Revert "Remove #[alloc_error_handler] from the compiler and library" 2023-04-25 00:08:35 +02:00
asm.rs inline format!() args up to and including rustc_middle 2023-07-30 13:18:33 +02:00
assert.rs Remove MacDelimiter. 2023-08-03 09:03:30 +10:00
cfg.rs Migrate most of rustc_builtin_macros to diagnostic impls 2023-04-10 21:16:53 +01:00
cfg_accessible.rs Migrate most of rustc_builtin_macros to diagnostic impls 2023-04-10 21:16:53 +01:00
cfg_eval.rs Use Option::is_some_and and Result::is_ok_and in the compiler 2023-05-24 14:20:41 +00:00
cmdline_attrs.rs Migrate some rustc_builtin_macros to SessionDiagnostic 2023-06-25 01:32:30 +08:00
compile_error.rs Use Cow in {D,Subd}iagnosticMessage. 2023-05-29 09:23:43 +10:00
concat.rs Migrate some rustc_builtin_macros to SessionDiagnostic 2023-06-25 01:32:30 +08:00
concat_bytes.rs Migrate some rustc_builtin_macros to SessionDiagnostic 2023-06-25 01:32:30 +08:00
concat_idents.rs refactor: use by-ref TokenTree iterator to avoid a few clones 2023-05-11 21:59:38 -05:00
derive.rs use ErrorGuaranteed instead of booleans 2023-06-19 21:34:59 +02:00
edition_panic.rs Remove MacDelimiter. 2023-08-03 09:03:30 +10:00
env.rs builtin_macros: raw str in diagnostic output 2023-07-25 11:12:52 +01:00
errors.rs builtin_macros: raw str in diagnostic output 2023-07-25 11:12:52 +01:00
format.rs inline format!() args up to and including rustc_middle 2023-07-30 13:18:33 +02:00
format_foreign.rs inline format!() args up to and including rustc_middle 2023-07-30 13:18:33 +02:00
global_allocator.rs inline format!() args up to and including rustc_middle 2023-07-30 13:18:33 +02:00
lib.rs Add derive for core::marker::ConstParamTy 2023-05-16 20:09:25 +02:00
log_syntax.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
proc_macro_harness.rs inline format!() args up to and including rustc_middle 2023-07-30 13:18:33 +02:00
source_util.rs inline format!() args up to and including rustc_middle 2023-07-30 13:18:33 +02:00
standard_library_imports.rs Hide compiler_builtins in the prelude 2023-07-14 16:53:36 +01:00
test.rs Parse generic const items 2023-07-28 22:21:33 +02:00
test_harness.rs Make test harness lint about unnnameable tests. 2023-08-03 13:07:30 +00:00
trace_macros.rs Migrate some rustc_builtin_macros to SessionDiagnostic 2023-06-25 01:32:30 +08:00
type_ascribe.rs Add unstable type_ascribe macro 2022-11-19 22:16:42 +01:00
util.rs rustc: Remove unused Session argument from some attribute functions 2023-03-22 13:55:55 +04:00