diff options
| author | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2023-08-03 21:43:17 +0200 |
|---|---|---|
| committer | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2023-08-04 13:17:39 +0200 |
| commit | 5706be1854db74d0aafcc4658423884689f139e9 (patch) | |
| tree | 5e4a3543de6a955d72ece8459d3e3353a05cc906 /tests/ui/lint/lint-unconditional-recursion.stderr | |
| parent | fcf3006e0133365ecd26894689c086387edcbecb (diff) | |
| download | rust-5706be1854db74d0aafcc4658423884689f139e9.tar.gz rust-5706be1854db74d0aafcc4658423884689f139e9.zip | |
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.
Diffstat (limited to 'tests/ui/lint/lint-unconditional-recursion.stderr')
| -rw-r--r-- | tests/ui/lint/lint-unconditional-recursion.stderr | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ui/lint/lint-unconditional-recursion.stderr b/tests/ui/lint/lint-unconditional-recursion.stderr index 9d200a7898e..d75754bf9f9 100644 --- a/tests/ui/lint/lint-unconditional-recursion.stderr +++ b/tests/ui/lint/lint-unconditional-recursion.stderr @@ -139,7 +139,7 @@ error: function cannot return without recursing LL | fn index(&self, x: usize) -> &Baz { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing LL | &self[x] - | ------- recursive call site + | --- recursive call site | = help: a `loop` may express intention better if this is on purpose |
