-
-
Save alexcrichton/0b9b06423f137abacee0 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
wut.rs:11:1: 23:2 error: type parameter `__S` must also appear as a type parameter of some type defined within this crate | |
wut.rs:11 impl <__S: ::serialize::Encoder> ::serialize::Encodable<__S> for Foo { | |
wut.rs:12 fn encode(&self, __arg_0: &mut __S) | |
wut.rs:13 -> ::std::result::Result<(), ::__S::Error> { | |
wut.rs:14 match *self { | |
wut.rs:15 Foo(ref __self_0_0) => | |
wut.rs:16 __arg_0.emit_struct("Foo", 1u, |_e| { | |
... | |
wut.rs:11:1: 23:2 note: for a limited time, you can add `#![feature(old_orphan_check)]` to your crate to disable this rule | |
wut.rs:11 impl <__S: ::serialize::Encoder> ::serialize::Encodable<__S> for Foo { | |
wut.rs:12 fn encode(&self, __arg_0: &mut __S) | |
wut.rs:13 -> ::std::result::Result<(), ::__S::Error> { | |
wut.rs:14 match *self { | |
wut.rs:15 Foo(ref __self_0_0) => | |
wut.rs:16 __arg_0.emit_struct("Foo", 1u, |_e| { | |
... | |
error: aborting due to previous error |
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