about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
authorbstrie <bstrie@thinwsl>2020-10-24 19:21:40 -0400
committerbstrie <bstrie@thinwsl>2020-11-29 00:55:55 -0500
commit90a2e5e3fe59a254d4d707aa291517b3791ea5a6 (patch)
treed69ece1bc91aeb70d7bbf1d1180107eb90d5225f /src/test/rustdoc
parent914d07ae5f90f01f138e66807873295fceaa9a26 (diff)
downloadrust-90a2e5e3fe59a254d4d707aa291517b3791ea5a6.tar.gz
rust-90a2e5e3fe59a254d4d707aa291517b3791ea5a6.zip
Update tests to remove old numeric constants
Part of #68490.

Care has been taken to leave the old consts where appropriate, for testing backcompat regressions, module shadowing, etc. The intrinsics docs were accidentally referring to some methods on f64 as std::f64, which I changed due to being contrary with how we normally disambiguate the shadow module from the primitive. In one other place I changed std::u8 to std::ops since it was just testing path handling in macros.

For places which have legitimate uses of the old consts, deprecated attributes have been optimistically inserted. Although currently unnecessary, they exist to emphasize to any future deprecation effort the necessity of these specific symbols and prevent them from being accidentally removed.
Diffstat (limited to 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/reexport-check.rs1
-rw-r--r--src/test/rustdoc/show-const-contents.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/test/rustdoc/reexport-check.rs b/src/test/rustdoc/reexport-check.rs
index 066b0cfe5e8..841702987ef 100644
--- a/src/test/rustdoc/reexport-check.rs
+++ b/src/test/rustdoc/reexport-check.rs
@@ -6,6 +6,7 @@ extern crate reexport_check;
 // @!has 'foo/index.html' '//code' 'pub use self::i32;'
 // @has 'foo/index.html' '//tr[@class="module-item"]' 'i32'
 // @has 'foo/i32/index.html'
+#[allow(deprecated, deprecated_in_future)]
 pub use std::i32;
 // @!has 'foo/index.html' '//code' 'pub use self::string::String;'
 // @has 'foo/index.html' '//tr[@class="module-item"]' 'String'
diff --git a/src/test/rustdoc/show-const-contents.rs b/src/test/rustdoc/show-const-contents.rs
index 814339e198f..f5a356bcae6 100644
--- a/src/test/rustdoc/show-const-contents.rs
+++ b/src/test/rustdoc/show-const-contents.rs
@@ -52,6 +52,7 @@ pub const MY_TYPE_WITH_STR: MyTypeWithStr = MyTypeWithStr("show this");
 pub use std::f32::consts::PI;
 
 // @has show_const_contents/constant.MAX.html '= i32::MAX; // 2_147_483_647i32'
+#[allow(deprecated, deprecated_in_future)]
 pub use std::i32::MAX;
 
 macro_rules! int_module {