|
103 | 103 | //!
|
104 | 104 | //! ```rust
|
105 | 105 | //! # #![feature(rustc_private)]
|
106 |
| -//! # #![allow(deprecated)] |
107 |
| -//! extern crate serialize; |
108 |
| -//! use serialize::json::{self, ToJson, Json}; |
| 106 | +//! extern crate serialize as rustc_serialize; |
| 107 | +//! use rustc_serialize::json::{self, ToJson, Json}; |
109 | 108 | //!
|
110 | 109 | //! // A custom data structure
|
111 | 110 | //! struct ComplexNum {
|
|
121 | 120 | //! }
|
122 | 121 | //!
|
123 | 122 | //! // Only generate `RustcEncodable` trait implementation
|
124 |
| -//! #[derive(Encodable)] |
| 123 | +//! #[derive(RustcEncodable)] |
125 | 124 | //! pub struct ComplexNumRecord {
|
126 | 125 | //! uid: u8,
|
127 | 126 | //! dsc: String,
|
|
144 | 143 | //!
|
145 | 144 | //! ```rust
|
146 | 145 | //! # #![feature(rustc_private)]
|
147 |
| -//! # #![allow(deprecated)] |
148 |
| -//! extern crate serialize; |
| 146 | +//! extern crate serialize as rustc_serialize; |
149 | 147 | //! use std::collections::BTreeMap;
|
150 |
| -//! use serialize::json::{self, Json, ToJson}; |
| 148 | +//! use rustc_serialize::json::{self, Json, ToJson}; |
151 | 149 | //!
|
152 |
| -//! // Only generate `Decodable` trait implementation |
153 |
| -//! #[derive(Decodable)] |
| 150 | +//! // Only generate `RustcDecodable` trait implementation |
| 151 | +//! #[derive(RustcDecodable)] |
154 | 152 | //! pub struct TestStruct {
|
155 | 153 | //! data_int: u8,
|
156 | 154 | //! data_str: String,
|
|
0 commit comments