Skip to content

Instantly share code, notes, and snippets.

@alexcrichton
Forked from anonymous/wut.rs
Created January 4, 2015 06:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexcrichton/0b9b06423f137abacee0 to your computer and use it in GitHub Desktop.
Save alexcrichton/0b9b06423f137abacee0 to your computer and use it in GitHub Desktop.
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
#![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