diff options
author | bors <bors@rust-lang.org> | 2022-11-19 12:46:29 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2022-11-19 12:46:29 +0000 |
commit | 2d9ed4fd483e0caddab03dc78f805a37232463df (patch) | |
tree | 776903b23cdce1977c9f99ec38a5980f473b6464 /tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs | |
parent | 8050fdb9c78c1c39de3d3f4882826becc78bee1e (diff) | |
parent | 6d4b2b4b17841cdb29e99bf7e7e71b57dbaa2dc1 (diff) | |
download | rust-2d9ed4fd483e0caddab03dc78f805a37232463df.tar.gz |
Auto merge of #13641 - DesmondWillowbrook:fix-move-format-string, r=Veykril
fix: format expression parsing edge-cases
- Handle positional arguments with formatting options (i.e. `{:b}`). Previously copied `:b` as an argument, producing broken code.
- Handle indexed positional arguments (`{0}`) ([reference](https://doc.rust-lang.org/std/fmt/#positional-parameters)). Previously copied over `0` as an argument.
Note: the assist also breaks when named arguments are used (`"{name}$0", name = 2 + 2` is converted to `"{}"$0, name`. I'm working on fix for that as well.
Diffstat (limited to 'tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs')
0 files changed, 0 insertions, 0 deletions