diff options
| author | Basile Desloges <basile.desloges@gmail.com> | 2017-10-05 11:03:32 +0200 |
|---|---|---|
| committer | Basile Desloges <basile.desloges@gmail.com> | 2017-10-06 17:44:50 +0200 |
| commit | ef2f42d04a4c83dd5b50cd672b8a1b0791e00f98 (patch) | |
| tree | 52daa15a1bfa1fd09d14a9b1aeb3e5e355ad564d /src/test/run-pass/thinlto | |
| parent | 456e12ec38f669b26b08414527ee1dc35091da33 (diff) | |
| download | rust-ef2f42d04a4c83dd5b50cd672b8a1b0791e00f98.tar.gz rust-ef2f42d04a4c83dd5b50cd672b8a1b0791e00f98.zip | |
mir-borrowck: Autoderef values followed by a constant index, and fix reported lvalue for constant index
Previously the constant index was reported as `[x of y]` or `[-x of y]` where `x` was the offset and `y` the minimum length of the slice. The minus sign wasn't in the right case since for `&[_, x, .., _, _]`, the error reported was `[-1 of 4]`, and for `&[_, _, .., x, _]`, the error reported was `[2 of 4]`. This commit fixes the sign so that the indexes 1 and -2 are reported, and remove the ` of y` part of the message to make it more succinct.
Diffstat (limited to 'src/test/run-pass/thinlto')
0 files changed, 0 insertions, 0 deletions
