rust/tests/ui/span
Nilstrieb 5706be1854 Improve spans for indexing expressions
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.
2023-08-04 13:17:39 +02:00
..
auxiliary Move /src/test to /tests 2023-01-11 09:32:08 +00:00
borrowck-borrow-overloaded-auto-deref-mut.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
borrowck-borrow-overloaded-auto-deref-mut.stderr Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
borrowck-borrow-overloaded-deref-mut.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
borrowck-borrow-overloaded-deref-mut.stderr tweak "make mut" spans (No. 2) 2023-05-05 22:40:05 +12:00
borrowck-call-is-borrow-issue-12224.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
borrowck-call-is-borrow-issue-12224.stderr Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
borrowck-call-method-from-mut-aliasable.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
borrowck-call-method-from-mut-aliasable.stderr Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
borrowck-fn-in-const-b.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
borrowck-fn-in-const-b.stderr Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
borrowck-let-suggestion-suffixes.rs Account for method call and indexing when looking for inner-most path in expression 2023-01-17 02:52:43 +00:00
borrowck-let-suggestion-suffixes.stderr Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
borrowck-object-mutability.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
borrowck-object-mutability.stderr Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
borrowck-ref-into-rvalue.fixed Move /src/test to /tests 2023-01-11 09:32:08 +00:00
borrowck-ref-into-rvalue.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
borrowck-ref-into-rvalue.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
coerce-suggestions.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
coerce-suggestions.stderr Tweak borrow suggestion 2023-05-08 03:36:30 +00:00
destructor-restrictions.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
destructor-restrictions.stderr Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs Exit when there are unmatched delims to avoid noisy diagnostics 2023-02-28 07:55:19 +00:00
drop-location-span-error-rust-2021-incompatible-closure-captures-93117.stderr Exit when there are unmatched delims to avoid noisy diagnostics 2023-02-28 07:55:19 +00:00
drop-location-span-error-rust-2021-incompatible-closure-captures-96258.rs fix test 2023-06-24 21:49:38 -04:00
drop-location-span-error-rust-2021-incompatible-closure-captures-96258.stderr fix test 2023-06-24 21:49:38 -04:00
dropck_arr_cycle_checked.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
dropck_arr_cycle_checked.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
dropck_direct_cycle_with_drop.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
dropck_direct_cycle_with_drop.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
dropck_misc_variants.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
dropck_misc_variants.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
dropck_vec_cycle_checked.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
dropck_vec_cycle_checked.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
dropck-object-cycle.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
dropck-object-cycle.stderr Account for * when looking for inner-most path in expression 2023-01-17 02:45:11 +00:00
E0046.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
E0046.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
E0072.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
E0072.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
E0204.rs may not => cannot 2023-03-08 00:00:18 +00:00
E0204.stderr may not => cannot 2023-03-08 00:00:18 +00:00
E0493.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
E0493.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
E0535.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
E0535.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
E0536.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
E0536.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
E0537.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
E0537.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
gated-features-attr-spans.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
gated-features-attr-spans.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
impl-wrong-item-for-trait.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
impl-wrong-item-for-trait.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
import-ty-params.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
import-ty-params.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue28498-reject-ex1.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue28498-reject-ex1.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue28498-reject-lifetime-param.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue28498-reject-lifetime-param.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
issue28498-reject-passed-to-fn.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue28498-reject-passed-to-fn.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
issue28498-reject-trait-bound.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue28498-reject-trait-bound.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
issue-11925.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-11925.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-15480.fixed Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-15480.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-15480.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-23338-locals-die-before-temps-of-body.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-23338-locals-die-before-temps-of-body.stderr Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
issue-23729.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-23729.stderr Make missing impl item suggestions more obvious that they're missing 2023-04-19 17:57:37 +00:00
issue-23827.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-23827.stderr Make missing impl item suggestions more obvious that they're missing 2023-04-19 17:57:37 +00:00
issue-24356.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-24356.stderr Make missing impl item suggestions more obvious that they're missing 2023-04-19 17:57:37 +00:00
issue-24690.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-24690.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-24805-dropck-child-has-items-via-parent.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-24805-dropck-child-has-items-via-parent.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
issue-24805-dropck-trait-has-items.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-24805-dropck-trait-has-items.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
issue-24895-copy-clone-dropck.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-24895-copy-clone-dropck.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
issue-25199.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-25199.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
issue-26656.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-26656.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
issue-27522.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-27522.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-29106.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-29106.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
issue-29595.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-29595.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-33884.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-33884.stderr Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
issue-34264.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-34264.stderr Make removal suggestion not verbose 2023-02-14 20:22:10 +00:00
issue-35987.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-35987.stderr Special-case item attributes in the suggestion output 2023-04-12 22:50:10 +00:00
issue-36537.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-36537.stderr Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
issue-37767.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-37767.stderr diagnostics: update test cases to refer to assoc fn with self as method 2023-02-22 08:40:47 -07:00
issue-39018.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-39018.stderr Tweak borrow suggestion 2023-05-08 03:36:30 +00:00
issue-39698.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-39698.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-40157.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-40157.stderr Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
issue-42234-unknown-receiver-type.full.stderr diagnostics: update test cases to refer to assoc fn with self as method 2023-02-22 08:40:47 -07:00
issue-42234-unknown-receiver-type.generic_arg.stderr diagnostics: update test cases to refer to assoc fn with self as method 2023-02-22 08:40:47 -07:00
issue-42234-unknown-receiver-type.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-43927-non-ADT-derive.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-43927-non-ADT-derive.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-71363.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-71363.stderr Tweak output for 'add line' suggestion 2023-04-12 22:50:10 +00:00
issue-81800.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-81800.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-107353.rs Pacify tidy. 2023-02-11 18:07:06 +00:00
lint-unused-unsafe-thir.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
lint-unused-unsafe-thir.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
lint-unused-unsafe.mir.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
lint-unused-unsafe.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
macro-span-replacement.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
macro-span-replacement.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
macro-ty-params.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
macro-ty-params.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
method-and-field-eager-resolution.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
method-and-field-eager-resolution.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
missing-unit-argument.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
missing-unit-argument.stderr diagnostics: update test cases to refer to assoc fn with self as method 2023-02-22 08:40:47 -07:00
move-closure.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
move-closure.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
multiline-span-E0072.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
multiline-span-E0072.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
multiline-span-simple.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
multiline-span-simple.stderr Don't sort strings right after we just sorted by types 2023-06-27 23:31:06 +00:00
multispan-import-lint.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
multispan-import-lint.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
mut-arg-hint.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
mut-arg-hint.stderr Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
mut-ptr-cant-outlive-ref.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
mut-ptr-cant-outlive-ref.stderr Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
non-existing-module-import.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
non-existing-module-import.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
pub-struct-field.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
pub-struct-field.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
range-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
range-2.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
recursive-type-field.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
recursive-type-field.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
regionck-unboxed-closure-lifetimes.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
regionck-unboxed-closure-lifetimes.stderr Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
regions-close-over-borrowed-ref-in-obj.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
regions-close-over-borrowed-ref-in-obj.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
regions-close-over-type-parameter-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
regions-close-over-type-parameter-2.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
regions-escape-loop-via-variable.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
regions-escape-loop-via-variable.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
regions-escape-loop-via-vec.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
regions-escape-loop-via-vec.stderr Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
regions-infer-borrow-scope-within-loop.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
regions-infer-borrow-scope-within-loop.stderr Account for * when looking for inner-most path in expression 2023-01-17 02:45:11 +00:00
send-is-not-static-ensures-scoping.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
send-is-not-static-ensures-scoping.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
send-is-not-static-std-sync-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
send-is-not-static-std-sync-2.stderr Evaluate place expression in PlaceMention. 2023-04-21 21:34:59 +00:00
send-is-not-static-std-sync.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
send-is-not-static-std-sync.stderr Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
slice-borrow.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
slice-borrow.stderr Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
suggestion-non-ascii.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
suggestion-non-ascii.stderr Improve spans for indexing expressions 2023-08-04 13:17:39 +02:00
transitive-dep-span.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
transitive-dep-span.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
type-annotations-needed-expr.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
type-annotations-needed-expr.stderr diagnostics: update test cases to refer to assoc fn with self as method 2023-02-22 08:40:47 -07:00
type-binding.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
type-binding.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
typo-suggestion.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
typo-suggestion.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-warning-point-at-identifier.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused-warning-point-at-identifier.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
vec_refs_data_with_early_death.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
vec_refs_data_with_early_death.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
vec-must-not-hide-type-from-dropck.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
vec-must-not-hide-type-from-dropck.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
visibility-ty-params.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
visibility-ty-params.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
wf-method-late-bound-regions.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
wf-method-late-bound-regions.stderr Tweak E0597 2023-01-15 19:46:20 +00:00