From d9e0b103c47edae04a7c0b2f8f541307a79afac2 Mon Sep 17 00:00:00 2001 From: Remo Senekowitsch Date: Sat, 9 May 2026 19:31:44 +0200 Subject: [PATCH] Update hint of enums2 This was discussed in another PR, but it was merged before the code was updated to the most recent consensus: https://github.com/rust-lang/rustlings/pull/2353 Co-authored-by: Piotr Spieker --- rustlings-macros/info.toml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/rustlings-macros/info.toml b/rustlings-macros/info.toml index d88b549e..ae6e24a9 100644 --- a/rustlings-macros/info.toml +++ b/rustlings-macros/info.toml @@ -438,8 +438,14 @@ name = "enums2" dir = "08_enums" test = false hint = """ -You can create enumerations that have different variants with different types -such as struct-like, tuple-like and unit-only variants.""" +Enum variants can be defined using three different forms: struct-, tuple- and +unit-like. Here's an example enum definition, which uses all three forms: + +enum EnumUsingAllVariantForms { + StructLike { named_field: bool }, + TupleLike(bool), + UnitLike, +}""" [[exercises]] name = "enums3"