about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
authorLzu Tao <taolzu@gmail.com>2020-06-02 07:59:11 +0000
committerLzu Tao <taolzu@gmail.com>2020-06-10 01:35:47 +0000
commitfff822fead6249671cbcb090b24bce58fab38de0 (patch)
tree417a72d52d12d147a03535fe7cbe465b3bcdb695 /src/test/rustdoc
parent283522400b5c13dfdf2b7e608e63a70ee8e3d7af (diff)
downloadrust-fff822fead6249671cbcb090b24bce58fab38de0.tar.gz
rust-fff822fead6249671cbcb090b24bce58fab38de0.zip
Migrate to numeric associated consts
Diffstat (limited to 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/show-const-contents.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/rustdoc/show-const-contents.rs b/src/test/rustdoc/show-const-contents.rs
index b35f67ef912..814339e198f 100644
--- a/src/test/rustdoc/show-const-contents.rs
+++ b/src/test/rustdoc/show-const-contents.rs
@@ -28,8 +28,8 @@ pub const CONST_CALC_I32: i32 = 42 + 1;
 // @!has show_const_contents/constant.CONST_REF_I32.html '; //'
 pub const CONST_REF_I32: &'static i32 = &42;
 
-// @has show_const_contents/constant.CONST_I32_MAX.html '= i32::max_value(); // 2_147_483_647i32'
-pub const CONST_I32_MAX: i32 = i32::max_value();
+// @has show_const_contents/constant.CONST_I32_MAX.html '= i32::MAX; // 2_147_483_647i32'
+pub const CONST_I32_MAX: i32 = i32::MAX;
 
 // @!has show_const_contents/constant.UNIT.html '= ();'
 // @!has show_const_contents/constant.UNIT.html '; //'
@@ -56,11 +56,11 @@ pub use std::i32::MAX;
 
 macro_rules! int_module {
     ($T:ident) => (
-        pub const MIN: $T = $T::min_value();
+        pub const MIN: $T = $T::MIN;
     )
 }
 
-// @has show_const_contents/constant.MIN.html '= i16::min_value(); // -32_768i16'
+// @has show_const_contents/constant.MIN.html '= i16::MIN; // -32_768i16'
 int_module!(i16);
 
 // @has show_const_contents/constant.ESCAPE.html //pre '= r#"<script>alert("ESCAPE");</script>"#;'