Created
January 4, 2015 06:57
-
-
Save anonymous/9978fc4970927eff3478 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(phase)] | |
#![no_std] | |
#![feature(globs)] | |
#[phase(plugin, link)] | |
extern crate "std" as std; | |
extern crate serialize; | |
#[prelude_import] | |
use std::prelude::v1::*; | |
struct Foo(int); | |
#[automatically_derived] | |
impl <__S: ::serialize::Encoder> ::serialize::Encodable<__S> for Foo { | |
fn encode(&self, __arg_0: &mut __S) | |
-> ::std::result::Result<(), ::__S::Error> { | |
match *self { | |
Foo(ref __self_0_0) => | |
__arg_0.emit_struct("Foo", 1u, |_e| { | |
return _e.emit_struct_field("_field0", 0u, | |
|_e| | |
(*__self_0_0).encode(_e)); | |
}), | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment