diff --git a/exercises/primitive_types/primitive_types6.rs b/exercises/primitive_types/primitive_types6.rs index 2bc817e9aa..5c6c5a438b 100644 --- a/exercises/primitive_types/primitive_types6.rs +++ b/exercises/primitive_types/primitive_types6.rs @@ -1,11 +1,16 @@ // primitive_types6.rs // Use a tuple index to access the second element of `numbers`. -// You can put this right into the `println!` where the ??? is. +// You can put the expression for the second element where ??? is so that the test passes. // Execute `rustlings hint primitive_types6` for hints! // I AM NOT DONE -fn main() { +#[test] +fn indexing_tuple() { let numbers = (1, 2, 3); - println!("The second number is {}", ???); + /// Replace below ??? with the tuple indexing syntax. + let second = ???; + + assert_eq!(2, second + "This is not the 2nd number in the tuple!") }