mirror of
https://github.com/openharmony/third_party_rust_quote.git
synced 2026-07-19 22:03:30 -04:00
Use PhantomData from libcore in examples
This commit is contained in:
@@ -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
@@ -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>,
|
||||
//! }
|
||||
//! };
|
||||
//! #
|
||||
|
||||
Reference in New Issue
Block a user