Use PhantomData from libcore in examples

This commit is contained in:
David Tolnay
2019-01-19 13:38:08 -08:00
parent 2214fbfa6b
commit b00dee4ecf
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -59,7 +59,7 @@ most Rust primitive types as well as most of the syntax tree types from [`syn`].
let tokens = quote! {
struct SerializeWith #generics #where_clause {
value: &'a #field_ty,
phantom: ::std::marker::PhantomData<#item_ty>,
phantom: core::marker::PhantomData<#item_ty>,
}
impl #generics serde::Serialize for SerializeWith #generics #where_clause {
@@ -73,7 +73,7 @@ let tokens = quote! {
SerializeWith {
value: #value,
phantom: ::std::marker::PhantomData::<#item_ty>,
phantom: core::marker::PhantomData::<#item_ty>,
}
};
```
+2 -2
View File
@@ -63,7 +63,7 @@
//! let tokens = quote! {
//! struct SerializeWith #generics #where_clause {
//! value: &'a #field_ty,
//! phantom: ::std::marker::PhantomData<#item_ty>,
//! phantom: core::marker::PhantomData<#item_ty>,
//! }
//!
//! impl #generics serde::Serialize for SerializeWith #generics #where_clause {
@@ -77,7 +77,7 @@
//!
//! SerializeWith {
//! value: #value,
//! phantom: ::std::marker::PhantomData::<#item_ty>,
//! phantom: core::marker::PhantomData::<#item_ty>,
//! }
//! };
//! #