We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d4907a commit 0743cecCopy full SHA for 0743cec
src/libcore/repr.rs
@@ -569,6 +569,9 @@ pub fn write_repr<T>(writer: @Writer, object: &T) {
569
}
570
571
572
+#[test]
573
+struct P {a: int, b: float}
574
+
575
#[test]
576
fn test_repr() {
577
@@ -609,11 +612,11 @@ fn test_repr() {
609
612
"~[\"hi\", \"there\"]");
610
613
exact_test(&(&["hi", "there"]),
611
614
"&[\"hi\", \"there\"]");
- exact_test(&({a:10, b:1.234}),
615
+ exact_test(&(P{a:10, b:1.234}),
616
"{a: 10, b: 1.2340}");
- exact_test(&(@{a:10, b:1.234}),
617
+ exact_test(&(@P{a:10, b:1.234}),
618
"@{a: 10, b: 1.2340}");
- exact_test(&(~{a:10, b:1.234}),
619
+ exact_test(&(~P{a:10, b:1.234}),
620
"~{a: 10, b: 1.2340}");
621
exact_test(&(10_u8, ~"hello"),
622
"(10, ~\"hello\")");
0 commit comments