We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 87625ed commit e77c529Copy full SHA for e77c529
exercises/primitive_types/primitive_types6.rs
@@ -1,11 +1,16 @@
1
// primitive_types6.rs
2
// Use a tuple index to access the second element of `numbers`.
3
-// 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.
4
// Execute `rustlings hint primitive_types6` for hints!
5
6
// I AM NOT DONE
7
8
-fn main() {
+#[test]
9
+fn indexing_tuple() {
10
let numbers = (1, 2, 3);
- println!("The second number is {}", ???);
11
+ /// Replace below ??? with the tuple indexing syntax.
12
+ let second = ???;
13
+
14
+ assert_eq!(2, second
15
+ "This is not the 2nd number in the tuple!")
16
}
0 commit comments