File tree 1 file changed +2
-15
lines changed
1 file changed +2
-15
lines changed Original file line number Diff line number Diff line change 206
206
//!
207
207
//!
208
208
//! ```
209
- //! use std::fmt;
210
- //!
211
209
//! use once_cell::sync::OnceCell;
212
210
//!
213
- //! #[derive(Debug)]
214
211
//! pub struct LateInit<T> { cell: OnceCell<T> }
215
212
//!
216
213
//! impl<T> LateInit<T> {
240
237
//! a: LateInit<&'a A<'a>>
241
238
//! }
242
239
//!
243
- //! impl fmt::Debug for A<'_> {
244
- //! fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
245
- //! write!(f, "A")
246
- //! }
247
- //! }
248
- //!
249
- //! impl fmt::Debug for B<'_> {
250
- //! fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
251
- //! write!(f, "B")
252
- //! }
253
- //! }
254
240
//!
255
241
//! fn build_cycle() {
256
242
//! let a = A::default();
257
243
//! let b = B::default();
258
244
//! a.b.init(&b);
259
245
//! b.a.init(&a);
260
- //! println!("{:?}", a.b.a.b.a);
246
+ //!
247
+ //! let _a = &a.b.a.b.a;
261
248
//! }
262
249
//! ```
263
250
//!
You can’t perform that action at this time.
0 commit comments