about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorMorgan Thomas <corp@m0rg.dev>2022-03-11 18:26:01 -0800
committerMorgan Thomas <corp@m0rg.dev>2022-03-11 18:26:01 -0800
commit2a22cf8efca9cdf70dc849f974f9ee858171853e (patch)
tree9963eca79a437bed7b76a7e39f786b10cace27f1 /src/test/codegen/src-hash-algorithm
parent1c5b2c7d03d684227279877a813fdf16790e4552 (diff)
downloadrust-2a22cf8efca9cdf70dc849f974f9ee858171853e.tar.gz
rust-2a22cf8efca9cdf70dc849f974f9ee858171853e.zip
Complete enum variants identically to structures.
In particular:
 - unit variants now display in the menu as "Variant", complete to "Variant", and display a detail of "Variant" (was "()")
 - tuple variants now display in the menu as "Variant(…)", complete to "Variant(${1:()})$0" (was "Variant($0)"), and display a detail of "Variant(type)" (was "(type)")
 - record variants now display in the menu as "Variant {…}", complete to "Variant { x: ${1:()} }$0" (was "Variant"), and display a detail of "Variant { x: type }" (was "{x: type}")

This behavior is identical to that of struct completions. In addition, tuple variants no longer set triggers_call_info, as to my understanding it's unnecessary now that we're emitting placeholders.

Tests have been updated to match, and the render::enum_variant::tests::inserts_parens_for_tuple_enums test has been removed entirely as it's covered by other tests (render::enum_detail_includes_{record, tuple}_fields, render::enum_detail_just_name_for_unit, render::pattern::enum_qualified).
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions