Lines Matching refs:Lazy
7 use once_cell::unsync::{Lazy, OnceCell};
98 let x = Lazy::new(|| { in lazy_new()
117 let mut x = Lazy::new(|| { in lazy_deref_mut()
145 let lazy: Lazy<std::sync::Mutex<Foo>> = <_>::default(); in lazy_default()
160 let l: Lazy<i32, _> = Lazy::new(|| panic!()); in lazy_into_value()
161 assert!(matches!(Lazy::into_value(l), Err(_))); in lazy_into_value()
162 let l = Lazy::new(|| -> i32 { 92 }); in lazy_into_value()
163 Lazy::force(&l); in lazy_into_value()
164 assert!(matches!(Lazy::into_value(l), Ok(92))); in lazy_into_value()
170 let x: Lazy<String> = Lazy::new(|| panic!("kaboom")); in lazy_poisoning()
216 use once_cell::sync::{Lazy, OnceCell};
381 let x = Lazy::new(|| { in lazy_new()
405 let mut x = Lazy::new(|| { in lazy_deref_mut()
433 let lazy: Lazy<std::sync::Mutex<Foo>> = <_>::default(); in lazy_default()
448 static XS: Lazy<Vec<i32>> = Lazy::new(|| { in static_lazy()
481 let l: Lazy<i32, _> = Lazy::new(|| panic!()); in lazy_into_value()
482 assert!(matches!(Lazy::into_value(l), Err(_))); in lazy_into_value()
483 let l = Lazy::new(|| -> i32 { 92 }); in lazy_into_value()
484 Lazy::force(&l); in lazy_into_value()
485 assert!(matches!(Lazy::into_value(l), Ok(92))); in lazy_into_value()
490 let x: Lazy<String> = Lazy::new(|| panic!("kaboom")); in lazy_poisoning()
501 assert_traits::<Lazy<String>>(); in once_cell_is_sync_send()