rustc: For one-tuples, make parsing and printing the type work

and add a test to reflect-visit-data
This commit is contained in:
Tim Chevalier
2013-02-18 17:45:56 -08:00
parent 612553cb39
commit aa284de1fc
6 changed files with 26 additions and 5 deletions

View File

@@ -43,6 +43,8 @@ impl ToStr for @str {
pure fn to_str(&self) -> ~str { ::str::from_slice(*self) }
}
// FIXME #4898: impl for one-tuples
impl<A: ToStr, B: ToStr> ToStr for (A, B) {
#[inline(always)]
pure fn to_str(&self) -> ~str {