diff options
| author | Lzu Tao <taolzu@gmail.com> | 2020-06-02 07:59:11 +0000 |
|---|---|---|
| committer | Lzu Tao <taolzu@gmail.com> | 2020-06-10 01:35:47 +0000 |
| commit | fff822fead6249671cbcb090b24bce58fab38de0 (patch) | |
| tree | 417a72d52d12d147a03535fe7cbe465b3bcdb695 /src/liballoc/sync | |
| parent | 283522400b5c13dfdf2b7e608e63a70ee8e3d7af (diff) | |
| download | rust-fff822fead6249671cbcb090b24bce58fab38de0.tar.gz rust-fff822fead6249671cbcb090b24bce58fab38de0.zip | |
Migrate to numeric associated consts
Diffstat (limited to 'src/liballoc/sync')
| -rw-r--r-- | src/liballoc/sync/tests.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/liballoc/sync/tests.rs b/src/liballoc/sync/tests.rs index a2bb651e2b7..6f08cd7f123 100644 --- a/src/liballoc/sync/tests.rs +++ b/src/liballoc/sync/tests.rs @@ -465,14 +465,14 @@ fn test_from_vec() { fn test_downcast() { use std::any::Any; - let r1: Arc<dyn Any + Send + Sync> = Arc::new(i32::max_value()); + let r1: Arc<dyn Any + Send + Sync> = Arc::new(i32::MAX); let r2: Arc<dyn Any + Send + Sync> = Arc::new("abc"); assert!(r1.clone().downcast::<u32>().is_err()); let r1i32 = r1.downcast::<i32>(); assert!(r1i32.is_ok()); - assert_eq!(r1i32.unwrap(), Arc::new(i32::max_value())); + assert_eq!(r1i32.unwrap(), Arc::new(i32::MAX)); assert!(r2.clone().downcast::<i32>().is_err()); |
