about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-09-02 02:05:45 -0700
committerbors <bors@rust-lang.org>2013-09-02 02:05:45 -0700
commit7ff102a685de250eeecc77eb8a6d82cd25c1d8a5 (patch)
tree405d5a8e5fc03aed0c7979debf4cb9c4d75b30a3 /src/test
parent6a3dd30afe64f2d9f10a68ebc178ce22d8c90075 (diff)
parent67a8ea521a81bbc7e2cab893d778eaaa8d34bb6c (diff)
downloadrust-7ff102a685de250eeecc77eb8a6d82cd25c1d8a5.tar.gz
rust-7ff102a685de250eeecc77eb8a6d82cd25c1d8a5.zip
auto merge of #8927 : thestinger/rust/repr, r=huonw
Diffstat (limited to 'src/test')
-rw-r--r--src/test/debug-info/tuple-struct.rs3
-rw-r--r--src/test/run-pass/reflect-visit-data.rs28
-rw-r--r--src/test/run-pass/reflect-visit-type.rs8
3 files changed, 20 insertions, 19 deletions
diff --git a/src/test/debug-info/tuple-struct.rs b/src/test/debug-info/tuple-struct.rs
index 1368053f48c..762b8dcb38f 100644
--- a/src/test/debug-info/tuple-struct.rs
+++ b/src/test/debug-info/tuple-struct.rs
@@ -34,7 +34,8 @@
 
 
 // This test case mainly makes sure that no field names are generated for tuple structs (as opposed
-// to all fields having the name "__field__"). Otherwise they are handled the same a normal structs.
+// to all fields having the name "<unnamed_field>"). Otherwise they are handled the same a normal
+// structs.
 
 struct NoPadding16(u16, i16);
 struct NoPadding32(i32, f32, u32);
diff --git a/src/test/run-pass/reflect-visit-data.rs b/src/test/run-pass/reflect-visit-data.rs
index 317fdb634bc..2d9f4a2ff6f 100644
--- a/src/test/run-pass/reflect-visit-data.rs
+++ b/src/test/run-pass/reflect-visit-data.rs
@@ -317,26 +317,26 @@ impl<V:TyVisitor + movable_ptr> TyVisitor for ptr_visit_adaptor<V> {
         true
     }
 
-    fn visit_enter_class(&mut self, name: &str, n_fields: uint, sz: uint, align: uint)
-                      -> bool {
+    fn visit_enter_class(&mut self, name: &str, named_fields: bool, n_fields: uint, sz: uint,
+                         align: uint) -> bool {
         self.align(align);
-        if ! self.inner.visit_enter_class(name, n_fields, sz, align) {
+        if ! self.inner.visit_enter_class(name, named_fields, n_fields, sz, align) {
             return false;
         }
         true
     }
 
-    fn visit_class_field(&mut self, i: uint, name: &str,
+    fn visit_class_field(&mut self, i: uint, name: &str, named: bool,
                          mtbl: uint, inner: *TyDesc) -> bool {
-        if ! self.inner.visit_class_field(i, name, mtbl, inner) {
+        if ! self.inner.visit_class_field(i, name, named, mtbl, inner) {
             return false;
         }
         true
     }
 
-    fn visit_leave_class(&mut self, name: &str, n_fields: uint, sz: uint, align: uint)
-                      -> bool {
-        if ! self.inner.visit_leave_class(name, n_fields, sz, align) {
+    fn visit_leave_class(&mut self, name: &str, named_fields: bool, n_fields: uint, sz: uint,
+                         align: uint) -> bool {
+        if ! self.inner.visit_leave_class(name, named_fields, n_fields, sz, align) {
             return false;
         }
         true
@@ -428,9 +428,9 @@ impl<V:TyVisitor + movable_ptr> TyVisitor for ptr_visit_adaptor<V> {
         true
     }
 
-    fn visit_trait(&mut self) -> bool {
+    fn visit_trait(&mut self, name: &str) -> bool {
         self.align_to::<@TyVisitor>();
-        if ! self.inner.visit_trait() { return false; }
+        if ! self.inner.visit_trait(name) { return false; }
         self.bump_past::<@TyVisitor>();
         true
     }
@@ -565,13 +565,13 @@ impl TyVisitor for my_visitor {
     fn visit_leave_rec(&mut self, _n_fields: uint,
                        _sz: uint, _align: uint) -> bool { true }
 
-    fn visit_enter_class(&mut self, _name: &str, _n_fields: uint,
+    fn visit_enter_class(&mut self, _name: &str, _named_fields: bool, _n_fields: uint,
                          _sz: uint, _align: uint) -> bool { true }
-    fn visit_class_field(&mut self, _i: uint, _name: &str,
+    fn visit_class_field(&mut self, _i: uint, _name: &str, _named: bool,
                          _mtbl: uint, inner: *TyDesc) -> bool {
         self.visit_inner(inner)
     }
-    fn visit_leave_class(&mut self, _name: &str, _n_fields: uint,
+    fn visit_leave_class(&mut self, _name: &str, _named_fields: bool, _n_fields: uint,
                          _sz: uint, _align: uint) -> bool { true }
 
     fn visit_enter_tup(&mut self, _n_fields: uint,
@@ -616,7 +616,7 @@ impl TyVisitor for my_visitor {
                       _n_inputs: uint, _retstyle: uint) -> bool { true }
 
 
-    fn visit_trait(&mut self) -> bool { true }
+    fn visit_trait(&mut self, _name: &str) -> bool { true }
     fn visit_param(&mut self, _i: uint) -> bool { true }
     fn visit_self(&mut self) -> bool { true }
     fn visit_type(&mut self) -> bool { true }
diff --git a/src/test/run-pass/reflect-visit-type.rs b/src/test/run-pass/reflect-visit-type.rs
index 32df4376983..b3d81d9c511 100644
--- a/src/test/run-pass/reflect-visit-type.rs
+++ b/src/test/run-pass/reflect-visit-type.rs
@@ -99,11 +99,11 @@ impl TyVisitor for MyVisitor {
     fn visit_leave_rec(&mut self, _n_fields: uint,
                        _sz: uint, _align: uint) -> bool { true }
 
-    fn visit_enter_class(&mut self, _name: &str, _n_fields: uint,
+    fn visit_enter_class(&mut self, _name: &str, _named_fields: bool, _n_fields: uint,
                          _sz: uint, _align: uint) -> bool { true }
-    fn visit_class_field(&mut self, _i: uint, _name: &str,
+    fn visit_class_field(&mut self, _i: uint, _name: &str, _named: bool,
                          _mtbl: uint, _inner: *TyDesc) -> bool { true }
-    fn visit_leave_class(&mut self, _name: &str, _n_fields: uint,
+    fn visit_leave_class(&mut self, _name: &str, _named_fields: bool, _n_fields: uint,
                          _sz: uint, _align: uint) -> bool { true }
 
     fn visit_enter_tup(&mut self, _n_fields: uint,
@@ -139,7 +139,7 @@ impl TyVisitor for MyVisitor {
                       _n_inputs: uint, _retstyle: uint) -> bool { true }
 
 
-    fn visit_trait(&mut self) -> bool { true }
+    fn visit_trait(&mut self, _name: &str) -> bool { true }
     fn visit_param(&mut self, _i: uint) -> bool { true }
     fn visit_self(&mut self) -> bool { true }
     fn visit_type(&mut self) -> bool { true }