about summary refs log tree commit diff
path: root/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs
diff options
context:
space:
mode:
authorChayim Refael Friedman <chayimfr@gmail.com>2025-01-09 05:22:14 +0200
committerChayim Refael Friedman <chayimfr@gmail.com>2025-01-09 05:22:14 +0200
commit13e302c3242fdbea1ea6e3204784804a01b5224a (patch)
treeab168ca5563d899538ec2291df9670566f8e42cb /tests/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs
parent8982535dc2247ac5fc1970bd498793fa2ec8c4f8 (diff)
downloadrust-13e302c3242fdbea1ea6e3204784804a01b5224a.tar.gz
rust-13e302c3242fdbea1ea6e3204784804a01b5224a.zip
Fix actual token lookup in completion's `expand()`
It should be left biased, not right biased, because when e.g. the use has typed `h` then requested completion, the `h` is what we want to find, not the next token (which might indeed be inside a macro call).

I'm not sure why I wrote `right_biased()` to begin with (I remember I had a reason and not just "both should work"), I might've copied the code in `expand_and_analyze()` (which is wrong, because there it lookups on the speculative file, where right biased will always find the correct token and left biased not).

This is still not perfect, because there might not be an identifier already typed then we might still end up in a macro call, but this is the best we can do.
Diffstat (limited to 'tests/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs')
0 files changed, 0 insertions, 0 deletions