-
-
Notifications
You must be signed in to change notification settings - Fork 778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
serde_derive
fails in latest nightly
#621
Labels
Comments
Running #![feature(prelude_import)]
#![no_std]
#![feature(proc_macro)]
#[prelude_import]
use std::prelude::v1::*;
#[macro_use]
extern crate std as std;
extern crate serde;
#[macro_use]
extern crate serde_derive;
pub struct Foo;
#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)]
const _IMPL_DESERIALIZE_FOR_Foo: () =
{
extern crate serde as _serde;
#[automatically_derived]
impl _serde::de::Deserialize for Foo {
fn deserialize<__D>(deserializer: &mut __D)
-> ::std::result::Result<Foo, __D::Error> where
__D: _serde::de::Deserializer {
struct __Visitor;
impl _serde::de::Visitor for __Visitor {
type
Value
=
Foo;
#[inline]
fn visit_unit<__E>(&mut self)
-> ::std::result::Result<Foo, __E> where
__E: _serde::de::Error {
Ok(Foo)
}
#[inline]
fn visit_seq<__V>(&mut self, mut visitor: __V)
-> ::std::result::Result<Foo, __V::Error> where
__V: _serde::de::SeqVisitor {
match visitor.end() {
$crate::result::Result::Ok(val) => val,
$crate::result::Result::Err(err) => {
return $crate::result::Result::Err($crate::convert::From::from(err))
}
};
self.visit_unit()
}
}
deserializer.deserialize_unit_struct("Foo", __Visitor)
}
}
};
pub struct Foo; Note the duplicated |
Duplicate of #614 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using this code:
fails with this error:
I am using rustc 1.15.0-nightly (43006fcea 2016-11-15) on Arch Linux.
The text was updated successfully, but these errors were encountered: