diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 8c63a5d..4552a44 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -26,7 +26,7 @@ jobs:
steps:
- id: main
- uses: trailofbits/check-up-to-dateness@v1
+ uses: trailofbits/check-up-to-dateness@v2
test:
needs: [check-up-to-dateness]
diff --git a/Cargo.lock b/Cargo.lock
index 46d3394..a283fa7 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -86,42 +86,20 @@ dependencies = [
[[package]]
name = "ctor"
-version = "0.11.1"
+version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "400a21f1014a968ec518c7ccdf9b4a4ed0cac8c56ccb6d604f8b91f00110501e"
+checksum = "6d765eb1c0bda10d31e0ea185f5ee15da532d60b0912d2bd1441783439e749c5"
dependencies = [
- "ctor-proc-macro",
- "dtor",
"link-section",
+ "linktime-proc-macro",
]
-[[package]]
-name = "ctor-proc-macro"
-version = "0.0.13"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a949c44fcacbbbb7ada007dc7acb34603dd97cd47de5d054f2b6493ecebb483"
-
[[package]]
name = "difflib"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8"
-[[package]]
-name = "dtor"
-version = "0.11.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96eb86b441d67a711e6e76b410de7135385fec1b8cd304e99d11c56ae542e2fc"
-dependencies = [
- "dtor-proc-macro",
-]
-
-[[package]]
-name = "dtor-proc-macro"
-version = "0.0.13"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2647271c92754afcb174e758003cfd1cbf1e43e5a7853d7b1813e63e19e39a73"
-
[[package]]
name = "either"
version = "1.15.0"
@@ -240,9 +218,15 @@ checksum = "6800badb6cb2082ffd7b6a67e6125bb39f18782f793520caee8cb8846be06112"
[[package]]
name = "link-section"
-version = "0.11.0"
+version = "0.17.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4d1e908a416d6e9f725743b84a36feea40c4c131e805fbc26d61f9f451f36080"
+
+[[package]]
+name = "linktime-proc-macro"
+version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8acde40189b7f4b102f876f43a98ec1f5899f96e9a144945d36d9ce0be7f99c7"
+checksum = "a44cd706ff0d503ee32b2071166510ca27e281228de10cd3aa8d35ff94560f81"
[[package]]
name = "linux-raw-sys"
diff --git a/assets/std.json b/assets/std.json
index fdd4563..caf56c0 100644
--- a/assets/std.json
+++ b/assets/std.json
@@ -50,7 +50,7 @@
"name": "std_detect"
}
},
- "format_version": 55,
+ "format_version": 56,
"includes_private": false,
"index": {
"0": {
@@ -142,8 +142,8 @@
"use": {
"id": 101,
"is_glob": false,
- "name": "Clone",
- "source": "core::prelude::v1::Clone"
+ "name": "Copy",
+ "source": "core::prelude::v1::Copy"
}
},
"links": {},
@@ -151,11 +151,11 @@
"span": {
"begin": [
52,
- 30
+ 37
],
"end": [
52,
- 35
+ 41
],
"filename": "std/src/prelude/v1.rs"
},
@@ -164,10 +164,10 @@
"10000": {
"attrs": [
{
- "other": "#[doc(alias = \"fmaf128\", alias = \"fusedMultiplyAdd\")]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"const_float_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 35, patch: 0})}, feature: \"copysign\"}}]"
},
{
"must_use": {
@@ -177,7 +177,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Fused multiply-add. Computes `(self * a) + b` with only one rounding\nerror, yielding a more accurate result than an unfused multiply-add.\n\nUsing `mul_add` *may* be more performant than an unfused multiply-add if\nthe target architecture has a dedicated `fma` CPU instruction. However,\nthis is not always true, and will be heavily dependant on designing\nalgorithms with specific target hardware in mind.\n\n# Precision\n\nThe result of this operation is guaranteed to be the rounded\ninfinite-precision result. It is specified by IEEE 754 as\n`fusedMultiplyAdd` and guaranteed not to change.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet m = 10.0_f128;\nlet x = 4.0_f128;\nlet b = 60.0_f128;\n\nassert_eq!(m.mul_add(x, b), 100.0);\nassert_eq!(m * x + b, 100.0);\n\nlet one_plus_eps = 1.0_f128 + f128::EPSILON;\nlet one_minus_eps = 1.0_f128 - f128::EPSILON;\nlet minus_one = -1.0_f128;\n\n// The exact result (1 + eps) * (1 - eps) = 1 - eps * eps.\nassert_eq!(one_plus_eps.mul_add(one_minus_eps, minus_one), -f128::EPSILON * f128::EPSILON);\n// Different rounding with the non-fused multiply and add.\nassert_eq!(one_plus_eps * one_minus_eps + minus_one, 0.0);\n# }\n```",
+ "docs": "Returns a number composed of the magnitude of `self` and the sign of\n`sign`.\n\nEqual to `self` if the sign of `self` and `sign` are the same, otherwise equal to `-self`.\nIf `self` is a NaN, then a NaN with the same payload as `self` and the sign bit of `sign` is\nreturned.\n\nIf `sign` is a NaN, then this operation will still carry over its sign into the result. Note\nthat IEEE 754 doesn't assign any meaning to the sign bit in case of a NaN, and as Rust\ndoesn't guarantee that the bit pattern of NaNs are conserved over arithmetic operations, the\nresult of `copysign` with `sign` being a NaN might produce an unexpected or non-portable\nresult. See the [specification of NaN bit patterns](primitive@f32#nan-bit-patterns) for more\ninfo.\n\n# Examples\n\n```\nlet f = 3.5_f32;\n\nassert_eq!(f.copysign(0.42), 3.5_f32);\nassert_eq!(f.copysign(-0.42), -3.5_f32);\nassert_eq!((-f).copysign(0.42), 3.5_f32);\nassert_eq!((-f).copysign(-0.42), -3.5_f32);\n\nassert!(f32::NAN.copysign(1.0).is_nan());\n```",
"id": 10000,
"inner": {
"function": {
@@ -189,7 +189,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -201,44 +201,43 @@
}
],
[
- "a",
- {
- "primitive": "f128"
- }
- ],
- [
- "b",
+ "sign",
{
- "primitive": "f128"
+ "primitive": "f32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "f128"
+ "primitive": "f32"
}
}
}
},
- "links": {},
- "name": "mul_add",
+ "links": {
+ "primitive@f32#nan-bit-patterns": 265
+ },
+ "name": "copysign",
"span": {
"begin": [
- 1657,
+ 1511,
5
],
"end": [
- 1657,
- 51
+ 1511,
+ 50
],
- "filename": "checkouts/rust/library/core/src/num/f128.rs"
+ "filename": "checkouts/rust/library/core/src/num/f32.rs"
},
"visibility": "public"
},
"10001": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 136469, is_soft: false}, feature: \"float_algebraic\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136469, is_soft: false}, feature: \"float_algebraic\"}}]"
},
{
"must_use": {
@@ -248,7 +247,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates Euclidean division, the matching method for `rem_euclid`.\n\nThis computes the integer `n` such that\n`self = n * rhs + self.rem_euclid(rhs)`.\nIn other words, the result is `self / rhs` rounded to the integer `n`\nsuch that `self >= n * rhs`.\n\n# Precision\n\nThe result of this operation is guaranteed to be the rounded\ninfinite-precision result.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet a: f128 = 7.0;\nlet b = 4.0;\nassert_eq!(a.div_euclid(b), 1.0); // 7.0 > 4.0 * 1.0\nassert_eq!((-a).div_euclid(b), -2.0); // -7.0 >= 4.0 * -2.0\nassert_eq!(a.div_euclid(-b), -1.0); // 7.0 >= -4.0 * -1.0\nassert_eq!((-a).div_euclid(-b), 2.0); // -7.0 >= -4.0 * 2.0\n# }\n```",
+ "docs": "Float addition that allows optimizations based on algebraic rules.\n\nSee [algebraic operators](primitive@f32#algebraic-operators) for more info.",
"id": 10001,
"inner": {
"function": {
@@ -260,7 +259,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -274,39 +273,41 @@
[
"rhs",
{
- "primitive": "f128"
+ "primitive": "f32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "f128"
+ "primitive": "f32"
}
}
}
},
- "links": {},
- "name": "div_euclid",
+ "links": {
+ "primitive@f32#algebraic-operators": 265
+ },
+ "name": "algebraic_add",
"span": {
"begin": [
- 1693,
+ 1522,
5
],
"end": [
- 1693,
- 47
+ 1522,
+ 54
],
- "filename": "checkouts/rust/library/core/src/num/f128.rs"
+ "filename": "checkouts/rust/library/core/src/num/f32.rs"
},
"visibility": "public"
},
"10002": {
"attrs": [
{
- "other": "#[doc(alias = \"modulo\", alias = \"mod\")]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 136469, is_soft: false}, feature: \"float_algebraic\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136469, is_soft: false}, feature: \"float_algebraic\"}}]"
},
{
"must_use": {
@@ -316,7 +317,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the least nonnegative remainder of `self (mod rhs)`.\n\nIn particular, the return value `r` satisfies `0.0 <= r < rhs.abs()` in\nmost cases. However, due to a floating point round-off error it can\nresult in `r == rhs.abs()`, violating the mathematical definition, if\n`self` is much smaller than `rhs.abs()` in magnitude and `self < 0.0`.\nThis result is not an element of the function's codomain, but it is the\nclosest floating point number in the real numbers and thus fulfills the\nproperty `self == self.div_euclid(rhs) * rhs + self.rem_euclid(rhs)`\napproximately.\n\n# Precision\n\nThe result of this operation is guaranteed to be the rounded\ninfinite-precision result.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet a: f128 = 7.0;\nlet b = 4.0;\nassert_eq!(a.rem_euclid(b), 3.0);\nassert_eq!((-a).rem_euclid(b), 1.0);\nassert_eq!(a.rem_euclid(-b), 3.0);\nassert_eq!((-a).rem_euclid(-b), 1.0);\n// limitation due to round-off error\nassert!((-f128::EPSILON).rem_euclid(3.0) != 0.0);\n# }\n```",
+ "docs": "Float subtraction that allows optimizations based on algebraic rules.\n\nSee [algebraic operators](primitive@f32#algebraic-operators) for more info.",
"id": 10002,
"inner": {
"function": {
@@ -328,7 +329,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -342,36 +343,41 @@
[
"rhs",
{
- "primitive": "f128"
+ "primitive": "f32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "f128"
+ "primitive": "f32"
}
}
}
},
- "links": {},
- "name": "rem_euclid",
+ "links": {
+ "primitive@f32#algebraic-operators": 265
+ },
+ "name": "algebraic_sub",
"span": {
"begin": [
- 1739,
+ 1533,
5
],
"end": [
- 1739,
- 47
+ 1533,
+ 54
],
- "filename": "checkouts/rust/library/core/src/num/f128.rs"
+ "filename": "checkouts/rust/library/core/src/num/f32.rs"
},
"visibility": "public"
},
"10003": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 136469, is_soft: false}, feature: \"float_algebraic\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136469, is_soft: false}, feature: \"float_algebraic\"}}]"
},
{
"must_use": {
@@ -381,7 +387,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Raises a number to an integer power.\n\nUsing this function is generally faster than using `powf`.\nIt might have a different sequence of rounding operations than `powf`,\nso the results are not guaranteed to agree.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet x = 2.0_f128;\nlet abs_difference = (x.powi(2) - (x * x)).abs();\nassert!(abs_difference <= f128::EPSILON);\n\nassert_eq!(f128::powi(f128::NAN, 0), 1.0);\n# }\n```",
+ "docs": "Float multiplication that allows optimizations based on algebraic rules.\n\nSee [algebraic operators](primitive@f32#algebraic-operators) for more info.",
"id": 10003,
"inner": {
"function": {
@@ -393,7 +399,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -405,41 +411,43 @@
}
],
[
- "n",
+ "rhs",
{
- "primitive": "i32"
+ "primitive": "f32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "f128"
+ "primitive": "f32"
}
}
}
},
- "links": {},
- "name": "powi",
+ "links": {
+ "primitive@f32#algebraic-operators": 265
+ },
+ "name": "algebraic_mul",
"span": {
"begin": [
- 1773,
+ 1544,
5
],
"end": [
- 1773,
- 38
+ 1544,
+ 54
],
- "filename": "checkouts/rust/library/core/src/num/f128.rs"
+ "filename": "checkouts/rust/library/core/src/num/f32.rs"
},
"visibility": "public"
},
"10004": {
"attrs": [
{
- "other": "#[doc(alias = \"squareRoot\")]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 136469, is_soft: false}, feature: \"float_algebraic\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136469, is_soft: false}, feature: \"float_algebraic\"}}]"
},
{
"must_use": {
@@ -449,7 +457,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the square root of a number.\n\nReturns NaN if `self` is a negative number other than `-0.0`.\n\n# Precision\n\nThe result of this operation is guaranteed to be the rounded\ninfinite-precision result. It is specified by IEEE 754 as `squareRoot`\nand guaranteed not to change.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet positive = 4.0_f128;\nlet negative = -4.0_f128;\nlet negative_zero = -0.0_f128;\n\nassert_eq!(positive.sqrt(), 2.0);\nassert!(negative.sqrt().is_nan());\nassert!(negative_zero.sqrt() == negative_zero);\n# }\n```",
+ "docs": "Float division that allows optimizations based on algebraic rules.\n\nSee [algebraic operators](primitive@f32#algebraic-operators) for more info.",
"id": 10004,
"inner": {
"function": {
@@ -461,7 +469,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -471,45 +479,119 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "f32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "f128"
+ "primitive": "f32"
}
}
}
},
- "links": {},
- "name": "sqrt",
+ "links": {
+ "primitive@f32#algebraic-operators": 265
+ },
+ "name": "algebraic_div",
"span": {
"begin": [
- 1809,
+ 1555,
5
],
"end": [
- 1809,
- 30
+ 1555,
+ 54
],
- "filename": "checkouts/rust/library/core/src/num/f128.rs"
+ "filename": "checkouts/rust/library/core/src/num/f32.rs"
},
"visibility": "public"
},
"10005": {
"attrs": [
{
- "other": "#[doc(test(attr(feature(cfg_target_has_reliable_f16_f128),\nexpect(internal_features))))]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 136469, is_soft: false}, feature: \"float_algebraic\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136469, is_soft: false}, feature: \"float_algebraic\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "method returns a new number and does not mutate the original value"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Float remainder that allows optimizations based on algebraic rules.\n\nSee [algebraic operators](primitive@f32#algebraic-operators) for more info.",
"id": 10005,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "f32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "f32"
+ }
+ }
+ }
+ },
+ "links": {
+ "primitive@f32#algebraic-operators": 265
+ },
+ "name": "algebraic_rem",
+ "span": {
+ "begin": [
+ 1566,
+ 5
+ ],
+ "end": [
+ 1566,
+ 54
+ ],
+ "filename": "checkouts/rust/library/core/src/num/f32.rs"
+ },
+ "visibility": "public"
+ },
+ "10006": {
+ "attrs": [],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": null,
+ "id": 10006,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
- "primitive": "f128"
+ "primitive": "f32"
},
"generics": {
"params": [],
@@ -519,6 +601,45 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 9957,
+ 9958,
+ 9959,
+ 9960,
+ 9962,
+ 9964,
+ 9961,
+ 9963,
+ 9965,
+ 9966,
+ 9967,
+ 9968,
+ 9969,
+ 9970,
+ 9971,
+ 9972,
+ 9973,
+ 8892,
+ 9974,
+ 9975,
+ 9976,
+ 9977,
+ 9978,
+ 9979,
+ 9980,
+ 9981,
+ 9982,
+ 9983,
+ 8894,
+ 9984,
+ 9985,
+ 9986,
+ 9987,
+ 9989,
+ 9988,
+ 9990,
+ 9991,
+ 9992,
+ 9993,
9994,
9995,
9996,
@@ -529,7 +650,8 @@
10001,
10002,
10003,
- 10004
+ 10004,
+ 10005
],
"provided_trait_methods": [],
"trait": null
@@ -539,48 +661,15 @@
"name": null,
"span": {
"begin": [
- 1426,
+ 388,
1
],
"end": [
- 1426,
- 10
+ 388,
+ 9
],
- "filename": "checkouts/rust/library/core/src/num/f128.rs"
- },
- "visibility": "default"
- },
- "10006": {
- "attrs": [],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 10006,
- "inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "primitive": "f128"
- },
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "is_negative": false,
- "is_synthetic": true,
- "is_unsafe": false,
- "items": [],
- "provided_trait_methods": [],
- "trait": {
- "args": null,
- "id": 1,
- "path": "Send"
- }
- }
+ "filename": "checkouts/rust/library/core/src/num/f32.rs"
},
- "links": {},
- "name": null,
- "span": null,
"visibility": "default"
},
"10007": {
@@ -593,7 +682,7 @@
"impl": {
"blanket_impl": null,
"for": {
- "primitive": "f128"
+ "primitive": "f32"
},
"generics": {
"params": [],
@@ -606,8 +695,8 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 5,
- "path": "Sync"
+ "id": 1,
+ "path": "Send"
}
}
},
@@ -626,7 +715,7 @@
"impl": {
"blanket_impl": null,
"for": {
- "primitive": "f128"
+ "primitive": "f32"
},
"generics": {
"params": [],
@@ -639,8 +728,8 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
- "path": "Freeze"
+ "id": 5,
+ "path": "Sync"
}
}
},
@@ -659,7 +748,7 @@
"impl": {
"blanket_impl": null,
"for": {
- "primitive": "f128"
+ "primitive": "f32"
},
"generics": {
"params": [],
@@ -672,8 +761,8 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 7,
- "path": "Unpin"
+ "id": 313,
+ "path": "Freeze"
}
}
},
@@ -820,7 +909,7 @@
"impl": {
"blanket_impl": null,
"for": {
- "primitive": "f128"
+ "primitive": "f32"
},
"generics": {
"params": [],
@@ -833,8 +922,8 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
- "path": "UnwindSafe"
+ "id": 7,
+ "path": "Unpin"
}
}
},
@@ -853,7 +942,7 @@
"impl": {
"blanket_impl": null,
"for": {
- "primitive": "f128"
+ "primitive": "f32"
},
"generics": {
"params": [],
@@ -866,8 +955,8 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
- "path": "RefUnwindSafe"
+ "id": 316,
+ "path": "UnwindSafe"
}
}
},
@@ -882,13 +971,46 @@
"deprecation": null,
"docs": null,
"id": 10012,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "f32"
+ },
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": true,
+ "is_unsafe": false,
+ "items": [],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 318,
+ "path": "RefUnwindSafe"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": null,
+ "visibility": "default"
+ },
+ "10013": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 10013,
"inner": {
"impl": {
"blanket_impl": {
"generic": "T"
},
"for": {
- "primitive": "f128"
+ "primitive": "f32"
},
"generics": {
"params": [
@@ -931,7 +1053,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -947,7 +1069,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -956,30 +1078,30 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "10013": {
+ "10014": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 10013,
+ "id": 10014,
"inner": {
"impl": {
"blanket_impl": {
"generic": "T"
},
"for": {
- "primitive": "f128"
+ "primitive": "f32"
},
"generics": {
"params": [
@@ -1022,7 +1144,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -1038,7 +1160,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -1047,30 +1169,30 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "10014": {
+ "10015": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 10014,
+ "id": 10015,
"inner": {
"impl": {
"blanket_impl": {
"generic": "T"
},
"for": {
- "primitive": "f128"
+ "primitive": "f32"
},
"generics": {
"params": [
@@ -1095,7 +1217,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -1127,30 +1249,30 @@
"name": null,
"span": {
"begin": [
- 516,
+ 515,
1
],
"end": [
- 516,
+ 515,
42
],
"filename": "checkouts/rust/library/core/src/clone.rs"
},
"visibility": "default"
},
- "10015": {
+ "10016": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 10015,
+ "id": 10016,
"inner": {
"impl": {
"blanket_impl": {
"generic": "T"
},
"for": {
- "primitive": "f128"
+ "primitive": "f32"
},
"generics": {
"params": [
@@ -1214,7 +1336,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -1239,30 +1361,30 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "10016": {
+ "10017": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 10016,
+ "id": 10017,
"inner": {
"impl": {
"blanket_impl": {
"generic": "T"
},
"for": {
- "primitive": "f128"
+ "primitive": "f32"
},
"generics": {
"params": [
@@ -1283,7 +1405,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -1308,30 +1430,30 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "10017": {
+ "10018": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 10017,
+ "id": 10018,
"inner": {
"impl": {
"blanket_impl": {
"generic": "T"
},
"for": {
- "primitive": "f128"
+ "primitive": "f32"
},
"generics": {
"params": [
@@ -1377,7 +1499,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -1395,8 +1517,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -1412,7 +1534,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -1421,30 +1543,30 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "10018": {
+ "10019": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 10018,
+ "id": 10019,
"inner": {
"impl": {
"blanket_impl": {
"generic": "T"
},
"for": {
- "primitive": "f128"
+ "primitive": "f32"
},
"generics": {
"params": [
@@ -1508,8 +1630,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -1525,7 +1647,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -1534,100 +1656,17 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "10019": {
- "attrs": [],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 10019,
- "inner": {
- "impl": {
- "blanket_impl": {
- "generic": "T"
- },
- "for": {
- "primitive": "f128"
- },
- "generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "T"
- }
- ],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "outlives": "'static"
- },
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "maybe",
- "trait": {
- "args": null,
- "id": 3,
- "path": "Sized"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "T"
- }
- }
- }
- ]
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 338
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": null,
- "id": 341,
- "path": "Any"
- }
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 138,
- 1
- ],
- "end": [
- 138,
- 36
- ],
- "filename": "checkouts/rust/library/core/src/any.rs"
- },
- "visibility": "default"
- },
"1002": {
"attrs": [],
"crate_id": 0,
@@ -1768,7 +1807,90 @@
"generic": "T"
},
"for": {
- "primitive": "f128"
+ "primitive": "f32"
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "outlives": "'static"
+ },
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "maybe",
+ "trait": {
+ "args": null,
+ "id": 3,
+ "path": "Sized"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "T"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 336
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 339,
+ "path": "Any"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 138,
+ 1
+ ],
+ "end": [
+ 138,
+ 36
+ ],
+ "filename": "checkouts/rust/library/core/src/any.rs"
+ },
+ "visibility": "default"
+ },
+ "10021": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 10021,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "primitive": "f32"
},
"generics": {
"params": [
@@ -1793,7 +1915,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -1820,7 +1942,7 @@
],
"trait": {
"args": null,
- "id": 157,
+ "id": 155,
"path": "ToOwned"
}
}
@@ -1829,139 +1951,202 @@
"name": null,
"span": {
"begin": [
- 82,
+ 85,
1
],
"end": [
- 84,
+ 87,
14
],
"filename": "checkouts/rust/library/alloc/src/borrow.rs"
},
"visibility": "default"
},
- "10021": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "The smallest value that can be represented by this integer type\n(−27).\n\n# Examples\n\n```\nassert_eq!(i8::MIN, -128);\n```",
- "id": 10021,
- "inner": {
- "assoc_const": {
- "type": {
- "primitive": "i8"
- },
- "value": "_"
- }
- },
- "links": {},
- "name": "MIN",
- "span": {
- "begin": [
- 247,
- 5
- ],
- "end": [
- 266,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
"10022": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
- }
- ],
- "crate_id": 1,
+ "attrs": [],
+ "crate_id": 0,
"deprecation": null,
- "docs": "The largest value that can be represented by this integer type\n(27 − 1).\n\n# Examples\n\n```\nassert_eq!(i8::MAX, 127);\n```",
+ "docs": null,
"id": 10022,
"inner": {
- "assoc_const": {
- "type": {
- "primitive": "i8"
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
},
- "value": "_"
+ "for": {
+ "primitive": "f32"
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 436,
+ "path": "Display"
+ }
+ }
+ },
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "maybe",
+ "trait": {
+ "args": null,
+ "id": 3,
+ "path": "Sized"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "T"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 434
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 161,
+ "path": "ToString"
+ }
}
},
"links": {},
- "name": "MAX",
+ "name": null,
"span": {
"begin": [
- 247,
- 5
+ 2866,
+ 1
],
"end": [
- 266,
- 6
+ 2866,
+ 46
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/alloc/src/string.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
"10023": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 53, patch: 0})}, feature: \"int_bits_const\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"const_float_round_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
+ },
+ {
+ "must_use": {
+ "reason": "method returns a new number and does not mutate the original value"
+ }
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "The size of this integer type in bits.\n\n# Examples\n\n```\nassert_eq!(i8::BITS, 8);\n```",
+ "docs": "Returns the largest integer less than or equal to `self`.\n\nThis function always returns the precise result.\n\n# Examples\n\n```\nlet f = 3.7_f64;\nlet g = 3.0_f64;\nlet h = -3.7_f64;\n\nassert_eq!(f.floor(), 3.0);\nassert_eq!(g.floor(), 3.0);\nassert_eq!(h.floor(), -4.0);\n```",
"id": 10023,
"inner": {
- "assoc_const": {
- "type": {
- "primitive": "u32"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "value": "u8::BITS"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "f64"
+ }
+ }
}
},
"links": {},
- "name": "BITS",
+ "name": "floor",
"span": {
"begin": [
- 247,
+ 49,
5
],
"end": [
- 266,
+ 51,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10024": {
"attrs": [
{
- "other": "#[doc(alias = \"popcount\")]"
+ "other": "#[doc(alias = \"ceiling\")]"
},
{
- "other": "#[doc(alias = \"popcnt\")]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"const_float_round_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Returns the number of ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 0b100_0000i8;\n\nassert_eq!(n.count_ones(), 1);\n```\n",
+ "docs": "Returns the smallest integer greater than or equal to `self`.\n\nThis function always returns the precise result.\n\n# Examples\n\n```\nlet f = 3.01_f64;\nlet g = 4.0_f64;\n\nassert_eq!(f.ceil(), 4.0);\nassert_eq!(g.ceil(), 4.0);\n```",
"id": 10024,
"inner": {
"function": {
@@ -1987,43 +2172,49 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "count_ones",
+ "name": "ceil",
"span": {
"begin": [
- 247,
+ 72,
5
],
"end": [
- 266,
+ 74,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10025": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"const_float_round_methods\",\npromotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
+ {
+ "other": "#[attr = Inline(Hint)]"
+ },
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Returns the number of zeros in the binary representation of `self`.\n\n# Examples\n\n```\nassert_eq!(i8::MAX.count_zeros(), 1);\n```",
+ "docs": "Returns the nearest integer to `self`. If a value is half-way between two\nintegers, round away from `0.0`.\n\nThis function always returns the precise result.\n\n# Examples\n\n```\nlet f = 3.3_f64;\nlet g = -3.3_f64;\nlet h = -3.7_f64;\nlet i = 3.5_f64;\nlet j = 4.5_f64;\n\nassert_eq!(f.round(), 3.0);\nassert_eq!(g.round(), -3.0);\nassert_eq!(h.round(), -4.0);\nassert_eq!(i.round(), 4.0);\nassert_eq!(j.round(), 5.0);\n```",
"id": 10025,
"inner": {
"function": {
@@ -2049,46 +2240,49 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "count_zeros",
+ "name": "round",
"span": {
"begin": [
- 247,
+ 101,
5
],
"end": [
- 266,
+ 103,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10026": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"const_float_round_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 77, patch: 0})}, feature: \"round_ties_even\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
},
{
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Returns the base 2 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero.\n\n# Examples\n\n```\nassert_eq!(2i8.ilog2(), 1);\n```",
+ "docs": "Returns the nearest integer to a number. Rounds half-way cases to the number\nwith an even least significant digit.\n\nThis function always returns the precise result.\n\n# Examples\n\n```\nlet f = 3.3_f64;\nlet g = -3.3_f64;\nlet h = 3.5_f64;\nlet i = 4.5_f64;\n\nassert_eq!(f.round_ties_even(), 3.0);\nassert_eq!(g.round_ties_even(), -3.0);\nassert_eq!(h.round_ties_even(), 4.0);\nassert_eq!(i.round_ties_even(), 4.0);\n```",
"id": 10026,
"inner": {
"function": {
@@ -2114,43 +2308,52 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "ilog2",
+ "name": "round_ties_even",
"span": {
"begin": [
- 247,
+ 128,
5
],
"end": [
- 266,
+ 130,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10027": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[doc(alias = \"truncate\")]"
+ },
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"const_float_round_methods\",\npromotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
+ {
+ "other": "#[attr = Inline(Hint)]"
+ },
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Returns the number of leading zeros in the binary representation of `self`.\n\nDepending on what you're doing with the value, you might also be interested in the\n[`ilog2`] function which returns a consistent number, even if the type widens.\n\n# Examples\n\n```\nlet n = -1i8;\n\nassert_eq!(n.leading_zeros(), 0);\n```\n[`ilog2`]: i8::ilog2",
+ "docs": "Returns the integer part of `self`.\nThis means that non-integer numbers are always truncated towards zero.\n\nThis function always returns the precise result.\n\n# Examples\n\n```\nlet f = 3.7_f64;\nlet g = 3.0_f64;\nlet h = -3.7_f64;\n\nassert_eq!(f.trunc(), 3.0);\nassert_eq!(g.trunc(), 3.0);\nassert_eq!(h.trunc(), -3.0);\n```",
"id": 10027,
"inner": {
"function": {
@@ -2176,45 +2379,49 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "f64"
}
}
}
},
- "links": {
- "i8::ilog2": 10026
- },
- "name": "leading_zeros",
+ "links": {},
+ "name": "trunc",
"span": {
"begin": [
- 247,
+ 154,
5
],
"end": [
- 266,
+ 156,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10028": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"const_float_round_methods\",\npromotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
+ {
+ "other": "#[attr = Inline(Hint)]"
+ },
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Returns the number of trailing zeros in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = -4i8;\n\nassert_eq!(n.trailing_zeros(), 2);\n```",
+ "docs": "Returns the fractional part of `self`.\n\nThis function always returns the precise result.\n\n# Examples\n\n```\nlet x = 3.6_f64;\nlet y = -3.6_f64;\nlet abs_difference_x = (x.fract() - 0.6).abs();\nlet abs_difference_y = (y.fract() - (-0.6)).abs();\n\nassert!(abs_difference_x < 1e-10);\nassert!(abs_difference_y < 1e-10);\n```",
"id": 10028,
"inner": {
"function": {
@@ -2240,43 +2447,52 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "trailing_zeros",
+ "name": "fract",
"span": {
"begin": [
- 247,
+ 178,
5
],
"end": [
- 266,
+ 180,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10029": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
+ "other": "#[doc(alias = \"fma\", alias = \"fusedMultiplyAdd\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 146724, is_soft: false}, feature: \"const_mul_add\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Returns the number of leading ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = -1i8;\n\nassert_eq!(n.leading_ones(), 8);\n```",
+ "docs": "Fused multiply-add. Computes `(self * a) + b` with only one rounding\nerror, yielding a more accurate result than an unfused multiply-add.\n\nUsing `mul_add` *may* be more performant than an unfused multiply-add if\nthe target architecture has a dedicated `fma` CPU instruction. However,\nthis is not always true, and will be heavily dependant on designing\nalgorithms with specific target hardware in mind.\n\n# Precision\n\nThe result of this operation is guaranteed to be the rounded\ninfinite-precision result. It is specified by IEEE 754 as\n`fusedMultiplyAdd` and guaranteed not to change.\n\n# Examples\n\n```\nlet m = 10.0_f64;\nlet x = 4.0_f64;\nlet b = 60.0_f64;\n\nassert_eq!(m.mul_add(x, b), 100.0);\nassert_eq!(m * x + b, 100.0);\n\nlet one_plus_eps = 1.0_f64 + f64::EPSILON;\nlet one_minus_eps = 1.0_f64 - f64::EPSILON;\nlet minus_one = -1.0_f64;\n\n// The exact result (1 + eps) * (1 - eps) = 1 - eps * eps.\nassert_eq!(one_plus_eps.mul_add(one_minus_eps, minus_one), -f64::EPSILON * f64::EPSILON);\n// Different rounding with the non-fused multiply and add.\nassert_eq!(one_plus_eps * one_minus_eps + minus_one, 0.0);\n```",
"id": 10029,
"inner": {
"function": {
@@ -2298,27 +2514,39 @@
{
"generic": "Self"
}
+ ],
+ [
+ "a",
+ {
+ "primitive": "f64"
+ }
+ ],
+ [
+ "b",
+ {
+ "primitive": "f64"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "leading_ones",
+ "name": "mul_add",
"span": {
"begin": [
- 247,
+ 221,
5
],
"end": [
- 266,
+ 223,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
@@ -2397,7 +2625,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -2410,20 +2638,23 @@
"10030": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Returns the number of trailing ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 3i8;\n\nassert_eq!(n.trailing_ones(), 2);\n```",
+ "docs": "Calculates Euclidean division, the matching method for `rem_euclid`.\n\nThis computes the integer `n` such that\n`self = n * rhs + self.rem_euclid(rhs)`.\nIn other words, the result is `self / rhs` rounded to the integer `n`\nsuch that `self >= n * rhs`.\n\n# Precision\n\nThe result of this operation is guaranteed to be the rounded\ninfinite-precision result.\n\n# Examples\n\n```\nlet a: f64 = 7.0;\nlet b = 4.0;\nassert_eq!(a.div_euclid(b), 1.0); // 7.0 > 4.0 * 1.0\nassert_eq!((-a).div_euclid(b), -2.0); // -7.0 >= 4.0 * -2.0\nassert_eq!(a.div_euclid(-b), -1.0); // 7.0 >= -4.0 * -1.0\nassert_eq!((-a).div_euclid(-b), 2.0); // -7.0 >= -4.0 * 2.0\n```",
"id": 10030,
"inner": {
"function": {
@@ -2435,7 +2666,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -2445,44 +2676,59 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "f64"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "trailing_ones",
+ "name": "div_euclid",
"span": {
"begin": [
- 247,
+ 251,
5
],
"end": [
- 266,
+ 253,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10031": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
+ "other": "#[doc(alias = \"modulo\", alias = \"mod\")]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Returns `self` with only the most significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: i8 = 0b_01100100;\n\nassert_eq!(n.isolate_highest_one(), 0b_01000000);\nassert_eq!(0_i8.isolate_highest_one(), 0);\n```",
+ "docs": "Calculates the least nonnegative remainder of `self (mod rhs)`.\n\nIn particular, the return value `r` satisfies `0.0 <= r < rhs.abs()` in\nmost cases. However, due to a floating point round-off error it can\nresult in `r == rhs.abs()`, violating the mathematical definition, if\n`self` is much smaller than `rhs.abs()` in magnitude and `self < 0.0`.\nThis result is not an element of the function's codomain, but it is the\nclosest floating point number in the real numbers and thus fulfills the\nproperty `self == self.div_euclid(rhs) * rhs + self.rem_euclid(rhs)`\napproximately.\n\n# Precision\n\nThe result of this operation is guaranteed to be the rounded\ninfinite-precision result.\n\n# Examples\n\n```\nlet a: f64 = 7.0;\nlet b = 4.0;\nassert_eq!(a.rem_euclid(b), 3.0);\nassert_eq!((-a).rem_euclid(b), 1.0);\nassert_eq!(a.rem_euclid(-b), 3.0);\nassert_eq!((-a).rem_euclid(-b), 1.0);\n// limitation due to round-off error\nassert!((-f64::EPSILON).rem_euclid(3.0) != 0.0);\n```",
"id": 10031,
"inner": {
"function": {
@@ -2494,7 +2740,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -2504,44 +2750,56 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "f64"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "isolate_highest_one",
+ "name": "rem_euclid",
"span": {
"begin": [
- 247,
+ 288,
5
],
"end": [
- 266,
+ 290,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10032": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Returns `self` with only the least significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: i8 = 0b_01100100;\n\nassert_eq!(n.isolate_lowest_one(), 0b_00000100);\nassert_eq!(0_i8.isolate_lowest_one(), 0);\n```",
+ "docs": "Raises a number to an integer power.\n\nUsing this function is generally faster than using `powf`.\nIt might have a different sequence of rounding operations than `powf`,\nso the results are not guaranteed to agree.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and\ncan even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\nlet x = 2.0_f64;\nlet abs_difference = (x.powi(2) - (x * x)).abs();\nassert!(abs_difference <= 1e-14);\n\nassert_eq!(f64::powi(f64::NAN, 0), 1.0);\n```",
"id": 10032,
"inner": {
"function": {
@@ -2553,7 +2811,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -2563,44 +2821,56 @@
{
"generic": "Self"
}
+ ],
+ [
+ "n",
+ {
+ "primitive": "i32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "isolate_lowest_one",
+ "name": "powi",
"span": {
"begin": [
- 247,
+ 316,
5
],
"end": [
- 266,
+ 318,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10033": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Returns the index of the highest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_i8.highest_one(), None);\nassert_eq!(0x1_i8.highest_one(), Some(0));\nassert_eq!(0x10_i8.highest_one(), Some(4));\nassert_eq!(0x1f_i8.highest_one(), Some(4));\n```",
+ "docs": "Raises a number to a floating point power.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and\ncan even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\nlet x = 2.0_f64;\nlet abs_difference = (x.powf(2.0) - (x * x)).abs();\nassert!(abs_difference <= 1e-14);\n\nassert_eq!(f64::powf(1.0, f64::NAN), 1.0);\nassert_eq!(f64::powf(f64::NAN, 0.0), 1.0);\n```",
"id": 10033,
"inner": {
"function": {
@@ -2612,7 +2882,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -2622,59 +2892,59 @@
{
"generic": "Self"
}
+ ],
+ [
+ "n",
+ {
+ "primitive": "f64"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "highest_one",
+ "name": "powf",
"span": {
"begin": [
- 247,
+ 341,
5
],
"end": [
- 266,
+ 343,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10034": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
+ "other": "#[doc(alias = \"squareRoot\")]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Returns the index of the lowest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_i8.lowest_one(), None);\nassert_eq!(0x1_i8.lowest_one(), Some(0));\nassert_eq!(0x10_i8.lowest_one(), Some(4));\nassert_eq!(0x1f_i8.lowest_one(), Some(0));\n```",
+ "docs": "Returns the square root of a number.\n\nReturns NaN if `self` is a negative number other than `-0.0`.\n\n# Precision\n\nThe result of this operation is guaranteed to be the rounded\ninfinite-precision result. It is specified by IEEE 754 as `squareRoot`\nand guaranteed not to change.\n\n# Examples\n\n```\nlet positive = 4.0_f64;\nlet negative = -4.0_f64;\nlet negative_zero = -0.0_f64;\n\nassert_eq!(positive.sqrt(), 2.0);\nassert!(negative.sqrt().is_nan());\nassert!(negative_zero.sqrt() == negative_zero);\n```",
"id": 10034,
"inner": {
"function": {
@@ -2686,7 +2956,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -2700,58 +2970,46 @@
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "lowest_one",
+ "name": "sqrt",
"span": {
"begin": [
- 247,
+ 371,
5
],
"end": [
- 266,
+ 373,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10035": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Returns the bit pattern of `self` reinterpreted as an unsigned integer of the same size.\n\nThis produces the same result as an `as` cast, but ensures that the bit-width remains\nthe same.\n\n# Examples\n\n```\nlet n = -1i8;\n\nassert_eq!(n.cast_unsigned(), u8::MAX);\n```",
+ "docs": "Returns `e^(self)`, (the exponential function).\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and\ncan even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\nlet one = 1.0_f64;\n// e^1\nlet e = one.exp();\n\n// ln(e) - 1 == 0\nlet abs_difference = (e.ln() - 1.0).abs();\n\nassert!(abs_difference < 1e-10);\n```",
"id": 10035,
"inner": {
"function": {
@@ -2763,7 +3021,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -2777,43 +3035,46 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "cast_unsigned",
+ "name": "exp",
"span": {
"begin": [
- 247,
+ 398,
5
],
"end": [
- 266,
+ 400,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10036": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Shifts the bits to the left by a specified amount, `n`,\nwrapping the truncated bits to the end of the resulting integer.\n\nPlease note this isn't the same operation as the `<<` shifting operator!\n\n# Examples\n\n```\nlet n = -0x7ei8;\nlet m = 0xa;\n\nassert_eq!(n.rotate_left(2), m);\n```",
+ "docs": "Returns `2^(self)`.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and\ncan even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\nlet f = 2.0_f64;\n\n// 2^2 - 4 == 0\nlet abs_difference = (f.exp2() - 4.0).abs();\n\nassert!(abs_difference < 1e-10);\n```",
"id": 10036,
"inner": {
"function": {
@@ -2825,7 +3086,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -2835,53 +3096,50 @@
{
"generic": "Self"
}
- ],
- [
- "n",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "rotate_left",
+ "name": "exp2",
"span": {
"begin": [
- 247,
+ 423,
5
],
"end": [
- 266,
+ 425,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10037": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Shifts the bits to the right by a specified amount, `n`,\nwrapping the truncated bits to the beginning of the resulting\ninteger.\n\nPlease note this isn't the same operation as the `>>` shifting operator!\n\n# Examples\n\n```\nlet n = 0xai8;\nlet m = -0x7e;\n\nassert_eq!(n.rotate_right(2), m);\n```",
+ "docs": "Returns the natural logarithm of the number.\n\nThis returns NaN when the number is negative, and negative infinity when number is zero.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and\ncan even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\nlet one = 1.0_f64;\n// e^1\nlet e = one.exp();\n\n// ln(e) - 1 == 0\nlet abs_difference = (e.ln() - 1.0).abs();\n\nassert!(abs_difference < 1e-10);\n```\n\nNon-positive values:\n```\nassert_eq!(0_f64.ln(), f64::NEG_INFINITY);\nassert!((-42_f64).ln().is_nan());\n```",
"id": 10037,
"inner": {
"function": {
@@ -2893,7 +3151,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -2903,53 +3161,50 @@
{
"generic": "Self"
}
- ],
- [
- "n",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "rotate_right",
+ "name": "ln",
"span": {
"begin": [
- 247,
+ 458,
5
],
"end": [
- 266,
+ 460,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10038": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Reverses the byte order of the integer.\n\n# Examples\n\n```\nlet n = 0x12i8;\n\nlet m = n.swap_bytes();\n\nassert_eq!(m, 0x12);\n```",
+ "docs": "Returns the logarithm of the number with respect to an arbitrary base.\n\nThis returns NaN when the number is negative, and negative infinity when number is zero.\n\nThe result might not be correctly rounded owing to implementation details;\n`self.log2()` can produce more accurate results for base 2, and\n`self.log10()` can produce more accurate results for base 10.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and\ncan even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\nlet twenty_five = 25.0_f64;\n\n// log5(25) - 2 == 0\nlet abs_difference = (twenty_five.log(5.0) - 2.0).abs();\n\nassert!(abs_difference < 1e-10);\n```\n\nNon-positive values:\n```\nassert_eq!(0_f64.log(10.0), f64::NEG_INFINITY);\nassert!((-42_f64).log(10.0).is_nan());\n```",
"id": 10038,
"inner": {
"function": {
@@ -2961,7 +3216,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -2971,47 +3226,56 @@
{
"generic": "Self"
}
+ ],
+ [
+ "base",
+ {
+ "primitive": "f64"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "swap_bytes",
+ "name": "log",
"span": {
"begin": [
- 247,
+ 495,
5
],
"end": [
- 266,
+ 497,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10039": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\n second least-significant bit becomes second most-significant bit, etc.\n\n# Examples\n\n```\nlet n = 0x12i8;\nlet m = n.reverse_bits();\n\nassert_eq!(m, 0x48);\nassert_eq!(0, 0i8.reverse_bits());\n```",
+ "docs": "Returns the base 2 logarithm of the number.\n\nThis returns NaN when the number is negative, and negative infinity when number is zero.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and\ncan even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\nlet four = 4.0_f64;\n\n// log2(4) - 2 == 0\nlet abs_difference = (four.log2() - 2.0).abs();\n\nassert!(abs_difference < 1e-10);\n```\n\nNon-positive values:\n```\nassert_eq!(0_f64.log2(), f64::NEG_INFINITY);\nassert!((-42_f64).log2().is_nan());\n```",
"id": 10039,
"inner": {
"function": {
@@ -3023,7 +3287,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -3037,23 +3301,23 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "reverse_bits",
+ "name": "log2",
"span": {
"begin": [
- 247,
+ 528,
5
],
"end": [
- 266,
+ 530,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
@@ -3145,20 +3409,23 @@
"10040": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": null
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Converts an integer from big endian to the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai8;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(i8::from_be(n), n)\n} else {\n assert_eq!(i8::from_be(n), n.swap_bytes())\n}\n```",
+ "docs": "Returns the base 10 logarithm of the number.\n\nThis returns NaN when the number is negative, and negative infinity when number is zero.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and\ncan even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\nlet hundred = 100.0_f64;\n\n// log10(100) - 2 == 0\nlet abs_difference = (hundred.log10() - 2.0).abs();\n\nassert!(abs_difference < 1e-10);\n```\n\nNon-positive values:\n```\nassert_eq!(0_f64.log10(), f64::NEG_INFINITY);\nassert!((-42_f64).log10().is_nan());\n```",
"id": 10040,
"inner": {
"function": {
@@ -3170,57 +3437,63 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
"inputs": [
[
- "x",
+ "self",
{
- "primitive": "i8"
+ "generic": "Self"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "from_be",
+ "name": "log10",
"span": {
"begin": [
- 247,
+ 561,
5
],
"end": [
- 266,
+ 563,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10041": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": null
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Converts an integer from little endian to the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai8;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(i8::from_le(n), n)\n} else {\n assert_eq!(i8::from_le(n), n.swap_bytes())\n}\n```",
+ "crate_id": 0,
+ "deprecation": {
+ "note": "you probably meant `(self - other).abs()`: this operation is `(self - other).max(0.0)` except that `abs_sub` also propagates NaNs (also known as `fdim` in C). If you truly need the positive difference, consider using that expression or the C function `fdim`, depending on how you wish to handle NaN (please consider filing an issue describing your use-case too).",
+ "since": "1.10.0"
+ },
+ "docs": "The positive difference of two numbers.\n\n* If `self <= other`: `0.0`\n* Else: `self - other`\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and\ncan even differ within the same execution from one invocation to the next.\nThis function currently corresponds to the `fdim` from libc on Unix and\nWindows. Note that this might change in the future.\n\n# Examples\n\n```\nlet x = 3.0_f64;\nlet y = -3.0_f64;\n\nlet abs_difference_x = (x.abs_sub(1.0) - 2.0).abs();\nlet abs_difference_y = (y.abs_sub(1.0) - 0.0).abs();\n\nassert!(abs_difference_x < 1e-10);\nassert!(abs_difference_y < 1e-10);\n```",
"id": 10041,
"inner": {
"function": {
@@ -3232,57 +3505,66 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
"inputs": [
[
- "x",
+ "self",
{
- "primitive": "i8"
+ "generic": "Self"
+ }
+ ],
+ [
+ "other",
+ {
+ "primitive": "f64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "from_le",
+ "name": "abs_sub",
"span": {
"begin": [
- 247,
+ 603,
5
],
"end": [
- 266,
+ 606,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10042": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Converts `self` to big endian from the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai8;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(n.to_be(), n)\n} else {\n assert_eq!(n.to_be(), n.swap_bytes())\n}\n```",
+ "docs": "Returns the cube root of a number.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and\ncan even differ within the same execution from one invocation to the next.\nThis function currently corresponds to the `cbrt` from libc on Unix and\nWindows. Note that this might change in the future.\n\n# Examples\n\n```\nlet x = 8.0_f64;\n\n// x^(1/3) - 2 == 0\nlet abs_difference = (x.cbrt() - 2.0).abs();\n\nassert!(abs_difference < 1e-10);\n```",
"id": 10042,
"inner": {
"function": {
@@ -3294,7 +3576,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -3308,43 +3590,46 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "to_be",
+ "name": "cbrt",
"span": {
"begin": [
- 247,
+ 631,
5
],
"end": [
- 266,
+ 633,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10043": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Converts `self` to little endian from the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai8;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(n.to_le(), n)\n} else {\n assert_eq!(n.to_le(), n.swap_bytes())\n}\n```",
+ "docs": "Compute the distance between the origin and a point (`x`, `y`) on the\nEuclidean plane. Equivalently, compute the length of the hypotenuse of a\nright-angle triangle with other sides having length `x.abs()` and\n`y.abs()`.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and\ncan even differ within the same execution from one invocation to the next.\nThis function currently corresponds to the `hypot` from libc on Unix\nand Windows. Note that this might change in the future.\n\n# Examples\n\n```\nlet x = 2.0_f64;\nlet y = 3.0_f64;\n\n// sqrt(x^2 + y^2)\nlet abs_difference = (x.hypot(y) - (x.powi(2) + y.powi(2)).sqrt()).abs();\n\nassert!(abs_difference < 1e-10);\n```",
"id": 10043,
"inner": {
"function": {
@@ -3356,7 +3641,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -3366,47 +3651,56 @@
{
"generic": "Self"
}
+ ],
+ [
+ "other",
+ {
+ "primitive": "f64"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "to_le",
+ "name": "hypot",
"span": {
"begin": [
- 247,
+ 662,
5
],
"end": [
- 266,
+ 664,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10044": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Checked integer addition. Computes `self + rhs`, returning `None`\nif overflow occurred.\n\n# Examples\n\n```\nassert_eq!((i8::MAX - 2).checked_add(1), Some(i8::MAX - 1));\nassert_eq!((i8::MAX - 2).checked_add(3), None);\n```",
+ "docs": "Computes the sine of a number (in radians).\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and\ncan even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\nlet x = std::f64::consts::FRAC_PI_2;\n\nlet abs_difference = (x.sin() - 1.0).abs();\n\nassert!(abs_difference < 1e-10);\n```",
"id": 10044,
"inner": {
"function": {
@@ -3418,7 +3712,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -3428,71 +3722,50 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i8"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "checked_add",
+ "name": "sin",
"span": {
"begin": [
- 247,
+ 686,
5
],
"end": [
- 266,
+ 688,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10045": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
},
{
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Strict integer addition. Computes `self + rhs`, panicking\nif overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((i8::MAX - 2).strict_add(1), i8::MAX - 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i8::MAX - 2).strict_add(3);\n```",
+ "docs": "Computes the cosine of a number (in radians).\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and\ncan even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\nlet x = 2.0 * std::f64::consts::PI;\n\nlet abs_difference = (x.cos() - 1.0).abs();\n\nassert!(abs_difference < 1e-10);\n```",
"id": 10045,
"inner": {
"function": {
@@ -3504,7 +3777,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -3514,53 +3787,50 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "strict_add",
+ "name": "cos",
"span": {
"begin": [
- 247,
+ 710,
5
],
"end": [
- 266,
+ 712,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10046": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Wrapping (modular) addition. Computes `self + rhs`, wrapping around at the\nboundary of the type.\n\n# Examples\n\n```\nassert_eq!(100i8.wrapping_add(27), 127);\nassert_eq!(i8::MAX.wrapping_add(2), i8::MIN + 1);\n```",
+ "docs": "Computes the tangent of a number (in radians).\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and\ncan even differ within the same execution from one invocation to the next.\nThis function currently corresponds to the `tan` from libc on Unix and\nWindows. Note that this might change in the future.\n\n# Examples\n\n```\nlet x = std::f64::consts::FRAC_PI_4;\nlet abs_difference = (x.tan() - 1.0).abs();\n\nassert!(abs_difference < 1e-14);\n```",
"id": 10046,
"inner": {
"function": {
@@ -3572,7 +3842,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -3582,56 +3852,53 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "wrapping_add",
+ "name": "tan",
"span": {
"begin": [
- 247,
+ 735,
5
],
"end": [
- 266,
+ 737,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10047": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ "other": "#[doc(alias = \"arcsin\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
},
{
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Unchecked integer addition. Computes `self + rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_add(y)` is semantically equivalent to calling\n`x.`[`checked_add`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_add`].\n\n# Safety\n\nThis results in undefined behavior when\n`self + rhs > i8::MAX` or `self + rhs < i8::MIN`,\ni.e. when [`checked_add`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_add`]: i8::checked_add\n[`wrapping_add`]: i8::wrapping_add",
+ "docs": "Computes the arcsine of a number. Return value is in radians in\nthe range [-pi/2, pi/2] or NaN if the number is outside the range\n[-1, 1].\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and\ncan even differ within the same execution from one invocation to the next.\nThis function currently corresponds to the `asin` from libc on Unix and\nWindows. Note that this might change in the future.\n\n# Examples\n\n```\nlet f = std::f64::consts::FRAC_PI_4;\n\n// asin(sin(pi/2))\nlet abs_difference = (f.sin().asin() - f).abs();\n\nassert!(abs_difference < 1e-14);\n```",
"id": 10047,
"inner": {
"function": {
@@ -3643,8 +3910,8 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
- "is_unsafe": true
+ "is_const": false,
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -3653,56 +3920,53 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
- "links": {
- "i8::checked_add": 10044,
- "i8::wrapping_add": 10046
- },
- "name": "unchecked_add",
+ "links": {},
+ "name": "asin",
"span": {
"begin": [
- 247,
+ 765,
5
],
"end": [
- 266,
+ 767,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10048": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[doc(alias = \"arccos\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Checked addition with an unsigned integer. Computes `self + rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1i8.checked_add_unsigned(2), Some(3));\nassert_eq!((i8::MAX - 2).checked_add_unsigned(3), None);\n```",
+ "docs": "Computes the arccosine of a number. Return value is in radians in\nthe range [0, pi] or NaN if the number is outside the range\n[-1, 1].\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and\ncan even differ within the same execution from one invocation to the next.\nThis function currently corresponds to the `acos` from libc on Unix and\nWindows. Note that this might change in the future.\n\n# Examples\n\n```\nlet f = std::f64::consts::FRAC_PI_4;\n\n// acos(cos(pi/4))\nlet abs_difference = (f.cos().acos() - std::f64::consts::FRAC_PI_4).abs();\n\nassert!(abs_difference < 1e-10);\n```",
"id": 10048,
"inner": {
"function": {
@@ -3714,7 +3978,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -3724,71 +3988,53 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i8"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "checked_add_unsigned",
+ "name": "acos",
"span": {
"begin": [
- 247,
+ 795,
5
],
"end": [
- 266,
+ 797,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10049": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[doc(alias = \"arctan\")]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
},
{
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Strict addition with an unsigned integer. Computes `self + rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1i8.strict_add_unsigned(2), 3);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i8::MAX - 2).strict_add_unsigned(3);\n```",
+ "docs": "Computes the arctangent of a number. Return value is in radians in the\nrange [-pi/2, pi/2];\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and\ncan even differ within the same execution from one invocation to the next.\nThis function currently corresponds to the `atan` from libc on Unix and\nWindows. Note that this might change in the future.\n\n# Examples\n\n```\nlet f = 1.0_f64;\n\n// atan(tan(1))\nlet abs_difference = (f.tan().atan() - 1.0).abs();\n\nassert!(abs_difference < 1e-10);\n```",
"id": 10049,
"inner": {
"function": {
@@ -3800,7 +4046,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -3810,33 +4056,27 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "strict_add_unsigned",
+ "name": "atan",
"span": {
"begin": [
- 247,
+ 824,
5
],
"end": [
- 266,
+ 826,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
@@ -3916,7 +4156,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -3937,7 +4177,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -3958,7 +4198,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -3971,20 +4211,23 @@
"10050": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Checked integer subtraction. Computes `self - rhs`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!((i8::MIN + 2).checked_sub(1), Some(i8::MIN + 1));\nassert_eq!((i8::MIN + 2).checked_sub(3), None);\n```",
+ "docs": "Computes the four quadrant arctangent of `self` (`y`) and `other` (`x`) in radians.\n\n | `x` | `y` | Piecewise Definition | Range |\n |---------|---------|----------------------|---------------|\n | `>= +0` | `>= +0` | `arctan(y/x)` | `[+0, +pi/2]` |\n | `>= +0` | `<= -0` | `arctan(y/x)` | `[-pi/2, -0]` |\n | `<= -0` | `>= +0` | `arctan(y/x) + pi` | `[+pi/2, +pi]`|\n | `<= -0` | `<= -0` | `arctan(y/x) - pi` | `[-pi, -pi/2]`|\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and\ncan even differ within the same execution from one invocation to the next.\nThis function currently corresponds to the `atan2` from libc on Unix\nand Windows. Note that this might change in the future.\n\n# Examples\n\n```\n// Positive angles measured counter-clockwise\n// from positive x axis\n// -pi/4 radians (45 deg clockwise)\nlet x1 = 3.0_f64;\nlet y1 = -3.0_f64;\n\n// 3pi/4 radians (135 deg counter-clockwise)\nlet x2 = -3.0_f64;\nlet y2 = 3.0_f64;\n\nlet abs_difference_1 = (y1.atan2(x1) - (-std::f64::consts::FRAC_PI_4)).abs();\nlet abs_difference_2 = (y2.atan2(x2) - (3.0 * std::f64::consts::FRAC_PI_4)).abs();\n\nassert!(abs_difference_1 < 1e-10);\nassert!(abs_difference_2 < 1e-10);\n```",
"id": 10050,
"inner": {
"function": {
@@ -3996,7 +4239,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -4008,69 +4251,52 @@
}
],
[
- "rhs",
+ "other",
{
- "primitive": "i8"
+ "primitive": "f64"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i8"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "checked_sub",
+ "name": "atan2",
"span": {
"begin": [
- 247,
+ 867,
5
],
"end": [
- 266,
+ 869,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10051": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[doc(alias = \"sincos\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Inline(Hint)]"
},
{
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Strict integer subtraction. Computes `self - rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((i8::MIN + 2).strict_sub(1), i8::MIN + 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i8::MIN + 2).strict_sub(3);\n```",
+ "docs": "Simultaneously computes the sine and cosine of the number, `x`. Returns\n`(sin(x), cos(x))`.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and\ncan even differ within the same execution from one invocation to the next.\nThis function currently corresponds to the `(f64::sin(x),\nf64::cos(x))`. Note that this might change in the future.\n\n# Examples\n\n```\nlet x = std::f64::consts::FRAC_PI_4;\nlet f = x.sin_cos();\n\nlet abs_difference_0 = (f.0 - x.sin()).abs();\nlet abs_difference_1 = (f.1 - x.cos()).abs();\n\nassert!(abs_difference_0 < 1e-10);\nassert!(abs_difference_1 < 1e-10);\n```",
"id": 10051,
"inner": {
"function": {
@@ -4082,7 +4308,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -4092,53 +4318,57 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "tuple": [
+ {
+ "primitive": "f64"
+ },
+ {
+ "primitive": "f64"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "strict_sub",
+ "name": "sin_cos",
"span": {
"begin": [
- 247,
+ 897,
5
],
"end": [
- 266,
+ 899,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10052": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Wrapping (modular) subtraction. Computes `self - rhs`, wrapping around at the\nboundary of the type.\n\n# Examples\n\n```\nassert_eq!(0i8.wrapping_sub(127), -127);\nassert_eq!((-2i8).wrapping_sub(i8::MAX), i8::MAX);\n```",
+ "docs": "Returns `e^(self) - 1` in a way that is accurate even if the\nnumber is close to zero.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and\ncan even differ within the same execution from one invocation to the next.\nThis function currently corresponds to the `expm1` from libc on Unix\nand Windows. Note that this might change in the future.\n\n# Examples\n\n```\nlet x = 1e-16_f64;\n\n// for very small x, e^x is approximately 1 + x + x^2 / 2\nlet approx = x + x * x / 2.0;\nlet abs_difference = (x.exp_m1() - approx).abs();\n\nassert!(abs_difference < 1e-20);\n```",
"id": 10052,
"inner": {
"function": {
@@ -4150,7 +4380,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -4160,56 +4390,53 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "wrapping_sub",
+ "name": "exp_m1",
"span": {
"begin": [
- 247,
+ 926,
5
],
"end": [
- 266,
+ 928,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10053": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ "other": "#[doc(alias = \"log1p\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
},
{
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Unchecked integer subtraction. Computes `self - rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_sub(y)` is semantically equivalent to calling\n`x.`[`checked_sub`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_sub`].\n\n# Safety\n\nThis results in undefined behavior when\n`self - rhs > i8::MAX` or `self - rhs < i8::MIN`,\ni.e. when [`checked_sub`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_sub`]: i8::checked_sub\n[`wrapping_sub`]: i8::wrapping_sub",
+ "docs": "Returns `ln(1+n)` (natural logarithm) more accurately than if\nthe operations were performed separately.\n\nThis returns NaN when `n < -1.0`, and negative infinity when `n == -1.0`.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and\ncan even differ within the same execution from one invocation to the next.\nThis function currently corresponds to the `log1p` from libc on Unix\nand Windows. Note that this might change in the future.\n\n# Examples\n\n```\nlet x = 1e-16_f64;\n\n// for very small x, ln(1 + x) is approximately x - x^2 / 2\nlet approx = x - x * x / 2.0;\nlet abs_difference = (x.ln_1p() - approx).abs();\n\nassert!(abs_difference < 1e-20);\n```\n\nOut-of-range values:\n```\nassert_eq!((-1.0_f64).ln_1p(), f64::NEG_INFINITY);\nassert!((-2.0_f64).ln_1p().is_nan());\n```",
"id": 10053,
"inner": {
"function": {
@@ -4221,8 +4448,8 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
- "is_unsafe": true
+ "is_const": false,
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -4231,56 +4458,50 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
- "links": {
- "i8::checked_sub": 10050,
- "i8::wrapping_sub": 10052
- },
- "name": "unchecked_sub",
+ "links": {},
+ "name": "ln_1p",
"span": {
"begin": [
- 247,
+ 964,
5
],
"end": [
- 266,
+ 966,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10054": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Checked subtraction with an unsigned integer. Computes `self - rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1i8.checked_sub_unsigned(2), Some(-1));\nassert_eq!((i8::MIN + 2).checked_sub_unsigned(3), None);\n```",
+ "docs": "Hyperbolic sine function.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and\ncan even differ within the same execution from one invocation to the next.\nThis function currently corresponds to the `sinh` from libc on Unix\nand Windows. Note that this might change in the future.\n\n# Examples\n\n```\nlet e = std::f64::consts::E;\nlet x = 1.0_f64;\n\nlet f = x.sinh();\n// Solving sinh() at 1 gives `(e^2-1)/(2e)`\nlet g = ((e * e) - 1.0) / (2.0 * e);\nlet abs_difference = (f - g).abs();\n\nassert!(abs_difference < 1e-10);\n```",
"id": 10054,
"inner": {
"function": {
@@ -4292,7 +4513,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -4302,71 +4523,50 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i8"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "checked_sub_unsigned",
+ "name": "sinh",
"span": {
"begin": [
- 247,
+ 994,
5
],
"end": [
- 266,
+ 996,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10055": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
},
{
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Strict subtraction with an unsigned integer. Computes `self - rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1i8.strict_sub_unsigned(2), -1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i8::MIN + 2).strict_sub_unsigned(3);\n```",
+ "docs": "Hyperbolic cosine function.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and\ncan even differ within the same execution from one invocation to the next.\nThis function currently corresponds to the `cosh` from libc on Unix\nand Windows. Note that this might change in the future.\n\n# Examples\n\n```\nlet e = std::f64::consts::E;\nlet x = 1.0_f64;\nlet f = x.cosh();\n// Solving cosh() at 1 gives this result\nlet g = ((e * e) + 1.0) / (2.0 * e);\nlet abs_difference = (f - g).abs();\n\n// Same result\nassert!(abs_difference < 1.0e-10);\n```",
"id": 10055,
"inner": {
"function": {
@@ -4378,7 +4578,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -4388,53 +4588,50 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "strict_sub_unsigned",
+ "name": "cosh",
"span": {
"begin": [
- 247,
+ 1024,
5
],
"end": [
- 266,
+ 1026,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10056": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Checked integer multiplication. Computes `self * rhs`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(i8::MAX.checked_mul(1), Some(i8::MAX));\nassert_eq!(i8::MAX.checked_mul(2), None);\n```",
+ "docs": "Hyperbolic tangent function.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and\ncan even differ within the same execution from one invocation to the next.\nThis function currently corresponds to the `tanh` from libc on Unix\nand Windows. Note that this might change in the future.\n\n# Examples\n\n```\nlet e = std::f64::consts::E;\nlet x = 1.0_f64;\n\nlet f = x.tanh();\n// Solving tanh() at 1 gives `(1 - e^(-2))/(1 + e^(-2))`\nlet g = (1.0 - e.powi(-2)) / (1.0 + e.powi(-2));\nlet abs_difference = (f - g).abs();\n\nassert!(abs_difference < 1.0e-10);\n```",
"id": 10056,
"inner": {
"function": {
@@ -4446,7 +4643,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -4456,71 +4653,53 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i8"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "checked_mul",
+ "name": "tanh",
"span": {
"begin": [
- 247,
+ 1054,
5
],
"end": [
- 266,
+ 1056,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10057": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[doc(alias = \"arcsinh\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
},
{
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Strict integer multiplication. Computes `self * rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(i8::MAX.strict_mul(1), i8::MAX);\n```\n\nThe following panics because of overflow:\n\n``` should_panic\nlet _ = i8::MAX.strict_mul(2);\n```",
+ "docs": "Inverse hyperbolic sine function.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and\ncan even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\nlet x = 1.0_f64;\nlet f = x.sinh().asinh();\n\nlet abs_difference = (f - x).abs();\n\nassert!(abs_difference < 1.0e-10);\n```",
"id": 10057,
"inner": {
"function": {
@@ -4532,7 +4711,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -4542,53 +4721,53 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "strict_mul",
+ "name": "asinh",
"span": {
"begin": [
- 247,
+ 1080,
5
],
"end": [
- 266,
+ 1084,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10058": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[doc(alias = \"arccosh\")]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
+ {
+ "other": "#[attr = Inline(Hint)]"
+ },
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Wrapping (modular) multiplication. Computes `self * rhs`, wrapping around at\nthe boundary of the type.\n\n# Examples\n\n```\nassert_eq!(10i8.wrapping_mul(12), 120);\nassert_eq!(11i8.wrapping_mul(12), -124);\n```",
+ "docs": "Inverse hyperbolic cosine function.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and\ncan even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\nlet x = 1.0_f64;\nlet f = x.cosh().acosh();\n\nlet abs_difference = (f - x).abs();\n\nassert!(abs_difference < 1.0e-10);\n```",
"id": 10058,
"inner": {
"function": {
@@ -4600,7 +4779,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -4610,56 +4789,53 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "wrapping_mul",
+ "name": "acosh",
"span": {
"begin": [
- 247,
+ 1108,
5
],
"end": [
- 266,
+ 1114,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10059": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ "other": "#[doc(alias = \"arctanh\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
},
{
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Unchecked integer multiplication. Computes `self * rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_mul(y)` is semantically equivalent to calling\n`x.`[`checked_mul`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_mul`].\n\n# Safety\n\nThis results in undefined behavior when\n`self * rhs > i8::MAX` or `self * rhs < i8::MIN`,\ni.e. when [`checked_mul`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_mul`]: i8::checked_mul\n[`wrapping_mul`]: i8::wrapping_mul",
+ "docs": "Inverse hyperbolic tangent function.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and\ncan even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\nlet x = std::f64::consts::FRAC_PI_6;\nlet f = x.tanh().atanh();\n\nlet abs_difference = (f - x).abs();\n\nassert!(abs_difference < 1.0e-10);\n```",
"id": 10059,
"inner": {
"function": {
@@ -4671,8 +4847,8 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
- "is_unsafe": true
+ "is_const": false,
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -4681,36 +4857,27 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
- "links": {
- "i8::checked_mul": 10056,
- "i8::wrapping_mul": 10058
- },
- "name": "unchecked_mul",
+ "links": {},
+ "name": "atanh",
"span": {
"begin": [
- 247,
+ 1138,
5
],
"end": [
- 266,
+ 1140,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
@@ -4790,7 +4957,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -4811,7 +4978,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -4832,7 +4999,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -4845,20 +5012,23 @@
"10060": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 99842, is_soft: false}, feature: \"float_gamma\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Checked integer division. Computes `self / rhs`, returning `None` if `rhs == 0`\nor the division results in overflow.\n\n# Examples\n\n```\nassert_eq!((i8::MIN + 1).checked_div(-1), Some(127));\nassert_eq!(i8::MIN.checked_div(-1), None);\nassert_eq!((1i8).checked_div(0), None);\n```",
+ "docs": "Gamma function.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and\ncan even differ within the same execution from one invocation to the next.\nThis function currently corresponds to the `tgamma` from libc on Unix\nand Windows. Note that this might change in the future.\n\n# Examples\n\n```\n#![feature(float_gamma)]\nlet x = 5.0f64;\n\nlet abs_difference = (x.gamma() - 24.0).abs();\n\nassert!(abs_difference <= 1e-10);\n```",
"id": 10060,
"inner": {
"function": {
@@ -4870,7 +5040,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -4880,71 +5050,50 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i8"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "checked_div",
+ "name": "gamma",
"span": {
"begin": [
- 247,
+ 1165,
5
],
"end": [
- 266,
+ 1167,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10061": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 99842, is_soft: false}, feature: \"float_gamma\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
},
{
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Strict integer division. Computes `self / rhs`, panicking\nif overflow occurred.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type.\n\n# Examples\n\n```\nassert_eq!((i8::MIN + 1).strict_div(-1), 127);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i8::MIN.strict_div(-1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1i8).strict_div(0);\n```",
+ "docs": "Natural logarithm of the absolute value of the gamma function\n\nThe integer part of the tuple indicates the sign of the gamma function.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and\ncan even differ within the same execution from one invocation to the next.\nThis function currently corresponds to the `lgamma_r` from libc on Unix\nand Windows. Note that this might change in the future.\n\n# Examples\n\n```\n#![feature(float_gamma)]\nlet x = 2.0f64;\n\nlet abs_difference = (x.ln_gamma().0 - 0.0).abs();\n\nassert!(abs_difference <= f64::EPSILON);\n```",
"id": 10061,
"inner": {
"function": {
@@ -4956,7 +5105,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -4966,53 +5115,57 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "tuple": [
+ {
+ "primitive": "f64"
+ },
+ {
+ "primitive": "i32"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "strict_div",
+ "name": "ln_gamma",
"span": {
"begin": [
- 247,
+ 1194,
5
],
"end": [
- 266,
+ 1198,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10062": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136321, is_soft: false}, feature: \"float_erf\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Checked Euclidean division. Computes `self.div_euclid(rhs)`,\nreturning `None` if `rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!((i8::MIN + 1).checked_div_euclid(-1), Some(127));\nassert_eq!(i8::MIN.checked_div_euclid(-1), None);\nassert_eq!((1i8).checked_div_euclid(0), None);\n```",
+ "docs": "Error function.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\nThis function currently corresponds to the `erf` from libc on Unix\nand Windows. Note that this might change in the future.\n\n# Examples\n\n```\n#![feature(float_erf)]\n/// The error function relates what percent of a normal distribution lies\n/// within `x` standard deviations (scaled by `1/sqrt(2)`).\nfn within_standard_deviations(x: f64) -> f64 {\n (x * std::f64::consts::FRAC_1_SQRT_2).erf() * 100.0\n}\n\n// 68% of a normal distribution is within one standard deviation\nassert!((within_standard_deviations(1.0) - 68.269).abs() < 0.01);\n// 95% of a normal distribution is within two standard deviations\nassert!((within_standard_deviations(2.0) - 95.450).abs() < 0.01);\n// 99.7% of a normal distribution is within three standard deviations\nassert!((within_standard_deviations(3.0) - 99.730).abs() < 0.01);\n```",
"id": 10062,
"inner": {
"function": {
@@ -5024,7 +5177,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -5034,71 +5187,50 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i8"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "checked_div_euclid",
+ "name": "erf",
"span": {
"begin": [
- 247,
+ 1231,
5
],
"end": [
- 266,
+ 1233,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10063": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136321, is_soft: false}, feature: \"float_erf\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
},
{
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Strict Euclidean division. Computes `self.div_euclid(rhs)`, panicking\nif overflow occurred.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type.\n\n# Examples\n\n```\nassert_eq!((i8::MIN + 1).strict_div_euclid(-1), 127);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i8::MIN.strict_div_euclid(-1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1i8).strict_div_euclid(0);\n```",
+ "docs": "Complementary error function.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\nThis function currently corresponds to the `erfc` from libc on Unix\nand Windows. Note that this might change in the future.\n\n# Examples\n\n```\n#![feature(float_erf)]\nlet x: f64 = 0.123;\n\nlet one = x.erf() + x.erfc();\nlet abs_difference = (one - 1.0).abs();\n\nassert!(abs_difference <= 1e-10);\n```",
"id": 10063,
"inner": {
"function": {
@@ -5110,7 +5242,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -5120,482 +5252,287 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "strict_div_euclid",
+ "name": "erfc",
"span": {
"begin": [
- 247,
+ 1260,
5
],
"end": [
- 266,
+ 1262,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
"10064": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[(not(test))]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Checked integer division without remainder. Computes `self / rhs`,\nreturning `None` if `rhs == 0`, the division results in overflow,\nor `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!((i8::MIN + 1).checked_exact_div(-1), Some(127));\nassert_eq!((-5i8).checked_exact_div(2), None);\nassert_eq!(i8::MIN.checked_exact_div(-1), None);\nassert_eq!((1i8).checked_exact_div(0), None);\n```",
+ "docs": null,
"id": 10064,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "f64"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i8"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
- }
- }
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 10023,
+ 10024,
+ 10025,
+ 10026,
+ 10027,
+ 10028,
+ 10029,
+ 10030,
+ 10031,
+ 10032,
+ 10033,
+ 10034,
+ 10035,
+ 10036,
+ 10037,
+ 10038,
+ 10039,
+ 10040,
+ 10041,
+ 10042,
+ 10043,
+ 10044,
+ 10045,
+ 10046,
+ 10047,
+ 10048,
+ 10049,
+ 10050,
+ 10051,
+ 10052,
+ 10053,
+ 10054,
+ 10055,
+ 10056,
+ 10057,
+ 10058,
+ 10059,
+ 10060,
+ 10061,
+ 10062,
+ 10063
+ ],
+ "provided_trait_methods": [],
+ "trait": null
}
},
"links": {},
- "name": "checked_exact_div",
+ "name": null,
"span": {
"begin": [
- 247,
- 5
+ 28,
+ 1
],
"end": [
- 266,
- 6
+ 1263,
+ 2
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f64.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
"10065": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division without remainder. Computes `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs == 0`, the division results in overflow,\nor `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64i8.exact_div(2), 32);\nassert_eq!(64i8.exact_div(32), 2);\nassert_eq!((i8::MIN + 1).exact_div(-1), 127);\n```\n\n```should_panic\n#![feature(exact_div)]\nlet _ = 65i8.exact_div(2);\n```\n```should_panic\n#![feature(exact_div)]\nlet _ = i8::MIN.exact_div(-1);\n```",
+ "docs": "The radix or base of the internal representation of `f64`.",
"id": 10065,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "u32"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i8"
- }
- }
+ "value": "2"
}
},
"links": {},
- "name": "exact_div",
+ "name": "RADIX",
"span": {
"begin": [
- 247,
+ 391,
5
],
"end": [
- 266,
- 6
+ 391,
+ 25
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10066": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer division without remainder. Computes `self / rhs`.\n\n# Safety\n\nThis results in undefined behavior when `rhs == 0`, `self % rhs != 0`, or\n`self == i8::MIN && rhs == -1`,\ni.e. when [`checked_exact_div`](Self::checked_exact_div) would return `None`.",
+ "docs": "Number of significant digits in base 2.\n\nNote that the size of the mantissa in the bitwise representation is one\nsmaller than this since the leading 1 is not stored explicitly.",
"id": 10066,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": true
+ "assoc_const": {
+ "type": {
+ "primitive": "u32"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i8"
- }
- }
+ "value": "53"
}
},
- "links": {
- "Self::checked_exact_div": 10064
- },
- "name": "unchecked_exact_div",
+ "links": {},
+ "name": "MANTISSA_DIGITS",
"span": {
"begin": [
- 247,
+ 398,
5
],
"end": [
- 266,
- 6
+ 398,
+ 35
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10067": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer remainder. Computes `self % rhs`, returning `None` if\n`rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!(5i8.checked_rem(2), Some(1));\nassert_eq!(5i8.checked_rem(0), None);\nassert_eq!(i8::MIN.checked_rem(-1), None);\n```",
+ "docs": "Approximate number of significant digits in base 10.\n\nThis is the maximum x such that any decimal number with x\nsignificant digits can be converted to `f64` and back without loss.\n\nEqual to floor(log10 2[`MANTISSA_DIGITS`] − 1).\n\n[`MANTISSA_DIGITS`]: f64::MANTISSA_DIGITS",
"id": 10067,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "u32"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i8"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
- }
- }
+ "value": "15"
}
},
- "links": {},
- "name": "checked_rem",
+ "links": {
+ "f64::MANTISSA_DIGITS": 10066
+ },
+ "name": "DIGITS",
"span": {
"begin": [
- 247,
+ 408,
5
],
"end": [
- 266,
- 6
+ 408,
+ 26
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10068": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[rustc_diagnostic_item = \"f64_epsilon\"]"
},
{
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer remainder. Computes `self % rhs`, panicking if\nthe division results in overflow.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is `x % y` for `MIN / -1` on a\nsigned type (where `MIN` is the negative minimal value), which is invalid due to implementation artifacts.\n\n# Examples\n\n```\nassert_eq!(5i8.strict_rem(2), 1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5i8.strict_rem(0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i8::MIN.strict_rem(-1);\n```",
+ "docs": "[Machine epsilon] value for `f64`.\n\nThis is the difference between `1.0` and the next larger representable number.\n\nEqual to 21 − [`MANTISSA_DIGITS`].\n\n[Machine epsilon]: https://en.wikipedia.org/wiki/Machine_epsilon\n[`MANTISSA_DIGITS`]: f64::MANTISSA_DIGITS",
"id": 10068,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "f64"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i8"
- }
- }
+ "value": "2.2204460492503131e-16_f64"
}
},
- "links": {},
- "name": "strict_rem",
+ "links": {
+ "f64::MANTISSA_DIGITS": 10066
+ },
+ "name": "EPSILON",
"span": {
"begin": [
- 247,
+ 420,
5
],
"end": [
- 266,
- 6
+ 420,
+ 27
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10069": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked Euclidean remainder. Computes `self.rem_euclid(rhs)`, returning `None`\nif `rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!(5i8.checked_rem_euclid(2), Some(1));\nassert_eq!(5i8.checked_rem_euclid(0), None);\nassert_eq!(i8::MIN.checked_rem_euclid(-1), None);\n```",
+ "docs": "Largest finite `f64` value.\n\nEqual to\n(1 − 2−[`MANTISSA_DIGITS`]) 2[`MAX_EXP`].\n\n[`MANTISSA_DIGITS`]: f64::MANTISSA_DIGITS\n[`MAX_EXP`]: f64::MAX_EXP",
"id": 10069,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "f64"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i8"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
- }
- }
+ "value": "1.7976931348623157e+308_f64"
}
},
- "links": {},
- "name": "checked_rem_euclid",
+ "links": {
+ "f64::MANTISSA_DIGITS": 10066,
+ "f64::MAX_EXP": 10073
+ },
+ "name": "MAX",
"span": {
"begin": [
- 247,
+ 444,
5
],
"end": [
- 266,
- 6
+ 444,
+ 23
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
@@ -5677,7 +5614,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -5693,7 +5630,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -5702,12 +5639,12 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -5716,675 +5653,330 @@
"10070": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- },
- {
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict Euclidean remainder. Computes `self.rem_euclid(rhs)`, panicking if\nthe division results in overflow.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is `x % y` for `MIN / -1` on a\nsigned type (where `MIN` is the negative minimal value), which is invalid due to implementation artifacts.\n\n# Examples\n\n```\nassert_eq!(5i8.strict_rem_euclid(2), 1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5i8.strict_rem_euclid(0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i8::MIN.strict_rem_euclid(-1);\n```",
+ "docs": "Smallest finite `f64` value.\n\nEqual to −[`MAX`].\n\n[`MAX`]: f64::MAX",
"id": 10070,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "f64"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i8"
- }
- }
+ "value": "-1.7976931348623157e+308_f64"
}
},
- "links": {},
- "name": "strict_rem_euclid",
+ "links": {
+ "f64::MAX": 10069
+ },
+ "name": "MIN",
"span": {
"begin": [
- 247,
+ 428,
5
],
"end": [
- 266,
- 6
+ 428,
+ 23
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10071": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked negation. Computes `-self`, returning `None` if `self == MIN`.\n\n# Examples\n\n```\nassert_eq!(5i8.checked_neg(), Some(-5));\nassert_eq!(i8::MIN.checked_neg(), None);\n```",
+ "docs": "One greater than the minimum possible *normal* power of 2 exponent\nfor a significand bounded by 1 ≤ x < 2 (i.e. the IEEE definition).\n\nThis corresponds to the exact minimum possible *normal* power of 2 exponent\nfor a significand bounded by 0.5 ≤ x < 1 (i.e. the C definition).\nIn other words, all normal numbers representable by this type are\ngreater than or equal to 0.5 × 2MIN_EXP.",
"id": 10071,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "i32"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i8"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
- }
- }
+ "value": "-1021"
}
},
"links": {},
- "name": "checked_neg",
+ "name": "MIN_EXP",
"span": {
"begin": [
- 247,
+ 454,
5
],
"end": [
- 266,
- 6
+ 454,
+ 27
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10072": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_neg\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- },
- {
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked negation. Computes `-self`, assuming overflow cannot occur.\n\n# Safety\n\nThis results in undefined behavior when\n`self == i8::MIN`,\ni.e. when [`checked_neg`] would return `None`.\n\n[`checked_neg`]: i8::checked_neg",
+ "docs": "Smallest positive normal `f64` value.\n\nEqual to 2[`MIN_EXP`] − 1.\n\n[`MIN_EXP`]: f64::MIN_EXP",
"id": 10072,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": true
+ "assoc_const": {
+ "type": {
+ "primitive": "f64"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i8"
- }
- }
+ "value": "2.2250738585072014e-308_f64"
}
},
"links": {
- "i8::checked_neg": 10071
+ "f64::MIN_EXP": 10071
},
- "name": "unchecked_neg",
+ "name": "MIN_POSITIVE",
"span": {
"begin": [
- 247,
+ 435,
5
],
"end": [
- 266,
- 6
+ 435,
+ 32
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10073": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- },
- {
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict negation. Computes `-self`, panicking if `self == MIN`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(5i8.strict_neg(), -5);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i8::MIN.strict_neg();\n",
+ "docs": "One greater than the maximum possible power of 2 exponent\nfor a significand bounded by 1 ≤ x < 2 (i.e. the IEEE definition).\n\nThis corresponds to the exact maximum possible power of 2 exponent\nfor a significand bounded by 0.5 ≤ x < 1 (i.e. the C definition).\nIn other words, all numbers representable by this type are\nstrictly less than 2MAX_EXP.",
"id": 10073,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "i32"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i8"
- }
- }
+ "value": "1024"
}
},
"links": {},
- "name": "strict_neg",
+ "name": "MAX_EXP",
"span": {
"begin": [
- 247,
+ 463,
5
],
"end": [
- 266,
- 6
+ 463,
+ 27
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10074": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked shift left. Computes `self << rhs`, returning `None` if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x1i8.checked_shl(4), Some(0x10));\nassert_eq!(0x1i8.checked_shl(129), None);\nassert_eq!(0x10i8.checked_shl(7), Some(0));\n```",
+ "docs": "Minimum x for which 10x is normal.\n\nEqual to ceil(log10 [`MIN_POSITIVE`]).\n\n[`MIN_POSITIVE`]: f64::MIN_POSITIVE",
"id": 10074,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "i32"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i8"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
- }
- }
+ "value": "-307"
}
},
- "links": {},
- "name": "checked_shl",
+ "links": {
+ "f64::MIN_POSITIVE": 10072
+ },
+ "name": "MIN_10_EXP",
"span": {
"begin": [
- 247,
+ 471,
5
],
"end": [
- 266,
- 6
+ 471,
+ 30
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10075": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- },
- {
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict shift left. Computes `self << rhs`, panicking if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x1i8.strict_shl(4), 0x10);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x1i8.strict_shl(129);\n```",
+ "docs": "Maximum x for which 10x is normal.\n\nEqual to floor(log10 [`MAX`]).\n\n[`MAX`]: f64::MAX",
"id": 10075,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "i32"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i8"
- }
- }
+ "value": "308"
}
},
- "links": {},
- "name": "strict_shl",
+ "links": {
+ "f64::MAX": 10069
+ },
+ "name": "MAX_10_EXP",
"span": {
"begin": [
- 247,
+ 478,
5
],
"end": [
- 266,
- 6
+ 478,
+ 30
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10076": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[rustc_diagnostic_item = \"f64_nan\"]"
},
{
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked shift left. Computes `self << rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shl`] would return `None`.\n\n[`checked_shl`]: i8::checked_shl",
+ "docs": "Not a Number (NaN).\n\nNote that IEEE 754 doesn't define just a single NaN value; a plethora of bit patterns are\nconsidered to be NaN. Furthermore, the standard makes a difference between a \"signaling\" and\na \"quiet\" NaN, and allows inspecting its \"payload\" (the unspecified bits in the bit pattern)\nand its sign. See the [specification of NaN bit patterns](f32#nan-bit-patterns) for more\ninfo.\n\nThis constant is guaranteed to be a quiet NaN (on targets that follow the Rust assumptions\nthat the quiet/signaling bit being set to 1 indicates a quiet NaN). Beyond that, nothing is\nguaranteed about the specific bit pattern chosen here: both payload and sign are arbitrary.\nThe concrete bit pattern may change across Rust versions and target platforms.",
"id": 10076,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": true
+ "assoc_const": {
+ "type": {
+ "primitive": "f64"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i8"
- }
- }
+ "value": "_"
}
},
"links": {
- "i8::checked_shl": 10074
+ "f32#nan-bit-patterns": 265
},
- "name": "unchecked_shl",
+ "name": "NAN",
"span": {
"begin": [
- 247,
+ 495,
5
],
"end": [
- 266,
- 6
+ 495,
+ 23
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10077": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x1i8.unbounded_shl(4), 0x10);\nassert_eq!(0x1i8.unbounded_shl(129), 0);\n```",
+ "docs": "Infinity (∞).",
"id": 10077,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "f64"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i8"
- }
- }
+ "value": "_"
}
},
"links": {},
- "name": "unbounded_shl",
+ "name": "INFINITY",
"span": {
"begin": [
- 247,
+ 498,
5
],
"end": [
- 266,
- 6
+ 498,
+ 28
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10078": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked shift right. Computes `self >> rhs`, returning `None` if `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x10i8.checked_shr(4), Some(0x1));\nassert_eq!(0x10i8.checked_shr(128), None);\n```",
+ "docs": "Negative infinity (−∞).",
"id": 10078,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "f64"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i8"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
- }
- }
+ "value": "_"
}
},
"links": {},
- "name": "checked_shr",
+ "name": "NEG_INFINITY",
"span": {
"begin": [
- 247,
+ 501,
5
],
"end": [
- 266,
- 6
+ 501,
+ 32
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10079": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 83, patch: 0})}, feature: \"const_float_classify\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict shift right. Computes `self >> rhs`, panicking `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x10i8.strict_shr(4), 0x1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10i8.strict_shr(128);\n```",
+ "docs": "Returns `true` if this value is NaN.\n\n```\nlet nan = f64::NAN;\nlet f = 7.0_f64;\n\nassert!(nan.is_nan());\nassert!(!f.is_nan());\n```",
"id": 10079,
"inner": {
"function": {
@@ -6406,33 +5998,27 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "strict_shr",
+ "name": "is_nan",
"span": {
"begin": [
- 247,
+ 532,
5
],
"end": [
- 266,
- 6
+ 532,
+ 38
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
@@ -6514,7 +6100,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -6530,7 +6116,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -6539,12 +6125,12 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -6553,20 +6139,20 @@
"10080": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 83, patch: 0})}, feature: \"const_float_classify\", promotable: false}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
- "other": "#[attr = TrackCaller]"
+ "must_use": {
+ "reason": null
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked shift right. Computes `self >> rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shr`] would return `None`.\n\n[`checked_shr`]: i8::checked_shr",
+ "docs": "Returns `true` if this value is positive infinity or negative infinity, and\n`false` otherwise.\n\n```\nlet f = 7.0f64;\nlet inf = f64::INFINITY;\nlet neg_inf = f64::NEG_INFINITY;\nlet nan = f64::NAN;\n\nassert!(!f.is_infinite());\nassert!(!nan.is_infinite());\n\nassert!(inf.is_infinite());\nassert!(neg_inf.is_infinite());\n```",
"id": 10080,
"inner": {
"function": {
@@ -6579,7 +6165,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -6588,55 +6174,47 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "bool"
}
}
}
},
- "links": {
- "i8::checked_shr": 10078
- },
- "name": "unchecked_shr",
+ "links": {},
+ "name": "is_infinite",
"span": {
"begin": [
- 247,
+ 555,
5
],
"end": [
- 266,
- 6
+ 555,
+ 43
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10081": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 83, patch: 0})}, feature: \"const_float_classify\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, which yields `0` for a positive number,\nand `-1` for a negative number.\n\n# Examples\n\n```\nassert_eq!(0x10i8.unbounded_shr(4), 0x1);\nassert_eq!(0x10i8.unbounded_shr(129), 0);\nassert_eq!(i8::MIN.unbounded_shr(129), -1);\n```",
+ "docs": "Returns `true` if this number is neither infinite nor NaN.\n\n```\nlet f = 7.0f64;\nlet inf: f64 = f64::INFINITY;\nlet neg_inf: f64 = f64::NEG_INFINITY;\nlet nan: f64 = f64::NAN;\n\nassert!(f.is_finite());\n\nassert!(!nan.is_finite());\nassert!(!inf.is_finite());\nassert!(!neg_inf.is_finite());\n```",
"id": 10081,
"inner": {
"function": {
@@ -6658,53 +6236,47 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "unbounded_shr",
+ "name": "is_finite",
"span": {
"begin": [
- 247,
+ 580,
5
],
"end": [
- 266,
- 6
+ 580,
+ 41
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10082": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 83, patch: 0})}, feature: \"const_float_classify\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 53, patch: 0})}, feature: \"is_subnormal\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked absolute value. Computes `self.abs()`, returning `None` if\n`self == MIN`.\n\n# Examples\n\n```\nassert_eq!((-5i8).checked_abs(), Some(5));\nassert_eq!(i8::MIN.checked_abs(), None);\n```",
+ "docs": "Returns `true` if the number is [subnormal].\n\n```\nlet min = f64::MIN_POSITIVE; // 2.2250738585072014e-308_f64\nlet max = f64::MAX;\nlet lower_than_min = 1.0e-308_f64;\nlet zero = 0.0_f64;\n\nassert!(!min.is_subnormal());\nassert!(!max.is_subnormal());\n\nassert!(!zero.is_subnormal());\nassert!(!f64::NAN.is_subnormal());\nassert!(!f64::INFINITY.is_subnormal());\n// Values between `0` and `min` are Subnormal.\nassert!(lower_than_min.is_subnormal());\n```\n[subnormal]: https://en.wikipedia.org/wiki/Denormal_number",
"id": 10082,
"inner": {
"function": {
@@ -6730,61 +6302,43 @@
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i8"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "checked_abs",
+ "name": "is_subnormal",
"span": {
"begin": [
- 247,
+ 608,
5
],
"end": [
- 266,
- 6
+ 608,
+ 44
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10083": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 83, patch: 0})}, feature: \"const_float_classify\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict absolute value. Computes `self.abs()`, panicking if\n`self == MIN`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((-5i8).strict_abs(), 5);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i8::MIN.strict_abs();\n```",
+ "docs": "Returns `true` if the number is neither zero, infinite,\n[subnormal], or NaN.\n\n```\nlet min = f64::MIN_POSITIVE; // 2.2250738585072014e-308f64\nlet max = f64::MAX;\nlet lower_than_min = 1.0e-308_f64;\nlet zero = 0.0f64;\n\nassert!(min.is_normal());\nassert!(max.is_normal());\n\nassert!(!zero.is_normal());\nassert!(!f64::NAN.is_normal());\nassert!(!f64::INFINITY.is_normal());\n// Values between `0` and `min` are Subnormal.\nassert!(!lower_than_min.is_normal());\n```\n[subnormal]: https://en.wikipedia.org/wiki/Denormal_number",
"id": 10083,
"inner": {
"function": {
@@ -6810,43 +6364,38 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "strict_abs",
+ "name": "is_normal",
"span": {
"begin": [
- 247,
+ 635,
5
],
"end": [
- 266,
- 6
+ 635,
+ 41
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10084": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 83, patch: 0})}, feature: \"const_float_classify\", promotable: false}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked exponentiation. Computes `self.pow(exp)`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(8i8.checked_pow(2), Some(64));\nassert_eq!(i8::MAX.checked_pow(2), None);\n```",
+ "docs": "Returns the floating point category of the number. If only one property\nis going to be tested, it is generally faster to use the specific\npredicate instead.\n\n```\nuse std::num::FpCategory;\n\nlet num = 12.4_f64;\nlet inf = f64::INFINITY;\n\nassert_eq!(num.classify(), FpCategory::Normal);\nassert_eq!(inf.classify(), FpCategory::Infinite);\n```",
"id": 10084,
"inner": {
"function": {
@@ -6868,71 +6417,51 @@
{
"generic": "Self"
}
- ],
- [
- "exp",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
"resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i8"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
+ "args": null,
+ "id": 4782,
+ "path": "FpCategory"
}
}
}
}
},
"links": {},
- "name": "checked_pow",
+ "name": "classify",
"span": {
"begin": [
- 247,
+ 654,
5
],
"end": [
- 266,
- 6
+ 654,
+ 46
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10085": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 83, patch: 0})}, feature: \"const_float_classify\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict exponentiation. Computes `self.pow(exp)`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(8i8.strict_pow(2), 64);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i8::MAX.strict_pow(2);\n```",
+ "docs": "Returns `true` if `self` has a positive sign, including `+0.0`, NaNs with\npositive sign bit and positive infinity.\n\nNote that IEEE 754 doesn't assign any meaning to the sign bit in case of\na NaN, and as Rust doesn't guarantee that the bit pattern of NaNs are\nconserved over arithmetic operations, the result of `is_sign_positive` on\na NaN might produce an unexpected or non-portable result. See the [specification\nof NaN bit patterns](f32#nan-bit-patterns) for more info. Use `self.signum() == 1.0`\nif you need fully portable behavior (will return `false` for all NaNs).\n\n```\nlet f = 7.0_f64;\nlet g = -7.0_f64;\n\nassert!(f.is_sign_positive());\nassert!(!g.is_sign_positive());\n```",
"id": 10085,
"inner": {
"function": {
@@ -6954,53 +6483,49 @@
{
"generic": "Self"
}
- ],
- [
- "exp",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "bool"
}
}
}
},
- "links": {},
- "name": "strict_pow",
+ "links": {
+ "f32#nan-bit-patterns": 265
+ },
+ "name": "is_sign_positive",
"span": {
"begin": [
- 247,
+ 691,
5
],
"end": [
- 266,
- 6
+ 691,
+ 48
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10086": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 83, patch: 0})}, feature: \"const_float_classify\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the square root of the number, rounded down.\n\nReturns `None` if `self` is negative.\n\n# Examples\n\n```\nassert_eq!(10i8.checked_isqrt(), Some(3));\n```",
+ "docs": "Returns `true` if `self` has a negative sign, including `-0.0`, NaNs with\nnegative sign bit and negative infinity.\n\nNote that IEEE 754 doesn't assign any meaning to the sign bit in case of\na NaN, and as Rust doesn't guarantee that the bit pattern of NaNs are\nconserved over arithmetic operations, the result of `is_sign_negative` on\na NaN might produce an unexpected or non-portable result. See the [specification\nof NaN bit patterns](f32#nan-bit-patterns) for more info. Use `self.signum() == -1.0`\nif you need fully portable behavior (will return `false` for all NaNs).\n\n```\nlet f = 7.0_f64;\nlet g = -7.0_f64;\n\nassert!(!f.is_sign_negative());\nassert!(g.is_sign_negative());\n```",
"id": 10086,
"inner": {
"function": {
@@ -7026,58 +6551,43 @@
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i8"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "bool"
}
}
}
},
- "links": {},
- "name": "checked_isqrt",
+ "links": {
+ "f32#nan-bit-patterns": 265
+ },
+ "name": "is_sign_negative",
"span": {
"begin": [
- 247,
+ 725,
5
],
"end": [
- 266,
- 6
+ 725,
+ 48
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10087": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[doc(alias = \"nextUp\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 86, patch: 0})}, feature: \"float_next_up_down\", promotable: false}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 86, patch: 0})}, feature: \"float_next_up_down\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer addition. Computes `self + rhs`, saturating at the numeric\nbounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i8.saturating_add(1), 101);\nassert_eq!(i8::MAX.saturating_add(100), i8::MAX);\nassert_eq!(i8::MIN.saturating_add(-1), i8::MIN);\n```",
+ "docs": "Returns the least number greater than `self`.\n\nLet `TINY` be the smallest representable positive `f64`. Then,\n - if `self.is_nan()`, this returns `self`;\n - if `self` is [`NEG_INFINITY`], this returns [`MIN`];\n - if `self` is `-TINY`, this returns -0.0;\n - if `self` is -0.0 or +0.0, this returns `TINY`;\n - if `self` is [`MAX`] or [`INFINITY`], this returns [`INFINITY`];\n - otherwise the unique least value greater than `self` is returned.\n\nThe identity `x.next_up() == -(-x).next_down()` holds for all non-NaN `x`. When `x`\nis finite `x == x.next_up().next_down()` also holds.\n\n```rust\n// f64::EPSILON is the difference between 1.0 and the next number up.\nassert_eq!(1.0f64.next_up(), 1.0 + f64::EPSILON);\n// But not for most numbers.\nassert!(0.1f64.next_up() < 0.1 + f64::EPSILON);\nassert_eq!(9007199254740992f64.next_up(), 9007199254740994.0);\n```\n\nThis operation corresponds to IEEE-754 `nextUp`.\n\n[`NEG_INFINITY`]: Self::NEG_INFINITY\n[`INFINITY`]: Self::INFINITY\n[`MIN`]: Self::MIN\n[`MAX`]: Self::MAX",
"id": 10087,
"inner": {
"function": {
@@ -7099,53 +6609,50 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
- "links": {},
- "name": "saturating_add",
+ "links": {
+ "Self::INFINITY": 10077,
+ "Self::MAX": 10069,
+ "Self::MIN": 10070,
+ "Self::NEG_INFINITY": 10078
+ },
+ "name": "next_up",
"span": {
"begin": [
- 247,
+ 771,
5
],
"end": [
- 266,
- 6
+ 771,
+ 39
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10088": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[doc(alias = \"nextDown\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 86, patch: 0})}, feature: \"float_next_up_down\", promotable: false}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 86, patch: 0})}, feature: \"float_next_up_down\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating addition with an unsigned integer. Computes `self + rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1i8.saturating_add_unsigned(2), 3);\nassert_eq!(i8::MAX.saturating_add_unsigned(100), i8::MAX);\n```",
+ "docs": "Returns the greatest number less than `self`.\n\nLet `TINY` be the smallest representable positive `f64`. Then,\n - if `self.is_nan()`, this returns `self`;\n - if `self` is [`INFINITY`], this returns [`MAX`];\n - if `self` is `TINY`, this returns 0.0;\n - if `self` is -0.0 or +0.0, this returns `-TINY`;\n - if `self` is [`MIN`] or [`NEG_INFINITY`], this returns [`NEG_INFINITY`];\n - otherwise the unique greatest value less than `self` is returned.\n\nThe identity `x.next_down() == -(-x).next_up()` holds for all non-NaN `x`. When `x`\nis finite `x == x.next_down().next_up()` also holds.\n\n```rust\nlet x = 1.0f64;\n// Clamp value into range [0, 1).\nlet clamped = x.clamp(0.0, 1.0f64.next_down());\nassert!(clamped < 1.0);\nassert_eq!(clamped.next_up(), 1.0);\n```\n\nThis operation corresponds to IEEE-754 `nextDown`.\n\n[`NEG_INFINITY`]: Self::NEG_INFINITY\n[`INFINITY`]: Self::INFINITY\n[`MIN`]: Self::MIN\n[`MAX`]: Self::MAX",
"id": 10088,
"inner": {
"function": {
@@ -7167,40 +6674,39 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
- "links": {},
- "name": "saturating_add_unsigned",
+ "links": {
+ "Self::INFINITY": 10077,
+ "Self::MAX": 10069,
+ "Self::MIN": 10070,
+ "Self::NEG_INFINITY": 10078
+ },
+ "name": "next_down",
"span": {
"begin": [
- 247,
+ 822,
5
],
"end": [
- 266,
- 6
+ 822,
+ 41
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10089": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"const_float_methods\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -7213,7 +6719,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer subtraction. Computes `self - rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i8.saturating_sub(127), -27);\nassert_eq!(i8::MIN.saturating_sub(100), i8::MIN);\nassert_eq!(i8::MAX.saturating_sub(-1), i8::MAX);\n```",
+ "docs": "Takes the reciprocal (inverse) of a number, `1/x`.\n\n```\nlet x = 2.0_f64;\nlet abs_difference = (x.recip() - (1.0 / x)).abs();\n\nassert!(abs_difference < 1e-10);\n```",
"id": 10089,
"inner": {
"function": {
@@ -7235,33 +6741,27 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "saturating_sub",
+ "name": "recip",
"span": {
"begin": [
- 247,
+ 854,
5
],
"end": [
- 266,
- 6
+ 854,
+ 36
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
@@ -7364,7 +6864,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -7389,11 +6889,11 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -7403,10 +6903,10 @@
"10090": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"const_float_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -7416,7 +6916,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating subtraction with an unsigned integer. Computes `self - rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i8.saturating_sub_unsigned(127), -27);\nassert_eq!(i8::MIN.saturating_sub_unsigned(100), i8::MIN);\n```",
+ "docs": "Converts radians to degrees.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\nlet angle = std::f64::consts::PI;\n\nlet abs_difference = (angle.to_degrees() - 180.0).abs();\n\nassert!(abs_difference < 1e-10);\n```",
"id": 10090,
"inner": {
"function": {
@@ -7438,43 +6938,37 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "saturating_sub_unsigned",
+ "name": "to_degrees",
"span": {
"begin": [
- 247,
+ 879,
5
],
"end": [
- 266,
- 6
+ 879,
+ 41
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10091": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"const_float_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 45, patch: 0})}, feature: \"saturating_neg\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -7484,7 +6978,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer negation. Computes `-self`, returning `MAX` if `self == MIN`\ninstead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i8.saturating_neg(), -100);\nassert_eq!((-100i8).saturating_neg(), 100);\nassert_eq!(i8::MIN.saturating_neg(), i8::MAX);\nassert_eq!(i8::MAX.saturating_neg(), i8::MIN + 1);\n```",
+ "docs": "Converts degrees to radians.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\nlet angle = 180.0_f64;\n\nlet abs_difference = (angle.to_radians() - std::f64::consts::PI).abs();\n\nassert!(abs_difference < 1e-10);\n```",
"id": 10091,
"inner": {
"function": {
@@ -7510,43 +7004,43 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "saturating_neg",
+ "name": "to_radians",
"span": {
"begin": [
- 247,
+ 908,
5
],
"end": [
- 266,
- 6
+ 908,
+ 41
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10092": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"const_float_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 45, patch: 0})}, feature: \"saturating_neg\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "this returns the result of the comparison, without modifying either input"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating absolute value. Computes `self.abs()`, returning `MAX` if `self ==\nMIN` instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i8.saturating_abs(), 100);\nassert_eq!((-100i8).saturating_abs(), 100);\nassert_eq!(i8::MIN.saturating_abs(), i8::MAX);\nassert_eq!((i8::MIN + 1).saturating_abs(), i8::MAX);\n```",
+ "docs": "Returns the maximum of the two numbers, ignoring NaN.\n\nIf one of the arguments is NaN, then the other argument is returned.\nThis follows the IEEE 754-2008 semantics for maxNum, except for handling of signaling NaNs;\nthis function handles all NaNs the same way and avoids maxNum's problems with associativity.\nThis also matches the behavior of libm’s fmax. In particular, if the inputs compare equal\n(such as for the case of `+0.0` and `-0.0`), either input may be returned non-deterministically.\n\n```\nlet x = 1.0_f64;\nlet y = 2.0_f64;\n\nassert_eq!(x.max(y), y);\n```",
"id": 10092,
"inner": {
"function": {
@@ -7568,47 +7062,53 @@
{
"generic": "Self"
}
+ ],
+ [
+ "other",
+ {
+ "primitive": "f64"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "saturating_abs",
+ "name": "max",
"span": {
"begin": [
- 247,
+ 934,
5
],
"end": [
- 266,
- 6
+ 934,
+ 46
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10093": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"const_float_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "this returns the result of the comparison, without modifying either input"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer multiplication. Computes `self * rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(10i8.saturating_mul(12), 120);\nassert_eq!(i8::MAX.saturating_mul(10), i8::MAX);\nassert_eq!(i8::MIN.saturating_mul(10), i8::MIN);\n```",
+ "docs": "Returns the minimum of the two numbers, ignoring NaN.\n\nIf one of the arguments is NaN, then the other argument is returned.\nThis follows the IEEE 754-2008 semantics for minNum, except for handling of signaling NaNs;\nthis function handles all NaNs the same way and avoids minNum's problems with associativity.\nThis also matches the behavior of libm’s fmin. In particular, if the inputs compare equal\n(such as for the case of `+0.0` and `-0.0`), either input may be returned non-deterministically.\n\n```\nlet x = 1.0_f64;\nlet y = 2.0_f64;\n\nassert_eq!(x.min(y), x);\n```",
"id": 10093,
"inner": {
"function": {
@@ -7632,51 +7132,48 @@
}
],
[
- "rhs",
+ "other",
{
- "primitive": "i8"
+ "primitive": "f64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "saturating_mul",
+ "name": "min",
"span": {
"begin": [
- 247,
+ 956,
5
],
"end": [
- 266,
- 6
+ 956,
+ 46
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10094": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 91079, is_soft: false}, feature: \"float_minimum_maximum\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "this returns the result of the comparison, without modifying either input"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer division. Computes `self / rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i8.saturating_div(2), 2);\nassert_eq!(i8::MAX.saturating_div(-1), i8::MIN + 1);\nassert_eq!(i8::MIN.saturating_div(-1), i8::MAX);\n\n```",
+ "docs": "Returns the maximum of the two numbers, propagating NaN.\n\nThis returns NaN when *either* argument is NaN, as opposed to\n[`f64::max`] which only returns NaN when *both* arguments are NaN.\n\n```\n#![feature(float_minimum_maximum)]\nlet x = 1.0_f64;\nlet y = 2.0_f64;\n\nassert_eq!(x.maximum(y), y);\nassert!(x.maximum(f64::NAN).is_nan());\n```\n\nIf one of the arguments is NaN, then NaN is returned. Otherwise this returns the greater\nof the two numbers. For this operation, -0.0 is considered to be less than +0.0.\nNote that this follows the semantics specified in IEEE 754-2019.\n\nAlso note that \"propagation\" of NaNs here doesn't necessarily mean that the bitpattern of a NaN\noperand is conserved; see the [specification of NaN bit patterns](f32#nan-bit-patterns) for more info.",
"id": 10094,
"inner": {
"function": {
@@ -7700,51 +7197,51 @@
}
],
[
- "rhs",
+ "other",
{
- "primitive": "i8"
+ "primitive": "f64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
- "links": {},
- "name": "saturating_div",
+ "links": {
+ "`f64::max`": 10092,
+ "f32#nan-bit-patterns": 265
+ },
+ "name": "maximum",
"span": {
"begin": [
- 247,
+ 983,
5
],
"end": [
- 266,
- 6
+ 983,
+ 50
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10095": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 91079, is_soft: false}, feature: \"float_minimum_maximum\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "this returns the result of the comparison, without modifying either input"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer exponentiation. Computes `self.pow(exp)`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!((-4i8).saturating_pow(3), -64);\nassert_eq!(i8::MIN.saturating_pow(2), i8::MAX);\nassert_eq!(i8::MIN.saturating_pow(3), i8::MIN);\n```",
+ "docs": "Returns the minimum of the two numbers, propagating NaN.\n\nThis returns NaN when *either* argument is NaN, as opposed to\n[`f64::min`] which only returns NaN when *both* arguments are NaN.\n\n```\n#![feature(float_minimum_maximum)]\nlet x = 1.0_f64;\nlet y = 2.0_f64;\n\nassert_eq!(x.minimum(y), x);\nassert!(x.minimum(f64::NAN).is_nan());\n```\n\nIf one of the arguments is NaN, then NaN is returned. Otherwise this returns the lesser\nof the two numbers. For this operation, -0.0 is considered to be less than +0.0.\nNote that this follows the semantics specified in IEEE 754-2019.\n\nAlso note that \"propagation\" of NaNs here doesn't necessarily mean that the bitpattern of a NaN\noperand is conserved; see the [specification of NaN bit patterns](f32#nan-bit-patterns) for more info.",
"id": 10095,
"inner": {
"function": {
@@ -7768,51 +7265,52 @@
}
],
[
- "exp",
+ "other",
{
- "primitive": "u32"
+ "primitive": "f64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
- "links": {},
- "name": "saturating_pow",
+ "links": {
+ "`f64::min`": 10093,
+ "f32#nan-bit-patterns": 265
+ },
+ "name": "minimum",
"span": {
"begin": [
- 247,
+ 1010,
5
],
"end": [
- 266,
- 6
+ 1010,
+ 50
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10096": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[doc(alias = \"average\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"num_midpoint\", promotable: false}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"num_midpoint\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) addition with an unsigned integer. Computes\n`self + rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(100i8.wrapping_add_unsigned(27), 127);\nassert_eq!(i8::MAX.wrapping_add_unsigned(2), i8::MIN + 1);\n```",
+ "docs": "Calculates the midpoint (average) between `self` and `rhs`.\n\nThis returns NaN when *either* argument is NaN or if a combination of\n+inf and -inf is provided as arguments.\n\n# Examples\n\n```\nassert_eq!(1f64.midpoint(4.0), 2.5);\nassert_eq!((-5.5f64).midpoint(8.0), 1.25);\n```",
"id": 10096,
"inner": {
"function": {
@@ -7836,41 +7334,38 @@
}
],
[
- "rhs",
+ "other",
{
- "primitive": "u8"
+ "primitive": "f64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "wrapping_add_unsigned",
+ "name": "midpoint",
"span": {
"begin": [
- 247,
+ 1029,
5
],
"end": [
- 266,
- 6
+ 1029,
+ 51
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10097": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"float_approx_unchecked_to\"}}]"
},
{
"must_use": {
@@ -7880,20 +7375,64 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) subtraction with an unsigned integer. Computes\n`self - rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(0i8.wrapping_sub_unsigned(127), -127);\nassert_eq!((-2i8).wrapping_sub_unsigned(u8::MAX), -1);\n```",
+ "docs": "Rounds toward zero and converts to any primitive integer type,\nassuming that the value is finite and fits in that type.\n\n```\nlet value = 4.6_f64;\nlet rounded = unsafe { value.to_int_unchecked::() };\nassert_eq!(rounded, 4);\n\nlet value = -128.9_f64;\nlet rounded = unsafe { value.to_int_unchecked::() };\nassert_eq!(rounded, i8::MIN);\n```\n\n# Safety\n\nThe value must:\n\n* Not be `NaN`\n* Not be infinite\n* Be representable in the return type `Int`, after truncating off its fractional part",
"id": 10097,
"inner": {
"function": {
"generics": {
- "params": [],
- "where_predicates": []
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "Int"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "Int"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 9866,
+ "path": "FloatToInt"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "primitive": "f64"
+ }
+ }
+ }
+ ]
},
"has_body": true,
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "is_const": false,
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -7902,53 +7441,47 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "generic": "Int"
}
}
}
},
"links": {},
- "name": "wrapping_sub_unsigned",
+ "name": "to_int_unchecked",
"span": {
"begin": [
- 247,
+ 1068,
5
],
"end": [
- 266,
- 6
+ 1070,
+ 31
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10098": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 83, patch: 0})}, feature: \"const_float_bits_conv\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 20, patch: 0})}, feature: \"float_bits_conv\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) division. Computes `self / rhs`, wrapping around at the\nboundary of the type.\n\nThe only case where such wrapping can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type. In such a case, this function returns `MIN` itself.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i8.wrapping_div(10), 10);\nassert_eq!((-128i8).wrapping_div(-1), -128);\n```",
+ "docs": "Raw transmutation from `u64`.\n\nThis is currently identical to `transmute::(v)` on all platforms.\nIt turns out this is incredibly portable, for two reasons:\n\n* Floats and Ints have the same endianness on all supported platforms.\n* IEEE 754 very precisely specifies the bit layout of floats.\n\nHowever there is one caveat: prior to the 2008 version of IEEE 754, how\nto interpret the NaN signaling bit wasn't actually specified. Most platforms\n(notably x86 and ARM) picked the interpretation that was ultimately\nstandardized in 2008, but some didn't (notably MIPS). As a result, all\nsignaling NaNs on MIPS are quiet NaNs on x86, and vice-versa.\n\nRather than trying to preserve signaling-ness cross-platform, this\nimplementation favors preserving the exact bits. This means that\nany payloads encoded in NaNs will be preserved even if the result of\nthis method is sent over the network from an x86 machine to a MIPS one.\n\nIf the results of this method are only manipulated by the same\narchitecture that produced them, then there is no portability concern.\n\nIf the input isn't NaN, then there is no portability concern.\n\nIf you don't care about signaling-ness (very likely), then there is no\nportability concern.\n\nNote that this function is distinct from `as` casting, which attempts to\npreserve the *numeric* value, and not the bitwise value.\n\n# Examples\n\n```\nlet v = f64::from_bits(0x4029000000000000);\nassert_eq!(v, 12.5);\n```",
"id": 10098,
"inner": {
"function": {
@@ -7966,47 +7499,41 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "v",
{
- "primitive": "i8"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "wrapping_div",
+ "name": "from_bits",
"span": {
"begin": [
- 247,
+ 1145,
5
],
"end": [
- 266,
- 6
+ 1145,
+ 43
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10099": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 83, patch: 0})}, feature: \"const_float_bits_conv\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 20, patch: 0})}, feature: \"float_bits_conv\"}}]"
},
{
"must_use": {
@@ -8016,7 +7543,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping Euclidean division. Computes `self.div_euclid(rhs)`,\nwrapping around at the boundary of the type.\n\nWrapping will only occur in `MIN / -1` on a signed type (where `MIN` is the negative minimal value\nfor the type). This is equivalent to `-MIN`, a positive value that is too large to represent in the\ntype. In this case, this method returns `MIN` itself.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i8.wrapping_div_euclid(10), 10);\nassert_eq!((-128i8).wrapping_div_euclid(-1), -128);\n```",
+ "docs": "Raw transmutation to `u64`.\n\nThis is currently identical to `transmute::(self)` on all platforms.\n\nSee [`from_bits`](Self::from_bits) for some discussion of the\nportability of this operation (there are almost no issues).\n\nNote that this function is distinct from `as` casting, which attempts to\npreserve the *numeric* value, and not the bitwise value.\n\n# Examples\n\n```\nassert!((1f64).to_bits() != 1f64 as u64); // to_bits() is not casting!\nassert_eq!((12.5f64).to_bits(), 0x4029000000000000);\n```",
"id": 10099,
"inner": {
"function": {
@@ -8038,33 +7565,29 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "u64"
}
}
}
},
- "links": {},
- "name": "wrapping_div_euclid",
+ "links": {
+ "Self::from_bits": 10098
+ },
+ "name": "to_bits",
"span": {
"begin": [
- 247,
+ 1099,
5
],
"end": [
- 266,
- 6
+ 1099,
+ 38
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
@@ -8124,7 +7647,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -8149,11 +7672,11 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -8163,10 +7686,10 @@
"10100": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 83, patch: 0})}, feature: \"const_float_bits_conv\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 40, patch: 0})}, feature: \"float_to_from_bytes\"}}]"
},
{
"must_use": {
@@ -8176,7 +7699,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) remainder. Computes `self % rhs`, wrapping around at the\nboundary of the type.\n\nSuch wrap-around never actually occurs mathematically; implementation artifacts make `x % y`\ninvalid for `MIN / -1` on a signed type (where `MIN` is the negative minimal value). In such a case,\nthis function returns `0`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i8.wrapping_rem(10), 0);\nassert_eq!((-128i8).wrapping_rem(-1), 0);\n```",
+ "docs": "Returns the memory representation of this floating point number as a byte array in\nbig-endian (network) byte order.\n\nSee [`from_bits`](Self::from_bits) for some discussion of the\nportability of this operation (there are almost no issues).\n\n# Examples\n\n```\nlet bytes = 12.5f64.to_be_bytes();\nassert_eq!(bytes, [0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]);\n```",
"id": 10100,
"inner": {
"function": {
@@ -8198,43 +7721,44 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "array": {
+ "len": "8",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
}
}
},
- "links": {},
- "name": "wrapping_rem",
+ "links": {
+ "Self::from_bits": 10098
+ },
+ "name": "to_be_bytes",
"span": {
"begin": [
- 247,
+ 1168,
5
],
"end": [
- 266,
- 6
+ 1168,
+ 46
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10101": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 83, patch: 0})}, feature: \"const_float_bits_conv\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 40, patch: 0})}, feature: \"float_to_from_bytes\"}}]"
},
{
"must_use": {
@@ -8244,7 +7768,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping Euclidean remainder. Computes `self.rem_euclid(rhs)`, wrapping around\nat the boundary of the type.\n\nWrapping will only occur in `MIN % -1` on a signed type (where `MIN` is the negative minimal value\nfor the type). In this case, this method returns 0.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i8.wrapping_rem_euclid(10), 0);\nassert_eq!((-128i8).wrapping_rem_euclid(-1), 0);\n```",
+ "docs": "Returns the memory representation of this floating point number as a byte array in\nlittle-endian byte order.\n\nSee [`from_bits`](Self::from_bits) for some discussion of the\nportability of this operation (there are almost no issues).\n\n# Examples\n\n```\nlet bytes = 12.5f64.to_le_bytes();\nassert_eq!(bytes, [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x40]);\n```",
"id": 10101,
"inner": {
"function": {
@@ -8266,43 +7790,44 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "array": {
+ "len": "8",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
}
}
},
- "links": {},
- "name": "wrapping_rem_euclid",
+ "links": {
+ "Self::from_bits": 10098
+ },
+ "name": "to_le_bytes",
"span": {
"begin": [
- 247,
+ 1189,
5
],
"end": [
- 266,
- 6
+ 1189,
+ 46
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10102": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 83, patch: 0})}, feature: \"const_float_bits_conv\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 40, patch: 0})}, feature: \"float_to_from_bytes\"}}]"
},
{
"must_use": {
@@ -8312,7 +7837,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) negation. Computes `-self`, wrapping around at the boundary\nof the type.\n\nThe only case where such wrapping can occur is when one negates `MIN` on a signed type (where `MIN`\nis the negative minimal value for the type); this is a positive value that is too large to represent\nin the type. In such a case, this function returns `MIN` itself.\n\n# Examples\n\n```\nassert_eq!(100i8.wrapping_neg(), -100);\nassert_eq!((-100i8).wrapping_neg(), 100);\nassert_eq!(i8::MIN.wrapping_neg(), i8::MIN);\n```",
+ "docs": "Returns the memory representation of this floating point number as a byte array in\nnative byte order.\n\nAs the target platform's native endianness is used, portable code\nshould use [`to_be_bytes`] or [`to_le_bytes`], as appropriate, instead.\n\n[`to_be_bytes`]: f64::to_be_bytes\n[`to_le_bytes`]: f64::to_le_bytes\n\nSee [`from_bits`](Self::from_bits) for some discussion of the\nportability of this operation (there are almost no issues).\n\n# Examples\n\n```\nlet bytes = 12.5f64.to_ne_bytes();\nassert_eq!(\n bytes,\n if cfg!(target_endian = \"big\") {\n [0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]\n } else {\n [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x40]\n }\n);\n```",
"id": 10102,
"inner": {
"function": {
@@ -8338,43 +7863,52 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "array": {
+ "len": "8",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
}
}
},
- "links": {},
- "name": "wrapping_neg",
+ "links": {
+ "Self::from_bits": 10098,
+ "f64::to_be_bytes": 10100,
+ "f64::to_le_bytes": 10101
+ },
+ "name": "to_ne_bytes",
"span": {
"begin": [
- 247,
+ 1223,
5
],
"end": [
- 266,
- 6
+ 1223,
+ 46
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10103": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 83, patch: 0})}, feature: \"const_float_bits_conv\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 40, patch: 0})}, feature: \"float_to_from_bytes\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Panic-free bitwise shift-left; yields `self << mask(rhs)`, where `mask` removes\nany high-order bits of `rhs` that would cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-left; the RHS of a wrapping shift-left is restricted to\nthe range of the type, rather than the bits shifted out of the LHS being returned to the other end.\nThe primitive integer types all implement a [`rotate_left`](Self::rotate_left) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!((-1i8).wrapping_shl(7), -128);\nassert_eq!((-1i8).wrapping_shl(128), -1);\n```",
+ "docs": "Creates a floating point value from its representation as a byte array in big endian.\n\nSee [`from_bits`](Self::from_bits) for some discussion of the\nportability of this operation (there are almost no issues).\n\n# Examples\n\n```\nlet value = f64::from_be_bytes([0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]);\nassert_eq!(value, 12.5);\n```",
"id": 10103,
"inner": {
"function": {
@@ -8392,59 +7926,58 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "bytes",
{
- "primitive": "u32"
+ "array": {
+ "len": "8",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
"links": {
- "Self::rotate_left": 10036
+ "Self::from_bits": 10098
},
- "name": "wrapping_shl",
+ "name": "from_be_bytes",
"span": {
"begin": [
- 247,
+ 1242,
5
],
"end": [
- 266,
- 6
+ 1242,
+ 55
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10104": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 83, patch: 0})}, feature: \"const_float_bits_conv\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 40, patch: 0})}, feature: \"float_to_from_bytes\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Panic-free bitwise shift-right; yields `self >> mask(rhs)`, where `mask`\nremoves any high-order bits of `rhs` that would cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-right; the RHS of a wrapping shift-right is restricted\nto the range of the type, rather than the bits shifted out of the LHS being returned to the other\nend. The primitive integer types all implement a [`rotate_right`](Self::rotate_right) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!((-128i8).wrapping_shr(7), -1);\nassert_eq!((-128i16).wrapping_shr(64), -128);\n```",
+ "docs": "Creates a floating point value from its representation as a byte array in little endian.\n\nSee [`from_bits`](Self::from_bits) for some discussion of the\nportability of this operation (there are almost no issues).\n\n# Examples\n\n```\nlet value = f64::from_le_bytes([0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x40]);\nassert_eq!(value, 12.5);\n```",
"id": 10104,
"inner": {
"function": {
@@ -8462,59 +7995,58 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "bytes",
{
- "primitive": "u32"
+ "array": {
+ "len": "8",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
"links": {
- "Self::rotate_right": 10037
+ "Self::from_bits": 10098
},
- "name": "wrapping_shr",
+ "name": "from_le_bytes",
"span": {
"begin": [
- 247,
+ 1261,
5
],
"end": [
- 266,
- 6
+ 1261,
+ 55
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10105": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 83, patch: 0})}, feature: \"const_float_bits_conv\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 40, patch: 0})}, feature: \"float_to_from_bytes\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) absolute value. Computes `self.abs()`, wrapping around at\nthe boundary of the type.\n\nThe only case where such wrapping can occur is when one takes the absolute value of the negative\nminimal value for the type; this is a positive value that is too large to represent in the type. In\nsuch a case, this function returns `MIN` itself.\n\n# Examples\n\n```\nassert_eq!(100i8.wrapping_abs(), 100);\nassert_eq!((-100i8).wrapping_abs(), 100);\nassert_eq!(i8::MIN.wrapping_abs(), i8::MIN);\nassert_eq!((-128i8).wrapping_abs() as u8, 128);\n```",
+ "docs": "Creates a floating point value from its representation as a byte array in native endian.\n\nAs the target platform's native endianness is used, portable code\nlikely wants to use [`from_be_bytes`] or [`from_le_bytes`], as\nappropriate instead.\n\n[`from_be_bytes`]: f64::from_be_bytes\n[`from_le_bytes`]: f64::from_le_bytes\n\nSee [`from_bits`](Self::from_bits) for some discussion of the\nportability of this operation (there are almost no issues).\n\n# Examples\n\n```\nlet value = f64::from_ne_bytes(if cfg!(target_endian = \"big\") {\n [0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]\n} else {\n [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x40]\n});\nassert_eq!(value, 12.5);\n```",
"id": 10105,
"inner": {
"function": {
@@ -8532,51 +8064,60 @@
"sig": {
"inputs": [
[
- "self",
+ "bytes",
{
- "generic": "Self"
+ "array": {
+ "len": "8",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
- "links": {},
- "name": "wrapping_abs",
+ "links": {
+ "Self::from_bits": 10098,
+ "f64::from_be_bytes": 10103,
+ "f64::from_le_bytes": 10104
+ },
+ "name": "from_ne_bytes",
"span": {
"begin": [
- 247,
+ 1291,
5
],
"end": [
- 266,
- 6
+ 1291,
+ 55
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10106": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 51, patch: 0})}, feature: \"unsigned_abs\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 143800, is_soft: false}, feature: \"const_cmp\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 51, patch: 0})}, feature: \"unsigned_abs\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 62, patch: 0})}, feature: \"total_cmp\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Computes the absolute value of `self` without any wrapping\nor panicking.\n\n\n# Examples\n\n```\nassert_eq!(100i8.unsigned_abs(), 100u8);\nassert_eq!((-100i8).unsigned_abs(), 100u8);\nassert_eq!((-128i8).unsigned_abs(), 128u8);\n```",
+ "docs": "Returns the ordering between `self` and `other`.\n\nUnlike the standard partial comparison between floating point numbers,\nthis comparison always produces an ordering in accordance to\nthe `totalOrder` predicate as defined in the IEEE 754 (2008 revision)\nfloating point standard. The values are ordered in the following sequence:\n\n- negative quiet NaN\n- negative signaling NaN\n- negative infinity\n- negative numbers\n- negative subnormal numbers\n- negative zero\n- positive zero\n- positive subnormal numbers\n- positive numbers\n- positive infinity\n- positive signaling NaN\n- positive quiet NaN.\n\nThe ordering established by this function does not always agree with the\n[`PartialOrd`] and [`PartialEq`] implementations of `f64`. For example,\nthey consider negative and positive zero equal, while `total_cmp`\ndoesn't.\n\nThe interpretation of the signaling NaN bit follows the definition in\nthe IEEE 754 standard, which may not match the interpretation by some of\nthe older, non-conformant (e.g. MIPS) hardware implementations.\n\n# Example\n\n```\nstruct GoodBoy {\n name: String,\n weight: f64,\n}\n\nlet mut bois = vec![\n GoodBoy { name: \"Pucci\".to_owned(), weight: 0.1 },\n GoodBoy { name: \"Woofer\".to_owned(), weight: 99.0 },\n GoodBoy { name: \"Yapper\".to_owned(), weight: 10.0 },\n GoodBoy { name: \"Chonk\".to_owned(), weight: f64::INFINITY },\n GoodBoy { name: \"Abs. Unit\".to_owned(), weight: f64::NAN },\n GoodBoy { name: \"Floaty\".to_owned(), weight: -5.0 },\n];\n\nbois.sort_by(|a, b| a.weight.total_cmp(&b.weight));\n\n// `f64::NAN` could be positive or negative, which will affect the sort order.\nif f64::NAN.is_sign_negative() {\n assert!(bois.into_iter().map(|b| b.weight)\n .zip([f64::NAN, -5.0, 0.1, 10.0, 99.0, f64::INFINITY].iter())\n .all(|(a, b)| a.to_bits() == b.to_bits()))\n} else {\n assert!(bois.into_iter().map(|b| b.weight)\n .zip([-5.0, 0.1, 10.0, 99.0, f64::INFINITY, f64::NAN].iter())\n .all(|(a, b)| a.to_bits() == b.to_bits()))\n}\n```",
"id": 10106,
"inner": {
"function": {
@@ -8596,49 +8137,74 @@
[
"self",
{
- "generic": "Self"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
+ }
+ ],
+ [
+ "other",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "primitive": "f64"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "resolved_path": {
+ "args": null,
+ "id": 2007,
+ "path": "Ordering"
+ }
}
}
}
},
- "links": {},
- "name": "unsigned_abs",
+ "links": {
+ "`PartialEq`": 121,
+ "`PartialOrd`": 125
+ },
+ "name": "total_cmp",
"span": {
"begin": [
- 247,
+ 1358,
5
],
"end": [
- 266,
- 6
+ 1358,
+ 72
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10107": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"const_float_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"clamp\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) exponentiation. Computes `self.pow(exp)`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(3i8.wrapping_pow(4), 81);\nassert_eq!(3i8.wrapping_pow(5), -13);\nassert_eq!(3i8.wrapping_pow(6), -39);\n```",
+ "docs": "Restrict a value to a certain interval unless it is NaN.\n\nReturns `max` if `self` is greater than `max`, and `min` if `self` is\nless than `min`. Otherwise this returns `self`.\n\nNote that this function returns NaN if the initial value was NaN as\nwell.\n\n# Panics\n\nPanics if `min > max`, `min` is NaN, or `max` is NaN.\n\n# Examples\n\n```\nassert!((-3.0f64).clamp(-2.0, 1.0) == -2.0);\nassert!((0.0f64).clamp(-2.0, 1.0) == 0.0);\nassert!((2.0f64).clamp(-2.0, 1.0) == 1.0);\nassert!((f64::NAN).clamp(-2.0, 1.0).is_nan());\n```",
"id": 10107,
"inner": {
"function": {
@@ -8662,51 +8228,57 @@
}
],
[
- "exp",
+ "min",
{
- "primitive": "u32"
+ "primitive": "f64"
+ }
+ ],
+ [
+ "max",
+ {
+ "primitive": "f64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "wrapping_pow",
+ "name": "clamp",
"span": {
"begin": [
- 247,
+ 1414,
5
],
"end": [
- 266,
- 6
+ 1414,
+ 60
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10108": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"const_float_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would have\noccurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5i8.overflowing_add(2), (7, false));\nassert_eq!(i8::MAX.overflowing_add(1), (i8::MIN, true));\n```",
+ "docs": "Computes the absolute value of `self`.\n\nThis function always returns the precise result.\n\n# Examples\n\n```\nlet x = 3.5_f64;\nlet y = -3.5_f64;\n\nassert_eq!(x.abs(), x);\nassert_eq!(y.abs(), -y);\n\nassert!(f64::NAN.abs().is_nan());\n```",
"id": 10108,
"inner": {
"function": {
@@ -8728,60 +8300,47 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i8"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "f64"
}
}
}
},
"links": {},
- "name": "overflowing_add",
+ "name": "abs",
"span": {
"begin": [
- 247,
+ 1451,
5
],
"end": [
- 266,
- 6
+ 1451,
+ 34
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10109": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"const_float_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs` + `carry` and returns a tuple containing\nthe sum and the output carry.\n\nPerforms \"ternary addition\" of two integer operands and a carry-in\nbit, and returns an output integer and a carry-out bit. This allows\nchaining together multiple additions to create a wider addition, and\ncan be useful for bignum addition.\n\nThis can be thought of as a 8-bit \"full adder\", in the electronics sense.\n\nIf the input carry is false, this method is equivalent to\n[`overflowing_add`](Self::overflowing_add), and the output carry is\nequal to the overflow flag. Note that although carry and overflow\nflags are similar for unsigned integers, they are different for\nsigned integers.\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n\n// 3 MAX (a = 3 × 2^8 + 2^8 - 1)\n// + 5 7 (b = 5 × 2^8 + 7)\n// ---------\n// 9 6 (sum = 9 × 2^8 + 6)\n\nlet (a1, a0): (u8, u8) = (3, u8::MAX);\nlet (b1, b0): (u8, u8) = (5, 7);\nlet carry0 = false;\n\nlet (sum0, carry1) = a0.carrying_add(b0, carry0);\nassert_eq!(carry1, true);\nlet (sum1, carry2) = a1.carrying_add(b1, carry1);\nassert_eq!(carry2, false);\n\nassert_eq!((sum1, sum0), (9, 6));\n```",
+ "docs": "Returns a number that represents the sign of `self`.\n\n- `1.0` if the number is positive, `+0.0` or `INFINITY`\n- `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY`\n- NaN if the number is NaN\n\n# Examples\n\n```\nlet f = 3.5_f64;\n\nassert_eq!(f.signum(), 1.0);\nassert_eq!(f64::NEG_INFINITY.signum(), -1.0);\n\nassert!(f64::NAN.signum().is_nan());\n```",
"id": 10109,
"inner": {
"function": {
@@ -8803,48 +8362,27 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
- ],
- [
- "carry",
- {
- "primitive": "bool"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u8"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "f64"
}
}
}
},
- "links": {
- "Self::overflowing_add": 10819
- },
- "name": "carrying_add",
+ "links": {},
+ "name": "signum",
"span": {
"begin": [
- 447,
+ 1475,
5
],
"end": [
- 465,
- 6
+ 1475,
+ 37
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
@@ -8929,7 +8467,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -8947,8 +8485,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -8964,7 +8502,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -8973,11 +8511,11 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -8987,17 +8525,20 @@
"10110": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"const_float_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 35, patch: 0})}, feature: \"copysign\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs` + `carry` and checks for overflow.\n\nPerforms \"ternary addition\" of two integer operands and a carry-in\nbit, and returns a tuple of the sum along with a boolean indicating\nwhether an arithmetic overflow would occur. On overflow, the wrapped\nvalue is returned.\n\nThis allows chaining together multiple additions to create a wider\naddition, and can be useful for bignum addition. This method should\nonly be used for the most significant word; for the less significant\nwords the unsigned method\n[`u8::carrying_add`]\nshould be used.\n\nThe output boolean returned by this method is *not* a carry flag,\nand should *not* be added to a more significant word.\n\nIf the input carry is false, this method is equivalent to\n[`overflowing_add`](Self::overflowing_add).\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n// Only the most significant word is signed.\n//\n// 10 MAX (a = 10 × 2^8 + 2^8 - 1)\n// + -5 9 (b = -5 × 2^8 + 9)\n// ---------\n// 6 8 (sum = 6 × 2^8 + 8)\n\nlet (a1, a0): (i8, u8) = (10, u8::MAX);\nlet (b1, b0): (i8, u8) = (-5, 9);\nlet carry0 = false;\n\n// u8::carrying_add for the less significant words\nlet (sum0, carry1) = a0.carrying_add(b0, carry0);\nassert_eq!(carry1, true);\n\n// i8::carrying_add for the most significant word\nlet (sum1, overflow) = a1.carrying_add(b1, carry1);\nassert_eq!(overflow, false);\n\nassert_eq!((sum1, sum0), (6, 8));\n```",
+ "docs": "Returns a number composed of the magnitude of `self` and the sign of\n`sign`.\n\nEqual to `self` if the sign of `self` and `sign` are the same, otherwise equal to `-self`.\nIf `self` is a NaN, then a NaN with the same payload as `self` and the sign bit of `sign` is\nreturned.\n\nIf `sign` is a NaN, then this operation will still carry over its sign into the result. Note\nthat IEEE 754 doesn't assign any meaning to the sign bit in case of a NaN, and as Rust\ndoesn't guarantee that the bit pattern of NaNs are conserved over arithmetic operations, the\nresult of `copysign` with `sign` being a NaN might produce an unexpected or non-portable\nresult. See the [specification of NaN bit patterns](primitive@f32#nan-bit-patterns) for more\ninfo.\n\n# Examples\n\n```\nlet f = 3.5_f64;\n\nassert_eq!(f.copysign(0.42), 3.5_f64);\nassert_eq!(f.copysign(-0.42), -3.5_f64);\nassert_eq!((-f).copysign(0.42), 3.5_f64);\nassert_eq!((-f).copysign(-0.42), -3.5_f64);\n\nassert!(f64::NAN.copysign(1.0).is_nan());\n```",
"id": 10110,
"inner": {
"function": {
@@ -9021,67 +8562,53 @@
}
],
[
- "rhs",
- {
- "primitive": "i8"
- }
- ],
- [
- "carry",
+ "sign",
{
- "primitive": "bool"
+ "primitive": "f64"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i8"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "f64"
}
}
}
},
"links": {
- "Self::overflowing_add": 10108,
- "`u8::carrying_add`": 10109
+ "primitive@f32#nan-bit-patterns": 265
},
- "name": "carrying_add",
+ "name": "copysign",
"span": {
"begin": [
- 247,
+ 1509,
5
],
"end": [
- 266,
- 6
+ 1509,
+ 50
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10111": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 136469, is_soft: false}, feature: \"float_algebraic\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136469, is_soft: false}, feature: \"float_algebraic\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs` with an unsigned `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1i8.overflowing_add_unsigned(2), (3, false));\nassert_eq!((i8::MIN).overflowing_add_unsigned(u8::MAX), (i8::MAX, false));\nassert_eq!((i8::MAX - 2).overflowing_add_unsigned(3), (i8::MIN, true));\n```",
+ "docs": "Float addition that allows optimizations based on algebraic rules.\n\nSee [algebraic operators](primitive@f32#algebraic-operators) for more info.",
"id": 10111,
"inner": {
"function": {
@@ -9107,56 +8634,51 @@
[
"rhs",
{
- "primitive": "u8"
+ "primitive": "f64"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i8"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "f64"
}
}
}
},
- "links": {},
- "name": "overflowing_add_unsigned",
+ "links": {
+ "primitive@f32#algebraic-operators": 265
+ },
+ "name": "algebraic_add",
"span": {
"begin": [
- 247,
+ 1520,
5
],
"end": [
- 266,
- 6
+ 1520,
+ 54
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
"10112": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 136469, is_soft: false}, feature: \"float_algebraic\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136469, is_soft: false}, feature: \"float_algebraic\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` - `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating whether an arithmetic overflow\nwould occur. If an overflow would have occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5i8.overflowing_sub(2), (3, false));\nassert_eq!(i8::MIN.overflowing_sub(1), (i8::MAX, true));\n```",
+ "docs": "Float subtraction that allows optimizations based on algebraic rules.\n\nSee [algebraic operators](primitive@f32#algebraic-operators) for more info.",
"id": 10112,
"inner": {
"function": {
@@ -9182,57 +8704,122 @@
[
"rhs",
{
- "primitive": "i8"
+ "primitive": "f64"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
+ "primitive": "f64"
+ }
+ }
+ }
+ },
+ "links": {
+ "primitive@f32#algebraic-operators": 265
+ },
+ "name": "algebraic_sub",
+ "span": {
+ "begin": [
+ 1531,
+ 5
+ ],
+ "end": [
+ 1531,
+ 54
+ ],
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
+ },
+ "visibility": "public"
+ },
+ "10113": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 136469, is_soft: false}, feature: \"float_algebraic\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136469, is_soft: false}, feature: \"float_algebraic\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "method returns a new number and does not mutate the original value"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Float multiplication that allows optimizations based on algebraic rules.\n\nSee [algebraic operators](primitive@f32#algebraic-operators) for more info.",
+ "id": 10113,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
{
- "primitive": "i8"
- },
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
{
- "primitive": "bool"
+ "primitive": "f64"
}
]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "f64"
}
}
}
},
- "links": {},
- "name": "overflowing_sub",
+ "links": {
+ "primitive@f32#algebraic-operators": 265
+ },
+ "name": "algebraic_mul",
"span": {
"begin": [
- 247,
+ 1542,
5
],
"end": [
- 266,
- 6
+ 1542,
+ 54
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
- "10113": {
+ "10114": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 136469, is_soft: false}, feature: \"float_algebraic\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136469, is_soft: false}, feature: \"float_algebraic\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` − `rhs` − `borrow` and returns a tuple\ncontaining the difference and the output borrow.\n\nPerforms \"ternary subtraction\" by subtracting both an integer\noperand and a borrow-in bit from `self`, and returns an output\ninteger and a borrow-out bit. This allows chaining together multiple\nsubtractions to create a wider subtraction, and can be useful for\nbignum subtraction.\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n\n// 9 6 (a = 9 × 2^8 + 6)\n// - 5 7 (b = 5 × 2^8 + 7)\n// ---------\n// 3 MAX (diff = 3 × 2^8 + 2^8 - 1)\n\nlet (a1, a0): (u8, u8) = (9, 6);\nlet (b1, b0): (u8, u8) = (5, 7);\nlet borrow0 = false;\n\nlet (diff0, borrow1) = a0.borrowing_sub(b0, borrow0);\nassert_eq!(borrow1, true);\nlet (diff1, borrow2) = a1.borrowing_sub(b1, borrow1);\nassert_eq!(borrow2, false);\n\nassert_eq!((diff1, diff0), (3, u8::MAX));\n```",
- "id": 10113,
+ "docs": "Float division that allows optimizations based on algebraic rules.\n\nSee [algebraic operators](primitive@f32#algebraic-operators) for more info.",
+ "id": 10114,
"inner": {
"function": {
"generics": {
@@ -9257,60 +8844,52 @@
[
"rhs",
{
- "primitive": "u8"
- }
- ],
- [
- "borrow",
- {
- "primitive": "bool"
+ "primitive": "f64"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u8"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "f64"
}
}
}
},
- "links": {},
- "name": "borrowing_sub",
+ "links": {
+ "primitive@f32#algebraic-operators": 265
+ },
+ "name": "algebraic_div",
"span": {
"begin": [
- 447,
+ 1553,
5
],
"end": [
- 465,
- 6
+ 1553,
+ 54
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
- "10114": {
+ "10115": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 136469, is_soft: false}, feature: \"float_algebraic\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136469, is_soft: false}, feature: \"float_algebraic\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` − `rhs` − `borrow` and checks for\noverflow.\n\nPerforms \"ternary subtraction\" by subtracting both an integer\noperand and a borrow-in bit from `self`, and returns a tuple of the\ndifference along with a boolean indicating whether an arithmetic\noverflow would occur. On overflow, the wrapped value is returned.\n\nThis allows chaining together multiple subtractions to create a\nwider subtraction, and can be useful for bignum subtraction. This\nmethod should only be used for the most significant word; for the\nless significant words the unsigned method\n[`u8::borrowing_sub`]\nshould be used.\n\nThe output boolean returned by this method is *not* a borrow flag,\nand should *not* be subtracted from a more significant word.\n\nIf the input borrow is false, this method is equivalent to\n[`overflowing_sub`](Self::overflowing_sub).\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n// Only the most significant word is signed.\n//\n// 6 8 (a = 6 × 2^8 + 8)\n// - -5 9 (b = -5 × 2^8 + 9)\n// ---------\n// 10 MAX (diff = 10 × 2^8 + 2^8 - 1)\n\nlet (a1, a0): (i8, u8) = (6, 8);\nlet (b1, b0): (i8, u8) = (-5, 9);\nlet borrow0 = false;\n\n// u8::borrowing_sub for the less significant words\nlet (diff0, borrow1) = a0.borrowing_sub(b0, borrow0);\nassert_eq!(borrow1, true);\n\n// i8::borrowing_sub for the most significant word\nlet (diff1, overflow) = a1.borrowing_sub(b1, borrow1);\nassert_eq!(overflow, false);\n\nassert_eq!((diff1, diff0), (10, u8::MAX));\n```",
- "id": 10114,
+ "docs": "Float remainder that allows optimizations based on algebraic rules.\n\nSee [algebraic operators](primitive@f32#algebraic-operators) for more info.",
+ "id": 10115,
"inner": {
"function": {
"generics": {
@@ -9335,484 +8914,1028 @@
[
"rhs",
{
- "primitive": "i8"
- }
- ],
- [
- "borrow",
- {
- "primitive": "bool"
+ "primitive": "f64"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i8"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "f64"
}
}
}
},
"links": {
- "Self::overflowing_sub": 10112,
- "`u8::borrowing_sub`": 10113
+ "primitive@f32#algebraic-operators": 265
},
- "name": "borrowing_sub",
+ "name": "algebraic_rem",
"span": {
"begin": [
- 247,
+ 1564,
5
],
"end": [
- 266,
- 6
+ 1564,
+ 54
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
"visibility": "public"
},
- "10115": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
+ "10116": {
+ "attrs": [],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` - `rhs` with an unsigned `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1i8.overflowing_sub_unsigned(2), (-1, false));\nassert_eq!((i8::MAX).overflowing_sub_unsigned(u8::MAX), (i8::MIN, false));\nassert_eq!((i8::MIN + 2).overflowing_sub_unsigned(3), (i8::MAX, true));\n```",
- "id": 10115,
+ "docs": null,
+ "id": 10116,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "f64"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "i8"
- },
- {
- "primitive": "bool"
- }
- ]
- }
- }
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 10065,
+ 10066,
+ 10067,
+ 10068,
+ 10070,
+ 10072,
+ 10069,
+ 10071,
+ 10073,
+ 10074,
+ 10075,
+ 10076,
+ 10077,
+ 10078,
+ 10079,
+ 10080,
+ 10081,
+ 10082,
+ 10083,
+ 10084,
+ 10085,
+ 10086,
+ 10087,
+ 10088,
+ 10089,
+ 10090,
+ 10091,
+ 10092,
+ 10093,
+ 10094,
+ 10095,
+ 10096,
+ 10097,
+ 10099,
+ 10098,
+ 10100,
+ 10101,
+ 10102,
+ 10103,
+ 10104,
+ 10105,
+ 10106,
+ 10107,
+ 10108,
+ 10109,
+ 10110,
+ 10111,
+ 10112,
+ 10113,
+ 10114,
+ 10115
+ ],
+ "provided_trait_methods": [],
+ "trait": null
}
},
"links": {},
- "name": "overflowing_sub_unsigned",
+ "name": null,
"span": {
"begin": [
- 247,
- 5
+ 388,
+ 1
],
"end": [
- 266,
- 6
+ 388,
+ 9
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f64.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
- "10116": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "10117": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 10117,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "f64"
+ },
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": true,
+ "is_unsafe": false,
+ "items": [],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 1,
+ "path": "Send"
}
}
- ],
- "crate_id": 1,
+ },
+ "links": {},
+ "name": null,
+ "span": null,
+ "visibility": "default"
+ },
+ "10118": {
+ "attrs": [],
+ "crate_id": 0,
"deprecation": null,
- "docs": "Calculates the multiplication of `self` and `rhs`.\n\nReturns a tuple of the multiplication along with a boolean indicating whether an arithmetic overflow\nwould occur. If an overflow would have occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5i8.overflowing_mul(2), (10, false));\nassert_eq!(1_000_000_000i32.overflowing_mul(10), (1410065408, true));\n```",
- "id": 10116,
+ "docs": null,
+ "id": 10118,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "f64"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "is_negative": false,
+ "is_synthetic": true,
+ "is_unsafe": false,
+ "items": [],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 5,
+ "path": "Sync"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": null,
+ "visibility": "default"
+ },
+ "10119": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 10119,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "f64"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "i8"
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": true,
+ "is_unsafe": false,
+ "items": [],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 313,
+ "path": "Freeze"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": null,
+ "visibility": "default"
+ },
+ "1012": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1012,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ }
+ ],
+ "constraints": []
}
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "i8"
+ },
+ "id": 762,
+ "path": "Drain"
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
},
- {
- "primitive": "bool"
+ "name": "T"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "U"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "T"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 39,
+ "path": "Into"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "U"
+ }
}
- ]
- }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 332,
+ 334
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "U"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 197,
+ "path": "TryFrom"
}
}
},
"links": {},
- "name": "overflowing_mul",
+ "name": null,
"span": {
"begin": [
- 247,
- 5
+ 827,
+ 1
],
"end": [
- 266,
- 6
+ 829,
+ 24
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
- "10117": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "10120": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 10120,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "f64"
+ },
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": true,
+ "is_unsafe": false,
+ "items": [],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 7,
+ "path": "Unpin"
}
}
- ],
- "crate_id": 1,
+ },
+ "links": {},
+ "name": null,
+ "span": null,
+ "visibility": "default"
+ },
+ "10121": {
+ "attrs": [],
+ "crate_id": 0,
"deprecation": null,
- "docs": "Calculates the \"full multiplication\" `self * rhs + carry`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need the `carry`, then you can use [`Self::widening_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.carrying_mul(-2, 0), (4294967286, -1));\nassert_eq!(5i32.carrying_mul(-2, 10), (0, 0));\nassert_eq!(1_000_000_000i32.carrying_mul(-10, 0), (2884901888, -3));\nassert_eq!(1_000_000_000i32.carrying_mul(-10, 10), (2884901898, -3));\nassert_eq!(i8::MAX.carrying_mul(i8::MAX, i8::MAX), (i8::MAX.unsigned_abs() + 1, i8::MAX / 2));\n```",
- "id": 10117,
+ "docs": null,
+ "id": 10121,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "f64"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "is_negative": false,
+ "is_synthetic": true,
+ "is_unsafe": false,
+ "items": [],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 316,
+ "path": "UnwindSafe"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": null,
+ "visibility": "default"
+ },
+ "10122": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 10122,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "f64"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
- ],
- [
- "carry",
- {
- "primitive": "i8"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "u8"
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": true,
+ "is_unsafe": false,
+ "items": [],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 318,
+ "path": "RefUnwindSafe"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": null,
+ "visibility": "default"
+ },
+ "10123": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 10123,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "primitive": "f64"
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
},
- {
- "primitive": "i8"
+ "name": "T"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "maybe",
+ "trait": {
+ "args": null,
+ "id": 3,
+ "path": "Sized"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "T"
+ }
}
- ]
- }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 319
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "T"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 321,
+ "path": "Borrow"
}
}
},
- "links": {
- "`Self::widening_mul`": 10118
- },
- "name": "carrying_mul",
+ "links": {},
+ "name": null,
"span": {
"begin": [
- 247,
- 5
+ 212,
+ 1
],
"end": [
- 266,
- 6
+ 212,
+ 38
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/borrow.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
- "10118": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
+ "10124": {
+ "attrs": [],
+ "crate_id": 0,
"deprecation": null,
- "docs": "Calculates the complete product `self * rhs` without the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nIf you also need to add a carry to the wide result, then you want\n[`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.widening_mul(-2), (4294967286, -1));\nassert_eq!(1_000_000_000i32.widening_mul(-10), (2884901888, -3));\n```",
- "id": 10118,
+ "docs": null,
+ "id": 10124,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "for": {
+ "primitive": "f64"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "u8"
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
},
- {
- "primitive": "i8"
+ "name": "T"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "maybe",
+ "trait": {
+ "args": null,
+ "id": 3,
+ "path": "Sized"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "T"
+ }
}
- ]
- }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 322
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "T"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 324,
+ "path": "BorrowMut"
}
}
},
- "links": {
- "`Self::carrying_mul`": 10117
- },
- "name": "widening_mul",
+ "links": {},
+ "name": null,
"span": {
"begin": [
- 247,
- 5
+ 221,
+ 1
],
"end": [
- 266,
- 6
+ 221,
+ 41
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/borrow.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
- "10119": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "10125": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 10125,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "primitive": "f64"
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 97,
+ "path": "Clone"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "T"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 422
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 424,
+ "path": "CloneToUninit"
}
}
- ],
- "crate_id": 1,
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 515,
+ 1
+ ],
+ "end": [
+ 515,
+ 42
+ ],
+ "filename": "checkouts/rust/library/core/src/clone.rs"
+ },
+ "visibility": "default"
+ },
+ "10126": {
+ "attrs": [],
+ "crate_id": 0,
"deprecation": null,
- "docs": "Calculates the \"full multiplication\" `self * rhs + carry1 + carry2`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need either `carry`, then you can use [`Self::widening_mul`] instead,\nand if you only need one `carry`, then you can use [`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.carrying_mul_add(-2, 0, 0), (4294967286, -1));\nassert_eq!(5i32.carrying_mul_add(-2, 10, 10), (10, 0));\nassert_eq!(1_000_000_000i32.carrying_mul_add(-10, 0, 0), (2884901888, -3));\nassert_eq!(1_000_000_000i32.carrying_mul_add(-10, 10, 10), (2884901908, -3));\nassert_eq!(i8::MAX.carrying_mul_add(i8::MAX, i8::MAX, i8::MAX), (u8::MAX, i8::MAX / 2));\n```",
- "id": 10119,
+ "docs": null,
+ "id": 10126,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "for": {
+ "primitive": "f64"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
- ],
- [
- "carry",
- {
- "primitive": "i8"
- }
- ],
- [
- "add",
- {
- "primitive": "i8"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "u8"
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
},
- {
- "primitive": "i8"
+ "name": "T"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "U"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "T"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 37,
+ "path": "From"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "U"
+ }
}
- ]
- }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 325
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "U"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 39,
+ "path": "Into"
}
}
},
- "links": {
- "`Self::carrying_mul`": 10117,
- "`Self::widening_mul`": 10118
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 767,
+ 1
+ ],
+ "end": [
+ 769,
+ 24
+ ],
+ "filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
- "name": "carrying_mul_add",
+ "visibility": "default"
+ },
+ "10127": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 10127,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "primitive": "f64"
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ }
+ ],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 327
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "T"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 37,
+ "path": "From"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
"span": {
"begin": [
- 247,
- 5
+ 785,
+ 1
],
"end": [
- 266,
- 6
+ 785,
+ 28
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
- "1012": {
+ "10128": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1012,
+ "id": 10128,
"inner": {
"impl": {
"blanket_impl": {
"generic": "T"
},
"for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "K"
- }
- },
+ "primitive": "f64"
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "U"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
{
- "type": {
- "generic": "V"
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "T"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 197,
+ "path": "TryFrom"
+ }
}
}
],
- "constraints": []
+ "generic_params": [],
+ "type": {
+ "generic": "U"
+ }
}
- },
- "id": 762,
- "path": "Drain"
- }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 329,
+ 330
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "U"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 198,
+ "path": "TryInto"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 811,
+ 1
+ ],
+ "end": [
+ 813,
+ 27
+ ],
+ "filename": "checkouts/rust/library/core/src/convert/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "10129": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 10129,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "primitive": "f64"
},
"generics": {
"params": [
@@ -9876,8 +9999,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -9893,7 +10016,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -9902,263 +10025,402 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "10120": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
+ "1013": {
+ "attrs": [],
+ "crate_id": 0,
"deprecation": null,
- "docs": "Calculates the divisor when `self` is divided by `rhs`.\n\nReturns a tuple of the divisor along with a boolean indicating whether an arithmetic overflow would\noccur. If an overflow would occur then self is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i8.overflowing_div(2), (2, false));\nassert_eq!(i8::MIN.overflowing_div(-1), (i8::MIN, true));\n```",
- "id": 10120,
+ "docs": null,
+ "id": 1013,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "i8"
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ }
+ ],
+ "constraints": []
}
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "i8"
+ },
+ "id": 762,
+ "path": "Drain"
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
},
- {
- "primitive": "bool"
+ "name": "T"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "outlives": "'static"
+ },
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "maybe",
+ "trait": {
+ "args": null,
+ "id": 3,
+ "path": "Sized"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "T"
+ }
}
- ]
- }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 336
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 339,
+ "path": "Any"
}
}
},
"links": {},
- "name": "overflowing_div",
+ "name": null,
"span": {
"begin": [
- 247,
- 5
+ 138,
+ 1
],
"end": [
- 266,
- 6
+ 138,
+ 36
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/any.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
- "10121": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
+ "10130": {
+ "attrs": [],
+ "crate_id": 0,
"deprecation": null,
- "docs": "Calculates the quotient of Euclidean division `self.div_euclid(rhs)`.\n\nReturns a tuple of the divisor along with a boolean indicating whether an arithmetic overflow would\noccur. If an overflow would occur then `self` is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i8.overflowing_div_euclid(2), (2, false));\nassert_eq!(i8::MIN.overflowing_div_euclid(-1), (i8::MIN, true));\n```",
- "id": 10121,
+ "docs": null,
+ "id": 10130,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "for": {
+ "primitive": "f64"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "i8"
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
},
- {
- "primitive": "bool"
+ "name": "T"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "outlives": "'static"
+ },
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "maybe",
+ "trait": {
+ "args": null,
+ "id": 3,
+ "path": "Sized"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "T"
+ }
}
- ]
- }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 336
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 339,
+ "path": "Any"
}
}
},
"links": {},
- "name": "overflowing_div_euclid",
+ "name": null,
"span": {
"begin": [
- 247,
- 5
+ 138,
+ 1
],
"end": [
- 266,
- 6
+ 138,
+ 36
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/any.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
- "10122": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "10131": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 10131,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "primitive": "f64"
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 97,
+ "path": "Clone"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "T"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 430,
+ 431,
+ 432
+ ],
+ "provided_trait_methods": [
+ "clone_into"
+ ],
+ "trait": {
+ "args": null,
+ "id": 155,
+ "path": "ToOwned"
}
}
- ],
- "crate_id": 1,
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 85,
+ 1
+ ],
+ "end": [
+ 87,
+ 14
+ ],
+ "filename": "checkouts/rust/library/alloc/src/borrow.rs"
+ },
+ "visibility": "default"
+ },
+ "10132": {
+ "attrs": [],
+ "crate_id": 0,
"deprecation": null,
- "docs": "Calculates the remainder when `self` is divided by `rhs`.\n\nReturns a tuple of the remainder after dividing along with a boolean indicating whether an\narithmetic overflow would occur. If an overflow would occur then 0 is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i8.overflowing_rem(2), (1, false));\nassert_eq!(i8::MIN.overflowing_rem(-1), (0, true));\n```",
- "id": 10122,
+ "docs": null,
+ "id": 10132,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "for": {
+ "primitive": "f64"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "i8"
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
},
- {
- "primitive": "bool"
+ "name": "T"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 436,
+ "path": "Display"
+ }
+ }
+ },
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "maybe",
+ "trait": {
+ "args": null,
+ "id": 3,
+ "path": "Sized"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "T"
+ }
}
- ]
- }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 434
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 161,
+ "path": "ToString"
}
}
},
"links": {},
- "name": "overflowing_rem",
+ "name": null,
"span": {
"begin": [
- 247,
- 5
+ 2866,
+ 1
],
"end": [
- 266,
- 6
+ 2866,
+ 46
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/alloc/src/string.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
- "10123": {
+ "10133": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
},
{
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Overflowing Euclidean remainder. Calculates `self.rem_euclid(rhs)`.\n\nReturns a tuple of the remainder after dividing along with a boolean indicating whether an\narithmetic overflow would occur. If an overflow would occur then 0 is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i8.overflowing_rem_euclid(2), (1, false));\nassert_eq!(i8::MIN.overflowing_rem_euclid(-1), (0, true));\n```",
- "id": 10123,
+ "docs": "Raises a number to a floating point power.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet x = 2.0_f128;\nlet abs_difference = (x.powf(2.0) - (x * x)).abs();\nassert!(abs_difference <= f128::EPSILON);\n\nassert_eq!(f128::powf(1.0, f128::NAN), 1.0);\nassert_eq!(f128::powf(f128::NAN, 0.0), 1.0);\n# }\n```",
+ "id": 10133,
"inner": {
"function": {
"generics": {
@@ -10169,7 +10431,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -10181,59 +10443,55 @@
}
],
[
- "rhs",
+ "n",
{
- "primitive": "i8"
+ "primitive": "f128"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i8"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "overflowing_rem_euclid",
+ "name": "powf",
"span": {
"begin": [
- 247,
+ 46,
5
],
"end": [
- 266,
+ 48,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f128.rs"
},
"visibility": "public"
},
- "10124": {
+ "10134": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Negates self, overflowing if this is equal to the minimum value.\n\nReturns a tuple of the negated version of self along with a boolean indicating whether an overflow\nhappened. If `self` is the minimum value (e.g., `i32::MIN` for values of type `i32`), then the\nminimum value will be returned again and `true` will be returned for an overflow happening.\n\n# Examples\n\n```\nassert_eq!(2i8.overflowing_neg(), (-2, false));\nassert_eq!(i8::MIN.overflowing_neg(), (i8::MIN, true));\n```",
- "id": 10124,
+ "docs": "Returns `e^(self)`, (the exponential function).\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet one = 1.0f128;\n// e^1\nlet e = one.exp();\n\n// ln(e) - 1 == 0\nlet abs_difference = (e.ln() - 1.0).abs();\n\nassert!(abs_difference <= f128::EPSILON);\n# }\n```",
+ "id": 10134,
"inner": {
"function": {
"generics": {
@@ -10244,7 +10502,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -10258,51 +10516,47 @@
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i8"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "overflowing_neg",
+ "name": "exp",
"span": {
"begin": [
- 247,
+ 78,
5
],
"end": [
- 266,
+ 80,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f128.rs"
},
"visibility": "public"
},
- "10125": {
+ "10135": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Shifts self left by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean indicating whether the shift\nvalue was larger than or equal to the number of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then used to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x1i8.overflowing_shl(4), (0x10, false));\nassert_eq!(0x1i32.overflowing_shl(36), (0x10, true));\nassert_eq!(0x10i8.overflowing_shl(7), (0, false));\n```",
- "id": 10125,
+ "docs": "Returns `2^(self)`.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet f = 2.0f128;\n\n// 2^2 - 4 == 0\nlet abs_difference = (f.exp2() - 4.0).abs();\n\nassert!(abs_difference <= f128::EPSILON);\n# }\n```",
+ "id": 10135,
"inner": {
"function": {
"generics": {
@@ -10313,7 +10567,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -10323,61 +10577,51 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i8"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "overflowing_shl",
+ "name": "exp2",
"span": {
"begin": [
- 247,
+ 108,
5
],
"end": [
- 266,
+ 110,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f128.rs"
},
"visibility": "public"
},
- "10126": {
+ "10136": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Shifts self right by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean indicating whether the shift\nvalue was larger than or equal to the number of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then used to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x10i8.overflowing_shr(4), (0x1, false));\nassert_eq!(0x10i32.overflowing_shr(36), (0x1, true));\n```",
- "id": 10126,
+ "docs": "Returns the natural logarithm of the number.\n\nThis returns NaN when the number is negative, and negative infinity when number is zero.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet one = 1.0f128;\n// e^1\nlet e = one.exp();\n\n// ln(e) - 1 == 0\nlet abs_difference = (e.ln() - 1.0).abs();\n\nassert!(abs_difference <= f128::EPSILON);\n# }\n```\n\nNon-positive values:\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nassert_eq!(0_f128.ln(), f128::NEG_INFINITY);\nassert!((-42_f128).ln().is_nan());\n# }\n```",
+ "id": 10136,
"inner": {
"function": {
"generics": {
@@ -10388,7 +10632,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -10398,61 +10642,51 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i8"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "overflowing_shr",
+ "name": "ln",
"span": {
"begin": [
- 247,
+ 153,
5
],
"end": [
- 266,
+ 155,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f128.rs"
},
"visibility": "public"
},
- "10127": {
+ "10137": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Computes the absolute value of `self`.\n\nReturns a tuple of the absolute version of self along with a boolean indicating whether an overflow\nhappened. If self is the minimum value\n(e.g., i8::MIN for values of type i8),\nthen the minimum value will be returned again and true will be returned\nfor an overflow happening.\n\n# Examples\n\n```\nassert_eq!(10i8.overflowing_abs(), (10, false));\nassert_eq!((-10i8).overflowing_abs(), (10, false));\nassert_eq!((i8::MIN).overflowing_abs(), (i8::MIN, true));\n```",
- "id": 10127,
+ "docs": "Returns the logarithm of the number with respect to an arbitrary base.\n\nThis returns NaN when the number is negative, and negative infinity when number is zero.\n\nThe result might not be correctly rounded owing to implementation details;\n`self.log2()` can produce more accurate results for base 2, and\n`self.log10()` can produce more accurate results for base 10.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet five = 5.0f128;\n\n// log5(5) - 1 == 0\nlet abs_difference = (five.log(5.0) - 1.0).abs();\n\nassert!(abs_difference <= f128::EPSILON);\n# }\n```\n\nNon-positive values:\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nassert_eq!(0_f128.log(10.0), f128::NEG_INFINITY);\nassert!((-42_f128).log(10.0).is_nan());\n# }\n```",
+ "id": 10137,
"inner": {
"function": {
"generics": {
@@ -10463,7 +10697,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -10473,55 +10707,57 @@
{
"generic": "Self"
}
+ ],
+ [
+ "base",
+ {
+ "primitive": "f128"
+ }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i8"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "overflowing_abs",
+ "name": "log",
"span": {
"begin": [
- 247,
+ 200,
5
],
"end": [
- 266,
+ 202,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f128.rs"
},
"visibility": "public"
},
- "10128": {
+ "10138": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\nReturns a tuple of the exponentiation along with a bool indicating\nwhether an overflow happened.\n\n# Examples\n\n```\nassert_eq!(3i8.overflowing_pow(4), (81, false));\nassert_eq!(3i8.overflowing_pow(5), (-13, true));\n```",
- "id": 10128,
+ "docs": "Returns the base 2 logarithm of the number.\n\nThis returns NaN when the number is negative, and negative infinity when number is zero.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet two = 2.0f128;\n\n// log2(2) - 1 == 0\nlet abs_difference = (two.log2() - 1.0).abs();\n\nassert!(abs_difference <= f128::EPSILON);\n# }\n```\n\nNon-positive values:\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nassert_eq!(0_f128.log2(), f128::NEG_INFINITY);\nassert!((-42_f128).log2().is_nan());\n# }\n```",
+ "id": 10138,
"inner": {
"function": {
"generics": {
@@ -10532,7 +10768,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -10542,61 +10778,51 @@
{
"generic": "Self"
}
- ],
- [
- "exp",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i8"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "overflowing_pow",
+ "name": "log2",
"span": {
"begin": [
- 247,
+ 243,
5
],
"end": [
- 266,
+ 245,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f128.rs"
},
"visibility": "public"
},
- "10129": {
+ "10139": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\n# Examples\n\n```\nlet x: i8 = 2; // or any other integer type\n\nassert_eq!(x.pow(5), 32);\n```",
- "id": 10129,
+ "docs": "Returns the base 10 logarithm of the number.\n\nThis returns NaN when the number is negative, and negative infinity when number is zero.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet ten = 10.0f128;\n\n// log10(10) - 1 == 0\nlet abs_difference = (ten.log10() - 1.0).abs();\n\nassert!(abs_difference <= f128::EPSILON);\n# }\n```\n\nNon-positive values:\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nassert_eq!(0_f128.log10(), f128::NEG_INFINITY);\nassert!((-42_f128).log10().is_nan());\n# }\n```",
+ "id": 10139,
"inner": {
"function": {
"generics": {
@@ -10607,7 +10833,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -10617,46 +10843,40 @@
{
"generic": "Self"
}
- ],
- [
- "exp",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "pow",
+ "name": "log10",
"span": {
"begin": [
- 247,
+ 286,
5
],
"end": [
- 266,
+ 288,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f128.rs"
},
"visibility": "public"
},
- "1013": {
+ "1014": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1013,
+ "id": 1014,
"inner": {
"impl": {
"blanket_impl": {
- "generic": "T"
+ "generic": "I"
},
"for": {
"resolved_path": {
@@ -10694,31 +10914,28 @@
"is_synthetic": false
}
},
- "name": "T"
+ "name": "I"
}
],
"where_predicates": [
{
"bound_predicate": {
"bounds": [
- {
- "outlives": "'static"
- },
{
"trait_bound": {
"generic_params": [],
- "modifier": "maybe",
+ "modifier": "none",
"trait": {
"args": null,
- "id": 3,
- "path": "Sized"
+ "id": 49,
+ "path": "Iterator"
}
}
}
],
"generic_params": [],
"type": {
- "generic": "T"
+ "generic": "I"
}
}
}
@@ -10728,13 +10945,15 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 858,
+ 859,
+ 860
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
- "path": "Any"
+ "id": 47,
+ "path": "IntoIterator"
}
}
},
@@ -10742,38 +10961,38 @@
"name": null,
"span": {
"begin": [
- 138,
+ 314,
1
],
"end": [
- 138,
- 36
- ],
- "filename": "checkouts/rust/library/core/src/any.rs"
+ 314,
+ 37
+ ],
+ "filename": "checkouts/rust/library/core/src/iter/traits/collect.rs"
},
"visibility": "default"
},
- "10130": {
+ "10140": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
},
{
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Returns the square root of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is negative.\n\n# Examples\n\n```\nassert_eq!(10i8.isqrt(), 3);\n```",
- "id": 10130,
+ "docs": "Returns the cube root of a number.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\n\nThis function currently corresponds to the `cbrtf128` from libc on Unix\nand Windows. Note that this might change in the future.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet x = 8.0f128;\n\n// x^(1/3) - 2 == 0\nlet abs_difference = (x.cbrt() - 2.0).abs();\n\nassert!(abs_difference <= f128::EPSILON);\n# }\n```",
+ "id": 10140,
"inner": {
"function": {
"generics": {
@@ -10784,7 +11003,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -10798,47 +11017,47 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "isqrt",
+ "name": "cbrt",
"span": {
"begin": [
- 247,
+ 320,
5
],
"end": [
- 266,
+ 322,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f128.rs"
},
"visibility": "public"
},
- "10131": {
+ "10141": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
},
{
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Calculates the quotient of Euclidean division of `self` by `rhs`.\n\nThis computes the integer `q` such that `self = q * rhs + r`, with\n`r = self.rem_euclid(rhs)` and `0 <= r < abs(rhs)`.\n\nIn other words, the result is `self / rhs` rounded to the integer `q`\nsuch that `self >= q * rhs`.\nIf `self > 0`, this is equal to rounding towards zero (the default in Rust);\nif `self < 0`, this is equal to rounding away from zero (towards +/- infinity).\nIf `rhs > 0`, this is equal to rounding towards -infinity;\nif `rhs < 0`, this is equal to rounding towards +infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\nlet a: i8 = 7; // or any other integer type\nlet b = 4;\n\nassert_eq!(a.div_euclid(b), 1); // 7 >= 4 * 1\nassert_eq!(a.div_euclid(-b), -1); // 7 >= -4 * -1\nassert_eq!((-a).div_euclid(b), -2); // -7 >= 4 * -2\nassert_eq!((-a).div_euclid(-b), 2); // -7 >= -4 * 2\n```",
- "id": 10131,
+ "docs": "Compute the distance between the origin and a point (`x`, `y`) on the\nEuclidean plane. Equivalently, compute the length of the hypotenuse of a\nright-angle triangle with other sides having length `x.abs()` and\n`y.abs()`.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\n\nThis function currently corresponds to the `hypotf128` from libc on Unix\nand Windows. Note that this might change in the future.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet x = 2.0f128;\nlet y = 3.0f128;\n\n// sqrt(x^2 + y^2)\nlet abs_difference = (x.hypot(y) - (x.powi(2) + y.powi(2)).sqrt()).abs();\n\nassert!(abs_difference <= f128::EPSILON);\n# }\n```",
+ "id": 10141,
"inner": {
"function": {
"generics": {
@@ -10849,7 +11068,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -10861,58 +11080,55 @@
}
],
[
- "rhs",
+ "other",
{
- "primitive": "i8"
+ "primitive": "f128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "div_euclid",
+ "name": "hypot",
"span": {
"begin": [
- 247,
+ 358,
5
],
"end": [
- 266,
+ 360,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f128.rs"
},
"visibility": "public"
},
- "10132": {
+ "10142": {
"attrs": [
{
- "other": "#[doc(alias = \"modulo\", alias = \"mod\")]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
},
{
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Calculates the least nonnegative remainder of `self (mod rhs)`.\n\nThis is done as if by the Euclidean division algorithm -- given\n`r = self.rem_euclid(rhs)`, the result satisfies\n`self = rhs * self.div_euclid(rhs) + r` and `0 <= r < abs(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN` and\n`rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\nlet a: i8 = 7; // or any other integer type\nlet b = 4;\n\nassert_eq!(a.rem_euclid(b), 3);\nassert_eq!((-a).rem_euclid(b), 1);\nassert_eq!(a.rem_euclid(-b), 3);\nassert_eq!((-a).rem_euclid(-b), 1);\n```\n\nThis will panic:\n```should_panic\nlet _ = i8::MIN.rem_euclid(-1);\n```",
- "id": 10132,
+ "docs": "Computes the sine of a number (in radians).\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet x = std::f128::consts::FRAC_PI_2;\n\nlet abs_difference = (x.sin() - 1.0).abs();\n\nassert!(abs_difference <= f128::EPSILON);\n# }\n```",
+ "id": 10142,
"inner": {
"function": {
"generics": {
@@ -10923,7 +11139,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -10933,54 +11149,51 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "rem_euclid",
+ "name": "sin",
"span": {
"begin": [
- 247,
+ 387,
5
],
"end": [
- 266,
+ 389,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f128.rs"
},
"visibility": "public"
},
- "10133": {
+ "10143": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
},
{
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards negative infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nlet a: i8 = 8;\nlet b = 3;\n\nassert_eq!(a.div_floor(b), 2);\nassert_eq!(a.div_floor(-b), -3);\nassert_eq!((-a).div_floor(b), -3);\nassert_eq!((-a).div_floor(-b), 2);\n```",
- "id": 10133,
+ "docs": "Computes the cosine of a number (in radians).\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet x = 2.0 * std::f128::consts::PI;\n\nlet abs_difference = (x.cos() - 1.0).abs();\n\nassert!(abs_difference <= f128::EPSILON);\n# }\n```",
+ "id": 10143,
"inner": {
"function": {
"generics": {
@@ -10991,7 +11204,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -11001,54 +11214,51 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "div_floor",
+ "name": "cos",
"span": {
"begin": [
- 247,
+ 416,
5
],
"end": [
- 266,
+ 418,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f128.rs"
},
"visibility": "public"
},
- "10134": {
+ "10144": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
},
{
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards positive infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nlet a: i8 = 8;\nlet b = 3;\n\nassert_eq!(a.div_ceil(b), 3);\nassert_eq!(a.div_ceil(-b), -2);\nassert_eq!((-a).div_ceil(b), -2);\nassert_eq!((-a).div_ceil(-b), 3);\n```",
- "id": 10134,
+ "docs": "Computes the tangent of a number (in radians).\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\nThis function currently corresponds to the `tanf128` from libc on Unix and\nWindows. Note that this might change in the future.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet x = std::f128::consts::FRAC_PI_4;\nlet abs_difference = (x.tan() - 1.0).abs();\n\nassert!(abs_difference <= f128::EPSILON);\n# }\n```",
+ "id": 10144,
"inner": {
"function": {
"generics": {
@@ -11059,7 +11269,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -11069,51 +11279,54 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "div_ceil",
+ "name": "tan",
"span": {
"begin": [
- 247,
+ 447,
5
],
"end": [
- 266,
+ 449,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f128.rs"
},
"visibility": "public"
},
- "10135": {
+ "10145": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ "other": "#[doc(alias = \"arcsin\")]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "If `rhs` is positive, calculates the smallest value greater than or\nequal to `self` that is a multiple of `rhs`. If `rhs` is negative,\ncalculates the largest value less than or equal to `self` that is a\nmultiple of `rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nOn overflow, this function will panic if overflow checks are enabled (default in debug\nmode) and wrap if overflow checks are disabled (default in release mode).\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(16_i8.next_multiple_of(8), 16);\nassert_eq!(23_i8.next_multiple_of(8), 24);\nassert_eq!(16_i8.next_multiple_of(-8), 16);\nassert_eq!(23_i8.next_multiple_of(-8), 16);\nassert_eq!((-16_i8).next_multiple_of(8), -16);\nassert_eq!((-23_i8).next_multiple_of(8), -16);\nassert_eq!((-16_i8).next_multiple_of(-8), -16);\nassert_eq!((-23_i8).next_multiple_of(-8), -24);\n```",
- "id": 10135,
+ "docs": "Computes the arcsine of a number. Return value is in radians in\nthe range [-pi/2, pi/2] or NaN if the number is outside the range\n[-1, 1].\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\nThis function currently corresponds to the `asinf128` from libc on Unix\nand Windows. Note that this might change in the future.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet f = std::f128::consts::FRAC_PI_4;\n\n// asin(sin(pi/2))\nlet abs_difference = (f.sin().asin() - f).abs();\n\nassert!(abs_difference <= f128::EPSILON);\n# }\n```",
+ "id": 10145,
"inner": {
"function": {
"generics": {
@@ -11124,7 +11337,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -11134,51 +11347,54 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "next_multiple_of",
+ "name": "asin",
"span": {
"begin": [
- 247,
+ 483,
5
],
"end": [
- 266,
+ 485,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f128.rs"
},
"visibility": "public"
},
- "10136": {
+ "10146": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ "other": "#[doc(alias = \"arccos\")]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "If `rhs` is positive, calculates the smallest value greater than or\nequal to `self` that is a multiple of `rhs`. If `rhs` is negative,\ncalculates the largest value less than or equal to `self` that is a\nmultiple of `rhs`. Returns `None` if `rhs` is zero or the operation\nwould result in overflow.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(16_i8.checked_next_multiple_of(8), Some(16));\nassert_eq!(23_i8.checked_next_multiple_of(8), Some(24));\nassert_eq!(16_i8.checked_next_multiple_of(-8), Some(16));\nassert_eq!(23_i8.checked_next_multiple_of(-8), Some(16));\nassert_eq!((-16_i8).checked_next_multiple_of(8), Some(-16));\nassert_eq!((-23_i8).checked_next_multiple_of(8), Some(-16));\nassert_eq!((-16_i8).checked_next_multiple_of(-8), Some(-16));\nassert_eq!((-23_i8).checked_next_multiple_of(-8), Some(-24));\nassert_eq!(1_i8.checked_next_multiple_of(0), None);\nassert_eq!(i8::MAX.checked_next_multiple_of(2), None);\n```",
- "id": 10136,
+ "docs": "Computes the arccosine of a number. Return value is in radians in\nthe range [0, pi] or NaN if the number is outside the range\n[-1, 1].\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\nThis function currently corresponds to the `acosf128` from libc on Unix\nand Windows. Note that this might change in the future.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet f = std::f128::consts::FRAC_PI_4;\n\n// acos(cos(pi/4))\nlet abs_difference = (f.cos().acos() - std::f128::consts::FRAC_PI_4).abs();\n\nassert!(abs_difference <= f128::EPSILON);\n# }\n```",
+ "id": 10146,
"inner": {
"function": {
"generics": {
@@ -11189,7 +11405,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -11199,72 +11415,54 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i8"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "checked_next_multiple_of",
+ "name": "acos",
"span": {
"begin": [
- 247,
+ 519,
5
],
"end": [
- 266,
+ 521,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f128.rs"
},
"visibility": "public"
},
- "10137": {
+ "10147": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[doc(alias = \"arctan\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
},
{
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nThis method might not be optimized owing to implementation details;\n`ilog2` can produce results more efficiently for base 2, and `ilog10`\ncan produce results more efficiently for base 10.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero,\nor if `base` is less than 2.\n\n# Examples\n\n```\nassert_eq!(5i8.ilog(5), 1);\n```",
- "id": 10137,
+ "docs": "Computes the arctangent of a number. Return value is in radians in the\nrange [-pi/2, pi/2];\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\nThis function currently corresponds to the `atanf128` from libc on Unix\nand Windows. Note that this might change in the future.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet f = 1.0f128;\n\n// atan(tan(1))\nlet abs_difference = (f.tan().atan() - 1.0).abs();\n\nassert!(abs_difference <= f128::EPSILON);\n# }\n```",
+ "id": 10147,
"inner": {
"function": {
"generics": {
@@ -11275,7 +11473,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -11285,57 +11483,51 @@
{
"generic": "Self"
}
- ],
- [
- "base",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "ilog",
+ "name": "atan",
"span": {
"begin": [
- 247,
+ 554,
5
],
"end": [
- 266,
+ 556,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f128.rs"
},
"visibility": "public"
},
- "10138": {
+ "10148": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
},
{
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Returns the base 10 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero.\n\n# Example\n\n```\nassert_eq!(10i8.ilog10(), 1);\n```",
- "id": 10138,
+ "docs": "Computes the four quadrant arctangent of `self` (`y`) and `other` (`x`) in radians.\n\n | `x` | `y` | Piecewise Definition | Range |\n |---------|---------|----------------------|---------------|\n | `>= +0` | `>= +0` | `arctan(y/x)` | `[+0, +pi/2]` |\n | `>= +0` | `<= -0` | `arctan(y/x)` | `[-pi/2, -0]` |\n | `<= -0` | `>= +0` | `arctan(y/x) + pi` | `[+pi/2, +pi]`|\n | `<= -0` | `<= -0` | `arctan(y/x) - pi` | `[-pi, -pi/2]`|\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\nThis function currently corresponds to the `atan2f128` from libc on Unix\nand Windows. Note that this might change in the future.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\n// Positive angles measured counter-clockwise\n// from positive x axis\n// -pi/4 radians (45 deg clockwise)\nlet x1 = 3.0f128;\nlet y1 = -3.0f128;\n\n// 3pi/4 radians (135 deg counter-clockwise)\nlet x2 = -3.0f128;\nlet y2 = 3.0f128;\n\nlet abs_difference_1 = (y1.atan2(x1) - (-std::f128::consts::FRAC_PI_4)).abs();\nlet abs_difference_2 = (y2.atan2(x2) - (3.0 * std::f128::consts::FRAC_PI_4)).abs();\n\nassert!(abs_difference_1 <= f128::EPSILON);\nassert!(abs_difference_2 <= f128::EPSILON);\n# }\n```",
+ "id": 10148,
"inner": {
"function": {
"generics": {
@@ -11346,7 +11538,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -11356,48 +11548,55 @@
{
"generic": "Self"
}
+ ],
+ [
+ "other",
+ {
+ "primitive": "f128"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "ilog10",
+ "name": "atan2",
"span": {
"begin": [
- 247,
+ 603,
5
],
"end": [
- 266,
+ 605,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f128.rs"
},
"visibility": "public"
},
- "10139": {
+ "10149": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[doc(alias = \"sincos\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Inline(Hint)]"
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nReturns `None` if the number is negative or zero, or if the base is not at least 2.\n\nThis method might not be optimized owing to implementation details;\n`checked_ilog2` can produce results more efficiently for base 2, and\n`checked_ilog10` can produce results more efficiently for base 10.\n\n# Examples\n\n```\nassert_eq!(5i8.checked_ilog(5), Some(1));\n```",
- "id": 10139,
+ "docs": "Simultaneously computes the sine and cosine of the number, `x`. Returns\n`(sin(x), cos(x))`.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\nThis function currently corresponds to the `(f128::sin(x),\nf128::cos(x))`. Note that this might change in the future.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet x = std::f128::consts::FRAC_PI_4;\nlet f = x.sin_cos();\n\nlet abs_difference_0 = (f.0 - x.sin()).abs();\nlet abs_difference_1 = (f.1 - x.cos()).abs();\n\nassert!(abs_difference_0 <= f128::EPSILON);\nassert!(abs_difference_1 <= f128::EPSILON);\n# }\n```",
+ "id": 10149,
"inner": {
"function": {
"generics": {
@@ -11408,7 +11607,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -11418,174 +11617,98 @@
{
"generic": "Self"
}
- ],
- [
- "base",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "f128"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "f128"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_ilog",
+ "name": "sin_cos",
"span": {
"begin": [
- 247,
+ 639,
5
],
"end": [
- 266,
+ 641,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f128.rs"
},
"visibility": "public"
},
- "1014": {
+ "1015": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1014,
+ "id": 1015,
"inner": {
- "impl": {
- "blanket_impl": {
- "generic": "I"
- },
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 762,
- "path": "Drain"
- }
- },
+ "assoc_type": {
+ "bounds": [],
"generics": {
- "params": [
+ "params": [],
+ "where_predicates": []
+ },
+ "type": {
+ "tuple": [
{
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "I"
- }
- ],
- "where_predicates": [
+ "generic": "K"
+ },
{
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 49,
- "path": "Iterator"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "I"
- }
- }
+ "generic": "V"
}
]
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 858,
- 859,
- 860
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": null,
- "id": 47,
- "path": "IntoIterator"
}
}
},
"links": {},
- "name": null,
+ "name": "Item",
"span": {
"begin": [
- 314,
- 1
+ 2256,
+ 5
],
"end": [
- 314,
- 37
+ 2256,
+ 24
],
- "filename": "checkouts/rust/library/core/src/iter/traits/collect.rs"
+ "filename": "std/src/collections/hash/map.rs"
},
"visibility": "default"
},
- "10140": {
+ "10150": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Returns the base 2 logarithm of the number, rounded down.\n\nReturns `None` if the number is negative or zero.\n\n# Examples\n\n```\nassert_eq!(2i8.checked_ilog2(), Some(1));\n```",
- "id": 10140,
+ "docs": "Returns `e^(self) - 1` in a way that is accurate even if the\nnumber is close to zero.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\nThis function currently corresponds to the `expm1f128` from libc on Unix\nand Windows. Note that this might change in the future.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet x = 1e-8_f128;\n\n// for very small x, e^x is approximately 1 + x + x^2 / 2\nlet approx = x + x * x / 2.0;\nlet abs_difference = (x.exp_m1() - approx).abs();\n\nassert!(abs_difference < 1e-10);\n# }\n```",
+ "id": 10150,
"inner": {
"function": {
"generics": {
@@ -11596,7 +11719,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -11610,59 +11733,50 @@
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "checked_ilog2",
+ "name": "exp_m1",
"span": {
"begin": [
- 247,
+ 674,
5
],
"end": [
- 266,
+ 676,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f128.rs"
},
"visibility": "public"
},
- "10141": {
+ "10151": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[doc(alias = \"log1p\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Returns the base 10 logarithm of the number, rounded down.\n\nReturns `None` if the number is negative or zero.\n\n# Example\n\n```\nassert_eq!(10i8.checked_ilog10(), Some(1));\n```",
- "id": 10141,
+ "docs": "Returns `ln(1+n)` (natural logarithm) more accurately than if\nthe operations were performed separately.\n\nThis returns NaN when `n < -1.0`, and negative infinity when `n == -1.0`.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\nThis function currently corresponds to the `log1pf128` from libc on Unix\nand Windows. Note that this might change in the future.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet x = 1e-8_f128;\n\n// for very small x, ln(1 + x) is approximately x - x^2 / 2\nlet approx = x - x * x / 2.0;\nlet abs_difference = (x.ln_1p() - approx).abs();\n\nassert!(abs_difference < 1e-10);\n# }\n```\n\nOut-of-range values:\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nassert_eq!((-1.0_f128).ln_1p(), f128::NEG_INFINITY);\nassert!((-2.0_f128).ln_1p().is_nan());\n# }\n```",
+ "id": 10151,
"inner": {
"function": {
"generics": {
@@ -11673,7 +11787,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -11687,59 +11801,47 @@
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "checked_ilog10",
+ "name": "ln_1p",
"span": {
"begin": [
- 247,
+ 723,
5
],
"end": [
- 266,
+ 725,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f128.rs"
},
"visibility": "public"
},
- "10142": {
+ "10152": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Computes the absolute value of `self`.\n\n# Overflow behavior\n\nThe absolute value of\n`i8::MIN`\ncannot be represented as an\n`i8`,\nand attempting to calculate it will cause an overflow. This means\nthat code in debug mode will trigger a panic on this case and\noptimized code will return\n`i8::MIN`\nwithout a panic. If you do not want this behavior, consider\nusing [`unsigned_abs`](Self::unsigned_abs) instead.\n\n# Examples\n\n```\nassert_eq!(10i8.abs(), 10);\nassert_eq!((-10i8).abs(), 10);\n```",
- "id": 10142,
+ "docs": "Hyperbolic sine function.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\nThis function currently corresponds to the `sinhf128` from libc on Unix\nand Windows. Note that this might change in the future.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet e = std::f128::consts::E;\nlet x = 1.0f128;\n\nlet f = x.sinh();\n// Solving sinh() at 1 gives `(e^2-1)/(2e)`\nlet g = ((e * e) - 1.0) / (2.0 * e);\nlet abs_difference = (f - g).abs();\n\nassert!(abs_difference <= f128::EPSILON);\n# }\n```",
+ "id": 10152,
"inner": {
"function": {
"generics": {
@@ -11750,7 +11852,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -11764,46 +11866,47 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f128"
}
}
}
},
- "links": {
- "Self::unsigned_abs": 10106
- },
- "name": "abs",
+ "links": {},
+ "name": "sinh",
"span": {
"begin": [
- 247,
+ 759,
5
],
"end": [
- 266,
+ 761,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f128.rs"
},
"visibility": "public"
},
- "10143": {
+ "10153": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Computes the absolute difference between `self` and `other`.\n\nThis function always returns the correct answer without overflow or\npanics by returning an unsigned integer.\n\n# Examples\n\n```\nassert_eq!(100i8.abs_diff(80), 20u8);\nassert_eq!(100i8.abs_diff(110), 10u8);\nassert_eq!((-100i8).abs_diff(80), 180u8);\nassert_eq!((-100i8).abs_diff(-120), 20u8);\nassert_eq!(i8::MIN.abs_diff(i8::MAX), u8::MAX);\n```",
- "id": 10143,
+ "docs": "Hyperbolic cosine function.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\nThis function currently corresponds to the `coshf128` from libc on Unix\nand Windows. Note that this might change in the future.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet e = std::f128::consts::E;\nlet x = 1.0f128;\nlet f = x.cosh();\n// Solving cosh() at 1 gives this result\nlet g = ((e * e) + 1.0) / (2.0 * e);\nlet abs_difference = (f - g).abs();\n\n// Same result\nassert!(abs_difference <= f128::EPSILON);\n# }\n```",
+ "id": 10153,
"inner": {
"function": {
"generics": {
@@ -11814,7 +11917,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -11824,54 +11927,51 @@
{
"generic": "Self"
}
- ],
- [
- "other",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "abs_diff",
+ "name": "cosh",
"span": {
"begin": [
- 247,
+ 795,
5
],
"end": [
- 266,
+ 797,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f128.rs"
},
"visibility": "public"
},
- "10144": {
+ "10154": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_int_sign\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Returns a number representing sign of `self`.\n\n - `0` if the number is zero\n - `1` if the number is positive\n - `-1` if the number is negative\n\n# Examples\n\n```\nassert_eq!(10i8.signum(), 1);\nassert_eq!(0i8.signum(), 0);\nassert_eq!((-10i8).signum(), -1);\n```",
- "id": 10144,
+ "docs": "Hyperbolic tangent function.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\nThis function currently corresponds to the `tanhf128` from libc on Unix\nand Windows. Note that this might change in the future.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet e = std::f128::consts::E;\nlet x = 1.0f128;\n\nlet f = x.tanh();\n// Solving tanh() at 1 gives `(1 - e^(-2))/(1 + e^(-2))`\nlet g = (1.0 - e.powi(-2)) / (1.0 + e.powi(-2));\nlet abs_difference = (f - g).abs();\n\nassert!(abs_difference <= f128::EPSILON);\n# }\n```",
+ "id": 10154,
"inner": {
"function": {
"generics": {
@@ -11882,7 +11982,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -11896,44 +11996,50 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "signum",
+ "name": "tanh",
"span": {
"begin": [
- 247,
+ 831,
5
],
"end": [
- 266,
+ 833,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f128.rs"
},
"visibility": "public"
},
- "10145": {
+ "10155": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[doc(alias = \"arcsinh\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": null
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Returns `true` if `self` is positive and `false` if the number is zero or\nnegative.\n\n# Examples\n\n```\nassert!(10i8.is_positive());\nassert!(!(-10i8).is_positive());\n```",
- "id": 10145,
+ "docs": "Inverse hyperbolic sine function.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet x = 1.0f128;\nlet f = x.sinh().asinh();\n\nlet abs_difference = (f - x).abs();\n\nassert!(abs_difference <= f128::EPSILON);\n# }\n```",
+ "id": 10155,
"inner": {
"function": {
"generics": {
@@ -11944,7 +12050,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -11958,44 +12064,50 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "is_positive",
+ "name": "asinh",
"span": {
"begin": [
- 247,
+ 862,
5
],
"end": [
- 266,
+ 866,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f128.rs"
},
"visibility": "public"
},
- "10146": {
+ "10156": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[doc(alias = \"arccosh\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": null
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Returns `true` if `self` is negative and `false` if the number is zero or\npositive.\n\n# Examples\n\n```\nassert!((-10i8).is_negative());\nassert!(!10i8.is_negative());\n```",
- "id": 10146,
+ "docs": "Inverse hyperbolic cosine function.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet x = 1.0f128;\nlet f = x.cosh().acosh();\n\nlet abs_difference = (f - x).abs();\n\nassert!(abs_difference <= f128::EPSILON);\n# }\n```",
+ "id": 10156,
"inner": {
"function": {
"generics": {
@@ -12006,7 +12118,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -12020,44 +12132,50 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "is_negative",
+ "name": "acosh",
"span": {
"begin": [
- 247,
+ 895,
5
],
"end": [
- 266,
+ 901,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f128.rs"
},
"visibility": "public"
},
- "10147": {
+ "10157": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\", promotable: false}}]"
+ "other": "#[doc(alias = \"arctanh\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Returns the bit pattern of `self` reinterpreted as a signed integer of the same size.\n\nThis produces the same result as an `as` cast, but ensures that the bit-width remains\nthe same.\n\n# Examples\n\n```\nlet n = u8::MAX;\n\nassert_eq!(n.cast_signed(), -1i8);\n```",
- "id": 10147,
+ "docs": "Inverse hyperbolic tangent function.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet x = std::f128::consts::FRAC_PI_6;\nlet f = x.tanh().atanh();\n\nlet abs_difference = (f - x).abs();\n\nassert!(abs_difference <= 1e-5);\n# }\n```",
+ "id": 10157,
"inner": {
"function": {
"generics": {
@@ -12068,7 +12186,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -12082,44 +12200,47 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "cast_signed",
+ "name": "atanh",
"span": {
"begin": [
- 447,
+ 930,
5
],
"end": [
- 465,
+ 932,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f128.rs"
},
"visibility": "public"
},
- "10148": {
+ "10158": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nbig-endian (network) byte order.\n\n\n**Note**: This function is meaningless on `i8`. Byte order does not exist as a\nconcept for byte-sized integers. This function is only provided in symmetry\nwith larger integer types. You can cast from and to `u8` using\n[`cast_signed`](u8::cast_signed) and [`cast_unsigned`](Self::cast_unsigned).\n\n# Examples\n\n```\nlet bytes = 0x12i8.to_be_bytes();\nassert_eq!(bytes, [0x12]);\n```",
- "id": 10148,
+ "docs": "Gamma function.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\nThis function currently corresponds to the `tgammaf128` from libc on Unix\nand Windows. Note that this might change in the future.\n\n# Examples\n\n```\n#![feature(f128)]\n#![feature(float_gamma)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet x = 5.0f128;\n\nlet abs_difference = (x.gamma() - 24.0).abs();\n\nassert!(abs_difference <= f128::EPSILON);\n# }\n```",
+ "id": 10158,
"inner": {
"function": {
"generics": {
@@ -12130,7 +12251,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -12144,52 +12265,47 @@
],
"is_c_variadic": false,
"output": {
- "array": {
- "len": "1",
- "type": {
- "primitive": "u8"
- }
- }
+ "primitive": "f128"
}
}
}
},
- "links": {
- "Self::cast_unsigned": 10035,
- "u8::cast_signed": 10147
- },
- "name": "to_be_bytes",
+ "links": {},
+ "name": "gamma",
"span": {
"begin": [
- 247,
+ 964,
5
],
"end": [
- 266,
+ 966,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f128.rs"
},
"visibility": "public"
},
- "10149": {
+ "10159": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nlittle-endian byte order.\n\n\n**Note**: This function is meaningless on `i8`. Byte order does not exist as a\nconcept for byte-sized integers. This function is only provided in symmetry\nwith larger integer types. You can cast from and to `u8` using\n[`cast_signed`](u8::cast_signed) and [`cast_unsigned`](Self::cast_unsigned).\n\n# Examples\n\n```\nlet bytes = 0x12i8.to_le_bytes();\nassert_eq!(bytes, [0x12]);\n```",
- "id": 10149,
+ "docs": "Natural logarithm of the absolute value of the gamma function\n\nThe integer part of the tuple indicates the sign of the gamma function.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\nThis function currently corresponds to the `lgammaf128_r` from libc on Unix\nand Windows. Note that this might change in the future.\n\n# Examples\n\n```\n#![feature(f128)]\n#![feature(float_gamma)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet x = 2.0f128;\n\nlet abs_difference = (x.ln_gamma().0 - 0.0).abs();\n\nassert!(abs_difference <= f128::EPSILON);\n# }\n```",
+ "id": 10159,
"inner": {
"function": {
"generics": {
@@ -12200,7 +12316,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -12214,92 +12330,136 @@
],
"is_c_variadic": false,
"output": {
- "array": {
- "len": "1",
- "type": {
- "primitive": "u8"
+ "tuple": [
+ {
+ "primitive": "f128"
+ },
+ {
+ "primitive": "i32"
}
- }
+ ]
}
}
}
},
- "links": {
- "Self::cast_unsigned": 10035,
- "u8::cast_signed": 10147
- },
- "name": "to_le_bytes",
+ "links": {},
+ "name": "ln_gamma",
"span": {
"begin": [
- 247,
+ 1000,
5
],
"end": [
- 266,
+ 1004,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f128.rs"
},
"visibility": "public"
},
- "1015": {
- "attrs": [],
+ "1016": {
+ "attrs": [
+ {
+ "other": "#[attr = Inline(Hint)]"
+ }
+ ],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1015,
+ "id": 1016,
"inner": {
- "assoc_type": {
- "bounds": [],
+ "function": {
"generics": {
"params": [],
"where_predicates": []
},
- "type": {
- "tuple": [
- {
- "generic": "K"
- },
- {
- "generic": "V"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "borrowed_ref": {
+ "is_mutable": true,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "tuple": [
+ {
+ "generic": "K"
+ },
+ {
+ "generic": "V"
+ }
+ ]
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
}
- ]
+ }
}
}
},
"links": {},
- "name": "Item",
+ "name": "next",
"span": {
"begin": [
- 2261,
+ 2259,
5
],
"end": [
2261,
- 24
+ 6
],
"filename": "std/src/collections/hash/map.rs"
},
"visibility": "default"
},
- "10150": {
+ "10160": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nnative byte order.\n\nAs the target platform's native endianness is used, portable code\nshould use [`to_be_bytes`] or [`to_le_bytes`], as appropriate,\ninstead.\n\n\n**Note**: This function is meaningless on `i8`. Byte order does not exist as a\nconcept for byte-sized integers. This function is only provided in symmetry\nwith larger integer types. You can cast from and to `u8` using\n[`cast_signed`](u8::cast_signed) and [`cast_unsigned`](Self::cast_unsigned).\n\n[`to_be_bytes`]: Self::to_be_bytes\n[`to_le_bytes`]: Self::to_le_bytes\n\n# Examples\n\n```\nlet bytes = 0x12i8.to_ne_bytes();\nassert_eq!(\n bytes,\n if cfg!(target_endian = \"big\") {\n [0x12]\n } else {\n [0x12]\n }\n);\n```",
- "id": 10150,
+ "docs": "Error function.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\nThis function currently corresponds to the `erff128` from libc on Unix\nand Windows. Note that this might change in the future.\n\n# Examples\n\n```\n#![feature(f128)]\n#![feature(float_erf)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n/// The error function relates what percent of a normal distribution lies\n/// within `x` standard deviations (scaled by `1/sqrt(2)`).\nfn within_standard_deviations(x: f128) -> f128 {\n (x * std::f128::consts::FRAC_1_SQRT_2).erf() * 100.0\n}\n\n// 68% of a normal distribution is within one standard deviation\nassert!((within_standard_deviations(1.0) - 68.269).abs() < 0.01);\n// 95% of a normal distribution is within two standard deviations\nassert!((within_standard_deviations(2.0) - 95.450).abs() < 0.01);\n// 99.7% of a normal distribution is within three standard deviations\nassert!((within_standard_deviations(3.0) - 99.730).abs() < 0.01);\n# }\n```",
+ "id": 10160,
"inner": {
"function": {
"generics": {
@@ -12310,7 +12470,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -12324,54 +12484,47 @@
],
"is_c_variadic": false,
"output": {
- "array": {
- "len": "1",
- "type": {
- "primitive": "u8"
- }
- }
+ "primitive": "f128"
}
}
}
},
- "links": {
- "Self::cast_unsigned": 10035,
- "Self::to_be_bytes": 10148,
- "Self::to_le_bytes": 10149,
- "u8::cast_signed": 10147
- },
- "name": "to_ne_bytes",
+ "links": {},
+ "name": "erf",
"span": {
"begin": [
- 247,
+ 1042,
5
],
"end": [
- 266,
+ 1044,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f128.rs"
},
"visibility": "public"
},
- "10151": {
+ "10161": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Inline(Hint)]"
},
{
"must_use": {
- "reason": null
+ "reason": "method returns a new number and does not mutate the original value"
}
+ },
+ {
+ "other": "#[attr = AllowIncoherentImpl]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Creates an integer value from its representation as a byte array in\nbig endian.\n\n\n**Note**: This function is meaningless on `i8`. Byte order does not exist as a\nconcept for byte-sized integers. This function is only provided in symmetry\nwith larger integer types. You can cast from and to `u8` using\n[`cast_signed`](u8::cast_signed) and [`cast_unsigned`](Self::cast_unsigned).\n\n# Examples\n\n```\nlet value = i8::from_be_bytes([0x12]);\nassert_eq!(value, 0x12);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_be_i8(input: &mut &[u8]) -> i8 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n i8::from_be_bytes(int_bytes.try_into().unwrap())\n}\n```",
- "id": 10151,
+ "docs": "Complementary error function.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\nThis function currently corresponds to the `erfcf128` from libc on Unix\nand Windows. Note that this might change in the future.\n\n# Examples\n\n```\n#![feature(f128)]\n#![feature(float_erf)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\nlet x: f128 = 0.123;\n\nlet one = x.erf() + x.erfc();\nlet abs_difference = (one - 1.0).abs();\n\nassert!(abs_difference <= f128::EPSILON);\n# }\n```",
+ "id": 10161,
"inner": {
"function": {
"generics": {
@@ -12382,736 +12535,357 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
"inputs": [
[
- "bytes",
+ "self",
{
- "array": {
- "len": "1",
- "type": {
- "primitive": "u8"
- }
- }
+ "generic": "Self"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i8"
+ "primitive": "f128"
}
}
}
},
- "links": {
- "Self::cast_unsigned": 10035,
- "u8::cast_signed": 10147
- },
- "name": "from_be_bytes",
+ "links": {},
+ "name": "erfc",
"span": {
"begin": [
- 247,
+ 1076,
5
],
"end": [
- 266,
+ 1078,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f128.rs"
},
"visibility": "public"
},
- "10152": {
+ "10162": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
- },
- {
- "must_use": {
- "reason": null
- }
+ "other": "#[(not(test))]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Creates an integer value from its representation as a byte array in\nlittle endian.\n\n\n**Note**: This function is meaningless on `i8`. Byte order does not exist as a\nconcept for byte-sized integers. This function is only provided in symmetry\nwith larger integer types. You can cast from and to `u8` using\n[`cast_signed`](u8::cast_signed) and [`cast_unsigned`](Self::cast_unsigned).\n\n# Examples\n\n```\nlet value = i8::from_le_bytes([0x12]);\nassert_eq!(value, 0x12);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_le_i8(input: &mut &[u8]) -> i8 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n i8::from_le_bytes(int_bytes.try_into().unwrap())\n}\n```",
- "id": 10152,
+ "docs": null,
+ "id": 10162,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "f128"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "bytes",
- {
- "array": {
- "len": "1",
- "type": {
- "primitive": "u8"
- }
- }
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i8"
- }
- }
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 10133,
+ 10134,
+ 10135,
+ 10136,
+ 10137,
+ 10138,
+ 10139,
+ 10140,
+ 10141,
+ 10142,
+ 10143,
+ 10144,
+ 10145,
+ 10146,
+ 10147,
+ 10148,
+ 10149,
+ 10150,
+ 10151,
+ 10152,
+ 10153,
+ 10154,
+ 10155,
+ 10156,
+ 10157,
+ 10158,
+ 10159,
+ 10160,
+ 10161
+ ],
+ "provided_trait_methods": [],
+ "trait": null
}
},
- "links": {
- "Self::cast_unsigned": 10035,
- "u8::cast_signed": 10147
- },
- "name": "from_le_bytes",
+ "links": {},
+ "name": null,
"span": {
"begin": [
- 247,
- 5
+ 19,
+ 1
],
"end": [
- 266,
- 6
+ 1079,
+ 2
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/num/f128.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
- "10153": {
+ "10163": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
- },
- {
- "must_use": {
- "reason": null
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Creates an integer value from its memory representation as a byte\narray in native endianness.\n\nAs the target platform's native endianness is used, portable code\nlikely wants to use [`from_be_bytes`] or [`from_le_bytes`], as\nappropriate instead.\n\n[`from_be_bytes`]: Self::from_be_bytes\n[`from_le_bytes`]: Self::from_le_bytes\n\n\n**Note**: This function is meaningless on `i8`. Byte order does not exist as a\nconcept for byte-sized integers. This function is only provided in symmetry\nwith larger integer types. You can cast from and to `u8` using\n[`cast_signed`](u8::cast_signed) and [`cast_unsigned`](Self::cast_unsigned).\n\n# Examples\n\n```\nlet value = i8::from_ne_bytes(if cfg!(target_endian = \"big\") {\n [0x12]\n} else {\n [0x12]\n});\nassert_eq!(value, 0x12);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_ne_i8(input: &mut &[u8]) -> i8 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n i8::from_ne_bytes(int_bytes.try_into().unwrap())\n}\n```",
- "id": 10153,
+ "docs": "The radix or base of the internal representation of `f128`.",
+ "id": 10163,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "u32"
},
- "sig": {
- "inputs": [
- [
- "bytes",
- {
- "array": {
- "len": "1",
- "type": {
- "primitive": "u8"
- }
- }
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i8"
- }
- }
+ "value": "2"
}
},
- "links": {
- "Self::cast_unsigned": 10035,
- "Self::from_be_bytes": 10151,
- "Self::from_le_bytes": 10152,
- "u8::cast_signed": 10147
- },
- "name": "from_ne_bytes",
+ "links": {},
+ "name": "RADIX",
"span": {
"begin": [
- 247,
+ 146,
5
],
"end": [
- 266,
- 6
+ 146,
+ 25
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
- "10154": {
+ "10164": {
"attrs": [
{
- "other": "#[rustc_diagnostic_item = \"i8_legacy_fn_min_value\"]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_min_value\", promotable: true}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
}
],
"crate_id": 1,
- "deprecation": {
- "note": "replaced by the `MIN` associated constant on this type",
- "since": "TBD"
- },
- "docs": "New code should prefer to use\n[`i8::MIN`] instead.\n\nReturns the smallest value that can be represented by this integer type.",
- "id": 10154,
+ "deprecation": null,
+ "docs": "Number of significant digits in base 2.\n\nNote that the size of the mantissa in the bitwise representation is one\nsmaller than this since the leading 1 is not stored explicitly.",
+ "id": 10164,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "u32"
},
- "sig": {
- "inputs": [],
- "is_c_variadic": false,
- "output": {
- "primitive": "i8"
- }
- }
+ "value": "113"
}
},
- "links": {
- "`i8::MIN`": 10021
- },
- "name": "min_value",
+ "links": {},
+ "name": "MANTISSA_DIGITS",
"span": {
"begin": [
- 247,
+ 153,
5
],
"end": [
- 266,
- 6
+ 153,
+ 35
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
- "10155": {
+ "10165": {
"attrs": [
{
- "other": "#[rustc_diagnostic_item = \"i8_legacy_fn_max_value\"]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
}
],
"crate_id": 1,
- "deprecation": {
- "note": "replaced by the `MAX` associated constant on this type",
- "since": "TBD"
- },
- "docs": "New code should prefer to use\n[`i8::MAX`] instead.\n\nReturns the largest value that can be represented by this integer type.",
- "id": 10155,
+ "deprecation": null,
+ "docs": "Approximate number of significant digits in base 10.\n\nThis is the maximum x such that any decimal number with x\nsignificant digits can be converted to `f128` and back without loss.\n\nEqual to floor(log10 2[`MANTISSA_DIGITS`] − 1).\n\n[`MANTISSA_DIGITS`]: f128::MANTISSA_DIGITS",
+ "id": 10165,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "u32"
},
- "sig": {
- "inputs": [],
- "is_c_variadic": false,
- "output": {
- "primitive": "i8"
- }
- }
+ "value": "33"
}
},
"links": {
- "`i8::MAX`": 10022
+ "f128::MANTISSA_DIGITS": 10164
},
- "name": "max_value",
+ "name": "DIGITS",
"span": {
"begin": [
- 247,
+ 164,
5
],
"end": [
- 266,
- 6
+ 164,
+ 26
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
- "10156": {
+ "10166": {
"attrs": [
{
- "other": "#[doc(alias = \"average_floor\")]"
- },
- {
- "other": "#[doc(alias = \"average_ceil\")]"
- },
- {
- "other": "#[doc(alias = \"average\")]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"num_midpoint_signed\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"num_midpoint_signed\"}}]"
+ "other": "#[rustc_diagnostic_item = \"f128_epsilon\"]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the midpoint (average) between `self` and `rhs`.\n\n`midpoint(a, b)` is `(a + b) / 2` as if it were performed in a\nsufficiently-large signed integral type. This implies that the result is\nalways rounded towards zero and that no overflow will ever occur.\n\n# Examples\n\n```\nassert_eq!(0i8.midpoint(4), 2);\nassert_eq!((-1i8).midpoint(2), 0);\nassert_eq!((-7i8).midpoint(0), -3);\nassert_eq!(0i8.midpoint(-7), -3);\nassert_eq!(0i8.midpoint(7), 3);\n```",
- "id": 10156,
+ "docs": "[Machine epsilon] value for `f128`.\n\nThis is the difference between `1.0` and the next larger representable number.\n\nEqual to 21 − [`MANTISSA_DIGITS`].\n\n[Machine epsilon]: https://en.wikipedia.org/wiki/Machine_epsilon\n[`MANTISSA_DIGITS`]: f128::MANTISSA_DIGITS",
+ "id": 10166,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "f128"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i8"
- }
- }
+ "value": "1.92592994438723585305597794258492732e-34_f128"
}
},
- "links": {},
- "name": "midpoint",
+ "links": {
+ "f128::MANTISSA_DIGITS": 10164
+ },
+ "name": "EPSILON",
"span": {
"begin": [
- 267,
+ 176,
5
],
"end": [
- 267,
- 39
+ 176,
+ 28
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
- "10157": {
- "attrs": [],
+ "10167": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 10157,
+ "docs": "Largest finite `f128` value.\n\nEqual to\n(1 − 2−[`MANTISSA_DIGITS`]) 2[`MAX_EXP`].\n\n[`MANTISSA_DIGITS`]: f128::MANTISSA_DIGITS\n[`MAX_EXP`]: f128::MAX_EXP",
+ "id": 10167,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "primitive": "i8"
- },
- "generics": {
- "params": [],
- "where_predicates": []
+ "assoc_const": {
+ "type": {
+ "primitive": "f128"
},
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 10021,
- 10022,
- 10023,
- 10024,
- 10025,
- 10027,
- 10028,
- 10029,
- 10030,
- 10031,
- 10032,
- 10033,
- 10034,
- 10035,
- 10036,
- 10037,
- 10038,
- 10039,
- 10040,
- 10041,
- 10042,
- 10043,
- 10044,
- 10045,
- 10047,
- 10048,
- 10049,
- 10050,
- 10051,
- 10053,
- 10054,
- 10055,
- 10056,
- 10057,
- 10059,
- 10060,
- 10061,
- 10062,
- 10063,
- 10064,
- 10065,
- 10066,
- 10067,
- 10068,
- 10069,
- 10070,
- 10071,
- 10072,
- 10073,
- 10074,
- 10075,
- 10076,
- 10077,
- 10078,
- 10079,
- 10080,
- 10081,
- 10082,
- 10083,
- 10084,
- 10085,
- 10086,
- 10087,
- 10088,
- 10089,
- 10090,
- 10091,
- 10092,
- 10093,
- 10094,
- 10095,
- 10046,
- 10096,
- 10052,
- 10097,
- 10058,
- 10098,
- 10099,
- 10100,
- 10101,
- 10102,
- 10103,
- 10104,
- 10105,
- 10106,
- 10107,
- 10108,
- 10110,
- 10111,
- 10112,
- 10114,
- 10115,
- 10116,
- 10118,
- 10117,
- 10119,
- 10120,
- 10121,
- 10122,
- 10123,
- 10124,
- 10125,
- 10126,
- 10127,
- 10128,
- 10129,
- 10130,
- 10131,
- 10132,
- 10133,
- 10134,
- 10135,
- 10136,
- 10137,
- 10026,
- 10138,
- 10139,
- 10140,
- 10141,
- 10142,
- 10143,
- 10144,
- 10145,
- 10146,
- 10148,
- 10149,
- 10150,
- 10151,
- 10152,
- 10153,
- 10154,
- 10155,
- 10156
- ],
- "provided_trait_methods": [],
- "trait": null
+ "value": "1.18973149535723176508575932662800702e+4932_f128"
}
},
- "links": {},
- "name": null,
+ "links": {
+ "f128::MANTISSA_DIGITS": 10164,
+ "f128::MAX_EXP": 10171
+ },
+ "name": "MAX",
"span": {
"begin": [
- 246,
- 1
+ 200,
+ 5
],
"end": [
- 246,
- 8
+ 200,
+ 24
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "10158": {
+ "10168": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 82, patch: 0})}, feature: \"const_int_from_str\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from a string slice with digits in a given base.\n\nThe string is expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\nassert_eq!(i8::from_str_radix(\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\nassert!(i8::from_str_radix(\"1 \", 10).is_err());\n```",
- "id": 10158,
+ "docs": "Smallest finite `f128` value.\n\nEqual to −[`MAX`].\n\n[`MAX`]: f128::MAX",
+ "id": 10168,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "f128"
},
- "sig": {
- "inputs": [
- [
- "src",
- {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "primitive": "str"
- }
- }
- }
- ],
- [
- "radix",
- {
- "primitive": "u32"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i8"
- }
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 4784,
- "path": "ParseIntError"
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 57,
- "path": "Result"
- }
- }
- }
+ "value": "-1.18973149535723176508575932662800702e+4932_f128"
}
},
- "links": {},
- "name": "from_str_radix",
+ "links": {
+ "f128::MAX": 10167
+ },
+ "name": "MIN",
"span": {
"begin": [
- 1630,
- 1
+ 184,
+ 5
],
"end": [
- 1630,
- 56
+ 184,
+ 24
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
- "10159": {
+ "10169": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from an ASCII-byte slice with decimal digits.\n\nThe characters are expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(i8::from_ascii(b\"+10\"), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(i8::from_ascii(b\"1 \").is_err());\n```",
- "id": 10159,
+ "docs": "One greater than the minimum possible *normal* power of 2 exponent\nfor a significand bounded by 1 ≤ x < 2 (i.e. the IEEE definition).\n\nThis corresponds to the exact minimum possible *normal* power of 2 exponent\nfor a significand bounded by 0.5 ≤ x < 1 (i.e. the C definition).\nIn other words, all normal numbers representable by this type are\ngreater than or equal to 0.5 × 2MIN_EXP.",
+ "id": 10169,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "i32"
},
- "sig": {
- "inputs": [
- [
- "src",
- {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "slice": {
- "primitive": "u8"
- }
- }
- }
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i8"
- }
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 4784,
- "path": "ParseIntError"
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 57,
- "path": "Result"
- }
- }
- }
+ "value": "-16_381"
}
},
"links": {},
- "name": "from_ascii",
+ "name": "MIN_EXP",
"span": {
"begin": [
- 1630,
- 1
+ 210,
+ 5
],
"end": [
- 1630,
- 56
+ 210,
+ 27
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
- "1016": {
+ "1017": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -13120,7 +12894,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1016,
+ "id": 1017,
"inner": {
"function": {
"generics": {
@@ -13140,7 +12914,7 @@
"self",
{
"borrowed_ref": {
- "is_mutable": true,
+ "is_mutable": false,
"lifetime": null,
"type": {
"generic": "Self"
@@ -13151,1071 +12925,304 @@
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "tuple": [
- {
- "generic": "K"
- },
- {
- "generic": "V"
+ "tuple": [
+ {
+ "primitive": "usize"
+ },
+ {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "usize"
}
- ]
- }
+ }
+ ],
+ "constraints": []
}
- ],
- "constraints": []
+ },
+ "id": 51,
+ "path": "Option"
}
- },
- "id": 51,
- "path": "Option"
- }
+ }
+ ]
}
}
}
},
"links": {},
- "name": "next",
+ "name": "size_hint",
"span": {
"begin": [
- 2264,
+ 2263,
5
],
"end": [
- 2266,
+ 2265,
6
],
"filename": "std/src/collections/hash/map.rs"
},
"visibility": "default"
},
- "10160": {
+ "10170": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from an ASCII-byte slice with digits in a given base.\n\nThe characters are expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(i8::from_ascii_radix(b\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(i8::from_ascii_radix(b\"1 \", 10).is_err());\n```",
- "id": 10160,
+ "docs": "Smallest positive normal `f128` value.\n\nEqual to 2[`MIN_EXP`] − 1.\n\n[`MIN_EXP`]: f128::MIN_EXP",
+ "id": 10170,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "f128"
},
- "sig": {
- "inputs": [
- [
- "src",
- {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "slice": {
- "primitive": "u8"
- }
- }
- }
- }
- ],
- [
- "radix",
- {
- "primitive": "u32"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i8"
- }
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 4784,
- "path": "ParseIntError"
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 57,
- "path": "Result"
- }
- }
- }
+ "value": "3.36210314311209350626267781732175260e-4932_f128"
}
},
- "links": {},
- "name": "from_ascii_radix",
+ "links": {
+ "f128::MIN_EXP": 10169
+ },
+ "name": "MIN_POSITIVE",
"span": {
"begin": [
- 1630,
- 1
+ 191,
+ 5
],
"end": [
- 1630,
- 56
+ 191,
+ 33
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
- "10161": {
- "attrs": [],
+ "10171": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 10161,
+ "docs": "One greater than the maximum possible power of 2 exponent\nfor a significand bounded by 1 ≤ x < 2 (i.e. the IEEE definition).\n\nThis corresponds to the exact maximum possible power of 2 exponent\nfor a significand bounded by 0.5 ≤ x < 1 (i.e. the C definition).\nIn other words, all numbers representable by this type are\nstrictly less than 2MAX_EXP.",
+ "id": 10171,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "primitive": "i8"
- },
- "generics": {
- "params": [],
- "where_predicates": []
+ "assoc_const": {
+ "type": {
+ "primitive": "i32"
},
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 10158,
- 10159,
- 10160
- ],
- "provided_trait_methods": [],
- "trait": null
+ "value": "16_384"
}
},
"links": {},
- "name": null,
+ "name": "MAX_EXP",
"span": {
"begin": [
- 1630,
- 1
+ 219,
+ 5
],
"end": [
- 1630,
- 56
+ 219,
+ 27
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "10163": {
+ "10172": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 138215, is_soft: false}, feature: \"int_format_into\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Allows users to write an integer (in signed decimal format) into a variable `buf` of\ntype [`NumBuffer`] that is passed by the caller by mutable reference.\n\n# Examples\n\n```\n#![feature(int_format_into)]\nuse core::fmt::NumBuffer;\n\nlet n = 0i8;\nlet mut buf = NumBuffer::new();\nassert_eq!(n.format_into(&mut buf), \"0\");\n\nlet n1 = 32i8;\nassert_eq!(n1.format_into(&mut buf), \"32\");\n\nlet n2 = i8 :: MAX;\nassert_eq!(n2.format_into(&mut buf), i8 :: MAX.to_string());\n```",
- "id": 10163,
+ "docs": "Minimum x for which 10x is normal.\n\nEqual to ceil(log10 [`MIN_POSITIVE`]).\n\n[`MIN_POSITIVE`]: f128::MIN_POSITIVE",
+ "id": 10172,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "i32"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "buf",
- {
- "borrowed_ref": {
- "is_mutable": true,
- "lifetime": null,
- "type": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i8"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 10162,
- "path": "NumBuffer"
- }
- }
- }
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "primitive": "str"
- }
- }
- }
- }
+ "value": "-4_931"
}
},
"links": {
- "`NumBuffer`": 10162
+ "f128::MIN_POSITIVE": 10170
},
- "name": "format_into",
+ "name": "MIN_10_EXP",
"span": {
"begin": [
- 562,
+ 227,
5
],
"end": [
- 562,
- 95
+ 227,
+ 30
],
- "filename": "checkouts/rust/library/core/src/fmt/num.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
- "10164": {
- "attrs": [],
+ "10173": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 10164,
+ "docs": "Maximum x for which 10x is normal.\n\nEqual to floor(log10 [`MAX`]).\n\n[`MAX`]: f128::MAX",
+ "id": 10173,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "primitive": "i8"
- },
- "generics": {
- "params": [],
- "where_predicates": []
+ "assoc_const": {
+ "type": {
+ "primitive": "i32"
},
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 10163
- ],
- "provided_trait_methods": [],
- "trait": null
+ "value": "4_932"
}
},
- "links": {},
- "name": null,
+ "links": {
+ "f128::MAX": 10167
+ },
+ "name": "MAX_10_EXP",
"span": {
"begin": [
- 562,
+ 234,
5
],
"end": [
- 562,
- 95
+ 234,
+ 30
],
- "filename": "checkouts/rust/library/core/src/fmt/num.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "10165": {
+ "10174": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
+ "other": "#[rustc_diagnostic_item = \"f128_nan\"]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "The smallest value that can be represented by this integer type\n(−215).\n\n# Examples\n\n```\nassert_eq!(i16::MIN, -32768);\n```",
- "id": 10165,
+ "docs": "Not a Number (NaN).\n\nNote that IEEE 754 doesn't define just a single NaN value; a plethora of bit patterns are\nconsidered to be NaN. Furthermore, the standard makes a difference between a \"signaling\" and\na \"quiet\" NaN, and allows inspecting its \"payload\" (the unspecified bits in the bit pattern)\nand its sign. See the [specification of NaN bit patterns](f32#nan-bit-patterns) for more\ninfo.\n\nThis constant is guaranteed to be a quiet NaN (on targets that follow the Rust assumptions\nthat the quiet/signaling bit being set to 1 indicates a quiet NaN). Beyond that, nothing is\nguaranteed about the specific bit pattern chosen here: both payload and sign are arbitrary.\nThe concrete bit pattern may change across Rust versions and target platforms.",
+ "id": 10174,
"inner": {
"assoc_const": {
"type": {
- "primitive": "i16"
+ "primitive": "f128"
},
"value": "_"
}
},
- "links": {},
- "name": "MIN",
+ "links": {
+ "f32#nan-bit-patterns": 265
+ },
+ "name": "NAN",
"span": {
"begin": [
- 271,
+ 251,
5
],
"end": [
- 290,
- 6
+ 251,
+ 24
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
- "10166": {
+ "10175": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "The largest value that can be represented by this integer type\n(215 − 1).\n\n# Examples\n\n```\nassert_eq!(i16::MAX, 32767);\n```",
- "id": 10166,
+ "docs": "Infinity (∞).",
+ "id": 10175,
"inner": {
"assoc_const": {
"type": {
- "primitive": "i16"
+ "primitive": "f128"
},
"value": "_"
}
},
"links": {},
- "name": "MAX",
+ "name": "INFINITY",
"span": {
"begin": [
- 271,
+ 255,
5
],
"end": [
- 290,
- 6
+ 255,
+ 29
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
- "10167": {
+ "10176": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 53, patch: 0})}, feature: \"int_bits_const\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "The size of this integer type in bits.\n\n# Examples\n\n```\nassert_eq!(i16::BITS, 16);\n```",
- "id": 10167,
+ "docs": "Negative infinity (−∞).",
+ "id": 10176,
"inner": {
"assoc_const": {
"type": {
- "primitive": "u32"
- },
- "value": "u16::BITS"
- }
- },
- "links": {},
- "name": "BITS",
- "span": {
- "begin": [
- 271,
- 5
- ],
- "end": [
- 290,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "10168": {
- "attrs": [
- {
- "other": "#[doc(alias = \"popcount\")]"
- },
- {
- "other": "#[doc(alias = \"popcnt\")]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Returns the number of ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 0b100_0000i16;\n\nassert_eq!(n.count_ones(), 1);\n```\n",
- "id": 10168,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "u32"
- }
- }
- }
- },
- "links": {},
- "name": "count_ones",
- "span": {
- "begin": [
- 271,
- 5
- ],
- "end": [
- 290,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "10169": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Returns the number of zeros in the binary representation of `self`.\n\n# Examples\n\n```\nassert_eq!(i16::MAX.count_zeros(), 1);\n```",
- "id": 10169,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "u32"
- }
- }
- }
- },
- "links": {},
- "name": "count_zeros",
- "span": {
- "begin": [
- 271,
- 5
- ],
- "end": [
- 290,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "1017": {
- "attrs": [
- {
- "other": "#[attr = Inline(Hint)]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 1017,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "usize"
- },
- {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "usize"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
- }
- ]
- }
- }
- }
- },
- "links": {},
- "name": "size_hint",
- "span": {
- "begin": [
- 2268,
- 5
- ],
- "end": [
- 2270,
- 6
- ],
- "filename": "std/src/collections/hash/map.rs"
- },
- "visibility": "default"
- },
- "10170": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- },
- {
- "other": "#[attr = TrackCaller]"
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Returns the base 2 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero.\n\n# Examples\n\n```\nassert_eq!(2i16.ilog2(), 1);\n```",
- "id": 10170,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "u32"
- }
- }
- }
- },
- "links": {},
- "name": "ilog2",
- "span": {
- "begin": [
- 271,
- 5
- ],
- "end": [
- 290,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "10171": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Returns the number of leading zeros in the binary representation of `self`.\n\nDepending on what you're doing with the value, you might also be interested in the\n[`ilog2`] function which returns a consistent number, even if the type widens.\n\n# Examples\n\n```\nlet n = -1i16;\n\nassert_eq!(n.leading_zeros(), 0);\n```\n[`ilog2`]: i16::ilog2",
- "id": 10171,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "u32"
- }
- }
- }
- },
- "links": {
- "i16::ilog2": 10170
- },
- "name": "leading_zeros",
- "span": {
- "begin": [
- 271,
- 5
- ],
- "end": [
- 290,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "10172": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Returns the number of trailing zeros in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = -4i16;\n\nassert_eq!(n.trailing_zeros(), 2);\n```",
- "id": 10172,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "u32"
- }
- }
- }
- },
- "links": {},
- "name": "trailing_zeros",
- "span": {
- "begin": [
- 271,
- 5
- ],
- "end": [
- 290,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "10173": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Returns the number of leading ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = -1i16;\n\nassert_eq!(n.leading_ones(), 16);\n```",
- "id": 10173,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "u32"
- }
- }
- }
- },
- "links": {},
- "name": "leading_ones",
- "span": {
- "begin": [
- 271,
- 5
- ],
- "end": [
- 290,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "10174": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Returns the number of trailing ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 3i16;\n\nassert_eq!(n.trailing_ones(), 2);\n```",
- "id": 10174,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "u32"
- }
- }
- }
- },
- "links": {},
- "name": "trailing_ones",
- "span": {
- "begin": [
- 271,
- 5
- ],
- "end": [
- 290,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "10175": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Returns `self` with only the most significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: i16 = 0b_01100100;\n\nassert_eq!(n.isolate_highest_one(), 0b_01000000);\nassert_eq!(0_i16.isolate_highest_one(), 0);\n```",
- "id": 10175,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i16"
- }
- }
- }
- },
- "links": {},
- "name": "isolate_highest_one",
- "span": {
- "begin": [
- 271,
- 5
- ],
- "end": [
- 290,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "10176": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Returns `self` with only the least significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: i16 = 0b_01100100;\n\nassert_eq!(n.isolate_lowest_one(), 0b_00000100);\nassert_eq!(0_i16.isolate_lowest_one(), 0);\n```",
- "id": 10176,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "primitive": "f128"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i16"
- }
- }
+ "value": "_"
}
},
"links": {},
- "name": "isolate_lowest_one",
+ "name": "NEG_INFINITY",
"span": {
"begin": [
- 271,
+ 259,
5
],
"end": [
- 290,
- 6
+ 259,
+ 33
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10177": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the index of the highest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_i16.highest_one(), None);\nassert_eq!(0x1_i16.highest_one(), Some(0));\nassert_eq!(0x10_i16.highest_one(), Some(4));\nassert_eq!(0x1f_i16.highest_one(), Some(4));\n```",
+ "docs": "Returns `true` if this value is NaN.\n\n```\n#![feature(f128)]\n# // FIXME(f16_f128): remove when `unordtf2` is available\n# #[cfg(all(target_arch = \"x86_64\", target_os = \"linux\"))] {\n\nlet nan = f128::NAN;\nlet f = 7.0_f128;\n\nassert!(nan.is_nan());\nassert!(!f.is_nan());\n# }\n```",
"id": 10177,
"inner": {
"function": {
@@ -14241,55 +13248,40 @@
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "highest_one",
+ "name": "is_nan",
"span": {
"begin": [
- 271,
+ 294,
5
],
"end": [
- 290,
- 6
+ 294,
+ 38
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10178": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the index of the lowest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_i16.lowest_one(), None);\nassert_eq!(0x1_i16.lowest_one(), Some(0));\nassert_eq!(0x10_i16.lowest_one(), Some(4));\nassert_eq!(0x1f_i16.lowest_one(), Some(0));\n```",
+ "docs": "Returns `true` if this value is positive infinity or negative infinity, and\n`false` otherwise.\n\n```\n#![feature(f128)]\n# // FIXME(f16_f128): remove when `eqtf2` is available\n# #[cfg(all(target_arch = \"x86_64\", target_os = \"linux\"))] {\n\nlet f = 7.0f128;\nlet inf = f128::INFINITY;\nlet neg_inf = f128::NEG_INFINITY;\nlet nan = f128::NAN;\n\nassert!(!f.is_infinite());\nassert!(!nan.is_infinite());\n\nassert!(inf.is_infinite());\nassert!(neg_inf.is_infinite());\n# }\n```",
"id": 10178,
"inner": {
"function": {
@@ -14315,58 +13307,43 @@
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "lowest_one",
+ "name": "is_infinite",
"span": {
"begin": [
- 271,
+ 321,
5
],
"end": [
- 290,
- 6
+ 321,
+ 43
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10179": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the bit pattern of `self` reinterpreted as an unsigned integer of the same size.\n\nThis produces the same result as an `as` cast, but ensures that the bit-width remains\nthe same.\n\n# Examples\n\n```\nlet n = -1i16;\n\nassert_eq!(n.cast_unsigned(), u16::MAX);\n```",
+ "docs": "Returns `true` if this number is neither infinite nor NaN.\n\n```\n#![feature(f128)]\n# // FIXME(f16_f128): remove when `lttf2` is available\n# #[cfg(all(target_arch = \"x86_64\", target_os = \"linux\"))] {\n\nlet f = 7.0f128;\nlet inf: f128 = f128::INFINITY;\nlet neg_inf: f128 = f128::NEG_INFINITY;\nlet nan: f128 = f128::NAN;\n\nassert!(f.is_finite());\n\nassert!(!nan.is_finite());\nassert!(!inf.is_finite());\nassert!(!neg_inf.is_finite());\n# }\n```",
"id": 10179,
"inner": {
"function": {
@@ -14392,23 +13369,23 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "cast_unsigned",
+ "name": "is_finite",
"span": {
"begin": [
- 271,
+ 348,
5
],
"end": [
- 290,
- 6
+ 348,
+ 41
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
@@ -14556,11 +13533,11 @@
"name": "fold",
"span": {
"begin": [
- 2272,
+ 2267,
5
],
"end": [
- 2278,
+ 2273,
6
],
"filename": "std/src/collections/hash/map.rs"
@@ -14570,20 +13547,17 @@
"10180": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts the bits to the left by a specified amount, `n`,\nwrapping the truncated bits to the end of the resulting integer.\n\nPlease note this isn't the same operation as the `<<` shifting operator!\n\n# Examples\n\n```\nlet n = -0x5ffdi16;\nlet m = 0x3a;\n\nassert_eq!(n.rotate_left(4), m);\n```",
+ "docs": "Returns `true` if the number is [subnormal].\n\n```\n#![feature(f128)]\n# // FIXME(f16_f128): remove when `eqtf2` is available\n# #[cfg(all(target_arch = \"x86_64\", target_os = \"linux\"))] {\n\nlet min = f128::MIN_POSITIVE; // 3.362103143e-4932f128\nlet max = f128::MAX;\nlet lower_than_min = 1.0e-4960_f128;\nlet zero = 0.0_f128;\n\nassert!(!min.is_subnormal());\nassert!(!max.is_subnormal());\n\nassert!(!zero.is_subnormal());\nassert!(!f128::NAN.is_subnormal());\nassert!(!f128::INFINITY.is_subnormal());\n// Values between `0` and `min` are Subnormal.\nassert!(lower_than_min.is_subnormal());\n# }\n```\n\n[subnormal]: https://en.wikipedia.org/wiki/Denormal_number",
"id": 10180,
"inner": {
"function": {
@@ -14605,53 +13579,44 @@
{
"generic": "Self"
}
- ],
- [
- "n",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "rotate_left",
+ "name": "is_subnormal",
"span": {
"begin": [
- 271,
+ 381,
5
],
"end": [
- 290,
- 6
+ 381,
+ 44
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10181": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts the bits to the right by a specified amount, `n`,\nwrapping the truncated bits to the beginning of the resulting\ninteger.\n\nPlease note this isn't the same operation as the `>>` shifting operator!\n\n# Examples\n\n```\nlet n = 0x3ai16;\nlet m = -0x5ffd;\n\nassert_eq!(n.rotate_right(4), m);\n```",
+ "docs": "Returns `true` if the number is neither zero, infinite, [subnormal], or NaN.\n\n```\n#![feature(f128)]\n# // FIXME(f16_f128): remove when `eqtf2` is available\n# #[cfg(all(target_arch = \"x86_64\", target_os = \"linux\"))] {\n\nlet min = f128::MIN_POSITIVE; // 3.362103143e-4932f128\nlet max = f128::MAX;\nlet lower_than_min = 1.0e-4960_f128;\nlet zero = 0.0_f128;\n\nassert!(min.is_normal());\nassert!(max.is_normal());\n\nassert!(!zero.is_normal());\nassert!(!f128::NAN.is_normal());\nassert!(!f128::INFINITY.is_normal());\n// Values between `0` and `min` are Subnormal.\nassert!(!lower_than_min.is_normal());\n# }\n```\n\n[subnormal]: https://en.wikipedia.org/wiki/Denormal_number",
"id": 10181,
"inner": {
"function": {
@@ -14673,53 +13638,39 @@
{
"generic": "Self"
}
- ],
- [
- "n",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "rotate_right",
+ "name": "is_normal",
"span": {
"begin": [
- 271,
+ 412,
5
],
"end": [
- 290,
- 6
+ 412,
+ 41
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10182": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Reverses the byte order of the integer.\n\n# Examples\n\n```\nlet n = 0x1234i16;\n\nlet m = n.swap_bytes();\n\nassert_eq!(m, 0x3412);\n```",
+ "docs": "Returns the floating point category of the number. If only one property\nis going to be tested, it is generally faster to use the specific\npredicate instead.\n\n```\n#![feature(f128)]\n# // FIXME(f16_f128): remove when `eqtf2` is available\n# #[cfg(all(target_arch = \"x86_64\", target_os = \"linux\"))] {\n\nuse std::num::FpCategory;\n\nlet num = 12.4_f128;\nlet inf = f128::INFINITY;\n\nassert_eq!(num.classify(), FpCategory::Normal);\nassert_eq!(inf.classify(), FpCategory::Infinite);\n# }\n```",
"id": 10182,
"inner": {
"function": {
@@ -14745,43 +13696,44 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "resolved_path": {
+ "args": null,
+ "id": 4782,
+ "path": "FpCategory"
+ }
}
}
}
},
"links": {},
- "name": "swap_bytes",
+ "name": "classify",
"span": {
"begin": [
- 271,
+ 436,
5
],
"end": [
- 290,
- 6
+ 436,
+ 46
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10183": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\n second least-significant bit becomes second most-significant bit, etc.\n\n# Examples\n\n```\nlet n = 0x1234i16;\nlet m = n.reverse_bits();\n\nassert_eq!(m, 0x2c48);\nassert_eq!(0, 0i16.reverse_bits());\n```",
+ "docs": "Returns `true` if `self` has a positive sign, including `+0.0`, NaNs with\npositive sign bit and positive infinity.\n\nNote that IEEE 754 doesn't assign any meaning to the sign bit in case of\na NaN, and as Rust doesn't guarantee that the bit pattern of NaNs are\nconserved over arithmetic operations, the result of `is_sign_positive` on\na NaN might produce an unexpected or non-portable result. See the [specification\nof NaN bit patterns](f32#nan-bit-patterns) for more info. Use `self.signum() == 1.0`\nif you need fully portable behavior (will return `false` for all NaNs).\n\n```\n#![feature(f128)]\n\nlet f = 7.0_f128;\nlet g = -7.0_f128;\n\nassert!(f.is_sign_positive());\nassert!(!g.is_sign_positive());\n```",
"id": 10183,
"inner": {
"function": {
@@ -14807,33 +13759,32 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "bool"
}
}
}
},
- "links": {},
- "name": "reverse_bits",
+ "links": {
+ "f32#nan-bit-patterns": 265
+ },
+ "name": "is_sign_positive",
"span": {
"begin": [
- 271,
+ 469,
5
],
"end": [
- 290,
- 6
+ 469,
+ 48
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10184": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
@@ -14843,7 +13794,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts an integer from big endian to the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai16;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(i16::from_be(n), n)\n} else {\n assert_eq!(i16::from_be(n), n.swap_bytes())\n}\n```",
+ "docs": "Returns `true` if `self` has a negative sign, including `-0.0`, NaNs with\nnegative sign bit and negative infinity.\n\nNote that IEEE 754 doesn't assign any meaning to the sign bit in case of\na NaN, and as Rust doesn't guarantee that the bit pattern of NaNs are\nconserved over arithmetic operations, the result of `is_sign_negative` on\na NaN might produce an unexpected or non-portable result. See the [specification\nof NaN bit patterns](f32#nan-bit-patterns) for more info. Use `self.signum() == -1.0`\nif you need fully portable behavior (will return `false` for all NaNs).\n\n```\n#![feature(f128)]\n\nlet f = 7.0_f128;\nlet g = -7.0_f128;\n\nassert!(!f.is_sign_negative());\nassert!(g.is_sign_negative());\n```",
"id": 10184,
"inner": {
"function": {
@@ -14861,51 +13812,48 @@
"sig": {
"inputs": [
[
- "x",
+ "self",
{
- "primitive": "i16"
+ "generic": "Self"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "bool"
}
}
}
},
- "links": {},
- "name": "from_be",
+ "links": {
+ "f32#nan-bit-patterns": 265
+ },
+ "name": "is_sign_negative",
"span": {
"begin": [
- 271,
+ 495,
5
],
"end": [
- 290,
- 6
+ 495,
+ 48
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10185": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[doc(alias = \"nextUp\")]"
},
{
- "must_use": {
- "reason": null
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts an integer from little endian to the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai16;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(i16::from_le(n), n)\n} else {\n assert_eq!(i16::from_le(n), n.swap_bytes())\n}\n```",
+ "docs": "Returns the least number greater than `self`.\n\nLet `TINY` be the smallest representable positive `f128`. Then,\n - if `self.is_nan()`, this returns `self`;\n - if `self` is [`NEG_INFINITY`], this returns [`MIN`];\n - if `self` is `-TINY`, this returns -0.0;\n - if `self` is -0.0 or +0.0, this returns `TINY`;\n - if `self` is [`MAX`] or [`INFINITY`], this returns [`INFINITY`];\n - otherwise the unique least value greater than `self` is returned.\n\nThe identity `x.next_up() == -(-x).next_down()` holds for all non-NaN `x`. When `x`\nis finite `x == x.next_up().next_down()` also holds.\n\n```rust\n#![feature(f128)]\n# // FIXME(f16_f128): remove when `eqtf2` is available\n# #[cfg(all(target_arch = \"x86_64\", target_os = \"linux\"))] {\n\n// f128::EPSILON is the difference between 1.0 and the next number up.\nassert_eq!(1.0f128.next_up(), 1.0 + f128::EPSILON);\n// But not for most numbers.\nassert!(0.1f128.next_up() < 0.1 + f128::EPSILON);\nassert_eq!(4611686018427387904f128.next_up(), 4611686018427387904.000000000000001);\n# }\n```\n\nThis operation corresponds to IEEE-754 `nextUp`.\n\n[`NEG_INFINITY`]: Self::NEG_INFINITY\n[`INFINITY`]: Self::INFINITY\n[`MIN`]: Self::MIN\n[`MAX`]: Self::MAX",
"id": 10185,
"inner": {
"function": {
@@ -14923,51 +13871,51 @@
"sig": {
"inputs": [
[
- "x",
+ "self",
{
- "primitive": "i16"
+ "generic": "Self"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "f128"
}
}
}
},
- "links": {},
- "name": "from_le",
+ "links": {
+ "Self::INFINITY": 10175,
+ "Self::MAX": 10167,
+ "Self::MIN": 10168,
+ "Self::NEG_INFINITY": 10176
+ },
+ "name": "next_up",
"span": {
"begin": [
- 271,
+ 537,
5
],
"end": [
- 290,
- 6
+ 537,
+ 39
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10186": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[doc(alias = \"nextDown\")]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts `self` to big endian from the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai16;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(n.to_be(), n)\n} else {\n assert_eq!(n.to_be(), n.swap_bytes())\n}\n```",
+ "docs": "Returns the greatest number less than `self`.\n\nLet `TINY` be the smallest representable positive `f128`. Then,\n - if `self.is_nan()`, this returns `self`;\n - if `self` is [`INFINITY`], this returns [`MAX`];\n - if `self` is `TINY`, this returns 0.0;\n - if `self` is -0.0 or +0.0, this returns `-TINY`;\n - if `self` is [`MIN`] or [`NEG_INFINITY`], this returns [`NEG_INFINITY`];\n - otherwise the unique greatest value less than `self` is returned.\n\nThe identity `x.next_down() == -(-x).next_up()` holds for all non-NaN `x`. When `x`\nis finite `x == x.next_down().next_up()` also holds.\n\n```rust\n#![feature(f128)]\n# // FIXME(f16_f128): remove when `eqtf2` is available\n# #[cfg(all(target_arch = \"x86_64\", target_os = \"linux\"))] {\n\nlet x = 1.0f128;\n// Clamp value into range [0, 1).\nlet clamped = x.clamp(0.0, 1.0f128.next_down());\nassert!(clamped < 1.0);\nassert_eq!(clamped.next_up(), 1.0);\n# }\n```\n\nThis operation corresponds to IEEE-754 `nextDown`.\n\n[`NEG_INFINITY`]: Self::NEG_INFINITY\n[`INFINITY`]: Self::INFINITY\n[`MIN`]: Self::MIN\n[`MAX`]: Self::MAX",
"id": 10186,
"inner": {
"function": {
@@ -14993,33 +13941,35 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "f128"
}
}
}
},
- "links": {},
- "name": "to_be",
+ "links": {
+ "Self::INFINITY": 10175,
+ "Self::MAX": 10167,
+ "Self::MIN": 10168,
+ "Self::NEG_INFINITY": 10176
+ },
+ "name": "next_down",
"span": {
"begin": [
- 271,
+ 592,
5
],
"end": [
- 290,
- 6
+ 592,
+ 41
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10187": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
@@ -15029,7 +13979,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts `self` to little endian from the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai16;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(n.to_le(), n)\n} else {\n assert_eq!(n.to_le(), n.swap_bytes())\n}\n```",
+ "docs": "Takes the reciprocal (inverse) of a number, `1/x`.\n\n```\n#![feature(f128)]\n# // FIXME(f16_f128): remove when `eqtf2` is available\n# #[cfg(all(target_arch = \"x86_64\", target_os = \"linux\"))] {\n\nlet x = 2.0_f128;\nlet abs_difference = (x.recip() - (1.0 / x)).abs();\n\nassert!(abs_difference <= f128::EPSILON);\n# }\n```",
"id": 10187,
"inner": {
"function": {
@@ -15055,33 +14005,30 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "to_le",
+ "name": "recip",
"span": {
"begin": [
- 271,
+ 628,
5
],
"end": [
- 290,
- 6
+ 628,
+ 37
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10188": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
@@ -15091,7 +14038,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer addition. Computes `self + rhs`, returning `None`\nif overflow occurred.\n\n# Examples\n\n```\nassert_eq!((i16::MAX - 2).checked_add(1), Some(i16::MAX - 1));\nassert_eq!((i16::MAX - 2).checked_add(3), None);\n```",
+ "docs": "Converts radians to degrees.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\n#![feature(f128)]\n# // FIXME(f16_f128): remove when `eqtf2` is available\n# #[cfg(all(target_arch = \"x86_64\", target_os = \"linux\"))] {\n\nlet angle = std::f128::consts::PI;\n\nlet abs_difference = (angle.to_degrees() - 180.0).abs();\nassert!(abs_difference <= f128::EPSILON);\n# }\n```",
"id": 10188,
"inner": {
"function": {
@@ -15113,71 +14060,44 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i16"
- }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i16"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "checked_add",
+ "name": "to_degrees",
"span": {
"begin": [
- 271,
+ 655,
5
],
"end": [
- 290,
- 6
+ 655,
+ 42
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10189": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer addition. Computes `self + rhs`, panicking\nif overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((i16::MAX - 2).strict_add(1), i16::MAX - 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i16::MAX - 2).strict_add(3);\n```",
+ "docs": "Converts degrees to radians.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\n#![feature(f128)]\n# // FIXME(f16_f128): remove when `eqtf2` is available\n# #[cfg(all(target_arch = \"x86_64\", target_os = \"linux\"))] {\n\nlet angle = 180.0f128;\n\nlet abs_difference = (angle.to_radians() - std::f128::consts::PI).abs();\n\nassert!(abs_difference <= 1e-30);\n# }\n```",
"id": 10189,
"inner": {
"function": {
@@ -15199,33 +14119,27 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i16"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "strict_add",
+ "name": "to_radians",
"span": {
"begin": [
- 271,
+ 687,
5
],
"end": [
- 290,
- 6
+ 687,
+ 42
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
@@ -15399,11 +14313,11 @@
"name": null,
"span": {
"begin": [
- 2260,
+ 2255,
1
],
"end": [
- 2279,
+ 2274,
2
],
"filename": "std/src/collections/hash/map.rs"
@@ -15413,20 +14327,20 @@
"10190": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "this returns the result of the comparison, without modifying either input"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) addition. Computes `self + rhs`, wrapping around at the\nboundary of the type.\n\n# Examples\n\n```\nassert_eq!(100i16.wrapping_add(27), 127);\nassert_eq!(i16::MAX.wrapping_add(2), i16::MIN + 1);\n```",
+ "docs": "Returns the maximum of the two numbers, ignoring NaN.\n\nIf one of the arguments is NaN, then the other argument is returned.\nThis follows the IEEE 754-2008 semantics for maxNum, except for handling of signaling NaNs;\nthis function handles all NaNs the same way and avoids maxNum's problems with associativity.\nThis also matches the behavior of libm’s fmax. In particular, if the inputs compare equal\n(such as for the case of `+0.0` and `-0.0`), either input may be returned non-deterministically.\n\n```\n#![feature(f128)]\n# // Using aarch64 because `reliable_f128_math` is needed\n# #[cfg(all(target_arch = \"aarch64\", target_os = \"linux\"))] {\n\nlet x = 1.0f128;\nlet y = 2.0f128;\n\nassert_eq!(x.max(y), y);\n# }\n```",
"id": 10190,
"inner": {
"function": {
@@ -15450,54 +14364,51 @@
}
],
[
- "rhs",
+ "other",
{
- "primitive": "i16"
+ "primitive": "f128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "wrapping_add",
+ "name": "max",
"span": {
"begin": [
- 271,
+ 718,
5
],
"end": [
- 290,
- 6
+ 718,
+ 48
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10191": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "this returns the result of the comparison, without modifying either input"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer addition. Computes `self + rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_add(y)` is semantically equivalent to calling\n`x.`[`checked_add`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_add`].\n\n# Safety\n\nThis results in undefined behavior when\n`self + rhs > i16::MAX` or `self + rhs < i16::MIN`,\ni.e. when [`checked_add`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_add`]: i16::checked_add\n[`wrapping_add`]: i16::wrapping_add",
+ "docs": "Returns the minimum of the two numbers, ignoring NaN.\n\nIf one of the arguments is NaN, then the other argument is returned.\nThis follows the IEEE 754-2008 semantics for minNum, except for handling of signaling NaNs;\nthis function handles all NaNs the same way and avoids minNum's problems with associativity.\nThis also matches the behavior of libm’s fmin. In particular, if the inputs compare equal\n(such as for the case of `+0.0` and `-0.0`), either input may be returned non-deterministically.\n\n```\n#![feature(f128)]\n# // Using aarch64 because `reliable_f128_math` is needed\n# #[cfg(all(target_arch = \"aarch64\", target_os = \"linux\"))] {\n\nlet x = 1.0f128;\nlet y = 2.0f128;\n\nassert_eq!(x.min(y), x);\n# }\n```",
"id": 10191,
"inner": {
"function": {
@@ -15510,7 +14421,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -15521,54 +14432,48 @@
}
],
[
- "rhs",
+ "other",
{
- "primitive": "i16"
+ "primitive": "f128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "f128"
}
}
}
},
- "links": {
- "i16::checked_add": 10188,
- "i16::wrapping_add": 10190
- },
- "name": "unchecked_add",
+ "links": {},
+ "name": "min",
"span": {
"begin": [
- 271,
+ 745,
5
],
"end": [
- 290,
- 6
+ 745,
+ 48
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10192": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "this returns the result of the comparison, without modifying either input"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked addition with an unsigned integer. Computes `self + rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1i16.checked_add_unsigned(2), Some(3));\nassert_eq!((i16::MAX - 2).checked_add_unsigned(3), None);\n```",
+ "docs": "Returns the maximum of the two numbers, propagating NaN.\n\nThis returns NaN when *either* argument is NaN, as opposed to\n[`f128::max`] which only returns NaN when *both* arguments are NaN.\n\n```\n#![feature(f128)]\n#![feature(float_minimum_maximum)]\n# // Using aarch64 because `reliable_f128_math` is needed\n# #[cfg(all(target_arch = \"aarch64\", target_os = \"linux\"))] {\n\nlet x = 1.0f128;\nlet y = 2.0f128;\n\nassert_eq!(x.maximum(y), y);\nassert!(x.maximum(f128::NAN).is_nan());\n# }\n```\n\nIf one of the arguments is NaN, then NaN is returned. Otherwise this returns the greater\nof the two numbers. For this operation, -0.0 is considered to be less than +0.0.\nNote that this follows the semantics specified in IEEE 754-2019.\n\nAlso note that \"propagation\" of NaNs here doesn't necessarily mean that the bitpattern of a NaN\noperand is conserved; see the [specification of NaN bit patterns](f32#nan-bit-patterns) for more info.",
"id": 10192,
"inner": {
"function": {
@@ -15592,69 +14497,51 @@
}
],
[
- "rhs",
+ "other",
{
- "primitive": "u16"
+ "primitive": "f128"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i16"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "f128"
}
}
}
},
- "links": {},
- "name": "checked_add_unsigned",
+ "links": {
+ "`f128::max`": 10190,
+ "f32#nan-bit-patterns": 265
+ },
+ "name": "maximum",
"span": {
"begin": [
- 271,
+ 778,
5
],
"end": [
- 290,
- 6
+ 778,
+ 52
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10193": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "this returns the result of the comparison, without modifying either input"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict addition with an unsigned integer. Computes `self + rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1i16.strict_add_unsigned(2), 3);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i16::MAX - 2).strict_add_unsigned(3);\n```",
+ "docs": "Returns the minimum of the two numbers, propagating NaN.\n\nThis returns NaN when *either* argument is NaN, as opposed to\n[`f128::min`] which only returns NaN when *both* arguments are NaN.\n\n```\n#![feature(f128)]\n#![feature(float_minimum_maximum)]\n# // Using aarch64 because `reliable_f128_math` is needed\n# #[cfg(all(target_arch = \"aarch64\", target_os = \"linux\"))] {\n\nlet x = 1.0f128;\nlet y = 2.0f128;\n\nassert_eq!(x.minimum(y), x);\nassert!(x.minimum(f128::NAN).is_nan());\n# }\n```\n\nIf one of the arguments is NaN, then NaN is returned. Otherwise this returns the lesser\nof the two numbers. For this operation, -0.0 is considered to be less than +0.0.\nNote that this follows the semantics specified in IEEE 754-2019.\n\nAlso note that \"propagation\" of NaNs here doesn't necessarily mean that the bitpattern of a NaN\noperand is conserved; see the [specification of NaN bit patterns](f32#nan-bit-patterns) for more info.",
"id": 10193,
"inner": {
"function": {
@@ -15678,51 +14565,52 @@
}
],
[
- "rhs",
+ "other",
{
- "primitive": "u16"
+ "primitive": "f128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "f128"
}
}
}
},
- "links": {},
- "name": "strict_add_unsigned",
+ "links": {
+ "`f128::min`": 10191,
+ "f32#nan-bit-patterns": 265
+ },
+ "name": "minimum",
"span": {
"begin": [
- 271,
+ 811,
5
],
"end": [
- 290,
- 6
+ 811,
+ 52
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10194": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[doc(alias = \"average\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\", promotable: false}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer subtraction. Computes `self - rhs`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!((i16::MIN + 2).checked_sub(1), Some(i16::MIN + 1));\nassert_eq!((i16::MIN + 2).checked_sub(3), None);\n```",
+ "docs": "Calculates the midpoint (average) between `self` and `rhs`.\n\nThis returns NaN when *either* argument is NaN or if a combination of\n+inf and -inf is provided as arguments.\n\n# Examples\n\n```\n#![feature(f128)]\n# // Using aarch64 because `reliable_f128_math` is needed\n# #[cfg(all(target_arch = \"aarch64\", target_os = \"linux\"))] {\n\nassert_eq!(1f128.midpoint(4.0), 2.5);\nassert_eq!((-5.5f128).midpoint(8.0), 1.25);\n# }\n```",
"id": 10194,
"inner": {
"function": {
@@ -15746,82 +14634,105 @@
}
],
[
- "rhs",
+ "other",
{
- "primitive": "i16"
+ "primitive": "f128"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i16"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "checked_sub",
+ "name": "midpoint",
"span": {
"begin": [
- 271,
+ 835,
5
],
"end": [
- 290,
- 6
+ 835,
+ 53
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10195": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer subtraction. Computes `self - rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((i16::MIN + 2).strict_sub(1), i16::MIN + 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i16::MIN + 2).strict_sub(3);\n```",
+ "docs": "Rounds toward zero and converts to any primitive integer type,\nassuming that the value is finite and fits in that type.\n\n```\n#![feature(f128)]\n# // FIXME(f16_f128): remove when `float*itf` is available\n# #[cfg(all(target_arch = \"x86_64\", target_os = \"linux\"))] {\n\nlet value = 4.6_f128;\nlet rounded = unsafe { value.to_int_unchecked::() };\nassert_eq!(rounded, 4);\n\nlet value = -128.9_f128;\nlet rounded = unsafe { value.to_int_unchecked::() };\nassert_eq!(rounded, i8::MIN);\n# }\n```\n\n# Safety\n\nThe value must:\n\n* Not be `NaN`\n* Not be infinite\n* Be representable in the return type `Int`, after truncating off its fractional part",
"id": 10195,
"inner": {
"function": {
"generics": {
- "params": [],
- "where_predicates": []
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "Int"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "Int"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 9866,
+ "path": "FloatToInt"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "primitive": "f128"
+ }
+ }
+ }
+ ]
},
"has_body": true,
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "is_const": false,
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -15830,43 +14741,34 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i16"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "generic": "Int"
}
}
}
},
"links": {},
- "name": "strict_sub",
+ "name": "to_int_unchecked",
"span": {
"begin": [
- 271,
+ 878,
5
],
"end": [
- 290,
- 6
+ 880,
+ 31
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10196": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
@@ -15876,7 +14778,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) subtraction. Computes `self - rhs`, wrapping around at the\nboundary of the type.\n\n# Examples\n\n```\nassert_eq!(0i16.wrapping_sub(127), -127);\nassert_eq!((-2i16).wrapping_sub(i16::MAX), i16::MAX);\n```",
+ "docs": "Raw transmutation to `u128`.\n\nThis is currently identical to `transmute::(self)` on all platforms.\n\nSee [`from_bits`](#method.from_bits) for some discussion of the\nportability of this operation (there are almost no issues).\n\nNote that this function is distinct from `as` casting, which attempts to\npreserve the *numeric* value, and not the bitwise value.\n\n```\n#![feature(f128)]\n\n# // FIXME(f16_f128): enable this once const casting works\n# // assert_ne!((1f128).to_bits(), 1f128 as u128); // to_bits() is not casting!\nassert_eq!((12.5f128).to_bits(), 0x40029000000000000000000000000000);\n```",
"id": 10196,
"inner": {
"function": {
@@ -15898,56 +14800,44 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i16"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "u128"
}
}
}
},
"links": {},
- "name": "wrapping_sub",
+ "name": "to_bits",
"span": {
"begin": [
- 271,
+ 908,
5
],
"end": [
- 290,
- 6
+ 908,
+ 39
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10197": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer subtraction. Computes `self - rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_sub(y)` is semantically equivalent to calling\n`x.`[`checked_sub`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_sub`].\n\n# Safety\n\nThis results in undefined behavior when\n`self - rhs > i16::MAX` or `self - rhs < i16::MIN`,\ni.e. when [`checked_sub`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_sub`]: i16::checked_sub\n[`wrapping_sub`]: i16::wrapping_sub",
+ "docs": "Raw transmutation from `u128`.\n\nThis is currently identical to `transmute::(v)` on all platforms.\nIt turns out this is incredibly portable, for two reasons:\n\n* Floats and Ints have the same endianness on all supported platforms.\n* IEEE 754 very precisely specifies the bit layout of floats.\n\nHowever there is one caveat: prior to the 2008 version of IEEE 754, how\nto interpret the NaN signaling bit wasn't actually specified. Most platforms\n(notably x86 and ARM) picked the interpretation that was ultimately\nstandardized in 2008, but some didn't (notably MIPS). As a result, all\nsignaling NaNs on MIPS are quiet NaNs on x86, and vice-versa.\n\nRather than trying to preserve signaling-ness cross-platform, this\nimplementation favors preserving the exact bits. This means that\nany payloads encoded in NaNs will be preserved even if the result of\nthis method is sent over the network from an x86 machine to a MIPS one.\n\nIf the results of this method are only manipulated by the same\narchitecture that produced them, then there is no portability concern.\n\nIf the input isn't NaN, then there is no portability concern.\n\nIf you don't care about signalingness (very likely), then there is no\nportability concern.\n\nNote that this function is distinct from `as` casting, which attempts to\npreserve the *numeric* value, and not the bitwise value.\n\n```\n#![feature(f128)]\n# // FIXME(f16_f128): remove when `eqtf2` is available\n# #[cfg(all(target_arch = \"x86_64\", target_os = \"linux\"))] {\n\nlet v = f128::from_bits(0x40029000000000000000000000000000);\nassert_eq!(v, 12.5);\n# }\n```",
"id": 10197,
"inner": {
"function": {
@@ -15960,55 +14850,43 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "v",
{
- "primitive": "i16"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "f128"
}
}
}
},
- "links": {
- "i16::checked_sub": 10194,
- "i16::wrapping_sub": 10196
- },
- "name": "unchecked_sub",
+ "links": {},
+ "name": "from_bits",
"span": {
"begin": [
- 271,
+ 956,
5
],
"end": [
- 290,
- 6
+ 956,
+ 44
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10198": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
@@ -16018,7 +14896,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked subtraction with an unsigned integer. Computes `self - rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1i16.checked_sub_unsigned(2), Some(-1));\nassert_eq!((i16::MIN + 2).checked_sub_unsigned(3), None);\n```",
+ "docs": "Returns the memory representation of this floating point number as a byte array in\nbig-endian (network) byte order.\n\nSee [`from_bits`](Self::from_bits) for some discussion of the\nportability of this operation (there are almost no issues).\n\n# Examples\n\n```\n#![feature(f128)]\n\nlet bytes = 12.5f128.to_be_bytes();\nassert_eq!(\n bytes,\n [0x40, 0x02, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]\n);\n```",
"id": 10198,
"inner": {
"function": {
@@ -16040,71 +14918,51 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u16"
- }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i16"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
+ "array": {
+ "len": "16",
+ "type": {
+ "primitive": "u8"
+ }
}
}
}
}
},
- "links": {},
- "name": "checked_sub_unsigned",
+ "links": {
+ "Self::from_bits": 10197
+ },
+ "name": "to_be_bytes",
"span": {
"begin": [
- 271,
+ 983,
5
],
"end": [
- 290,
- 6
+ 983,
+ 47
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10199": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict subtraction with an unsigned integer. Computes `self - rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1i16.strict_sub_unsigned(2), -1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i16::MIN + 2).strict_sub_unsigned(3);\n```",
+ "docs": "Returns the memory representation of this floating point number as a byte array in\nlittle-endian byte order.\n\nSee [`from_bits`](Self::from_bits) for some discussion of the\nportability of this operation (there are almost no issues).\n\n# Examples\n\n```\n#![feature(f128)]\n\nlet bytes = 12.5f128.to_le_bytes();\nassert_eq!(\n bytes,\n [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x02, 0x40]\n);\n```",
"id": 10199,
"inner": {
"function": {
@@ -16126,33 +14984,34 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u16"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "array": {
+ "len": "16",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
}
}
},
- "links": {},
- "name": "strict_sub_unsigned",
+ "links": {
+ "Self::from_bits": 10197
+ },
+ "name": "to_le_bytes",
"span": {
"begin": [
- 271,
+ 1008,
5
],
"end": [
- 290,
- 6
+ 1008,
+ 47
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
@@ -16241,11 +15100,11 @@
"name": "len",
"span": {
"begin": [
- 2283,
+ 2278,
5
],
"end": [
- 2285,
+ 2280,
6
],
"filename": "std/src/collections/hash/map.rs"
@@ -16255,10 +15114,7 @@
"10200": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
@@ -16268,7 +15124,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer multiplication. Computes `self * rhs`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(i16::MAX.checked_mul(1), Some(i16::MAX));\nassert_eq!(i16::MAX.checked_mul(2), None);\n```",
+ "docs": "Returns the memory representation of this floating point number as a byte array in\nnative byte order.\n\nAs the target platform's native endianness is used, portable code\nshould use [`to_be_bytes`] or [`to_le_bytes`], as appropriate, instead.\n\n[`to_be_bytes`]: f128::to_be_bytes\n[`to_le_bytes`]: f128::to_le_bytes\n\nSee [`from_bits`](Self::from_bits) for some discussion of the\nportability of this operation (there are almost no issues).\n\n# Examples\n\n```\n#![feature(f128)]\n\nlet bytes = 12.5f128.to_ne_bytes();\nassert_eq!(\n bytes,\n if cfg!(target_endian = \"big\") {\n [0x40, 0x02, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]\n } else {\n [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x02, 0x40]\n }\n);\n```",
"id": 10200,
"inner": {
"function": {
@@ -16290,71 +15146,53 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i16"
- }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i16"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
+ "array": {
+ "len": "16",
+ "type": {
+ "primitive": "u8"
+ }
}
}
}
}
},
- "links": {},
- "name": "checked_mul",
+ "links": {
+ "Self::from_bits": 10197,
+ "f128::to_be_bytes": 10198,
+ "f128::to_le_bytes": 10199
+ },
+ "name": "to_ne_bytes",
"span": {
"begin": [
- 271,
+ 1044,
5
],
"end": [
- 290,
- 6
+ 1044,
+ 47
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10201": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer multiplication. Computes `self * rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(i16::MAX.strict_mul(1), i16::MAX);\n```\n\nThe following panics because of overflow:\n\n``` should_panic\nlet _ = i16::MAX.strict_mul(2);\n```",
+ "docs": "Creates a floating point value from its representation as a byte array in big endian.\n\nSee [`from_bits`](Self::from_bits) for some discussion of the\nportability of this operation (there are almost no issues).\n\n# Examples\n\n```\n#![feature(f128)]\n# // FIXME(f16_f128): remove when `eqtf2` is available\n# #[cfg(all(target_arch = \"x86_64\", target_os = \"linux\"))] {\n\nlet value = f128::from_be_bytes(\n [0x40, 0x02, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]\n);\nassert_eq!(value, 12.5);\n# }\n```",
"id": 10201,
"inner": {
"function": {
@@ -16372,57 +15210,55 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "bytes",
{
- "primitive": "i16"
+ "array": {
+ "len": "16",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "f128"
}
}
}
},
- "links": {},
- "name": "strict_mul",
+ "links": {
+ "Self::from_bits": 10197
+ },
+ "name": "from_be_bytes",
"span": {
"begin": [
- 271,
+ 1070,
5
],
"end": [
- 290,
- 6
+ 1070,
+ 56
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10202": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) multiplication. Computes `self * rhs`, wrapping around at\nthe boundary of the type.\n\n# Examples\n\n```\nassert_eq!(10i16.wrapping_mul(12), 120);\nassert_eq!(11i8.wrapping_mul(12), -124);\n```",
+ "docs": "Creates a floating point value from its representation as a byte array in little endian.\n\nSee [`from_bits`](Self::from_bits) for some discussion of the\nportability of this operation (there are almost no issues).\n\n# Examples\n\n```\n#![feature(f128)]\n# // FIXME(f16_f128): remove when `eqtf2` is available\n# #[cfg(all(target_arch = \"x86_64\", target_os = \"linux\"))] {\n\nlet value = f128::from_le_bytes(\n [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x02, 0x40]\n);\nassert_eq!(value, 12.5);\n# }\n```",
"id": 10202,
"inner": {
"function": {
@@ -16440,60 +15276,55 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "bytes",
{
- "primitive": "i16"
+ "array": {
+ "len": "16",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "f128"
}
}
}
},
- "links": {},
- "name": "wrapping_mul",
+ "links": {
+ "Self::from_bits": 10197
+ },
+ "name": "from_le_bytes",
"span": {
"begin": [
- 271,
+ 1096,
5
],
"end": [
- 290,
- 6
+ 1096,
+ 56
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10203": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer multiplication. Computes `self * rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_mul(y)` is semantically equivalent to calling\n`x.`[`checked_mul`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_mul`].\n\n# Safety\n\nThis results in undefined behavior when\n`self * rhs > i16::MAX` or `self * rhs < i16::MIN`,\ni.e. when [`checked_mul`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_mul`]: i16::checked_mul\n[`wrapping_mul`]: i16::wrapping_mul",
+ "docs": "Creates a floating point value from its representation as a byte array in native endian.\n\nAs the target platform's native endianness is used, portable code\nlikely wants to use [`from_be_bytes`] or [`from_le_bytes`], as\nappropriate instead.\n\n[`from_be_bytes`]: f128::from_be_bytes\n[`from_le_bytes`]: f128::from_le_bytes\n\nSee [`from_bits`](Self::from_bits) for some discussion of the\nportability of this operation (there are almost no issues).\n\n# Examples\n\n```\n#![feature(f128)]\n# // FIXME(f16_f128): remove when `eqtf2` is available\n# #[cfg(all(target_arch = \"x86_64\", target_os = \"linux\"))] {\n\nlet value = f128::from_ne_bytes(if cfg!(target_endian = \"big\") {\n [0x40, 0x02, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]\n} else {\n [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x02, 0x40]\n});\nassert_eq!(value, 12.5);\n# }\n```",
"id": 10203,
"inner": {
"function": {
@@ -16506,65 +15337,65 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "bytes",
{
- "primitive": "i16"
+ "array": {
+ "len": "16",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "f128"
}
}
}
},
"links": {
- "i16::checked_mul": 10200,
- "i16::wrapping_mul": 10202
+ "Self::from_bits": 10197,
+ "f128::from_be_bytes": 10201,
+ "f128::from_le_bytes": 10202
},
- "name": "unchecked_mul",
+ "name": "from_ne_bytes",
"span": {
"begin": [
- 271,
+ 1132,
5
],
"end": [
- 290,
- 6
+ 1132,
+ 56
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10204": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 143800, is_soft: false}, feature: \"const_cmp\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division. Computes `self / rhs`, returning `None` if `rhs == 0`\nor the division results in overflow.\n\n# Examples\n\n```\nassert_eq!((i16::MIN + 1).checked_div(-1), Some(32767));\nassert_eq!(i16::MIN.checked_div(-1), None);\nassert_eq!((1i16).checked_div(0), None);\n```",
+ "docs": "Returns the ordering between `self` and `other`.\n\nUnlike the standard partial comparison between floating point numbers,\nthis comparison always produces an ordering in accordance to\nthe `totalOrder` predicate as defined in the IEEE 754 (2008 revision)\nfloating point standard. The values are ordered in the following sequence:\n\n- negative quiet NaN\n- negative signaling NaN\n- negative infinity\n- negative numbers\n- negative subnormal numbers\n- negative zero\n- positive zero\n- positive subnormal numbers\n- positive numbers\n- positive infinity\n- positive signaling NaN\n- positive quiet NaN.\n\nThe ordering established by this function does not always agree with the\n[`PartialOrd`] and [`PartialEq`] implementations of `f128`. For example,\nthey consider negative and positive zero equal, while `total_cmp`\ndoesn't.\n\nThe interpretation of the signaling NaN bit follows the definition in\nthe IEEE 754 standard, which may not match the interpretation by some of\nthe older, non-conformant (e.g. MIPS) hardware implementations.\n\n# Example\n\n```\n#![feature(f128)]\n\nstruct GoodBoy {\n name: &'static str,\n weight: f128,\n}\n\nlet mut bois = vec![\n GoodBoy { name: \"Pucci\", weight: 0.1 },\n GoodBoy { name: \"Woofer\", weight: 99.0 },\n GoodBoy { name: \"Yapper\", weight: 10.0 },\n GoodBoy { name: \"Chonk\", weight: f128::INFINITY },\n GoodBoy { name: \"Abs. Unit\", weight: f128::NAN },\n GoodBoy { name: \"Floaty\", weight: -5.0 },\n];\n\nbois.sort_by(|a, b| a.weight.total_cmp(&b.weight));\n\n// `f128::NAN` could be positive or negative, which will affect the sort order.\nif f128::NAN.is_sign_negative() {\n bois.into_iter().map(|b| b.weight)\n .zip([f128::NAN, -5.0, 0.1, 10.0, 99.0, f128::INFINITY].iter())\n .for_each(|(a, b)| assert_eq!(a.to_bits(), b.to_bits()))\n} else {\n bois.into_iter().map(|b| b.weight)\n .zip([-5.0, 0.1, 10.0, 99.0, f128::INFINITY, f128::NAN].iter())\n .for_each(|(a, b)| assert_eq!(a.to_bits(), b.to_bits()))\n}\n```",
"id": 10204,
"inner": {
"function": {
@@ -16584,73 +15415,71 @@
[
"self",
{
- "generic": "Self"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
}
],
[
- "rhs",
+ "other",
{
- "primitive": "i16"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "primitive": "f128"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
"resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i16"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
+ "args": null,
+ "id": 2007,
+ "path": "Ordering"
}
}
}
}
},
- "links": {},
- "name": "checked_div",
+ "links": {
+ "`PartialEq`": 121,
+ "`PartialOrd`": 125
+ },
+ "name": "total_cmp",
"span": {
"begin": [
- 271,
+ 1201,
5
],
"end": [
- 290,
- 6
+ 1201,
+ 72
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10205": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer division. Computes `self / rhs`, panicking\nif overflow occurred.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type.\n\n# Examples\n\n```\nassert_eq!((i16::MIN + 1).strict_div(-1), 32767);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i16::MIN.strict_div(-1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1i16).strict_div(0);\n```",
+ "docs": "Restrict a value to a certain interval unless it is NaN.\n\nReturns `max` if `self` is greater than `max`, and `min` if `self` is\nless than `min`. Otherwise this returns `self`.\n\nNote that this function returns NaN if the initial value was NaN as\nwell.\n\n# Panics\n\nPanics if `min > max`, `min` is NaN, or `max` is NaN.\n\n# Examples\n\n```\n#![feature(f128)]\n# // FIXME(f16_f128): remove when `{eq,gt,unord}tf` are available\n# #[cfg(all(target_arch = \"x86_64\", target_os = \"linux\"))] {\n\nassert!((-3.0f128).clamp(-2.0, 1.0) == -2.0);\nassert!((0.0f128).clamp(-2.0, 1.0) == 0.0);\nassert!((2.0f128).clamp(-2.0, 1.0) == 1.0);\nassert!((f128::NAN).clamp(-2.0, 1.0).is_nan());\n# }\n```",
"id": 10205,
"inner": {
"function": {
@@ -16674,51 +15503,57 @@
}
],
[
- "rhs",
+ "min",
{
- "primitive": "i16"
+ "primitive": "f128"
+ }
+ ],
+ [
+ "max",
+ {
+ "primitive": "f128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "strict_div",
+ "name": "clamp",
"span": {
"begin": [
- 271,
+ 1261,
5
],
"end": [
- 290,
- 6
+ 1261,
+ 63
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10206": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked Euclidean division. Computes `self.div_euclid(rhs)`,\nreturning `None` if `rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!((i16::MIN + 1).checked_div_euclid(-1), Some(32767));\nassert_eq!(i16::MIN.checked_div_euclid(-1), None);\nassert_eq!((1i16).checked_div_euclid(0), None);\n```",
+ "docs": "Computes the absolute value of `self`.\n\nThis function always returns the precise result.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(all(target_arch = \"x86_64\", target_os = \"linux\"))] {\n\nlet x = 3.5_f128;\nlet y = -3.5_f128;\n\nassert_eq!(x.abs(), x);\nassert_eq!(y.abs(), -y);\n\nassert!(f128::NAN.abs().is_nan());\n# }\n```",
"id": 10206,
"inner": {
"function": {
@@ -16740,71 +15575,47 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i16"
- }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i16"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "checked_div_euclid",
+ "name": "abs",
"span": {
"begin": [
- 271,
+ 1302,
5
],
"end": [
- 290,
- 6
+ 1302,
+ 35
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10207": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict Euclidean division. Computes `self.div_euclid(rhs)`, panicking\nif overflow occurred.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type.\n\n# Examples\n\n```\nassert_eq!((i16::MIN + 1).strict_div_euclid(-1), 32767);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i16::MIN.strict_div_euclid(-1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1i16).strict_div_euclid(0);\n```",
+ "docs": "Returns a number that represents the sign of `self`.\n\n- `1.0` if the number is positive, `+0.0` or `INFINITY`\n- `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY`\n- NaN if the number is NaN\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(all(target_arch = \"x86_64\", target_os = \"linux\"))] {\n\nlet f = 3.5_f128;\n\nassert_eq!(f.signum(), 1.0);\nassert_eq!(f128::NEG_INFINITY.signum(), -1.0);\n\nassert!(f128::NAN.signum().is_nan());\n# }\n```",
"id": 10207,
"inner": {
"function": {
@@ -16826,50 +15637,47 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i16"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "strict_div_euclid",
+ "name": "signum",
"span": {
"begin": [
- 271,
+ 1332,
5
],
"end": [
- 290,
- 6
+ 1332,
+ 38
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10208": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division without remainder. Computes `self / rhs`,\nreturning `None` if `rhs == 0`, the division results in overflow,\nor `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!((i16::MIN + 1).checked_exact_div(-1), Some(32767));\nassert_eq!((-5i16).checked_exact_div(2), None);\nassert_eq!(i16::MIN.checked_exact_div(-1), None);\nassert_eq!((1i16).checked_exact_div(0), None);\n```",
+ "docs": "Returns a number composed of the magnitude of `self` and the sign of\n`sign`.\n\nEqual to `self` if the sign of `self` and `sign` are the same, otherwise equal to `-self`.\nIf `self` is a NaN, then a NaN with the same payload as `self` and the sign bit of `sign` is\nreturned.\n\nIf `sign` is a NaN, then this operation will still carry over its sign into the result. Note\nthat IEEE 754 doesn't assign any meaning to the sign bit in case of a NaN, and as Rust\ndoesn't guarantee that the bit pattern of NaNs are conserved over arithmetic operations, the\nresult of `copysign` with `sign` being a NaN might produce an unexpected or non-portable\nresult. See the [specification of NaN bit patterns](primitive@f32#nan-bit-patterns) for more\ninfo.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(all(target_arch = \"x86_64\", target_os = \"linux\"))] {\n\nlet f = 3.5_f128;\n\nassert_eq!(f.copysign(0.42), 3.5_f128);\nassert_eq!(f.copysign(-0.42), -3.5_f128);\nassert_eq!((-f).copysign(0.42), 3.5_f128);\nassert_eq!((-f).copysign(-0.42), -3.5_f128);\n\nassert!(f128::NAN.copysign(1.0).is_nan());\n# }\n```",
"id": 10208,
"inner": {
"function": {
@@ -16893,63 +15701,53 @@
}
],
[
- "rhs",
+ "sign",
{
- "primitive": "i16"
+ "primitive": "f128"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i16"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "f128"
}
}
}
},
- "links": {},
- "name": "checked_exact_div",
+ "links": {
+ "primitive@f32#nan-bit-patterns": 265
+ },
+ "name": "copysign",
"span": {
"begin": [
- 271,
+ 1370,
5
],
"end": [
- 290,
- 6
+ 1370,
+ 52
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10209": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 136469, is_soft: false}, feature: \"float_algebraic\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136469, is_soft: false}, feature: \"float_algebraic\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division without remainder. Computes `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs == 0`, the division results in overflow,\nor `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64i16.exact_div(2), 32);\nassert_eq!(64i16.exact_div(32), 2);\nassert_eq!((i16::MIN + 1).exact_div(-1), 32767);\n```\n\n```should_panic\n#![feature(exact_div)]\nlet _ = 65i16.exact_div(2);\n```\n```should_panic\n#![feature(exact_div)]\nlet _ = i16::MIN.exact_div(-1);\n```",
+ "docs": "Float addition that allows optimizations based on algebraic rules.\n\nSee [algebraic operators](primitive@f32#algebraic-operators) for more info.",
"id": 10209,
"inner": {
"function": {
@@ -16975,29 +15773,31 @@
[
"rhs",
{
- "primitive": "i16"
+ "primitive": "f128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "f128"
}
}
}
},
- "links": {},
- "name": "exact_div",
+ "links": {
+ "primitive@f32#algebraic-operators": 265
+ },
+ "name": "algebraic_add",
"span": {
"begin": [
- 271,
+ 1381,
5
],
"end": [
- 290,
- 6
+ 1381,
+ 56
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
@@ -17086,11 +15886,11 @@
"name": null,
"span": {
"begin": [
- 2281,
+ 2276,
1
],
"end": [
- 2286,
+ 2281,
2
],
"filename": "std/src/collections/hash/map.rs"
@@ -17100,17 +15900,20 @@
"10210": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 136469, is_soft: false}, feature: \"float_algebraic\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136469, is_soft: false}, feature: \"float_algebraic\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer division without remainder. Computes `self / rhs`.\n\n# Safety\n\nThis results in undefined behavior when `rhs == 0`, `self % rhs != 0`, or\n`self == i16::MIN && rhs == -1`,\ni.e. when [`checked_exact_div`](Self::checked_exact_div) would return `None`.",
+ "docs": "Float subtraction that allows optimizations based on algebraic rules.\n\nSee [algebraic operators](primitive@f32#algebraic-operators) for more info.",
"id": 10210,
"inner": {
"function": {
@@ -17123,7 +15926,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -17136,51 +15939,51 @@
[
"rhs",
{
- "primitive": "i16"
+ "primitive": "f128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "f128"
}
}
}
},
"links": {
- "Self::checked_exact_div": 10208
+ "primitive@f32#algebraic-operators": 265
},
- "name": "unchecked_exact_div",
+ "name": "algebraic_sub",
"span": {
"begin": [
- 271,
+ 1392,
5
],
"end": [
- 290,
- 6
+ 1392,
+ 56
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10211": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 136469, is_soft: false}, feature: \"float_algebraic\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136469, is_soft: false}, feature: \"float_algebraic\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer remainder. Computes `self % rhs`, returning `None` if\n`rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!(5i16.checked_rem(2), Some(1));\nassert_eq!(5i16.checked_rem(0), None);\nassert_eq!(i16::MIN.checked_rem(-1), None);\n```",
+ "docs": "Float multiplication that allows optimizations based on algebraic rules.\n\nSee [algebraic operators](primitive@f32#algebraic-operators) for more info.",
"id": 10211,
"inner": {
"function": {
@@ -17206,67 +16009,51 @@
[
"rhs",
{
- "primitive": "i16"
+ "primitive": "f128"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i16"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "f128"
}
}
}
},
- "links": {},
- "name": "checked_rem",
+ "links": {
+ "primitive@f32#algebraic-operators": 265
+ },
+ "name": "algebraic_mul",
"span": {
"begin": [
- 271,
+ 1403,
5
],
"end": [
- 290,
- 6
+ 1403,
+ 56
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10212": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 136469, is_soft: false}, feature: \"float_algebraic\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136469, is_soft: false}, feature: \"float_algebraic\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer remainder. Computes `self % rhs`, panicking if\nthe division results in overflow.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is `x % y` for `MIN / -1` on a\nsigned type (where `MIN` is the negative minimal value), which is invalid due to implementation artifacts.\n\n# Examples\n\n```\nassert_eq!(5i16.strict_rem(2), 1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5i16.strict_rem(0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i16::MIN.strict_rem(-1);\n```",
+ "docs": "Float division that allows optimizations based on algebraic rules.\n\nSee [algebraic operators](primitive@f32#algebraic-operators) for more info.",
"id": 10212,
"inner": {
"function": {
@@ -17292,49 +16079,51 @@
[
"rhs",
{
- "primitive": "i16"
+ "primitive": "f128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "f128"
}
}
}
},
- "links": {},
- "name": "strict_rem",
+ "links": {
+ "primitive@f32#algebraic-operators": 265
+ },
+ "name": "algebraic_div",
"span": {
"begin": [
- 271,
+ 1414,
5
],
"end": [
- 290,
- 6
+ 1414,
+ 56
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10213": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 136469, is_soft: false}, feature: \"float_algebraic\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136469, is_soft: false}, feature: \"float_algebraic\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked Euclidean remainder. Computes `self.rem_euclid(rhs)`, returning `None`\nif `rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!(5i16.checked_rem_euclid(2), Some(1));\nassert_eq!(5i16.checked_rem_euclid(0), None);\nassert_eq!(i16::MIN.checked_rem_euclid(-1), None);\n```",
+ "docs": "Float remainder that allows optimizations based on algebraic rules.\n\nSee [algebraic operators](primitive@f32#algebraic-operators) for more info.",
"id": 10213,
"inner": {
"function": {
@@ -17360,68 +16149,143 @@
[
"rhs",
{
- "primitive": "i16"
+ "primitive": "f128"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i16"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "f128"
}
}
}
},
- "links": {},
- "name": "checked_rem_euclid",
+ "links": {
+ "primitive@f32#algebraic-operators": 265
+ },
+ "name": "algebraic_rem",
"span": {
"begin": [
- 271,
+ 1425,
5
],
"end": [
- 290,
- 6
+ 1425,
+ 56
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10214": {
+ "attrs": [],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": null,
+ "id": 10214,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "f128"
+ },
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 10163,
+ 10164,
+ 10165,
+ 10166,
+ 10168,
+ 10170,
+ 10167,
+ 10169,
+ 10171,
+ 10172,
+ 10173,
+ 10174,
+ 10175,
+ 10176,
+ 10177,
+ 10178,
+ 10179,
+ 10180,
+ 10181,
+ 10182,
+ 10183,
+ 10184,
+ 10185,
+ 10186,
+ 10187,
+ 10188,
+ 10189,
+ 10190,
+ 10191,
+ 10192,
+ 10193,
+ 10194,
+ 10195,
+ 10196,
+ 10197,
+ 10198,
+ 10199,
+ 10200,
+ 10201,
+ 10202,
+ 10203,
+ 10204,
+ 10205,
+ 10206,
+ 10207,
+ 10208,
+ 10209,
+ 10210,
+ 10211,
+ 10212,
+ 10213
+ ],
+ "provided_trait_methods": [],
+ "trait": null
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 140,
+ 1
+ ],
+ "end": [
+ 140,
+ 10
+ ],
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
+ },
+ "visibility": "default"
+ },
+ "10215": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict Euclidean remainder. Computes `self.rem_euclid(rhs)`, panicking if\nthe division results in overflow.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is `x % y` for `MIN / -1` on a\nsigned type (where `MIN` is the negative minimal value), which is invalid due to implementation artifacts.\n\n# Examples\n\n```\nassert_eq!(5i16.strict_rem_euclid(2), 1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5i16.strict_rem_euclid(0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i16::MIN.strict_rem_euclid(-1);\n```",
- "id": 10214,
+ "docs": "Returns the largest integer less than or equal to `self`.\n\nThis function always returns the precise result.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet f = 3.7_f128;\nlet g = 3.0_f128;\nlet h = -3.7_f128;\n\nassert_eq!(f.floor(), 3.0);\nassert_eq!(g.floor(), 3.0);\nassert_eq!(h.floor(), -4.0);\n# }\n```",
+ "id": 10215,
"inner": {
"function": {
"generics": {
@@ -17442,130 +16306,50 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i16"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "strict_rem_euclid",
+ "name": "floor",
"span": {
"begin": [
- 271,
+ 1462,
5
],
"end": [
- 290,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ 1462,
+ 37
+ ],
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
- "10215": {
+ "10216": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[doc(alias = \"ceiling\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\", promotable: false}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Checked negation. Computes `-self`, returning `None` if `self == MIN`.\n\n# Examples\n\n```\nassert_eq!(5i16.checked_neg(), Some(-5));\nassert_eq!(i16::MIN.checked_neg(), None);\n```",
- "id": 10215,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i16"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
- }
- }
- }
- },
- "links": {},
- "name": "checked_neg",
- "span": {
- "begin": [
- 271,
- 5
- ],
- "end": [
- 290,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "10216": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_neg\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked negation. Computes `-self`, assuming overflow cannot occur.\n\n# Safety\n\nThis results in undefined behavior when\n`self == i16::MIN`,\ni.e. when [`checked_neg`] would return `None`.\n\n[`checked_neg`]: i16::checked_neg",
+ "docs": "Returns the smallest integer greater than or equal to `self`.\n\nThis function always returns the precise result.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet f = 3.01_f128;\nlet g = 4.0_f128;\n\nassert_eq!(f.ceil(), 4.0);\nassert_eq!(g.ceil(), 4.0);\n# }\n```",
"id": 10216,
"inner": {
"function": {
@@ -17578,7 +16362,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -17591,48 +16375,43 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "f128"
}
}
}
},
- "links": {
- "i16::checked_neg": 10215
- },
- "name": "unchecked_neg",
+ "links": {},
+ "name": "ceil",
"span": {
"begin": [
- 271,
+ 1490,
5
],
"end": [
- 290,
- 6
+ 1490,
+ 36
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10217": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict negation. Computes `-self`, panicking if `self == MIN`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(5i16.strict_neg(), -5);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i16::MIN.strict_neg();\n",
+ "docs": "Returns the nearest integer to `self`. If a value is half-way between two\nintegers, round away from `0.0`.\n\nThis function always returns the precise result.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet f = 3.3_f128;\nlet g = -3.3_f128;\nlet h = -3.7_f128;\nlet i = 3.5_f128;\nlet j = 4.5_f128;\n\nassert_eq!(f.round(), 3.0);\nassert_eq!(g.round(), -3.0);\nassert_eq!(h.round(), -4.0);\nassert_eq!(i.round(), 4.0);\nassert_eq!(j.round(), 5.0);\n# }\n```",
"id": 10217,
"inner": {
"function": {
@@ -17658,43 +16437,43 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "strict_neg",
+ "name": "round",
"span": {
"begin": [
- 271,
+ 1524,
5
],
"end": [
- 290,
- 6
+ 1524,
+ 37
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10218": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked shift left. Computes `self << rhs`, returning `None` if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x1i16.checked_shl(4), Some(0x10));\nassert_eq!(0x1i16.checked_shl(129), None);\nassert_eq!(0x10i16.checked_shl(15), Some(0));\n```",
+ "docs": "Returns the nearest integer to a number. Rounds half-way cases to the number\nwith an even least significant digit.\n\nThis function always returns the precise result.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet f = 3.3_f128;\nlet g = -3.3_f128;\nlet h = 3.5_f128;\nlet i = 4.5_f128;\n\nassert_eq!(f.round_ties_even(), 3.0);\nassert_eq!(g.round_ties_even(), -3.0);\nassert_eq!(h.round_ties_even(), 4.0);\nassert_eq!(i.round_ties_even(), 4.0);\n# }\n```",
"id": 10218,
"inner": {
"function": {
@@ -17716,71 +16495,50 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i16"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "checked_shl",
+ "name": "round_ties_even",
"span": {
"begin": [
- 271,
+ 1556,
5
],
"end": [
- 290,
- 6
+ 1556,
+ 47
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10219": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[doc(alias = \"truncate\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\", promotable: false}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
- "other": "#[attr = TrackCaller]"
+ "must_use": {
+ "reason": "method returns a new number and does not mutate the original value"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict shift left. Computes `self << rhs`, panicking if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x1i16.strict_shl(4), 0x10);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x1i16.strict_shl(129);\n```",
+ "docs": "Returns the integer part of `self`.\nThis means that non-integer numbers are always truncated towards zero.\n\nThis function always returns the precise result.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet f = 3.7_f128;\nlet g = 3.0_f128;\nlet h = -3.7_f128;\n\nassert_eq!(f.trunc(), 3.0);\nassert_eq!(g.trunc(), 3.0);\nassert_eq!(h.trunc(), -3.0);\n# }\n```",
"id": 10219,
"inner": {
"function": {
@@ -17802,33 +16560,27 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "strict_shl",
+ "name": "trunc",
"span": {
"begin": [
- 271,
+ 1587,
5
],
"end": [
- 290,
- 6
+ 1587,
+ 37
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
@@ -17912,11 +16664,11 @@
"name": null,
"span": {
"begin": [
- 2288,
+ 2283,
1
],
"end": [
- 2288,
+ 2283,
48
],
"filename": "std/src/collections/hash/map.rs"
@@ -17926,20 +16678,20 @@
"10220": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\", promotable: false}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
- "other": "#[attr = TrackCaller]"
+ "must_use": {
+ "reason": "method returns a new number and does not mutate the original value"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked shift left. Computes `self << rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shl`] would return `None`.\n\n[`checked_shl`]: i16::checked_shl",
+ "docs": "Returns the fractional part of `self`.\n\nThis function always returns the precise result.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet x = 3.6_f128;\nlet y = -3.6_f128;\nlet abs_difference_x = (x.fract() - 0.6).abs();\nlet abs_difference_y = (y.fract() - (-0.6)).abs();\n\nassert!(abs_difference_x <= f128::EPSILON);\nassert!(abs_difference_y <= f128::EPSILON);\n# }\n```",
"id": 10220,
"inner": {
"function": {
@@ -17952,7 +16704,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -17961,55 +16713,50 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "f128"
}
}
}
},
- "links": {
- "i16::checked_shl": 10218
- },
- "name": "unchecked_shl",
+ "links": {},
+ "name": "fract",
"span": {
"begin": [
- 271,
+ 1616,
5
],
"end": [
- 290,
- 6
+ 1616,
+ 37
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10221": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
+ "other": "#[doc(alias = \"fmaf128\", alias = \"fusedMultiplyAdd\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 146724, is_soft: false}, feature: \"const_mul_add\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x1i16.unbounded_shl(4), 0x10);\nassert_eq!(0x1i16.unbounded_shl(129), 0);\n```",
+ "docs": "Fused multiply-add. Computes `(self * a) + b` with only one rounding\nerror, yielding a more accurate result than an unfused multiply-add.\n\nUsing `mul_add` *may* be more performant than an unfused multiply-add if\nthe target architecture has a dedicated `fma` CPU instruction. However,\nthis is not always true, and will be heavily dependant on designing\nalgorithms with specific target hardware in mind.\n\n# Precision\n\nThe result of this operation is guaranteed to be the rounded\ninfinite-precision result. It is specified by IEEE 754 as\n`fusedMultiplyAdd` and guaranteed not to change.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet m = 10.0_f128;\nlet x = 4.0_f128;\nlet b = 60.0_f128;\n\nassert_eq!(m.mul_add(x, b), 100.0);\nassert_eq!(m * x + b, 100.0);\n\nlet one_plus_eps = 1.0_f128 + f128::EPSILON;\nlet one_minus_eps = 1.0_f128 - f128::EPSILON;\nlet minus_one = -1.0_f128;\n\n// The exact result (1 + eps) * (1 - eps) = 1 - eps * eps.\nassert_eq!(one_plus_eps.mul_add(one_minus_eps, minus_one), -f128::EPSILON * f128::EPSILON);\n// Different rounding with the non-fused multiply and add.\nassert_eq!(one_plus_eps * one_minus_eps + minus_one, 0.0);\n# }\n```",
"id": 10221,
"inner": {
"function": {
@@ -18033,51 +16780,54 @@
}
],
[
- "rhs",
+ "a",
{
- "primitive": "u32"
+ "primitive": "f128"
+ }
+ ],
+ [
+ "b",
+ {
+ "primitive": "f128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "unbounded_shl",
+ "name": "mul_add",
"span": {
"begin": [
- 271,
+ 1664,
5
],
"end": [
- 290,
- 6
+ 1664,
+ 57
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10222": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked shift right. Computes `self >> rhs`, returning `None` if `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x10i16.checked_shr(4), Some(0x1));\nassert_eq!(0x10i16.checked_shr(128), None);\n```",
+ "docs": "Calculates Euclidean division, the matching method for `rem_euclid`.\n\nThis computes the integer `n` such that\n`self = n * rhs + self.rem_euclid(rhs)`.\nIn other words, the result is `self / rhs` rounded to the integer `n`\nsuch that `self >= n * rhs`.\n\n# Precision\n\nThe result of this operation is guaranteed to be the rounded\ninfinite-precision result.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet a: f128 = 7.0;\nlet b = 4.0;\nassert_eq!(a.div_euclid(b), 1.0); // 7.0 > 4.0 * 1.0\nassert_eq!((-a).div_euclid(b), -2.0); // -7.0 >= 4.0 * -2.0\nassert_eq!(a.div_euclid(-b), -1.0); // 7.0 >= -4.0 * -1.0\nassert_eq!((-a).div_euclid(-b), 2.0); // -7.0 >= -4.0 * 2.0\n# }\n```",
"id": 10222,
"inner": {
"function": {
@@ -18089,7 +16839,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -18103,67 +16853,49 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "f128"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i16"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "checked_shr",
+ "name": "div_euclid",
"span": {
"begin": [
- 271,
+ 1699,
5
],
"end": [
- 290,
- 6
+ 1699,
+ 47
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10223": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[doc(alias = \"modulo\", alias = \"mod\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict shift right. Computes `self >> rhs`, panicking `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x10i16.strict_shr(4), 0x1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10i16.strict_shr(128);\n```",
+ "docs": "Calculates the least nonnegative remainder of `self (mod rhs)`.\n\nIn particular, the return value `r` satisfies `0.0 <= r < rhs.abs()` in\nmost cases. However, due to a floating point round-off error it can\nresult in `r == rhs.abs()`, violating the mathematical definition, if\n`self` is much smaller than `rhs.abs()` in magnitude and `self < 0.0`.\nThis result is not an element of the function's codomain, but it is the\nclosest floating point number in the real numbers and thus fulfills the\nproperty `self == self.div_euclid(rhs) * rhs + self.rem_euclid(rhs)`\napproximately.\n\n# Precision\n\nThe result of this operation is guaranteed to be the rounded\ninfinite-precision result.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet a: f128 = 7.0;\nlet b = 4.0;\nassert_eq!(a.rem_euclid(b), 3.0);\nassert_eq!((-a).rem_euclid(b), 1.0);\nassert_eq!(a.rem_euclid(-b), 3.0);\nassert_eq!((-a).rem_euclid(-b), 1.0);\n// limitation due to round-off error\nassert!((-f128::EPSILON).rem_euclid(3.0) != 0.0);\n# }\n```",
"id": 10223,
"inner": {
"function": {
@@ -18175,7 +16907,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -18189,49 +16921,46 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "f128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "strict_shr",
+ "name": "rem_euclid",
"span": {
"begin": [
- 271,
+ 1745,
5
],
"end": [
- 290,
- 6
+ 1745,
+ 47
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10224": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked shift right. Computes `self >> rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shr`] would return `None`.\n\n[`checked_shr`]: i16::checked_shr",
+ "docs": "Raises a number to an integer power.\n\nUsing this function is generally faster than using `powf`.\nIt might have a different sequence of rounding operations than `powf`,\nso the results are not guaranteed to agree.\n\n# Unspecified precision\n\nThe precision of this function is non-deterministic. This means it varies by platform,\nRust version, and can even differ within the same execution from one invocation to the next.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet x = 2.0_f128;\nlet abs_difference = (x.powi(2) - (x * x)).abs();\nassert!(abs_difference <= f128::EPSILON);\n\nassert_eq!(f128::powi(f128::NAN, 0), 1.0);\n# }\n```",
"id": 10224,
"inner": {
"function": {
@@ -18243,8 +16972,8 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
- "is_unsafe": true
+ "is_const": false,
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -18255,53 +16984,51 @@
}
],
[
- "rhs",
+ "n",
{
- "primitive": "u32"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "f128"
}
}
}
},
- "links": {
- "i16::checked_shr": 10222
- },
- "name": "unchecked_shr",
+ "links": {},
+ "name": "powi",
"span": {
"begin": [
- 271,
+ 1779,
5
],
"end": [
- 290,
- 6
+ 1779,
+ 38
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10225": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
+ "other": "#[doc(alias = \"squareRoot\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "method returns a new number and does not mutate the original value"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, which yields `0` for a positive number,\nand `-1` for a negative number.\n\n# Examples\n\n```\nassert_eq!(0x10i16.unbounded_shr(4), 0x1);\nassert_eq!(0x10i16.unbounded_shr(129), 0);\nassert_eq!(i16::MIN.unbounded_shr(129), -1);\n```",
+ "docs": "Returns the square root of a number.\n\nReturns NaN if `self` is a negative number other than `-0.0`.\n\n# Precision\n\nThe result of this operation is guaranteed to be the rounded\ninfinite-precision result. It is specified by IEEE 754 as `squareRoot`\nand guaranteed not to change.\n\n# Examples\n\n```\n#![feature(f128)]\n# #[cfg(not(miri))]\n# #[cfg(target_has_reliable_f128_math)] {\n\nlet positive = 4.0_f128;\nlet negative = -4.0_f128;\nlet negative_zero = -0.0_f128;\n\nassert_eq!(positive.sqrt(), 2.0);\nassert!(negative.sqrt().is_nan());\nassert!(negative_zero.sqrt() == negative_zero);\n# }\n```",
"id": 10225,
"inner": {
"function": {
@@ -18313,7 +17040,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -18323,331 +17050,183 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "f128"
}
}
}
},
"links": {},
- "name": "unbounded_shr",
+ "name": "sqrt",
"span": {
"begin": [
- 271,
+ 1814,
5
],
"end": [
- 290,
- 6
+ 1814,
+ 30
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
"visibility": "public"
},
"10226": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[doc(test(attr(feature(cfg_target_has_reliable_f16_f128),\nexpect(internal_features))))]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked absolute value. Computes `self.abs()`, returning `None` if\n`self == MIN`.\n\n# Examples\n\n```\nassert_eq!((-5i16).checked_abs(), Some(5));\nassert_eq!(i16::MIN.checked_abs(), None);\n```",
+ "docs": null,
"id": 10226,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "f128"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i16"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
- }
- }
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 10215,
+ 10216,
+ 10217,
+ 10218,
+ 10219,
+ 10220,
+ 10221,
+ 10222,
+ 10223,
+ 10224,
+ 10225
+ ],
+ "provided_trait_methods": [],
+ "trait": null
}
},
"links": {},
- "name": "checked_abs",
+ "name": null,
"span": {
"begin": [
- 271,
- 5
+ 1436,
+ 1
],
"end": [
- 290,
- 6
+ 1436,
+ 10
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/f128.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
"10227": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- },
- {
- "other": "#[attr = TrackCaller]"
- }
- ],
- "crate_id": 1,
+ "attrs": [],
+ "crate_id": 0,
"deprecation": null,
- "docs": "Strict absolute value. Computes `self.abs()`, panicking if\n`self == MIN`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((-5i16).strict_abs(), 5);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i16::MIN.strict_abs();\n```",
+ "docs": null,
"id": 10227,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "f128"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i16"
- }
+ "is_negative": false,
+ "is_synthetic": true,
+ "is_unsafe": false,
+ "items": [],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 1,
+ "path": "Send"
}
}
},
"links": {},
- "name": "strict_abs",
- "span": {
- "begin": [
- 271,
- 5
- ],
- "end": [
- 290,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
+ "name": null,
+ "span": null,
+ "visibility": "default"
},
"10228": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
+ "attrs": [],
+ "crate_id": 0,
"deprecation": null,
- "docs": "Checked exponentiation. Computes `self.pow(exp)`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(8i16.checked_pow(2), Some(64));\nassert_eq!(i16::MAX.checked_pow(2), None);\n```",
+ "docs": null,
"id": 10228,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "f128"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "exp",
- {
- "primitive": "u32"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i16"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
- }
+ "is_negative": false,
+ "is_synthetic": true,
+ "is_unsafe": false,
+ "items": [],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 5,
+ "path": "Sync"
}
}
},
"links": {},
- "name": "checked_pow",
- "span": {
- "begin": [
- 271,
- 5
- ],
- "end": [
- 290,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
+ "name": null,
+ "span": null,
+ "visibility": "default"
},
"10229": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- },
- {
- "other": "#[attr = TrackCaller]"
- }
- ],
- "crate_id": 1,
+ "attrs": [],
+ "crate_id": 0,
"deprecation": null,
- "docs": "Strict exponentiation. Computes `self.pow(exp)`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(8i16.strict_pow(2), 64);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i16::MAX.strict_pow(2);\n```",
+ "docs": null,
"id": 10229,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "f128"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "exp",
- {
- "primitive": "u32"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i16"
- }
+ "is_negative": false,
+ "is_synthetic": true,
+ "is_unsafe": false,
+ "items": [],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 313,
+ "path": "Freeze"
}
}
},
"links": {},
- "name": "strict_pow",
- "span": {
- "begin": [
- 271,
- 5
- ],
- "end": [
- 290,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
+ "name": null,
+ "span": null,
+ "visibility": "default"
},
"1023": {
"attrs": [],
@@ -18700,7 +17279,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -18712,7 +17291,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -18723,11 +17302,11 @@
"name": "fmt",
"span": {
"begin": [
- 2296,
+ 2291,
5
],
"end": [
- 2298,
+ 2293,
6
],
"filename": "std/src/collections/hash/map.rs"
@@ -18735,86 +17314,1185 @@
"visibility": "default"
},
"10230": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 10230,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "f128"
+ },
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": true,
+ "is_unsafe": false,
+ "items": [],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 7,
+ "path": "Unpin"
}
}
- ],
- "crate_id": 1,
+ },
+ "links": {},
+ "name": null,
+ "span": null,
+ "visibility": "default"
+ },
+ "10231": {
+ "attrs": [],
+ "crate_id": 0,
"deprecation": null,
- "docs": "Returns the square root of the number, rounded down.\n\nReturns `None` if `self` is negative.\n\n# Examples\n\n```\nassert_eq!(10i16.checked_isqrt(), Some(3));\n```",
- "id": 10230,
+ "docs": null,
+ "id": 10231,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "f128"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "is_negative": false,
+ "is_synthetic": true,
+ "is_unsafe": false,
+ "items": [],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 316,
+ "path": "UnwindSafe"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": null,
+ "visibility": "default"
+ },
+ "10232": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 10232,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "f128"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": true,
+ "is_unsafe": false,
+ "items": [],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 318,
+ "path": "RefUnwindSafe"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": null,
+ "visibility": "default"
+ },
+ "10233": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 10233,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "primitive": "f128"
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "maybe",
+ "trait": {
+ "args": null,
+ "id": 3,
+ "path": "Sized"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "T"
+ }
}
- ]
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 319
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "T"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 321,
+ "path": "Borrow"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 212,
+ 1
+ ],
+ "end": [
+ 212,
+ 38
+ ],
+ "filename": "checkouts/rust/library/core/src/borrow.rs"
+ },
+ "visibility": "default"
+ },
+ "10234": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 10234,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "primitive": "f128"
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ }
],
- "is_c_variadic": false,
- "output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i16"
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "maybe",
+ "trait": {
+ "args": null,
+ "id": 3,
+ "path": "Sized"
}
}
- ],
- "constraints": []
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "T"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 322
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "T"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 324,
+ "path": "BorrowMut"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 221,
+ 1
+ ],
+ "end": [
+ 221,
+ 41
+ ],
+ "filename": "checkouts/rust/library/core/src/borrow.rs"
+ },
+ "visibility": "default"
+ },
+ "10235": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 10235,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "primitive": "f128"
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
}
},
- "id": 51,
- "path": "Option"
+ "name": "T"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 97,
+ "path": "Clone"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "T"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 422
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 424,
+ "path": "CloneToUninit"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 515,
+ 1
+ ],
+ "end": [
+ 515,
+ 42
+ ],
+ "filename": "checkouts/rust/library/core/src/clone.rs"
+ },
+ "visibility": "default"
+ },
+ "10236": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 10236,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "primitive": "f128"
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "U"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "T"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 37,
+ "path": "From"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "U"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 325
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "U"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 39,
+ "path": "Into"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 767,
+ 1
+ ],
+ "end": [
+ 769,
+ 24
+ ],
+ "filename": "checkouts/rust/library/core/src/convert/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "10237": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 10237,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "primitive": "f128"
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ }
+ ],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 327
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "T"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 37,
+ "path": "From"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 785,
+ 1
+ ],
+ "end": [
+ 785,
+ 28
+ ],
+ "filename": "checkouts/rust/library/core/src/convert/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "10238": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 10238,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "primitive": "f128"
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "U"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "T"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 197,
+ "path": "TryFrom"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "U"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 329,
+ 330
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "U"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 198,
+ "path": "TryInto"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 811,
+ 1
+ ],
+ "end": [
+ 813,
+ 27
+ ],
+ "filename": "checkouts/rust/library/core/src/convert/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "10239": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 10239,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "primitive": "f128"
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "U"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "T"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 39,
+ "path": "Into"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "U"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 332,
+ 334
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "U"
+ }
+ }
+ ],
+ "constraints": []
}
+ },
+ "id": 197,
+ "path": "TryFrom"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 827,
+ 1
+ ],
+ "end": [
+ 829,
+ 24
+ ],
+ "filename": "checkouts/rust/library/core/src/convert/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "1024": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 16, patch: 0})}, feature: \"std_debug\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1024,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'_"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 762,
+ "path": "Drain"
}
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "K"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "V"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 344,
+ "path": "fmt::Debug"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "K"
+ }
+ }
+ },
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 344,
+ "path": "fmt::Debug"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "V"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 1023
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 344,
+ "path": "Debug"
}
}
},
"links": {},
- "name": "checked_isqrt",
+ "name": null,
"span": {
"begin": [
- 271,
+ 2286,
+ 1
+ ],
+ "end": [
+ 2294,
+ 2
+ ],
+ "filename": "std/src/collections/hash/map.rs"
+ },
+ "visibility": "default"
+ },
+ "10240": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 10240,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "primitive": "f128"
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "outlives": "'static"
+ },
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "maybe",
+ "trait": {
+ "args": null,
+ "id": 3,
+ "path": "Sized"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "T"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 336
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 339,
+ "path": "Any"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 138,
+ 1
+ ],
+ "end": [
+ 138,
+ 36
+ ],
+ "filename": "checkouts/rust/library/core/src/any.rs"
+ },
+ "visibility": "default"
+ },
+ "10241": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 10241,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "primitive": "f128"
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 97,
+ "path": "Clone"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "T"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 430,
+ 431,
+ 432
+ ],
+ "provided_trait_methods": [
+ "clone_into"
+ ],
+ "trait": {
+ "args": null,
+ "id": 155,
+ "path": "ToOwned"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 85,
+ 1
+ ],
+ "end": [
+ 87,
+ 14
+ ],
+ "filename": "checkouts/rust/library/alloc/src/borrow.rs"
+ },
+ "visibility": "default"
+ },
+ "10242": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "The smallest value that can be represented by this integer type\n(−27).\n\n# Examples\n\n```\nassert_eq!(i8::MIN, -128);\n```",
+ "id": 10242,
+ "inner": {
+ "assoc_const": {
+ "type": {
+ "primitive": "i8"
+ },
+ "value": "_"
+ }
+ },
+ "links": {},
+ "name": "MIN",
+ "span": {
+ "begin": [
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10231": {
+ "10243": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "The largest value that can be represented by this integer type\n(27 − 1).\n\n# Examples\n\n```\nassert_eq!(i8::MAX, 127);\n```",
+ "id": 10243,
+ "inner": {
+ "assoc_const": {
+ "type": {
+ "primitive": "i8"
+ },
+ "value": "_"
+ }
+ },
+ "links": {},
+ "name": "MAX",
+ "span": {
+ "begin": [
+ 247,
+ 5
+ ],
+ "end": [
+ 266,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "10244": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 53, patch: 0})}, feature: \"int_bits_const\"}}]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "The size of this integer type in bits.\n\n# Examples\n\n```\nassert_eq!(i8::BITS, 8);\n```",
+ "id": 10244,
+ "inner": {
+ "assoc_const": {
+ "type": {
+ "primitive": "u32"
+ },
+ "value": "u8::BITS"
+ }
+ },
+ "links": {},
+ "name": "BITS",
+ "span": {
+ "begin": [
+ 247,
+ 5
+ ],
+ "end": [
+ 266,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "10245": {
+ "attrs": [
+ {
+ "other": "#[doc(alias = \"popcount\")]"
+ },
+ {
+ "other": "#[doc(alias = \"popcnt\")]"
+ },
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -18827,8 +18505,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer addition. Computes `self + rhs`, saturating at the numeric\nbounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i16.saturating_add(1), 101);\nassert_eq!(i16::MAX.saturating_add(100), i16::MAX);\nassert_eq!(i16::MIN.saturating_add(-1), i16::MIN);\n```",
- "id": 10231,
+ "docs": "Returns the number of ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 0b100_0000i8;\n\nassert_eq!(n.count_ones(), 1);\n```\n",
+ "id": 10245,
"inner": {
"function": {
"generics": {
@@ -18849,43 +18527,37 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i16"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "saturating_add",
+ "name": "count_ones",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10232": {
+ "10246": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -18895,8 +18567,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating addition with an unsigned integer. Computes `self + rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1i16.saturating_add_unsigned(2), 3);\nassert_eq!(i16::MAX.saturating_add_unsigned(100), i16::MAX);\n```",
- "id": 10232,
+ "docs": "Returns the number of zeros in the binary representation of `self`.\n\n# Examples\n\n```\nassert_eq!(i8::MAX.count_zeros(), 1);\n```",
+ "id": 10246,
"inner": {
"function": {
"generics": {
@@ -18917,54 +18589,51 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u16"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "saturating_add_unsigned",
+ "name": "count_zeros",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10233": {
+ "10247": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer subtraction. Computes `self - rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i16.saturating_sub(127), -27);\nassert_eq!(i16::MIN.saturating_sub(100), i16::MIN);\nassert_eq!(i16::MAX.saturating_sub(-1), i16::MAX);\n```",
- "id": 10233,
+ "docs": "Returns the base 2 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero.\n\n# Examples\n\n```\nassert_eq!(2i8.ilog2(), 1);\n```",
+ "id": 10247,
"inner": {
"function": {
"generics": {
@@ -18985,43 +18654,37 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i16"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "saturating_sub",
+ "name": "ilog2",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10234": {
+ "10248": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -19031,8 +18694,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating subtraction with an unsigned integer. Computes `self - rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i16.saturating_sub_unsigned(127), -27);\nassert_eq!(i16::MIN.saturating_sub_unsigned(100), i16::MIN);\n```",
- "id": 10234,
+ "docs": "Returns the number of leading zeros in the binary representation of `self`.\n\nDepending on what you're doing with the value, you might also be interested in the\n[`ilog2`] function which returns a consistent number, even if the type widens.\n\n# Examples\n\n```\nlet n = -1i8;\n\nassert_eq!(n.leading_zeros(), 0);\n```\n[`ilog2`]: i8::ilog2",
+ "id": 10248,
"inner": {
"function": {
"generics": {
@@ -19053,43 +18716,39 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u16"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "u32"
}
}
}
},
- "links": {},
- "name": "saturating_sub_unsigned",
+ "links": {
+ "i8::ilog2": 10247
+ },
+ "name": "leading_zeros",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10235": {
+ "10249": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 45, patch: 0})}, feature: \"saturating_neg\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -19099,8 +18758,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer negation. Computes `-self`, returning `MAX` if `self == MIN`\ninstead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i16.saturating_neg(), -100);\nassert_eq!((-100i16).saturating_neg(), 100);\nassert_eq!(i16::MIN.saturating_neg(), i16::MAX);\nassert_eq!(i16::MAX.saturating_neg(), i16::MIN + 1);\n```",
- "id": 10235,
+ "docs": "Returns the number of trailing zeros in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = -4i8;\n\nassert_eq!(n.trailing_zeros(), 2);\n```",
+ "id": 10249,
"inner": {
"function": {
"generics": {
@@ -19125,33 +18784,33 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "saturating_neg",
+ "name": "trailing_zeros",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10236": {
+ "10250": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 45, patch: 0})}, feature: \"saturating_neg\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
},
{
"must_use": {
@@ -19161,8 +18820,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating absolute value. Computes `self.abs()`, returning `MAX` if `self ==\nMIN` instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i16.saturating_abs(), 100);\nassert_eq!((-100i16).saturating_abs(), 100);\nassert_eq!(i16::MIN.saturating_abs(), i16::MAX);\nassert_eq!((i16::MIN + 1).saturating_abs(), i16::MAX);\n```",
- "id": 10236,
+ "docs": "Returns the number of leading ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = -1i8;\n\nassert_eq!(n.leading_ones(), 8);\n```",
+ "id": 10250,
"inner": {
"function": {
"generics": {
@@ -19187,33 +18846,33 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "saturating_abs",
+ "name": "leading_ones",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10237": {
+ "10251": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
},
{
"must_use": {
@@ -19223,8 +18882,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer multiplication. Computes `self * rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(10i16.saturating_mul(12), 120);\nassert_eq!(i16::MAX.saturating_mul(10), i16::MAX);\nassert_eq!(i16::MIN.saturating_mul(10), i16::MIN);\n```",
- "id": 10237,
+ "docs": "Returns the number of trailing ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 3i8;\n\nassert_eq!(n.trailing_ones(), 2);\n```",
+ "id": 10251,
"inner": {
"function": {
"generics": {
@@ -19245,43 +18904,34 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i16"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "saturating_mul",
+ "name": "trailing_ones",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10238": {
+ "10252": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
},
{
"must_use": {
@@ -19291,76 +18941,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer division. Computes `self / rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i16.saturating_div(2), 2);\nassert_eq!(i16::MAX.saturating_div(-1), i16::MIN + 1);\nassert_eq!(i16::MIN.saturating_div(-1), i16::MAX);\n\n```",
- "id": 10238,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "i16"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i16"
- }
- }
- }
- },
- "links": {},
- "name": "saturating_div",
- "span": {
- "begin": [
- 271,
- 5
- ],
- "end": [
- 290,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "10239": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Saturating integer exponentiation. Computes `self.pow(exp)`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!((-4i16).saturating_pow(3), -64);\nassert_eq!(i16::MIN.saturating_pow(2), i16::MAX);\nassert_eq!(i16::MIN.saturating_pow(3), i16::MIN);\n```",
- "id": 10239,
+ "docs": "Returns `self` with only the most significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: i8 = 0b_01100100;\n\nassert_eq!(n.isolate_highest_one(), 0b_01000000);\nassert_eq!(0_i8.isolate_highest_one(), 0);\n```",
+ "id": 10252,
"inner": {
"function": {
"generics": {
@@ -19381,179 +18963,34 @@
{
"generic": "Self"
}
- ],
- [
- "exp",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "saturating_pow",
+ "name": "isolate_highest_one",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "1024": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 16, patch: 0})}, feature: \"std_debug\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 1024,
- "inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'_"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 762,
- "path": "Drain"
- }
- },
- "generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "K"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "V"
- }
- ],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 346,
- "path": "fmt::Debug"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "K"
- }
- }
- },
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 346,
- "path": "fmt::Debug"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "V"
- }
- }
- }
- ]
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 1023
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": null,
- "id": 346,
- "path": "Debug"
- }
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 2291,
- 1
- ],
- "end": [
- 2299,
- 2
- ],
- "filename": "std/src/collections/hash/map.rs"
- },
- "visibility": "default"
- },
- "10240": {
+ "10253": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
},
{
"must_use": {
@@ -19563,8 +19000,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) addition with an unsigned integer. Computes\n`self + rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(100i16.wrapping_add_unsigned(27), 127);\nassert_eq!(i16::MAX.wrapping_add_unsigned(2), i16::MIN + 1);\n```",
- "id": 10240,
+ "docs": "Returns `self` with only the least significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: i8 = 0b_01100100;\n\nassert_eq!(n.isolate_lowest_one(), 0b_00000100);\nassert_eq!(0_i8.isolate_lowest_one(), 0);\n```",
+ "id": 10253,
"inner": {
"function": {
"generics": {
@@ -19585,43 +19022,34 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u16"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "wrapping_add_unsigned",
+ "name": "isolate_lowest_one",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10241": {
+ "10254": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
},
{
"must_use": {
@@ -19631,8 +19059,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) subtraction with an unsigned integer. Computes\n`self - rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(0i16.wrapping_sub_unsigned(127), -127);\nassert_eq!((-2i16).wrapping_sub_unsigned(u16::MAX), -1);\n```",
- "id": 10241,
+ "docs": "Returns the index of the highest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_i8.highest_one(), None);\nassert_eq!(0x1_i8.highest_one(), Some(0));\nassert_eq!(0x10_i8.highest_one(), Some(4));\nassert_eq!(0x1f_i8.highest_one(), Some(4));\n```",
+ "id": 10254,
"inner": {
"function": {
"generics": {
@@ -19653,43 +19081,49 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u16"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "wrapping_sub_unsigned",
+ "name": "highest_one",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10242": {
+ "10255": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
},
{
"must_use": {
@@ -19699,8 +19133,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) division. Computes `self / rhs`, wrapping around at the\nboundary of the type.\n\nThe only case where such wrapping can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type. In such a case, this function returns `MIN` itself.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i16.wrapping_div(10), 10);\nassert_eq!((-128i8).wrapping_div(-1), -128);\n```",
- "id": 10242,
+ "docs": "Returns the index of the lowest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_i8.lowest_one(), None);\nassert_eq!(0x1_i8.lowest_one(), Some(0));\nassert_eq!(0x10_i8.lowest_one(), Some(4));\nassert_eq!(0x1f_i8.lowest_one(), Some(0));\n```",
+ "id": 10255,
"inner": {
"function": {
"generics": {
@@ -19721,43 +19155,52 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i16"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "wrapping_div",
+ "name": "lowest_one",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10243": {
+ "10256": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\"}}]"
},
{
"must_use": {
@@ -19767,8 +19210,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping Euclidean division. Computes `self.div_euclid(rhs)`,\nwrapping around at the boundary of the type.\n\nWrapping will only occur in `MIN / -1` on a signed type (where `MIN` is the negative minimal value\nfor the type). This is equivalent to `-MIN`, a positive value that is too large to represent in the\ntype. In this case, this method returns `MIN` itself.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i16.wrapping_div_euclid(10), 10);\nassert_eq!((-128i8).wrapping_div_euclid(-1), -128);\n```",
- "id": 10243,
+ "docs": "Returns the bit pattern of `self` reinterpreted as an unsigned integer of the same size.\n\nThis produces the same result as an `as` cast, but ensures that the bit-width remains\nthe same.\n\n# Examples\n\n```\nlet n = -1i8;\n\nassert_eq!(n.cast_unsigned(), u8::MAX);\n```",
+ "id": 10256,
"inner": {
"function": {
"generics": {
@@ -19789,43 +19232,37 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i16"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "wrapping_div_euclid",
+ "name": "cast_unsigned",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10244": {
+ "10257": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -19835,8 +19272,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) remainder. Computes `self % rhs`, wrapping around at the\nboundary of the type.\n\nSuch wrap-around never actually occurs mathematically; implementation artifacts make `x % y`\ninvalid for `MIN / -1` on a signed type (where `MIN` is the negative minimal value). In such a case,\nthis function returns `0`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i16.wrapping_rem(10), 0);\nassert_eq!((-128i8).wrapping_rem(-1), 0);\n```",
- "id": 10244,
+ "docs": "Shifts the bits to the left by a specified amount, `n`,\nwrapping the truncated bits to the end of the resulting integer.\n\nPlease note this isn't the same operation as the `<<` shifting operator!\n\n# Examples\n\n```\nlet n = -0x7ei8;\nlet m = 0xa;\n\nassert_eq!(n.rotate_left(2), m);\n```",
+ "id": 10257,
"inner": {
"function": {
"generics": {
@@ -19859,41 +19296,41 @@
}
],
[
- "rhs",
+ "n",
{
- "primitive": "i16"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "wrapping_rem",
+ "name": "rotate_left",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10245": {
+ "10258": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -19903,8 +19340,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping Euclidean remainder. Computes `self.rem_euclid(rhs)`, wrapping around\nat the boundary of the type.\n\nWrapping will only occur in `MIN % -1` on a signed type (where `MIN` is the negative minimal value\nfor the type). In this case, this method returns 0.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i16.wrapping_rem_euclid(10), 0);\nassert_eq!((-128i8).wrapping_rem_euclid(-1), 0);\n```",
- "id": 10245,
+ "docs": "Shifts the bits to the right by a specified amount, `n`,\nwrapping the truncated bits to the beginning of the resulting\ninteger.\n\nPlease note this isn't the same operation as the `>>` shifting operator!\n\n# Examples\n\n```\nlet n = 0xai8;\nlet m = -0x7e;\n\nassert_eq!(n.rotate_right(2), m);\n```",
+ "id": 10258,
"inner": {
"function": {
"generics": {
@@ -19927,41 +19364,41 @@
}
],
[
- "rhs",
+ "n",
{
- "primitive": "i16"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "wrapping_rem_euclid",
+ "name": "rotate_right",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10246": {
+ "10259": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -19971,8 +19408,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) negation. Computes `-self`, wrapping around at the boundary\nof the type.\n\nThe only case where such wrapping can occur is when one negates `MIN` on a signed type (where `MIN`\nis the negative minimal value for the type); this is a positive value that is too large to represent\nin the type. In such a case, this function returns `MIN` itself.\n\n# Examples\n\n```\nassert_eq!(100i16.wrapping_neg(), -100);\nassert_eq!((-100i16).wrapping_neg(), 100);\nassert_eq!(i16::MIN.wrapping_neg(), i16::MIN);\n```",
- "id": 10246,
+ "docs": "Reverses the byte order of the integer.\n\n# Examples\n\n```\nlet n = 0x12i8;\n\nlet m = n.swap_bytes();\n\nassert_eq!(m, 0x12);\n```",
+ "id": 10259,
"inner": {
"function": {
"generics": {
@@ -19997,173 +19434,197 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "wrapping_neg",
+ "name": "swap_bytes",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10247": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
+ "1026": {
+ "attrs": [],
+ "crate_id": 0,
"deprecation": null,
- "docs": "Panic-free bitwise shift-left; yields `self << mask(rhs)`, where `mask` removes\nany high-order bits of `rhs` that would cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-left; the RHS of a wrapping shift-left is restricted to\nthe range of the type, rather than the bits shifted out of the LHS being returned to the other end.\nThe primitive integer types all implement a [`rotate_left`](Self::rotate_left) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!((-1i16).wrapping_shl(7), -128);\nassert_eq!((-1i16).wrapping_shl(128), -1);\n```",
- "id": 10247,
+ "docs": null,
+ "id": 1026,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u32"
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ },
+ {
+ "type": {
+ "generic": "F"
+ }
+ }
+ ],
+ "constraints": []
}
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i16"
+ },
+ "id": 765,
+ "path": "ExtractIf"
}
- }
- }
- },
- "links": {
- "Self::rotate_left": 10180
- },
- "name": "wrapping_shl",
- "span": {
- "begin": [
- 271,
- 5
- ],
- "end": [
- 290,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "10248": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Panic-free bitwise shift-right; yields `self >> mask(rhs)`, where `mask`\nremoves any high-order bits of `rhs` that would cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-right; the RHS of a wrapping shift-right is restricted\nto the range of the type, rather than the bits shifted out of the LHS being returned to the other\nend. The primitive integer types all implement a [`rotate_right`](Self::rotate_right) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!((-128i16).wrapping_shr(7), -1);\nassert_eq!((-128i16).wrapping_shr(64), -128);\n```",
- "id": 10248,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "lifetime": {
+ "outlives": []
+ }
+ },
+ "name": "'a"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "K"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "V"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "F"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 1,
+ "path": "Send"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "F"
+ }
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
+ },
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 1,
+ "path": "Send"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "K"
+ }
}
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i16"
- }
+ },
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 1,
+ "path": "Send"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "V"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": true,
+ "is_unsafe": false,
+ "items": [],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 1,
+ "path": "Send"
}
}
},
- "links": {
- "Self::rotate_right": 10181
- },
- "name": "wrapping_shr",
- "span": {
- "begin": [
- 271,
- 5
- ],
- "end": [
- 290,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
+ "links": {},
+ "name": null,
+ "span": null,
+ "visibility": "default"
},
- "10249": {
+ "10260": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\"}}]"
},
{
"must_use": {
@@ -20173,8 +19634,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) absolute value. Computes `self.abs()`, wrapping around at\nthe boundary of the type.\n\nThe only case where such wrapping can occur is when one takes the absolute value of the negative\nminimal value for the type; this is a positive value that is too large to represent in the type. In\nsuch a case, this function returns `MIN` itself.\n\n# Examples\n\n```\nassert_eq!(100i16.wrapping_abs(), 100);\nassert_eq!((-100i16).wrapping_abs(), 100);\nassert_eq!(i16::MIN.wrapping_abs(), i16::MIN);\nassert_eq!((-128i8).wrapping_abs() as u8, 128);\n```",
- "id": 10249,
+ "docs": "Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\n second least-significant bit becomes second most-significant bit, etc.\n\n# Examples\n\n```\nlet n = 0x12i8;\nlet m = n.reverse_bits();\n\nassert_eq!(m, 0x48);\nassert_eq!(0, 0i8.reverse_bits());\n```",
+ "id": 10260,
"inner": {
"function": {
"generics": {
@@ -20199,44 +19660,44 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "wrapping_abs",
+ "name": "reverse_bits",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10250": {
+ "10261": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 51, patch: 0})}, feature: \"unsigned_abs\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 51, patch: 0})}, feature: \"unsigned_abs\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Computes the absolute value of `self` without any wrapping\nor panicking.\n\n\n# Examples\n\n```\nassert_eq!(100i16.unsigned_abs(), 100u16);\nassert_eq!((-100i16).unsigned_abs(), 100u16);\nassert_eq!((-128i8).unsigned_abs(), 128u8);\n```",
- "id": 10250,
+ "docs": "Converts an integer from big endian to the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai8;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(i8::from_be(n), n)\n} else {\n assert_eq!(i8::from_be(n), n.swap_bytes())\n}\n```",
+ "id": 10261,
"inner": {
"function": {
"generics": {
@@ -20253,52 +19714,52 @@
"sig": {
"inputs": [
[
- "self",
+ "x",
{
- "generic": "Self"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "unsigned_abs",
+ "name": "from_be",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10251": {
+ "10262": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) exponentiation. Computes `self.pow(exp)`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(3i16.wrapping_pow(4), 81);\nassert_eq!(3i8.wrapping_pow(5), -13);\nassert_eq!(3i8.wrapping_pow(6), -39);\n```",
- "id": 10251,
+ "docs": "Converts an integer from little endian to the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai8;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(i8::from_le(n), n)\n} else {\n assert_eq!(i8::from_le(n), n.swap_bytes())\n}\n```",
+ "id": 10262,
"inner": {
"function": {
"generics": {
@@ -20315,47 +19776,41 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "exp",
+ "x",
{
- "primitive": "u32"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "wrapping_pow",
+ "name": "from_le",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10252": {
+ "10263": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -20365,8 +19820,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would have\noccurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5i16.overflowing_add(2), (7, false));\nassert_eq!(i16::MAX.overflowing_add(1), (i16::MIN, true));\n```",
- "id": 10252,
+ "docs": "Converts `self` to big endian from the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai8;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(n.to_be(), n)\n} else {\n assert_eq!(n.to_be(), n.swap_bytes())\n}\n```",
+ "id": 10263,
"inner": {
"function": {
"generics": {
@@ -20387,50 +19842,37 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i16"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i16"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "overflowing_add",
+ "name": "to_be",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10253": {
+ "10264": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -20440,8 +19882,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs` + `carry` and returns a tuple containing\nthe sum and the output carry.\n\nPerforms \"ternary addition\" of two integer operands and a carry-in\nbit, and returns an output integer and a carry-out bit. This allows\nchaining together multiple additions to create a wider addition, and\ncan be useful for bignum addition.\n\nThis can be thought of as a 16-bit \"full adder\", in the electronics sense.\n\nIf the input carry is false, this method is equivalent to\n[`overflowing_add`](Self::overflowing_add), and the output carry is\nequal to the overflow flag. Note that although carry and overflow\nflags are similar for unsigned integers, they are different for\nsigned integers.\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n\n// 3 MAX (a = 3 × 2^16 + 2^16 - 1)\n// + 5 7 (b = 5 × 2^16 + 7)\n// ---------\n// 9 6 (sum = 9 × 2^16 + 6)\n\nlet (a1, a0): (u16, u16) = (3, u16::MAX);\nlet (b1, b0): (u16, u16) = (5, 7);\nlet carry0 = false;\n\nlet (sum0, carry1) = a0.carrying_add(b0, carry0);\nassert_eq!(carry1, true);\nlet (sum1, carry2) = a1.carrying_add(b1, carry1);\nassert_eq!(carry2, false);\n\nassert_eq!((sum1, sum0), (9, 6));\n```",
- "id": 10253,
+ "docs": "Converts `self` to little endian from the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai8;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(n.to_le(), n)\n} else {\n assert_eq!(n.to_le(), n.swap_bytes())\n}\n```",
+ "id": 10264,
"inner": {
"function": {
"generics": {
@@ -20462,55 +19904,37 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u16"
- }
- ],
- [
- "carry",
- {
- "primitive": "bool"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u16"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i8"
}
}
}
},
- "links": {
- "Self::overflowing_add": 10971
- },
- "name": "carrying_add",
+ "links": {},
+ "name": "to_le",
"span": {
"begin": [
- 1081,
+ 247,
5
],
"end": [
- 1099,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10254": {
+ "10265": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -20520,8 +19944,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs` + `carry` and checks for overflow.\n\nPerforms \"ternary addition\" of two integer operands and a carry-in\nbit, and returns a tuple of the sum along with a boolean indicating\nwhether an arithmetic overflow would occur. On overflow, the wrapped\nvalue is returned.\n\nThis allows chaining together multiple additions to create a wider\naddition, and can be useful for bignum addition. This method should\nonly be used for the most significant word; for the less significant\nwords the unsigned method\n[`u16::carrying_add`]\nshould be used.\n\nThe output boolean returned by this method is *not* a carry flag,\nand should *not* be added to a more significant word.\n\nIf the input carry is false, this method is equivalent to\n[`overflowing_add`](Self::overflowing_add).\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n// Only the most significant word is signed.\n//\n// 10 MAX (a = 10 × 2^16 + 2^16 - 1)\n// + -5 9 (b = -5 × 2^16 + 9)\n// ---------\n// 6 8 (sum = 6 × 2^16 + 8)\n\nlet (a1, a0): (i16, u16) = (10, u16::MAX);\nlet (b1, b0): (i16, u16) = (-5, 9);\nlet carry0 = false;\n\n// u16::carrying_add for the less significant words\nlet (sum0, carry1) = a0.carrying_add(b0, carry0);\nassert_eq!(carry1, true);\n\n// i16::carrying_add for the most significant word\nlet (sum1, overflow) = a1.carrying_add(b1, carry1);\nassert_eq!(overflow, false);\n\nassert_eq!((sum1, sum0), (6, 8));\n```",
- "id": 10254,
+ "docs": "Checked integer addition. Computes `self + rhs`, returning `None`\nif overflow occurred.\n\n# Examples\n\n```\nassert_eq!((i8::MAX - 2).checked_add(1), Some(i8::MAX - 1));\nassert_eq!((i8::MAX - 2).checked_add(3), None);\n```",
+ "id": 10265,
"inner": {
"function": {
"generics": {
@@ -20546,66 +19970,68 @@
[
"rhs",
{
- "primitive": "i16"
- }
- ],
- [
- "carry",
- {
- "primitive": "bool"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i16"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i8"
+ }
+ }
+ ],
+ "constraints": []
+ }
},
- {
- "primitive": "bool"
- }
- ]
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
- "links": {
- "Self::overflowing_add": 10252,
- "`u16::carrying_add`": 10253
- },
- "name": "carrying_add",
+ "links": {},
+ "name": "checked_add",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10255": {
+ "10266": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs` with an unsigned `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1i16.overflowing_add_unsigned(2), (3, false));\nassert_eq!((i16::MIN).overflowing_add_unsigned(u16::MAX), (i16::MAX, false));\nassert_eq!((i16::MAX - 2).overflowing_add_unsigned(3), (i16::MIN, true));\n```",
- "id": 10255,
+ "docs": "Strict integer addition. Computes `self + rhs`, panicking\nif overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((i8::MAX - 2).strict_add(1), i8::MAX - 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i8::MAX - 2).strict_add(3);\n```",
+ "id": 10266,
"inner": {
"function": {
"generics": {
@@ -20630,46 +20056,39 @@
[
"rhs",
{
- "primitive": "u16"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i16"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "overflowing_add_unsigned",
+ "name": "strict_add",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10256": {
+ "10267": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -20679,8 +20098,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` - `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating whether an arithmetic overflow\nwould occur. If an overflow would have occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5i16.overflowing_sub(2), (3, false));\nassert_eq!(i16::MIN.overflowing_sub(1), (i16::MAX, true));\n```",
- "id": 10256,
+ "docs": "Wrapping (modular) addition. Computes `self + rhs`, wrapping around at the\nboundary of the type.\n\n# Examples\n\n```\nassert_eq!(100i8.wrapping_add(27), 127);\nassert_eq!(i8::MAX.wrapping_add(2), i8::MIN + 1);\n```",
+ "id": 10267,
"inner": {
"function": {
"generics": {
@@ -20705,135 +20124,53 @@
[
"rhs",
{
- "primitive": "i16"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i16"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "overflowing_sub",
+ "name": "wrapping_add",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10257": {
+ "10268": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Calculates `self` − `rhs` − `borrow` and returns a tuple\ncontaining the difference and the output borrow.\n\nPerforms \"ternary subtraction\" by subtracting both an integer\noperand and a borrow-in bit from `self`, and returns an output\ninteger and a borrow-out bit. This allows chaining together multiple\nsubtractions to create a wider subtraction, and can be useful for\nbignum subtraction.\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n\n// 9 6 (a = 9 × 2^16 + 6)\n// - 5 7 (b = 5 × 2^16 + 7)\n// ---------\n// 3 MAX (diff = 3 × 2^16 + 2^16 - 1)\n\nlet (a1, a0): (u16, u16) = (9, 6);\nlet (b1, b0): (u16, u16) = (5, 7);\nlet borrow0 = false;\n\nlet (diff0, borrow1) = a0.borrowing_sub(b0, borrow0);\nassert_eq!(borrow1, true);\nlet (diff1, borrow2) = a1.borrowing_sub(b1, borrow1);\nassert_eq!(borrow2, false);\n\nassert_eq!((diff1, diff0), (3, u16::MAX));\n```",
- "id": 10257,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u16"
- }
- ],
- [
- "borrow",
- {
- "primitive": "bool"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "u16"
- },
- {
- "primitive": "bool"
- }
- ]
- }
- }
- }
- },
- "links": {},
- "name": "borrowing_sub",
- "span": {
- "begin": [
- 1081,
- 5
- ],
- "end": [
- 1099,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "10258": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` − `rhs` − `borrow` and checks for\noverflow.\n\nPerforms \"ternary subtraction\" by subtracting both an integer\noperand and a borrow-in bit from `self`, and returns a tuple of the\ndifference along with a boolean indicating whether an arithmetic\noverflow would occur. On overflow, the wrapped value is returned.\n\nThis allows chaining together multiple subtractions to create a\nwider subtraction, and can be useful for bignum subtraction. This\nmethod should only be used for the most significant word; for the\nless significant words the unsigned method\n[`u16::borrowing_sub`]\nshould be used.\n\nThe output boolean returned by this method is *not* a borrow flag,\nand should *not* be subtracted from a more significant word.\n\nIf the input borrow is false, this method is equivalent to\n[`overflowing_sub`](Self::overflowing_sub).\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n// Only the most significant word is signed.\n//\n// 6 8 (a = 6 × 2^16 + 8)\n// - -5 9 (b = -5 × 2^16 + 9)\n// ---------\n// 10 MAX (diff = 10 × 2^16 + 2^16 - 1)\n\nlet (a1, a0): (i16, u16) = (6, 8);\nlet (b1, b0): (i16, u16) = (-5, 9);\nlet borrow0 = false;\n\n// u16::borrowing_sub for the less significant words\nlet (diff0, borrow1) = a0.borrowing_sub(b0, borrow0);\nassert_eq!(borrow1, true);\n\n// i16::borrowing_sub for the most significant word\nlet (diff1, overflow) = a1.borrowing_sub(b1, borrow1);\nassert_eq!(overflow, false);\n\nassert_eq!((diff1, diff0), (10, u16::MAX));\n```",
- "id": 10258,
+ "docs": "Unchecked integer addition. Computes `self + rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_add(y)` is semantically equivalent to calling\n`x.`[`checked_add`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_add`].\n\n# Safety\n\nThis results in undefined behavior when\n`self + rhs > i8::MAX` or `self + rhs < i8::MIN`,\ni.e. when [`checked_add`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_add`]: i8::checked_add\n[`wrapping_add`]: i8::wrapping_add",
+ "id": 10268,
"inner": {
"function": {
"generics": {
@@ -20845,7 +20182,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -20858,49 +20195,36 @@
[
"rhs",
{
- "primitive": "i16"
- }
- ],
- [
- "borrow",
- {
- "primitive": "bool"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i16"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i8"
}
}
}
},
"links": {
- "Self::overflowing_sub": 10256,
- "`u16::borrowing_sub`": 10257
+ "i8::checked_add": 10265,
+ "i8::wrapping_add": 10267
},
- "name": "borrowing_sub",
+ "name": "unchecked_add",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10259": {
+ "10269": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
@@ -20916,8 +20240,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` - `rhs` with an unsigned `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1i16.overflowing_sub_unsigned(2), (-1, false));\nassert_eq!((i16::MAX).overflowing_sub_unsigned(u16::MAX), (i16::MIN, false));\nassert_eq!((i16::MIN + 2).overflowing_sub_unsigned(3), (i16::MAX, true));\n```",
- "id": 10259,
+ "docs": "Checked addition with an unsigned integer. Computes `self + rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1i8.checked_add_unsigned(2), Some(3));\nassert_eq!((i8::MAX - 2).checked_add_unsigned(3), None);\n```",
+ "id": 10269,
"inner": {
"function": {
"generics": {
@@ -20942,45 +20266,53 @@
[
"rhs",
{
- "primitive": "u16"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i16"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i8"
+ }
+ }
+ ],
+ "constraints": []
+ }
},
- {
- "primitive": "bool"
- }
- ]
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "overflowing_sub_unsigned",
+ "name": "checked_add_unsigned",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "1026": {
+ "1027": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1026,
+ "id": 1027,
"inner": {
"impl": {
"blanket_impl": null,
@@ -21066,8 +20398,8 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 1,
- "path": "Send"
+ "id": 5,
+ "path": "Sync"
}
}
}
@@ -21087,8 +20419,8 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 1,
- "path": "Send"
+ "id": 5,
+ "path": "Sync"
}
}
}
@@ -21108,8 +20440,8 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 1,
- "path": "Send"
+ "id": 5,
+ "path": "Sync"
}
}
}
@@ -21129,8 +20461,8 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 1,
- "path": "Send"
+ "id": 5,
+ "path": "Sync"
}
}
},
@@ -21139,24 +20471,27 @@
"span": null,
"visibility": "default"
},
- "10260": {
+ "10270": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the multiplication of `self` and `rhs`.\n\nReturns a tuple of the multiplication along with a boolean indicating whether an arithmetic overflow\nwould occur. If an overflow would have occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5i16.overflowing_mul(2), (10, false));\nassert_eq!(1_000_000_000i32.overflowing_mul(10), (1410065408, true));\n```",
- "id": 10260,
+ "docs": "Strict addition with an unsigned integer. Computes `self + rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1i8.strict_add_unsigned(2), 3);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i8::MAX - 2).strict_add_unsigned(3);\n```",
+ "id": 10270,
"inner": {
"function": {
"generics": {
@@ -21181,46 +20516,39 @@
[
"rhs",
{
- "primitive": "i16"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i16"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "overflowing_mul",
+ "name": "strict_add_unsigned",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10261": {
+ "10271": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -21230,8 +20558,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the \"full multiplication\" `self * rhs + carry`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need the `carry`, then you can use [`Self::widening_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.carrying_mul(-2, 0), (4294967286, -1));\nassert_eq!(5i32.carrying_mul(-2, 10), (0, 0));\nassert_eq!(1_000_000_000i32.carrying_mul(-10, 0), (2884901888, -3));\nassert_eq!(1_000_000_000i32.carrying_mul(-10, 10), (2884901898, -3));\nassert_eq!(i16::MAX.carrying_mul(i16::MAX, i16::MAX), (i16::MAX.unsigned_abs() + 1, i16::MAX / 2));\n```",
- "id": 10261,
+ "docs": "Checked integer subtraction. Computes `self - rhs`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!((i8::MIN + 2).checked_sub(1), Some(i8::MIN + 1));\nassert_eq!((i8::MIN + 2).checked_sub(3), None);\n```",
+ "id": 10271,
"inner": {
"function": {
"generics": {
@@ -21256,65 +20584,68 @@
[
"rhs",
{
- "primitive": "i16"
- }
- ],
- [
- "carry",
- {
- "primitive": "i16"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u16"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i8"
+ }
+ }
+ ],
+ "constraints": []
+ }
},
- {
- "primitive": "i16"
- }
- ]
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
- "links": {
- "`Self::widening_mul`": 10262
- },
- "name": "carrying_mul",
+ "links": {},
+ "name": "checked_sub",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10262": {
+ "10272": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the complete product `self * rhs` without the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nIf you also need to add a carry to the wide result, then you want\n[`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.widening_mul(-2), (4294967286, -1));\nassert_eq!(1_000_000_000i32.widening_mul(-10), (2884901888, -3));\n```",
- "id": 10262,
+ "docs": "Strict integer subtraction. Computes `self - rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((i8::MIN + 2).strict_sub(1), i8::MIN + 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i8::MIN + 2).strict_sub(3);\n```",
+ "id": 10272,
"inner": {
"function": {
"generics": {
@@ -21339,48 +20670,39 @@
[
"rhs",
{
- "primitive": "i16"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u16"
- },
- {
- "primitive": "i16"
- }
- ]
+ "primitive": "i8"
}
}
}
},
- "links": {
- "`Self::carrying_mul`": 10261
- },
- "name": "widening_mul",
+ "links": {},
+ "name": "strict_sub",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10263": {
+ "10273": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -21390,8 +20712,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the \"full multiplication\" `self * rhs + carry1 + carry2`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need either `carry`, then you can use [`Self::widening_mul`] instead,\nand if you only need one `carry`, then you can use [`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.carrying_mul_add(-2, 0, 0), (4294967286, -1));\nassert_eq!(5i32.carrying_mul_add(-2, 10, 10), (10, 0));\nassert_eq!(1_000_000_000i32.carrying_mul_add(-10, 0, 0), (2884901888, -3));\nassert_eq!(1_000_000_000i32.carrying_mul_add(-10, 10, 10), (2884901908, -3));\nassert_eq!(i16::MAX.carrying_mul_add(i16::MAX, i16::MAX, i16::MAX), (u16::MAX, i16::MAX / 2));\n```",
- "id": 10263,
+ "docs": "Wrapping (modular) subtraction. Computes `self - rhs`, wrapping around at the\nboundary of the type.\n\n# Examples\n\n```\nassert_eq!(0i8.wrapping_sub(127), -127);\nassert_eq!((-2i8).wrapping_sub(i8::MAX), i8::MAX);\n```",
+ "id": 10273,
"inner": {
"function": {
"generics": {
@@ -21416,72 +20738,53 @@
[
"rhs",
{
- "primitive": "i16"
- }
- ],
- [
- "carry",
- {
- "primitive": "i16"
- }
- ],
- [
- "add",
- {
- "primitive": "i16"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u16"
- },
- {
- "primitive": "i16"
- }
- ]
+ "primitive": "i8"
}
}
}
},
- "links": {
- "`Self::carrying_mul`": 10261,
- "`Self::widening_mul`": 10262
- },
- "name": "carrying_mul_add",
+ "links": {},
+ "name": "wrapping_sub",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10264": {
+ "10274": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the divisor when `self` is divided by `rhs`.\n\nReturns a tuple of the divisor along with a boolean indicating whether an arithmetic overflow would\noccur. If an overflow would occur then self is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i16.overflowing_div(2), (2, false));\nassert_eq!(i16::MIN.overflowing_div(-1), (i16::MIN, true));\n```",
- "id": 10264,
+ "docs": "Unchecked integer subtraction. Computes `self - rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_sub(y)` is semantically equivalent to calling\n`x.`[`checked_sub`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_sub`].\n\n# Safety\n\nThis results in undefined behavior when\n`self - rhs > i8::MAX` or `self - rhs < i8::MIN`,\ni.e. when [`checked_sub`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_sub`]: i8::checked_sub\n[`wrapping_sub`]: i8::wrapping_sub",
+ "id": 10274,
"inner": {
"function": {
"generics": {
@@ -21493,7 +20796,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -21506,46 +20809,42 @@
[
"rhs",
{
- "primitive": "i16"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i16"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i8"
}
}
}
},
- "links": {},
- "name": "overflowing_div",
+ "links": {
+ "i8::checked_sub": 10271,
+ "i8::wrapping_sub": 10273
+ },
+ "name": "unchecked_sub",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10265": {
+ "10275": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -21555,8 +20854,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of Euclidean division `self.div_euclid(rhs)`.\n\nReturns a tuple of the divisor along with a boolean indicating whether an arithmetic overflow would\noccur. If an overflow would occur then `self` is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i16.overflowing_div_euclid(2), (2, false));\nassert_eq!(i16::MIN.overflowing_div_euclid(-1), (i16::MIN, true));\n```",
- "id": 10265,
+ "docs": "Checked subtraction with an unsigned integer. Computes `self - rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1i8.checked_sub_unsigned(2), Some(-1));\nassert_eq!((i8::MIN + 2).checked_sub_unsigned(3), None);\n```",
+ "id": 10275,
"inner": {
"function": {
"generics": {
@@ -21581,57 +20880,68 @@
[
"rhs",
{
- "primitive": "i16"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i16"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i8"
+ }
+ }
+ ],
+ "constraints": []
+ }
},
- {
- "primitive": "bool"
- }
- ]
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "overflowing_div_euclid",
+ "name": "checked_sub_unsigned",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10266": {
+ "10276": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the remainder when `self` is divided by `rhs`.\n\nReturns a tuple of the remainder after dividing along with a boolean indicating whether an\narithmetic overflow would occur. If an overflow would occur then 0 is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i16.overflowing_rem(2), (1, false));\nassert_eq!(i16::MIN.overflowing_rem(-1), (0, true));\n```",
- "id": 10266,
+ "docs": "Strict subtraction with an unsigned integer. Computes `self - rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1i8.strict_sub_unsigned(2), -1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i8::MIN + 2).strict_sub_unsigned(3);\n```",
+ "id": 10276,
"inner": {
"function": {
"generics": {
@@ -21656,60 +20966,50 @@
[
"rhs",
{
- "primitive": "i16"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i16"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "overflowing_rem",
+ "name": "strict_sub_unsigned",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10267": {
+ "10277": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Overflowing Euclidean remainder. Calculates `self.rem_euclid(rhs)`.\n\nReturns a tuple of the remainder after dividing along with a boolean indicating whether an\narithmetic overflow would occur. If an overflow would occur then 0 is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i16.overflowing_rem_euclid(2), (1, false));\nassert_eq!(i16::MIN.overflowing_rem_euclid(-1), (0, true));\n```",
- "id": 10267,
+ "docs": "Checked integer multiplication. Computes `self * rhs`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(i8::MAX.checked_mul(1), Some(i8::MAX));\nassert_eq!(i8::MAX.checked_mul(2), None);\n```",
+ "id": 10277,
"inner": {
"function": {
"generics": {
@@ -21734,57 +21034,68 @@
[
"rhs",
{
- "primitive": "i16"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i16"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i8"
+ }
+ }
+ ],
+ "constraints": []
+ }
},
- {
- "primitive": "bool"
- }
- ]
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "overflowing_rem_euclid",
+ "name": "checked_mul",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10268": {
+ "10278": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Negates self, overflowing if this is equal to the minimum value.\n\nReturns a tuple of the negated version of self along with a boolean indicating whether an overflow\nhappened. If `self` is the minimum value (e.g., `i32::MIN` for values of type `i32`), then the\nminimum value will be returned again and `true` will be returned for an overflow happening.\n\n# Examples\n\n```\nassert_eq!(2i16.overflowing_neg(), (-2, false));\nassert_eq!(i16::MIN.overflowing_neg(), (i16::MIN, true));\n```",
- "id": 10268,
+ "docs": "Strict integer multiplication. Computes `self * rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(i8::MAX.strict_mul(1), i8::MAX);\n```\n\nThe following panics because of overflow:\n\n``` should_panic\nlet _ = i8::MAX.strict_mul(2);\n```",
+ "id": 10278,
"inner": {
"function": {
"generics": {
@@ -21805,44 +21116,43 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i16"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "overflowing_neg",
+ "name": "strict_mul",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10269": {
+ "10279": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -21852,8 +21162,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts self left by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean indicating whether the shift\nvalue was larger than or equal to the number of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then used to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x1i16.overflowing_shl(4), (0x10, false));\nassert_eq!(0x1i32.overflowing_shl(36), (0x10, true));\nassert_eq!(0x10i16.overflowing_shl(15), (0, false));\n```",
- "id": 10269,
+ "docs": "Wrapping (modular) multiplication. Computes `self * rhs`, wrapping around at\nthe boundary of the type.\n\n# Examples\n\n```\nassert_eq!(10i8.wrapping_mul(12), 120);\nassert_eq!(11i8.wrapping_mul(12), -124);\n```",
+ "id": 10279,
"inner": {
"function": {
"generics": {
@@ -21878,45 +21188,38 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i16"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "overflowing_shl",
+ "name": "wrapping_mul",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "1027": {
+ "1028": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1027,
+ "id": 1028,
"inner": {
"impl": {
"blanket_impl": null,
@@ -22002,8 +21305,8 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 5,
- "path": "Sync"
+ "id": 313,
+ "path": "Freeze"
}
}
}
@@ -22013,48 +21316,6 @@
"generic": "F"
}
}
- },
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 5,
- "path": "Sync"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "K"
- }
- }
- },
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 5,
- "path": "Sync"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "V"
- }
- }
}
]
},
@@ -22065,8 +21326,8 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 5,
- "path": "Sync"
+ "id": 313,
+ "path": "Freeze"
}
}
},
@@ -22075,24 +21336,27 @@
"span": null,
"visibility": "default"
},
- "10270": {
+ "10280": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts self right by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean indicating whether the shift\nvalue was larger than or equal to the number of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then used to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x10i16.overflowing_shr(4), (0x1, false));\nassert_eq!(0x10i32.overflowing_shr(36), (0x1, true));\n```",
- "id": 10270,
+ "docs": "Unchecked integer multiplication. Computes `self * rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_mul(y)` is semantically equivalent to calling\n`x.`[`checked_mul`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_mul`].\n\n# Safety\n\nThis results in undefined behavior when\n`self * rhs > i8::MAX` or `self * rhs < i8::MIN`,\ni.e. when [`checked_mul`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_mul`]: i8::checked_mul\n[`wrapping_mul`]: i8::wrapping_mul",
+ "id": 10280,
"inner": {
"function": {
"generics": {
@@ -22104,7 +21368,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -22117,46 +21381,42 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i16"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i8"
}
}
}
},
- "links": {},
- "name": "overflowing_shr",
+ "links": {
+ "i8::checked_mul": 10277,
+ "i8::wrapping_mul": 10279
+ },
+ "name": "unchecked_mul",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10271": {
+ "10281": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -22166,8 +21426,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Computes the absolute value of `self`.\n\nReturns a tuple of the absolute version of self along with a boolean indicating whether an overflow\nhappened. If self is the minimum value\n(e.g., i16::MIN for values of type i16),\nthen the minimum value will be returned again and true will be returned\nfor an overflow happening.\n\n# Examples\n\n```\nassert_eq!(10i16.overflowing_abs(), (10, false));\nassert_eq!((-10i16).overflowing_abs(), (10, false));\nassert_eq!((i16::MIN).overflowing_abs(), (i16::MIN, true));\n```",
- "id": 10271,
+ "docs": "Checked integer division. Computes `self / rhs`, returning `None` if `rhs == 0`\nor the division results in overflow.\n\n# Examples\n\n```\nassert_eq!((i8::MIN + 1).checked_div(-1), Some(127));\nassert_eq!(i8::MIN.checked_div(-1), None);\nassert_eq!((1i8).checked_div(0), None);\n```",
+ "id": 10281,
"inner": {
"function": {
"generics": {
@@ -22188,55 +21448,72 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i16"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i8"
+ }
+ }
+ ],
+ "constraints": []
+ }
},
- {
- "primitive": "bool"
- }
- ]
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "overflowing_abs",
+ "name": "checked_div",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10272": {
+ "10282": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\nReturns a tuple of the exponentiation along with a bool indicating\nwhether an overflow happened.\n\n# Examples\n\n```\nassert_eq!(3i16.overflowing_pow(4), (81, false));\nassert_eq!(3i8.overflowing_pow(5), (-13, true));\n```",
- "id": 10272,
+ "docs": "Strict integer division. Computes `self / rhs`, panicking\nif overflow occurred.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type.\n\n# Examples\n\n```\nassert_eq!((i8::MIN + 1).strict_div(-1), 127);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i8::MIN.strict_div(-1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1i8).strict_div(0);\n```",
+ "id": 10282,
"inner": {
"function": {
"generics": {
@@ -22259,48 +21536,41 @@
}
],
[
- "exp",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i16"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "overflowing_pow",
+ "name": "strict_div",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10273": {
+ "10283": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -22310,8 +21580,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\n# Examples\n\n```\nlet x: i16 = 2; // or any other integer type\n\nassert_eq!(x.pow(5), 32);\n```",
- "id": 10273,
+ "docs": "Checked Euclidean division. Computes `self.div_euclid(rhs)`,\nreturning `None` if `rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!((i8::MIN + 1).checked_div_euclid(-1), Some(127));\nassert_eq!(i8::MIN.checked_div_euclid(-1), None);\nassert_eq!((1i8).checked_div_euclid(0), None);\n```",
+ "id": 10283,
"inner": {
"function": {
"generics": {
@@ -22334,41 +21604,56 @@
}
],
[
- "exp",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i8"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "pow",
+ "name": "checked_div_euclid",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10274": {
+ "10284": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -22381,8 +21666,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the square root of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is negative.\n\n# Examples\n\n```\nassert_eq!(10i16.isqrt(), 3);\n```",
- "id": 10274,
+ "docs": "Strict Euclidean division. Computes `self.div_euclid(rhs)`, panicking\nif overflow occurred.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type.\n\n# Examples\n\n```\nassert_eq!((i8::MIN + 1).strict_div_euclid(-1), 127);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i8::MIN.strict_div_euclid(-1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1i8).strict_div_euclid(0);\n```",
+ "id": 10284,
"inner": {
"function": {
"generics": {
@@ -22403,51 +21688,51 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "isqrt",
+ "name": "strict_div_euclid",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10275": {
+ "10285": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of Euclidean division of `self` by `rhs`.\n\nThis computes the integer `q` such that `self = q * rhs + r`, with\n`r = self.rem_euclid(rhs)` and `0 <= r < abs(rhs)`.\n\nIn other words, the result is `self / rhs` rounded to the integer `q`\nsuch that `self >= q * rhs`.\nIf `self > 0`, this is equal to rounding towards zero (the default in Rust);\nif `self < 0`, this is equal to rounding away from zero (towards +/- infinity).\nIf `rhs > 0`, this is equal to rounding towards -infinity;\nif `rhs < 0`, this is equal to rounding towards +infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\nlet a: i16 = 7; // or any other integer type\nlet b = 4;\n\nassert_eq!(a.div_euclid(b), 1); // 7 >= 4 * 1\nassert_eq!(a.div_euclid(-b), -1); // 7 >= -4 * -1\nassert_eq!((-a).div_euclid(b), -2); // -7 >= 4 * -2\nassert_eq!((-a).div_euclid(-b), 2); // -7 >= -4 * 2\n```",
- "id": 10275,
+ "docs": "Checked integer division without remainder. Computes `self / rhs`,\nreturning `None` if `rhs == 0`, the division results in overflow,\nor `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!((i8::MIN + 1).checked_exact_div(-1), Some(127));\nassert_eq!((-5i8).checked_exact_div(2), None);\nassert_eq!(i8::MIN.checked_exact_div(-1), None);\nassert_eq!((1i8).checked_exact_div(0), None);\n```",
+ "id": 10285,
"inner": {
"function": {
"generics": {
@@ -22472,56 +21757,62 @@
[
"rhs",
{
- "primitive": "i16"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i8"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "div_euclid",
+ "name": "checked_exact_div",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10276": {
+ "10286": {
"attrs": [
{
- "other": "#[doc(alias = \"modulo\", alias = \"mod\")]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the least nonnegative remainder of `self (mod rhs)`.\n\nThis is done as if by the Euclidean division algorithm -- given\n`r = self.rem_euclid(rhs)`, the result satisfies\n`self = rhs * self.div_euclid(rhs) + r` and `0 <= r < abs(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN` and\n`rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\nlet a: i16 = 7; // or any other integer type\nlet b = 4;\n\nassert_eq!(a.rem_euclid(b), 3);\nassert_eq!((-a).rem_euclid(b), 1);\nassert_eq!(a.rem_euclid(-b), 3);\nassert_eq!((-a).rem_euclid(-b), 1);\n```\n\nThis will panic:\n```should_panic\nlet _ = i16::MIN.rem_euclid(-1);\n```",
- "id": 10276,
+ "docs": "Checked integer division without remainder. Computes `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs == 0`, the division results in overflow,\nor `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64i8.exact_div(2), 32);\nassert_eq!(64i8.exact_div(32), 2);\nassert_eq!((i8::MIN + 1).exact_div(-1), 127);\n```\n\n```should_panic\n#![feature(exact_div)]\nlet _ = 65i8.exact_div(2);\n```\n```should_panic\n#![feature(exact_div)]\nlet _ = i8::MIN.exact_div(-1);\n```",
+ "id": 10286,
"inner": {
"function": {
"generics": {
@@ -22546,50 +21837,47 @@
[
"rhs",
{
- "primitive": "i16"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "rem_euclid",
+ "name": "exact_div",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10277": {
+ "10287": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards negative infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nlet a: i16 = 8;\nlet b = 3;\n\nassert_eq!(a.div_floor(b), 2);\nassert_eq!(a.div_floor(-b), -3);\nassert_eq!((-a).div_floor(b), -3);\nassert_eq!((-a).div_floor(-b), 2);\n```",
- "id": 10277,
+ "docs": "Unchecked integer division without remainder. Computes `self / rhs`.\n\n# Safety\n\nThis results in undefined behavior when `rhs == 0`, `self % rhs != 0`, or\n`self == i8::MIN && rhs == -1`,\ni.e. when [`checked_exact_div`](Self::checked_exact_div) would return `None`.",
+ "id": 10287,
"inner": {
"function": {
"generics": {
@@ -22601,7 +21889,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -22614,50 +21902,52 @@
[
"rhs",
{
- "primitive": "i16"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "i8"
}
}
}
},
- "links": {},
- "name": "div_floor",
+ "links": {
+ "Self::checked_exact_div": 10285
+ },
+ "name": "unchecked_exact_div",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10278": {
+ "10288": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards positive infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nlet a: i16 = 8;\nlet b = 3;\n\nassert_eq!(a.div_ceil(b), 3);\nassert_eq!(a.div_ceil(-b), -2);\nassert_eq!((-a).div_ceil(b), -2);\nassert_eq!((-a).div_ceil(-b), 3);\n```",
- "id": 10278,
+ "docs": "Checked integer remainder. Computes `self % rhs`, returning `None` if\n`rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!(5i8.checked_rem(2), Some(1));\nassert_eq!(5i8.checked_rem(0), None);\nassert_eq!(i8::MIN.checked_rem(-1), None);\n```",
+ "id": 10288,
"inner": {
"function": {
"generics": {
@@ -22682,47 +21972,68 @@
[
"rhs",
{
- "primitive": "i16"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i8"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "div_ceil",
+ "name": "checked_rem",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10279": {
+ "10289": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "If `rhs` is positive, calculates the smallest value greater than or\nequal to `self` that is a multiple of `rhs`. If `rhs` is negative,\ncalculates the largest value less than or equal to `self` that is a\nmultiple of `rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nOn overflow, this function will panic if overflow checks are enabled (default in debug\nmode) and wrap if overflow checks are disabled (default in release mode).\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(16_i16.next_multiple_of(8), 16);\nassert_eq!(23_i16.next_multiple_of(8), 24);\nassert_eq!(16_i16.next_multiple_of(-8), 16);\nassert_eq!(23_i16.next_multiple_of(-8), 16);\nassert_eq!((-16_i16).next_multiple_of(8), -16);\nassert_eq!((-23_i16).next_multiple_of(8), -16);\nassert_eq!((-16_i16).next_multiple_of(-8), -16);\nassert_eq!((-23_i16).next_multiple_of(-8), -24);\n```",
- "id": 10279,
+ "docs": "Strict integer remainder. Computes `self % rhs`, panicking if\nthe division results in overflow.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is `x % y` for `MIN / -1` on a\nsigned type (where `MIN` is the negative minimal value), which is invalid due to implementation artifacts.\n\n# Examples\n\n```\nassert_eq!(5i8.strict_rem(2), 1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5i8.strict_rem(0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i8::MIN.strict_rem(-1);\n```",
+ "id": 10289,
"inner": {
"function": {
"generics": {
@@ -22747,38 +22058,38 @@
[
"rhs",
{
- "primitive": "i16"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "next_multiple_of",
+ "name": "strict_rem",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "1028": {
+ "1029": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1028,
+ "id": 1029,
"inner": {
"impl": {
"blanket_impl": null,
@@ -22864,8 +22175,8 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 315,
- "path": "Freeze"
+ "id": 7,
+ "path": "Unpin"
}
}
}
@@ -22885,8 +22196,8 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
- "path": "Freeze"
+ "id": 7,
+ "path": "Unpin"
}
}
},
@@ -22895,10 +22206,13 @@
"span": null,
"visibility": "default"
},
- "10280": {
+ "10290": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -22908,8 +22222,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "If `rhs` is positive, calculates the smallest value greater than or\nequal to `self` that is a multiple of `rhs`. If `rhs` is negative,\ncalculates the largest value less than or equal to `self` that is a\nmultiple of `rhs`. Returns `None` if `rhs` is zero or the operation\nwould result in overflow.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(16_i16.checked_next_multiple_of(8), Some(16));\nassert_eq!(23_i16.checked_next_multiple_of(8), Some(24));\nassert_eq!(16_i16.checked_next_multiple_of(-8), Some(16));\nassert_eq!(23_i16.checked_next_multiple_of(-8), Some(16));\nassert_eq!((-16_i16).checked_next_multiple_of(8), Some(-16));\nassert_eq!((-23_i16).checked_next_multiple_of(8), Some(-16));\nassert_eq!((-16_i16).checked_next_multiple_of(-8), Some(-16));\nassert_eq!((-23_i16).checked_next_multiple_of(-8), Some(-24));\nassert_eq!(1_i16.checked_next_multiple_of(0), None);\nassert_eq!(i16::MAX.checked_next_multiple_of(2), None);\n```",
- "id": 10280,
+ "docs": "Checked Euclidean remainder. Computes `self.rem_euclid(rhs)`, returning `None`\nif `rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!(5i8.checked_rem_euclid(2), Some(1));\nassert_eq!(5i8.checked_rem_euclid(0), None);\nassert_eq!(i8::MIN.checked_rem_euclid(-1), None);\n```",
+ "id": 10290,
"inner": {
"function": {
"generics": {
@@ -22934,7 +22248,7 @@
[
"rhs",
{
- "primitive": "i16"
+ "primitive": "i8"
}
]
],
@@ -22946,7 +22260,7 @@
"args": [
{
"type": {
- "primitive": "i16"
+ "primitive": "i8"
}
}
],
@@ -22961,27 +22275,27 @@
}
},
"links": {},
- "name": "checked_next_multiple_of",
+ "name": "checked_rem_euclid",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10281": {
+ "10291": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -22994,8 +22308,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nThis method might not be optimized owing to implementation details;\n`ilog2` can produce results more efficiently for base 2, and `ilog10`\ncan produce results more efficiently for base 10.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero,\nor if `base` is less than 2.\n\n# Examples\n\n```\nassert_eq!(5i16.ilog(5), 1);\n```",
- "id": 10281,
+ "docs": "Strict Euclidean remainder. Computes `self.rem_euclid(rhs)`, panicking if\nthe division results in overflow.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is `x % y` for `MIN / -1` on a\nsigned type (where `MIN` is the negative minimal value), which is invalid due to implementation artifacts.\n\n# Examples\n\n```\nassert_eq!(5i8.strict_rem_euclid(2), 1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5i8.strict_rem_euclid(0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i8::MIN.strict_rem_euclid(-1);\n```",
+ "id": 10291,
"inner": {
"function": {
"generics": {
@@ -23018,55 +22332,52 @@
}
],
[
- "base",
+ "rhs",
{
- "primitive": "i16"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "ilog",
+ "name": "strict_rem_euclid",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10282": {
+ "10292": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 10 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero.\n\n# Example\n\n```\nassert_eq!(10i16.ilog10(), 1);\n```",
- "id": 10282,
+ "docs": "Checked negation. Computes `-self`, returning `None` if `self == MIN`.\n\n# Examples\n\n```\nassert_eq!(5i8.checked_neg(), Some(-5));\nassert_eq!(i8::MIN.checked_neg(), None);\n```",
+ "id": 10292,
"inner": {
"function": {
"generics": {
@@ -23091,44 +22402,59 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i8"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "ilog10",
+ "name": "checked_neg",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10283": {
+ "10293": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_neg\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nReturns `None` if the number is negative or zero, or if the base is not at least 2.\n\nThis method might not be optimized owing to implementation details;\n`checked_ilog2` can produce results more efficiently for base 2, and\n`checked_ilog10` can produce results more efficiently for base 10.\n\n# Examples\n\n```\nassert_eq!(5i16.checked_ilog(5), Some(1));\n```",
- "id": 10283,
+ "docs": "Unchecked negation. Computes `-self`, assuming overflow cannot occur.\n\n# Safety\n\nThis results in undefined behavior when\n`self == i8::MIN`,\ni.e. when [`checked_neg`] would return `None`.\n\n[`checked_neg`]: i8::checked_neg",
+ "id": 10293,
"inner": {
"function": {
"generics": {
@@ -23140,7 +22466,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -23149,69 +22475,53 @@
{
"generic": "Self"
}
- ],
- [
- "base",
- {
- "primitive": "i16"
- }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i8"
}
}
}
},
- "links": {},
- "name": "checked_ilog",
+ "links": {
+ "i8::checked_neg": 10292
+ },
+ "name": "unchecked_neg",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10284": {
+ "10294": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 2 logarithm of the number, rounded down.\n\nReturns `None` if the number is negative or zero.\n\n# Examples\n\n```\nassert_eq!(2i16.checked_ilog2(), Some(1));\n```",
- "id": 10284,
+ "docs": "Strict negation. Computes `-self`, panicking if `self == MIN`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(5i8.strict_neg(), -5);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i8::MIN.strict_neg();\n```",
+ "id": 10294,
"inner": {
"function": {
"generics": {
@@ -23236,48 +22546,33 @@
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "checked_ilog2",
+ "name": "strict_neg",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10285": {
+ "10295": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -23287,8 +22582,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 10 logarithm of the number, rounded down.\n\nReturns `None` if the number is negative or zero.\n\n# Example\n\n```\nassert_eq!(10i16.checked_ilog10(), Some(1));\n```",
- "id": 10285,
+ "docs": "Checked shift left. Computes `self << rhs`, returning `None` if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x1i8.checked_shl(4), Some(0x10));\nassert_eq!(0x1i8.checked_shl(129), None);\nassert_eq!(0x10i8.checked_shl(7), Some(0));\n```",
+ "id": 10295,
"inner": {
"function": {
"generics": {
@@ -23309,6 +22604,12 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
@@ -23319,7 +22620,7 @@
"args": [
{
"type": {
- "primitive": "u32"
+ "primitive": "i8"
}
}
],
@@ -23334,38 +22635,41 @@
}
},
"links": {},
- "name": "checked_ilog10",
+ "name": "checked_shl",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10286": {
+ "10296": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Computes the absolute value of `self`.\n\n# Overflow behavior\n\nThe absolute value of\n`i16::MIN`\ncannot be represented as an\n`i16`,\nand attempting to calculate it will cause an overflow. This means\nthat code in debug mode will trigger a panic on this case and\noptimized code will return\n`i16::MIN`\nwithout a panic. If you do not want this behavior, consider\nusing [`unsigned_abs`](Self::unsigned_abs) instead.\n\n# Examples\n\n```\nassert_eq!(10i16.abs(), 10);\nassert_eq!((-10i16).abs(), 10);\n```",
- "id": 10286,
+ "docs": "Strict shift left. Computes `self << rhs`, panicking if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x1i8.strict_shl(4), 0x10);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x1i8.strict_shl(129);\n```",
+ "id": 10296,
"inner": {
"function": {
"generics": {
@@ -23386,50 +22690,54 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "i8"
}
}
}
},
- "links": {
- "Self::unsigned_abs": 10250
- },
- "name": "abs",
+ "links": {},
+ "name": "strict_shl",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10287": {
+ "10297": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Computes the absolute difference between `self` and `other`.\n\nThis function always returns the correct answer without overflow or\npanics by returning an unsigned integer.\n\n# Examples\n\n```\nassert_eq!(100i16.abs_diff(80), 20u16);\nassert_eq!(100i16.abs_diff(110), 10u16);\nassert_eq!((-100i16).abs_diff(80), 180u16);\nassert_eq!((-100i16).abs_diff(-120), 20u16);\nassert_eq!(i16::MIN.abs_diff(i16::MAX), u16::MAX);\n```",
- "id": 10287,
+ "docs": "Unchecked shift left. Computes `self << rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shl`] would return `None`.\n\n[`checked_shl`]: i8::checked_shl",
+ "id": 10297,
"inner": {
"function": {
"generics": {
@@ -23441,7 +22749,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -23452,41 +22760,43 @@
}
],
[
- "other",
+ "rhs",
{
- "primitive": "i16"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "i8"
}
}
}
},
- "links": {},
- "name": "abs_diff",
+ "links": {
+ "i8::checked_shl": 10295
+ },
+ "name": "unchecked_shl",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10288": {
+ "10298": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_int_sign\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
},
{
"must_use": {
@@ -23496,8 +22806,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns a number representing sign of `self`.\n\n - `0` if the number is zero\n - `1` if the number is positive\n - `-1` if the number is negative\n\n# Examples\n\n```\nassert_eq!(10i16.signum(), 1);\nassert_eq!(0i16.signum(), 0);\nassert_eq!((-10i16).signum(), -1);\n```",
- "id": 10288,
+ "docs": "Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x1i8.unbounded_shl(4), 0x10);\nassert_eq!(0x1i8.unbounded_shl(129), 0);\n```",
+ "id": 10298,
"inner": {
"function": {
"generics": {
@@ -23518,48 +22828,51 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "signum",
+ "name": "unbounded_shl",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10289": {
+ "10299": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `true` if `self` is positive and `false` if the number is zero or\nnegative.\n\n# Examples\n\n```\nassert!(10i16.is_positive());\nassert!(!(-10i16).is_positive());\n```",
- "id": 10289,
+ "docs": "Exact shift left. Computes `self << rhs` as long as it can be reversed losslessly.\n\nReturns `None` if any bits that would be shifted out differ from the resulting sign bit\nor if `rhs` >=\n`i8::BITS`.\nOtherwise, returns `Some(self << rhs)`.\n\n# Examples\n\n```\n#![feature(exact_bitshifts)]\n\nassert_eq!(0x1i8.exact_shl(4), Some(0x10));\nassert_eq!(0x1i8.exact_shl(i8::BITS - 2), Some(1 << i8::BITS - 2));\nassert_eq!(0x1i8.exact_shl(i8::BITS - 1), None);\nassert_eq!((-0x2i8).exact_shl(i8::BITS - 2), Some(-0x2 << i8::BITS - 2));\nassert_eq!((-0x2i8).exact_shl(i8::BITS - 1), None);\n```",
+ "id": 10299,
"inner": {
"function": {
"generics": {
@@ -23580,36 +22893,57 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i8"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "is_positive",
+ "name": "exact_shl",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "1029": {
+ "1030": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1029,
+ "id": 1030,
"inner": {
"impl": {
"blanket_impl": null,
@@ -23685,39 +23019,17 @@
"name": "F"
}
],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 7,
- "path": "Unpin"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "F"
- }
- }
- }
- ]
+ "where_predicates": []
},
- "is_negative": false,
+ "is_negative": true,
"is_synthetic": true,
"is_unsafe": false,
"items": [],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 7,
- "path": "Unpin"
+ "id": 316,
+ "path": "UnwindSafe"
}
}
},
@@ -23726,24 +23038,21 @@
"span": null,
"visibility": "default"
},
- "10290": {
+ "10300": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `true` if `self` is negative and `false` if the number is zero or\npositive.\n\n# Examples\n\n```\nassert!((-10i16).is_negative());\nassert!(!10i16.is_negative());\n```",
- "id": 10290,
+ "docs": "Unchecked exact shift left. Computes `self << rhs`, assuming the operation can be\nlosslessly reversed and `rhs` cannot be larger than\n`i8::BITS`.\n\n# Safety\n\nThis results in undefined behavior when `rhs >= self.leading_zeros() && rhs >=\nself.leading_ones()` i.e. when\n[`i8::exact_shl`]\nwould return `None`.",
+ "id": 10300,
"inner": {
"function": {
"generics": {
@@ -23755,7 +23064,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -23764,37 +23073,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "primitive": "i8"
}
}
}
},
- "links": {},
- "name": "is_negative",
+ "links": {
+ "`i8::exact_shl`": 10299
+ },
+ "name": "unchecked_exact_shl",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10291": {
+ "10301": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -23804,8 +23121,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nbig-endian (network) byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x1234i16.to_be_bytes();\nassert_eq!(bytes, [0x12, 0x34]);\n```",
- "id": 10291,
+ "docs": "Checked shift right. Computes `self >> rhs`, returning `None` if `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x10i8.checked_shr(4), Some(0x1));\nassert_eq!(0x10i8.checked_shr(128), None);\n```",
+ "id": 10301,
"inner": {
"function": {
"generics": {
@@ -23826,53 +23143,72 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "array": {
- "len": "2",
- "type": {
- "primitive": "u8"
- }
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i8"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
}
}
}
}
},
"links": {},
- "name": "to_be_bytes",
+ "name": "checked_shr",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10292": {
+ "10302": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nlittle-endian byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x1234i16.to_le_bytes();\nassert_eq!(bytes, [0x34, 0x12]);\n```",
- "id": 10292,
+ "docs": "Strict shift right. Computes `self >> rhs`, panicking `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x10i8.strict_shr(4), 0x1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10i8.strict_shr(128);\n```",
+ "id": 10302,
"inner": {
"function": {
"generics": {
@@ -23893,53 +23229,54 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "array": {
- "len": "2",
- "type": {
- "primitive": "u8"
- }
- }
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "to_le_bytes",
+ "name": "strict_shr",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10293": {
+ "10303": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nnative byte order.\n\nAs the target platform's native endianness is used, portable code\nshould use [`to_be_bytes`] or [`to_le_bytes`], as appropriate,\ninstead.\n\n\n\n[`to_be_bytes`]: Self::to_be_bytes\n[`to_le_bytes`]: Self::to_le_bytes\n\n# Examples\n\n```\nlet bytes = 0x1234i16.to_ne_bytes();\nassert_eq!(\n bytes,\n if cfg!(target_endian = \"big\") {\n [0x12, 0x34]\n } else {\n [0x34, 0x12]\n }\n);\n```",
- "id": 10293,
+ "docs": "Unchecked shift right. Computes `self >> rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shr`] would return `None`.\n\n[`checked_shr`]: i8::checked_shr",
+ "id": 10303,
"inner": {
"function": {
"generics": {
@@ -23951,7 +23288,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -23960,56 +23297,56 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "array": {
- "len": "2",
- "type": {
- "primitive": "u8"
- }
- }
+ "primitive": "i8"
}
}
}
},
"links": {
- "Self::to_be_bytes": 10291,
- "Self::to_le_bytes": 10292
+ "i8::checked_shr": 10301
},
- "name": "to_ne_bytes",
+ "name": "unchecked_shr",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10294": {
+ "10304": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Creates an integer value from its representation as a byte array in\nbig endian.\n\n\n\n# Examples\n\n```\nlet value = i16::from_be_bytes([0x12, 0x34]);\nassert_eq!(value, 0x1234);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_be_i16(input: &mut &[u8]) -> i16 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n i16::from_be_bytes(int_bytes.try_into().unwrap())\n}\n```",
- "id": 10294,
+ "docs": "Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, which yields `0` for a positive number,\nand `-1` for a negative number.\n\n# Examples\n\n```\nassert_eq!(0x10i8.unbounded_shr(4), 0x1);\nassert_eq!(0x10i8.unbounded_shr(129), 0);\nassert_eq!(i8::MIN.unbounded_shr(129), -1);\n```",
+ "id": 10304,
"inner": {
"function": {
"generics": {
@@ -24026,57 +23363,55 @@
"sig": {
"inputs": [
[
- "bytes",
+ "self",
{
- "array": {
- "len": "2",
- "type": {
- "primitive": "u8"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "from_be_bytes",
+ "name": "unbounded_shr",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10295": {
+ "10305": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Creates an integer value from its representation as a byte array in\nlittle endian.\n\n\n\n# Examples\n\n```\nlet value = i16::from_le_bytes([0x34, 0x12]);\nassert_eq!(value, 0x1234);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_le_i16(input: &mut &[u8]) -> i16 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n i16::from_le_bytes(int_bytes.try_into().unwrap())\n}\n```",
- "id": 10295,
+ "docs": "Exact shift right. Computes `self >> rhs` as long as it can be reversed losslessly.\n\nReturns `None` if any non-zero bits would be shifted out or if `rhs` >=\n`i8::BITS`.\nOtherwise, returns `Some(self >> rhs)`.\n\n# Examples\n\n```\n#![feature(exact_bitshifts)]\n\nassert_eq!(0x10i8.exact_shr(4), Some(0x1));\nassert_eq!(0x10i8.exact_shr(5), None);\n```",
+ "id": 10305,
"inner": {
"function": {
"generics": {
@@ -24093,57 +23428,70 @@
"sig": {
"inputs": [
[
- "bytes",
+ "self",
{
- "array": {
- "len": "2",
- "type": {
- "primitive": "u8"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i8"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "from_le_bytes",
+ "name": "exact_shr",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10296": {
+ "10306": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Creates an integer value from its memory representation as a byte\narray in native endianness.\n\nAs the target platform's native endianness is used, portable code\nlikely wants to use [`from_be_bytes`] or [`from_le_bytes`], as\nappropriate instead.\n\n[`from_be_bytes`]: Self::from_be_bytes\n[`from_le_bytes`]: Self::from_le_bytes\n\n\n\n# Examples\n\n```\nlet value = i16::from_ne_bytes(if cfg!(target_endian = \"big\") {\n [0x12, 0x34]\n} else {\n [0x34, 0x12]\n});\nassert_eq!(value, 0x1234);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_ne_i16(input: &mut &[u8]) -> i16 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n i16::from_ne_bytes(int_bytes.try_into().unwrap())\n}\n```",
- "id": 10296,
+ "docs": "Unchecked exact shift right. Computes `self >> rhs`, assuming the operation can be\nlosslessly reversed and `rhs` cannot be larger than\n`i8::BITS`.\n\n# Safety\n\nThis results in undefined behavior when `rhs > self.trailing_zeros() || rhs >=\ni8::BITS`\ni.e. when\n[`i8::exact_shr`]\nwould return `None`.",
+ "id": 10306,
"inner": {
"function": {
"generics": {
@@ -24155,66 +23503,65 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
[
- "bytes",
+ "self",
{
- "array": {
- "len": "2",
- "type": {
- "primitive": "u8"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "i8"
}
}
}
},
"links": {
- "Self::from_be_bytes": 10294,
- "Self::from_le_bytes": 10295
+ "`i8::exact_shr`": 10305
},
- "name": "from_ne_bytes",
+ "name": "unchecked_exact_shr",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10297": {
+ "10307": {
"attrs": [
{
- "other": "#[rustc_diagnostic_item = \"i16_legacy_fn_min_value\"]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_min_value\", promotable: true}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
- "deprecation": {
- "note": "replaced by the `MIN` associated constant on this type",
- "since": "TBD"
- },
- "docs": "New code should prefer to use\n[`i16::MIN`] instead.\n\nReturns the smallest value that can be represented by this integer type.",
- "id": 10297,
+ "deprecation": null,
+ "docs": "Checked absolute value. Computes `self.abs()`, returning `None` if\n`self == MIN`.\n\n# Examples\n\n```\nassert_eq!((-5i8).checked_abs(), Some(5));\nassert_eq!(i8::MIN.checked_abs(), None);\n```",
+ "id": 10307,
"inner": {
"function": {
"generics": {
@@ -24229,50 +23576,72 @@
"is_unsafe": false
},
"sig": {
- "inputs": [],
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i8"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
- "links": {
- "`i16::MIN`": 10165
- },
- "name": "min_value",
+ "links": {},
+ "name": "checked_abs",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10298": {
+ "10308": {
"attrs": [
{
- "other": "#[rustc_diagnostic_item = \"i16_legacy_fn_max_value\"]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
- "deprecation": {
- "note": "replaced by the `MAX` associated constant on this type",
- "since": "TBD"
- },
- "docs": "New code should prefer to use\n[`i16::MAX`] instead.\n\nReturns the largest value that can be represented by this integer type.",
- "id": 10298,
+ "deprecation": null,
+ "docs": "Strict absolute value. Computes `self.abs()`, panicking if\n`self == MIN`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((-5i8).strict_abs(), 5);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i8::MIN.strict_abs();\n```",
+ "id": 10308,
"inner": {
"function": {
"generics": {
@@ -24287,47 +23656,43 @@
"is_unsafe": false
},
"sig": {
- "inputs": [],
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "i8"
}
}
}
},
- "links": {
- "`i16::MAX`": 10166
- },
- "name": "max_value",
+ "links": {},
+ "name": "strict_abs",
"span": {
"begin": [
- 271,
+ 247,
5
],
"end": [
- 290,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10299": {
+ "10309": {
"attrs": [
{
- "other": "#[doc(alias = \"average_floor\")]"
- },
- {
- "other": "#[doc(alias = \"average_ceil\")]"
- },
- {
- "other": "#[doc(alias = \"average\")]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"num_midpoint_signed\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"num_midpoint_signed\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
@@ -24337,8 +23702,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the midpoint (average) between `self` and `rhs`.\n\n`midpoint(a, b)` is `(a + b) / 2` as if it were performed in a\nsufficiently-large signed integral type. This implies that the result is\nalways rounded towards zero and that no overflow will ever occur.\n\n# Examples\n\n```\nassert_eq!(0i16.midpoint(4), 2);\nassert_eq!((-1i16).midpoint(2), 0);\nassert_eq!((-7i16).midpoint(0), -3);\nassert_eq!(0i16.midpoint(-7), -3);\nassert_eq!(0i16.midpoint(7), 3);\n```",
- "id": 10299,
+ "docs": "Checked exponentiation. Computes `self.pow(exp)`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(8i8.checked_pow(2), Some(64));\nassert_eq!(i8::MAX.checked_pow(2), None);\n```",
+ "id": 10309,
"inner": {
"function": {
"generics": {
@@ -24361,856 +23726,55 @@
}
],
[
- "rhs",
+ "exp",
{
- "primitive": "i16"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i8"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "midpoint",
+ "name": "checked_pow",
"span": {
"begin": [
- 291,
+ 247,
5
],
"end": [
- 291,
- 40
+ 266,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "1030": {
+ "1031": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1030,
- "inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- },
- {
- "type": {
- "generic": "F"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 765,
- "path": "ExtractIf"
- }
- },
- "generics": {
- "params": [
- {
- "kind": {
- "lifetime": {
- "outlives": []
- }
- },
- "name": "'a"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "K"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "V"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "F"
- }
- ],
- "where_predicates": []
- },
- "is_negative": true,
- "is_synthetic": true,
- "is_unsafe": false,
- "items": [],
- "provided_trait_methods": [],
- "trait": {
- "args": null,
- "id": 318,
- "path": "UnwindSafe"
- }
- }
- },
- "links": {},
- "name": null,
- "span": null,
- "visibility": "default"
- },
- "10300": {
- "attrs": [],
- "crate_id": 1,
- "deprecation": null,
- "docs": null,
- "id": 10300,
- "inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "primitive": "i16"
- },
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 10165,
- 10166,
- 10167,
- 10168,
- 10169,
- 10171,
- 10172,
- 10173,
- 10174,
- 10175,
- 10176,
- 10177,
- 10178,
- 10179,
- 10180,
- 10181,
- 10182,
- 10183,
- 10184,
- 10185,
- 10186,
- 10187,
- 10188,
- 10189,
- 10191,
- 10192,
- 10193,
- 10194,
- 10195,
- 10197,
- 10198,
- 10199,
- 10200,
- 10201,
- 10203,
- 10204,
- 10205,
- 10206,
- 10207,
- 10208,
- 10209,
- 10210,
- 10211,
- 10212,
- 10213,
- 10214,
- 10215,
- 10216,
- 10217,
- 10218,
- 10219,
- 10220,
- 10221,
- 10222,
- 10223,
- 10224,
- 10225,
- 10226,
- 10227,
- 10228,
- 10229,
- 10230,
- 10231,
- 10232,
- 10233,
- 10234,
- 10235,
- 10236,
- 10237,
- 10238,
- 10239,
- 10190,
- 10240,
- 10196,
- 10241,
- 10202,
- 10242,
- 10243,
- 10244,
- 10245,
- 10246,
- 10247,
- 10248,
- 10249,
- 10250,
- 10251,
- 10252,
- 10254,
- 10255,
- 10256,
- 10258,
- 10259,
- 10260,
- 10262,
- 10261,
- 10263,
- 10264,
- 10265,
- 10266,
- 10267,
- 10268,
- 10269,
- 10270,
- 10271,
- 10272,
- 10273,
- 10274,
- 10275,
- 10276,
- 10277,
- 10278,
- 10279,
- 10280,
- 10281,
- 10170,
- 10282,
- 10283,
- 10284,
- 10285,
- 10286,
- 10287,
- 10288,
- 10289,
- 10290,
- 10291,
- 10292,
- 10293,
- 10294,
- 10295,
- 10296,
- 10297,
- 10298,
- 10299
- ],
- "provided_trait_methods": [],
- "trait": null
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 270,
- 1
- ],
- "end": [
- 270,
- 9
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "default"
- },
- "10301": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 82, patch: 0})}, feature: \"const_int_from_str\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Parses an integer from a string slice with digits in a given base.\n\nThe string is expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\nassert_eq!(i16::from_str_radix(\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\nassert!(i16::from_str_radix(\"1 \", 10).is_err());\n```",
- "id": 10301,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "src",
- {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "primitive": "str"
- }
- }
- }
- ],
- [
- "radix",
- {
- "primitive": "u32"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i16"
- }
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 4784,
- "path": "ParseIntError"
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 57,
- "path": "Result"
- }
- }
- }
- }
- },
- "links": {},
- "name": "from_str_radix",
- "span": {
- "begin": [
- 1630,
- 1
- ],
- "end": [
- 1630,
- 56
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "10302": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Parses an integer from an ASCII-byte slice with decimal digits.\n\nThe characters are expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(i16::from_ascii(b\"+10\"), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(i16::from_ascii(b\"1 \").is_err());\n```",
- "id": 10302,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "src",
- {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "slice": {
- "primitive": "u8"
- }
- }
- }
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i16"
- }
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 4784,
- "path": "ParseIntError"
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 57,
- "path": "Result"
- }
- }
- }
- }
- },
- "links": {},
- "name": "from_ascii",
- "span": {
- "begin": [
- 1630,
- 1
- ],
- "end": [
- 1630,
- 56
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "10303": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Parses an integer from an ASCII-byte slice with digits in a given base.\n\nThe characters are expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(i16::from_ascii_radix(b\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(i16::from_ascii_radix(b\"1 \", 10).is_err());\n```",
- "id": 10303,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "src",
- {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "slice": {
- "primitive": "u8"
- }
- }
- }
- }
- ],
- [
- "radix",
- {
- "primitive": "u32"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i16"
- }
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 4784,
- "path": "ParseIntError"
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 57,
- "path": "Result"
- }
- }
- }
- }
- },
- "links": {},
- "name": "from_ascii_radix",
- "span": {
- "begin": [
- 1630,
- 1
- ],
- "end": [
- 1630,
- 56
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "10304": {
- "attrs": [],
- "crate_id": 1,
- "deprecation": null,
- "docs": null,
- "id": 10304,
- "inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "primitive": "i16"
- },
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 10301,
- 10302,
- 10303
- ],
- "provided_trait_methods": [],
- "trait": null
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 1630,
- 1
- ],
- "end": [
- 1630,
- 56
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "default"
- },
- "10305": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 138215, is_soft: false}, feature: \"int_format_into\"}}]"
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Allows users to write an integer (in signed decimal format) into a variable `buf` of\ntype [`NumBuffer`] that is passed by the caller by mutable reference.\n\n# Examples\n\n```\n#![feature(int_format_into)]\nuse core::fmt::NumBuffer;\n\nlet n = 0i16;\nlet mut buf = NumBuffer::new();\nassert_eq!(n.format_into(&mut buf), \"0\");\n\nlet n1 = 32i16;\nassert_eq!(n1.format_into(&mut buf), \"32\");\n\nlet n2 = i16 :: MAX;\nassert_eq!(n2.format_into(&mut buf), i16 :: MAX.to_string());\n```",
- "id": 10305,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "buf",
- {
- "borrowed_ref": {
- "is_mutable": true,
- "lifetime": null,
- "type": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i16"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 10162,
- "path": "NumBuffer"
- }
- }
- }
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "primitive": "str"
- }
- }
- }
- }
- }
- },
- "links": {
- "`NumBuffer`": 10162
- },
- "name": "format_into",
- "span": {
- "begin": [
- 562,
- 5
- ],
- "end": [
- 562,
- 95
- ],
- "filename": "checkouts/rust/library/core/src/fmt/num.rs"
- },
- "visibility": "public"
- },
- "10306": {
- "attrs": [],
- "crate_id": 1,
- "deprecation": null,
- "docs": null,
- "id": 10306,
- "inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "primitive": "i16"
- },
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 10305
- ],
- "provided_trait_methods": [],
- "trait": null
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 562,
- 5
- ],
- "end": [
- 562,
- 95
- ],
- "filename": "checkouts/rust/library/core/src/fmt/num.rs"
- },
- "visibility": "default"
- },
- "10307": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "The smallest value that can be represented by this integer type\n(−231).\n\n# Examples\n\n```\nassert_eq!(i32::MIN, -2147483648);\n```",
- "id": 10307,
- "inner": {
- "assoc_const": {
- "type": {
- "primitive": "i32"
- },
- "value": "_"
- }
- },
- "links": {},
- "name": "MIN",
- "span": {
- "begin": [
- 295,
- 5
- ],
- "end": [
- 314,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "10308": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "The largest value that can be represented by this integer type\n(231 − 1).\n\n# Examples\n\n```\nassert_eq!(i32::MAX, 2147483647);\n```",
- "id": 10308,
- "inner": {
- "assoc_const": {
- "type": {
- "primitive": "i32"
- },
- "value": "_"
- }
- },
- "links": {},
- "name": "MAX",
- "span": {
- "begin": [
- 295,
- 5
- ],
- "end": [
- 314,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "10309": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 53, patch: 0})}, feature: \"int_bits_const\"}}]"
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "The size of this integer type in bits.\n\n# Examples\n\n```\nassert_eq!(i32::BITS, 32);\n```",
- "id": 10309,
- "inner": {
- "assoc_const": {
- "type": {
- "primitive": "u32"
- },
- "value": "u32::BITS"
- }
- },
- "links": {},
- "name": "BITS",
- "span": {
- "begin": [
- 295,
- 5
- ],
- "end": [
- 314,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "1031": {
- "attrs": [],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 1031,
+ "id": 1031,
"inner": {
"impl": {
"blanket_impl": null,
@@ -25296,7 +23860,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -25317,7 +23881,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -25338,7 +23902,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -25359,7 +23923,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -25372,26 +23936,23 @@
"10310": {
"attrs": [
{
- "other": "#[doc(alias = \"popcount\")]"
- },
- {
- "other": "#[doc(alias = \"popcnt\")]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 0b100_0000i32;\n\nassert_eq!(n.count_ones(), 1);\n```\n",
+ "docs": "Strict exponentiation. Computes `self.pow(exp)`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(8i8.strict_pow(2), 64);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i8::MAX.strict_pow(2);\n```",
"id": 10310,
"inner": {
"function": {
@@ -25413,24 +23974,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "exp",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "count_ones",
+ "name": "strict_pow",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -25440,10 +24007,10 @@
"10311": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
},
{
"must_use": {
@@ -25453,7 +24020,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of zeros in the binary representation of `self`.\n\n# Examples\n\n```\nassert_eq!(i32::MAX.count_zeros(), 1);\n```",
+ "docs": "Returns the square root of the number, rounded down.\n\nReturns `None` if `self` is negative.\n\n# Examples\n\n```\nassert_eq!(10i8.checked_isqrt(), Some(3));\n```",
"id": 10311,
"inner": {
"function": {
@@ -25479,20 +24046,35 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i8"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "count_zeros",
+ "name": "checked_isqrt",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -25502,23 +24084,20 @@
"10312": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 2 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero.\n\n# Examples\n\n```\nassert_eq!(2i32.ilog2(), 1);\n```",
+ "docs": "Saturating integer addition. Computes `self + rhs`, saturating at the numeric\nbounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i8.saturating_add(1), 101);\nassert_eq!(i8::MAX.saturating_add(100), i8::MAX);\nassert_eq!(i8::MIN.saturating_add(-1), i8::MIN);\n```",
"id": 10312,
"inner": {
"function": {
@@ -25540,24 +24119,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "ilog2",
+ "name": "saturating_add",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -25567,10 +24152,10 @@
"10313": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -25580,7 +24165,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of leading zeros in the binary representation of `self`.\n\nDepending on what you're doing with the value, you might also be interested in the\n[`ilog2`] function which returns a consistent number, even if the type widens.\n\n# Examples\n\n```\nlet n = -1i32;\n\nassert_eq!(n.leading_zeros(), 0);\n```\n[`ilog2`]: i32::ilog2",
+ "docs": "Saturating addition with an unsigned integer. Computes `self + rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1i8.saturating_add_unsigned(2), 3);\nassert_eq!(i8::MAX.saturating_add_unsigned(100), i8::MAX);\n```",
"id": 10313,
"inner": {
"function": {
@@ -25602,26 +24187,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i8"
}
}
}
},
- "links": {
- "i32::ilog2": 10312
- },
- "name": "leading_zeros",
+ "links": {},
+ "name": "saturating_add_unsigned",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -25631,7 +24220,7 @@
"10314": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -25644,7 +24233,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of trailing zeros in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = -4i32;\n\nassert_eq!(n.trailing_zeros(), 2);\n```",
+ "docs": "Saturating integer subtraction. Computes `self - rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i8.saturating_sub(127), -27);\nassert_eq!(i8::MIN.saturating_sub(100), i8::MIN);\nassert_eq!(i8::MAX.saturating_sub(-1), i8::MAX);\n```",
"id": 10314,
"inner": {
"function": {
@@ -25666,24 +24255,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "trailing_zeros",
+ "name": "saturating_sub",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -25693,10 +24288,10 @@
"10315": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -25706,7 +24301,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of leading ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = -1i32;\n\nassert_eq!(n.leading_ones(), 32);\n```",
+ "docs": "Saturating subtraction with an unsigned integer. Computes `self - rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i8.saturating_sub_unsigned(127), -27);\nassert_eq!(i8::MIN.saturating_sub_unsigned(100), i8::MIN);\n```",
"id": 10315,
"inner": {
"function": {
@@ -25728,24 +24323,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "leading_ones",
+ "name": "saturating_sub_unsigned",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -25755,10 +24356,10 @@
"10316": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 45, patch: 0})}, feature: \"saturating_neg\"}}]"
},
{
"must_use": {
@@ -25768,7 +24369,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of trailing ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 3i32;\n\nassert_eq!(n.trailing_ones(), 2);\n```",
+ "docs": "Saturating integer negation. Computes `-self`, returning `MAX` if `self == MIN`\ninstead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i8.saturating_neg(), -100);\nassert_eq!((-100i8).saturating_neg(), 100);\nassert_eq!(i8::MIN.saturating_neg(), i8::MAX);\nassert_eq!(i8::MAX.saturating_neg(), i8::MIN + 1);\n```",
"id": 10316,
"inner": {
"function": {
@@ -25794,20 +24395,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "trailing_ones",
+ "name": "saturating_neg",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -25817,7 +24418,10 @@
"10317": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 45, patch: 0})}, feature: \"saturating_neg\"}}]"
},
{
"must_use": {
@@ -25827,7 +24431,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `self` with only the most significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: i32 = 0b_01100100;\n\nassert_eq!(n.isolate_highest_one(), 0b_01000000);\nassert_eq!(0_i32.isolate_highest_one(), 0);\n```",
+ "docs": "Saturating absolute value. Computes `self.abs()`, returning `MAX` if `self ==\nMIN` instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i8.saturating_abs(), 100);\nassert_eq!((-100i8).saturating_abs(), 100);\nassert_eq!(i8::MIN.saturating_abs(), i8::MAX);\nassert_eq!((i8::MIN + 1).saturating_abs(), i8::MAX);\n```",
"id": 10317,
"inner": {
"function": {
@@ -25853,20 +24457,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "isolate_highest_one",
+ "name": "saturating_abs",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -25876,7 +24480,10 @@
"10318": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -25886,7 +24493,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `self` with only the least significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: i32 = 0b_01100100;\n\nassert_eq!(n.isolate_lowest_one(), 0b_00000100);\nassert_eq!(0_i32.isolate_lowest_one(), 0);\n```",
+ "docs": "Saturating integer multiplication. Computes `self * rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(10i8.saturating_mul(12), 120);\nassert_eq!(i8::MAX.saturating_mul(10), i8::MAX);\nassert_eq!(i8::MIN.saturating_mul(10), i8::MIN);\n```",
"id": 10318,
"inner": {
"function": {
@@ -25908,24 +24515,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "isolate_lowest_one",
+ "name": "saturating_mul",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -25935,7 +24548,10 @@
"10319": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\"}}]"
},
{
"must_use": {
@@ -25945,7 +24561,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the index of the highest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_i32.highest_one(), None);\nassert_eq!(0x1_i32.highest_one(), Some(0));\nassert_eq!(0x10_i32.highest_one(), Some(4));\nassert_eq!(0x1f_i32.highest_one(), Some(4));\n```",
+ "docs": "Saturating integer division. Computes `self / rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i8.saturating_div(2), 2);\nassert_eq!(i8::MAX.saturating_div(-1), i8::MIN + 1);\nassert_eq!(i8::MIN.saturating_div(-1), i8::MAX);\n\n```",
"id": 10319,
"inner": {
"function": {
@@ -25967,39 +24583,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "highest_one",
+ "name": "saturating_div",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -26089,7 +24696,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -26105,7 +24712,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -26114,12 +24721,12 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -26128,7 +24735,10 @@
"10320": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
@@ -26138,7 +24748,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the index of the lowest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_i32.lowest_one(), None);\nassert_eq!(0x1_i32.lowest_one(), Some(0));\nassert_eq!(0x10_i32.lowest_one(), Some(4));\nassert_eq!(0x1f_i32.lowest_one(), Some(0));\n```",
+ "docs": "Saturating integer exponentiation. Computes `self.pow(exp)`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!((-4i8).saturating_pow(3), -64);\nassert_eq!(i8::MIN.saturating_pow(2), i8::MAX);\nassert_eq!(i8::MIN.saturating_pow(3), i8::MIN);\n```",
"id": 10320,
"inner": {
"function": {
@@ -26160,39 +24770,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "exp",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "lowest_one",
+ "name": "saturating_pow",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -26202,10 +24803,10 @@
"10321": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -26215,7 +24816,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the bit pattern of `self` reinterpreted as an unsigned integer of the same size.\n\nThis produces the same result as an `as` cast, but ensures that the bit-width remains\nthe same.\n\n# Examples\n\n```\nlet n = -1i32;\n\nassert_eq!(n.cast_unsigned(), u32::MAX);\n```",
+ "docs": "Wrapping (modular) addition with an unsigned integer. Computes\n`self + rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(100i8.wrapping_add_unsigned(27), 127);\nassert_eq!(i8::MAX.wrapping_add_unsigned(2), i8::MIN + 1);\n```",
"id": 10321,
"inner": {
"function": {
@@ -26237,24 +24838,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "cast_unsigned",
+ "name": "wrapping_add_unsigned",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -26264,10 +24871,10 @@
"10322": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -26277,7 +24884,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts the bits to the left by a specified amount, `n`,\nwrapping the truncated bits to the end of the resulting integer.\n\nPlease note this isn't the same operation as the `<<` shifting operator!\n\n# Examples\n\n```\nlet n = 0x10000b3i32;\nlet m = 0xb301;\n\nassert_eq!(n.rotate_left(8), m);\n```",
+ "docs": "Wrapping (modular) subtraction with an unsigned integer. Computes\n`self - rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(0i8.wrapping_sub_unsigned(127), -127);\nassert_eq!((-2i8).wrapping_sub_unsigned(u8::MAX), -1);\n```",
"id": 10322,
"inner": {
"function": {
@@ -26301,28 +24908,28 @@
}
],
[
- "n",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "rotate_left",
+ "name": "wrapping_sub_unsigned",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -26332,10 +24939,10 @@
"10323": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
@@ -26345,7 +24952,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts the bits to the right by a specified amount, `n`,\nwrapping the truncated bits to the beginning of the resulting\ninteger.\n\nPlease note this isn't the same operation as the `>>` shifting operator!\n\n# Examples\n\n```\nlet n = 0xb301i32;\nlet m = 0x10000b3;\n\nassert_eq!(n.rotate_right(8), m);\n```",
+ "docs": "Wrapping (modular) division. Computes `self / rhs`, wrapping around at the\nboundary of the type.\n\nThe only case where such wrapping can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type. In such a case, this function returns `MIN` itself.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i8.wrapping_div(10), 10);\nassert_eq!((-128i8).wrapping_div(-1), -128);\n```",
"id": 10323,
"inner": {
"function": {
@@ -26369,28 +24976,28 @@
}
],
[
- "n",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "rotate_right",
+ "name": "wrapping_div",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -26400,10 +25007,10 @@
"10324": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -26413,7 +25020,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Reverses the byte order of the integer.\n\n# Examples\n\n```\nlet n = 0x12345678i32;\n\nlet m = n.swap_bytes();\n\nassert_eq!(m, 0x78563412);\n```",
+ "docs": "Wrapping Euclidean division. Computes `self.div_euclid(rhs)`,\nwrapping around at the boundary of the type.\n\nWrapping will only occur in `MIN / -1` on a signed type (where `MIN` is the negative minimal value\nfor the type). This is equivalent to `-MIN`, a positive value that is too large to represent in the\ntype. In this case, this method returns `MIN` itself.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i8.wrapping_div_euclid(10), 10);\nassert_eq!((-128i8).wrapping_div_euclid(-1), -128);\n```",
"id": 10324,
"inner": {
"function": {
@@ -26435,24 +25042,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "swap_bytes",
+ "name": "wrapping_div_euclid",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -26462,10 +25075,10 @@
"10325": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
@@ -26475,7 +25088,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\n second least-significant bit becomes second most-significant bit, etc.\n\n# Examples\n\n```\nlet n = 0x12345678i32;\nlet m = n.reverse_bits();\n\nassert_eq!(m, 0x1e6a2c48);\nassert_eq!(0, 0i32.reverse_bits());\n```",
+ "docs": "Wrapping (modular) remainder. Computes `self % rhs`, wrapping around at the\nboundary of the type.\n\nSuch wrap-around never actually occurs mathematically; implementation artifacts make `x % y`\ninvalid for `MIN / -1` on a signed type (where `MIN` is the negative minimal value). In such a case,\nthis function returns `0`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i8.wrapping_rem(10), 0);\nassert_eq!((-128i8).wrapping_rem(-1), 0);\n```",
"id": 10325,
"inner": {
"function": {
@@ -26497,24 +25110,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "reverse_bits",
+ "name": "wrapping_rem",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -26524,20 +25143,20 @@
"10326": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts an integer from big endian to the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai32;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(i32::from_be(n), n)\n} else {\n assert_eq!(i32::from_be(n), n.swap_bytes())\n}\n```",
+ "docs": "Wrapping Euclidean remainder. Computes `self.rem_euclid(rhs)`, wrapping around\nat the boundary of the type.\n\nWrapping will only occur in `MIN % -1` on a signed type (where `MIN` is the negative minimal value\nfor the type). In this case, this method returns 0.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i8.wrapping_rem_euclid(10), 0);\nassert_eq!((-128i8).wrapping_rem_euclid(-1), 0);\n```",
"id": 10326,
"inner": {
"function": {
@@ -26555,28 +25174,34 @@
"sig": {
"inputs": [
[
- "x",
+ "self",
{
- "primitive": "i32"
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "from_be",
+ "name": "wrapping_rem_euclid",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -26586,20 +25211,20 @@
"10327": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts an integer from little endian to the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai32;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(i32::from_le(n), n)\n} else {\n assert_eq!(i32::from_le(n), n.swap_bytes())\n}\n```",
+ "docs": "Wrapping (modular) negation. Computes `-self`, wrapping around at the boundary\nof the type.\n\nThe only case where such wrapping can occur is when one negates `MIN` on a signed type (where `MIN`\nis the negative minimal value for the type); this is a positive value that is too large to represent\nin the type. In such a case, this function returns `MIN` itself.\n\n# Examples\n\n```\nassert_eq!(100i8.wrapping_neg(), -100);\nassert_eq!((-100i8).wrapping_neg(), 100);\nassert_eq!(i8::MIN.wrapping_neg(), i8::MIN);\n```",
"id": 10327,
"inner": {
"function": {
@@ -26617,28 +25242,28 @@
"sig": {
"inputs": [
[
- "x",
+ "self",
{
- "primitive": "i32"
+ "generic": "Self"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "from_le",
+ "name": "wrapping_neg",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -26648,10 +25273,10 @@
"10328": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
@@ -26661,7 +25286,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts `self` to big endian from the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai32;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(n.to_be(), n)\n} else {\n assert_eq!(n.to_be(), n.swap_bytes())\n}\n```",
+ "docs": "Panic-free bitwise shift-left; yields `self << mask(rhs)`, where `mask` removes\nany high-order bits of `rhs` that would cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-left; the RHS of a wrapping shift-left is restricted to\nthe range of the type, rather than the bits shifted out of the LHS being returned to the other end.\nThe primitive integer types all implement a [`rotate_left`](Self::rotate_left) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!((-1i8).wrapping_shl(7), -128);\nassert_eq!((-1i8).wrapping_shl(128), -1);\n```",
"id": 10328,
"inner": {
"function": {
@@ -26683,24 +25308,32 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i8"
}
}
}
},
- "links": {},
- "name": "to_be",
+ "links": {
+ "Self::rotate_left": 10257
+ },
+ "name": "wrapping_shl",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -26710,10 +25343,10 @@
"10329": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
@@ -26723,7 +25356,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts `self` to little endian from the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai32;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(n.to_le(), n)\n} else {\n assert_eq!(n.to_le(), n.swap_bytes())\n}\n```",
+ "docs": "Panic-free bitwise shift-right; yields `self >> mask(rhs)`, where `mask`\nremoves any high-order bits of `rhs` that would cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-right; the RHS of a wrapping shift-right is restricted\nto the range of the type, rather than the bits shifted out of the LHS being returned to the other\nend. The primitive integer types all implement a [`rotate_right`](Self::rotate_right) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!((-128i8).wrapping_shr(7), -1);\nassert_eq!((-128i16).wrapping_shr(64), -128);\n```",
"id": 10329,
"inner": {
"function": {
@@ -26745,24 +25378,32 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i8"
}
}
}
},
- "links": {},
- "name": "to_le",
+ "links": {
+ "Self::rotate_right": 10258
+ },
+ "name": "wrapping_shr",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -26852,7 +25493,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -26868,7 +25509,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -26877,12 +25518,12 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -26891,10 +25532,10 @@
"10330": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
},
{
"must_use": {
@@ -26904,7 +25545,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer addition. Computes `self + rhs`, returning `None`\nif overflow occurred.\n\n# Examples\n\n```\nassert_eq!((i32::MAX - 2).checked_add(1), Some(i32::MAX - 1));\nassert_eq!((i32::MAX - 2).checked_add(3), None);\n```",
+ "docs": "Wrapping (modular) absolute value. Computes `self.abs()`, wrapping around at\nthe boundary of the type.\n\nThe only case where such wrapping can occur is when one takes the absolute value of the negative\nminimal value for the type; this is a positive value that is too large to represent in the type. In\nsuch a case, this function returns `MIN` itself.\n\n# Examples\n\n```\nassert_eq!(100i8.wrapping_abs(), 100);\nassert_eq!((-100i8).wrapping_abs(), 100);\nassert_eq!(i8::MIN.wrapping_abs(), i8::MIN);\nassert_eq!((-128i8).wrapping_abs() as u8, 128);\n```",
"id": 10330,
"inner": {
"function": {
@@ -26926,45 +25567,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i32"
- }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "checked_add",
+ "name": "wrapping_abs",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -26974,23 +25594,20 @@
"10331": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 51, patch: 0})}, feature: \"unsigned_abs\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 51, patch: 0})}, feature: \"unsigned_abs\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer addition. Computes `self + rhs`, panicking\nif overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((i32::MAX - 2).strict_add(1), i32::MAX - 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i32::MAX - 2).strict_add(3);\n```",
+ "docs": "Computes the absolute value of `self` without any wrapping\nor panicking.\n\n\n# Examples\n\n```\nassert_eq!(100i8.unsigned_abs(), 100u8);\nassert_eq!((-100i8).unsigned_abs(), 100u8);\nassert_eq!((-128i8).unsigned_abs(), 128u8);\n```",
"id": 10331,
"inner": {
"function": {
@@ -27012,30 +25629,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "strict_add",
+ "name": "unsigned_abs",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -27045,10 +25656,10 @@
"10332": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
@@ -27058,7 +25669,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) addition. Computes `self + rhs`, wrapping around at the\nboundary of the type.\n\n# Examples\n\n```\nassert_eq!(100i32.wrapping_add(27), 127);\nassert_eq!(i32::MAX.wrapping_add(2), i32::MIN + 1);\n```",
+ "docs": "Wrapping (modular) exponentiation. Computes `self.pow(exp)`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(3i8.wrapping_pow(4), 81);\nassert_eq!(3i8.wrapping_pow(5), -13);\nassert_eq!(3i8.wrapping_pow(6), -39);\n```",
"id": 10332,
"inner": {
"function": {
@@ -27082,28 +25693,28 @@
}
],
[
- "rhs",
+ "exp",
{
- "primitive": "i32"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "wrapping_add",
+ "name": "wrapping_pow",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -27113,23 +25724,20 @@
"10333": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer addition. Computes `self + rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_add(y)` is semantically equivalent to calling\n`x.`[`checked_add`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_add`].\n\n# Safety\n\nThis results in undefined behavior when\n`self + rhs > i32::MAX` or `self + rhs < i32::MIN`,\ni.e. when [`checked_add`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_add`]: i32::checked_add\n[`wrapping_add`]: i32::wrapping_add",
+ "docs": "Calculates `self` + `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would have\noccurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5i8.overflowing_add(2), (7, false));\nassert_eq!(i8::MAX.overflowing_add(1), (i8::MIN, true));\n```",
"id": 10333,
"inner": {
"function": {
@@ -27142,7 +25750,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -27155,29 +25763,33 @@
[
"rhs",
{
- "primitive": "i32"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "tuple": [
+ {
+ "primitive": "i8"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
- "links": {
- "i32::checked_add": 10330,
- "i32::wrapping_add": 10332
- },
- "name": "unchecked_add",
+ "links": {},
+ "name": "overflowing_add",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -27187,10 +25799,10 @@
"10334": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_bigint_helpers\"}}]"
},
{
"must_use": {
@@ -27200,7 +25812,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked addition with an unsigned integer. Computes `self + rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1i32.checked_add_unsigned(2), Some(3));\nassert_eq!((i32::MAX - 2).checked_add_unsigned(3), None);\n```",
+ "docs": "Calculates `self` + `rhs` + `carry` and returns a tuple containing\nthe sum and the output carry (in that order).\n\nPerforms \"ternary addition\" of two integer operands and a carry-in\nbit, and returns an output integer and a carry-out bit. This allows\nchaining together multiple additions to create a wider addition, and\ncan be useful for bignum addition.\n\nThis can be thought of as a 8-bit \"full adder\", in the electronics sense.\n\nIf the input carry is false, this method is equivalent to\n[`overflowing_add`](Self::overflowing_add), and the output carry is\nequal to the overflow flag. Note that although carry and overflow\nflags are similar for unsigned integers, they are different for\nsigned integers.\n\n# Examples\n\n```\n// 3 MAX (a = 3 × 2^8 + 2^8 - 1)\n// + 5 7 (b = 5 × 2^8 + 7)\n// ---------\n// 9 6 (sum = 9 × 2^8 + 6)\n\nlet (a1, a0): (u8, u8) = (3, u8::MAX);\nlet (b1, b0): (u8, u8) = (5, 7);\nlet carry0 = false;\n\nlet (sum0, carry1) = a0.carrying_add(b0, carry0);\nassert_eq!(carry1, true);\nlet (sum1, carry2) = a1.carrying_add(b1, carry1);\nassert_eq!(carry2, false);\n\nassert_eq!((sum1, sum0), (9, 6));\n```",
"id": 10334,
"inner": {
"function": {
@@ -27226,41 +25838,41 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "u8"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "bool"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i32"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "u8"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "checked_add_unsigned",
+ "links": {
+ "Self::overflowing_add": 11066
+ },
+ "name": "carrying_add",
"span": {
"begin": [
- 295,
+ 447,
5
],
"end": [
- 314,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -27270,23 +25882,17 @@
"10335": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict addition with an unsigned integer. Computes `self + rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1i32.strict_add_unsigned(2), 3);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i32::MAX - 2).strict_add_unsigned(3);\n```",
+ "docs": "Calculates `self` + `rhs` + `carry` and checks for overflow.\n\nPerforms \"ternary addition\" of two integer operands and a carry-in\nbit, and returns a tuple of the sum along with a boolean indicating\nwhether an arithmetic overflow would occur. On overflow, the wrapped\nvalue is returned.\n\nThis allows chaining together multiple additions to create a wider\naddition, and can be useful for bignum addition. This method should\nonly be used for the most significant word; for the less significant\nwords the unsigned method\n[`u8::carrying_add`]\nshould be used.\n\nThe output boolean returned by this method is *not* a carry flag,\nand should *not* be added to a more significant word.\n\nIf the input carry is false, this method is equivalent to\n[`overflowing_add`](Self::overflowing_add).\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n// Only the most significant word is signed.\n//\n// 10 MAX (a = 10 × 2^8 + 2^8 - 1)\n// + -5 9 (b = -5 × 2^8 + 9)\n// ---------\n// 6 8 (sum = 6 × 2^8 + 8)\n\nlet (a1, a0): (i8, u8) = (10, u8::MAX);\nlet (b1, b0): (i8, u8) = (-5, 9);\nlet carry0 = false;\n\n// u8::carrying_add for the less significant words\nlet (sum0, carry1) = a0.carrying_add(b0, carry0);\nassert_eq!(carry1, true);\n\n// i8::carrying_add for the most significant word\nlet (sum1, overflow) = a1.carrying_add(b1, carry1);\nassert_eq!(overflow, false);\n\nassert_eq!((sum1, sum0), (6, 8));\n```",
"id": 10335,
"inner": {
"function": {
@@ -27312,26 +25918,42 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i8"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "bool"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "tuple": [
+ {
+ "primitive": "i8"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "strict_add_unsigned",
+ "links": {
+ "Self::overflowing_add": 10333,
+ "`u8::carrying_add`": 10334
+ },
+ "name": "carrying_add",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -27341,10 +25963,10 @@
"10336": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -27354,7 +25976,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer subtraction. Computes `self - rhs`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!((i32::MIN + 2).checked_sub(1), Some(i32::MIN + 1));\nassert_eq!((i32::MIN + 2).checked_sub(3), None);\n```",
+ "docs": "Calculates `self` + `rhs` with an unsigned `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1i8.overflowing_add_unsigned(2), (3, false));\nassert_eq!((i8::MIN).overflowing_add_unsigned(u8::MAX), (i8::MAX, false));\nassert_eq!((i8::MAX - 2).overflowing_add_unsigned(3), (i8::MIN, true));\n```",
"id": 10336,
"inner": {
"function": {
@@ -27380,41 +26002,33 @@
[
"rhs",
{
- "primitive": "i32"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i32"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i8"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_sub",
+ "name": "overflowing_add_unsigned",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -27424,23 +26038,20 @@
"10337": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer subtraction. Computes `self - rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((i32::MIN + 2).strict_sub(1), i32::MIN + 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i32::MIN + 2).strict_sub(3);\n```",
+ "docs": "Calculates `self` - `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating whether an arithmetic overflow\nwould occur. If an overflow would have occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5i8.overflowing_sub(2), (3, false));\nassert_eq!(i8::MIN.overflowing_sub(1), (i8::MAX, true));\n```",
"id": 10337,
"inner": {
"function": {
@@ -27466,26 +26077,33 @@
[
"rhs",
{
- "primitive": "i32"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "tuple": [
+ {
+ "primitive": "i8"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "strict_sub",
+ "name": "overflowing_sub",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -27495,10 +26113,10 @@
"10338": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_bigint_helpers\"}}]"
},
{
"must_use": {
@@ -27508,7 +26126,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) subtraction. Computes `self - rhs`, wrapping around at the\nboundary of the type.\n\n# Examples\n\n```\nassert_eq!(0i32.wrapping_sub(127), -127);\nassert_eq!((-2i32).wrapping_sub(i32::MAX), i32::MAX);\n```",
+ "docs": "Calculates `self` − `rhs` − `borrow` and returns a tuple\ncontaining the difference and the output borrow.\n\nPerforms \"ternary subtraction\" by subtracting both an integer\noperand and a borrow-in bit from `self`, and returns an output\ninteger and a borrow-out bit. This allows chaining together multiple\nsubtractions to create a wider subtraction, and can be useful for\nbignum subtraction.\n\n# Examples\n\n```\n// 9 6 (a = 9 × 2^8 + 6)\n// - 5 7 (b = 5 × 2^8 + 7)\n// ---------\n// 3 MAX (diff = 3 × 2^8 + 2^8 - 1)\n\nlet (a1, a0): (u8, u8) = (9, 6);\nlet (b1, b0): (u8, u8) = (5, 7);\nlet borrow0 = false;\n\nlet (diff0, borrow1) = a0.borrowing_sub(b0, borrow0);\nassert_eq!(borrow1, true);\nlet (diff1, borrow2) = a1.borrowing_sub(b1, borrow1);\nassert_eq!(borrow2, false);\n\nassert_eq!((diff1, diff0), (3, u8::MAX));\n```",
"id": 10338,
"inner": {
"function": {
@@ -27534,26 +26152,39 @@
[
"rhs",
{
- "primitive": "i32"
+ "primitive": "u8"
+ }
+ ],
+ [
+ "borrow",
+ {
+ "primitive": "bool"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "tuple": [
+ {
+ "primitive": "u8"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "wrapping_sub",
+ "name": "borrowing_sub",
"span": {
"begin": [
- 295,
+ 447,
5
],
"end": [
- 314,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -27563,23 +26194,17 @@
"10339": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer subtraction. Computes `self - rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_sub(y)` is semantically equivalent to calling\n`x.`[`checked_sub`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_sub`].\n\n# Safety\n\nThis results in undefined behavior when\n`self - rhs > i32::MAX` or `self - rhs < i32::MIN`,\ni.e. when [`checked_sub`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_sub`]: i32::checked_sub\n[`wrapping_sub`]: i32::wrapping_sub",
+ "docs": "Calculates `self` − `rhs` − `borrow` and checks for\noverflow.\n\nPerforms \"ternary subtraction\" by subtracting both an integer\noperand and a borrow-in bit from `self`, and returns a tuple of the\ndifference along with a boolean indicating whether an arithmetic\noverflow would occur. On overflow, the wrapped value is returned.\n\nThis allows chaining together multiple subtractions to create a\nwider subtraction, and can be useful for bignum subtraction. This\nmethod should only be used for the most significant word; for the\nless significant words the unsigned method\n[`u8::borrowing_sub`]\nshould be used.\n\nThe output boolean returned by this method is *not* a borrow flag,\nand should *not* be subtracted from a more significant word.\n\nIf the input borrow is false, this method is equivalent to\n[`overflowing_sub`](Self::overflowing_sub).\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n// Only the most significant word is signed.\n//\n// 6 8 (a = 6 × 2^8 + 8)\n// - -5 9 (b = -5 × 2^8 + 9)\n// ---------\n// 10 MAX (diff = 10 × 2^8 + 2^8 - 1)\n\nlet (a1, a0): (i8, u8) = (6, 8);\nlet (b1, b0): (i8, u8) = (-5, 9);\nlet borrow0 = false;\n\n// u8::borrowing_sub for the less significant words\nlet (diff0, borrow1) = a0.borrowing_sub(b0, borrow0);\nassert_eq!(borrow1, true);\n\n// i8::borrowing_sub for the most significant word\nlet (diff1, overflow) = a1.borrowing_sub(b1, borrow1);\nassert_eq!(overflow, false);\n\nassert_eq!((diff1, diff0), (10, u8::MAX));\n```",
"id": 10339,
"inner": {
"function": {
@@ -27592,7 +26217,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -27605,29 +26230,42 @@
[
"rhs",
{
- "primitive": "i32"
+ "primitive": "i8"
+ }
+ ],
+ [
+ "borrow",
+ {
+ "primitive": "bool"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "tuple": [
+ {
+ "primitive": "i8"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {
- "i32::checked_sub": 10336,
- "i32::wrapping_sub": 10338
+ "Self::overflowing_sub": 10337,
+ "`u8::borrowing_sub`": 10338
},
- "name": "unchecked_sub",
+ "name": "borrowing_sub",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -27738,7 +26376,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -27763,11 +26401,11 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -27790,7 +26428,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked subtraction with an unsigned integer. Computes `self - rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1i32.checked_sub_unsigned(2), Some(-1));\nassert_eq!((i32::MIN + 2).checked_sub_unsigned(3), None);\n```",
+ "docs": "Calculates `self` - `rhs` with an unsigned `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1i8.overflowing_sub_unsigned(2), (-1, false));\nassert_eq!((i8::MAX).overflowing_sub_unsigned(u8::MAX), (i8::MIN, false));\nassert_eq!((i8::MIN + 2).overflowing_sub_unsigned(3), (i8::MAX, true));\n```",
"id": 10340,
"inner": {
"function": {
@@ -27816,41 +26454,33 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i32"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i8"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_sub_unsigned",
+ "name": "overflowing_sub_unsigned",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -27860,23 +26490,20 @@
"10341": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict subtraction with an unsigned integer. Computes `self - rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1i32.strict_sub_unsigned(2), -1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i32::MIN + 2).strict_sub_unsigned(3);\n```",
+ "docs": "Calculates the multiplication of `self` and `rhs`.\n\nReturns a tuple of the multiplication along with a boolean indicating whether an arithmetic overflow\nwould occur. If an overflow would have occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5i8.overflowing_mul(2), (10, false));\nassert_eq!(1_000_000_000i32.overflowing_mul(10), (1410065408, true));\n```",
"id": 10341,
"inner": {
"function": {
@@ -27902,26 +26529,33 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "tuple": [
+ {
+ "primitive": "i8"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "strict_sub_unsigned",
+ "name": "overflowing_mul",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -27931,10 +26565,10 @@
"10342": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
},
{
"must_use": {
@@ -27944,7 +26578,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer multiplication. Computes `self * rhs`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(i32::MAX.checked_mul(1), Some(i32::MAX));\nassert_eq!(i32::MAX.checked_mul(2), None);\n```",
+ "docs": "Calculates the \"full multiplication\" `self * rhs + carry`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need the `carry`, then you can use [`Self::widening_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.carrying_mul(-2, 0), (4294967286, -1));\nassert_eq!(5i32.carrying_mul(-2, 10), (0, 0));\nassert_eq!(1_000_000_000i32.carrying_mul(-10, 0), (2884901888, -3));\nassert_eq!(1_000_000_000i32.carrying_mul(-10, 10), (2884901898, -3));\nassert_eq!(i8::MAX.carrying_mul(i8::MAX, i8::MAX), (i8::MAX.unsigned_abs() + 1, i8::MAX / 2));\n```",
"id": 10342,
"inner": {
"function": {
@@ -27970,41 +26604,41 @@
[
"rhs",
{
- "primitive": "i32"
+ "primitive": "i8"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i32"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "u8"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "i8"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "checked_mul",
+ "links": {
+ "`Self::widening_mul`": 10343
+ },
+ "name": "carrying_mul",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -28014,23 +26648,20 @@
"10343": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer multiplication. Computes `self * rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(i32::MAX.strict_mul(1), i32::MAX);\n```\n\nThe following panics because of overflow:\n\n``` should_panic\nlet _ = i32::MAX.strict_mul(2);\n```",
+ "docs": "Calculates the complete product `self * rhs` without the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nIf you also need to add a carry to the wide result, then you want\n[`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.widening_mul(-2), (4294967286, -1));\nassert_eq!(1_000_000_000i32.widening_mul(-10), (2884901888, -3));\n```",
"id": 10343,
"inner": {
"function": {
@@ -28056,26 +26687,35 @@
[
"rhs",
{
- "primitive": "i32"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "tuple": [
+ {
+ "primitive": "u8"
+ },
+ {
+ "primitive": "i8"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "strict_mul",
+ "links": {
+ "`Self::carrying_mul`": 10342
+ },
+ "name": "widening_mul",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -28085,10 +26725,10 @@
"10344": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
},
{
"must_use": {
@@ -28098,7 +26738,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) multiplication. Computes `self * rhs`, wrapping around at\nthe boundary of the type.\n\n# Examples\n\n```\nassert_eq!(10i32.wrapping_mul(12), 120);\nassert_eq!(11i8.wrapping_mul(12), -124);\n```",
+ "docs": "Calculates the \"full multiplication\" `self * rhs + carry1 + carry2`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need either `carry`, then you can use [`Self::widening_mul`] instead,\nand if you only need one `carry`, then you can use [`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.carrying_mul_add(-2, 0, 0), (4294967286, -1));\nassert_eq!(5i32.carrying_mul_add(-2, 10, 10), (10, 0));\nassert_eq!(1_000_000_000i32.carrying_mul_add(-10, 0, 0), (2884901888, -3));\nassert_eq!(1_000_000_000i32.carrying_mul_add(-10, 10, 10), (2884901908, -3));\nassert_eq!(i8::MAX.carrying_mul_add(i8::MAX, i8::MAX, i8::MAX), (u8::MAX, i8::MAX / 2));\n```",
"id": 10344,
"inner": {
"function": {
@@ -28124,26 +26764,48 @@
[
"rhs",
{
- "primitive": "i32"
+ "primitive": "i8"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "i8"
+ }
+ ],
+ [
+ "add",
+ {
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "tuple": [
+ {
+ "primitive": "u8"
+ },
+ {
+ "primitive": "i8"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "wrapping_mul",
+ "links": {
+ "`Self::carrying_mul`": 10342,
+ "`Self::widening_mul`": 10343
+ },
+ "name": "carrying_mul_add",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -28153,23 +26815,20 @@
"10345": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer multiplication. Computes `self * rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_mul(y)` is semantically equivalent to calling\n`x.`[`checked_mul`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_mul`].\n\n# Safety\n\nThis results in undefined behavior when\n`self * rhs > i32::MAX` or `self * rhs < i32::MIN`,\ni.e. when [`checked_mul`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_mul`]: i32::checked_mul\n[`wrapping_mul`]: i32::wrapping_mul",
+ "docs": "Calculates the divisor when `self` is divided by `rhs`.\n\nReturns a tuple of the divisor along with a boolean indicating whether an arithmetic overflow would\noccur. If an overflow would occur then self is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i8.overflowing_div(2), (2, false));\nassert_eq!(i8::MIN.overflowing_div(-1), (i8::MIN, true));\n```",
"id": 10345,
"inner": {
"function": {
@@ -28182,7 +26841,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -28195,29 +26854,33 @@
[
"rhs",
{
- "primitive": "i32"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "tuple": [
+ {
+ "primitive": "i8"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
- "links": {
- "i32::checked_mul": 10342,
- "i32::wrapping_mul": 10344
- },
- "name": "unchecked_mul",
+ "links": {},
+ "name": "overflowing_div",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -28227,10 +26890,10 @@
"10346": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -28240,7 +26903,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division. Computes `self / rhs`, returning `None` if `rhs == 0`\nor the division results in overflow.\n\n# Examples\n\n```\nassert_eq!((i32::MIN + 1).checked_div(-1), Some(2147483647));\nassert_eq!(i32::MIN.checked_div(-1), None);\nassert_eq!((1i32).checked_div(0), None);\n```",
+ "docs": "Calculates the quotient of Euclidean division `self.div_euclid(rhs)`.\n\nReturns a tuple of the divisor along with a boolean indicating whether an arithmetic overflow would\noccur. If an overflow would occur then `self` is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i8.overflowing_div_euclid(2), (2, false));\nassert_eq!(i8::MIN.overflowing_div_euclid(-1), (i8::MIN, true));\n```",
"id": 10346,
"inner": {
"function": {
@@ -28266,41 +26929,33 @@
[
"rhs",
{
- "primitive": "i32"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i32"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i8"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_div",
+ "name": "overflowing_div_euclid",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -28310,23 +26965,20 @@
"10347": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer division. Computes `self / rhs`, panicking\nif overflow occurred.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type.\n\n# Examples\n\n```\nassert_eq!((i32::MIN + 1).strict_div(-1), 2147483647);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i32::MIN.strict_div(-1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1i32).strict_div(0);\n```",
+ "docs": "Calculates the remainder when `self` is divided by `rhs`.\n\nReturns a tuple of the remainder after dividing along with a boolean indicating whether an\narithmetic overflow would occur. If an overflow would occur then 0 is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i8.overflowing_rem(2), (1, false));\nassert_eq!(i8::MIN.overflowing_rem(-1), (0, true));\n```",
"id": 10347,
"inner": {
"function": {
@@ -28352,26 +27004,33 @@
[
"rhs",
{
- "primitive": "i32"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "tuple": [
+ {
+ "primitive": "i8"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "strict_div",
+ "name": "overflowing_rem",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -28390,11 +27049,14 @@
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked Euclidean division. Computes `self.div_euclid(rhs)`,\nreturning `None` if `rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!((i32::MIN + 1).checked_div_euclid(-1), Some(2147483647));\nassert_eq!(i32::MIN.checked_div_euclid(-1), None);\nassert_eq!((1i32).checked_div_euclid(0), None);\n```",
+ "docs": "Overflowing Euclidean remainder. Calculates `self.rem_euclid(rhs)`.\n\nReturns a tuple of the remainder after dividing along with a boolean indicating whether an\narithmetic overflow would occur. If an overflow would occur then 0 is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i8.overflowing_rem_euclid(2), (1, false));\nassert_eq!(i8::MIN.overflowing_rem_euclid(-1), (0, true));\n```",
"id": 10348,
"inner": {
"function": {
@@ -28420,41 +27082,33 @@
[
"rhs",
{
- "primitive": "i32"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i32"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i8"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_div_euclid",
+ "name": "overflowing_rem_euclid",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -28464,23 +27118,20 @@
"10349": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict Euclidean division. Computes `self.div_euclid(rhs)`, panicking\nif overflow occurred.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type.\n\n# Examples\n\n```\nassert_eq!((i32::MIN + 1).strict_div_euclid(-1), 2147483647);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i32::MIN.strict_div_euclid(-1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1i32).strict_div_euclid(0);\n```",
+ "docs": "Negates self, overflowing if this is equal to the minimum value.\n\nReturns a tuple of the negated version of self along with a boolean indicating whether an overflow\nhappened. If `self` is the minimum value (e.g., `i32::MIN` for values of type `i32`), then the\nminimum value will be returned again and `true` will be returned for an overflow happening.\n\n# Examples\n\n```\nassert_eq!(2i8.overflowing_neg(), (-2, false));\nassert_eq!(i8::MIN.overflowing_neg(), (i8::MIN, true));\n```",
"id": 10349,
"inner": {
"function": {
@@ -28502,30 +27153,31 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "tuple": [
+ {
+ "primitive": "i8"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "strict_div_euclid",
+ "name": "overflowing_neg",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -28593,7 +27245,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -28618,11 +27270,11 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -28632,7 +27284,10 @@
"10350": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -28642,7 +27297,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division without remainder. Computes `self / rhs`,\nreturning `None` if `rhs == 0`, the division results in overflow,\nor `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!((i32::MIN + 1).checked_exact_div(-1), Some(2147483647));\nassert_eq!((-5i32).checked_exact_div(2), None);\nassert_eq!(i32::MIN.checked_exact_div(-1), None);\nassert_eq!((1i32).checked_exact_div(0), None);\n```",
+ "docs": "Shifts self left by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean indicating whether the shift\nvalue was larger than or equal to the number of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then used to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x1i8.overflowing_shl(4), (0x10, false));\nassert_eq!(0x1i32.overflowing_shl(36), (0x10, true));\nassert_eq!(0x10i8.overflowing_shl(7), (0, false));\n```",
"id": 10350,
"inner": {
"function": {
@@ -28668,41 +27323,33 @@
[
"rhs",
{
- "primitive": "i32"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i32"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i8"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_exact_div",
+ "name": "overflowing_shl",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -28712,7 +27359,10 @@
"10351": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -28722,7 +27372,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division without remainder. Computes `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs == 0`, the division results in overflow,\nor `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64i32.exact_div(2), 32);\nassert_eq!(64i32.exact_div(32), 2);\nassert_eq!((i32::MIN + 1).exact_div(-1), 2147483647);\n```\n\n```should_panic\n#![feature(exact_div)]\nlet _ = 65i32.exact_div(2);\n```\n```should_panic\n#![feature(exact_div)]\nlet _ = i32::MIN.exact_div(-1);\n```",
+ "docs": "Shifts self right by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean indicating whether the shift\nvalue was larger than or equal to the number of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then used to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x10i8.overflowing_shr(4), (0x1, false));\nassert_eq!(0x10i32.overflowing_shr(36), (0x1, true));\n```",
"id": 10351,
"inner": {
"function": {
@@ -28748,26 +27398,33 @@
[
"rhs",
{
- "primitive": "i32"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "tuple": [
+ {
+ "primitive": "i8"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "exact_div",
+ "name": "overflowing_shr",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -28777,7 +27434,10 @@
"10352": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
},
{
"must_use": {
@@ -28787,7 +27447,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer division without remainder. Computes `self / rhs`.\n\n# Safety\n\nThis results in undefined behavior when `rhs == 0`, `self % rhs != 0`, or\n`self == i32::MIN && rhs == -1`,\ni.e. when [`checked_exact_div`](Self::checked_exact_div) would return `None`.",
+ "docs": "Computes the absolute value of `self`.\n\nReturns a tuple of the absolute version of self along with a boolean indicating whether an overflow\nhappened. If self is the minimum value\n(e.g., i8::MIN for values of type i8),\nthen the minimum value will be returned again and true will be returned\nfor an overflow happening.\n\n# Examples\n\n```\nassert_eq!(10i8.overflowing_abs(), (10, false));\nassert_eq!((-10i8).overflowing_abs(), (10, false));\nassert_eq!((i8::MIN).overflowing_abs(), (i8::MIN, true));\n```",
"id": 10352,
"inner": {
"function": {
@@ -28800,7 +27460,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -28809,32 +27469,31 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "tuple": [
+ {
+ "primitive": "i8"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
- "links": {
- "Self::checked_exact_div": 10350
- },
- "name": "unchecked_exact_div",
+ "links": {},
+ "name": "overflowing_abs",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -28844,10 +27503,10 @@
"10353": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
@@ -28857,7 +27516,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer remainder. Computes `self % rhs`, returning `None` if\n`rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!(5i32.checked_rem(2), Some(1));\nassert_eq!(5i32.checked_rem(0), None);\nassert_eq!(i32::MIN.checked_rem(-1), None);\n```",
+ "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\nReturns a tuple of the exponentiation along with a bool indicating\nwhether an overflow happened.\n\n# Examples\n\n```\nassert_eq!(3i8.overflowing_pow(4), (81, false));\nassert_eq!(3i8.overflowing_pow(5), (-13, true));\n```",
"id": 10353,
"inner": {
"function": {
@@ -28881,43 +27540,35 @@
}
],
[
- "rhs",
+ "exp",
{
- "primitive": "i32"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i32"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i8"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_rem",
+ "name": "overflowing_pow",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -28927,23 +27578,20 @@
"10354": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer remainder. Computes `self % rhs`, panicking if\nthe division results in overflow.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is `x % y` for `MIN / -1` on a\nsigned type (where `MIN` is the negative minimal value), which is invalid due to implementation artifacts.\n\n# Examples\n\n```\nassert_eq!(5i32.strict_rem(2), 1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5i32.strict_rem(0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i32::MIN.strict_rem(-1);\n```",
+ "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\n# Examples\n\n```\nlet x: i8 = 2; // or any other integer type\n\nassert_eq!(x.pow(5), 32);\n```",
"id": 10354,
"inner": {
"function": {
@@ -28967,28 +27615,28 @@
}
],
[
- "rhs",
+ "exp",
{
- "primitive": "i32"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "strict_rem",
+ "name": "pow",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -28998,20 +27646,23 @@
"10355": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked Euclidean remainder. Computes `self.rem_euclid(rhs)`, returning `None`\nif `rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!(5i32.checked_rem_euclid(2), Some(1));\nassert_eq!(5i32.checked_rem_euclid(0), None);\nassert_eq!(i32::MIN.checked_rem_euclid(-1), None);\n```",
+ "docs": "Returns the square root of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is negative.\n\n# Examples\n\n```\nassert_eq!(10i8.isqrt(), 3);\n```",
"id": 10355,
"inner": {
"function": {
@@ -29033,45 +27684,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i32"
- }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "checked_rem_euclid",
+ "name": "isqrt",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -29081,10 +27711,10 @@
"10356": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -29097,7 +27727,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict Euclidean remainder. Computes `self.rem_euclid(rhs)`, panicking if\nthe division results in overflow.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is `x % y` for `MIN / -1` on a\nsigned type (where `MIN` is the negative minimal value), which is invalid due to implementation artifacts.\n\n# Examples\n\n```\nassert_eq!(5i32.strict_rem_euclid(2), 1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5i32.strict_rem_euclid(0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i32::MIN.strict_rem_euclid(-1);\n```",
+ "docs": "Calculates the quotient of Euclidean division of `self` by `rhs`.\n\nThis computes the integer `q` such that `self = q * rhs + r`, with\n`r = self.rem_euclid(rhs)` and `0 <= r < abs(rhs)`.\n\nIn other words, the result is `self / rhs` rounded to the integer `q`\nsuch that `self >= q * rhs`.\nIf `self > 0`, this is equal to rounding towards zero (the default in Rust);\nif `self < 0`, this is equal to rounding away from zero (towards +/- infinity).\nIf `rhs > 0`, this is equal to rounding towards -infinity;\nif `rhs < 0`, this is equal to rounding towards +infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\nlet a: i8 = 7; // or any other integer type\nlet b = 4;\n\nassert_eq!(a.div_euclid(b), 1); // 7 >= 4 * 1\nassert_eq!(a.div_euclid(-b), -1); // 7 >= -4 * -1\nassert_eq!((-a).div_euclid(b), -2); // -7 >= 4 * -2\nassert_eq!((-a).div_euclid(-b), 2); // -7 >= -4 * 2\n```",
"id": 10356,
"inner": {
"function": {
@@ -29123,26 +27753,26 @@
[
"rhs",
{
- "primitive": "i32"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "strict_rem_euclid",
+ "name": "div_euclid",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -29152,20 +27782,26 @@
"10357": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[doc(alias = \"modulo\", alias = \"mod\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked negation. Computes `-self`, returning `None` if `self == MIN`.\n\n# Examples\n\n```\nassert_eq!(5i32.checked_neg(), Some(-5));\nassert_eq!(i32::MIN.checked_neg(), None);\n```",
+ "docs": "Calculates the least nonnegative remainder of `self (mod rhs)`.\n\nThis is done as if by the Euclidean division algorithm -- given\n`r = self.rem_euclid(rhs)`, the result satisfies\n`self = rhs * self.div_euclid(rhs) + r` and `0 <= r < abs(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN` and\n`rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\nlet a: i8 = 7; // or any other integer type\nlet b = 4;\n\nassert_eq!(a.rem_euclid(b), 3);\nassert_eq!((-a).rem_euclid(b), 1);\nassert_eq!(a.rem_euclid(-b), 3);\nassert_eq!((-a).rem_euclid(-b), 1);\n```\n\nThis will panic:\n```should_panic\nlet _ = i8::MIN.rem_euclid(-1);\n```",
"id": 10357,
"inner": {
"function": {
@@ -29187,39 +27823,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "checked_neg",
+ "name": "rem_euclid",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -29229,7 +27856,7 @@
"10358": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_neg\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
},
{
"must_use": {
@@ -29242,7 +27869,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked negation. Computes `-self`, assuming overflow cannot occur.\n\n# Safety\n\nThis results in undefined behavior when\n`self == i32::MIN`,\ni.e. when [`checked_neg`] would return `None`.\n\n[`checked_neg`]: i32::checked_neg",
+ "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards negative infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nlet a: i8 = 8;\nlet b = 3;\n\nassert_eq!(a.div_floor(b), 2);\nassert_eq!(a.div_floor(-b), -3);\nassert_eq!((-a).div_floor(b), -3);\nassert_eq!((-a).div_floor(-b), 2);\n```",
"id": 10358,
"inner": {
"function": {
@@ -29255,7 +27882,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -29264,26 +27891,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i8"
}
}
}
},
- "links": {
- "i32::checked_neg": 10357
- },
- "name": "unchecked_neg",
+ "links": {},
+ "name": "div_floor",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -29293,10 +27924,7 @@
"10359": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
},
{
"must_use": {
@@ -29309,7 +27937,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict negation. Computes `-self`, panicking if `self == MIN`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(5i32.strict_neg(), -5);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i32::MIN.strict_neg();\n",
+ "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards positive infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nlet a: i8 = 8;\nlet b = 3;\n\nassert_eq!(a.div_ceil(b), 3);\nassert_eq!(a.div_ceil(-b), -2);\nassert_eq!((-a).div_ceil(b), -2);\nassert_eq!((-a).div_ceil(-b), 3);\n```",
"id": 10359,
"inner": {
"function": {
@@ -29331,24 +27959,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "strict_neg",
+ "name": "div_ceil",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -29441,7 +28075,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -29459,8 +28093,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -29476,7 +28110,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -29485,11 +28119,11 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -29499,10 +28133,7 @@
"10360": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
},
{
"must_use": {
@@ -29512,7 +28143,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked shift left. Computes `self << rhs`, returning `None` if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x1i32.checked_shl(4), Some(0x10));\nassert_eq!(0x1i32.checked_shl(129), None);\nassert_eq!(0x10i32.checked_shl(31), Some(0));\n```",
+ "docs": "If `rhs` is positive, calculates the smallest value greater than or\nequal to `self` that is a multiple of `rhs`. If `rhs` is negative,\ncalculates the largest value less than or equal to `self` that is a\nmultiple of `rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nOn overflow, this function will panic if overflow checks are enabled (default in debug\nmode) and wrap if overflow checks are disabled (default in release mode).\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(16_i8.next_multiple_of(8), 16);\nassert_eq!(23_i8.next_multiple_of(8), 24);\nassert_eq!(16_i8.next_multiple_of(-8), 16);\nassert_eq!(23_i8.next_multiple_of(-8), 16);\nassert_eq!((-16_i8).next_multiple_of(8), -16);\nassert_eq!((-23_i8).next_multiple_of(8), -16);\nassert_eq!((-16_i8).next_multiple_of(-8), -16);\nassert_eq!((-23_i8).next_multiple_of(-8), -24);\n```",
"id": 10360,
"inner": {
"function": {
@@ -29538,41 +28169,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "checked_shl",
+ "name": "next_multiple_of",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -29582,23 +28198,17 @@
"10361": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict shift left. Computes `self << rhs`, panicking if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x1i32.strict_shl(4), 0x10);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x1i32.strict_shl(129);\n```",
+ "docs": "If `rhs` is positive, calculates the smallest value greater than or\nequal to `self` that is a multiple of `rhs`. If `rhs` is negative,\ncalculates the largest value less than or equal to `self` that is a\nmultiple of `rhs`. Returns `None` if `rhs` is zero or the operation\nwould result in overflow.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(16_i8.checked_next_multiple_of(8), Some(16));\nassert_eq!(23_i8.checked_next_multiple_of(8), Some(24));\nassert_eq!(16_i8.checked_next_multiple_of(-8), Some(16));\nassert_eq!(23_i8.checked_next_multiple_of(-8), Some(16));\nassert_eq!((-16_i8).checked_next_multiple_of(8), Some(-16));\nassert_eq!((-23_i8).checked_next_multiple_of(8), Some(-16));\nassert_eq!((-16_i8).checked_next_multiple_of(-8), Some(-16));\nassert_eq!((-23_i8).checked_next_multiple_of(-8), Some(-24));\nassert_eq!(1_i8.checked_next_multiple_of(0), None);\nassert_eq!(i8::MAX.checked_next_multiple_of(2), None);\n```",
"id": 10361,
"inner": {
"function": {
@@ -29624,26 +28234,41 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i8"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "strict_shl",
+ "name": "checked_next_multiple_of",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -29653,7 +28278,10 @@
"10362": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
@@ -29666,7 +28294,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked shift left. Computes `self << rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shl`] would return `None`.\n\n[`checked_shl`]: i32::checked_shl",
+ "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nThis method might not be optimized owing to implementation details;\n`ilog2` can produce results more efficiently for base 2, and `ilog10`\ncan produce results more efficiently for base 10.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero,\nor if `base` is less than 2.\n\n# Examples\n\n```\nassert_eq!(5i8.ilog(5), 1);\n```",
"id": 10362,
"inner": {
"function": {
@@ -29679,7 +28307,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -29690,30 +28318,28 @@
}
],
[
- "rhs",
+ "base",
{
- "primitive": "u32"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "u32"
}
}
}
},
- "links": {
- "i32::checked_shl": 10360
- },
- "name": "unchecked_shl",
+ "links": {},
+ "name": "ilog",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -29723,20 +28349,23 @@
"10363": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x1i32.unbounded_shl(4), 0x10);\nassert_eq!(0x1i32.unbounded_shl(129), 0);\n```",
+ "docs": "Returns the base 10 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero.\n\n# Example\n\n```\nassert_eq!(10i8.ilog10(), 1);\n```",
"id": 10363,
"inner": {
"function": {
@@ -29758,30 +28387,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "unbounded_shl",
+ "name": "ilog10",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -29791,10 +28414,10 @@
"10364": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
@@ -29804,7 +28427,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked shift right. Computes `self >> rhs`, returning `None` if `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x10i32.checked_shr(4), Some(0x1));\nassert_eq!(0x10i32.checked_shr(128), None);\n```",
+ "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nReturns `None` if the number is negative or zero, or if the base is not at least 2.\n\nThis method might not be optimized owing to implementation details;\n`checked_ilog2` can produce results more efficiently for base 2, and\n`checked_ilog10` can produce results more efficiently for base 10.\n\n# Examples\n\n```\nassert_eq!(5i8.checked_ilog(5), Some(1));\n```",
"id": 10364,
"inner": {
"function": {
@@ -29828,9 +28451,9 @@
}
],
[
- "rhs",
+ "base",
{
- "primitive": "u32"
+ "primitive": "i8"
}
]
],
@@ -29842,7 +28465,7 @@
"args": [
{
"type": {
- "primitive": "i32"
+ "primitive": "u32"
}
}
],
@@ -29857,14 +28480,14 @@
}
},
"links": {},
- "name": "checked_shr",
+ "name": "checked_ilog",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -29874,23 +28497,20 @@
"10365": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict shift right. Computes `self >> rhs`, panicking `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x10i32.strict_shr(4), 0x1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10i32.strict_shr(128);\n```",
+ "docs": "Returns the base 2 logarithm of the number, rounded down.\n\nReturns `None` if the number is negative or zero.\n\n# Examples\n\n```\nassert_eq!(2i8.checked_ilog2(), Some(1));\n```",
"id": 10365,
"inner": {
"function": {
@@ -29912,30 +28532,39 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "strict_shr",
+ "name": "checked_ilog2",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -29945,20 +28574,20 @@
"10366": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked shift right. Computes `self >> rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shr`] would return `None`.\n\n[`checked_shr`]: i32::checked_shr",
+ "docs": "Returns the base 10 logarithm of the number, rounded down.\n\nReturns `None` if the number is negative or zero.\n\n# Example\n\n```\nassert_eq!(10i8.checked_ilog10(), Some(1));\n```",
"id": 10366,
"inner": {
"function": {
@@ -29971,7 +28600,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -29980,32 +28609,39 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
- "links": {
- "i32::checked_shr": 10364
- },
- "name": "unchecked_shr",
+ "links": {},
+ "name": "checked_ilog10",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -30015,10 +28651,10 @@
"10367": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -30028,7 +28664,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, which yields `0` for a positive number,\nand `-1` for a negative number.\n\n# Examples\n\n```\nassert_eq!(0x10i32.unbounded_shr(4), 0x1);\nassert_eq!(0x10i32.unbounded_shr(129), 0);\nassert_eq!(i32::MIN.unbounded_shr(129), -1);\n```",
+ "docs": "Computes the absolute value of `self`.\n\n# Overflow behavior\n\nThe absolute value of\n`i8::MIN`\ncannot be represented as an\n`i8`,\nand attempting to calculate it will cause an overflow. This means\nthat code in debug mode will trigger a panic on this case and\noptimized code will return\n`i8::MIN`\nwithout a panic. If you do not want this behavior, consider\nusing [`unsigned_abs`](Self::unsigned_abs) instead.\n\n# Examples\n\n```\nassert_eq!(10i8.abs(), 10);\nassert_eq!((-10i8).abs(), 10);\n```",
"id": 10367,
"inner": {
"function": {
@@ -30050,30 +28686,26 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i8"
}
}
}
},
- "links": {},
- "name": "unbounded_shr",
+ "links": {
+ "Self::unsigned_abs": 10331
+ },
+ "name": "abs",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -30083,10 +28715,10 @@
"10368": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\"}}]"
},
{
"must_use": {
@@ -30096,7 +28728,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked absolute value. Computes `self.abs()`, returning `None` if\n`self == MIN`.\n\n# Examples\n\n```\nassert_eq!((-5i32).checked_abs(), Some(5));\nassert_eq!(i32::MIN.checked_abs(), None);\n```",
+ "docs": "Computes the absolute difference between `self` and `other`.\n\nThis function always returns the correct answer without overflow or\npanics by returning an unsigned integer.\n\n# Examples\n\n```\nassert_eq!(100i8.abs_diff(80), 20u8);\nassert_eq!(100i8.abs_diff(110), 10u8);\nassert_eq!((-100i8).abs_diff(80), 180u8);\nassert_eq!((-100i8).abs_diff(-120), 20u8);\nassert_eq!(i8::MIN.abs_diff(i8::MAX), u8::MAX);\n```",
"id": 10368,
"inner": {
"function": {
@@ -30118,39 +28750,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "other",
+ {
+ "primitive": "i8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "checked_abs",
+ "name": "abs_diff",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -30160,23 +28783,20 @@
"10369": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_int_sign\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict absolute value. Computes `self.abs()`, panicking if\n`self == MIN`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((-5i32).strict_abs(), 5);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i32::MIN.strict_abs();\n```",
+ "docs": "Returns a number representing sign of `self`.\n\n - `0` if the number is zero\n - `1` if the number is positive\n - `-1` if the number is negative\n\n# Examples\n\n```\nassert_eq!(10i8.signum(), 1);\nassert_eq!(0i8.signum(), 0);\nassert_eq!((-10i8).signum(), -1);\n```",
"id": 10369,
"inner": {
"function": {
@@ -30202,20 +28822,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "strict_abs",
+ "name": "signum",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -30326,8 +28946,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -30343,7 +28963,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -30352,11 +28972,11 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -30366,20 +28986,20 @@
"10370": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked exponentiation. Computes `self.pow(exp)`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(8i32.checked_pow(2), Some(64));\nassert_eq!(i32::MAX.checked_pow(2), None);\n```",
+ "docs": "Returns `true` if `self` is positive and `false` if the number is zero or\nnegative.\n\n# Examples\n\n```\nassert!(10i8.is_positive());\nassert!(!(-10i8).is_positive());\n```",
"id": 10370,
"inner": {
"function": {
@@ -30401,45 +29021,24 @@
{
"generic": "Self"
}
- ],
- [
- "exp",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "checked_pow",
+ "name": "is_positive",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -30449,23 +29048,20 @@
"10371": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict exponentiation. Computes `self.pow(exp)`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(8i32.strict_pow(2), 64);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i32::MAX.strict_pow(2);\n```",
+ "docs": "Returns `true` if `self` is negative and `false` if the number is zero or\npositive.\n\n# Examples\n\n```\nassert!((-10i8).is_negative());\nassert!(!10i8.is_negative());\n```",
"id": 10371,
"inner": {
"function": {
@@ -30487,30 +29083,24 @@
{
"generic": "Self"
}
- ],
- [
- "exp",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "strict_pow",
+ "name": "is_negative",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -30520,10 +29110,10 @@
"10372": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\"}}]"
},
{
"must_use": {
@@ -30533,7 +29123,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the square root of the number, rounded down.\n\nReturns `None` if `self` is negative.\n\n# Examples\n\n```\nassert_eq!(10i32.checked_isqrt(), Some(3));\n```",
+ "docs": "Returns the bit pattern of `self` reinterpreted as a signed integer of the same size.\n\nThis produces the same result as an `as` cast, but ensures that the bit-width remains\nthe same.\n\n# Examples\n\n```\nlet n = u8::MAX;\n\nassert_eq!(n.cast_signed(), -1i8);\n```",
"id": 10372,
"inner": {
"function": {
@@ -30559,35 +29149,20 @@
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "checked_isqrt",
+ "name": "cast_signed",
"span": {
"begin": [
- 295,
+ 447,
5
],
"end": [
- 314,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -30597,10 +29172,10 @@
"10373": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
@@ -30610,7 +29185,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer addition. Computes `self + rhs`, saturating at the numeric\nbounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i32.saturating_add(1), 101);\nassert_eq!(i32::MAX.saturating_add(100), i32::MAX);\nassert_eq!(i32::MIN.saturating_add(-1), i32::MIN);\n```",
+ "docs": "Returns the memory representation of this integer as a byte array in\nbig-endian (network) byte order.\n\n\n**Note**: This function is meaningless on `i8`. Byte order does not exist as a\nconcept for byte-sized integers. This function is only provided in symmetry\nwith larger integer types. You can cast from and to `u8` using\n[`cast_signed`](u8::cast_signed) and [`cast_unsigned`](Self::cast_unsigned).\n\n# Examples\n\n```\nlet bytes = 0x12i8.to_be_bytes();\nassert_eq!(bytes, [0x12]);\n```",
"id": 10373,
"inner": {
"function": {
@@ -30632,30 +29207,32 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "array": {
+ "len": "1",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
}
}
},
- "links": {},
- "name": "saturating_add",
+ "links": {
+ "Self::cast_unsigned": 10256,
+ "u8::cast_signed": 10372
+ },
+ "name": "to_be_bytes",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -30665,10 +29242,10 @@
"10374": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
@@ -30678,7 +29255,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating addition with an unsigned integer. Computes `self + rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1i32.saturating_add_unsigned(2), 3);\nassert_eq!(i32::MAX.saturating_add_unsigned(100), i32::MAX);\n```",
+ "docs": "Returns the memory representation of this integer as a byte array in\nlittle-endian byte order.\n\n\n**Note**: This function is meaningless on `i8`. Byte order does not exist as a\nconcept for byte-sized integers. This function is only provided in symmetry\nwith larger integer types. You can cast from and to `u8` using\n[`cast_signed`](u8::cast_signed) and [`cast_unsigned`](Self::cast_unsigned).\n\n# Examples\n\n```\nlet bytes = 0x12i8.to_le_bytes();\nassert_eq!(bytes, [0x12]);\n```",
"id": 10374,
"inner": {
"function": {
@@ -30700,30 +29277,32 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "array": {
+ "len": "1",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
}
}
},
- "links": {},
- "name": "saturating_add_unsigned",
+ "links": {
+ "Self::cast_unsigned": 10256,
+ "u8::cast_signed": 10372
+ },
+ "name": "to_le_bytes",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -30733,10 +29312,10 @@
"10375": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
@@ -30746,7 +29325,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer subtraction. Computes `self - rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i32.saturating_sub(127), -27);\nassert_eq!(i32::MIN.saturating_sub(100), i32::MIN);\nassert_eq!(i32::MAX.saturating_sub(-1), i32::MAX);\n```",
+ "docs": "Returns the memory representation of this integer as a byte array in\nnative byte order.\n\nAs the target platform's native endianness is used, portable code\nshould use [`to_be_bytes`] or [`to_le_bytes`], as appropriate,\ninstead.\n\n\n**Note**: This function is meaningless on `i8`. Byte order does not exist as a\nconcept for byte-sized integers. This function is only provided in symmetry\nwith larger integer types. You can cast from and to `u8` using\n[`cast_signed`](u8::cast_signed) and [`cast_unsigned`](Self::cast_unsigned).\n\n[`to_be_bytes`]: Self::to_be_bytes\n[`to_le_bytes`]: Self::to_le_bytes\n\n# Examples\n\n```\nlet bytes = 0x12i8.to_ne_bytes();\nassert_eq!(\n bytes,\n if cfg!(target_endian = \"big\") {\n [0x12]\n } else {\n [0x12]\n }\n);\n```",
"id": 10375,
"inner": {
"function": {
@@ -30768,30 +29347,34 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "array": {
+ "len": "1",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
}
}
},
- "links": {},
- "name": "saturating_sub",
+ "links": {
+ "Self::cast_unsigned": 10256,
+ "Self::to_be_bytes": 10373,
+ "Self::to_le_bytes": 10374,
+ "u8::cast_signed": 10372
+ },
+ "name": "to_ne_bytes",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -30801,20 +29384,20 @@
"10376": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating subtraction with an unsigned integer. Computes `self - rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i32.saturating_sub_unsigned(127), -27);\nassert_eq!(i32::MIN.saturating_sub_unsigned(100), i32::MIN);\n```",
+ "docs": "Creates an integer value from its representation as a byte array in\nbig endian.\n\n\n**Note**: This function is meaningless on `i8`. Byte order does not exist as a\nconcept for byte-sized integers. This function is only provided in symmetry\nwith larger integer types. You can cast from and to `u8` using\n[`cast_signed`](u8::cast_signed) and [`cast_unsigned`](Self::cast_unsigned).\n\n# Examples\n\n```\nlet value = i8::from_be_bytes([0x12]);\nassert_eq!(value, 0x12);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_be_i8(input: &mut &[u8]) -> i8 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n i8::from_be_bytes(int_bytes.try_into().unwrap())\n}\n```",
"id": 10376,
"inner": {
"function": {
@@ -30832,34 +29415,36 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "bytes",
{
- "primitive": "u32"
+ "array": {
+ "len": "1",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i8"
}
}
}
},
- "links": {},
- "name": "saturating_sub_unsigned",
+ "links": {
+ "Self::cast_unsigned": 10256,
+ "u8::cast_signed": 10372
+ },
+ "name": "from_be_bytes",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -30869,20 +29454,20 @@
"10377": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 45, patch: 0})}, feature: \"saturating_neg\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer negation. Computes `-self`, returning `MAX` if `self == MIN`\ninstead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i32.saturating_neg(), -100);\nassert_eq!((-100i32).saturating_neg(), 100);\nassert_eq!(i32::MIN.saturating_neg(), i32::MAX);\nassert_eq!(i32::MAX.saturating_neg(), i32::MIN + 1);\n```",
+ "docs": "Creates an integer value from its representation as a byte array in\nlittle endian.\n\n\n**Note**: This function is meaningless on `i8`. Byte order does not exist as a\nconcept for byte-sized integers. This function is only provided in symmetry\nwith larger integer types. You can cast from and to `u8` using\n[`cast_signed`](u8::cast_signed) and [`cast_unsigned`](Self::cast_unsigned).\n\n# Examples\n\n```\nlet value = i8::from_le_bytes([0x12]);\nassert_eq!(value, 0x12);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_le_i8(input: &mut &[u8]) -> i8 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n i8::from_le_bytes(int_bytes.try_into().unwrap())\n}\n```",
"id": 10377,
"inner": {
"function": {
@@ -30900,28 +29485,36 @@
"sig": {
"inputs": [
[
- "self",
+ "bytes",
{
- "generic": "Self"
+ "array": {
+ "len": "1",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i8"
}
}
}
},
- "links": {},
- "name": "saturating_neg",
+ "links": {
+ "Self::cast_unsigned": 10256,
+ "u8::cast_signed": 10372
+ },
+ "name": "from_le_bytes",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -30931,20 +29524,20 @@
"10378": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 45, patch: 0})}, feature: \"saturating_neg\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating absolute value. Computes `self.abs()`, returning `MAX` if `self ==\nMIN` instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i32.saturating_abs(), 100);\nassert_eq!((-100i32).saturating_abs(), 100);\nassert_eq!(i32::MIN.saturating_abs(), i32::MAX);\nassert_eq!((i32::MIN + 1).saturating_abs(), i32::MAX);\n```",
+ "docs": "Creates an integer value from its memory representation as a byte\narray in native endianness.\n\nAs the target platform's native endianness is used, portable code\nlikely wants to use [`from_be_bytes`] or [`from_le_bytes`], as\nappropriate instead.\n\n[`from_be_bytes`]: Self::from_be_bytes\n[`from_le_bytes`]: Self::from_le_bytes\n\n\n**Note**: This function is meaningless on `i8`. Byte order does not exist as a\nconcept for byte-sized integers. This function is only provided in symmetry\nwith larger integer types. You can cast from and to `u8` using\n[`cast_signed`](u8::cast_signed) and [`cast_unsigned`](Self::cast_unsigned).\n\n# Examples\n\n```\nlet value = i8::from_ne_bytes(if cfg!(target_endian = \"big\") {\n [0x12]\n} else {\n [0x12]\n});\nassert_eq!(value, 0x12);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_ne_i8(input: &mut &[u8]) -> i8 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n i8::from_ne_bytes(int_bytes.try_into().unwrap())\n}\n```",
"id": 10378,
"inner": {
"function": {
@@ -30962,28 +29555,38 @@
"sig": {
"inputs": [
[
- "self",
+ "bytes",
{
- "generic": "Self"
+ "array": {
+ "len": "1",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i8"
}
}
}
},
- "links": {},
- "name": "saturating_abs",
+ "links": {
+ "Self::cast_unsigned": 10256,
+ "Self::from_be_bytes": 10376,
+ "Self::from_le_bytes": 10377,
+ "u8::cast_signed": 10372
+ },
+ "name": "from_ne_bytes",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -30993,20 +29596,21 @@
"10379": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[rustc_diagnostic_item = \"i8_legacy_fn_min_value\"]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_min_value\", promotable: true}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
}
],
"crate_id": 1,
- "deprecation": null,
- "docs": "Saturating integer multiplication. Computes `self * rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(10i32.saturating_mul(12), 120);\nassert_eq!(i32::MAX.saturating_mul(10), i32::MAX);\nassert_eq!(i32::MIN.saturating_mul(10), i32::MIN);\n```",
+ "deprecation": {
+ "note": "replaced by the `MIN` associated constant on this type",
+ "since": "TBD"
+ },
+ "docs": "New code should prefer to use\n[`i8::MIN`] instead.\n\nReturns the smallest value that can be represented by this integer type.",
"id": 10379,
"inner": {
"function": {
@@ -31022,36 +29626,25 @@
"is_unsafe": false
},
"sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "i32"
- }
- ]
- ],
+ "inputs": [],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i8"
}
}
}
},
- "links": {},
- "name": "saturating_mul",
+ "links": {
+ "`i8::MIN`": 10242
+ },
+ "name": "min_value",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -31144,12 +29737,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -31172,20 +29765,21 @@
"10380": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\", promotable: false}}]"
+ "other": "#[rustc_diagnostic_item = \"i8_legacy_fn_max_value\"]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
}
],
"crate_id": 1,
- "deprecation": null,
- "docs": "Saturating integer division. Computes `self / rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i32.saturating_div(2), 2);\nassert_eq!(i32::MAX.saturating_div(-1), i32::MIN + 1);\nassert_eq!(i32::MIN.saturating_div(-1), i32::MAX);\n\n```",
+ "deprecation": {
+ "note": "replaced by the `MAX` associated constant on this type",
+ "since": "TBD"
+ },
+ "docs": "New code should prefer to use\n[`i8::MAX`] instead.\n\nReturns the largest value that can be represented by this integer type.",
"id": 10380,
"inner": {
"function": {
@@ -31201,36 +29795,25 @@
"is_unsafe": false
},
"sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "i32"
- }
- ]
- ],
+ "inputs": [],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i8"
}
}
}
},
- "links": {},
- "name": "saturating_div",
+ "links": {
+ "`i8::MAX`": 10243
+ },
+ "name": "max_value",
"span": {
"begin": [
- 295,
+ 247,
5
],
"end": [
- 314,
+ 266,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -31240,10 +29823,19 @@
"10381": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[doc(alias = \"average_floor\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[doc(alias = \"average_ceil\")]"
+ },
+ {
+ "other": "#[doc(alias = \"average\")]"
+ },
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"num_midpoint_signed\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"num_midpoint_signed\"}}]"
},
{
"must_use": {
@@ -31253,7 +29845,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer exponentiation. Computes `self.pow(exp)`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!((-4i32).saturating_pow(3), -64);\nassert_eq!(i32::MIN.saturating_pow(2), i32::MAX);\nassert_eq!(i32::MIN.saturating_pow(3), i32::MIN);\n```",
+ "docs": "Calculates the midpoint (average) between `self` and `rhs`.\n\n`midpoint(a, b)` is `(a + b) / 2` as if it were performed in a\nsufficiently-large signed integral type. This implies that the result is\nalways rounded towards zero and that no overflow will ever occur.\n\n# Examples\n\n```\nassert_eq!(0i8.midpoint(4), 2);\nassert_eq!((-1i8).midpoint(2), 0);\nassert_eq!((-7i8).midpoint(0), -3);\nassert_eq!(0i8.midpoint(-7), -3);\nassert_eq!(0i8.midpoint(7), 3);\n```",
"id": 10381,
"inner": {
"function": {
@@ -31277,119 +29869,223 @@
}
],
[
- "exp",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i8"
}
}
}
},
"links": {},
- "name": "saturating_pow",
+ "name": "midpoint",
"span": {
"begin": [
- 295,
+ 267,
5
],
"end": [
- 314,
- 6
+ 267,
+ 39
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"10382": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
+ "attrs": [],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) addition with an unsigned integer. Computes\n`self + rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(100i32.wrapping_add_unsigned(27), 127);\nassert_eq!(i32::MAX.wrapping_add_unsigned(2), i32::MIN + 1);\n```",
+ "docs": null,
"id": 10382,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "i8"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i32"
- }
- }
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 10242,
+ 10243,
+ 10244,
+ 10245,
+ 10246,
+ 10248,
+ 10249,
+ 10250,
+ 10251,
+ 10252,
+ 10253,
+ 10254,
+ 10255,
+ 10256,
+ 10257,
+ 10258,
+ 10259,
+ 10260,
+ 10261,
+ 10262,
+ 10263,
+ 10264,
+ 10265,
+ 10266,
+ 10268,
+ 10269,
+ 10270,
+ 10271,
+ 10272,
+ 10274,
+ 10275,
+ 10276,
+ 10277,
+ 10278,
+ 10280,
+ 10281,
+ 10282,
+ 10283,
+ 10284,
+ 10285,
+ 10286,
+ 10287,
+ 10288,
+ 10289,
+ 10290,
+ 10291,
+ 10292,
+ 10293,
+ 10294,
+ 10295,
+ 10296,
+ 10297,
+ 10298,
+ 10299,
+ 10300,
+ 10301,
+ 10302,
+ 10303,
+ 10304,
+ 10305,
+ 10306,
+ 10307,
+ 10308,
+ 10309,
+ 10310,
+ 10311,
+ 10312,
+ 10313,
+ 10314,
+ 10315,
+ 10316,
+ 10317,
+ 10318,
+ 10319,
+ 10320,
+ 10267,
+ 10321,
+ 10273,
+ 10322,
+ 10279,
+ 10323,
+ 10324,
+ 10325,
+ 10326,
+ 10327,
+ 10328,
+ 10329,
+ 10330,
+ 10331,
+ 10332,
+ 10333,
+ 10335,
+ 10336,
+ 10337,
+ 10339,
+ 10340,
+ 10341,
+ 10343,
+ 10342,
+ 10344,
+ 10345,
+ 10346,
+ 10347,
+ 10348,
+ 10349,
+ 10350,
+ 10351,
+ 10352,
+ 10353,
+ 10354,
+ 10355,
+ 10356,
+ 10357,
+ 10358,
+ 10359,
+ 10360,
+ 10361,
+ 10362,
+ 10247,
+ 10363,
+ 10364,
+ 10365,
+ 10366,
+ 10367,
+ 10368,
+ 10369,
+ 10370,
+ 10371,
+ 10373,
+ 10374,
+ 10375,
+ 10376,
+ 10377,
+ 10378,
+ 10379,
+ 10380,
+ 10381
+ ],
+ "provided_trait_methods": [],
+ "trait": null
}
},
"links": {},
- "name": "wrapping_add_unsigned",
+ "name": null,
"span": {
"begin": [
- 295,
- 5
+ 246,
+ 1
],
"end": [
- 314,
- 6
+ 246,
+ 8
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
"10383": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 82, patch: 0})}, feature: \"const_int_from_str\", promotable: false}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) subtraction with an unsigned integer. Computes\n`self - rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(0i32.wrapping_sub_unsigned(127), -127);\nassert_eq!((-2i32).wrapping_sub_unsigned(u32::MAX), -1);\n```",
+ "docs": "Parses an integer from a string slice with digits in a given base.\n\nThe string is expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# See also\nIf the string to be parsed is in base 10 (decimal),\n[`from_str`] or [`str::parse`] can also be used.\n\n[`from_str`]: #method.from_str\n[`str::parse`]: primitive.str.html#method.parse\n\n# Examples\n\n```\nassert_eq!(i8::from_str_radix(\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\nassert!(i8::from_str_radix(\"1 \", 10).is_err());\n```",
"id": 10383,
"inner": {
"function": {
@@ -31407,13 +30103,19 @@
"sig": {
"inputs": [
[
- "self",
+ "src",
{
- "generic": "Self"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "primitive": "str"
+ }
+ }
}
],
[
- "rhs",
+ "radix",
{
"primitive": "u32"
}
@@ -31421,21 +30123,45 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i8"
+ }
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 4786,
+ "path": "ParseIntError"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 57,
+ "path": "Result"
+ }
}
}
}
},
"links": {},
- "name": "wrapping_sub_unsigned",
+ "name": "from_str_radix",
"span": {
"begin": [
- 295,
- 5
+ 1666,
+ 1
],
"end": [
- 314,
- 6
+ 1666,
+ 56
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -31444,20 +30170,12 @@
"10384": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) division. Computes `self / rhs`, wrapping around at the\nboundary of the type.\n\nThe only case where such wrapping can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type. In such a case, this function returns `MIN` itself.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i32.wrapping_div(10), 10);\nassert_eq!((-128i8).wrapping_div(-1), -128);\n```",
+ "docs": "Parses an integer from an ASCII-byte slice with decimal digits.\n\nThe characters are expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(i8::from_ascii(b\"+10\"), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(i8::from_ascii(b\"1 \").is_err());\n```",
"id": 10384,
"inner": {
"function": {
@@ -31475,35 +30193,61 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "src",
{
- "primitive": "i32"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "slice": {
+ "primitive": "u8"
+ }
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i8"
+ }
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 4786,
+ "path": "ParseIntError"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 57,
+ "path": "Result"
+ }
}
}
}
},
"links": {},
- "name": "wrapping_div",
+ "name": "from_ascii",
"span": {
"begin": [
- 295,
- 5
+ 1666,
+ 1
],
"end": [
- 314,
- 6
+ 1666,
+ 56
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -31512,20 +30256,12 @@
"10385": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping Euclidean division. Computes `self.div_euclid(rhs)`,\nwrapping around at the boundary of the type.\n\nWrapping will only occur in `MIN / -1` on a signed type (where `MIN` is the negative minimal value\nfor the type). This is equivalent to `-MIN`, a positive value that is too large to represent in the\ntype. In this case, this method returns `MIN` itself.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i32.wrapping_div_euclid(10), 10);\nassert_eq!((-128i8).wrapping_div_euclid(-1), -128);\n```",
+ "docs": "Parses an integer from an ASCII-byte slice with digits in a given base.\n\nThe characters are expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(i8::from_ascii_radix(b\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(i8::from_ascii_radix(b\"1 \", 10).is_err());\n```",
"id": 10385,
"inner": {
"function": {
@@ -31543,126 +30279,125 @@
"sig": {
"inputs": [
[
- "self",
+ "src",
{
- "generic": "Self"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "slice": {
+ "primitive": "u8"
+ }
+ }
+ }
}
],
[
- "rhs",
+ "radix",
{
- "primitive": "i32"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i8"
+ }
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 4786,
+ "path": "ParseIntError"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 57,
+ "path": "Result"
+ }
}
}
}
},
"links": {},
- "name": "wrapping_div_euclid",
+ "name": "from_ascii_radix",
"span": {
"begin": [
- 295,
- 5
+ 1666,
+ 1
],
"end": [
- 314,
- 6
+ 1666,
+ 56
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"10386": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
+ "attrs": [],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) remainder. Computes `self % rhs`, wrapping around at the\nboundary of the type.\n\nSuch wrap-around never actually occurs mathematically; implementation artifacts make `x % y`\ninvalid for `MIN / -1` on a signed type (where `MIN` is the negative minimal value). In such a case,\nthis function returns `0`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i32.wrapping_rem(10), 0);\nassert_eq!((-128i8).wrapping_rem(-1), 0);\n```",
+ "docs": null,
"id": 10386,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "i8"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "i32"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i32"
- }
- }
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 10383,
+ 10384,
+ 10385
+ ],
+ "provided_trait_methods": [],
+ "trait": null
}
},
"links": {},
- "name": "wrapping_rem",
+ "name": null,
"span": {
"begin": [
- 295,
- 5
+ 1666,
+ 1
],
"end": [
- 314,
- 6
+ 1666,
+ 56
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
- "10387": {
+ "10388": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 138215, is_soft: false}, feature: \"int_format_into\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping Euclidean remainder. Computes `self.rem_euclid(rhs)`, wrapping around\nat the boundary of the type.\n\nWrapping will only occur in `MIN % -1` on a signed type (where `MIN` is the negative minimal value\nfor the type). In this case, this method returns 0.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i32.wrapping_rem_euclid(10), 0);\nassert_eq!((-128i8).wrapping_rem_euclid(-1), 0);\n```",
- "id": 10387,
+ "docs": "Allows users to write an integer (in signed decimal format) into a variable `buf` of\ntype [`NumBuffer`] that is passed by the caller by mutable reference.\n\n# Examples\n\n```\n#![feature(int_format_into)]\nuse core::fmt::NumBuffer;\n\nlet n = 0i8;\nlet mut buf = NumBuffer::new();\nassert_eq!(n.format_into(&mut buf), \"0\");\n\nlet n1 = 32i8;\nassert_eq!(n1.format_into(&mut buf), \"32\");\n\nlet n2 = i8 :: MAX;\nassert_eq!(n2.format_into(&mut buf), i8 :: MAX.to_string());\n```",
+ "id": 10388,
"inner": {
"function": {
"generics": {
@@ -31673,7 +30408,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -31685,165 +30420,103 @@
}
],
[
- "rhs",
+ "buf",
{
- "primitive": "i32"
+ "borrowed_ref": {
+ "is_mutable": true,
+ "lifetime": null,
+ "type": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i8"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 10387,
+ "path": "NumBuffer"
+ }
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
- }
- }
- }
- },
- "links": {},
- "name": "wrapping_rem_euclid",
- "span": {
- "begin": [
- 295,
- 5
- ],
- "end": [
- 314,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "10388": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Wrapping (modular) negation. Computes `-self`, wrapping around at the boundary\nof the type.\n\nThe only case where such wrapping can occur is when one negates `MIN` on a signed type (where `MIN`\nis the negative minimal value for the type); this is a positive value that is too large to represent\nin the type. In such a case, this function returns `MIN` itself.\n\n# Examples\n\n```\nassert_eq!(100i32.wrapping_neg(), -100);\nassert_eq!((-100i32).wrapping_neg(), 100);\nassert_eq!(i32::MIN.wrapping_neg(), i32::MIN);\n```",
- "id": 10388,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "primitive": "str"
}
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i32"
+ }
}
}
}
},
- "links": {},
- "name": "wrapping_neg",
+ "links": {
+ "`NumBuffer`": 10387
+ },
+ "name": "format_into",
"span": {
"begin": [
- 295,
+ 599,
5
],
"end": [
- 314,
- 6
+ 599,
+ 95
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/fmt/num.rs"
},
"visibility": "public"
},
"10389": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
+ "attrs": [],
"crate_id": 1,
"deprecation": null,
- "docs": "Panic-free bitwise shift-left; yields `self << mask(rhs)`, where `mask` removes\nany high-order bits of `rhs` that would cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-left; the RHS of a wrapping shift-left is restricted to\nthe range of the type, rather than the bits shifted out of the LHS being returned to the other end.\nThe primitive integer types all implement a [`rotate_left`](Self::rotate_left) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!((-1i32).wrapping_shl(7), -128);\nassert_eq!((-1i32).wrapping_shl(128), -1);\n```",
+ "docs": null,
"id": 10389,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "i8"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i32"
- }
- }
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 10388
+ ],
+ "provided_trait_methods": [],
+ "trait": null
}
},
- "links": {
- "Self::rotate_left": 10322
- },
- "name": "wrapping_shl",
+ "links": {},
+ "name": null,
"span": {
"begin": [
- 295,
+ 599,
5
],
"end": [
- 314,
- 6
+ 599,
+ 95
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/fmt/num.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
"1039": {
"attrs": [],
@@ -31958,67 +30631,30 @@
"10390": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Panic-free bitwise shift-right; yields `self >> mask(rhs)`, where `mask`\nremoves any high-order bits of `rhs` that would cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-right; the RHS of a wrapping shift-right is restricted\nto the range of the type, rather than the bits shifted out of the LHS being returned to the other\nend. The primitive integer types all implement a [`rotate_right`](Self::rotate_right) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!((-128i32).wrapping_shr(7), -1);\nassert_eq!((-128i16).wrapping_shr(64), -128);\n```",
+ "docs": "The smallest value that can be represented by this integer type\n(−215).\n\n# Examples\n\n```\nassert_eq!(i16::MIN, -32768);\n```",
"id": 10390,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "i16"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i32"
- }
- }
+ "value": "_"
}
},
- "links": {
- "Self::rotate_right": 10323
- },
- "name": "wrapping_shr",
+ "links": {},
+ "name": "MIN",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -32028,59 +30664,30 @@
"10391": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) absolute value. Computes `self.abs()`, wrapping around at\nthe boundary of the type.\n\nThe only case where such wrapping can occur is when one takes the absolute value of the negative\nminimal value for the type; this is a positive value that is too large to represent in the type. In\nsuch a case, this function returns `MIN` itself.\n\n# Examples\n\n```\nassert_eq!(100i32.wrapping_abs(), 100);\nassert_eq!((-100i32).wrapping_abs(), 100);\nassert_eq!(i32::MIN.wrapping_abs(), i32::MIN);\nassert_eq!((-128i8).wrapping_abs() as u8, 128);\n```",
+ "docs": "The largest value that can be represented by this integer type\n(215 − 1).\n\n# Examples\n\n```\nassert_eq!(i16::MAX, 32767);\n```",
"id": 10391,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "i16"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i32"
- }
- }
+ "value": "_"
}
},
"links": {},
- "name": "wrapping_abs",
+ "name": "MAX",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -32090,59 +30697,30 @@
"10392": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 51, patch: 0})}, feature: \"unsigned_abs\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 51, patch: 0})}, feature: \"unsigned_abs\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 53, patch: 0})}, feature: \"int_bits_const\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Computes the absolute value of `self` without any wrapping\nor panicking.\n\n\n# Examples\n\n```\nassert_eq!(100i32.unsigned_abs(), 100u32);\nassert_eq!((-100i32).unsigned_abs(), 100u32);\nassert_eq!((-128i8).unsigned_abs(), 128u8);\n```",
+ "docs": "The size of this integer type in bits.\n\n# Examples\n\n```\nassert_eq!(i16::BITS, 16);\n```",
"id": 10392,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "u32"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "u32"
- }
- }
+ "value": "u16::BITS"
}
},
"links": {},
- "name": "unsigned_abs",
+ "name": "BITS",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -32152,10 +30730,16 @@
"10393": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[doc(alias = \"popcount\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[doc(alias = \"popcnt\")]"
+ },
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -32165,7 +30749,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) exponentiation. Computes `self.pow(exp)`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(3i32.wrapping_pow(4), 81);\nassert_eq!(3i8.wrapping_pow(5), -13);\nassert_eq!(3i8.wrapping_pow(6), -39);\n```",
+ "docs": "Returns the number of ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 0b100_0000i16;\n\nassert_eq!(n.count_ones(), 1);\n```\n",
"id": 10393,
"inner": {
"function": {
@@ -32187,30 +30771,24 @@
{
"generic": "Self"
}
- ],
- [
- "exp",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "wrapping_pow",
+ "name": "count_ones",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -32223,7 +30801,7 @@
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -32233,7 +30811,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would have\noccurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5i32.overflowing_add(2), (7, false));\nassert_eq!(i32::MAX.overflowing_add(1), (i32::MIN, true));\n```",
+ "docs": "Returns the number of zeros in the binary representation of `self`.\n\n# Examples\n\n```\nassert_eq!(i16::MAX.count_zeros(), 1);\n```",
"id": 10394,
"inner": {
"function": {
@@ -32255,37 +30833,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i32"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i32"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "overflowing_add",
+ "name": "count_zeros",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -32295,20 +30860,23 @@
"10395": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs` + `carry` and returns a tuple containing\nthe sum and the output carry.\n\nPerforms \"ternary addition\" of two integer operands and a carry-in\nbit, and returns an output integer and a carry-out bit. This allows\nchaining together multiple additions to create a wider addition, and\ncan be useful for bignum addition.\n\nThis can be thought of as a 32-bit \"full adder\", in the electronics sense.\n\nIf the input carry is false, this method is equivalent to\n[`overflowing_add`](Self::overflowing_add), and the output carry is\nequal to the overflow flag. Note that although carry and overflow\nflags are similar for unsigned integers, they are different for\nsigned integers.\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n\n// 3 MAX (a = 3 × 2^32 + 2^32 - 1)\n// + 5 7 (b = 5 × 2^32 + 7)\n// ---------\n// 9 6 (sum = 9 × 2^32 + 6)\n\nlet (a1, a0): (u32, u32) = (3, u32::MAX);\nlet (b1, b0): (u32, u32) = (5, 7);\nlet carry0 = false;\n\nlet (sum0, carry1) = a0.carrying_add(b0, carry0);\nassert_eq!(carry1, true);\nlet (sum1, carry2) = a1.carrying_add(b1, carry1);\nassert_eq!(carry2, false);\n\nassert_eq!((sum1, sum0), (9, 6));\n```",
+ "docs": "Returns the base 2 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero.\n\n# Examples\n\n```\nassert_eq!(2i16.ilog2(), 1);\n```",
"id": 10395,
"inner": {
"function": {
@@ -32330,45 +30898,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
- ],
- [
- "carry",
- {
- "primitive": "bool"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u32"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
- "links": {
- "Self::overflowing_add": 11104
- },
- "name": "carrying_add",
+ "links": {},
+ "name": "ilog2",
"span": {
"begin": [
- 1128,
+ 271,
5
],
"end": [
- 1146,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -32378,7 +30925,10 @@
"10396": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -32388,7 +30938,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs` + `carry` and checks for overflow.\n\nPerforms \"ternary addition\" of two integer operands and a carry-in\nbit, and returns a tuple of the sum along with a boolean indicating\nwhether an arithmetic overflow would occur. On overflow, the wrapped\nvalue is returned.\n\nThis allows chaining together multiple additions to create a wider\naddition, and can be useful for bignum addition. This method should\nonly be used for the most significant word; for the less significant\nwords the unsigned method\n[`u32::carrying_add`]\nshould be used.\n\nThe output boolean returned by this method is *not* a carry flag,\nand should *not* be added to a more significant word.\n\nIf the input carry is false, this method is equivalent to\n[`overflowing_add`](Self::overflowing_add).\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n// Only the most significant word is signed.\n//\n// 10 MAX (a = 10 × 2^32 + 2^32 - 1)\n// + -5 9 (b = -5 × 2^32 + 9)\n// ---------\n// 6 8 (sum = 6 × 2^32 + 8)\n\nlet (a1, a0): (i32, u32) = (10, u32::MAX);\nlet (b1, b0): (i32, u32) = (-5, 9);\nlet carry0 = false;\n\n// u32::carrying_add for the less significant words\nlet (sum0, carry1) = a0.carrying_add(b0, carry0);\nassert_eq!(carry1, true);\n\n// i32::carrying_add for the most significant word\nlet (sum1, overflow) = a1.carrying_add(b1, carry1);\nassert_eq!(overflow, false);\n\nassert_eq!((sum1, sum0), (6, 8));\n```",
+ "docs": "Returns the number of leading zeros in the binary representation of `self`.\n\nDepending on what you're doing with the value, you might also be interested in the\n[`ilog2`] function which returns a consistent number, even if the type widens.\n\n# Examples\n\n```\nlet n = -1i16;\n\nassert_eq!(n.leading_zeros(), 0);\n```\n[`ilog2`]: i16::ilog2",
"id": 10396,
"inner": {
"function": {
@@ -32410,46 +30960,26 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i32"
- }
- ],
- [
- "carry",
- {
- "primitive": "bool"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i32"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
"links": {
- "Self::overflowing_add": 10394,
- "`u32::carrying_add`": 10395
+ "i16::ilog2": 10395
},
- "name": "carrying_add",
+ "name": "leading_zeros",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -32459,10 +30989,10 @@
"10397": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -32472,7 +31002,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs` with an unsigned `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1i32.overflowing_add_unsigned(2), (3, false));\nassert_eq!((i32::MIN).overflowing_add_unsigned(u32::MAX), (i32::MAX, false));\nassert_eq!((i32::MAX - 2).overflowing_add_unsigned(3), (i32::MIN, true));\n```",
+ "docs": "Returns the number of trailing zeros in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = -4i16;\n\nassert_eq!(n.trailing_zeros(), 2);\n```",
"id": 10397,
"inner": {
"function": {
@@ -32494,37 +31024,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i32"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "overflowing_add_unsigned",
+ "name": "trailing_zeros",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -32534,10 +31051,10 @@
"10398": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
},
{
"must_use": {
@@ -32547,7 +31064,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` - `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating whether an arithmetic overflow\nwould occur. If an overflow would have occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5i32.overflowing_sub(2), (3, false));\nassert_eq!(i32::MIN.overflowing_sub(1), (i32::MAX, true));\n```",
+ "docs": "Returns the number of leading ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = -1i16;\n\nassert_eq!(n.leading_ones(), 16);\n```",
"id": 10398,
"inner": {
"function": {
@@ -32569,37 +31086,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i32"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i32"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "overflowing_sub",
+ "name": "leading_ones",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -32609,10 +31113,10 @@
"10399": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
},
{
"must_use": {
@@ -32622,7 +31126,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` − `rhs` − `borrow` and returns a tuple\ncontaining the difference and the output borrow.\n\nPerforms \"ternary subtraction\" by subtracting both an integer\noperand and a borrow-in bit from `self`, and returns an output\ninteger and a borrow-out bit. This allows chaining together multiple\nsubtractions to create a wider subtraction, and can be useful for\nbignum subtraction.\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n\n// 9 6 (a = 9 × 2^32 + 6)\n// - 5 7 (b = 5 × 2^32 + 7)\n// ---------\n// 3 MAX (diff = 3 × 2^32 + 2^32 - 1)\n\nlet (a1, a0): (u32, u32) = (9, 6);\nlet (b1, b0): (u32, u32) = (5, 7);\nlet borrow0 = false;\n\nlet (diff0, borrow1) = a0.borrowing_sub(b0, borrow0);\nassert_eq!(borrow1, true);\nlet (diff1, borrow2) = a1.borrowing_sub(b1, borrow1);\nassert_eq!(borrow2, false);\n\nassert_eq!((diff1, diff0), (3, u32::MAX));\n```",
+ "docs": "Returns the number of trailing ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 3i16;\n\nassert_eq!(n.trailing_ones(), 2);\n```",
"id": 10399,
"inner": {
"function": {
@@ -32644,43 +31148,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
- ],
- [
- "borrow",
- {
- "primitive": "bool"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u32"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "borrowing_sub",
+ "name": "trailing_ones",
"span": {
"begin": [
- 1128,
+ 271,
5
],
"end": [
- 1146,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -32704,8 +31189,8 @@
"use": {
"id": 105,
"is_glob": false,
- "name": "Copy",
- "source": "core::prelude::v1::Copy"
+ "name": "Debug",
+ "source": "core::prelude::v1::Debug"
}
},
"links": {},
@@ -32713,11 +31198,11 @@
"span": {
"begin": [
52,
- 37
+ 43
],
"end": [
52,
- 41
+ 48
],
"filename": "std/src/prelude/v1.rs"
},
@@ -32752,11 +31237,11 @@
"name": "Item",
"span": {
"begin": [
- 2306,
+ 2301,
5
],
"end": [
- 2306,
+ 2301,
24
],
"filename": "std/src/collections/hash/map.rs"
@@ -32766,7 +31251,7 @@
"10400": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
},
{
"must_use": {
@@ -32776,7 +31261,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` − `rhs` − `borrow` and checks for\noverflow.\n\nPerforms \"ternary subtraction\" by subtracting both an integer\noperand and a borrow-in bit from `self`, and returns a tuple of the\ndifference along with a boolean indicating whether an arithmetic\noverflow would occur. On overflow, the wrapped value is returned.\n\nThis allows chaining together multiple subtractions to create a\nwider subtraction, and can be useful for bignum subtraction. This\nmethod should only be used for the most significant word; for the\nless significant words the unsigned method\n[`u32::borrowing_sub`]\nshould be used.\n\nThe output boolean returned by this method is *not* a borrow flag,\nand should *not* be subtracted from a more significant word.\n\nIf the input borrow is false, this method is equivalent to\n[`overflowing_sub`](Self::overflowing_sub).\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n// Only the most significant word is signed.\n//\n// 6 8 (a = 6 × 2^32 + 8)\n// - -5 9 (b = -5 × 2^32 + 9)\n// ---------\n// 10 MAX (diff = 10 × 2^32 + 2^32 - 1)\n\nlet (a1, a0): (i32, u32) = (6, 8);\nlet (b1, b0): (i32, u32) = (-5, 9);\nlet borrow0 = false;\n\n// u32::borrowing_sub for the less significant words\nlet (diff0, borrow1) = a0.borrowing_sub(b0, borrow0);\nassert_eq!(borrow1, true);\n\n// i32::borrowing_sub for the most significant word\nlet (diff1, overflow) = a1.borrowing_sub(b1, borrow1);\nassert_eq!(overflow, false);\n\nassert_eq!((diff1, diff0), (10, u32::MAX));\n```",
+ "docs": "Returns `self` with only the most significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: i16 = 0b_01100100;\n\nassert_eq!(n.isolate_highest_one(), 0b_01000000);\nassert_eq!(0_i16.isolate_highest_one(), 0);\n```",
"id": 10400,
"inner": {
"function": {
@@ -32798,46 +31283,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i32"
- }
- ],
- [
- "borrow",
- {
- "primitive": "bool"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i32"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i16"
}
}
}
},
- "links": {
- "Self::overflowing_sub": 10398,
- "`u32::borrowing_sub`": 10399
- },
- "name": "borrowing_sub",
+ "links": {},
+ "name": "isolate_highest_one",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -32847,10 +31310,7 @@
"10401": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
},
{
"must_use": {
@@ -32860,7 +31320,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` - `rhs` with an unsigned `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1i32.overflowing_sub_unsigned(2), (-1, false));\nassert_eq!((i32::MAX).overflowing_sub_unsigned(u32::MAX), (i32::MIN, false));\nassert_eq!((i32::MIN + 2).overflowing_sub_unsigned(3), (i32::MAX, true));\n```",
+ "docs": "Returns `self` with only the least significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: i16 = 0b_01100100;\n\nassert_eq!(n.isolate_lowest_one(), 0b_00000100);\nassert_eq!(0_i16.isolate_lowest_one(), 0);\n```",
"id": 10401,
"inner": {
"function": {
@@ -32882,37 +31342,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i32"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "overflowing_sub_unsigned",
+ "name": "isolate_lowest_one",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -32922,10 +31369,7 @@
"10402": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
},
{
"must_use": {
@@ -32935,7 +31379,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the multiplication of `self` and `rhs`.\n\nReturns a tuple of the multiplication along with a boolean indicating whether an arithmetic overflow\nwould occur. If an overflow would have occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5i32.overflowing_mul(2), (10, false));\nassert_eq!(1_000_000_000i32.overflowing_mul(10), (1410065408, true));\n```",
+ "docs": "Returns the index of the highest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_i16.highest_one(), None);\nassert_eq!(0x1_i16.highest_one(), Some(0));\nassert_eq!(0x10_i16.highest_one(), Some(4));\nassert_eq!(0x1f_i16.highest_one(), Some(4));\n```",
"id": 10402,
"inner": {
"function": {
@@ -32957,37 +31401,39 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i32"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
},
- {
- "primitive": "bool"
- }
- ]
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "overflowing_mul",
+ "name": "highest_one",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -32997,10 +31443,7 @@
"10403": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
},
{
"must_use": {
@@ -33010,7 +31453,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the \"full multiplication\" `self * rhs + carry`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need the `carry`, then you can use [`Self::widening_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.carrying_mul(-2, 0), (4294967286, -1));\nassert_eq!(5i32.carrying_mul(-2, 10), (0, 0));\nassert_eq!(1_000_000_000i32.carrying_mul(-10, 0), (2884901888, -3));\nassert_eq!(1_000_000_000i32.carrying_mul(-10, 10), (2884901898, -3));\nassert_eq!(i32::MAX.carrying_mul(i32::MAX, i32::MAX), (i32::MAX.unsigned_abs() + 1, i32::MAX / 2));\n```",
+ "docs": "Returns the index of the lowest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_i16.lowest_one(), None);\nassert_eq!(0x1_i16.lowest_one(), Some(0));\nassert_eq!(0x10_i16.lowest_one(), Some(4));\nassert_eq!(0x1f_i16.lowest_one(), Some(0));\n```",
"id": 10403,
"inner": {
"function": {
@@ -33032,45 +31475,39 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i32"
- }
- ],
- [
- "carry",
- {
- "primitive": "i32"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
},
- {
- "primitive": "i32"
- }
- ]
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
- "links": {
- "`Self::widening_mul`": 10404
- },
- "name": "carrying_mul",
+ "links": {},
+ "name": "lowest_one",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -33080,10 +31517,10 @@
"10404": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\"}}]"
},
{
"must_use": {
@@ -33093,7 +31530,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the complete product `self * rhs` without the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nIf you also need to add a carry to the wide result, then you want\n[`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.widening_mul(-2), (4294967286, -1));\nassert_eq!(1_000_000_000i32.widening_mul(-10), (2884901888, -3));\n```",
+ "docs": "Returns the bit pattern of `self` reinterpreted as an unsigned integer of the same size.\n\nThis produces the same result as an `as` cast, but ensures that the bit-width remains\nthe same.\n\n# Examples\n\n```\nlet n = -1i16;\n\nassert_eq!(n.cast_unsigned(), u16::MAX);\n```",
"id": 10404,
"inner": {
"function": {
@@ -33115,39 +31552,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i32"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u32"
- },
- {
- "primitive": "i32"
- }
- ]
+ "primitive": "u16"
}
}
}
},
- "links": {
- "`Self::carrying_mul`": 10403
- },
- "name": "widening_mul",
+ "links": {},
+ "name": "cast_unsigned",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -33157,10 +31579,10 @@
"10405": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -33170,7 +31592,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the \"full multiplication\" `self * rhs + carry1 + carry2`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need either `carry`, then you can use [`Self::widening_mul`] instead,\nand if you only need one `carry`, then you can use [`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.carrying_mul_add(-2, 0, 0), (4294967286, -1));\nassert_eq!(5i32.carrying_mul_add(-2, 10, 10), (10, 0));\nassert_eq!(1_000_000_000i32.carrying_mul_add(-10, 0, 0), (2884901888, -3));\nassert_eq!(1_000_000_000i32.carrying_mul_add(-10, 10, 10), (2884901908, -3));\nassert_eq!(i32::MAX.carrying_mul_add(i32::MAX, i32::MAX, i32::MAX), (u32::MAX, i32::MAX / 2));\n```",
+ "docs": "Shifts the bits to the left by a specified amount, `n`,\nwrapping the truncated bits to the end of the resulting integer.\n\nPlease note this isn't the same operation as the `<<` shifting operator!\n\n# Examples\n\n```\nlet n = -0x5ffdi16;\nlet m = 0x3a;\n\nassert_eq!(n.rotate_left(4), m);\n```",
"id": 10405,
"inner": {
"function": {
@@ -33194,50 +31616,28 @@
}
],
[
- "rhs",
- {
- "primitive": "i32"
- }
- ],
- [
- "carry",
- {
- "primitive": "i32"
- }
- ],
- [
- "add",
+ "n",
{
- "primitive": "i32"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u32"
- },
- {
- "primitive": "i32"
- }
- ]
+ "primitive": "i16"
}
}
}
},
- "links": {
- "`Self::carrying_mul`": 10403,
- "`Self::widening_mul`": 10404
- },
- "name": "carrying_mul_add",
+ "links": {},
+ "name": "rotate_left",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -33247,10 +31647,10 @@
"10406": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -33260,7 +31660,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the divisor when `self` is divided by `rhs`.\n\nReturns a tuple of the divisor along with a boolean indicating whether an arithmetic overflow would\noccur. If an overflow would occur then self is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i32.overflowing_div(2), (2, false));\nassert_eq!(i32::MIN.overflowing_div(-1), (i32::MIN, true));\n```",
+ "docs": "Shifts the bits to the right by a specified amount, `n`,\nwrapping the truncated bits to the beginning of the resulting\ninteger.\n\nPlease note this isn't the same operation as the `>>` shifting operator!\n\n# Examples\n\n```\nlet n = 0x3ai16;\nlet m = -0x5ffd;\n\nassert_eq!(n.rotate_right(4), m);\n```",
"id": 10406,
"inner": {
"function": {
@@ -33284,35 +31684,28 @@
}
],
[
- "rhs",
+ "n",
{
- "primitive": "i32"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i32"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "overflowing_div",
+ "name": "rotate_right",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -33322,10 +31715,10 @@
"10407": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -33335,7 +31728,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of Euclidean division `self.div_euclid(rhs)`.\n\nReturns a tuple of the divisor along with a boolean indicating whether an arithmetic overflow would\noccur. If an overflow would occur then `self` is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i32.overflowing_div_euclid(2), (2, false));\nassert_eq!(i32::MIN.overflowing_div_euclid(-1), (i32::MIN, true));\n```",
+ "docs": "Reverses the byte order of the integer.\n\n# Examples\n\n```\nlet n = 0x1234i16;\n\nlet m = n.swap_bytes();\n\nassert_eq!(m, 0x3412);\n```",
"id": 10407,
"inner": {
"function": {
@@ -33357,37 +31750,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i32"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i32"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "overflowing_div_euclid",
+ "name": "swap_bytes",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -33397,10 +31777,10 @@
"10408": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\"}}]"
},
{
"must_use": {
@@ -33410,7 +31790,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the remainder when `self` is divided by `rhs`.\n\nReturns a tuple of the remainder after dividing along with a boolean indicating whether an\narithmetic overflow would occur. If an overflow would occur then 0 is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i32.overflowing_rem(2), (1, false));\nassert_eq!(i32::MIN.overflowing_rem(-1), (0, true));\n```",
+ "docs": "Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\n second least-significant bit becomes second most-significant bit, etc.\n\n# Examples\n\n```\nlet n = 0x1234i16;\nlet m = n.reverse_bits();\n\nassert_eq!(m, 0x2c48);\nassert_eq!(0, 0i16.reverse_bits());\n```",
"id": 10408,
"inner": {
"function": {
@@ -33432,37 +31812,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i32"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i32"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "overflowing_rem",
+ "name": "reverse_bits",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -33472,23 +31839,20 @@
"10409": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Overflowing Euclidean remainder. Calculates `self.rem_euclid(rhs)`.\n\nReturns a tuple of the remainder after dividing along with a boolean indicating whether an\narithmetic overflow would occur. If an overflow would occur then 0 is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i32.overflowing_rem_euclid(2), (1, false));\nassert_eq!(i32::MIN.overflowing_rem_euclid(-1), (0, true));\n```",
+ "docs": "Converts an integer from big endian to the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai16;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(i16::from_be(n), n)\n} else {\n assert_eq!(i16::from_be(n), n.swap_bytes())\n}\n```",
"id": 10409,
"inner": {
"function": {
@@ -33506,41 +31870,28 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "x",
{
- "primitive": "i32"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i32"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "overflowing_rem_euclid",
+ "name": "from_be",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -33618,11 +31969,11 @@
"name": "next",
"span": {
"begin": [
- 2309,
+ 2304,
5
],
"end": [
- 2311,
+ 2306,
6
],
"filename": "std/src/collections/hash/map.rs"
@@ -33632,20 +31983,20 @@
"10410": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Negates self, overflowing if this is equal to the minimum value.\n\nReturns a tuple of the negated version of self along with a boolean indicating whether an overflow\nhappened. If `self` is the minimum value (e.g., `i32::MIN` for values of type `i32`), then the\nminimum value will be returned again and `true` will be returned for an overflow happening.\n\n# Examples\n\n```\nassert_eq!(2i32.overflowing_neg(), (-2, false));\nassert_eq!(i32::MIN.overflowing_neg(), (i32::MIN, true));\n```",
+ "docs": "Converts an integer from little endian to the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai16;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(i16::from_le(n), n)\n} else {\n assert_eq!(i16::from_le(n), n.swap_bytes())\n}\n```",
"id": 10410,
"inner": {
"function": {
@@ -33663,35 +32014,28 @@
"sig": {
"inputs": [
[
- "self",
+ "x",
{
- "generic": "Self"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i32"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "overflowing_neg",
+ "name": "from_le",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -33701,10 +32045,10 @@
"10411": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -33714,7 +32058,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts self left by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean indicating whether the shift\nvalue was larger than or equal to the number of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then used to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x1i32.overflowing_shl(4), (0x10, false));\nassert_eq!(0x1i32.overflowing_shl(36), (0x10, true));\nassert_eq!(0x10i32.overflowing_shl(31), (0, false));\n```",
+ "docs": "Converts `self` to big endian from the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai16;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(n.to_be(), n)\n} else {\n assert_eq!(n.to_be(), n.swap_bytes())\n}\n```",
"id": 10411,
"inner": {
"function": {
@@ -33736,37 +32080,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i32"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "overflowing_shl",
+ "name": "to_be",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -33776,10 +32107,10 @@
"10412": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -33789,7 +32120,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts self right by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean indicating whether the shift\nvalue was larger than or equal to the number of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then used to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x10i32.overflowing_shr(4), (0x1, false));\nassert_eq!(0x10i32.overflowing_shr(36), (0x1, true));\n```",
+ "docs": "Converts `self` to little endian from the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai16;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(n.to_le(), n)\n} else {\n assert_eq!(n.to_le(), n.swap_bytes())\n}\n```",
"id": 10412,
"inner": {
"function": {
@@ -33811,37 +32142,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i32"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "overflowing_shr",
+ "name": "to_le",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -33851,10 +32169,10 @@
"10413": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -33864,7 +32182,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Computes the absolute value of `self`.\n\nReturns a tuple of the absolute version of self along with a boolean indicating whether an overflow\nhappened. If self is the minimum value\n(e.g., i32::MIN for values of type i32),\nthen the minimum value will be returned again and true will be returned\nfor an overflow happening.\n\n# Examples\n\n```\nassert_eq!(10i32.overflowing_abs(), (10, false));\nassert_eq!((-10i32).overflowing_abs(), (10, false));\nassert_eq!((i32::MIN).overflowing_abs(), (i32::MIN, true));\n```",
+ "docs": "Checked integer addition. Computes `self + rhs`, returning `None`\nif overflow occurred.\n\n# Examples\n\n```\nassert_eq!((i16::MAX - 2).checked_add(1), Some(i16::MAX - 1));\nassert_eq!((i16::MAX - 2).checked_add(3), None);\n```",
"id": 10413,
"inner": {
"function": {
@@ -33886,31 +32204,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i16"
+ }
+ }
+ ],
+ "constraints": []
+ }
},
- {
- "primitive": "bool"
- }
- ]
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "overflowing_abs",
+ "name": "checked_add",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -33920,20 +32252,23 @@
"10414": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\nReturns a tuple of the exponentiation along with a bool indicating\nwhether an overflow happened.\n\n# Examples\n\n```\nassert_eq!(3i32.overflowing_pow(4), (81, false));\nassert_eq!(3i8.overflowing_pow(5), (-13, true));\n```",
+ "docs": "Strict integer addition. Computes `self + rhs`, panicking\nif overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((i16::MAX - 2).strict_add(1), i16::MAX - 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i16::MAX - 2).strict_add(3);\n```",
"id": 10414,
"inner": {
"function": {
@@ -33957,35 +32292,28 @@
}
],
[
- "exp",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i32"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "overflowing_pow",
+ "name": "strict_add",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -33995,7 +32323,7 @@
"10415": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -34008,7 +32336,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\n# Examples\n\n```\nlet x: i32 = 2; // or any other integer type\n\nassert_eq!(x.pow(5), 32);\n```",
+ "docs": "Wrapping (modular) addition. Computes `self + rhs`, wrapping around at the\nboundary of the type.\n\n# Examples\n\n```\nassert_eq!(100i16.wrapping_add(27), 127);\nassert_eq!(i16::MAX.wrapping_add(2), i16::MIN + 1);\n```",
"id": 10415,
"inner": {
"function": {
@@ -34032,28 +32360,28 @@
}
],
[
- "exp",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "pow",
+ "name": "wrapping_add",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -34063,10 +32391,10 @@
"10416": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
},
{
"must_use": {
@@ -34079,7 +32407,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the square root of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is negative.\n\n# Examples\n\n```\nassert_eq!(10i32.isqrt(), 3);\n```",
+ "docs": "Unchecked integer addition. Computes `self + rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_add(y)` is semantically equivalent to calling\n`x.`[`checked_add`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_add`].\n\n# Safety\n\nThis results in undefined behavior when\n`self + rhs > i16::MAX` or `self + rhs < i16::MIN`,\ni.e. when [`checked_add`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_add`]: i16::checked_add\n[`wrapping_add`]: i16::wrapping_add",
"id": 10416,
"inner": {
"function": {
@@ -34092,7 +32420,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -34101,24 +32429,33 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i16"
}
}
}
},
- "links": {},
- "name": "isqrt",
+ "links": {
+ "i16::checked_add": 10413,
+ "i16::wrapping_add": 10415
+ },
+ "name": "unchecked_add",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -34128,23 +32465,20 @@
"10417": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of Euclidean division of `self` by `rhs`.\n\nThis computes the integer `q` such that `self = q * rhs + r`, with\n`r = self.rem_euclid(rhs)` and `0 <= r < abs(rhs)`.\n\nIn other words, the result is `self / rhs` rounded to the integer `q`\nsuch that `self >= q * rhs`.\nIf `self > 0`, this is equal to rounding towards zero (the default in Rust);\nif `self < 0`, this is equal to rounding away from zero (towards +/- infinity).\nIf `rhs > 0`, this is equal to rounding towards -infinity;\nif `rhs < 0`, this is equal to rounding towards +infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\nlet a: i32 = 7; // or any other integer type\nlet b = 4;\n\nassert_eq!(a.div_euclid(b), 1); // 7 >= 4 * 1\nassert_eq!(a.div_euclid(-b), -1); // 7 >= -4 * -1\nassert_eq!((-a).div_euclid(b), -2); // -7 >= 4 * -2\nassert_eq!((-a).div_euclid(-b), 2); // -7 >= -4 * 2\n```",
+ "docs": "Checked addition with an unsigned integer. Computes `self + rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1i16.checked_add_unsigned(2), Some(3));\nassert_eq!((i16::MAX - 2).checked_add_unsigned(3), None);\n```",
"id": 10417,
"inner": {
"function": {
@@ -34170,26 +32504,41 @@
[
"rhs",
{
- "primitive": "i32"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i16"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "div_euclid",
+ "name": "checked_add_unsigned",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -34199,13 +32548,10 @@
"10418": {
"attrs": [
{
- "other": "#[doc(alias = \"modulo\", alias = \"mod\")]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -34218,7 +32564,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the least nonnegative remainder of `self (mod rhs)`.\n\nThis is done as if by the Euclidean division algorithm -- given\n`r = self.rem_euclid(rhs)`, the result satisfies\n`self = rhs * self.div_euclid(rhs) + r` and `0 <= r < abs(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN` and\n`rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\nlet a: i32 = 7; // or any other integer type\nlet b = 4;\n\nassert_eq!(a.rem_euclid(b), 3);\nassert_eq!((-a).rem_euclid(b), 1);\nassert_eq!(a.rem_euclid(-b), 3);\nassert_eq!((-a).rem_euclid(-b), 1);\n```\n\nThis will panic:\n```should_panic\nlet _ = i32::MIN.rem_euclid(-1);\n```",
+ "docs": "Strict addition with an unsigned integer. Computes `self + rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1i16.strict_add_unsigned(2), 3);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i16::MAX - 2).strict_add_unsigned(3);\n```",
"id": 10418,
"inner": {
"function": {
@@ -34244,26 +32590,26 @@
[
"rhs",
{
- "primitive": "i32"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "rem_euclid",
+ "name": "strict_add_unsigned",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -34273,20 +32619,20 @@
"10419": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards negative infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nlet a: i32 = 8;\nlet b = 3;\n\nassert_eq!(a.div_floor(b), 2);\nassert_eq!(a.div_floor(-b), -3);\nassert_eq!((-a).div_floor(b), -3);\nassert_eq!((-a).div_floor(-b), 2);\n```",
+ "docs": "Checked integer subtraction. Computes `self - rhs`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!((i16::MIN + 2).checked_sub(1), Some(i16::MIN + 1));\nassert_eq!((i16::MIN + 2).checked_sub(3), None);\n```",
"id": 10419,
"inner": {
"function": {
@@ -34312,26 +32658,41 @@
[
"rhs",
{
- "primitive": "i32"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i16"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "div_floor",
+ "name": "checked_sub",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -34409,11 +32770,11 @@
"name": "size_hint",
"span": {
"begin": [
- 2313,
+ 2308,
5
],
"end": [
- 2315,
+ 2310,
6
],
"filename": "std/src/collections/hash/map.rs"
@@ -34423,7 +32784,10 @@
"10420": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -34436,7 +32800,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards positive infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nlet a: i32 = 8;\nlet b = 3;\n\nassert_eq!(a.div_ceil(b), 3);\nassert_eq!(a.div_ceil(-b), -2);\nassert_eq!((-a).div_ceil(b), -2);\nassert_eq!((-a).div_ceil(-b), 3);\n```",
+ "docs": "Strict integer subtraction. Computes `self - rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((i16::MIN + 2).strict_sub(1), i16::MIN + 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i16::MIN + 2).strict_sub(3);\n```",
"id": 10420,
"inner": {
"function": {
@@ -34462,26 +32826,26 @@
[
"rhs",
{
- "primitive": "i32"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "div_ceil",
+ "name": "strict_sub",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -34491,7 +32855,10 @@
"10421": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -34501,7 +32868,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "If `rhs` is positive, calculates the smallest value greater than or\nequal to `self` that is a multiple of `rhs`. If `rhs` is negative,\ncalculates the largest value less than or equal to `self` that is a\nmultiple of `rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nOn overflow, this function will panic if overflow checks are enabled (default in debug\nmode) and wrap if overflow checks are disabled (default in release mode).\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(16_i32.next_multiple_of(8), 16);\nassert_eq!(23_i32.next_multiple_of(8), 24);\nassert_eq!(16_i32.next_multiple_of(-8), 16);\nassert_eq!(23_i32.next_multiple_of(-8), 16);\nassert_eq!((-16_i32).next_multiple_of(8), -16);\nassert_eq!((-23_i32).next_multiple_of(8), -16);\nassert_eq!((-16_i32).next_multiple_of(-8), -16);\nassert_eq!((-23_i32).next_multiple_of(-8), -24);\n```",
+ "docs": "Wrapping (modular) subtraction. Computes `self - rhs`, wrapping around at the\nboundary of the type.\n\n# Examples\n\n```\nassert_eq!(0i16.wrapping_sub(127), -127);\nassert_eq!((-2i16).wrapping_sub(i16::MAX), i16::MAX);\n```",
"id": 10421,
"inner": {
"function": {
@@ -34527,26 +32894,26 @@
[
"rhs",
{
- "primitive": "i32"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "next_multiple_of",
+ "name": "wrapping_sub",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -34556,17 +32923,23 @@
"10422": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "If `rhs` is positive, calculates the smallest value greater than or\nequal to `self` that is a multiple of `rhs`. If `rhs` is negative,\ncalculates the largest value less than or equal to `self` that is a\nmultiple of `rhs`. Returns `None` if `rhs` is zero or the operation\nwould result in overflow.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(16_i32.checked_next_multiple_of(8), Some(16));\nassert_eq!(23_i32.checked_next_multiple_of(8), Some(24));\nassert_eq!(16_i32.checked_next_multiple_of(-8), Some(16));\nassert_eq!(23_i32.checked_next_multiple_of(-8), Some(16));\nassert_eq!((-16_i32).checked_next_multiple_of(8), Some(-16));\nassert_eq!((-23_i32).checked_next_multiple_of(8), Some(-16));\nassert_eq!((-16_i32).checked_next_multiple_of(-8), Some(-16));\nassert_eq!((-23_i32).checked_next_multiple_of(-8), Some(-24));\nassert_eq!(1_i32.checked_next_multiple_of(0), None);\nassert_eq!(i32::MAX.checked_next_multiple_of(2), None);\n```",
+ "docs": "Unchecked integer subtraction. Computes `self - rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_sub(y)` is semantically equivalent to calling\n`x.`[`checked_sub`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_sub`].\n\n# Safety\n\nThis results in undefined behavior when\n`self - rhs > i16::MAX` or `self - rhs < i16::MIN`,\ni.e. when [`checked_sub`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_sub`]: i16::checked_sub\n[`wrapping_sub`]: i16::wrapping_sub",
"id": 10422,
"inner": {
"function": {
@@ -34579,7 +32952,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -34592,41 +32965,29 @@
[
"rhs",
{
- "primitive": "i32"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i16"
}
}
}
},
- "links": {},
- "name": "checked_next_multiple_of",
+ "links": {
+ "i16::checked_sub": 10419,
+ "i16::wrapping_sub": 10421
+ },
+ "name": "unchecked_sub",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -34636,23 +32997,20 @@
"10423": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nThis method might not be optimized owing to implementation details;\n`ilog2` can produce results more efficiently for base 2, and `ilog10`\ncan produce results more efficiently for base 10.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero,\nor if `base` is less than 2.\n\n# Examples\n\n```\nassert_eq!(5i32.ilog(5), 1);\n```",
+ "docs": "Checked subtraction with an unsigned integer. Computes `self - rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1i16.checked_sub_unsigned(2), Some(-1));\nassert_eq!((i16::MIN + 2).checked_sub_unsigned(3), None);\n```",
"id": 10423,
"inner": {
"function": {
@@ -34676,28 +33034,43 @@
}
],
[
- "base",
+ "rhs",
{
- "primitive": "i32"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i16"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "ilog",
+ "name": "checked_sub_unsigned",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -34707,10 +33080,10 @@
"10424": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -34723,7 +33096,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 10 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero.\n\n# Example\n\n```\nassert_eq!(10i32.ilog10(), 1);\n```",
+ "docs": "Strict subtraction with an unsigned integer. Computes `self - rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1i16.strict_sub_unsigned(2), -1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i16::MIN + 2).strict_sub_unsigned(3);\n```",
"id": 10424,
"inner": {
"function": {
@@ -34745,24 +33118,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "ilog10",
+ "name": "strict_sub_unsigned",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -34772,10 +33151,10 @@
"10425": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -34785,7 +33164,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nReturns `None` if the number is negative or zero, or if the base is not at least 2.\n\nThis method might not be optimized owing to implementation details;\n`checked_ilog2` can produce results more efficiently for base 2, and\n`checked_ilog10` can produce results more efficiently for base 10.\n\n# Examples\n\n```\nassert_eq!(5i32.checked_ilog(5), Some(1));\n```",
+ "docs": "Checked integer multiplication. Computes `self * rhs`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(i16::MAX.checked_mul(1), Some(i16::MAX));\nassert_eq!(i16::MAX.checked_mul(2), None);\n```",
"id": 10425,
"inner": {
"function": {
@@ -34809,9 +33188,9 @@
}
],
[
- "base",
+ "rhs",
{
- "primitive": "i32"
+ "primitive": "i16"
}
]
],
@@ -34823,7 +33202,7 @@
"args": [
{
"type": {
- "primitive": "u32"
+ "primitive": "i16"
}
}
],
@@ -34838,14 +33217,14 @@
}
},
"links": {},
- "name": "checked_ilog",
+ "name": "checked_mul",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -34855,20 +33234,23 @@
"10426": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 2 logarithm of the number, rounded down.\n\nReturns `None` if the number is negative or zero.\n\n# Examples\n\n```\nassert_eq!(2i32.checked_ilog2(), Some(1));\n```",
+ "docs": "Strict integer multiplication. Computes `self * rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(i16::MAX.strict_mul(1), i16::MAX);\n```\n\nThe following panics because of overflow:\n\n``` should_panic\nlet _ = i16::MAX.strict_mul(2);\n```",
"id": 10426,
"inner": {
"function": {
@@ -34890,39 +33272,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "checked_ilog2",
+ "name": "strict_mul",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -34932,10 +33305,10 @@
"10427": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -34945,7 +33318,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 10 logarithm of the number, rounded down.\n\nReturns `None` if the number is negative or zero.\n\n# Example\n\n```\nassert_eq!(10i32.checked_ilog10(), Some(1));\n```",
+ "docs": "Wrapping (modular) multiplication. Computes `self * rhs`, wrapping around at\nthe boundary of the type.\n\n# Examples\n\n```\nassert_eq!(10i16.wrapping_mul(12), 120);\nassert_eq!(11i8.wrapping_mul(12), -124);\n```",
"id": 10427,
"inner": {
"function": {
@@ -34967,39 +33340,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "checked_ilog10",
+ "name": "wrapping_mul",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -35009,20 +33373,23 @@
"10428": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Computes the absolute value of `self`.\n\n# Overflow behavior\n\nThe absolute value of\n`i32::MIN`\ncannot be represented as an\n`i32`,\nand attempting to calculate it will cause an overflow. This means\nthat code in debug mode will trigger a panic on this case and\noptimized code will return\n`i32::MIN`\nwithout a panic. If you do not want this behavior, consider\nusing [`unsigned_abs`](Self::unsigned_abs) instead.\n\n# Examples\n\n```\nassert_eq!(10i32.abs(), 10);\nassert_eq!((-10i32).abs(), 10);\n```",
+ "docs": "Unchecked integer multiplication. Computes `self * rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_mul(y)` is semantically equivalent to calling\n`x.`[`checked_mul`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_mul`].\n\n# Safety\n\nThis results in undefined behavior when\n`self * rhs > i16::MAX` or `self * rhs < i16::MIN`,\ni.e. when [`checked_mul`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_mul`]: i16::checked_mul\n[`wrapping_mul`]: i16::wrapping_mul",
"id": 10428,
"inner": {
"function": {
@@ -35035,7 +33402,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -35044,26 +33411,33 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i16"
}
}
}
},
"links": {
- "Self::unsigned_abs": 10392
+ "i16::checked_mul": 10425,
+ "i16::wrapping_mul": 10427
},
- "name": "abs",
+ "name": "unchecked_mul",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -35073,10 +33447,10 @@
"10429": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -35086,7 +33460,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Computes the absolute difference between `self` and `other`.\n\nThis function always returns the correct answer without overflow or\npanics by returning an unsigned integer.\n\n# Examples\n\n```\nassert_eq!(100i32.abs_diff(80), 20u32);\nassert_eq!(100i32.abs_diff(110), 10u32);\nassert_eq!((-100i32).abs_diff(80), 180u32);\nassert_eq!((-100i32).abs_diff(-120), 20u32);\nassert_eq!(i32::MIN.abs_diff(i32::MAX), u32::MAX);\n```",
+ "docs": "Checked integer division. Computes `self / rhs`, returning `None` if `rhs == 0`\nor the division results in overflow.\n\n# Examples\n\n```\nassert_eq!((i16::MIN + 1).checked_div(-1), Some(32767));\nassert_eq!(i16::MIN.checked_div(-1), None);\nassert_eq!((1i16).checked_div(0), None);\n```",
"id": 10429,
"inner": {
"function": {
@@ -35110,28 +33484,43 @@
}
],
[
- "other",
+ "rhs",
{
- "primitive": "i32"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i16"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "abs_diff",
+ "name": "checked_div",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -35362,11 +33751,11 @@
"name": null,
"span": {
"begin": [
- 2302,
+ 2297,
1
],
"end": [
- 2316,
+ 2311,
2
],
"filename": "std/src/collections/hash/map.rs"
@@ -35376,20 +33765,23 @@
"10430": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_int_sign\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns a number representing sign of `self`.\n\n - `0` if the number is zero\n - `1` if the number is positive\n - `-1` if the number is negative\n\n# Examples\n\n```\nassert_eq!(10i32.signum(), 1);\nassert_eq!(0i32.signum(), 0);\nassert_eq!((-10i32).signum(), -1);\n```",
+ "docs": "Strict integer division. Computes `self / rhs`, panicking\nif overflow occurred.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type.\n\n# Examples\n\n```\nassert_eq!((i16::MIN + 1).strict_div(-1), 32767);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i16::MIN.strict_div(-1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1i16).strict_div(0);\n```",
"id": 10430,
"inner": {
"function": {
@@ -35411,24 +33803,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "signum",
+ "name": "strict_div",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -35438,20 +33836,20 @@
"10431": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `true` if `self` is positive and `false` if the number is zero or\nnegative.\n\n# Examples\n\n```\nassert!(10i32.is_positive());\nassert!(!(-10i32).is_positive());\n```",
+ "docs": "Checked Euclidean division. Computes `self.div_euclid(rhs)`,\nreturning `None` if `rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!((i16::MIN + 1).checked_div_euclid(-1), Some(32767));\nassert_eq!(i16::MIN.checked_div_euclid(-1), None);\nassert_eq!((1i16).checked_div_euclid(0), None);\n```",
"id": 10431,
"inner": {
"function": {
@@ -35473,24 +33871,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i16"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "is_positive",
+ "name": "checked_div_euclid",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -35500,20 +33919,23 @@
"10432": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `true` if `self` is negative and `false` if the number is zero or\npositive.\n\n# Examples\n\n```\nassert!((-10i32).is_negative());\nassert!(!10i32.is_negative());\n```",
+ "docs": "Strict Euclidean division. Computes `self.div_euclid(rhs)`, panicking\nif overflow occurred.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type.\n\n# Examples\n\n```\nassert_eq!((i16::MIN + 1).strict_div_euclid(-1), 32767);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i16::MIN.strict_div_euclid(-1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1i16).strict_div_euclid(0);\n```",
"id": 10432,
"inner": {
"function": {
@@ -35535,24 +33957,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "is_negative",
+ "name": "strict_div_euclid",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -35562,10 +33990,7 @@
"10433": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
},
{
"must_use": {
@@ -35575,7 +34000,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nbig-endian (network) byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x12345678i32.to_be_bytes();\nassert_eq!(bytes, [0x12, 0x34, 0x56, 0x78]);\n```",
+ "docs": "Checked integer division without remainder. Computes `self / rhs`,\nreturning `None` if `rhs == 0`, the division results in overflow,\nor `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!((i16::MIN + 1).checked_exact_div(-1), Some(32767));\nassert_eq!((-5i16).checked_exact_div(2), None);\nassert_eq!(i16::MIN.checked_exact_div(-1), None);\nassert_eq!((1i16).checked_exact_div(0), None);\n```",
"id": 10433,
"inner": {
"function": {
@@ -35597,29 +34022,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "array": {
- "len": "4",
- "type": {
- "primitive": "u8"
- }
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i16"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
}
}
}
}
},
"links": {},
- "name": "to_be_bytes",
+ "name": "checked_exact_div",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -35629,10 +34070,7 @@
"10434": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
},
{
"must_use": {
@@ -35642,7 +34080,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nlittle-endian byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x12345678i32.to_le_bytes();\nassert_eq!(bytes, [0x78, 0x56, 0x34, 0x12]);\n```",
+ "docs": "Checked integer division without remainder. Computes `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs == 0`, the division results in overflow,\nor `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64i16.exact_div(2), 32);\nassert_eq!(64i16.exact_div(32), 2);\nassert_eq!((i16::MIN + 1).exact_div(-1), 32767);\n```\n\n```should_panic\n#![feature(exact_div)]\nlet _ = 65i16.exact_div(2);\n```\n```should_panic\n#![feature(exact_div)]\nlet _ = i16::MIN.exact_div(-1);\n```",
"id": 10434,
"inner": {
"function": {
@@ -35664,29 +34102,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "array": {
- "len": "4",
- "type": {
- "primitive": "u8"
- }
- }
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "to_le_bytes",
+ "name": "exact_div",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -35696,10 +34135,7 @@
"10435": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
},
{
"must_use": {
@@ -35709,7 +34145,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nnative byte order.\n\nAs the target platform's native endianness is used, portable code\nshould use [`to_be_bytes`] or [`to_le_bytes`], as appropriate,\ninstead.\n\n\n\n[`to_be_bytes`]: Self::to_be_bytes\n[`to_le_bytes`]: Self::to_le_bytes\n\n# Examples\n\n```\nlet bytes = 0x12345678i32.to_ne_bytes();\nassert_eq!(\n bytes,\n if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78]\n } else {\n [0x78, 0x56, 0x34, 0x12]\n }\n);\n```",
+ "docs": "Unchecked integer division without remainder. Computes `self / rhs`.\n\n# Safety\n\nThis results in undefined behavior when `rhs == 0`, `self % rhs != 0`, or\n`self == i16::MIN && rhs == -1`,\ni.e. when [`checked_exact_div`](Self::checked_exact_div) would return `None`.",
"id": 10435,
"inner": {
"function": {
@@ -35722,7 +34158,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -35731,32 +34167,32 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "array": {
- "len": "4",
- "type": {
- "primitive": "u8"
- }
- }
+ "primitive": "i16"
}
}
}
},
"links": {
- "Self::to_be_bytes": 10433,
- "Self::to_le_bytes": 10434
+ "Self::checked_exact_div": 10433
},
- "name": "to_ne_bytes",
+ "name": "unchecked_exact_div",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -35766,20 +34202,20 @@
"10436": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Creates an integer value from its representation as a byte array in\nbig endian.\n\n\n\n# Examples\n\n```\nlet value = i32::from_be_bytes([0x12, 0x34, 0x56, 0x78]);\nassert_eq!(value, 0x12345678);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_be_i32(input: &mut &[u8]) -> i32 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n i32::from_be_bytes(int_bytes.try_into().unwrap())\n}\n```",
+ "docs": "Checked integer remainder. Computes `self % rhs`, returning `None` if\n`rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!(5i16.checked_rem(2), Some(1));\nassert_eq!(5i16.checked_rem(0), None);\nassert_eq!(i16::MIN.checked_rem(-1), None);\n```",
"id": 10436,
"inner": {
"function": {
@@ -35797,33 +34233,49 @@
"sig": {
"inputs": [
[
- "bytes",
+ "self",
{
- "array": {
- "len": "4",
- "type": {
- "primitive": "u8"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i16"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "from_be_bytes",
+ "name": "checked_rem",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -35833,20 +34285,23 @@
"10437": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Creates an integer value from its representation as a byte array in\nlittle endian.\n\n\n\n# Examples\n\n```\nlet value = i32::from_le_bytes([0x78, 0x56, 0x34, 0x12]);\nassert_eq!(value, 0x12345678);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_le_i32(input: &mut &[u8]) -> i32 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n i32::from_le_bytes(int_bytes.try_into().unwrap())\n}\n```",
+ "docs": "Strict integer remainder. Computes `self % rhs`, panicking if\nthe division results in overflow.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is `x % y` for `MIN / -1` on a\nsigned type (where `MIN` is the negative minimal value), which is invalid due to implementation artifacts.\n\n# Examples\n\n```\nassert_eq!(5i16.strict_rem(2), 1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5i16.strict_rem(0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i16::MIN.strict_rem(-1);\n```",
"id": 10437,
"inner": {
"function": {
@@ -35864,33 +34319,34 @@
"sig": {
"inputs": [
[
- "bytes",
+ "self",
{
- "array": {
- "len": "4",
- "type": {
- "primitive": "u8"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "from_le_bytes",
+ "name": "strict_rem",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -35900,20 +34356,20 @@
"10438": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Creates an integer value from its memory representation as a byte\narray in native endianness.\n\nAs the target platform's native endianness is used, portable code\nlikely wants to use [`from_be_bytes`] or [`from_le_bytes`], as\nappropriate instead.\n\n[`from_be_bytes`]: Self::from_be_bytes\n[`from_le_bytes`]: Self::from_le_bytes\n\n\n\n# Examples\n\n```\nlet value = i32::from_ne_bytes(if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78]\n} else {\n [0x78, 0x56, 0x34, 0x12]\n});\nassert_eq!(value, 0x12345678);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_ne_i32(input: &mut &[u8]) -> i32 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n i32::from_ne_bytes(int_bytes.try_into().unwrap())\n}\n```",
+ "docs": "Checked Euclidean remainder. Computes `self.rem_euclid(rhs)`, returning `None`\nif `rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!(5i16.checked_rem_euclid(2), Some(1));\nassert_eq!(5i16.checked_rem_euclid(0), None);\nassert_eq!(i16::MIN.checked_rem_euclid(-1), None);\n```",
"id": 10438,
"inner": {
"function": {
@@ -35931,36 +34387,49 @@
"sig": {
"inputs": [
[
- "bytes",
+ "self",
{
- "array": {
- "len": "4",
- "type": {
- "primitive": "u8"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i16"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
- "links": {
- "Self::from_be_bytes": 10436,
- "Self::from_le_bytes": 10437
- },
- "name": "from_ne_bytes",
+ "links": {},
+ "name": "checked_rem_euclid",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -35970,21 +34439,23 @@
"10439": {
"attrs": [
{
- "other": "#[rustc_diagnostic_item = \"i32_legacy_fn_min_value\"]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_min_value\", promotable: true}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
- "deprecation": {
- "note": "replaced by the `MIN` associated constant on this type",
- "since": "TBD"
- },
- "docs": "New code should prefer to use\n[`i32::MIN`] instead.\n\nReturns the smallest value that can be represented by this integer type.",
+ "deprecation": null,
+ "docs": "Strict Euclidean remainder. Computes `self.rem_euclid(rhs)`, panicking if\nthe division results in overflow.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is `x % y` for `MIN / -1` on a\nsigned type (where `MIN` is the negative minimal value), which is invalid due to implementation artifacts.\n\n# Examples\n\n```\nassert_eq!(5i16.strict_rem_euclid(2), 1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5i16.strict_rem_euclid(0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i16::MIN.strict_rem_euclid(-1);\n```",
"id": 10439,
"inner": {
"function": {
@@ -36000,25 +34471,36 @@
"is_unsafe": false
},
"sig": {
- "inputs": [],
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i16"
+ }
+ ]
+ ],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i16"
}
}
}
},
- "links": {
- "`i32::MIN`": 10307
- },
- "name": "min_value",
+ "links": {},
+ "name": "strict_rem_euclid",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -36168,11 +34650,11 @@
"name": null,
"span": {
"begin": [
- 2319,
+ 2314,
1
],
"end": [
- 2319,
+ 2314,
93
],
"filename": "std/src/collections/hash/map.rs"
@@ -36182,21 +34664,20 @@
"10440": {
"attrs": [
{
- "other": "#[rustc_diagnostic_item = \"i32_legacy_fn_max_value\"]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
- "deprecation": {
- "note": "replaced by the `MAX` associated constant on this type",
- "since": "TBD"
- },
- "docs": "New code should prefer to use\n[`i32::MAX`] instead.\n\nReturns the largest value that can be represented by this integer type.",
+ "deprecation": null,
+ "docs": "Checked negation. Computes `-self`, returning `None` if `self == MIN`.\n\n# Examples\n\n```\nassert_eq!(5i16.checked_neg(), Some(-5));\nassert_eq!(i16::MIN.checked_neg(), None);\n```",
"id": 10440,
"inner": {
"function": {
@@ -36212,25 +34693,45 @@
"is_unsafe": false
},
"sig": {
- "inputs": [],
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i16"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
- "links": {
- "`i32::MAX`": 10308
- },
- "name": "max_value",
+ "links": {},
+ "name": "checked_neg",
"span": {
"begin": [
- 295,
+ 271,
5
],
"end": [
- 314,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -36240,29 +34741,20 @@
"10441": {
"attrs": [
{
- "other": "#[doc(alias = \"average_floor\")]"
- },
- {
- "other": "#[doc(alias = \"average_ceil\")]"
- },
- {
- "other": "#[doc(alias = \"average\")]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"num_midpoint_signed\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"num_midpoint_signed\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_neg\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the midpoint (average) between `self` and `rhs`.\n\n`midpoint(a, b)` is `(a + b) / 2` as if it were performed in a\nsufficiently-large signed integral type. This implies that the result is\nalways rounded towards zero and that no overflow will ever occur.\n\n# Examples\n\n```\nassert_eq!(0i32.midpoint(4), 2);\nassert_eq!((-1i32).midpoint(2), 0);\nassert_eq!((-7i32).midpoint(0), -3);\nassert_eq!(0i32.midpoint(-7), -3);\nassert_eq!(0i32.midpoint(7), 3);\n```",
+ "docs": "Unchecked negation. Computes `-self`, assuming overflow cannot occur.\n\n# Safety\n\nThis results in undefined behavior when\n`self == i16::MIN`,\ni.e. when [`checked_neg`] would return `None`.\n\n[`checked_neg`]: i16::checked_neg",
"id": 10441,
"inner": {
"function": {
@@ -36275,7 +34767,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -36284,221 +34776,114 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "primitive": "i16"
}
}
}
},
- "links": {},
- "name": "midpoint",
+ "links": {
+ "i16::checked_neg": 10440
+ },
+ "name": "unchecked_neg",
"span": {
"begin": [
- 315,
+ 271,
5
],
"end": [
- 315,
- 40
+ 290,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"10442": {
- "attrs": [],
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Strict negation. Computes `-self`, panicking if `self == MIN`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(5i16.strict_neg(), -5);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i16::MIN.strict_neg();\n```",
"id": 10442,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "primitive": "i32"
- },
+ "function": {
"generics": {
"params": [],
"where_predicates": []
},
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 10307,
- 10308,
- 10309,
- 10310,
- 10311,
- 10313,
- 10314,
- 10315,
- 10316,
- 10317,
- 10318,
- 10319,
- 10320,
- 10321,
- 10322,
- 10323,
- 10324,
- 10325,
- 10326,
- 10327,
- 10328,
- 10329,
- 10330,
- 10331,
- 10333,
- 10334,
- 10335,
- 10336,
- 10337,
- 10339,
- 10340,
- 10341,
- 10342,
- 10343,
- 10345,
- 10346,
- 10347,
- 10348,
- 10349,
- 10350,
- 10351,
- 10352,
- 10353,
- 10354,
- 10355,
- 10356,
- 10357,
- 10358,
- 10359,
- 10360,
- 10361,
- 10362,
- 10363,
- 10364,
- 10365,
- 10366,
- 10367,
- 10368,
- 10369,
- 10370,
- 10371,
- 10372,
- 10373,
- 10374,
- 10375,
- 10376,
- 10377,
- 10378,
- 10379,
- 10380,
- 10381,
- 10332,
- 10382,
- 10338,
- 10383,
- 10344,
- 10384,
- 10385,
- 10386,
- 10387,
- 10388,
- 10389,
- 10390,
- 10391,
- 10392,
- 10393,
- 10394,
- 10396,
- 10397,
- 10398,
- 10400,
- 10401,
- 10402,
- 10404,
- 10403,
- 10405,
- 10406,
- 10407,
- 10408,
- 10409,
- 10410,
- 10411,
- 10412,
- 10413,
- 10414,
- 10415,
- 10416,
- 10417,
- 10418,
- 10419,
- 10420,
- 10421,
- 10422,
- 10423,
- 10312,
- 10424,
- 10425,
- 10426,
- 10427,
- 10428,
- 10429,
- 10430,
- 10431,
- 10432,
- 10433,
- 10434,
- 10435,
- 10436,
- 10437,
- 10438,
- 10439,
- 10440,
- 10441
- ],
- "provided_trait_methods": [],
- "trait": null
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "i16"
+ }
+ }
}
},
"links": {},
- "name": null,
+ "name": "strict_neg",
"span": {
"begin": [
- 294,
- 1
+ 271,
+ 5
],
"end": [
- 294,
- 9
+ 290,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"10443": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 82, patch: 0})}, feature: \"const_int_from_str\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from a string slice with digits in a given base.\n\nThe string is expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\nassert_eq!(i32::from_str_radix(\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\nassert!(i32::from_str_radix(\"1 \", 10).is_err());\n```",
+ "docs": "Checked shift left. Computes `self << rhs`, returning `None` if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x1i16.checked_shl(4), Some(0x10));\nassert_eq!(0x1i16.checked_shl(129), None);\nassert_eq!(0x10i16.checked_shl(15), Some(0));\n```",
"id": 10443,
"inner": {
"function": {
@@ -36516,19 +34901,13 @@
"sig": {
"inputs": [
[
- "src",
+ "self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "primitive": "str"
- }
- }
+ "generic": "Self"
}
],
[
- "radix",
+ "rhs",
{
"primitive": "u32"
}
@@ -36542,39 +34921,30 @@
"args": [
{
"type": {
- "primitive": "i32"
- }
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 4784,
- "path": "ParseIntError"
- }
+ "primitive": "i16"
}
}
],
"constraints": []
}
},
- "id": 57,
- "path": "Result"
+ "id": 51,
+ "path": "Option"
}
}
}
}
},
"links": {},
- "name": "from_str_radix",
+ "name": "checked_shl",
"span": {
"begin": [
- 1630,
- 1
+ 271,
+ 5
],
"end": [
- 1630,
- 56
+ 290,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -36583,12 +34953,23 @@
"10444": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from an ASCII-byte slice with decimal digits.\n\nThe characters are expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(i32::from_ascii(b\"+10\"), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(i32::from_ascii(b\"1 \").is_err());\n```",
+ "docs": "Strict shift left. Computes `self << rhs`, panicking if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x1i16.strict_shl(4), 0x10);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x1i16.strict_shl(129);\n```",
"id": 10444,
"inner": {
"function": {
@@ -36606,61 +34987,35 @@
"sig": {
"inputs": [
[
- "src",
+ "self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "slice": {
- "primitive": "u8"
- }
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i32"
- }
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 4784,
- "path": "ParseIntError"
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 57,
- "path": "Result"
- }
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "from_ascii",
+ "name": "strict_shl",
"span": {
"begin": [
- 1630,
- 1
+ 271,
+ 5
],
"end": [
- 1630,
- 56
+ 290,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -36669,12 +35024,20 @@
"10445": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from an ASCII-byte slice with digits in a given base.\n\nThe characters are expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(i32::from_ascii_radix(b\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(i32::from_ascii_radix(b\"1 \", 10).is_err());\n```",
+ "docs": "Unchecked shift left. Computes `self << rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shl`] would return `None`.\n\n[`checked_shl`]: i16::checked_shl",
"id": 10445,
"inner": {
"function": {
@@ -36687,26 +35050,18 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
[
- "src",
+ "self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "slice": {
- "primitive": "u8"
- }
- }
- }
+ "generic": "Self"
}
],
[
- "radix",
+ "rhs",
{
"primitive": "u32"
}
@@ -36714,102 +35069,110 @@
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i32"
- }
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 4784,
- "path": "ParseIntError"
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 57,
- "path": "Result"
- }
+ "primitive": "i16"
}
}
}
},
- "links": {},
- "name": "from_ascii_radix",
+ "links": {
+ "i16::checked_shl": 10443
+ },
+ "name": "unchecked_shl",
"span": {
"begin": [
- 1630,
- 1
+ 271,
+ 5
],
"end": [
- 1630,
- 56
+ 290,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"10446": {
- "attrs": [],
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x1i16.unbounded_shl(4), 0x10);\nassert_eq!(0x1i16.unbounded_shl(129), 0);\n```",
"id": 10446,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "primitive": "i32"
- },
+ "function": {
"generics": {
"params": [],
"where_predicates": []
},
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 10443,
- 10444,
- 10445
- ],
- "provided_trait_methods": [],
- "trait": null
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "i16"
+ }
+ }
}
},
"links": {},
- "name": null,
+ "name": "unbounded_shl",
"span": {
"begin": [
- 1630,
- 1
+ 271,
+ 5
],
"end": [
- 1630,
- 56
+ 290,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"10447": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 138215, is_soft: false}, feature: \"int_format_into\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Allows users to write an integer (in signed decimal format) into a variable `buf` of\ntype [`NumBuffer`] that is passed by the caller by mutable reference.\n\n# Examples\n\n```\n#![feature(int_format_into)]\nuse core::fmt::NumBuffer;\n\nlet n = 0i32;\nlet mut buf = NumBuffer::new();\nassert_eq!(n.format_into(&mut buf), \"0\");\n\nlet n1 = 32i32;\nassert_eq!(n1.format_into(&mut buf), \"32\");\n\nlet n2 = i32 :: MAX;\nassert_eq!(n2.format_into(&mut buf), i32 :: MAX.to_string());\n```",
+ "docs": "Exact shift left. Computes `self << rhs` as long as it can be reversed losslessly.\n\nReturns `None` if any bits that would be shifted out differ from the resulting sign bit\nor if `rhs` >=\n`i16::BITS`.\nOtherwise, returns `Some(self << rhs)`.\n\n# Examples\n\n```\n#![feature(exact_bitshifts)]\n\nassert_eq!(0x1i16.exact_shl(4), Some(0x10));\nassert_eq!(0x1i16.exact_shl(i16::BITS - 2), Some(1 << i16::BITS - 2));\nassert_eq!(0x1i16.exact_shl(i16::BITS - 1), None);\nassert_eq!((-0x2i16).exact_shl(i16::BITS - 2), Some(-0x2 << i16::BITS - 2));\nassert_eq!((-0x2i16).exact_shl(i16::BITS - 1), None);\n```",
"id": 10447,
"inner": {
"function": {
@@ -36821,7 +35184,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -36833,131 +35196,193 @@
}
],
[
- "buf",
+ "rhs",
{
- "borrowed_ref": {
- "is_mutable": true,
- "lifetime": null,
- "type": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 10162,
- "path": "NumBuffer"
- }
- }
- }
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "primitive": "str"
- }
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i16"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
}
}
}
}
},
- "links": {
- "`NumBuffer`": 10162
- },
- "name": "format_into",
+ "links": {},
+ "name": "exact_shl",
"span": {
"begin": [
- 562,
+ 271,
5
],
"end": [
- 562,
- 95
+ 290,
+ 6
],
- "filename": "checkouts/rust/library/core/src/fmt/num.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"10448": {
- "attrs": [],
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Unchecked exact shift left. Computes `self << rhs`, assuming the operation can be\nlosslessly reversed and `rhs` cannot be larger than\n`i16::BITS`.\n\n# Safety\n\nThis results in undefined behavior when `rhs >= self.leading_zeros() && rhs >=\nself.leading_ones()` i.e. when\n[`i16::exact_shl`]\nwould return `None`.",
"id": 10448,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "primitive": "i32"
- },
+ "function": {
"generics": {
"params": [],
"where_predicates": []
},
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 10447
- ],
- "provided_trait_methods": [],
- "trait": null
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": true
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "i16"
+ }
+ }
}
},
- "links": {},
- "name": null,
+ "links": {
+ "`i16::exact_shl`": 10447
+ },
+ "name": "unchecked_exact_shl",
"span": {
"begin": [
- 562,
+ 271,
5
],
"end": [
- 562,
- 95
+ 290,
+ 6
],
- "filename": "checkouts/rust/library/core/src/fmt/num.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"10449": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "The smallest value that can be represented by this integer type\n(−263).\n\n# Examples\n\n```\nassert_eq!(i64::MIN, -9223372036854775808);\n```",
+ "docs": "Checked shift right. Computes `self >> rhs`, returning `None` if `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x10i16.checked_shr(4), Some(0x1));\nassert_eq!(0x10i16.checked_shr(128), None);\n```",
"id": 10449,
"inner": {
- "assoc_const": {
- "type": {
- "primitive": "i64"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "value": "_"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i16"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
}
},
"links": {},
- "name": "MIN",
+ "name": "checked_shr",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -37015,7 +35440,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -37027,7 +35452,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -37038,11 +35463,11 @@
"name": "fmt",
"span": {
"begin": [
- 2327,
+ 2322,
5
],
"end": [
- 2329,
+ 2324,
6
],
"filename": "std/src/collections/hash/map.rs"
@@ -37052,30 +35477,68 @@
"10450": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "The largest value that can be represented by this integer type\n(263 − 1).\n\n# Examples\n\n```\nassert_eq!(i64::MAX, 9223372036854775807);\n```",
+ "docs": "Strict shift right. Computes `self >> rhs`, panicking `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x10i16.strict_shr(4), 0x1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10i16.strict_shr(128);\n```",
"id": 10450,
"inner": {
- "assoc_const": {
- "type": {
- "primitive": "i64"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "value": "_"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "i16"
+ }
+ }
}
},
"links": {},
- "name": "MAX",
+ "name": "strict_shr",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -37085,30 +35548,67 @@
"10451": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 53, patch: 0})}, feature: \"int_bits_const\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "The size of this integer type in bits.\n\n# Examples\n\n```\nassert_eq!(i64::BITS, 64);\n```",
+ "docs": "Unchecked shift right. Computes `self >> rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shr`] would return `None`.\n\n[`checked_shr`]: i16::checked_shr",
"id": 10451,
"inner": {
- "assoc_const": {
- "type": {
- "primitive": "u32"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "value": "u64::BITS"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": true
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "i16"
+ }
+ }
}
},
- "links": {},
- "name": "BITS",
+ "links": {
+ "i16::checked_shr": 10449
+ },
+ "name": "unchecked_shr",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -37118,16 +35618,10 @@
"10452": {
"attrs": [
{
- "other": "#[doc(alias = \"popcount\")]"
- },
- {
- "other": "#[doc(alias = \"popcnt\")]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
},
{
"must_use": {
@@ -37137,7 +35631,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 0b100_0000i64;\n\nassert_eq!(n.count_ones(), 1);\n```\n",
+ "docs": "Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, which yields `0` for a positive number,\nand `-1` for a negative number.\n\n# Examples\n\n```\nassert_eq!(0x10i16.unbounded_shr(4), 0x1);\nassert_eq!(0x10i16.unbounded_shr(129), 0);\nassert_eq!(i16::MIN.unbounded_shr(129), -1);\n```",
"id": 10452,
"inner": {
"function": {
@@ -37159,24 +35653,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "count_ones",
+ "name": "unbounded_shr",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -37186,10 +35686,7 @@
"10453": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
@@ -37199,7 +35696,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of zeros in the binary representation of `self`.\n\n# Examples\n\n```\nassert_eq!(i64::MAX.count_zeros(), 1);\n```",
+ "docs": "Exact shift right. Computes `self >> rhs` as long as it can be reversed losslessly.\n\nReturns `None` if any non-zero bits would be shifted out or if `rhs` >=\n`i16::BITS`.\nOtherwise, returns `Some(self >> rhs)`.\n\n# Examples\n\n```\n#![feature(exact_bitshifts)]\n\nassert_eq!(0x10i16.exact_shr(4), Some(0x1));\nassert_eq!(0x10i16.exact_shr(5), None);\n```",
"id": 10453,
"inner": {
"function": {
@@ -37221,24 +35718,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i16"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "count_zeros",
+ "name": "exact_shr",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -37248,23 +35766,17 @@
"10454": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 2 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero.\n\n# Examples\n\n```\nassert_eq!(2i64.ilog2(), 1);\n```",
+ "docs": "Unchecked exact shift right. Computes `self >> rhs`, assuming the operation can be\nlosslessly reversed and `rhs` cannot be larger than\n`i16::BITS`.\n\n# Safety\n\nThis results in undefined behavior when `rhs > self.trailing_zeros() || rhs >=\ni16::BITS`\ni.e. when\n[`i16::exact_shr`]\nwould return `None`.",
"id": 10454,
"inner": {
"function": {
@@ -37277,7 +35789,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -37286,24 +35798,32 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i16"
}
}
}
},
- "links": {},
- "name": "ilog2",
+ "links": {
+ "`i16::exact_shr`": 10453
+ },
+ "name": "unchecked_exact_shr",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -37313,10 +35833,10 @@
"10455": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
},
{
"must_use": {
@@ -37326,7 +35846,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of leading zeros in the binary representation of `self`.\n\nDepending on what you're doing with the value, you might also be interested in the\n[`ilog2`] function which returns a consistent number, even if the type widens.\n\n# Examples\n\n```\nlet n = -1i64;\n\nassert_eq!(n.leading_zeros(), 0);\n```\n[`ilog2`]: i64::ilog2",
+ "docs": "Checked absolute value. Computes `self.abs()`, returning `None` if\n`self == MIN`.\n\n# Examples\n\n```\nassert_eq!((-5i16).checked_abs(), Some(5));\nassert_eq!(i16::MIN.checked_abs(), None);\n```",
"id": 10455,
"inner": {
"function": {
@@ -37352,22 +35872,35 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i16"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
- "links": {
- "i64::ilog2": 10454
- },
- "name": "leading_zeros",
+ "links": {},
+ "name": "checked_abs",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -37377,20 +35910,23 @@
"10456": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of trailing zeros in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = -4i64;\n\nassert_eq!(n.trailing_zeros(), 2);\n```",
+ "docs": "Strict absolute value. Computes `self.abs()`, panicking if\n`self == MIN`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((-5i16).strict_abs(), 5);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i16::MIN.strict_abs();\n```",
"id": 10456,
"inner": {
"function": {
@@ -37416,20 +35952,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "trailing_zeros",
+ "name": "strict_abs",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -37439,10 +35975,10 @@
"10457": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
@@ -37452,7 +35988,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of leading ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = -1i64;\n\nassert_eq!(n.leading_ones(), 64);\n```",
+ "docs": "Checked exponentiation. Computes `self.pow(exp)`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(8i16.checked_pow(2), Some(64));\nassert_eq!(i16::MAX.checked_pow(2), None);\n```",
"id": 10457,
"inner": {
"function": {
@@ -37474,24 +36010,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "exp",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i16"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "leading_ones",
+ "name": "checked_pow",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -37501,20 +36058,23 @@
"10458": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of trailing ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 3i64;\n\nassert_eq!(n.trailing_ones(), 2);\n```",
+ "docs": "Strict exponentiation. Computes `self.pow(exp)`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(8i16.strict_pow(2), 64);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i16::MAX.strict_pow(2);\n```",
"id": 10458,
"inner": {
"function": {
@@ -37536,24 +36096,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "exp",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "trailing_ones",
+ "name": "strict_pow",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -37563,7 +36129,10 @@
"10459": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
},
{
"must_use": {
@@ -37573,7 +36142,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `self` with only the most significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: i64 = 0b_01100100;\n\nassert_eq!(n.isolate_highest_one(), 0b_01000000);\nassert_eq!(0_i64.isolate_highest_one(), 0);\n```",
+ "docs": "Returns the square root of the number, rounded down.\n\nReturns `None` if `self` is negative.\n\n# Examples\n\n```\nassert_eq!(10i16.checked_isqrt(), Some(3));\n```",
"id": 10459,
"inner": {
"function": {
@@ -37599,20 +36168,35 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i16"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "isolate_highest_one",
+ "name": "checked_isqrt",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -37706,7 +36290,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "fmt::Debug"
}
}
@@ -37727,7 +36311,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "fmt::Debug"
}
}
@@ -37750,7 +36334,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -37759,11 +36343,11 @@
"name": null,
"span": {
"begin": [
- 2322,
+ 2317,
1
],
"end": [
- 2330,
+ 2325,
2
],
"filename": "std/src/collections/hash/map.rs"
@@ -37773,7 +36357,10 @@
"10460": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -37783,7 +36370,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `self` with only the least significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: i64 = 0b_01100100;\n\nassert_eq!(n.isolate_lowest_one(), 0b_00000100);\nassert_eq!(0_i64.isolate_lowest_one(), 0);\n```",
+ "docs": "Saturating integer addition. Computes `self + rhs`, saturating at the numeric\nbounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i16.saturating_add(1), 101);\nassert_eq!(i16::MAX.saturating_add(100), i16::MAX);\nassert_eq!(i16::MIN.saturating_add(-1), i16::MIN);\n```",
"id": 10460,
"inner": {
"function": {
@@ -37805,24 +36392,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "isolate_lowest_one",
+ "name": "saturating_add",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -37832,7 +36425,10 @@
"10461": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -37842,7 +36438,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the index of the highest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_i64.highest_one(), None);\nassert_eq!(0x1_i64.highest_one(), Some(0));\nassert_eq!(0x10_i64.highest_one(), Some(4));\nassert_eq!(0x1f_i64.highest_one(), Some(4));\n```",
+ "docs": "Saturating addition with an unsigned integer. Computes `self + rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1i16.saturating_add_unsigned(2), 3);\nassert_eq!(i16::MAX.saturating_add_unsigned(100), i16::MAX);\n```",
"id": 10461,
"inner": {
"function": {
@@ -37864,39 +36460,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "highest_one",
+ "name": "saturating_add_unsigned",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -37906,7 +36493,10 @@
"10462": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -37916,7 +36506,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the index of the lowest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_i64.lowest_one(), None);\nassert_eq!(0x1_i64.lowest_one(), Some(0));\nassert_eq!(0x10_i64.lowest_one(), Some(4));\nassert_eq!(0x1f_i64.lowest_one(), Some(0));\n```",
+ "docs": "Saturating integer subtraction. Computes `self - rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i16.saturating_sub(127), -27);\nassert_eq!(i16::MIN.saturating_sub(100), i16::MIN);\nassert_eq!(i16::MAX.saturating_sub(-1), i16::MAX);\n```",
"id": 10462,
"inner": {
"function": {
@@ -37938,39 +36528,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "lowest_one",
+ "name": "saturating_sub",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -37980,10 +36561,10 @@
"10463": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -37993,7 +36574,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the bit pattern of `self` reinterpreted as an unsigned integer of the same size.\n\nThis produces the same result as an `as` cast, but ensures that the bit-width remains\nthe same.\n\n# Examples\n\n```\nlet n = -1i64;\n\nassert_eq!(n.cast_unsigned(), u64::MAX);\n```",
+ "docs": "Saturating subtraction with an unsigned integer. Computes `self - rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i16.saturating_sub_unsigned(127), -27);\nassert_eq!(i16::MIN.saturating_sub_unsigned(100), i16::MIN);\n```",
"id": 10463,
"inner": {
"function": {
@@ -38015,24 +36596,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "cast_unsigned",
+ "name": "saturating_sub_unsigned",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -38042,10 +36629,10 @@
"10464": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 45, patch: 0})}, feature: \"saturating_neg\"}}]"
},
{
"must_use": {
@@ -38055,7 +36642,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts the bits to the left by a specified amount, `n`,\nwrapping the truncated bits to the end of the resulting integer.\n\nPlease note this isn't the same operation as the `<<` shifting operator!\n\n# Examples\n\n```\nlet n = 0xaa00000000006e1i64;\nlet m = 0x6e10aa;\n\nassert_eq!(n.rotate_left(12), m);\n```",
+ "docs": "Saturating integer negation. Computes `-self`, returning `MAX` if `self == MIN`\ninstead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i16.saturating_neg(), -100);\nassert_eq!((-100i16).saturating_neg(), 100);\nassert_eq!(i16::MIN.saturating_neg(), i16::MAX);\nassert_eq!(i16::MAX.saturating_neg(), i16::MIN + 1);\n```",
"id": 10464,
"inner": {
"function": {
@@ -38077,30 +36664,24 @@
{
"generic": "Self"
}
- ],
- [
- "n",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "rotate_left",
+ "name": "saturating_neg",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -38110,10 +36691,10 @@
"10465": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 45, patch: 0})}, feature: \"saturating_neg\"}}]"
},
{
"must_use": {
@@ -38123,7 +36704,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts the bits to the right by a specified amount, `n`,\nwrapping the truncated bits to the beginning of the resulting\ninteger.\n\nPlease note this isn't the same operation as the `>>` shifting operator!\n\n# Examples\n\n```\nlet n = 0x6e10aai64;\nlet m = 0xaa00000000006e1;\n\nassert_eq!(n.rotate_right(12), m);\n```",
+ "docs": "Saturating absolute value. Computes `self.abs()`, returning `MAX` if `self ==\nMIN` instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i16.saturating_abs(), 100);\nassert_eq!((-100i16).saturating_abs(), 100);\nassert_eq!(i16::MIN.saturating_abs(), i16::MAX);\nassert_eq!((i16::MIN + 1).saturating_abs(), i16::MAX);\n```",
"id": 10465,
"inner": {
"function": {
@@ -38145,30 +36726,24 @@
{
"generic": "Self"
}
- ],
- [
- "n",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "rotate_right",
+ "name": "saturating_abs",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -38178,10 +36753,10 @@
"10466": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -38191,7 +36766,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Reverses the byte order of the integer.\n\n# Examples\n\n```\nlet n = 0x1234567890123456i64;\n\nlet m = n.swap_bytes();\n\nassert_eq!(m, 0x5634129078563412);\n```",
+ "docs": "Saturating integer multiplication. Computes `self * rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(10i16.saturating_mul(12), 120);\nassert_eq!(i16::MAX.saturating_mul(10), i16::MAX);\nassert_eq!(i16::MIN.saturating_mul(10), i16::MIN);\n```",
"id": 10466,
"inner": {
"function": {
@@ -38213,24 +36788,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "swap_bytes",
+ "name": "saturating_mul",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -38240,10 +36821,10 @@
"10467": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\"}}]"
},
{
"must_use": {
@@ -38253,7 +36834,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\n second least-significant bit becomes second most-significant bit, etc.\n\n# Examples\n\n```\nlet n = 0x1234567890123456i64;\nlet m = n.reverse_bits();\n\nassert_eq!(m, 0x6a2c48091e6a2c48);\nassert_eq!(0, 0i64.reverse_bits());\n```",
+ "docs": "Saturating integer division. Computes `self / rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i16.saturating_div(2), 2);\nassert_eq!(i16::MAX.saturating_div(-1), i16::MIN + 1);\nassert_eq!(i16::MIN.saturating_div(-1), i16::MAX);\n\n```",
"id": 10467,
"inner": {
"function": {
@@ -38275,24 +36856,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "reverse_bits",
+ "name": "saturating_div",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -38302,20 +36889,20 @@
"10468": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts an integer from big endian to the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai64;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(i64::from_be(n), n)\n} else {\n assert_eq!(i64::from_be(n), n.swap_bytes())\n}\n```",
+ "docs": "Saturating integer exponentiation. Computes `self.pow(exp)`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!((-4i16).saturating_pow(3), -64);\nassert_eq!(i16::MIN.saturating_pow(2), i16::MAX);\nassert_eq!(i16::MIN.saturating_pow(3), i16::MIN);\n```",
"id": 10468,
"inner": {
"function": {
@@ -38333,28 +36920,34 @@
"sig": {
"inputs": [
[
- "x",
+ "self",
{
- "primitive": "i64"
+ "generic": "Self"
+ }
+ ],
+ [
+ "exp",
+ {
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "from_be",
+ "name": "saturating_pow",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -38364,20 +36957,20 @@
"10469": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts an integer from little endian to the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai64;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(i64::from_le(n), n)\n} else {\n assert_eq!(i64::from_le(n), n.swap_bytes())\n}\n```",
+ "docs": "Wrapping (modular) addition with an unsigned integer. Computes\n`self + rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(100i16.wrapping_add_unsigned(27), 127);\nassert_eq!(i16::MAX.wrapping_add_unsigned(2), i16::MIN + 1);\n```",
"id": 10469,
"inner": {
"function": {
@@ -38395,28 +36988,34 @@
"sig": {
"inputs": [
[
- "x",
+ "self",
{
- "primitive": "i64"
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "from_le",
+ "name": "wrapping_add_unsigned",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -38426,10 +37025,10 @@
"10470": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -38439,7 +37038,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts `self` to big endian from the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai64;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(n.to_be(), n)\n} else {\n assert_eq!(n.to_be(), n.swap_bytes())\n}\n```",
+ "docs": "Wrapping (modular) subtraction with an unsigned integer. Computes\n`self - rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(0i16.wrapping_sub_unsigned(127), -127);\nassert_eq!((-2i16).wrapping_sub_unsigned(u16::MAX), -1);\n```",
"id": 10470,
"inner": {
"function": {
@@ -38461,24 +37060,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "to_be",
+ "name": "wrapping_sub_unsigned",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -38488,10 +37093,10 @@
"10471": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
@@ -38501,7 +37106,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts `self` to little endian from the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai64;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(n.to_le(), n)\n} else {\n assert_eq!(n.to_le(), n.swap_bytes())\n}\n```",
+ "docs": "Wrapping (modular) division. Computes `self / rhs`, wrapping around at the\nboundary of the type.\n\nThe only case where such wrapping can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type. In such a case, this function returns `MIN` itself.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i16.wrapping_div(10), 10);\nassert_eq!((-128i8).wrapping_div(-1), -128);\n```",
"id": 10471,
"inner": {
"function": {
@@ -38523,24 +37128,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "to_le",
+ "name": "wrapping_div",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -38550,10 +37161,10 @@
"10472": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -38563,7 +37174,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer addition. Computes `self + rhs`, returning `None`\nif overflow occurred.\n\n# Examples\n\n```\nassert_eq!((i64::MAX - 2).checked_add(1), Some(i64::MAX - 1));\nassert_eq!((i64::MAX - 2).checked_add(3), None);\n```",
+ "docs": "Wrapping Euclidean division. Computes `self.div_euclid(rhs)`,\nwrapping around at the boundary of the type.\n\nWrapping will only occur in `MIN / -1` on a signed type (where `MIN` is the negative minimal value\nfor the type). This is equivalent to `-MIN`, a positive value that is too large to represent in the\ntype. In this case, this method returns `MIN` itself.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i16.wrapping_div_euclid(10), 10);\nassert_eq!((-128i8).wrapping_div_euclid(-1), -128);\n```",
"id": 10472,
"inner": {
"function": {
@@ -38589,41 +37200,26 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i64"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "checked_add",
+ "name": "wrapping_div_euclid",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -38633,23 +37229,20 @@
"10473": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer addition. Computes `self + rhs`, panicking\nif overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((i64::MAX - 2).strict_add(1), i64::MAX - 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i64::MAX - 2).strict_add(3);\n```",
+ "docs": "Wrapping (modular) remainder. Computes `self % rhs`, wrapping around at the\nboundary of the type.\n\nSuch wrap-around never actually occurs mathematically; implementation artifacts make `x % y`\ninvalid for `MIN / -1` on a signed type (where `MIN` is the negative minimal value). In such a case,\nthis function returns `0`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i16.wrapping_rem(10), 0);\nassert_eq!((-128i8).wrapping_rem(-1), 0);\n```",
"id": 10473,
"inner": {
"function": {
@@ -38675,26 +37268,26 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "strict_add",
+ "name": "wrapping_rem",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -38704,10 +37297,10 @@
"10474": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -38717,7 +37310,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) addition. Computes `self + rhs`, wrapping around at the\nboundary of the type.\n\n# Examples\n\n```\nassert_eq!(100i64.wrapping_add(27), 127);\nassert_eq!(i64::MAX.wrapping_add(2), i64::MIN + 1);\n```",
+ "docs": "Wrapping Euclidean remainder. Computes `self.rem_euclid(rhs)`, wrapping around\nat the boundary of the type.\n\nWrapping will only occur in `MIN % -1` on a signed type (where `MIN` is the negative minimal value\nfor the type). In this case, this method returns 0.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i16.wrapping_rem_euclid(10), 0);\nassert_eq!((-128i8).wrapping_rem_euclid(-1), 0);\n```",
"id": 10474,
"inner": {
"function": {
@@ -38743,26 +37336,26 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "wrapping_add",
+ "name": "wrapping_rem_euclid",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -38772,23 +37365,20 @@
"10475": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer addition. Computes `self + rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_add(y)` is semantically equivalent to calling\n`x.`[`checked_add`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_add`].\n\n# Safety\n\nThis results in undefined behavior when\n`self + rhs > i64::MAX` or `self + rhs < i64::MIN`,\ni.e. when [`checked_add`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_add`]: i64::checked_add\n[`wrapping_add`]: i64::wrapping_add",
+ "docs": "Wrapping (modular) negation. Computes `-self`, wrapping around at the boundary\nof the type.\n\nThe only case where such wrapping can occur is when one negates `MIN` on a signed type (where `MIN`\nis the negative minimal value for the type); this is a positive value that is too large to represent\nin the type. In such a case, this function returns `MIN` itself.\n\n# Examples\n\n```\nassert_eq!(100i16.wrapping_neg(), -100);\nassert_eq!((-100i16).wrapping_neg(), 100);\nassert_eq!(i16::MIN.wrapping_neg(), i16::MIN);\n```",
"id": 10475,
"inner": {
"function": {
@@ -38801,7 +37391,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -38810,33 +37400,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i64"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i16"
}
}
}
},
- "links": {
- "i64::checked_add": 10472,
- "i64::wrapping_add": 10474
- },
- "name": "unchecked_add",
+ "links": {},
+ "name": "wrapping_neg",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -38846,10 +37427,10 @@
"10476": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
@@ -38859,7 +37440,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked addition with an unsigned integer. Computes `self + rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1i64.checked_add_unsigned(2), Some(3));\nassert_eq!((i64::MAX - 2).checked_add_unsigned(3), None);\n```",
+ "docs": "Panic-free bitwise shift-left; yields `self << mask(rhs)`, where `mask` removes\nany high-order bits of `rhs` that would cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-left; the RHS of a wrapping shift-left is restricted to\nthe range of the type, rather than the bits shifted out of the LHS being returned to the other end.\nThe primitive integer types all implement a [`rotate_left`](Self::rotate_left) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!((-1i16).wrapping_shl(7), -128);\nassert_eq!((-1i16).wrapping_shl(128), -1);\n```",
"id": 10476,
"inner": {
"function": {
@@ -38885,41 +37466,28 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i64"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i16"
}
}
}
},
- "links": {},
- "name": "checked_add_unsigned",
+ "links": {
+ "Self::rotate_left": 10405
+ },
+ "name": "wrapping_shl",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -38929,23 +37497,20 @@
"10477": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict addition with an unsigned integer. Computes `self + rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1i64.strict_add_unsigned(2), 3);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i64::MAX - 2).strict_add_unsigned(3);\n```",
+ "docs": "Panic-free bitwise shift-right; yields `self >> mask(rhs)`, where `mask`\nremoves any high-order bits of `rhs` that would cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-right; the RHS of a wrapping shift-right is restricted\nto the range of the type, rather than the bits shifted out of the LHS being returned to the other\nend. The primitive integer types all implement a [`rotate_right`](Self::rotate_right) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!((-128i16).wrapping_shr(7), -1);\nassert_eq!((-128i16).wrapping_shr(64), -128);\n```",
"id": 10477,
"inner": {
"function": {
@@ -38971,26 +37536,28 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i16"
}
}
}
},
- "links": {},
- "name": "strict_add_unsigned",
+ "links": {
+ "Self::rotate_right": 10406
+ },
+ "name": "wrapping_shr",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -39000,10 +37567,10 @@
"10478": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
},
{
"must_use": {
@@ -39013,7 +37580,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer subtraction. Computes `self - rhs`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!((i64::MIN + 2).checked_sub(1), Some(i64::MIN + 1));\nassert_eq!((i64::MIN + 2).checked_sub(3), None);\n```",
+ "docs": "Wrapping (modular) absolute value. Computes `self.abs()`, wrapping around at\nthe boundary of the type.\n\nThe only case where such wrapping can occur is when one takes the absolute value of the negative\nminimal value for the type; this is a positive value that is too large to represent in the type. In\nsuch a case, this function returns `MIN` itself.\n\n# Examples\n\n```\nassert_eq!(100i16.wrapping_abs(), 100);\nassert_eq!((-100i16).wrapping_abs(), 100);\nassert_eq!(i16::MIN.wrapping_abs(), i16::MIN);\nassert_eq!((-128i8).wrapping_abs() as u8, 128);\n```",
"id": 10478,
"inner": {
"function": {
@@ -39035,45 +37602,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i64"
- }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i64"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "checked_sub",
+ "name": "wrapping_abs",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -39083,23 +37629,20 @@
"10479": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 51, patch: 0})}, feature: \"unsigned_abs\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 51, patch: 0})}, feature: \"unsigned_abs\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer subtraction. Computes `self - rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((i64::MIN + 2).strict_sub(1), i64::MIN + 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i64::MIN + 2).strict_sub(3);\n```",
+ "docs": "Computes the absolute value of `self` without any wrapping\nor panicking.\n\n\n# Examples\n\n```\nassert_eq!(100i16.unsigned_abs(), 100u16);\nassert_eq!((-100i16).unsigned_abs(), 100u16);\nassert_eq!((-128i8).unsigned_abs(), 128u8);\n```",
"id": 10479,
"inner": {
"function": {
@@ -39121,30 +37664,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i64"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "strict_sub",
+ "name": "unsigned_abs",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -39282,10 +37819,10 @@
"10480": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
@@ -39295,7 +37832,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) subtraction. Computes `self - rhs`, wrapping around at the\nboundary of the type.\n\n# Examples\n\n```\nassert_eq!(0i64.wrapping_sub(127), -127);\nassert_eq!((-2i64).wrapping_sub(i64::MAX), i64::MAX);\n```",
+ "docs": "Wrapping (modular) exponentiation. Computes `self.pow(exp)`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(3i16.wrapping_pow(4), 81);\nassert_eq!(3i8.wrapping_pow(5), -13);\nassert_eq!(3i8.wrapping_pow(6), -39);\n```",
"id": 10480,
"inner": {
"function": {
@@ -39319,28 +37856,28 @@
}
],
[
- "rhs",
+ "exp",
{
- "primitive": "i64"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "wrapping_sub",
+ "name": "wrapping_pow",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -39350,23 +37887,20 @@
"10481": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer subtraction. Computes `self - rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_sub(y)` is semantically equivalent to calling\n`x.`[`checked_sub`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_sub`].\n\n# Safety\n\nThis results in undefined behavior when\n`self - rhs > i64::MAX` or `self - rhs < i64::MIN`,\ni.e. when [`checked_sub`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_sub`]: i64::checked_sub\n[`wrapping_sub`]: i64::wrapping_sub",
+ "docs": "Calculates `self` + `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would have\noccurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5i16.overflowing_add(2), (7, false));\nassert_eq!(i16::MAX.overflowing_add(1), (i16::MIN, true));\n```",
"id": 10481,
"inner": {
"function": {
@@ -39379,7 +37913,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -39392,29 +37926,33 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "tuple": [
+ {
+ "primitive": "i16"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
- "links": {
- "i64::checked_sub": 10478,
- "i64::wrapping_sub": 10480
- },
- "name": "unchecked_sub",
+ "links": {},
+ "name": "overflowing_add",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -39424,10 +37962,10 @@
"10482": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_bigint_helpers\"}}]"
},
{
"must_use": {
@@ -39437,7 +37975,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked subtraction with an unsigned integer. Computes `self - rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1i64.checked_sub_unsigned(2), Some(-1));\nassert_eq!((i64::MIN + 2).checked_sub_unsigned(3), None);\n```",
+ "docs": "Calculates `self` + `rhs` + `carry` and returns a tuple containing\nthe sum and the output carry (in that order).\n\nPerforms \"ternary addition\" of two integer operands and a carry-in\nbit, and returns an output integer and a carry-out bit. This allows\nchaining together multiple additions to create a wider addition, and\ncan be useful for bignum addition.\n\nThis can be thought of as a 16-bit \"full adder\", in the electronics sense.\n\nIf the input carry is false, this method is equivalent to\n[`overflowing_add`](Self::overflowing_add), and the output carry is\nequal to the overflow flag. Note that although carry and overflow\nflags are similar for unsigned integers, they are different for\nsigned integers.\n\n# Examples\n\n```\n// 3 MAX (a = 3 × 2^16 + 2^16 - 1)\n// + 5 7 (b = 5 × 2^16 + 7)\n// ---------\n// 9 6 (sum = 9 × 2^16 + 6)\n\nlet (a1, a0): (u16, u16) = (3, u16::MAX);\nlet (b1, b0): (u16, u16) = (5, 7);\nlet carry0 = false;\n\nlet (sum0, carry1) = a0.carrying_add(b0, carry0);\nassert_eq!(carry1, true);\nlet (sum1, carry2) = a1.carrying_add(b1, carry1);\nassert_eq!(carry2, false);\n\nassert_eq!((sum1, sum0), (9, 6));\n```",
"id": 10482,
"inner": {
"function": {
@@ -39463,41 +38001,41 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u16"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "bool"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i64"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "u16"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "checked_sub_unsigned",
+ "links": {
+ "Self::overflowing_add": 11224
+ },
+ "name": "carrying_add",
"span": {
"begin": [
- 319,
+ 1084,
5
],
"end": [
- 338,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -39507,23 +38045,17 @@
"10483": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict subtraction with an unsigned integer. Computes `self - rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1i64.strict_sub_unsigned(2), -1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i64::MIN + 2).strict_sub_unsigned(3);\n```",
+ "docs": "Calculates `self` + `rhs` + `carry` and checks for overflow.\n\nPerforms \"ternary addition\" of two integer operands and a carry-in\nbit, and returns a tuple of the sum along with a boolean indicating\nwhether an arithmetic overflow would occur. On overflow, the wrapped\nvalue is returned.\n\nThis allows chaining together multiple additions to create a wider\naddition, and can be useful for bignum addition. This method should\nonly be used for the most significant word; for the less significant\nwords the unsigned method\n[`u16::carrying_add`]\nshould be used.\n\nThe output boolean returned by this method is *not* a carry flag,\nand should *not* be added to a more significant word.\n\nIf the input carry is false, this method is equivalent to\n[`overflowing_add`](Self::overflowing_add).\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n// Only the most significant word is signed.\n//\n// 10 MAX (a = 10 × 2^16 + 2^16 - 1)\n// + -5 9 (b = -5 × 2^16 + 9)\n// ---------\n// 6 8 (sum = 6 × 2^16 + 8)\n\nlet (a1, a0): (i16, u16) = (10, u16::MAX);\nlet (b1, b0): (i16, u16) = (-5, 9);\nlet carry0 = false;\n\n// u16::carrying_add for the less significant words\nlet (sum0, carry1) = a0.carrying_add(b0, carry0);\nassert_eq!(carry1, true);\n\n// i16::carrying_add for the most significant word\nlet (sum1, overflow) = a1.carrying_add(b1, carry1);\nassert_eq!(overflow, false);\n\nassert_eq!((sum1, sum0), (6, 8));\n```",
"id": 10483,
"inner": {
"function": {
@@ -39549,26 +38081,42 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "i16"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "bool"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "tuple": [
+ {
+ "primitive": "i16"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "strict_sub_unsigned",
+ "links": {
+ "Self::overflowing_add": 10481,
+ "`u16::carrying_add`": 10482
+ },
+ "name": "carrying_add",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -39578,10 +38126,10 @@
"10484": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -39591,7 +38139,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer multiplication. Computes `self * rhs`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(i64::MAX.checked_mul(1), Some(i64::MAX));\nassert_eq!(i64::MAX.checked_mul(2), None);\n```",
+ "docs": "Calculates `self` + `rhs` with an unsigned `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1i16.overflowing_add_unsigned(2), (3, false));\nassert_eq!((i16::MIN).overflowing_add_unsigned(u16::MAX), (i16::MAX, false));\nassert_eq!((i16::MAX - 2).overflowing_add_unsigned(3), (i16::MIN, true));\n```",
"id": 10484,
"inner": {
"function": {
@@ -39617,41 +38165,33 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i64"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i16"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_mul",
+ "name": "overflowing_add_unsigned",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -39661,23 +38201,20 @@
"10485": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer multiplication. Computes `self * rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(i64::MAX.strict_mul(1), i64::MAX);\n```\n\nThe following panics because of overflow:\n\n``` should_panic\nlet _ = i64::MAX.strict_mul(2);\n```",
+ "docs": "Calculates `self` - `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating whether an arithmetic overflow\nwould occur. If an overflow would have occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5i16.overflowing_sub(2), (3, false));\nassert_eq!(i16::MIN.overflowing_sub(1), (i16::MAX, true));\n```",
"id": 10485,
"inner": {
"function": {
@@ -39703,26 +38240,33 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "tuple": [
+ {
+ "primitive": "i16"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "strict_mul",
+ "name": "overflowing_sub",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -39732,10 +38276,10 @@
"10486": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_bigint_helpers\"}}]"
},
{
"must_use": {
@@ -39745,7 +38289,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) multiplication. Computes `self * rhs`, wrapping around at\nthe boundary of the type.\n\n# Examples\n\n```\nassert_eq!(10i64.wrapping_mul(12), 120);\nassert_eq!(11i8.wrapping_mul(12), -124);\n```",
+ "docs": "Calculates `self` − `rhs` − `borrow` and returns a tuple\ncontaining the difference and the output borrow.\n\nPerforms \"ternary subtraction\" by subtracting both an integer\noperand and a borrow-in bit from `self`, and returns an output\ninteger and a borrow-out bit. This allows chaining together multiple\nsubtractions to create a wider subtraction, and can be useful for\nbignum subtraction.\n\n# Examples\n\n```\n// 9 6 (a = 9 × 2^16 + 6)\n// - 5 7 (b = 5 × 2^16 + 7)\n// ---------\n// 3 MAX (diff = 3 × 2^16 + 2^16 - 1)\n\nlet (a1, a0): (u16, u16) = (9, 6);\nlet (b1, b0): (u16, u16) = (5, 7);\nlet borrow0 = false;\n\nlet (diff0, borrow1) = a0.borrowing_sub(b0, borrow0);\nassert_eq!(borrow1, true);\nlet (diff1, borrow2) = a1.borrowing_sub(b1, borrow1);\nassert_eq!(borrow2, false);\n\nassert_eq!((diff1, diff0), (3, u16::MAX));\n```",
"id": 10486,
"inner": {
"function": {
@@ -39771,26 +38315,39 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "u16"
+ }
+ ],
+ [
+ "borrow",
+ {
+ "primitive": "bool"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "tuple": [
+ {
+ "primitive": "u16"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "wrapping_mul",
+ "name": "borrowing_sub",
"span": {
"begin": [
- 319,
+ 1084,
5
],
"end": [
- 338,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -39800,23 +38357,17 @@
"10487": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer multiplication. Computes `self * rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_mul(y)` is semantically equivalent to calling\n`x.`[`checked_mul`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_mul`].\n\n# Safety\n\nThis results in undefined behavior when\n`self * rhs > i64::MAX` or `self * rhs < i64::MIN`,\ni.e. when [`checked_mul`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_mul`]: i64::checked_mul\n[`wrapping_mul`]: i64::wrapping_mul",
+ "docs": "Calculates `self` − `rhs` − `borrow` and checks for\noverflow.\n\nPerforms \"ternary subtraction\" by subtracting both an integer\noperand and a borrow-in bit from `self`, and returns a tuple of the\ndifference along with a boolean indicating whether an arithmetic\noverflow would occur. On overflow, the wrapped value is returned.\n\nThis allows chaining together multiple subtractions to create a\nwider subtraction, and can be useful for bignum subtraction. This\nmethod should only be used for the most significant word; for the\nless significant words the unsigned method\n[`u16::borrowing_sub`]\nshould be used.\n\nThe output boolean returned by this method is *not* a borrow flag,\nand should *not* be subtracted from a more significant word.\n\nIf the input borrow is false, this method is equivalent to\n[`overflowing_sub`](Self::overflowing_sub).\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n// Only the most significant word is signed.\n//\n// 6 8 (a = 6 × 2^16 + 8)\n// - -5 9 (b = -5 × 2^16 + 9)\n// ---------\n// 10 MAX (diff = 10 × 2^16 + 2^16 - 1)\n\nlet (a1, a0): (i16, u16) = (6, 8);\nlet (b1, b0): (i16, u16) = (-5, 9);\nlet borrow0 = false;\n\n// u16::borrowing_sub for the less significant words\nlet (diff0, borrow1) = a0.borrowing_sub(b0, borrow0);\nassert_eq!(borrow1, true);\n\n// i16::borrowing_sub for the most significant word\nlet (diff1, overflow) = a1.borrowing_sub(b1, borrow1);\nassert_eq!(overflow, false);\n\nassert_eq!((diff1, diff0), (10, u16::MAX));\n```",
"id": 10487,
"inner": {
"function": {
@@ -39829,7 +38380,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -39842,29 +38393,42 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "i16"
+ }
+ ],
+ [
+ "borrow",
+ {
+ "primitive": "bool"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "tuple": [
+ {
+ "primitive": "i16"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {
- "i64::checked_mul": 10484,
- "i64::wrapping_mul": 10486
+ "Self::overflowing_sub": 10485,
+ "`u16::borrowing_sub`": 10486
},
- "name": "unchecked_mul",
+ "name": "borrowing_sub",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -39874,10 +38438,10 @@
"10488": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -39887,7 +38451,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division. Computes `self / rhs`, returning `None` if `rhs == 0`\nor the division results in overflow.\n\n# Examples\n\n```\nassert_eq!((i64::MIN + 1).checked_div(-1), Some(9223372036854775807));\nassert_eq!(i64::MIN.checked_div(-1), None);\nassert_eq!((1i64).checked_div(0), None);\n```",
+ "docs": "Calculates `self` - `rhs` with an unsigned `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1i16.overflowing_sub_unsigned(2), (-1, false));\nassert_eq!((i16::MAX).overflowing_sub_unsigned(u16::MAX), (i16::MIN, false));\nassert_eq!((i16::MIN + 2).overflowing_sub_unsigned(3), (i16::MAX, true));\n```",
"id": 10488,
"inner": {
"function": {
@@ -39913,41 +38477,33 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i64"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i16"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_div",
+ "name": "overflowing_sub_unsigned",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -39957,23 +38513,20 @@
"10489": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer division. Computes `self / rhs`, panicking\nif overflow occurred.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type.\n\n# Examples\n\n```\nassert_eq!((i64::MIN + 1).strict_div(-1), 9223372036854775807);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i64::MIN.strict_div(-1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1i64).strict_div(0);\n```",
+ "docs": "Calculates the multiplication of `self` and `rhs`.\n\nReturns a tuple of the multiplication along with a boolean indicating whether an arithmetic overflow\nwould occur. If an overflow would have occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5i16.overflowing_mul(2), (10, false));\nassert_eq!(1_000_000_000i32.overflowing_mul(10), (1410065408, true));\n```",
"id": 10489,
"inner": {
"function": {
@@ -39999,26 +38552,33 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "tuple": [
+ {
+ "primitive": "i16"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "strict_div",
+ "name": "overflowing_mul",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -40156,10 +38716,10 @@
"10490": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
},
{
"must_use": {
@@ -40169,7 +38729,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked Euclidean division. Computes `self.div_euclid(rhs)`,\nreturning `None` if `rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!((i64::MIN + 1).checked_div_euclid(-1), Some(9223372036854775807));\nassert_eq!(i64::MIN.checked_div_euclid(-1), None);\nassert_eq!((1i64).checked_div_euclid(0), None);\n```",
+ "docs": "Calculates the \"full multiplication\" `self * rhs + carry`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need the `carry`, then you can use [`Self::widening_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.carrying_mul(-2, 0), (4294967286, -1));\nassert_eq!(5i32.carrying_mul(-2, 10), (0, 0));\nassert_eq!(1_000_000_000i32.carrying_mul(-10, 0), (2884901888, -3));\nassert_eq!(1_000_000_000i32.carrying_mul(-10, 10), (2884901898, -3));\nassert_eq!(i16::MAX.carrying_mul(i16::MAX, i16::MAX), (i16::MAX.unsigned_abs() + 1, i16::MAX / 2));\n```",
"id": 10490,
"inner": {
"function": {
@@ -40195,41 +38755,41 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "i16"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i64"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "u16"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "i16"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "checked_div_euclid",
+ "links": {
+ "`Self::widening_mul`": 10491
+ },
+ "name": "carrying_mul",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -40239,23 +38799,20 @@
"10491": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict Euclidean division. Computes `self.div_euclid(rhs)`, panicking\nif overflow occurred.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type.\n\n# Examples\n\n```\nassert_eq!((i64::MIN + 1).strict_div_euclid(-1), 9223372036854775807);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i64::MIN.strict_div_euclid(-1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1i64).strict_div_euclid(0);\n```",
+ "docs": "Calculates the complete product `self * rhs` without the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nIf you also need to add a carry to the wide result, then you want\n[`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.widening_mul(-2), (4294967286, -1));\nassert_eq!(1_000_000_000i32.widening_mul(-10), (2884901888, -3));\n```",
"id": 10491,
"inner": {
"function": {
@@ -40281,26 +38838,35 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "tuple": [
+ {
+ "primitive": "u16"
+ },
+ {
+ "primitive": "i16"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "strict_div_euclid",
+ "links": {
+ "`Self::carrying_mul`": 10490
+ },
+ "name": "widening_mul",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -40310,7 +38876,10 @@
"10492": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
},
{
"must_use": {
@@ -40320,7 +38889,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division without remainder. Computes `self / rhs`,\nreturning `None` if `rhs == 0`, the division results in overflow,\nor `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!((i64::MIN + 1).checked_exact_div(-1), Some(9223372036854775807));\nassert_eq!((-5i64).checked_exact_div(2), None);\nassert_eq!(i64::MIN.checked_exact_div(-1), None);\nassert_eq!((1i64).checked_exact_div(0), None);\n```",
+ "docs": "Calculates the \"full multiplication\" `self * rhs + carry1 + carry2`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need either `carry`, then you can use [`Self::widening_mul`] instead,\nand if you only need one `carry`, then you can use [`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.carrying_mul_add(-2, 0, 0), (4294967286, -1));\nassert_eq!(5i32.carrying_mul_add(-2, 10, 10), (10, 0));\nassert_eq!(1_000_000_000i32.carrying_mul_add(-10, 0, 0), (2884901888, -3));\nassert_eq!(1_000_000_000i32.carrying_mul_add(-10, 10, 10), (2884901908, -3));\nassert_eq!(i16::MAX.carrying_mul_add(i16::MAX, i16::MAX, i16::MAX), (u16::MAX, i16::MAX / 2));\n```",
"id": 10492,
"inner": {
"function": {
@@ -40346,41 +38915,48 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "i16"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "i16"
+ }
+ ],
+ [
+ "add",
+ {
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i64"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "u16"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "i16"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "checked_exact_div",
+ "links": {
+ "`Self::carrying_mul`": 10490,
+ "`Self::widening_mul`": 10491
+ },
+ "name": "carrying_mul_add",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -40390,7 +38966,10 @@
"10493": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -40400,7 +38979,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division without remainder. Computes `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs == 0`, the division results in overflow,\nor `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64i64.exact_div(2), 32);\nassert_eq!(64i64.exact_div(32), 2);\nassert_eq!((i64::MIN + 1).exact_div(-1), 9223372036854775807);\n```\n\n```should_panic\n#![feature(exact_div)]\nlet _ = 65i64.exact_div(2);\n```\n```should_panic\n#![feature(exact_div)]\nlet _ = i64::MIN.exact_div(-1);\n```",
+ "docs": "Calculates the divisor when `self` is divided by `rhs`.\n\nReturns a tuple of the divisor along with a boolean indicating whether an arithmetic overflow would\noccur. If an overflow would occur then self is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i16.overflowing_div(2), (2, false));\nassert_eq!(i16::MIN.overflowing_div(-1), (i16::MIN, true));\n```",
"id": 10493,
"inner": {
"function": {
@@ -40426,106 +39005,46 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
- }
- }
- }
- },
- "links": {},
- "name": "exact_div",
- "span": {
- "begin": [
- 319,
- 5
- ],
- "end": [
- 338,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "10494": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Unchecked integer division without remainder. Computes `self / rhs`.\n\n# Safety\n\nThis results in undefined behavior when `rhs == 0`, `self % rhs != 0`, or\n`self == i64::MIN && rhs == -1`,\ni.e. when [`checked_exact_div`](Self::checked_exact_div) would return `None`.",
- "id": 10494,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": true
- },
- "sig": {
- "inputs": [
- [
- "self",
+ "tuple": [
{
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "primitive": "i16"
+ },
{
- "primitive": "i64"
+ "primitive": "bool"
}
]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i64"
}
}
}
},
- "links": {
- "Self::checked_exact_div": 10492
- },
- "name": "unchecked_exact_div",
+ "links": {},
+ "name": "overflowing_div",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10495": {
+ "10494": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -40535,8 +39054,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer remainder. Computes `self % rhs`, returning `None` if\n`rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!(5i64.checked_rem(2), Some(1));\nassert_eq!(5i64.checked_rem(0), None);\nassert_eq!(i64::MIN.checked_rem(-1), None);\n```",
- "id": 10495,
+ "docs": "Calculates the quotient of Euclidean division `self.div_euclid(rhs)`.\n\nReturns a tuple of the divisor along with a boolean indicating whether an arithmetic overflow would\noccur. If an overflow would occur then `self` is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i16.overflowing_div_euclid(2), (2, false));\nassert_eq!(i16::MIN.overflowing_div_euclid(-1), (i16::MIN, true));\n```",
+ "id": 10494,
"inner": {
"function": {
"generics": {
@@ -40561,68 +39080,57 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i64"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i16"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_rem",
+ "name": "overflowing_div_euclid",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10496": {
+ "10495": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer remainder. Computes `self % rhs`, panicking if\nthe division results in overflow.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is `x % y` for `MIN / -1` on a\nsigned type (where `MIN` is the negative minimal value), which is invalid due to implementation artifacts.\n\n# Examples\n\n```\nassert_eq!(5i64.strict_rem(2), 1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5i64.strict_rem(0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i64::MIN.strict_rem(-1);\n```",
- "id": 10496,
+ "docs": "Calculates the remainder when `self` is divided by `rhs`.\n\nReturns a tuple of the remainder after dividing along with a boolean indicating whether an\narithmetic overflow would occur. If an overflow would occur then 0 is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i16.overflowing_rem(2), (1, false));\nassert_eq!(i16::MIN.overflowing_rem(-1), (0, true));\n```",
+ "id": 10495,
"inner": {
"function": {
"generics": {
@@ -40647,33 +39155,40 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "tuple": [
+ {
+ "primitive": "i16"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "strict_rem",
+ "name": "overflowing_rem",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10497": {
+ "10496": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
@@ -40685,12 +39200,15 @@
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked Euclidean remainder. Computes `self.rem_euclid(rhs)`, returning `None`\nif `rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!(5i64.checked_rem_euclid(2), Some(1));\nassert_eq!(5i64.checked_rem_euclid(0), None);\nassert_eq!(i64::MIN.checked_rem_euclid(-1), None);\n```",
- "id": 10497,
+ "docs": "Overflowing Euclidean remainder. Calculates `self.rem_euclid(rhs)`.\n\nReturns a tuple of the remainder after dividing along with a boolean indicating whether an\narithmetic overflow would occur. If an overflow would occur then 0 is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i16.overflowing_rem_euclid(2), (1, false));\nassert_eq!(i16::MIN.overflowing_rem_euclid(-1), (0, true));\n```",
+ "id": 10496,
"inner": {
"function": {
"generics": {
@@ -40715,67 +39233,125 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i64"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i16"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_rem_euclid",
+ "name": "overflowing_rem_euclid",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10498": {
+ "10497": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Negates self, overflowing if this is equal to the minimum value.\n\nReturns a tuple of the negated version of self along with a boolean indicating whether an overflow\nhappened. If `self` is the minimum value (e.g., `i32::MIN` for values of type `i32`), then the\nminimum value will be returned again and `true` will be returned for an overflow happening.\n\n# Examples\n\n```\nassert_eq!(2i16.overflowing_neg(), (-2, false));\nassert_eq!(i16::MIN.overflowing_neg(), (i16::MIN, true));\n```",
+ "id": 10497,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "i16"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "overflowing_neg",
+ "span": {
+ "begin": [
+ 271,
+ 5
+ ],
+ "end": [
+ 290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "10498": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict Euclidean remainder. Computes `self.rem_euclid(rhs)`, panicking if\nthe division results in overflow.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is `x % y` for `MIN / -1` on a\nsigned type (where `MIN` is the negative minimal value), which is invalid due to implementation artifacts.\n\n# Examples\n\n```\nassert_eq!(5i64.strict_rem_euclid(2), 1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5i64.strict_rem_euclid(0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i64::MIN.strict_rem_euclid(-1);\n```",
+ "docs": "Shifts self left by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean indicating whether the shift\nvalue was larger than or equal to the number of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then used to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x1i16.overflowing_shl(4), (0x10, false));\nassert_eq!(0x1i32.overflowing_shl(36), (0x10, true));\nassert_eq!(0x10i16.overflowing_shl(15), (0, false));\n```",
"id": 10498,
"inner": {
"function": {
@@ -40801,26 +39377,33 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "tuple": [
+ {
+ "primitive": "i16"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "strict_rem_euclid",
+ "name": "overflowing_shl",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -40830,7 +39413,7 @@
"10499": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
@@ -40843,7 +39426,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked negation. Computes `-self`, returning `None` if `self == MIN`.\n\n# Examples\n\n```\nassert_eq!(5i64.checked_neg(), Some(-5));\nassert_eq!(i64::MIN.checked_neg(), None);\n```",
+ "docs": "Shifts self right by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean indicating whether the shift\nvalue was larger than or equal to the number of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then used to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x10i16.overflowing_shr(4), (0x1, false));\nassert_eq!(0x10i32.overflowing_shr(36), (0x1, true));\n```",
"id": 10499,
"inner": {
"function": {
@@ -40865,39 +39448,37 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i64"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i16"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_neg",
+ "name": "overflowing_shr",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -40979,7 +39560,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -40992,20 +39573,20 @@
"10500": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_neg\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked negation. Computes `-self`, assuming overflow cannot occur.\n\n# Safety\n\nThis results in undefined behavior when\n`self == i64::MIN`,\ni.e. when [`checked_neg`] would return `None`.\n\n[`checked_neg`]: i64::checked_neg",
+ "docs": "Computes the absolute value of `self`.\n\nReturns a tuple of the absolute version of self along with a boolean indicating whether an overflow\nhappened. If self is the minimum value\n(e.g., i16::MIN for values of type i16),\nthen the minimum value will be returned again and true will be returned\nfor an overflow happening.\n\n# Examples\n\n```\nassert_eq!(10i16.overflowing_abs(), (10, false));\nassert_eq!((-10i16).overflowing_abs(), (10, false));\nassert_eq!((i16::MIN).overflowing_abs(), (i16::MIN, true));\n```",
"id": 10500,
"inner": {
"function": {
@@ -41018,7 +39599,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -41031,22 +39612,27 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "tuple": [
+ {
+ "primitive": "i16"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
- "links": {
- "i64::checked_neg": 10499
- },
- "name": "unchecked_neg",
+ "links": {},
+ "name": "overflowing_abs",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -41056,23 +39642,20 @@
"10501": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict negation. Computes `-self`, panicking if `self == MIN`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(5i64.strict_neg(), -5);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i64::MIN.strict_neg();\n",
+ "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\nReturns a tuple of the exponentiation along with a bool indicating\nwhether an overflow happened.\n\n# Examples\n\n```\nassert_eq!(3i16.overflowing_pow(4), (81, false));\nassert_eq!(3i8.overflowing_pow(5), (-13, true));\n```",
"id": 10501,
"inner": {
"function": {
@@ -41094,24 +39677,37 @@
{
"generic": "Self"
}
+ ],
+ [
+ "exp",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "tuple": [
+ {
+ "primitive": "i16"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "strict_neg",
+ "name": "overflowing_pow",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -41121,10 +39717,10 @@
"10502": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -41134,7 +39730,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked shift left. Computes `self << rhs`, returning `None` if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x1i64.checked_shl(4), Some(0x10));\nassert_eq!(0x1i64.checked_shl(129), None);\nassert_eq!(0x10i64.checked_shl(63), Some(0));\n```",
+ "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\n# Examples\n\n```\nlet x: i16 = 2; // or any other integer type\n\nassert_eq!(x.pow(5), 32);\n```",
"id": 10502,
"inner": {
"function": {
@@ -41158,7 +39754,7 @@
}
],
[
- "rhs",
+ "exp",
{
"primitive": "u32"
}
@@ -41166,35 +39762,20 @@
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i64"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "checked_shl",
+ "name": "pow",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -41204,10 +39785,10 @@
"10503": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
},
{
"must_use": {
@@ -41220,7 +39801,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict shift left. Computes `self << rhs`, panicking if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x1i64.strict_shl(4), 0x10);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x1i64.strict_shl(129);\n```",
+ "docs": "Returns the square root of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is negative.\n\n# Examples\n\n```\nassert_eq!(10i16.isqrt(), 3);\n```",
"id": 10503,
"inner": {
"function": {
@@ -41242,30 +39823,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "strict_shl",
+ "name": "isqrt",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -41275,7 +39850,10 @@
"10504": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -41288,7 +39866,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked shift left. Computes `self << rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shl`] would return `None`.\n\n[`checked_shl`]: i64::checked_shl",
+ "docs": "Calculates the quotient of Euclidean division of `self` by `rhs`.\n\nThis computes the integer `q` such that `self = q * rhs + r`, with\n`r = self.rem_euclid(rhs)` and `0 <= r < abs(rhs)`.\n\nIn other words, the result is `self / rhs` rounded to the integer `q`\nsuch that `self >= q * rhs`.\nIf `self > 0`, this is equal to rounding towards zero (the default in Rust);\nif `self < 0`, this is equal to rounding away from zero (towards +/- infinity).\nIf `rhs > 0`, this is equal to rounding towards -infinity;\nif `rhs < 0`, this is equal to rounding towards +infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\nlet a: i16 = 7; // or any other integer type\nlet b = 4;\n\nassert_eq!(a.div_euclid(b), 1); // 7 >= 4 * 1\nassert_eq!(a.div_euclid(-b), -1); // 7 >= -4 * -1\nassert_eq!((-a).div_euclid(b), -2); // -7 >= 4 * -2\nassert_eq!((-a).div_euclid(-b), 2); // -7 >= -4 * 2\n```",
"id": 10504,
"inner": {
"function": {
@@ -41301,7 +39879,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -41314,28 +39892,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i16"
}
}
}
},
- "links": {
- "i64::checked_shl": 10502
- },
- "name": "unchecked_shl",
+ "links": {},
+ "name": "div_euclid",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -41345,20 +39921,26 @@
"10505": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
+ "other": "#[doc(alias = \"modulo\", alias = \"mod\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x1i64.unbounded_shl(4), 0x10);\nassert_eq!(0x1i64.unbounded_shl(129), 0);\n```",
+ "docs": "Calculates the least nonnegative remainder of `self (mod rhs)`.\n\nThis is done as if by the Euclidean division algorithm -- given\n`r = self.rem_euclid(rhs)`, the result satisfies\n`self = rhs * self.div_euclid(rhs) + r` and `0 <= r < abs(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN` and\n`rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\nlet a: i16 = 7; // or any other integer type\nlet b = 4;\n\nassert_eq!(a.rem_euclid(b), 3);\nassert_eq!((-a).rem_euclid(b), 1);\nassert_eq!(a.rem_euclid(-b), 3);\nassert_eq!((-a).rem_euclid(-b), 1);\n```\n\nThis will panic:\n```should_panic\nlet _ = i16::MIN.rem_euclid(-1);\n```",
"id": 10505,
"inner": {
"function": {
@@ -41384,26 +39966,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "unbounded_shl",
+ "name": "rem_euclid",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -41413,20 +39995,20 @@
"10506": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked shift right. Computes `self >> rhs`, returning `None` if `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x10i64.checked_shr(4), Some(0x1));\nassert_eq!(0x10i64.checked_shr(128), None);\n```",
+ "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards negative infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nlet a: i16 = 8;\nlet b = 3;\n\nassert_eq!(a.div_floor(b), 2);\nassert_eq!(a.div_floor(-b), -3);\nassert_eq!((-a).div_floor(b), -3);\nassert_eq!((-a).div_floor(-b), 2);\n```",
"id": 10506,
"inner": {
"function": {
@@ -41452,41 +40034,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i64"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "checked_shr",
+ "name": "div_floor",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -41496,10 +40063,7 @@
"10507": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
},
{
"must_use": {
@@ -41512,7 +40076,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict shift right. Computes `self >> rhs`, panicking `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x10i64.strict_shr(4), 0x1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10i64.strict_shr(128);\n```",
+ "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards positive infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nlet a: i16 = 8;\nlet b = 3;\n\nassert_eq!(a.div_ceil(b), 3);\nassert_eq!(a.div_ceil(-b), -2);\nassert_eq!((-a).div_ceil(b), -2);\nassert_eq!((-a).div_ceil(-b), 3);\n```",
"id": 10507,
"inner": {
"function": {
@@ -41538,26 +40102,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "strict_shr",
+ "name": "div_ceil",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -41567,20 +40131,17 @@
"10508": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked shift right. Computes `self >> rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shr`] would return `None`.\n\n[`checked_shr`]: i64::checked_shr",
+ "docs": "If `rhs` is positive, calculates the smallest value greater than or\nequal to `self` that is a multiple of `rhs`. If `rhs` is negative,\ncalculates the largest value less than or equal to `self` that is a\nmultiple of `rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nOn overflow, this function will panic if overflow checks are enabled (default in debug\nmode) and wrap if overflow checks are disabled (default in release mode).\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(16_i16.next_multiple_of(8), 16);\nassert_eq!(23_i16.next_multiple_of(8), 24);\nassert_eq!(16_i16.next_multiple_of(-8), 16);\nassert_eq!(23_i16.next_multiple_of(-8), 16);\nassert_eq!((-16_i16).next_multiple_of(8), -16);\nassert_eq!((-23_i16).next_multiple_of(8), -16);\nassert_eq!((-16_i16).next_multiple_of(-8), -16);\nassert_eq!((-23_i16).next_multiple_of(-8), -24);\n```",
"id": 10508,
"inner": {
"function": {
@@ -41593,7 +40154,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -41606,28 +40167,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i16"
}
}
}
},
- "links": {
- "i64::checked_shr": 10506
- },
- "name": "unchecked_shr",
+ "links": {},
+ "name": "next_multiple_of",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -41637,10 +40196,7 @@
"10509": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
},
{
"must_use": {
@@ -41650,7 +40206,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, which yields `0` for a positive number,\nand `-1` for a negative number.\n\n# Examples\n\n```\nassert_eq!(0x10i64.unbounded_shr(4), 0x1);\nassert_eq!(0x10i64.unbounded_shr(129), 0);\nassert_eq!(i64::MIN.unbounded_shr(129), -1);\n```",
+ "docs": "If `rhs` is positive, calculates the smallest value greater than or\nequal to `self` that is a multiple of `rhs`. If `rhs` is negative,\ncalculates the largest value less than or equal to `self` that is a\nmultiple of `rhs`. Returns `None` if `rhs` is zero or the operation\nwould result in overflow.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(16_i16.checked_next_multiple_of(8), Some(16));\nassert_eq!(23_i16.checked_next_multiple_of(8), Some(24));\nassert_eq!(16_i16.checked_next_multiple_of(-8), Some(16));\nassert_eq!(23_i16.checked_next_multiple_of(-8), Some(16));\nassert_eq!((-16_i16).checked_next_multiple_of(8), Some(-16));\nassert_eq!((-23_i16).checked_next_multiple_of(8), Some(-16));\nassert_eq!((-16_i16).checked_next_multiple_of(-8), Some(-16));\nassert_eq!((-23_i16).checked_next_multiple_of(-8), Some(-24));\nassert_eq!(1_i16.checked_next_multiple_of(0), None);\nassert_eq!(i16::MAX.checked_next_multiple_of(2), None);\n```",
"id": 10509,
"inner": {
"function": {
@@ -41676,26 +40232,41 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i16"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "unbounded_shr",
+ "name": "checked_next_multiple_of",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -41790,20 +40361,23 @@
"10510": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked absolute value. Computes `self.abs()`, returning `None` if\n`self == MIN`.\n\n# Examples\n\n```\nassert_eq!((-5i64).checked_abs(), Some(5));\nassert_eq!(i64::MIN.checked_abs(), None);\n```",
+ "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nThis method might not be optimized owing to implementation details;\n`ilog2` can produce results more efficiently for base 2, and `ilog10`\ncan produce results more efficiently for base 10.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero,\nor if `base` is less than 2.\n\n# Examples\n\n```\nassert_eq!(5i16.ilog(5), 1);\n```",
"id": 10510,
"inner": {
"function": {
@@ -41825,39 +40399,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "base",
+ {
+ "primitive": "i16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i64"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "checked_abs",
+ "name": "ilog",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -41867,10 +40432,10 @@
"10511": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
@@ -41883,7 +40448,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict absolute value. Computes `self.abs()`, panicking if\n`self == MIN`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((-5i64).strict_abs(), 5);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i64::MIN.strict_abs();\n```",
+ "docs": "Returns the base 10 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero.\n\n# Example\n\n```\nassert_eq!(10i16.ilog10(), 1);\n```",
"id": 10511,
"inner": {
"function": {
@@ -41909,20 +40474,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "strict_abs",
+ "name": "ilog10",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -41932,10 +40497,10 @@
"10512": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
@@ -41945,7 +40510,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked exponentiation. Computes `self.pow(exp)`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(8i64.checked_pow(2), Some(64));\nassert_eq!(i64::MAX.checked_pow(2), None);\n```",
+ "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nReturns `None` if the number is negative or zero, or if the base is not at least 2.\n\nThis method might not be optimized owing to implementation details;\n`checked_ilog2` can produce results more efficiently for base 2, and\n`checked_ilog10` can produce results more efficiently for base 10.\n\n# Examples\n\n```\nassert_eq!(5i16.checked_ilog(5), Some(1));\n```",
"id": 10512,
"inner": {
"function": {
@@ -41969,9 +40534,9 @@
}
],
[
- "exp",
+ "base",
{
- "primitive": "u32"
+ "primitive": "i16"
}
]
],
@@ -41983,7 +40548,7 @@
"args": [
{
"type": {
- "primitive": "i64"
+ "primitive": "u32"
}
}
],
@@ -41998,14 +40563,14 @@
}
},
"links": {},
- "name": "checked_pow",
+ "name": "checked_ilog",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -42015,23 +40580,20 @@
"10513": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict exponentiation. Computes `self.pow(exp)`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(8i64.strict_pow(2), 64);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i64::MAX.strict_pow(2);\n```",
+ "docs": "Returns the base 2 logarithm of the number, rounded down.\n\nReturns `None` if the number is negative or zero.\n\n# Examples\n\n```\nassert_eq!(2i16.checked_ilog2(), Some(1));\n```",
"id": 10513,
"inner": {
"function": {
@@ -42053,30 +40615,39 @@
{
"generic": "Self"
}
- ],
- [
- "exp",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "strict_pow",
+ "name": "checked_ilog2",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -42086,10 +40657,10 @@
"10514": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
@@ -42099,7 +40670,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the square root of the number, rounded down.\n\nReturns `None` if `self` is negative.\n\n# Examples\n\n```\nassert_eq!(10i64.checked_isqrt(), Some(3));\n```",
+ "docs": "Returns the base 10 logarithm of the number, rounded down.\n\nReturns `None` if the number is negative or zero.\n\n# Example\n\n```\nassert_eq!(10i16.checked_ilog10(), Some(1));\n```",
"id": 10514,
"inner": {
"function": {
@@ -42131,7 +40702,7 @@
"args": [
{
"type": {
- "primitive": "i64"
+ "primitive": "u32"
}
}
],
@@ -42146,14 +40717,14 @@
}
},
"links": {},
- "name": "checked_isqrt",
+ "name": "checked_ilog10",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -42163,7 +40734,7 @@
"10515": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -42176,7 +40747,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer addition. Computes `self + rhs`, saturating at the numeric\nbounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i64.saturating_add(1), 101);\nassert_eq!(i64::MAX.saturating_add(100), i64::MAX);\nassert_eq!(i64::MIN.saturating_add(-1), i64::MIN);\n```",
+ "docs": "Computes the absolute value of `self`.\n\n# Overflow behavior\n\nThe absolute value of\n`i16::MIN`\ncannot be represented as an\n`i16`,\nand attempting to calculate it will cause an overflow. This means\nthat code in debug mode will trigger a panic on this case and\noptimized code will return\n`i16::MIN`\nwithout a panic. If you do not want this behavior, consider\nusing [`unsigned_abs`](Self::unsigned_abs) instead.\n\n# Examples\n\n```\nassert_eq!(10i16.abs(), 10);\nassert_eq!((-10i16).abs(), 10);\n```",
"id": 10515,
"inner": {
"function": {
@@ -42198,30 +40769,26 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i64"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i16"
}
}
}
},
- "links": {},
- "name": "saturating_add",
+ "links": {
+ "Self::unsigned_abs": 10479
+ },
+ "name": "abs",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -42231,10 +40798,10 @@
"10516": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\"}}]"
},
{
"must_use": {
@@ -42244,7 +40811,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating addition with an unsigned integer. Computes `self + rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1i64.saturating_add_unsigned(2), 3);\nassert_eq!(i64::MAX.saturating_add_unsigned(100), i64::MAX);\n```",
+ "docs": "Computes the absolute difference between `self` and `other`.\n\nThis function always returns the correct answer without overflow or\npanics by returning an unsigned integer.\n\n# Examples\n\n```\nassert_eq!(100i16.abs_diff(80), 20u16);\nassert_eq!(100i16.abs_diff(110), 10u16);\nassert_eq!((-100i16).abs_diff(80), 180u16);\nassert_eq!((-100i16).abs_diff(-120), 20u16);\nassert_eq!(i16::MIN.abs_diff(i16::MAX), u16::MAX);\n```",
"id": 10516,
"inner": {
"function": {
@@ -42268,28 +40835,28 @@
}
],
[
- "rhs",
+ "other",
{
- "primitive": "u64"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "saturating_add_unsigned",
+ "name": "abs_diff",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -42299,7 +40866,7 @@
"10517": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_int_sign\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -42312,7 +40879,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer subtraction. Computes `self - rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i64.saturating_sub(127), -27);\nassert_eq!(i64::MIN.saturating_sub(100), i64::MIN);\nassert_eq!(i64::MAX.saturating_sub(-1), i64::MAX);\n```",
+ "docs": "Returns a number representing sign of `self`.\n\n - `0` if the number is zero\n - `1` if the number is positive\n - `-1` if the number is negative\n\n# Examples\n\n```\nassert_eq!(10i16.signum(), 1);\nassert_eq!(0i16.signum(), 0);\nassert_eq!((-10i16).signum(), -1);\n```",
"id": 10517,
"inner": {
"function": {
@@ -42334,30 +40901,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i64"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "saturating_sub",
+ "name": "signum",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -42367,20 +40928,20 @@
"10518": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating subtraction with an unsigned integer. Computes `self - rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i64.saturating_sub_unsigned(127), -27);\nassert_eq!(i64::MIN.saturating_sub_unsigned(100), i64::MIN);\n```",
+ "docs": "Returns `true` if `self` is positive and `false` if the number is zero or\nnegative.\n\n# Examples\n\n```\nassert!(10i16.is_positive());\nassert!(!(-10i16).is_positive());\n```",
"id": 10518,
"inner": {
"function": {
@@ -42402,30 +40963,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u64"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "saturating_sub_unsigned",
+ "name": "is_positive",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -42435,20 +40990,20 @@
"10519": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 45, patch: 0})}, feature: \"saturating_neg\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer negation. Computes `-self`, returning `MAX` if `self == MIN`\ninstead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i64.saturating_neg(), -100);\nassert_eq!((-100i64).saturating_neg(), 100);\nassert_eq!(i64::MIN.saturating_neg(), i64::MAX);\nassert_eq!(i64::MAX.saturating_neg(), i64::MIN + 1);\n```",
+ "docs": "Returns `true` if `self` is negative and `false` if the number is zero or\npositive.\n\n# Examples\n\n```\nassert!((-10i16).is_negative());\nassert!(!10i16.is_negative());\n```",
"id": 10519,
"inner": {
"function": {
@@ -42474,20 +41029,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "saturating_neg",
+ "name": "is_negative",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -42569,7 +41124,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -42582,10 +41137,10 @@
"10520": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 45, patch: 0})}, feature: \"saturating_neg\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
@@ -42595,7 +41150,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating absolute value. Computes `self.abs()`, returning `MAX` if `self ==\nMIN` instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i64.saturating_abs(), 100);\nassert_eq!((-100i64).saturating_abs(), 100);\nassert_eq!(i64::MIN.saturating_abs(), i64::MAX);\nassert_eq!((i64::MIN + 1).saturating_abs(), i64::MAX);\n```",
+ "docs": "Returns the memory representation of this integer as a byte array in\nbig-endian (network) byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x1234i16.to_be_bytes();\nassert_eq!(bytes, [0x12, 0x34]);\n```",
"id": 10520,
"inner": {
"function": {
@@ -42621,20 +41176,25 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "array": {
+ "len": "2",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
}
}
},
"links": {},
- "name": "saturating_abs",
+ "name": "to_be_bytes",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -42644,10 +41204,10 @@
"10521": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
@@ -42657,7 +41217,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer multiplication. Computes `self * rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(10i64.saturating_mul(12), 120);\nassert_eq!(i64::MAX.saturating_mul(10), i64::MAX);\nassert_eq!(i64::MIN.saturating_mul(10), i64::MIN);\n```",
+ "docs": "Returns the memory representation of this integer as a byte array in\nlittle-endian byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x1234i16.to_le_bytes();\nassert_eq!(bytes, [0x34, 0x12]);\n```",
"id": 10521,
"inner": {
"function": {
@@ -42679,30 +41239,29 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i64"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "array": {
+ "len": "2",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
}
}
},
"links": {},
- "name": "saturating_mul",
+ "name": "to_le_bytes",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -42712,10 +41271,10 @@
"10522": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
@@ -42725,7 +41284,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer division. Computes `self / rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i64.saturating_div(2), 2);\nassert_eq!(i64::MAX.saturating_div(-1), i64::MIN + 1);\nassert_eq!(i64::MIN.saturating_div(-1), i64::MAX);\n\n```",
+ "docs": "Returns the memory representation of this integer as a byte array in\nnative byte order.\n\nAs the target platform's native endianness is used, portable code\nshould use [`to_be_bytes`] or [`to_le_bytes`], as appropriate,\ninstead.\n\n\n\n[`to_be_bytes`]: Self::to_be_bytes\n[`to_le_bytes`]: Self::to_le_bytes\n\n# Examples\n\n```\nlet bytes = 0x1234i16.to_ne_bytes();\nassert_eq!(\n bytes,\n if cfg!(target_endian = \"big\") {\n [0x12, 0x34]\n } else {\n [0x34, 0x12]\n }\n);\n```",
"id": 10522,
"inner": {
"function": {
@@ -42747,30 +41306,32 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i64"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "array": {
+ "len": "2",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
}
}
},
- "links": {},
- "name": "saturating_div",
+ "links": {
+ "Self::to_be_bytes": 10520,
+ "Self::to_le_bytes": 10521
+ },
+ "name": "to_ne_bytes",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -42780,20 +41341,20 @@
"10523": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer exponentiation. Computes `self.pow(exp)`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!((-4i64).saturating_pow(3), -64);\nassert_eq!(i64::MIN.saturating_pow(2), i64::MAX);\nassert_eq!(i64::MIN.saturating_pow(3), i64::MIN);\n```",
+ "docs": "Creates an integer value from its representation as a byte array in\nbig endian.\n\n\n\n# Examples\n\n```\nlet value = i16::from_be_bytes([0x12, 0x34]);\nassert_eq!(value, 0x1234);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_be_i16(input: &mut &[u8]) -> i16 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n i16::from_be_bytes(int_bytes.try_into().unwrap())\n}\n```",
"id": 10523,
"inner": {
"function": {
@@ -42811,34 +41372,33 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "exp",
+ "bytes",
{
- "primitive": "u32"
+ "array": {
+ "len": "2",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "saturating_pow",
+ "name": "from_be_bytes",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -42848,20 +41408,20 @@
"10524": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) addition with an unsigned integer. Computes\n`self + rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(100i64.wrapping_add_unsigned(27), 127);\nassert_eq!(i64::MAX.wrapping_add_unsigned(2), i64::MIN + 1);\n```",
+ "docs": "Creates an integer value from its representation as a byte array in\nlittle endian.\n\n\n\n# Examples\n\n```\nlet value = i16::from_le_bytes([0x34, 0x12]);\nassert_eq!(value, 0x1234);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_le_i16(input: &mut &[u8]) -> i16 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n i16::from_le_bytes(int_bytes.try_into().unwrap())\n}\n```",
"id": 10524,
"inner": {
"function": {
@@ -42879,34 +41439,33 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "bytes",
{
- "primitive": "u64"
+ "array": {
+ "len": "2",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "wrapping_add_unsigned",
+ "name": "from_le_bytes",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -42916,20 +41475,20 @@
"10525": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) subtraction with an unsigned integer. Computes\n`self - rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(0i64.wrapping_sub_unsigned(127), -127);\nassert_eq!((-2i64).wrapping_sub_unsigned(u64::MAX), -1);\n```",
+ "docs": "Creates an integer value from its memory representation as a byte\narray in native endianness.\n\nAs the target platform's native endianness is used, portable code\nlikely wants to use [`from_be_bytes`] or [`from_le_bytes`], as\nappropriate instead.\n\n[`from_be_bytes`]: Self::from_be_bytes\n[`from_le_bytes`]: Self::from_le_bytes\n\n\n\n# Examples\n\n```\nlet value = i16::from_ne_bytes(if cfg!(target_endian = \"big\") {\n [0x12, 0x34]\n} else {\n [0x34, 0x12]\n});\nassert_eq!(value, 0x1234);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_ne_i16(input: &mut &[u8]) -> i16 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n i16::from_ne_bytes(int_bytes.try_into().unwrap())\n}\n```",
"id": 10525,
"inner": {
"function": {
@@ -42947,34 +41506,36 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "bytes",
{
- "primitive": "u64"
+ "array": {
+ "len": "2",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i16"
}
}
}
},
- "links": {},
- "name": "wrapping_sub_unsigned",
+ "links": {
+ "Self::from_be_bytes": 10523,
+ "Self::from_le_bytes": 10524
+ },
+ "name": "from_ne_bytes",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -42984,20 +41545,21 @@
"10526": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
+ "other": "#[rustc_diagnostic_item = \"i16_legacy_fn_min_value\"]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_min_value\", promotable: true}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
}
],
"crate_id": 1,
- "deprecation": null,
- "docs": "Wrapping (modular) division. Computes `self / rhs`, wrapping around at the\nboundary of the type.\n\nThe only case where such wrapping can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type. In such a case, this function returns `MIN` itself.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i64.wrapping_div(10), 10);\nassert_eq!((-128i8).wrapping_div(-1), -128);\n```",
+ "deprecation": {
+ "note": "replaced by the `MIN` associated constant on this type",
+ "since": "TBD"
+ },
+ "docs": "New code should prefer to use\n[`i16::MIN`] instead.\n\nReturns the smallest value that can be represented by this integer type.",
"id": 10526,
"inner": {
"function": {
@@ -43013,36 +41575,25 @@
"is_unsafe": false
},
"sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "i64"
- }
- ]
- ],
+ "inputs": [],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i16"
}
}
}
},
- "links": {},
- "name": "wrapping_div",
+ "links": {
+ "`i16::MIN`": 10390
+ },
+ "name": "min_value",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -43052,20 +41603,21 @@
"10527": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[rustc_diagnostic_item = \"i16_legacy_fn_max_value\"]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
}
],
"crate_id": 1,
- "deprecation": null,
- "docs": "Wrapping Euclidean division. Computes `self.div_euclid(rhs)`,\nwrapping around at the boundary of the type.\n\nWrapping will only occur in `MIN / -1` on a signed type (where `MIN` is the negative minimal value\nfor the type). This is equivalent to `-MIN`, a positive value that is too large to represent in the\ntype. In this case, this method returns `MIN` itself.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i64.wrapping_div_euclid(10), 10);\nassert_eq!((-128i8).wrapping_div_euclid(-1), -128);\n```",
+ "deprecation": {
+ "note": "replaced by the `MAX` associated constant on this type",
+ "since": "TBD"
+ },
+ "docs": "New code should prefer to use\n[`i16::MAX`] instead.\n\nReturns the largest value that can be represented by this integer type.",
"id": 10527,
"inner": {
"function": {
@@ -43081,36 +41633,25 @@
"is_unsafe": false
},
"sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "i64"
- }
- ]
- ],
+ "inputs": [],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i16"
}
}
}
},
- "links": {},
- "name": "wrapping_div_euclid",
+ "links": {
+ "`i16::MAX`": 10391
+ },
+ "name": "max_value",
"span": {
"begin": [
- 319,
+ 271,
5
],
"end": [
- 338,
+ 290,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -43120,10 +41661,19 @@
"10528": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
+ "other": "#[doc(alias = \"average_floor\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[doc(alias = \"average_ceil\")]"
+ },
+ {
+ "other": "#[doc(alias = \"average\")]"
+ },
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"num_midpoint_signed\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"num_midpoint_signed\"}}]"
},
{
"must_use": {
@@ -43133,7 +41683,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) remainder. Computes `self % rhs`, wrapping around at the\nboundary of the type.\n\nSuch wrap-around never actually occurs mathematically; implementation artifacts make `x % y`\ninvalid for `MIN / -1` on a signed type (where `MIN` is the negative minimal value). In such a case,\nthis function returns `0`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i64.wrapping_rem(10), 0);\nassert_eq!((-128i8).wrapping_rem(-1), 0);\n```",
+ "docs": "Calculates the midpoint (average) between `self` and `rhs`.\n\n`midpoint(a, b)` is `(a + b) / 2` as if it were performed in a\nsufficiently-large signed integral type. This implies that the result is\nalways rounded towards zero and that no overflow will ever occur.\n\n# Examples\n\n```\nassert_eq!(0i16.midpoint(4), 2);\nassert_eq!((-1i16).midpoint(2), 0);\nassert_eq!((-7i16).midpoint(0), -3);\nassert_eq!(0i16.midpoint(-7), -3);\nassert_eq!(0i16.midpoint(7), 3);\n```",
"id": 10528,
"inner": {
"function": {
@@ -43159,99 +41709,208 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "wrapping_rem",
+ "name": "midpoint",
"span": {
"begin": [
- 319,
+ 291,
5
],
"end": [
- 338,
- 6
+ 291,
+ 40
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"10529": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
+ "attrs": [],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping Euclidean remainder. Computes `self.rem_euclid(rhs)`, wrapping around\nat the boundary of the type.\n\nWrapping will only occur in `MIN % -1` on a signed type (where `MIN` is the negative minimal value\nfor the type). In this case, this method returns 0.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i64.wrapping_rem_euclid(10), 0);\nassert_eq!((-128i8).wrapping_rem_euclid(-1), 0);\n```",
+ "docs": null,
"id": 10529,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "i16"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "i64"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i64"
- }
- }
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 10390,
+ 10391,
+ 10392,
+ 10393,
+ 10394,
+ 10396,
+ 10397,
+ 10398,
+ 10399,
+ 10400,
+ 10401,
+ 10402,
+ 10403,
+ 10404,
+ 10405,
+ 10406,
+ 10407,
+ 10408,
+ 10409,
+ 10410,
+ 10411,
+ 10412,
+ 10413,
+ 10414,
+ 10416,
+ 10417,
+ 10418,
+ 10419,
+ 10420,
+ 10422,
+ 10423,
+ 10424,
+ 10425,
+ 10426,
+ 10428,
+ 10429,
+ 10430,
+ 10431,
+ 10432,
+ 10433,
+ 10434,
+ 10435,
+ 10436,
+ 10437,
+ 10438,
+ 10439,
+ 10440,
+ 10441,
+ 10442,
+ 10443,
+ 10444,
+ 10445,
+ 10446,
+ 10447,
+ 10448,
+ 10449,
+ 10450,
+ 10451,
+ 10452,
+ 10453,
+ 10454,
+ 10455,
+ 10456,
+ 10457,
+ 10458,
+ 10459,
+ 10460,
+ 10461,
+ 10462,
+ 10463,
+ 10464,
+ 10465,
+ 10466,
+ 10467,
+ 10468,
+ 10415,
+ 10469,
+ 10421,
+ 10470,
+ 10427,
+ 10471,
+ 10472,
+ 10473,
+ 10474,
+ 10475,
+ 10476,
+ 10477,
+ 10478,
+ 10479,
+ 10480,
+ 10481,
+ 10483,
+ 10484,
+ 10485,
+ 10487,
+ 10488,
+ 10489,
+ 10491,
+ 10490,
+ 10492,
+ 10493,
+ 10494,
+ 10495,
+ 10496,
+ 10497,
+ 10498,
+ 10499,
+ 10500,
+ 10501,
+ 10502,
+ 10503,
+ 10504,
+ 10505,
+ 10506,
+ 10507,
+ 10508,
+ 10509,
+ 10510,
+ 10395,
+ 10511,
+ 10512,
+ 10513,
+ 10514,
+ 10515,
+ 10516,
+ 10517,
+ 10518,
+ 10519,
+ 10520,
+ 10521,
+ 10522,
+ 10523,
+ 10524,
+ 10525,
+ 10526,
+ 10527,
+ 10528
+ ],
+ "provided_trait_methods": [],
+ "trait": null
}
},
"links": {},
- "name": "wrapping_rem_euclid",
+ "name": null,
"span": {
"begin": [
- 319,
- 5
+ 270,
+ 1
],
"end": [
- 338,
- 6
+ 270,
+ 9
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
"1053": {
"attrs": [],
@@ -43329,7 +41988,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -43350,7 +42009,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -43371,7 +42030,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -43384,20 +42043,15 @@
"10530": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 82, patch: 0})}, feature: \"const_int_from_str\", promotable: false}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) negation. Computes `-self`, wrapping around at the boundary\nof the type.\n\nThe only case where such wrapping can occur is when one negates `MIN` on a signed type (where `MIN`\nis the negative minimal value for the type); this is a positive value that is too large to represent\nin the type. In such a case, this function returns `MIN` itself.\n\n# Examples\n\n```\nassert_eq!(100i64.wrapping_neg(), -100);\nassert_eq!((-100i64).wrapping_neg(), 100);\nassert_eq!(i64::MIN.wrapping_neg(), i64::MIN);\n```",
+ "docs": "Parses an integer from a string slice with digits in a given base.\n\nThe string is expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# See also\nIf the string to be parsed is in base 10 (decimal),\n[`from_str`] or [`str::parse`] can also be used.\n\n[`from_str`]: #method.from_str\n[`str::parse`]: primitive.str.html#method.parse\n\n# Examples\n\n```\nassert_eq!(i16::from_str_radix(\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\nassert!(i16::from_str_radix(\"1 \", 10).is_err());\n```",
"id": 10530,
"inner": {
"function": {
@@ -43415,29 +42069,65 @@
"sig": {
"inputs": [
[
- "self",
+ "src",
{
- "generic": "Self"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "primitive": "str"
+ }
+ }
+ }
+ ],
+ [
+ "radix",
+ {
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i16"
+ }
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 4786,
+ "path": "ParseIntError"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 57,
+ "path": "Result"
+ }
}
}
}
},
"links": {},
- "name": "wrapping_neg",
+ "name": "from_str_radix",
"span": {
"begin": [
- 319,
- 5
+ 1666,
+ 1
],
"end": [
- 338,
- 6
+ 1666,
+ 56
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -43446,20 +42136,12 @@
"10531": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Panic-free bitwise shift-left; yields `self << mask(rhs)`, where `mask` removes\nany high-order bits of `rhs` that would cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-left; the RHS of a wrapping shift-left is restricted to\nthe range of the type, rather than the bits shifted out of the LHS being returned to the other end.\nThe primitive integer types all implement a [`rotate_left`](Self::rotate_left) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!((-1i64).wrapping_shl(7), -128);\nassert_eq!((-1i64).wrapping_shl(128), -1);\n```",
+ "docs": "Parses an integer from an ASCII-byte slice with decimal digits.\n\nThe characters are expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(i16::from_ascii(b\"+10\"), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(i16::from_ascii(b\"1 \").is_err());\n```",
"id": 10531,
"inner": {
"function": {
@@ -43477,37 +42159,61 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "src",
{
- "primitive": "u32"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "slice": {
+ "primitive": "u8"
+ }
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i16"
+ }
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 4786,
+ "path": "ParseIntError"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 57,
+ "path": "Result"
+ }
}
}
}
},
- "links": {
- "Self::rotate_left": 10464
- },
- "name": "wrapping_shl",
+ "links": {},
+ "name": "from_ascii",
"span": {
"begin": [
- 319,
- 5
+ 1666,
+ 1
],
"end": [
- 338,
- 6
+ 1666,
+ 56
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -43516,20 +42222,12 @@
"10532": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Panic-free bitwise shift-right; yields `self >> mask(rhs)`, where `mask`\nremoves any high-order bits of `rhs` that would cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-right; the RHS of a wrapping shift-right is restricted\nto the range of the type, rather than the bits shifted out of the LHS being returned to the other\nend. The primitive integer types all implement a [`rotate_right`](Self::rotate_right) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!((-128i64).wrapping_shr(7), -1);\nassert_eq!((-128i16).wrapping_shr(64), -128);\n```",
+ "docs": "Parses an integer from an ASCII-byte slice with digits in a given base.\n\nThe characters are expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(i16::from_ascii_radix(b\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(i16::from_ascii_radix(b\"1 \", 10).is_err());\n```",
"id": 10532,
"inner": {
"function": {
@@ -43547,13 +42245,21 @@
"sig": {
"inputs": [
[
- "self",
+ "src",
{
- "generic": "Self"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "slice": {
+ "primitive": "u8"
+ }
+ }
+ }
}
],
[
- "rhs",
+ "radix",
{
"primitive": "u32"
}
@@ -43561,107 +42267,102 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i16"
+ }
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 4786,
+ "path": "ParseIntError"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 57,
+ "path": "Result"
+ }
}
}
}
},
- "links": {
- "Self::rotate_right": 10465
- },
- "name": "wrapping_shr",
+ "links": {},
+ "name": "from_ascii_radix",
"span": {
"begin": [
- 319,
- 5
+ 1666,
+ 1
],
"end": [
- 338,
- 6
+ 1666,
+ 56
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"10533": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
+ "attrs": [],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) absolute value. Computes `self.abs()`, wrapping around at\nthe boundary of the type.\n\nThe only case where such wrapping can occur is when one takes the absolute value of the negative\nminimal value for the type; this is a positive value that is too large to represent in the type. In\nsuch a case, this function returns `MIN` itself.\n\n# Examples\n\n```\nassert_eq!(100i64.wrapping_abs(), 100);\nassert_eq!((-100i64).wrapping_abs(), 100);\nassert_eq!(i64::MIN.wrapping_abs(), i64::MIN);\nassert_eq!((-128i8).wrapping_abs() as u8, 128);\n```",
+ "docs": null,
"id": 10533,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "i16"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i64"
- }
- }
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 10530,
+ 10531,
+ 10532
+ ],
+ "provided_trait_methods": [],
+ "trait": null
}
},
"links": {},
- "name": "wrapping_abs",
+ "name": null,
"span": {
"begin": [
- 319,
- 5
+ 1666,
+ 1
],
"end": [
- 338,
- 6
+ 1666,
+ 56
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
"10534": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 51, patch: 0})}, feature: \"unsigned_abs\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 51, patch: 0})}, feature: \"unsigned_abs\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 138215, is_soft: false}, feature: \"int_format_into\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Computes the absolute value of `self` without any wrapping\nor panicking.\n\n\n# Examples\n\n```\nassert_eq!(100i64.unsigned_abs(), 100u64);\nassert_eq!((-100i64).unsigned_abs(), 100u64);\nassert_eq!((-128i8).unsigned_abs(), 128u8);\n```",
+ "docs": "Allows users to write an integer (in signed decimal format) into a variable `buf` of\ntype [`NumBuffer`] that is passed by the caller by mutable reference.\n\n# Examples\n\n```\n#![feature(int_format_into)]\nuse core::fmt::NumBuffer;\n\nlet n = 0i16;\nlet mut buf = NumBuffer::new();\nassert_eq!(n.format_into(&mut buf), \"0\");\n\nlet n1 = 32i16;\nassert_eq!(n1.format_into(&mut buf), \"32\");\n\nlet n2 = i16 :: MAX;\nassert_eq!(n2.format_into(&mut buf), i16 :: MAX.to_string());\n```",
"id": 10534,
"inner": {
"function": {
@@ -43673,7 +42374,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -43683,167 +42384,133 @@
{
"generic": "Self"
}
+ ],
+ [
+ "buf",
+ {
+ "borrowed_ref": {
+ "is_mutable": true,
+ "lifetime": null,
+ "type": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i16"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 10387,
+ "path": "NumBuffer"
+ }
+ }
+ }
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "primitive": "str"
+ }
+ }
}
}
}
},
- "links": {},
- "name": "unsigned_abs",
+ "links": {
+ "`NumBuffer`": 10387
+ },
+ "name": "format_into",
"span": {
"begin": [
- 319,
+ 599,
5
],
"end": [
- 338,
- 6
+ 599,
+ 95
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/fmt/num.rs"
},
"visibility": "public"
},
"10535": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
+ "attrs": [],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) exponentiation. Computes `self.pow(exp)`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(3i64.wrapping_pow(4), 81);\nassert_eq!(3i8.wrapping_pow(5), -13);\nassert_eq!(3i8.wrapping_pow(6), -39);\n```",
+ "docs": null,
"id": 10535,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "i16"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "exp",
- {
- "primitive": "u32"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i64"
- }
- }
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 10534
+ ],
+ "provided_trait_methods": [],
+ "trait": null
}
},
"links": {},
- "name": "wrapping_pow",
+ "name": null,
"span": {
"begin": [
- 319,
+ 599,
5
],
"end": [
- 338,
- 6
+ 599,
+ 95
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/fmt/num.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
"10536": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would have\noccurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5i64.overflowing_add(2), (7, false));\nassert_eq!(i64::MAX.overflowing_add(1), (i64::MIN, true));\n```",
+ "docs": "The smallest value that can be represented by this integer type\n(−231).\n\n# Examples\n\n```\nassert_eq!(i32::MIN, -2147483648);\n```",
"id": 10536,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "i32"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "i64"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "i64"
- },
- {
- "primitive": "bool"
- }
- ]
- }
- }
+ "value": "_"
}
},
"links": {},
- "name": "overflowing_add",
+ "name": "MIN",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -43853,80 +42520,30 @@
"10537": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs` + `carry` and returns a tuple containing\nthe sum and the output carry.\n\nPerforms \"ternary addition\" of two integer operands and a carry-in\nbit, and returns an output integer and a carry-out bit. This allows\nchaining together multiple additions to create a wider addition, and\ncan be useful for bignum addition.\n\nThis can be thought of as a 64-bit \"full adder\", in the electronics sense.\n\nIf the input carry is false, this method is equivalent to\n[`overflowing_add`](Self::overflowing_add), and the output carry is\nequal to the overflow flag. Note that although carry and overflow\nflags are similar for unsigned integers, they are different for\nsigned integers.\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n\n// 3 MAX (a = 3 × 2^64 + 2^64 - 1)\n// + 5 7 (b = 5 × 2^64 + 7)\n// ---------\n// 9 6 (sum = 9 × 2^64 + 6)\n\nlet (a1, a0): (u64, u64) = (3, u64::MAX);\nlet (b1, b0): (u64, u64) = (5, 7);\nlet carry0 = false;\n\nlet (sum0, carry1) = a0.carrying_add(b0, carry0);\nassert_eq!(carry1, true);\nlet (sum1, carry2) = a1.carrying_add(b1, carry1);\nassert_eq!(carry2, false);\n\nassert_eq!((sum1, sum0), (9, 6));\n```",
+ "docs": "The largest value that can be represented by this integer type\n(231 − 1).\n\n# Examples\n\n```\nassert_eq!(i32::MAX, 2147483647);\n```",
"id": 10537,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "i32"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u64"
- }
- ],
- [
- "carry",
- {
- "primitive": "bool"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "u64"
- },
- {
- "primitive": "bool"
- }
- ]
- }
- }
+ "value": "_"
}
},
- "links": {
- "Self::overflowing_add": 11237
- },
- "name": "carrying_add",
+ "links": {},
+ "name": "MAX",
"span": {
"begin": [
- 1151,
+ 295,
5
],
"end": [
- 1169,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -43936,78 +42553,30 @@
"10538": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 53, patch: 0})}, feature: \"int_bits_const\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs` + `carry` and checks for overflow.\n\nPerforms \"ternary addition\" of two integer operands and a carry-in\nbit, and returns a tuple of the sum along with a boolean indicating\nwhether an arithmetic overflow would occur. On overflow, the wrapped\nvalue is returned.\n\nThis allows chaining together multiple additions to create a wider\naddition, and can be useful for bignum addition. This method should\nonly be used for the most significant word; for the less significant\nwords the unsigned method\n[`u64::carrying_add`]\nshould be used.\n\nThe output boolean returned by this method is *not* a carry flag,\nand should *not* be added to a more significant word.\n\nIf the input carry is false, this method is equivalent to\n[`overflowing_add`](Self::overflowing_add).\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n// Only the most significant word is signed.\n//\n// 10 MAX (a = 10 × 2^64 + 2^64 - 1)\n// + -5 9 (b = -5 × 2^64 + 9)\n// ---------\n// 6 8 (sum = 6 × 2^64 + 8)\n\nlet (a1, a0): (i64, u64) = (10, u64::MAX);\nlet (b1, b0): (i64, u64) = (-5, 9);\nlet carry0 = false;\n\n// u64::carrying_add for the less significant words\nlet (sum0, carry1) = a0.carrying_add(b0, carry0);\nassert_eq!(carry1, true);\n\n// i64::carrying_add for the most significant word\nlet (sum1, overflow) = a1.carrying_add(b1, carry1);\nassert_eq!(overflow, false);\n\nassert_eq!((sum1, sum0), (6, 8));\n```",
+ "docs": "The size of this integer type in bits.\n\n# Examples\n\n```\nassert_eq!(i32::BITS, 32);\n```",
"id": 10538,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "u32"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "i64"
- }
- ],
- [
- "carry",
- {
- "primitive": "bool"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "i64"
- },
- {
- "primitive": "bool"
- }
- ]
- }
- }
+ "value": "u32::BITS"
}
},
- "links": {
- "Self::overflowing_add": 10536,
- "`u64::carrying_add`": 10537
- },
- "name": "carrying_add",
+ "links": {},
+ "name": "BITS",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -44017,10 +42586,16 @@
"10539": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[doc(alias = \"popcount\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[doc(alias = \"popcnt\")]"
+ },
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -44030,7 +42605,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs` with an unsigned `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1i64.overflowing_add_unsigned(2), (3, false));\nassert_eq!((i64::MIN).overflowing_add_unsigned(u64::MAX), (i64::MAX, false));\nassert_eq!((i64::MAX - 2).overflowing_add_unsigned(3), (i64::MIN, true));\n```",
+ "docs": "Returns the number of ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 0b100_0000i32;\n\nassert_eq!(n.count_ones(), 1);\n```\n",
"id": 10539,
"inner": {
"function": {
@@ -44052,37 +42627,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u64"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i64"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "overflowing_add_unsigned",
+ "name": "count_ones",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -44167,7 +42729,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -44183,7 +42745,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -44192,12 +42754,12 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -44209,7 +42771,7 @@
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -44219,7 +42781,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` - `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating whether an arithmetic overflow\nwould occur. If an overflow would have occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5i64.overflowing_sub(2), (3, false));\nassert_eq!(i64::MIN.overflowing_sub(1), (i64::MAX, true));\n```",
+ "docs": "Returns the number of zeros in the binary representation of `self`.\n\n# Examples\n\n```\nassert_eq!(i32::MAX.count_zeros(), 1);\n```",
"id": 10540,
"inner": {
"function": {
@@ -44241,37 +42803,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i64"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i64"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "overflowing_sub",
+ "name": "count_zeros",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -44281,20 +42830,23 @@
"10541": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` − `rhs` − `borrow` and returns a tuple\ncontaining the difference and the output borrow.\n\nPerforms \"ternary subtraction\" by subtracting both an integer\noperand and a borrow-in bit from `self`, and returns an output\ninteger and a borrow-out bit. This allows chaining together multiple\nsubtractions to create a wider subtraction, and can be useful for\nbignum subtraction.\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n\n// 9 6 (a = 9 × 2^64 + 6)\n// - 5 7 (b = 5 × 2^64 + 7)\n// ---------\n// 3 MAX (diff = 3 × 2^64 + 2^64 - 1)\n\nlet (a1, a0): (u64, u64) = (9, 6);\nlet (b1, b0): (u64, u64) = (5, 7);\nlet borrow0 = false;\n\nlet (diff0, borrow1) = a0.borrowing_sub(b0, borrow0);\nassert_eq!(borrow1, true);\nlet (diff1, borrow2) = a1.borrowing_sub(b1, borrow1);\nassert_eq!(borrow2, false);\n\nassert_eq!((diff1, diff0), (3, u64::MAX));\n```",
+ "docs": "Returns the base 2 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero.\n\n# Examples\n\n```\nassert_eq!(2i32.ilog2(), 1);\n```",
"id": 10541,
"inner": {
"function": {
@@ -44316,43 +42868,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u64"
- }
- ],
- [
- "borrow",
- {
- "primitive": "bool"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u64"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "borrowing_sub",
+ "name": "ilog2",
"span": {
"begin": [
- 1151,
+ 295,
5
],
"end": [
- 1169,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -44362,7 +42895,10 @@
"10542": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -44372,7 +42908,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` − `rhs` − `borrow` and checks for\noverflow.\n\nPerforms \"ternary subtraction\" by subtracting both an integer\noperand and a borrow-in bit from `self`, and returns a tuple of the\ndifference along with a boolean indicating whether an arithmetic\noverflow would occur. On overflow, the wrapped value is returned.\n\nThis allows chaining together multiple subtractions to create a\nwider subtraction, and can be useful for bignum subtraction. This\nmethod should only be used for the most significant word; for the\nless significant words the unsigned method\n[`u64::borrowing_sub`]\nshould be used.\n\nThe output boolean returned by this method is *not* a borrow flag,\nand should *not* be subtracted from a more significant word.\n\nIf the input borrow is false, this method is equivalent to\n[`overflowing_sub`](Self::overflowing_sub).\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n// Only the most significant word is signed.\n//\n// 6 8 (a = 6 × 2^64 + 8)\n// - -5 9 (b = -5 × 2^64 + 9)\n// ---------\n// 10 MAX (diff = 10 × 2^64 + 2^64 - 1)\n\nlet (a1, a0): (i64, u64) = (6, 8);\nlet (b1, b0): (i64, u64) = (-5, 9);\nlet borrow0 = false;\n\n// u64::borrowing_sub for the less significant words\nlet (diff0, borrow1) = a0.borrowing_sub(b0, borrow0);\nassert_eq!(borrow1, true);\n\n// i64::borrowing_sub for the most significant word\nlet (diff1, overflow) = a1.borrowing_sub(b1, borrow1);\nassert_eq!(overflow, false);\n\nassert_eq!((diff1, diff0), (10, u64::MAX));\n```",
+ "docs": "Returns the number of leading zeros in the binary representation of `self`.\n\nDepending on what you're doing with the value, you might also be interested in the\n[`ilog2`] function which returns a consistent number, even if the type widens.\n\n# Examples\n\n```\nlet n = -1i32;\n\nassert_eq!(n.leading_zeros(), 0);\n```\n[`ilog2`]: i32::ilog2",
"id": 10542,
"inner": {
"function": {
@@ -44394,46 +42930,26 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i64"
- }
- ],
- [
- "borrow",
- {
- "primitive": "bool"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i64"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
"links": {
- "Self::overflowing_sub": 10540,
- "`u64::borrowing_sub`": 10541
+ "i32::ilog2": 10541
},
- "name": "borrowing_sub",
+ "name": "leading_zeros",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -44443,10 +42959,10 @@
"10543": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -44456,7 +42972,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` - `rhs` with an unsigned `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1i64.overflowing_sub_unsigned(2), (-1, false));\nassert_eq!((i64::MAX).overflowing_sub_unsigned(u64::MAX), (i64::MIN, false));\nassert_eq!((i64::MIN + 2).overflowing_sub_unsigned(3), (i64::MAX, true));\n```",
+ "docs": "Returns the number of trailing zeros in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = -4i32;\n\nassert_eq!(n.trailing_zeros(), 2);\n```",
"id": 10543,
"inner": {
"function": {
@@ -44478,37 +42994,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u64"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i64"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "overflowing_sub_unsigned",
+ "name": "trailing_zeros",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -44518,10 +43021,10 @@
"10544": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
},
{
"must_use": {
@@ -44531,7 +43034,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the multiplication of `self` and `rhs`.\n\nReturns a tuple of the multiplication along with a boolean indicating whether an arithmetic overflow\nwould occur. If an overflow would have occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5i64.overflowing_mul(2), (10, false));\nassert_eq!(1_000_000_000i32.overflowing_mul(10), (1410065408, true));\n```",
+ "docs": "Returns the number of leading ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = -1i32;\n\nassert_eq!(n.leading_ones(), 32);\n```",
"id": 10544,
"inner": {
"function": {
@@ -44553,37 +43056,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i64"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i64"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "overflowing_mul",
+ "name": "leading_ones",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -44593,10 +43083,10 @@
"10545": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
},
{
"must_use": {
@@ -44606,7 +43096,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the \"full multiplication\" `self * rhs + carry`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need the `carry`, then you can use [`Self::widening_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.carrying_mul(-2, 0), (4294967286, -1));\nassert_eq!(5i32.carrying_mul(-2, 10), (0, 0));\nassert_eq!(1_000_000_000i32.carrying_mul(-10, 0), (2884901888, -3));\nassert_eq!(1_000_000_000i32.carrying_mul(-10, 10), (2884901898, -3));\nassert_eq!(i64::MAX.carrying_mul(i64::MAX, i64::MAX), (i64::MAX.unsigned_abs() + 1, i64::MAX / 2));\n```",
+ "docs": "Returns the number of trailing ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 3i32;\n\nassert_eq!(n.trailing_ones(), 2);\n```",
"id": 10545,
"inner": {
"function": {
@@ -44628,45 +43118,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i64"
- }
- ],
- [
- "carry",
- {
- "primitive": "i64"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u64"
- },
- {
- "primitive": "i64"
- }
- ]
+ "primitive": "u32"
}
}
}
},
- "links": {
- "`Self::widening_mul`": 10546
- },
- "name": "carrying_mul",
+ "links": {},
+ "name": "trailing_ones",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -44676,10 +43145,7 @@
"10546": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
},
{
"must_use": {
@@ -44689,7 +43155,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the complete product `self * rhs` without the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nIf you also need to add a carry to the wide result, then you want\n[`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.widening_mul(-2), (4294967286, -1));\nassert_eq!(1_000_000_000i32.widening_mul(-10), (2884901888, -3));\n```",
+ "docs": "Returns `self` with only the most significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: i32 = 0b_01100100;\n\nassert_eq!(n.isolate_highest_one(), 0b_01000000);\nassert_eq!(0_i32.isolate_highest_one(), 0);\n```",
"id": 10546,
"inner": {
"function": {
@@ -44711,39 +43177,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i64"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u64"
- },
- {
- "primitive": "i64"
- }
- ]
+ "primitive": "i32"
}
}
}
},
- "links": {
- "`Self::carrying_mul`": 10545
- },
- "name": "widening_mul",
+ "links": {},
+ "name": "isolate_highest_one",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -44753,10 +43204,7 @@
"10547": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
},
{
"must_use": {
@@ -44766,7 +43214,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the \"full multiplication\" `self * rhs + carry1 + carry2`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need either `carry`, then you can use [`Self::widening_mul`] instead,\nand if you only need one `carry`, then you can use [`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.carrying_mul_add(-2, 0, 0), (4294967286, -1));\nassert_eq!(5i32.carrying_mul_add(-2, 10, 10), (10, 0));\nassert_eq!(1_000_000_000i32.carrying_mul_add(-10, 0, 0), (2884901888, -3));\nassert_eq!(1_000_000_000i32.carrying_mul_add(-10, 10, 10), (2884901908, -3));\nassert_eq!(i64::MAX.carrying_mul_add(i64::MAX, i64::MAX, i64::MAX), (u64::MAX, i64::MAX / 2));\n```",
+ "docs": "Returns `self` with only the least significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: i32 = 0b_01100100;\n\nassert_eq!(n.isolate_lowest_one(), 0b_00000100);\nassert_eq!(0_i32.isolate_lowest_one(), 0);\n```",
"id": 10547,
"inner": {
"function": {
@@ -44788,52 +43236,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i64"
- }
- ],
- [
- "carry",
- {
- "primitive": "i64"
- }
- ],
- [
- "add",
- {
- "primitive": "i64"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u64"
- },
- {
- "primitive": "i64"
- }
- ]
+ "primitive": "i32"
}
}
}
},
- "links": {
- "`Self::carrying_mul`": 10545,
- "`Self::widening_mul`": 10546
- },
- "name": "carrying_mul_add",
+ "links": {},
+ "name": "isolate_lowest_one",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -44843,10 +43263,7 @@
"10548": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
},
{
"must_use": {
@@ -44856,7 +43273,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the divisor when `self` is divided by `rhs`.\n\nReturns a tuple of the divisor along with a boolean indicating whether an arithmetic overflow would\noccur. If an overflow would occur then self is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i64.overflowing_div(2), (2, false));\nassert_eq!(i64::MIN.overflowing_div(-1), (i64::MIN, true));\n```",
+ "docs": "Returns the index of the highest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_i32.highest_one(), None);\nassert_eq!(0x1_i32.highest_one(), Some(0));\nassert_eq!(0x10_i32.highest_one(), Some(4));\nassert_eq!(0x1f_i32.highest_one(), Some(4));\n```",
"id": 10548,
"inner": {
"function": {
@@ -44878,37 +43295,39 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i64"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i64"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
},
- {
- "primitive": "bool"
- }
- ]
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "overflowing_div",
+ "name": "highest_one",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -44918,10 +43337,7 @@
"10549": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
},
{
"must_use": {
@@ -44931,7 +43347,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of Euclidean division `self.div_euclid(rhs)`.\n\nReturns a tuple of the divisor along with a boolean indicating whether an arithmetic overflow would\noccur. If an overflow would occur then `self` is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i64.overflowing_div_euclid(2), (2, false));\nassert_eq!(i64::MIN.overflowing_div_euclid(-1), (i64::MIN, true));\n```",
+ "docs": "Returns the index of the lowest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_i32.lowest_one(), None);\nassert_eq!(0x1_i32.lowest_one(), Some(0));\nassert_eq!(0x10_i32.lowest_one(), Some(4));\nassert_eq!(0x1f_i32.lowest_one(), Some(0));\n```",
"id": 10549,
"inner": {
"function": {
@@ -44953,37 +43369,39 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i64"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i64"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
},
- {
- "primitive": "bool"
- }
- ]
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "overflowing_div_euclid",
+ "name": "lowest_one",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -45068,7 +43486,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -45084,7 +43502,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -45093,12 +43511,12 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -45107,10 +43525,10 @@
"10550": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\"}}]"
},
{
"must_use": {
@@ -45120,7 +43538,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the remainder when `self` is divided by `rhs`.\n\nReturns a tuple of the remainder after dividing along with a boolean indicating whether an\narithmetic overflow would occur. If an overflow would occur then 0 is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i64.overflowing_rem(2), (1, false));\nassert_eq!(i64::MIN.overflowing_rem(-1), (0, true));\n```",
+ "docs": "Returns the bit pattern of `self` reinterpreted as an unsigned integer of the same size.\n\nThis produces the same result as an `as` cast, but ensures that the bit-width remains\nthe same.\n\n# Examples\n\n```\nlet n = -1i32;\n\nassert_eq!(n.cast_unsigned(), u32::MAX);\n```",
"id": 10550,
"inner": {
"function": {
@@ -45142,37 +43560,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i64"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i64"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "overflowing_rem",
+ "name": "cast_unsigned",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -45182,23 +43587,20 @@
"10551": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Overflowing Euclidean remainder. Calculates `self.rem_euclid(rhs)`.\n\nReturns a tuple of the remainder after dividing along with a boolean indicating whether an\narithmetic overflow would occur. If an overflow would occur then 0 is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i64.overflowing_rem_euclid(2), (1, false));\nassert_eq!(i64::MIN.overflowing_rem_euclid(-1), (0, true));\n```",
+ "docs": "Shifts the bits to the left by a specified amount, `n`,\nwrapping the truncated bits to the end of the resulting integer.\n\nPlease note this isn't the same operation as the `<<` shifting operator!\n\n# Examples\n\n```\nlet n = 0x10000b3i32;\nlet m = 0xb301;\n\nassert_eq!(n.rotate_left(8), m);\n```",
"id": 10551,
"inner": {
"function": {
@@ -45222,35 +43624,28 @@
}
],
[
- "rhs",
+ "n",
{
- "primitive": "i64"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i64"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "overflowing_rem_euclid",
+ "name": "rotate_left",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -45263,7 +43658,7 @@
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -45273,7 +43668,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Negates self, overflowing if this is equal to the minimum value.\n\nReturns a tuple of the negated version of self along with a boolean indicating whether an overflow\nhappened. If `self` is the minimum value (e.g., `i32::MIN` for values of type `i32`), then the\nminimum value will be returned again and `true` will be returned for an overflow happening.\n\n# Examples\n\n```\nassert_eq!(2i64.overflowing_neg(), (-2, false));\nassert_eq!(i64::MIN.overflowing_neg(), (i64::MIN, true));\n```",
+ "docs": "Shifts the bits to the right by a specified amount, `n`,\nwrapping the truncated bits to the beginning of the resulting\ninteger.\n\nPlease note this isn't the same operation as the `>>` shifting operator!\n\n# Examples\n\n```\nlet n = 0xb301i32;\nlet m = 0x10000b3;\n\nassert_eq!(n.rotate_right(8), m);\n```",
"id": 10552,
"inner": {
"function": {
@@ -45295,31 +43690,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "n",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i64"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "overflowing_neg",
+ "name": "rotate_right",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -45332,7 +43726,7 @@
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -45342,7 +43736,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts self left by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean indicating whether the shift\nvalue was larger than or equal to the number of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then used to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x1i64.overflowing_shl(4), (0x10, false));\nassert_eq!(0x1i32.overflowing_shl(36), (0x10, true));\nassert_eq!(0x10i64.overflowing_shl(63), (0, false));\n```",
+ "docs": "Reverses the byte order of the integer.\n\n# Examples\n\n```\nlet n = 0x12345678i32;\n\nlet m = n.swap_bytes();\n\nassert_eq!(m, 0x78563412);\n```",
"id": 10553,
"inner": {
"function": {
@@ -45364,37 +43758,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i64"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "overflowing_shl",
+ "name": "swap_bytes",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -45404,10 +43785,10 @@
"10554": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\"}}]"
},
{
"must_use": {
@@ -45417,7 +43798,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts self right by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean indicating whether the shift\nvalue was larger than or equal to the number of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then used to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x10i64.overflowing_shr(4), (0x1, false));\nassert_eq!(0x10i32.overflowing_shr(36), (0x1, true));\n```",
+ "docs": "Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\n second least-significant bit becomes second most-significant bit, etc.\n\n# Examples\n\n```\nlet n = 0x12345678i32;\nlet m = n.reverse_bits();\n\nassert_eq!(m, 0x1e6a2c48);\nassert_eq!(0, 0i32.reverse_bits());\n```",
"id": 10554,
"inner": {
"function": {
@@ -45439,37 +43820,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i64"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "overflowing_shr",
+ "name": "reverse_bits",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -45479,20 +43847,20 @@
"10555": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Computes the absolute value of `self`.\n\nReturns a tuple of the absolute version of self along with a boolean indicating whether an overflow\nhappened. If self is the minimum value\n(e.g., i64::MIN for values of type i64),\nthen the minimum value will be returned again and true will be returned\nfor an overflow happening.\n\n# Examples\n\n```\nassert_eq!(10i64.overflowing_abs(), (10, false));\nassert_eq!((-10i64).overflowing_abs(), (10, false));\nassert_eq!((i64::MIN).overflowing_abs(), (i64::MIN, true));\n```",
+ "docs": "Converts an integer from big endian to the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai32;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(i32::from_be(n), n)\n} else {\n assert_eq!(i32::from_be(n), n.swap_bytes())\n}\n```",
"id": 10555,
"inner": {
"function": {
@@ -45510,35 +43878,28 @@
"sig": {
"inputs": [
[
- "self",
+ "x",
{
- "generic": "Self"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i64"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "overflowing_abs",
+ "name": "from_be",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -45548,20 +43909,20 @@
"10556": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\nReturns a tuple of the exponentiation along with a bool indicating\nwhether an overflow happened.\n\n# Examples\n\n```\nassert_eq!(3i64.overflowing_pow(4), (81, false));\nassert_eq!(3i8.overflowing_pow(5), (-13, true));\n```",
+ "docs": "Converts an integer from little endian to the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai32;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(i32::from_le(n), n)\n} else {\n assert_eq!(i32::from_le(n), n.swap_bytes())\n}\n```",
"id": 10556,
"inner": {
"function": {
@@ -45579,41 +43940,28 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "exp",
+ "x",
{
- "primitive": "u32"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i64"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "overflowing_pow",
+ "name": "from_le",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -45623,7 +43971,7 @@
"10557": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -45636,7 +43984,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\n# Examples\n\n```\nlet x: i64 = 2; // or any other integer type\n\nassert_eq!(x.pow(5), 32);\n```",
+ "docs": "Converts `self` to big endian from the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai32;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(n.to_be(), n)\n} else {\n assert_eq!(n.to_be(), n.swap_bytes())\n}\n```",
"id": 10557,
"inner": {
"function": {
@@ -45658,30 +44006,24 @@
{
"generic": "Self"
}
- ],
- [
- "exp",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "pow",
+ "name": "to_be",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -45691,23 +44033,20 @@
"10558": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the square root of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is negative.\n\n# Examples\n\n```\nassert_eq!(10i64.isqrt(), 3);\n```",
+ "docs": "Converts `self` to little endian from the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai32;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(n.to_le(), n)\n} else {\n assert_eq!(n.to_le(), n.swap_bytes())\n}\n```",
"id": 10558,
"inner": {
"function": {
@@ -45733,20 +44072,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "isqrt",
+ "name": "to_le",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -45756,23 +44095,20 @@
"10559": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of Euclidean division of `self` by `rhs`.\n\nThis computes the integer `q` such that `self = q * rhs + r`, with\n`r = self.rem_euclid(rhs)` and `0 <= r < abs(rhs)`.\n\nIn other words, the result is `self / rhs` rounded to the integer `q`\nsuch that `self >= q * rhs`.\nIf `self > 0`, this is equal to rounding towards zero (the default in Rust);\nif `self < 0`, this is equal to rounding away from zero (towards +/- infinity).\nIf `rhs > 0`, this is equal to rounding towards -infinity;\nif `rhs < 0`, this is equal to rounding towards +infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\nlet a: i64 = 7; // or any other integer type\nlet b = 4;\n\nassert_eq!(a.div_euclid(b), 1); // 7 >= 4 * 1\nassert_eq!(a.div_euclid(-b), -1); // 7 >= -4 * -1\nassert_eq!((-a).div_euclid(b), -2); // -7 >= 4 * -2\nassert_eq!((-a).div_euclid(-b), 2); // -7 >= -4 * 2\n```",
+ "docs": "Checked integer addition. Computes `self + rhs`, returning `None`\nif overflow occurred.\n\n# Examples\n\n```\nassert_eq!((i32::MAX - 2).checked_add(1), Some(i32::MAX - 1));\nassert_eq!((i32::MAX - 2).checked_add(3), None);\n```",
"id": 10559,
"inner": {
"function": {
@@ -45798,26 +44134,41 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "div_euclid",
+ "name": "checked_add",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -45923,7 +44274,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -45948,11 +44299,11 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -45962,13 +44313,10 @@
"10560": {
"attrs": [
{
- "other": "#[doc(alias = \"modulo\", alias = \"mod\")]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -45981,7 +44329,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the least nonnegative remainder of `self (mod rhs)`.\n\nThis is done as if by the Euclidean division algorithm -- given\n`r = self.rem_euclid(rhs)`, the result satisfies\n`self = rhs * self.div_euclid(rhs) + r` and `0 <= r < abs(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN` and\n`rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\nlet a: i64 = 7; // or any other integer type\nlet b = 4;\n\nassert_eq!(a.rem_euclid(b), 3);\nassert_eq!((-a).rem_euclid(b), 1);\nassert_eq!(a.rem_euclid(-b), 3);\nassert_eq!((-a).rem_euclid(-b), 1);\n```\n\nThis will panic:\n```should_panic\nlet _ = i64::MIN.rem_euclid(-1);\n```",
+ "docs": "Strict integer addition. Computes `self + rhs`, panicking\nif overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((i32::MAX - 2).strict_add(1), i32::MAX - 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i32::MAX - 2).strict_add(3);\n```",
"id": 10560,
"inner": {
"function": {
@@ -46007,26 +44355,26 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "rem_euclid",
+ "name": "strict_add",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -46036,20 +44384,20 @@
"10561": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards negative infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nlet a: i64 = 8;\nlet b = 3;\n\nassert_eq!(a.div_floor(b), 2);\nassert_eq!(a.div_floor(-b), -3);\nassert_eq!((-a).div_floor(b), -3);\nassert_eq!((-a).div_floor(-b), 2);\n```",
+ "docs": "Wrapping (modular) addition. Computes `self + rhs`, wrapping around at the\nboundary of the type.\n\n# Examples\n\n```\nassert_eq!(100i32.wrapping_add(27), 127);\nassert_eq!(i32::MAX.wrapping_add(2), i32::MIN + 1);\n```",
"id": 10561,
"inner": {
"function": {
@@ -46075,26 +44423,26 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "div_floor",
+ "name": "wrapping_add",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -46104,7 +44452,10 @@
"10562": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
},
{
"must_use": {
@@ -46117,7 +44468,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards positive infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nlet a: i64 = 8;\nlet b = 3;\n\nassert_eq!(a.div_ceil(b), 3);\nassert_eq!(a.div_ceil(-b), -2);\nassert_eq!((-a).div_ceil(b), -2);\nassert_eq!((-a).div_ceil(-b), 3);\n```",
+ "docs": "Unchecked integer addition. Computes `self + rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_add(y)` is semantically equivalent to calling\n`x.`[`checked_add`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_add`].\n\n# Safety\n\nThis results in undefined behavior when\n`self + rhs > i32::MAX` or `self + rhs < i32::MIN`,\ni.e. when [`checked_add`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_add`]: i32::checked_add\n[`wrapping_add`]: i32::wrapping_add",
"id": 10562,
"inner": {
"function": {
@@ -46130,7 +44481,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -46143,26 +44494,29 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i32"
}
}
}
},
- "links": {},
- "name": "div_ceil",
+ "links": {
+ "i32::checked_add": 10559,
+ "i32::wrapping_add": 10561
+ },
+ "name": "unchecked_add",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -46172,7 +44526,10 @@
"10563": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -46182,7 +44539,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "If `rhs` is positive, calculates the smallest value greater than or\nequal to `self` that is a multiple of `rhs`. If `rhs` is negative,\ncalculates the largest value less than or equal to `self` that is a\nmultiple of `rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nOn overflow, this function will panic if overflow checks are enabled (default in debug\nmode) and wrap if overflow checks are disabled (default in release mode).\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(16_i64.next_multiple_of(8), 16);\nassert_eq!(23_i64.next_multiple_of(8), 24);\nassert_eq!(16_i64.next_multiple_of(-8), 16);\nassert_eq!(23_i64.next_multiple_of(-8), 16);\nassert_eq!((-16_i64).next_multiple_of(8), -16);\nassert_eq!((-23_i64).next_multiple_of(8), -16);\nassert_eq!((-16_i64).next_multiple_of(-8), -16);\nassert_eq!((-23_i64).next_multiple_of(-8), -24);\n```",
+ "docs": "Checked addition with an unsigned integer. Computes `self + rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1i32.checked_add_unsigned(2), Some(3));\nassert_eq!((i32::MAX - 2).checked_add_unsigned(3), None);\n```",
"id": 10563,
"inner": {
"function": {
@@ -46208,26 +44565,41 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "next_multiple_of",
+ "name": "checked_add_unsigned",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -46237,17 +44609,23 @@
"10564": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "If `rhs` is positive, calculates the smallest value greater than or\nequal to `self` that is a multiple of `rhs`. If `rhs` is negative,\ncalculates the largest value less than or equal to `self` that is a\nmultiple of `rhs`. Returns `None` if `rhs` is zero or the operation\nwould result in overflow.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(16_i64.checked_next_multiple_of(8), Some(16));\nassert_eq!(23_i64.checked_next_multiple_of(8), Some(24));\nassert_eq!(16_i64.checked_next_multiple_of(-8), Some(16));\nassert_eq!(23_i64.checked_next_multiple_of(-8), Some(16));\nassert_eq!((-16_i64).checked_next_multiple_of(8), Some(-16));\nassert_eq!((-23_i64).checked_next_multiple_of(8), Some(-16));\nassert_eq!((-16_i64).checked_next_multiple_of(-8), Some(-16));\nassert_eq!((-23_i64).checked_next_multiple_of(-8), Some(-24));\nassert_eq!(1_i64.checked_next_multiple_of(0), None);\nassert_eq!(i64::MAX.checked_next_multiple_of(2), None);\n```",
+ "docs": "Strict addition with an unsigned integer. Computes `self + rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1i32.strict_add_unsigned(2), 3);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i32::MAX - 2).strict_add_unsigned(3);\n```",
"id": 10564,
"inner": {
"function": {
@@ -46273,41 +44651,26 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i64"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "checked_next_multiple_of",
+ "name": "strict_add_unsigned",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -46317,23 +44680,20 @@
"10565": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nThis method might not be optimized owing to implementation details;\n`ilog2` can produce results more efficiently for base 2, and `ilog10`\ncan produce results more efficiently for base 10.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero,\nor if `base` is less than 2.\n\n# Examples\n\n```\nassert_eq!(5i64.ilog(5), 1);\n```",
+ "docs": "Checked integer subtraction. Computes `self - rhs`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!((i32::MIN + 2).checked_sub(1), Some(i32::MIN + 1));\nassert_eq!((i32::MIN + 2).checked_sub(3), None);\n```",
"id": 10565,
"inner": {
"function": {
@@ -46357,28 +44717,43 @@
}
],
[
- "base",
+ "rhs",
{
- "primitive": "i64"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "ilog",
+ "name": "checked_sub",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -46388,10 +44763,10 @@
"10566": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -46404,7 +44779,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 10 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero.\n\n# Example\n\n```\nassert_eq!(10i64.ilog10(), 1);\n```",
+ "docs": "Strict integer subtraction. Computes `self - rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((i32::MIN + 2).strict_sub(1), i32::MIN + 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i32::MIN + 2).strict_sub(3);\n```",
"id": 10566,
"inner": {
"function": {
@@ -46426,24 +44801,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "ilog10",
+ "name": "strict_sub",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -46453,10 +44834,10 @@
"10567": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -46466,7 +44847,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nReturns `None` if the number is negative or zero, or if the base is not at least 2.\n\nThis method might not be optimized owing to implementation details;\n`checked_ilog2` can produce results more efficiently for base 2, and\n`checked_ilog10` can produce results more efficiently for base 10.\n\n# Examples\n\n```\nassert_eq!(5i64.checked_ilog(5), Some(1));\n```",
+ "docs": "Wrapping (modular) subtraction. Computes `self - rhs`, wrapping around at the\nboundary of the type.\n\n# Examples\n\n```\nassert_eq!(0i32.wrapping_sub(127), -127);\nassert_eq!((-2i32).wrapping_sub(i32::MAX), i32::MAX);\n```",
"id": 10567,
"inner": {
"function": {
@@ -46490,43 +44871,28 @@
}
],
[
- "base",
+ "rhs",
{
- "primitive": "i64"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "checked_ilog",
+ "name": "wrapping_sub",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -46536,20 +44902,23 @@
"10568": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 2 logarithm of the number, rounded down.\n\nReturns `None` if the number is negative or zero.\n\n# Examples\n\n```\nassert_eq!(2i64.checked_ilog2(), Some(1));\n```",
+ "docs": "Unchecked integer subtraction. Computes `self - rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_sub(y)` is semantically equivalent to calling\n`x.`[`checked_sub`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_sub`].\n\n# Safety\n\nThis results in undefined behavior when\n`self - rhs > i32::MAX` or `self - rhs < i32::MIN`,\ni.e. when [`checked_sub`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_sub`]: i32::checked_sub\n[`wrapping_sub`]: i32::wrapping_sub",
"id": 10568,
"inner": {
"function": {
@@ -46562,7 +44931,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -46571,39 +44940,33 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i32"
}
}
}
},
- "links": {},
- "name": "checked_ilog2",
+ "links": {
+ "i32::checked_sub": 10565,
+ "i32::wrapping_sub": 10567
+ },
+ "name": "unchecked_sub",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -46613,10 +44976,10 @@
"10569": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -46626,7 +44989,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 10 logarithm of the number, rounded down.\n\nReturns `None` if the number is negative or zero.\n\n# Example\n\n```\nassert_eq!(10i64.checked_ilog10(), Some(1));\n```",
+ "docs": "Checked subtraction with an unsigned integer. Computes `self - rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1i32.checked_sub_unsigned(2), Some(-1));\nassert_eq!((i32::MIN + 2).checked_sub_unsigned(3), None);\n```",
"id": 10569,
"inner": {
"function": {
@@ -46648,6 +45011,12 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
@@ -46658,7 +45027,7 @@
"args": [
{
"type": {
- "primitive": "u32"
+ "primitive": "i32"
}
}
],
@@ -46673,14 +45042,14 @@
}
},
"links": {},
- "name": "checked_ilog10",
+ "name": "checked_sub_unsigned",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -46743,7 +45112,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -46768,11 +45137,11 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -46782,20 +45151,23 @@
"10570": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Computes the absolute value of `self`.\n\n# Overflow behavior\n\nThe absolute value of\n`i64::MIN`\ncannot be represented as an\n`i64`,\nand attempting to calculate it will cause an overflow. This means\nthat code in debug mode will trigger a panic on this case and\noptimized code will return\n`i64::MIN`\nwithout a panic. If you do not want this behavior, consider\nusing [`unsigned_abs`](Self::unsigned_abs) instead.\n\n# Examples\n\n```\nassert_eq!(10i64.abs(), 10);\nassert_eq!((-10i64).abs(), 10);\n```",
+ "docs": "Strict subtraction with an unsigned integer. Computes `self - rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1i32.strict_sub_unsigned(2), -1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i32::MIN + 2).strict_sub_unsigned(3);\n```",
"id": 10570,
"inner": {
"function": {
@@ -46817,26 +45189,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i32"
}
}
}
},
- "links": {
- "Self::unsigned_abs": 10534
- },
- "name": "abs",
+ "links": {},
+ "name": "strict_sub_unsigned",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -46846,10 +45222,10 @@
"10571": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -46859,7 +45235,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Computes the absolute difference between `self` and `other`.\n\nThis function always returns the correct answer without overflow or\npanics by returning an unsigned integer.\n\n# Examples\n\n```\nassert_eq!(100i64.abs_diff(80), 20u64);\nassert_eq!(100i64.abs_diff(110), 10u64);\nassert_eq!((-100i64).abs_diff(80), 180u64);\nassert_eq!((-100i64).abs_diff(-120), 20u64);\nassert_eq!(i64::MIN.abs_diff(i64::MAX), u64::MAX);\n```",
+ "docs": "Checked integer multiplication. Computes `self * rhs`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(i32::MAX.checked_mul(1), Some(i32::MAX));\nassert_eq!(i32::MAX.checked_mul(2), None);\n```",
"id": 10571,
"inner": {
"function": {
@@ -46883,28 +45259,43 @@
}
],
[
- "other",
+ "rhs",
{
- "primitive": "i64"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "abs_diff",
+ "name": "checked_mul",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -46914,20 +45305,23 @@
"10572": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_int_sign\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns a number representing sign of `self`.\n\n - `0` if the number is zero\n - `1` if the number is positive\n - `-1` if the number is negative\n\n# Examples\n\n```\nassert_eq!(10i64.signum(), 1);\nassert_eq!(0i64.signum(), 0);\nassert_eq!((-10i64).signum(), -1);\n```",
+ "docs": "Strict integer multiplication. Computes `self * rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(i32::MAX.strict_mul(1), i32::MAX);\n```\n\nThe following panics because of overflow:\n\n``` should_panic\nlet _ = i32::MAX.strict_mul(2);\n```",
"id": 10572,
"inner": {
"function": {
@@ -46949,24 +45343,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "signum",
+ "name": "strict_mul",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -46983,13 +45383,13 @@
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `true` if `self` is positive and `false` if the number is zero or\nnegative.\n\n# Examples\n\n```\nassert!(10i64.is_positive());\nassert!(!(-10i64).is_positive());\n```",
+ "docs": "Wrapping (modular) multiplication. Computes `self * rhs`, wrapping around at\nthe boundary of the type.\n\n# Examples\n\n```\nassert_eq!(10i32.wrapping_mul(12), 120);\nassert_eq!(11i8.wrapping_mul(12), -124);\n```",
"id": 10573,
"inner": {
"function": {
@@ -47011,24 +45411,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "is_positive",
+ "name": "wrapping_mul",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -47038,20 +45444,23 @@
"10574": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `true` if `self` is negative and `false` if the number is zero or\npositive.\n\n# Examples\n\n```\nassert!((-10i64).is_negative());\nassert!(!10i64.is_negative());\n```",
+ "docs": "Unchecked integer multiplication. Computes `self * rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_mul(y)` is semantically equivalent to calling\n`x.`[`checked_mul`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_mul`].\n\n# Safety\n\nThis results in undefined behavior when\n`self * rhs > i32::MAX` or `self * rhs < i32::MIN`,\ni.e. when [`checked_mul`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_mul`]: i32::checked_mul\n[`wrapping_mul`]: i32::wrapping_mul",
"id": 10574,
"inner": {
"function": {
@@ -47064,7 +45473,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -47073,24 +45482,33 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "primitive": "i32"
}
}
}
},
- "links": {},
- "name": "is_negative",
+ "links": {
+ "i32::checked_mul": 10571,
+ "i32::wrapping_mul": 10573
+ },
+ "name": "unchecked_mul",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -47100,10 +45518,10 @@
"10575": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -47113,7 +45531,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nbig-endian (network) byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x1234567890123456i64.to_be_bytes();\nassert_eq!(bytes, [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]);\n```",
+ "docs": "Checked integer division. Computes `self / rhs`, returning `None` if `rhs == 0`\nor the division results in overflow.\n\n# Examples\n\n```\nassert_eq!((i32::MIN + 1).checked_div(-1), Some(2147483647));\nassert_eq!(i32::MIN.checked_div(-1), None);\nassert_eq!((1i32).checked_div(0), None);\n```",
"id": 10575,
"inner": {
"function": {
@@ -47135,29 +45553,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "array": {
- "len": "8",
- "type": {
- "primitive": "u8"
- }
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
}
}
}
}
},
"links": {},
- "name": "to_be_bytes",
+ "name": "checked_div",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -47167,20 +45601,23 @@
"10576": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nlittle-endian byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x1234567890123456i64.to_le_bytes();\nassert_eq!(bytes, [0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]);\n```",
+ "docs": "Strict integer division. Computes `self / rhs`, panicking\nif overflow occurred.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type.\n\n# Examples\n\n```\nassert_eq!((i32::MIN + 1).strict_div(-1), 2147483647);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i32::MIN.strict_div(-1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1i32).strict_div(0);\n```",
"id": 10576,
"inner": {
"function": {
@@ -47202,29 +45639,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "array": {
- "len": "8",
- "type": {
- "primitive": "u8"
- }
- }
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "to_le_bytes",
+ "name": "strict_div",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -47234,10 +45672,10 @@
"10577": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -47247,7 +45685,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nnative byte order.\n\nAs the target platform's native endianness is used, portable code\nshould use [`to_be_bytes`] or [`to_le_bytes`], as appropriate,\ninstead.\n\n\n\n[`to_be_bytes`]: Self::to_be_bytes\n[`to_le_bytes`]: Self::to_le_bytes\n\n# Examples\n\n```\nlet bytes = 0x1234567890123456i64.to_ne_bytes();\nassert_eq!(\n bytes,\n if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]\n } else {\n [0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]\n }\n);\n```",
+ "docs": "Checked Euclidean division. Computes `self.div_euclid(rhs)`,\nreturning `None` if `rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!((i32::MIN + 1).checked_div_euclid(-1), Some(2147483647));\nassert_eq!(i32::MIN.checked_div_euclid(-1), None);\nassert_eq!((1i32).checked_div_euclid(0), None);\n```",
"id": 10577,
"inner": {
"function": {
@@ -47269,32 +45707,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "array": {
- "len": "8",
- "type": {
- "primitive": "u8"
- }
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
}
}
}
}
},
- "links": {
- "Self::to_be_bytes": 10575,
- "Self::to_le_bytes": 10576
- },
- "name": "to_ne_bytes",
+ "links": {},
+ "name": "checked_div_euclid",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -47304,20 +45755,23 @@
"10578": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Creates an integer value from its representation as a byte array in\nbig endian.\n\n\n\n# Examples\n\n```\nlet value = i64::from_be_bytes([0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]);\nassert_eq!(value, 0x1234567890123456);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_be_i64(input: &mut &[u8]) -> i64 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n i64::from_be_bytes(int_bytes.try_into().unwrap())\n}\n```",
+ "docs": "Strict Euclidean division. Computes `self.div_euclid(rhs)`, panicking\nif overflow occurred.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type.\n\n# Examples\n\n```\nassert_eq!((i32::MIN + 1).strict_div_euclid(-1), 2147483647);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i32::MIN.strict_div_euclid(-1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1i32).strict_div_euclid(0);\n```",
"id": 10578,
"inner": {
"function": {
@@ -47335,33 +45789,34 @@
"sig": {
"inputs": [
[
- "bytes",
+ "self",
{
- "array": {
- "len": "8",
- "type": {
- "primitive": "u8"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "from_be_bytes",
+ "name": "strict_div_euclid",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -47371,20 +45826,17 @@
"10579": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Creates an integer value from its representation as a byte array in\nlittle endian.\n\n\n\n# Examples\n\n```\nlet value = i64::from_le_bytes([0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]);\nassert_eq!(value, 0x1234567890123456);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_le_i64(input: &mut &[u8]) -> i64 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n i64::from_le_bytes(int_bytes.try_into().unwrap())\n}\n```",
+ "docs": "Checked integer division without remainder. Computes `self / rhs`,\nreturning `None` if `rhs == 0`, the division results in overflow,\nor `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!((i32::MIN + 1).checked_exact_div(-1), Some(2147483647));\nassert_eq!((-5i32).checked_exact_div(2), None);\nassert_eq!(i32::MIN.checked_exact_div(-1), None);\nassert_eq!((1i32).checked_exact_div(0), None);\n```",
"id": 10579,
"inner": {
"function": {
@@ -47402,33 +45854,49 @@
"sig": {
"inputs": [
[
- "bytes",
+ "self",
{
- "array": {
- "len": "8",
- "type": {
- "primitive": "u8"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "from_le_bytes",
+ "name": "checked_exact_div",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -47516,7 +45984,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -47534,8 +46002,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -47551,7 +46019,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -47560,11 +46028,11 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -47574,20 +46042,17 @@
"10580": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Creates an integer value from its memory representation as a byte\narray in native endianness.\n\nAs the target platform's native endianness is used, portable code\nlikely wants to use [`from_be_bytes`] or [`from_le_bytes`], as\nappropriate instead.\n\n[`from_be_bytes`]: Self::from_be_bytes\n[`from_le_bytes`]: Self::from_le_bytes\n\n\n\n# Examples\n\n```\nlet value = i64::from_ne_bytes(if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]\n} else {\n [0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]\n});\nassert_eq!(value, 0x1234567890123456);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_ne_i64(input: &mut &[u8]) -> i64 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n i64::from_ne_bytes(int_bytes.try_into().unwrap())\n}\n```",
+ "docs": "Checked integer division without remainder. Computes `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs == 0`, the division results in overflow,\nor `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64i32.exact_div(2), 32);\nassert_eq!(64i32.exact_div(32), 2);\nassert_eq!((i32::MIN + 1).exact_div(-1), 2147483647);\n```\n\n```should_panic\n#![feature(exact_div)]\nlet _ = 65i32.exact_div(2);\n```\n```should_panic\n#![feature(exact_div)]\nlet _ = i32::MIN.exact_div(-1);\n```",
"id": 10580,
"inner": {
"function": {
@@ -47605,36 +46070,34 @@
"sig": {
"inputs": [
[
- "bytes",
+ "self",
{
- "array": {
- "len": "8",
- "type": {
- "primitive": "u8"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i32"
}
}
}
},
- "links": {
- "Self::from_be_bytes": 10578,
- "Self::from_le_bytes": 10579
- },
- "name": "from_ne_bytes",
+ "links": {},
+ "name": "exact_div",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -47644,21 +46107,17 @@
"10581": {
"attrs": [
{
- "other": "#[rustc_diagnostic_item = \"i64_legacy_fn_min_value\"]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_min_value\", promotable: true}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
- "deprecation": {
- "note": "replaced by the `MIN` associated constant on this type",
- "since": "TBD"
- },
- "docs": "New code should prefer to use\n[`i64::MIN`] instead.\n\nReturns the smallest value that can be represented by this integer type.",
+ "deprecation": null,
+ "docs": "Unchecked integer division without remainder. Computes `self / rhs`.\n\n# Safety\n\nThis results in undefined behavior when `rhs == 0`, `self % rhs != 0`, or\n`self == i32::MIN && rhs == -1`,\ni.e. when [`checked_exact_div`](Self::checked_exact_div) would return `None`.",
"id": 10581,
"inner": {
"function": {
@@ -47671,28 +46130,41 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
- "inputs": [],
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i32"
+ }
+ ]
+ ],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i32"
}
}
}
},
"links": {
- "`i64::MIN`": 10449
+ "Self::checked_exact_div": 10579
},
- "name": "min_value",
+ "name": "unchecked_exact_div",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -47702,21 +46174,20 @@
"10582": {
"attrs": [
{
- "other": "#[rustc_diagnostic_item = \"i64_legacy_fn_max_value\"]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
},
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
- "deprecation": {
- "note": "replaced by the `MAX` associated constant on this type",
- "since": "TBD"
- },
- "docs": "New code should prefer to use\n[`i64::MAX`] instead.\n\nReturns the largest value that can be represented by this integer type.",
+ "deprecation": null,
+ "docs": "Checked integer remainder. Computes `self % rhs`, returning `None` if\n`rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!(5i32.checked_rem(2), Some(1));\nassert_eq!(5i32.checked_rem(0), None);\nassert_eq!(i32::MIN.checked_rem(-1), None);\n```",
"id": 10582,
"inner": {
"function": {
@@ -47732,25 +46203,51 @@
"is_unsafe": false
},
"sig": {
- "inputs": [],
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i32"
+ }
+ ]
+ ],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
- "links": {
- "`i64::MAX`": 10450
- },
- "name": "max_value",
+ "links": {},
+ "name": "checked_rem",
"span": {
"begin": [
- 319,
+ 295,
5
],
"end": [
- 338,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -47760,29 +46257,23 @@
"10583": {
"attrs": [
{
- "other": "#[doc(alias = \"average_floor\")]"
- },
- {
- "other": "#[doc(alias = \"average_ceil\")]"
- },
- {
- "other": "#[doc(alias = \"average\")]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"num_midpoint_signed\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"num_midpoint_signed\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the midpoint (average) between `self` and `rhs`.\n\n`midpoint(a, b)` is `(a + b) / 2` as if it were performed in a\nsufficiently-large signed integral type. This implies that the result is\nalways rounded towards zero and that no overflow will ever occur.\n\n# Examples\n\n```\nassert_eq!(0i64.midpoint(4), 2);\nassert_eq!((-1i64).midpoint(2), 0);\nassert_eq!((-7i64).midpoint(0), -3);\nassert_eq!(0i64.midpoint(-7), -3);\nassert_eq!(0i64.midpoint(7), 3);\n```",
+ "docs": "Strict integer remainder. Computes `self % rhs`, panicking if\nthe division results in overflow.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is `x % y` for `MIN / -1` on a\nsigned type (where `MIN` is the negative minimal value), which is invalid due to implementation artifacts.\n\n# Examples\n\n```\nassert_eq!(5i32.strict_rem(2), 1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5i32.strict_rem(0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i32::MIN.strict_rem(-1);\n```",
"id": 10583,
"inner": {
"function": {
@@ -47808,217 +46299,135 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "midpoint",
+ "name": "strict_rem",
"span": {
"begin": [
- 339,
+ 295,
5
],
"end": [
- 339,
- 35
+ 314,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"10584": {
- "attrs": [],
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Checked Euclidean remainder. Computes `self.rem_euclid(rhs)`, returning `None`\nif `rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!(5i32.checked_rem_euclid(2), Some(1));\nassert_eq!(5i32.checked_rem_euclid(0), None);\nassert_eq!(i32::MIN.checked_rem_euclid(-1), None);\n```",
"id": 10584,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "primitive": "i64"
- },
+ "function": {
"generics": {
"params": [],
"where_predicates": []
},
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 10449,
- 10450,
- 10451,
- 10452,
- 10453,
- 10455,
- 10456,
- 10457,
- 10458,
- 10459,
- 10460,
- 10461,
- 10462,
- 10463,
- 10464,
- 10465,
- 10466,
- 10467,
- 10468,
- 10469,
- 10470,
- 10471,
- 10472,
- 10473,
- 10475,
- 10476,
- 10477,
- 10478,
- 10479,
- 10481,
- 10482,
- 10483,
- 10484,
- 10485,
- 10487,
- 10488,
- 10489,
- 10490,
- 10491,
- 10492,
- 10493,
- 10494,
- 10495,
- 10496,
- 10497,
- 10498,
- 10499,
- 10500,
- 10501,
- 10502,
- 10503,
- 10504,
- 10505,
- 10506,
- 10507,
- 10508,
- 10509,
- 10510,
- 10511,
- 10512,
- 10513,
- 10514,
- 10515,
- 10516,
- 10517,
- 10518,
- 10519,
- 10520,
- 10521,
- 10522,
- 10523,
- 10474,
- 10524,
- 10480,
- 10525,
- 10486,
- 10526,
- 10527,
- 10528,
- 10529,
- 10530,
- 10531,
- 10532,
- 10533,
- 10534,
- 10535,
- 10536,
- 10538,
- 10539,
- 10540,
- 10542,
- 10543,
- 10544,
- 10546,
- 10545,
- 10547,
- 10548,
- 10549,
- 10550,
- 10551,
- 10552,
- 10553,
- 10554,
- 10555,
- 10556,
- 10557,
- 10558,
- 10559,
- 10560,
- 10561,
- 10562,
- 10563,
- 10564,
- 10565,
- 10454,
- 10566,
- 10567,
- 10568,
- 10569,
- 10570,
- 10571,
- 10572,
- 10573,
- 10574,
- 10575,
- 10576,
- 10577,
- 10578,
- 10579,
- 10580,
- 10581,
- 10582,
- 10583
- ],
- "provided_trait_methods": [],
- "trait": null
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
}
},
"links": {},
- "name": null,
+ "name": "checked_rem_euclid",
"span": {
"begin": [
- 318,
- 1
+ 295,
+ 5
],
"end": [
- 318,
- 9
+ 314,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"10585": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 82, patch: 0})}, feature: \"const_int_from_str\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from a string slice with digits in a given base.\n\nThe string is expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\nassert_eq!(i64::from_str_radix(\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\nassert!(i64::from_str_radix(\"1 \", 10).is_err());\n```",
+ "docs": "Strict Euclidean remainder. Computes `self.rem_euclid(rhs)`, panicking if\nthe division results in overflow.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is `x % y` for `MIN / -1` on a\nsigned type (where `MIN` is the negative minimal value), which is invalid due to implementation artifacts.\n\n# Examples\n\n```\nassert_eq!(5i32.strict_rem_euclid(2), 1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5i32.strict_rem_euclid(0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i32::MIN.strict_rem_euclid(-1);\n```",
"id": 10585,
"inner": {
"function": {
@@ -48036,65 +46445,35 @@
"sig": {
"inputs": [
[
- "src",
+ "self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "primitive": "str"
- }
- }
+ "generic": "Self"
}
],
[
- "radix",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i64"
- }
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 4784,
- "path": "ParseIntError"
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 57,
- "path": "Result"
- }
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "from_str_radix",
+ "name": "strict_rem_euclid",
"span": {
"begin": [
- 1630,
- 1
+ 295,
+ 5
],
"end": [
- 1630,
- 56
+ 314,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -48103,12 +46482,20 @@
"10586": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from an ASCII-byte slice with decimal digits.\n\nThe characters are expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(i64::from_ascii(b\"+10\"), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(i64::from_ascii(b\"1 \").is_err());\n```",
+ "docs": "Checked negation. Computes `-self`, returning `None` if `self == MIN`.\n\n# Examples\n\n```\nassert_eq!(5i32.checked_neg(), Some(-5));\nassert_eq!(i32::MIN.checked_neg(), None);\n```",
"id": 10586,
"inner": {
"function": {
@@ -48126,17 +46513,9 @@
"sig": {
"inputs": [
[
- "src",
+ "self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "slice": {
- "primitive": "u8"
- }
- }
- }
+ "generic": "Self"
}
]
],
@@ -48148,39 +46527,30 @@
"args": [
{
"type": {
- "primitive": "i64"
- }
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 4784,
- "path": "ParseIntError"
- }
+ "primitive": "i32"
}
}
],
"constraints": []
}
},
- "id": 57,
- "path": "Result"
+ "id": 51,
+ "path": "Option"
}
}
}
}
},
"links": {},
- "name": "from_ascii",
+ "name": "checked_neg",
"span": {
"begin": [
- 1630,
- 1
+ 295,
+ 5
],
"end": [
- 1630,
- 56
+ 314,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -48189,12 +46559,20 @@
"10587": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_neg\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from an ASCII-byte slice with digits in a given base.\n\nThe characters are expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(i64::from_ascii_radix(b\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(i64::from_ascii_radix(b\"1 \", 10).is_err());\n```",
+ "docs": "Unchecked negation. Computes `-self`, assuming overflow cannot occur.\n\n# Safety\n\nThis results in undefined behavior when\n`self == i32::MIN`,\ni.e. when [`checked_neg`] would return `None`.\n\n[`checked_neg`]: i32::checked_neg",
"id": 10587,
"inner": {
"function": {
@@ -48207,129 +46585,123 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
[
- "src",
- {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "slice": {
- "primitive": "u8"
- }
- }
- }
- }
- ],
- [
- "radix",
+ "self",
{
- "primitive": "u32"
+ "generic": "Self"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i64"
- }
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 4784,
- "path": "ParseIntError"
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 57,
- "path": "Result"
- }
+ "primitive": "i32"
}
}
}
},
- "links": {},
- "name": "from_ascii_radix",
+ "links": {
+ "i32::checked_neg": 10586
+ },
+ "name": "unchecked_neg",
"span": {
"begin": [
- 1630,
- 1
+ 295,
+ 5
],
"end": [
- 1630,
- 56
+ 314,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"10588": {
- "attrs": [],
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Strict negation. Computes `-self`, panicking if `self == MIN`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(5i32.strict_neg(), -5);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i32::MIN.strict_neg();\n```",
"id": 10588,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "primitive": "i64"
- },
+ "function": {
"generics": {
"params": [],
"where_predicates": []
},
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 10585,
- 10586,
- 10587
- ],
- "provided_trait_methods": [],
- "trait": null
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "i32"
+ }
+ }
}
},
"links": {},
- "name": null,
+ "name": "strict_neg",
"span": {
"begin": [
- 1630,
- 1
+ 295,
+ 5
],
"end": [
- 1630,
- 56
+ 314,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"10589": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 138215, is_soft: false}, feature: \"int_format_into\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Allows users to write an integer (in signed decimal format) into a variable `buf` of\ntype [`NumBuffer`] that is passed by the caller by mutable reference.\n\n# Examples\n\n```\n#![feature(int_format_into)]\nuse core::fmt::NumBuffer;\n\nlet n = 0i64;\nlet mut buf = NumBuffer::new();\nassert_eq!(n.format_into(&mut buf), \"0\");\n\nlet n1 = 32i64;\nassert_eq!(n1.format_into(&mut buf), \"32\");\n\nlet n2 = i64 :: MAX;\nassert_eq!(n2.format_into(&mut buf), i64 :: MAX.to_string());\n```",
+ "docs": "Checked shift left. Computes `self << rhs`, returning `None` if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x1i32.checked_shl(4), Some(0x10));\nassert_eq!(0x1i32.checked_shl(129), None);\nassert_eq!(0x10i32.checked_shl(31), Some(0));\n```",
"id": 10589,
"inner": {
"function": {
@@ -48341,7 +46713,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -48353,60 +46725,46 @@
}
],
[
- "buf",
+ "rhs",
{
- "borrowed_ref": {
- "is_mutable": true,
- "lifetime": null,
- "type": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i64"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 10162,
- "path": "NumBuffer"
- }
- }
- }
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "primitive": "str"
- }
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
}
}
}
}
},
- "links": {
- "`NumBuffer`": 10162
- },
- "name": "format_into",
+ "links": {},
+ "name": "checked_shl",
"span": {
"begin": [
- 562,
+ 295,
5
],
"end": [
- 562,
- 95
+ 314,
+ 6
],
- "filename": "checkouts/rust/library/core/src/fmt/num.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
@@ -48509,8 +46867,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -48526,7 +46884,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -48535,11 +46893,11 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -48547,73 +46905,140 @@
"visibility": "default"
},
"10590": {
- "attrs": [],
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Strict shift left. Computes `self << rhs`, panicking if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x1i32.strict_shl(4), 0x10);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x1i32.strict_shl(129);\n```",
"id": 10590,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "primitive": "i64"
- },
+ "function": {
"generics": {
"params": [],
"where_predicates": []
},
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 10589
- ],
- "provided_trait_methods": [],
- "trait": null
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "i32"
+ }
+ }
}
},
"links": {},
- "name": null,
+ "name": "strict_shl",
"span": {
"begin": [
- 562,
+ 295,
5
],
"end": [
- 562,
- 95
+ 314,
+ 6
],
- "filename": "checkouts/rust/library/core/src/fmt/num.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"10591": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "The smallest value that can be represented by this integer type\n(−2127).\n\n# Examples\n\n```\nassert_eq!(i128::MIN, -170141183460469231731687303715884105728);\n```",
+ "docs": "Unchecked shift left. Computes `self << rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shl`] would return `None`.\n\n[`checked_shl`]: i32::checked_shl",
"id": 10591,
"inner": {
- "assoc_const": {
- "type": {
- "primitive": "i128"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "value": "_"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": true
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "i32"
+ }
+ }
}
},
- "links": {},
- "name": "MIN",
+ "links": {
+ "i32::checked_shl": 10589
+ },
+ "name": "unchecked_shl",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -48623,30 +47048,65 @@
"10592": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "The largest value that can be represented by this integer type\n(2127 − 1).\n\n# Examples\n\n```\nassert_eq!(i128::MAX, 170141183460469231731687303715884105727);\n```",
+ "docs": "Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x1i32.unbounded_shl(4), 0x10);\nassert_eq!(0x1i32.unbounded_shl(129), 0);\n```",
"id": 10592,
"inner": {
- "assoc_const": {
- "type": {
- "primitive": "i128"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "value": "_"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "i32"
+ }
+ }
}
},
"links": {},
- "name": "MAX",
+ "name": "unbounded_shl",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -48656,30 +47116,77 @@
"10593": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 53, patch: 0})}, feature: \"int_bits_const\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "The size of this integer type in bits.\n\n# Examples\n\n```\nassert_eq!(i128::BITS, 128);\n```",
+ "docs": "Exact shift left. Computes `self << rhs` as long as it can be reversed losslessly.\n\nReturns `None` if any bits that would be shifted out differ from the resulting sign bit\nor if `rhs` >=\n`i32::BITS`.\nOtherwise, returns `Some(self << rhs)`.\n\n# Examples\n\n```\n#![feature(exact_bitshifts)]\n\nassert_eq!(0x1i32.exact_shl(4), Some(0x10));\nassert_eq!(0x1i32.exact_shl(i32::BITS - 2), Some(1 << i32::BITS - 2));\nassert_eq!(0x1i32.exact_shl(i32::BITS - 1), None);\nassert_eq!((-0x2i32).exact_shl(i32::BITS - 2), Some(-0x2 << i32::BITS - 2));\nassert_eq!((-0x2i32).exact_shl(i32::BITS - 1), None);\n```",
"id": 10593,
"inner": {
- "assoc_const": {
- "type": {
- "primitive": "u32"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "value": "u128::BITS"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
}
},
"links": {},
- "name": "BITS",
+ "name": "exact_shl",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -48689,16 +47196,7 @@
"10594": {
"attrs": [
{
- "other": "#[doc(alias = \"popcount\")]"
- },
- {
- "other": "#[doc(alias = \"popcnt\")]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
@@ -48708,7 +47206,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 0b100_0000i128;\n\nassert_eq!(n.count_ones(), 1);\n```\n",
+ "docs": "Unchecked exact shift left. Computes `self << rhs`, assuming the operation can be\nlosslessly reversed and `rhs` cannot be larger than\n`i32::BITS`.\n\n# Safety\n\nThis results in undefined behavior when `rhs >= self.leading_zeros() && rhs >=\nself.leading_ones()` i.e. when\n[`i32::exact_shl`]\nwould return `None`.",
"id": 10594,
"inner": {
"function": {
@@ -48721,7 +47219,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -48730,24 +47228,32 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i32"
}
}
}
},
- "links": {},
- "name": "count_ones",
+ "links": {
+ "`i32::exact_shl`": 10593
+ },
+ "name": "unchecked_exact_shl",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -48757,10 +47263,10 @@
"10595": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -48770,7 +47276,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of zeros in the binary representation of `self`.\n\n# Examples\n\n```\nassert_eq!(i128::MAX.count_zeros(), 1);\n```",
+ "docs": "Checked shift right. Computes `self >> rhs`, returning `None` if `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x10i32.checked_shr(4), Some(0x1));\nassert_eq!(0x10i32.checked_shr(128), None);\n```",
"id": 10595,
"inner": {
"function": {
@@ -48792,24 +47298,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "count_zeros",
+ "name": "checked_shr",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -48819,10 +47346,10 @@
"10596": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -48835,7 +47362,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 2 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero.\n\n# Examples\n\n```\nassert_eq!(2i128.ilog2(), 1);\n```",
+ "docs": "Strict shift right. Computes `self >> rhs`, panicking `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x10i32.strict_shr(4), 0x1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10i32.strict_shr(128);\n```",
"id": 10596,
"inner": {
"function": {
@@ -48857,24 +47384,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "ilog2",
+ "name": "strict_shr",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -48884,20 +47417,20 @@
"10597": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of leading zeros in the binary representation of `self`.\n\nDepending on what you're doing with the value, you might also be interested in the\n[`ilog2`] function which returns a consistent number, even if the type widens.\n\n# Examples\n\n```\nlet n = -1i128;\n\nassert_eq!(n.leading_zeros(), 0);\n```\n[`ilog2`]: i128::ilog2",
+ "docs": "Unchecked shift right. Computes `self >> rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shr`] would return `None`.\n\n[`checked_shr`]: i32::checked_shr",
"id": 10597,
"inner": {
"function": {
@@ -48910,7 +47443,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -48919,26 +47452,32 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i32"
}
}
}
},
"links": {
- "i128::ilog2": 10596
+ "i32::checked_shr": 10595
},
- "name": "leading_zeros",
+ "name": "unchecked_shr",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -48948,10 +47487,10 @@
"10598": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
},
{
"must_use": {
@@ -48961,7 +47500,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of trailing zeros in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = -4i128;\n\nassert_eq!(n.trailing_zeros(), 2);\n```",
+ "docs": "Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, which yields `0` for a positive number,\nand `-1` for a negative number.\n\n# Examples\n\n```\nassert_eq!(0x10i32.unbounded_shr(4), 0x1);\nassert_eq!(0x10i32.unbounded_shr(129), 0);\nassert_eq!(i32::MIN.unbounded_shr(129), -1);\n```",
"id": 10598,
"inner": {
"function": {
@@ -48983,24 +47522,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "trailing_zeros",
+ "name": "unbounded_shr",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -49010,10 +47555,7 @@
"10599": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
@@ -49023,7 +47565,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of leading ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = -1i128;\n\nassert_eq!(n.leading_ones(), 128);\n```",
+ "docs": "Exact shift right. Computes `self >> rhs` as long as it can be reversed losslessly.\n\nReturns `None` if any non-zero bits would be shifted out or if `rhs` >=\n`i32::BITS`.\nOtherwise, returns `Some(self >> rhs)`.\n\n# Examples\n\n```\n#![feature(exact_bitshifts)]\n\nassert_eq!(0x10i32.exact_shr(4), Some(0x1));\nassert_eq!(0x10i32.exact_shr(5), None);\n```",
"id": 10599,
"inner": {
"function": {
@@ -49045,24 +47587,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "leading_ones",
+ "name": "exact_shr",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -49086,8 +47649,8 @@
"use": {
"id": 107,
"is_glob": false,
- "name": "Debug",
- "source": "core::prelude::v1::Debug"
+ "name": "Default",
+ "source": "core::prelude::v1::Default"
}
},
"links": {},
@@ -49095,11 +47658,11 @@
"span": {
"begin": [
52,
- 43
+ 50
],
"end": [
52,
- 48
+ 57
],
"filename": "std/src/prelude/v1.rs"
},
@@ -49186,12 +47749,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -49214,10 +47777,7 @@
"10600": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
@@ -49227,7 +47787,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of trailing ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 3i128;\n\nassert_eq!(n.trailing_ones(), 2);\n```",
+ "docs": "Unchecked exact shift right. Computes `self >> rhs`, assuming the operation can be\nlosslessly reversed and `rhs` cannot be larger than\n`i32::BITS`.\n\n# Safety\n\nThis results in undefined behavior when `rhs > self.trailing_zeros() || rhs >=\ni32::BITS`\ni.e. when\n[`i32::exact_shr`]\nwould return `None`.",
"id": 10600,
"inner": {
"function": {
@@ -49240,7 +47800,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -49249,24 +47809,32 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i32"
}
}
}
},
- "links": {},
- "name": "trailing_ones",
+ "links": {
+ "`i32::exact_shr`": 10599
+ },
+ "name": "unchecked_exact_shr",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -49276,7 +47844,10 @@
"10601": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
},
{
"must_use": {
@@ -49286,7 +47857,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `self` with only the most significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: i128 = 0b_01100100;\n\nassert_eq!(n.isolate_highest_one(), 0b_01000000);\nassert_eq!(0_i128.isolate_highest_one(), 0);\n```",
+ "docs": "Checked absolute value. Computes `self.abs()`, returning `None` if\n`self == MIN`.\n\n# Examples\n\n```\nassert_eq!((-5i32).checked_abs(), Some(5));\nassert_eq!(i32::MIN.checked_abs(), None);\n```",
"id": 10601,
"inner": {
"function": {
@@ -49312,20 +47883,35 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "isolate_highest_one",
+ "name": "checked_abs",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -49335,17 +47921,23 @@
"10602": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `self` with only the least significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: i128 = 0b_01100100;\n\nassert_eq!(n.isolate_lowest_one(), 0b_00000100);\nassert_eq!(0_i128.isolate_lowest_one(), 0);\n```",
+ "docs": "Strict absolute value. Computes `self.abs()`, panicking if\n`self == MIN`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((-5i32).strict_abs(), 5);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i32::MIN.strict_abs();\n```",
"id": 10602,
"inner": {
"function": {
@@ -49371,20 +47963,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "isolate_lowest_one",
+ "name": "strict_abs",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -49394,7 +47986,10 @@
"10603": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
@@ -49404,7 +47999,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the index of the highest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_i128.highest_one(), None);\nassert_eq!(0x1_i128.highest_one(), Some(0));\nassert_eq!(0x10_i128.highest_one(), Some(4));\nassert_eq!(0x1f_i128.highest_one(), Some(4));\n```",
+ "docs": "Checked exponentiation. Computes `self.pow(exp)`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(8i32.checked_pow(2), Some(64));\nassert_eq!(i32::MAX.checked_pow(2), None);\n```",
"id": 10603,
"inner": {
"function": {
@@ -49426,6 +48021,12 @@
{
"generic": "Self"
}
+ ],
+ [
+ "exp",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
@@ -49436,7 +48037,7 @@
"args": [
{
"type": {
- "primitive": "u32"
+ "primitive": "i32"
}
}
],
@@ -49451,14 +48052,14 @@
}
},
"links": {},
- "name": "highest_one",
+ "name": "checked_pow",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -49468,17 +48069,23 @@
"10604": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the index of the lowest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_i128.lowest_one(), None);\nassert_eq!(0x1_i128.lowest_one(), Some(0));\nassert_eq!(0x10_i128.lowest_one(), Some(4));\nassert_eq!(0x1f_i128.lowest_one(), Some(0));\n```",
+ "docs": "Strict exponentiation. Computes `self.pow(exp)`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(8i32.strict_pow(2), 64);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i32::MAX.strict_pow(2);\n```",
"id": 10604,
"inner": {
"function": {
@@ -49500,39 +48107,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "exp",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "lowest_one",
+ "name": "strict_pow",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -49542,10 +48140,10 @@
"10605": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
},
{
"must_use": {
@@ -49555,7 +48153,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the bit pattern of `self` reinterpreted as an unsigned integer of the same size.\n\nThis produces the same result as an `as` cast, but ensures that the bit-width remains\nthe same.\n\n# Examples\n\n```\nlet n = -1i128;\n\nassert_eq!(n.cast_unsigned(), u128::MAX);\n```",
+ "docs": "Returns the square root of the number, rounded down.\n\nReturns `None` if `self` is negative.\n\n# Examples\n\n```\nassert_eq!(10i32.checked_isqrt(), Some(3));\n```",
"id": 10605,
"inner": {
"function": {
@@ -49581,20 +48179,35 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "cast_unsigned",
+ "name": "checked_isqrt",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -49604,7 +48217,7 @@
"10606": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -49617,7 +48230,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts the bits to the left by a specified amount, `n`,\nwrapping the truncated bits to the end of the resulting integer.\n\nPlease note this isn't the same operation as the `<<` shifting operator!\n\n# Examples\n\n```\nlet n = 0x13f40000000000000000000000004f76i128;\nlet m = 0x4f7613f4;\n\nassert_eq!(n.rotate_left(16), m);\n```",
+ "docs": "Saturating integer addition. Computes `self + rhs`, saturating at the numeric\nbounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i32.saturating_add(1), 101);\nassert_eq!(i32::MAX.saturating_add(100), i32::MAX);\nassert_eq!(i32::MIN.saturating_add(-1), i32::MIN);\n```",
"id": 10606,
"inner": {
"function": {
@@ -49641,28 +48254,28 @@
}
],
[
- "n",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "rotate_left",
+ "name": "saturating_add",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -49672,10 +48285,10 @@
"10607": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -49685,7 +48298,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts the bits to the right by a specified amount, `n`,\nwrapping the truncated bits to the beginning of the resulting\ninteger.\n\nPlease note this isn't the same operation as the `>>` shifting operator!\n\n# Examples\n\n```\nlet n = 0x4f7613f4i128;\nlet m = 0x13f40000000000000000000000004f76;\n\nassert_eq!(n.rotate_right(16), m);\n```",
+ "docs": "Saturating addition with an unsigned integer. Computes `self + rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1i32.saturating_add_unsigned(2), 3);\nassert_eq!(i32::MAX.saturating_add_unsigned(100), i32::MAX);\n```",
"id": 10607,
"inner": {
"function": {
@@ -49709,7 +48322,7 @@
}
],
[
- "n",
+ "rhs",
{
"primitive": "u32"
}
@@ -49717,20 +48330,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "rotate_right",
+ "name": "saturating_add_unsigned",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -49740,7 +48353,7 @@
"10608": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -49753,7 +48366,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Reverses the byte order of the integer.\n\n# Examples\n\n```\nlet n = 0x12345678901234567890123456789012i128;\n\nlet m = n.swap_bytes();\n\nassert_eq!(m, 0x12907856341290785634129078563412);\n```",
+ "docs": "Saturating integer subtraction. Computes `self - rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i32.saturating_sub(127), -27);\nassert_eq!(i32::MIN.saturating_sub(100), i32::MIN);\nassert_eq!(i32::MAX.saturating_sub(-1), i32::MAX);\n```",
"id": 10608,
"inner": {
"function": {
@@ -49775,24 +48388,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "swap_bytes",
+ "name": "saturating_sub",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -49802,10 +48421,10 @@
"10609": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -49815,7 +48434,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\n second least-significant bit becomes second most-significant bit, etc.\n\n# Examples\n\n```\nlet n = 0x12345678901234567890123456789012i128;\nlet m = n.reverse_bits();\n\nassert_eq!(m, 0x48091e6a2c48091e6a2c48091e6a2c48);\nassert_eq!(0, 0i128.reverse_bits());\n```",
+ "docs": "Saturating subtraction with an unsigned integer. Computes `self - rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i32.saturating_sub_unsigned(127), -27);\nassert_eq!(i32::MIN.saturating_sub_unsigned(100), i32::MIN);\n```",
"id": 10609,
"inner": {
"function": {
@@ -49837,24 +48456,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "reverse_bits",
+ "name": "saturating_sub_unsigned",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -49969,20 +48594,20 @@
"10610": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 45, patch: 0})}, feature: \"saturating_neg\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts an integer from big endian to the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai128;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(i128::from_be(n), n)\n} else {\n assert_eq!(i128::from_be(n), n.swap_bytes())\n}\n```",
+ "docs": "Saturating integer negation. Computes `-self`, returning `MAX` if `self == MIN`\ninstead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i32.saturating_neg(), -100);\nassert_eq!((-100i32).saturating_neg(), 100);\nassert_eq!(i32::MIN.saturating_neg(), i32::MAX);\nassert_eq!(i32::MAX.saturating_neg(), i32::MIN + 1);\n```",
"id": 10610,
"inner": {
"function": {
@@ -50000,28 +48625,28 @@
"sig": {
"inputs": [
[
- "x",
+ "self",
{
- "primitive": "i128"
+ "generic": "Self"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "from_be",
+ "name": "saturating_neg",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -50031,20 +48656,20 @@
"10611": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 45, patch: 0})}, feature: \"saturating_neg\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts an integer from little endian to the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai128;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(i128::from_le(n), n)\n} else {\n assert_eq!(i128::from_le(n), n.swap_bytes())\n}\n```",
+ "docs": "Saturating absolute value. Computes `self.abs()`, returning `MAX` if `self ==\nMIN` instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i32.saturating_abs(), 100);\nassert_eq!((-100i32).saturating_abs(), 100);\nassert_eq!(i32::MIN.saturating_abs(), i32::MAX);\nassert_eq!((i32::MIN + 1).saturating_abs(), i32::MAX);\n```",
"id": 10611,
"inner": {
"function": {
@@ -50062,28 +48687,28 @@
"sig": {
"inputs": [
[
- "x",
+ "self",
{
- "primitive": "i128"
+ "generic": "Self"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "from_le",
+ "name": "saturating_abs",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -50093,10 +48718,10 @@
"10612": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -50106,7 +48731,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts `self` to big endian from the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai128;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(n.to_be(), n)\n} else {\n assert_eq!(n.to_be(), n.swap_bytes())\n}\n```",
+ "docs": "Saturating integer multiplication. Computes `self * rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(10i32.saturating_mul(12), 120);\nassert_eq!(i32::MAX.saturating_mul(10), i32::MAX);\nassert_eq!(i32::MIN.saturating_mul(10), i32::MIN);\n```",
"id": 10612,
"inner": {
"function": {
@@ -50128,24 +48753,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "to_be",
+ "name": "saturating_mul",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -50155,10 +48786,10 @@
"10613": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\"}}]"
},
{
"must_use": {
@@ -50168,7 +48799,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts `self` to little endian from the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai128;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(n.to_le(), n)\n} else {\n assert_eq!(n.to_le(), n.swap_bytes())\n}\n```",
+ "docs": "Saturating integer division. Computes `self / rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i32.saturating_div(2), 2);\nassert_eq!(i32::MAX.saturating_div(-1), i32::MIN + 1);\nassert_eq!(i32::MIN.saturating_div(-1), i32::MAX);\n\n```",
"id": 10613,
"inner": {
"function": {
@@ -50190,24 +48821,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "to_le",
+ "name": "saturating_div",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -50217,10 +48854,10 @@
"10614": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
@@ -50230,7 +48867,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer addition. Computes `self + rhs`, returning `None`\nif overflow occurred.\n\n# Examples\n\n```\nassert_eq!((i128::MAX - 2).checked_add(1), Some(i128::MAX - 1));\nassert_eq!((i128::MAX - 2).checked_add(3), None);\n```",
+ "docs": "Saturating integer exponentiation. Computes `self.pow(exp)`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!((-4i32).saturating_pow(3), -64);\nassert_eq!(i32::MIN.saturating_pow(2), i32::MAX);\nassert_eq!(i32::MIN.saturating_pow(3), i32::MIN);\n```",
"id": 10614,
"inner": {
"function": {
@@ -50254,43 +48891,28 @@
}
],
[
- "rhs",
+ "exp",
{
- "primitive": "i128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i128"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "checked_add",
+ "name": "saturating_pow",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -50300,23 +48922,20 @@
"10615": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer addition. Computes `self + rhs`, panicking\nif overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((i128::MAX - 2).strict_add(1), i128::MAX - 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i128::MAX - 2).strict_add(3);\n```",
+ "docs": "Wrapping (modular) addition with an unsigned integer. Computes\n`self + rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(100i32.wrapping_add_unsigned(27), 127);\nassert_eq!(i32::MAX.wrapping_add_unsigned(2), i32::MIN + 1);\n```",
"id": 10615,
"inner": {
"function": {
@@ -50342,26 +48961,26 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "strict_add",
+ "name": "wrapping_add_unsigned",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -50371,10 +48990,10 @@
"10616": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -50384,7 +49003,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) addition. Computes `self + rhs`, wrapping around at the\nboundary of the type.\n\n# Examples\n\n```\nassert_eq!(100i128.wrapping_add(27), 127);\nassert_eq!(i128::MAX.wrapping_add(2), i128::MIN + 1);\n```",
+ "docs": "Wrapping (modular) subtraction with an unsigned integer. Computes\n`self - rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(0i32.wrapping_sub_unsigned(127), -127);\nassert_eq!((-2i32).wrapping_sub_unsigned(u32::MAX), -1);\n```",
"id": 10616,
"inner": {
"function": {
@@ -50410,26 +49029,26 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "wrapping_add",
+ "name": "wrapping_sub_unsigned",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -50439,23 +49058,20 @@
"10617": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer addition. Computes `self + rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_add(y)` is semantically equivalent to calling\n`x.`[`checked_add`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_add`].\n\n# Safety\n\nThis results in undefined behavior when\n`self + rhs > i128::MAX` or `self + rhs < i128::MIN`,\ni.e. when [`checked_add`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_add`]: i128::checked_add\n[`wrapping_add`]: i128::wrapping_add",
+ "docs": "Wrapping (modular) division. Computes `self / rhs`, wrapping around at the\nboundary of the type.\n\nThe only case where such wrapping can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type. In such a case, this function returns `MIN` itself.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i32.wrapping_div(10), 10);\nassert_eq!((-128i8).wrapping_div(-1), -128);\n```",
"id": 10617,
"inner": {
"function": {
@@ -50468,7 +49084,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -50481,29 +49097,26 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i32"
}
}
}
},
- "links": {
- "i128::checked_add": 10614,
- "i128::wrapping_add": 10616
- },
- "name": "unchecked_add",
+ "links": {},
+ "name": "wrapping_div",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -50513,10 +49126,10 @@
"10618": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -50526,7 +49139,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked addition with an unsigned integer. Computes `self + rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1i128.checked_add_unsigned(2), Some(3));\nassert_eq!((i128::MAX - 2).checked_add_unsigned(3), None);\n```",
+ "docs": "Wrapping Euclidean division. Computes `self.div_euclid(rhs)`,\nwrapping around at the boundary of the type.\n\nWrapping will only occur in `MIN / -1` on a signed type (where `MIN` is the negative minimal value\nfor the type). This is equivalent to `-MIN`, a positive value that is too large to represent in the\ntype. In this case, this method returns `MIN` itself.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i32.wrapping_div_euclid(10), 10);\nassert_eq!((-128i8).wrapping_div_euclid(-1), -128);\n```",
"id": 10618,
"inner": {
"function": {
@@ -50552,41 +49165,26 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i128"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "checked_add_unsigned",
+ "name": "wrapping_div_euclid",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -50596,23 +49194,20 @@
"10619": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict addition with an unsigned integer. Computes `self + rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1i128.strict_add_unsigned(2), 3);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i128::MAX - 2).strict_add_unsigned(3);\n```",
+ "docs": "Wrapping (modular) remainder. Computes `self % rhs`, wrapping around at the\nboundary of the type.\n\nSuch wrap-around never actually occurs mathematically; implementation artifacts make `x % y`\ninvalid for `MIN / -1` on a signed type (where `MIN` is the negative minimal value). In such a case,\nthis function returns `0`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i32.wrapping_rem(10), 0);\nassert_eq!((-128i8).wrapping_rem(-1), 0);\n```",
"id": 10619,
"inner": {
"function": {
@@ -50638,26 +49233,26 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "strict_add_unsigned",
+ "name": "wrapping_rem",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -50714,10 +49309,10 @@
"10620": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -50727,7 +49322,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer subtraction. Computes `self - rhs`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!((i128::MIN + 2).checked_sub(1), Some(i128::MIN + 1));\nassert_eq!((i128::MIN + 2).checked_sub(3), None);\n```",
+ "docs": "Wrapping Euclidean remainder. Computes `self.rem_euclid(rhs)`, wrapping around\nat the boundary of the type.\n\nWrapping will only occur in `MIN % -1` on a signed type (where `MIN` is the negative minimal value\nfor the type). In this case, this method returns 0.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i32.wrapping_rem_euclid(10), 0);\nassert_eq!((-128i8).wrapping_rem_euclid(-1), 0);\n```",
"id": 10620,
"inner": {
"function": {
@@ -50753,41 +49348,26 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i128"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "checked_sub",
+ "name": "wrapping_rem_euclid",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -50797,23 +49377,20 @@
"10621": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer subtraction. Computes `self - rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((i128::MIN + 2).strict_sub(1), i128::MIN + 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i128::MIN + 2).strict_sub(3);\n```",
+ "docs": "Wrapping (modular) negation. Computes `-self`, wrapping around at the boundary\nof the type.\n\nThe only case where such wrapping can occur is when one negates `MIN` on a signed type (where `MIN`\nis the negative minimal value for the type); this is a positive value that is too large to represent\nin the type. In such a case, this function returns `MIN` itself.\n\n# Examples\n\n```\nassert_eq!(100i32.wrapping_neg(), -100);\nassert_eq!((-100i32).wrapping_neg(), 100);\nassert_eq!(i32::MIN.wrapping_neg(), i32::MIN);\n```",
"id": 10621,
"inner": {
"function": {
@@ -50835,30 +49412,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i128"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "strict_sub",
+ "name": "wrapping_neg",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -50871,7 +49442,7 @@
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
@@ -50881,7 +49452,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) subtraction. Computes `self - rhs`, wrapping around at the\nboundary of the type.\n\n# Examples\n\n```\nassert_eq!(0i128.wrapping_sub(127), -127);\nassert_eq!((-2i128).wrapping_sub(i128::MAX), i128::MAX);\n```",
+ "docs": "Panic-free bitwise shift-left; yields `self << mask(rhs)`, where `mask` removes\nany high-order bits of `rhs` that would cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-left; the RHS of a wrapping shift-left is restricted to\nthe range of the type, rather than the bits shifted out of the LHS being returned to the other end.\nThe primitive integer types all implement a [`rotate_left`](Self::rotate_left) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!((-1i32).wrapping_shl(7), -128);\nassert_eq!((-1i32).wrapping_shl(128), -1);\n```",
"id": 10622,
"inner": {
"function": {
@@ -50907,26 +49478,28 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i32"
}
}
}
},
- "links": {},
- "name": "wrapping_sub",
+ "links": {
+ "Self::rotate_left": 10551
+ },
+ "name": "wrapping_shl",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -50936,23 +49509,20 @@
"10623": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer subtraction. Computes `self - rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_sub(y)` is semantically equivalent to calling\n`x.`[`checked_sub`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_sub`].\n\n# Safety\n\nThis results in undefined behavior when\n`self - rhs > i128::MAX` or `self - rhs < i128::MIN`,\ni.e. when [`checked_sub`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_sub`]: i128::checked_sub\n[`wrapping_sub`]: i128::wrapping_sub",
+ "docs": "Panic-free bitwise shift-right; yields `self >> mask(rhs)`, where `mask`\nremoves any high-order bits of `rhs` that would cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-right; the RHS of a wrapping shift-right is restricted\nto the range of the type, rather than the bits shifted out of the LHS being returned to the other\nend. The primitive integer types all implement a [`rotate_right`](Self::rotate_right) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!((-128i32).wrapping_shr(7), -1);\nassert_eq!((-128i16).wrapping_shr(64), -128);\n```",
"id": 10623,
"inner": {
"function": {
@@ -50965,7 +49535,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -50978,29 +49548,28 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i32"
}
}
}
},
"links": {
- "i128::checked_sub": 10620,
- "i128::wrapping_sub": 10622
+ "Self::rotate_right": 10552
},
- "name": "unchecked_sub",
+ "name": "wrapping_shr",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -51010,10 +49579,10 @@
"10624": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
},
{
"must_use": {
@@ -51023,7 +49592,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked subtraction with an unsigned integer. Computes `self - rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1i128.checked_sub_unsigned(2), Some(-1));\nassert_eq!((i128::MIN + 2).checked_sub_unsigned(3), None);\n```",
+ "docs": "Wrapping (modular) absolute value. Computes `self.abs()`, wrapping around at\nthe boundary of the type.\n\nThe only case where such wrapping can occur is when one takes the absolute value of the negative\nminimal value for the type; this is a positive value that is too large to represent in the type. In\nsuch a case, this function returns `MIN` itself.\n\n# Examples\n\n```\nassert_eq!(100i32.wrapping_abs(), 100);\nassert_eq!((-100i32).wrapping_abs(), 100);\nassert_eq!(i32::MIN.wrapping_abs(), i32::MIN);\nassert_eq!((-128i8).wrapping_abs() as u8, 128);\n```",
"id": 10624,
"inner": {
"function": {
@@ -51045,45 +49614,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u128"
- }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i128"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "checked_sub_unsigned",
+ "name": "wrapping_abs",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -51093,23 +49641,20 @@
"10625": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 51, patch: 0})}, feature: \"unsigned_abs\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 51, patch: 0})}, feature: \"unsigned_abs\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict subtraction with an unsigned integer. Computes `self - rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1i128.strict_sub_unsigned(2), -1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i128::MIN + 2).strict_sub_unsigned(3);\n```",
+ "docs": "Computes the absolute value of `self` without any wrapping\nor panicking.\n\n\n# Examples\n\n```\nassert_eq!(100i32.unsigned_abs(), 100u32);\nassert_eq!((-100i32).unsigned_abs(), 100u32);\nassert_eq!((-128i8).unsigned_abs(), 128u8);\n```",
"id": 10625,
"inner": {
"function": {
@@ -51131,30 +49676,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u128"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "strict_sub_unsigned",
+ "name": "unsigned_abs",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -51164,10 +49703,10 @@
"10626": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
@@ -51177,7 +49716,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer multiplication. Computes `self * rhs`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(i128::MAX.checked_mul(1), Some(i128::MAX));\nassert_eq!(i128::MAX.checked_mul(2), None);\n```",
+ "docs": "Wrapping (modular) exponentiation. Computes `self.pow(exp)`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(3i32.wrapping_pow(4), 81);\nassert_eq!(3i8.wrapping_pow(5), -13);\nassert_eq!(3i8.wrapping_pow(6), -39);\n```",
"id": 10626,
"inner": {
"function": {
@@ -51201,43 +49740,28 @@
}
],
[
- "rhs",
+ "exp",
{
- "primitive": "i128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i128"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "checked_mul",
+ "name": "wrapping_pow",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -51247,23 +49771,20 @@
"10627": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer multiplication. Computes `self * rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(i128::MAX.strict_mul(1), i128::MAX);\n```\n\nThe following panics because of overflow:\n\n``` should_panic\nlet _ = i128::MAX.strict_mul(2);\n```",
+ "docs": "Calculates `self` + `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would have\noccurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5i32.overflowing_add(2), (7, false));\nassert_eq!(i32::MAX.overflowing_add(1), (i32::MIN, true));\n```",
"id": 10627,
"inner": {
"function": {
@@ -51289,26 +49810,33 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "tuple": [
+ {
+ "primitive": "i32"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "strict_mul",
+ "name": "overflowing_add",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -51318,10 +49846,10 @@
"10628": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_bigint_helpers\"}}]"
},
{
"must_use": {
@@ -51331,7 +49859,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) multiplication. Computes `self * rhs`, wrapping around at\nthe boundary of the type.\n\n# Examples\n\n```\nassert_eq!(10i128.wrapping_mul(12), 120);\nassert_eq!(11i8.wrapping_mul(12), -124);\n```",
+ "docs": "Calculates `self` + `rhs` + `carry` and returns a tuple containing\nthe sum and the output carry (in that order).\n\nPerforms \"ternary addition\" of two integer operands and a carry-in\nbit, and returns an output integer and a carry-out bit. This allows\nchaining together multiple additions to create a wider addition, and\ncan be useful for bignum addition.\n\nThis can be thought of as a 32-bit \"full adder\", in the electronics sense.\n\nIf the input carry is false, this method is equivalent to\n[`overflowing_add`](Self::overflowing_add), and the output carry is\nequal to the overflow flag. Note that although carry and overflow\nflags are similar for unsigned integers, they are different for\nsigned integers.\n\n# Examples\n\n```\n// 3 MAX (a = 3 × 2^32 + 2^32 - 1)\n// + 5 7 (b = 5 × 2^32 + 7)\n// ---------\n// 9 6 (sum = 9 × 2^32 + 6)\n\nlet (a1, a0): (u32, u32) = (3, u32::MAX);\nlet (b1, b0): (u32, u32) = (5, 7);\nlet carry0 = false;\n\nlet (sum0, carry1) = a0.carrying_add(b0, carry0);\nassert_eq!(carry1, true);\nlet (sum1, carry2) = a1.carrying_add(b1, carry1);\nassert_eq!(carry2, false);\n\nassert_eq!((sum1, sum0), (9, 6));\n```",
"id": 10628,
"inner": {
"function": {
@@ -51357,26 +49885,41 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "u32"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "bool"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "tuple": [
+ {
+ "primitive": "u32"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "wrapping_mul",
+ "links": {
+ "Self::overflowing_add": 11363
+ },
+ "name": "carrying_add",
"span": {
"begin": [
- 343,
+ 1134,
5
],
"end": [
- 364,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -51386,23 +49929,17 @@
"10629": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer multiplication. Computes `self * rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_mul(y)` is semantically equivalent to calling\n`x.`[`checked_mul`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_mul`].\n\n# Safety\n\nThis results in undefined behavior when\n`self * rhs > i128::MAX` or `self * rhs < i128::MIN`,\ni.e. when [`checked_mul`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_mul`]: i128::checked_mul\n[`wrapping_mul`]: i128::wrapping_mul",
+ "docs": "Calculates `self` + `rhs` + `carry` and checks for overflow.\n\nPerforms \"ternary addition\" of two integer operands and a carry-in\nbit, and returns a tuple of the sum along with a boolean indicating\nwhether an arithmetic overflow would occur. On overflow, the wrapped\nvalue is returned.\n\nThis allows chaining together multiple additions to create a wider\naddition, and can be useful for bignum addition. This method should\nonly be used for the most significant word; for the less significant\nwords the unsigned method\n[`u32::carrying_add`]\nshould be used.\n\nThe output boolean returned by this method is *not* a carry flag,\nand should *not* be added to a more significant word.\n\nIf the input carry is false, this method is equivalent to\n[`overflowing_add`](Self::overflowing_add).\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n// Only the most significant word is signed.\n//\n// 10 MAX (a = 10 × 2^32 + 2^32 - 1)\n// + -5 9 (b = -5 × 2^32 + 9)\n// ---------\n// 6 8 (sum = 6 × 2^32 + 8)\n\nlet (a1, a0): (i32, u32) = (10, u32::MAX);\nlet (b1, b0): (i32, u32) = (-5, 9);\nlet carry0 = false;\n\n// u32::carrying_add for the less significant words\nlet (sum0, carry1) = a0.carrying_add(b0, carry0);\nassert_eq!(carry1, true);\n\n// i32::carrying_add for the most significant word\nlet (sum1, overflow) = a1.carrying_add(b1, carry1);\nassert_eq!(overflow, false);\n\nassert_eq!((sum1, sum0), (6, 8));\n```",
"id": 10629,
"inner": {
"function": {
@@ -51415,7 +49952,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -51428,29 +49965,42 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "i32"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "bool"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "tuple": [
+ {
+ "primitive": "i32"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {
- "i128::checked_mul": 10626,
- "i128::wrapping_mul": 10628
+ "Self::overflowing_add": 10627,
+ "`u32::carrying_add`": 10628
},
- "name": "unchecked_mul",
+ "name": "carrying_add",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -51530,7 +50080,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 109,
+ "id": 107,
"path": "Default"
}
}
@@ -51553,10 +50103,10 @@
"10630": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -51566,7 +50116,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division. Computes `self / rhs`, returning `None` if `rhs == 0`\nor the division results in overflow.\n\n# Examples\n\n```\nassert_eq!((i128::MIN + 1).checked_div(-1), Some(170141183460469231731687303715884105727));\nassert_eq!(i128::MIN.checked_div(-1), None);\nassert_eq!((1i128).checked_div(0), None);\n```",
+ "docs": "Calculates `self` + `rhs` with an unsigned `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1i32.overflowing_add_unsigned(2), (3, false));\nassert_eq!((i32::MIN).overflowing_add_unsigned(u32::MAX), (i32::MAX, false));\nassert_eq!((i32::MAX - 2).overflowing_add_unsigned(3), (i32::MIN, true));\n```",
"id": 10630,
"inner": {
"function": {
@@ -51592,41 +50142,33 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i128"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i32"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_div",
+ "name": "overflowing_add_unsigned",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -51636,23 +50178,20 @@
"10631": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer division. Computes `self / rhs`, panicking\nif overflow occurred.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type.\n\n# Examples\n\n```\nassert_eq!((i128::MIN + 1).strict_div(-1), 170141183460469231731687303715884105727);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i128::MIN.strict_div(-1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1i128).strict_div(0);\n```",
+ "docs": "Calculates `self` - `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating whether an arithmetic overflow\nwould occur. If an overflow would have occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5i32.overflowing_sub(2), (3, false));\nassert_eq!(i32::MIN.overflowing_sub(1), (i32::MAX, true));\n```",
"id": 10631,
"inner": {
"function": {
@@ -51678,26 +50217,33 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "tuple": [
+ {
+ "primitive": "i32"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "strict_div",
+ "name": "overflowing_sub",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -51707,10 +50253,10 @@
"10632": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_bigint_helpers\"}}]"
},
{
"must_use": {
@@ -51720,7 +50266,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked Euclidean division. Computes `self.div_euclid(rhs)`,\nreturning `None` if `rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!((i128::MIN + 1).checked_div_euclid(-1), Some(170141183460469231731687303715884105727));\nassert_eq!(i128::MIN.checked_div_euclid(-1), None);\nassert_eq!((1i128).checked_div_euclid(0), None);\n```",
+ "docs": "Calculates `self` − `rhs` − `borrow` and returns a tuple\ncontaining the difference and the output borrow.\n\nPerforms \"ternary subtraction\" by subtracting both an integer\noperand and a borrow-in bit from `self`, and returns an output\ninteger and a borrow-out bit. This allows chaining together multiple\nsubtractions to create a wider subtraction, and can be useful for\nbignum subtraction.\n\n# Examples\n\n```\n// 9 6 (a = 9 × 2^32 + 6)\n// - 5 7 (b = 5 × 2^32 + 7)\n// ---------\n// 3 MAX (diff = 3 × 2^32 + 2^32 - 1)\n\nlet (a1, a0): (u32, u32) = (9, 6);\nlet (b1, b0): (u32, u32) = (5, 7);\nlet borrow0 = false;\n\nlet (diff0, borrow1) = a0.borrowing_sub(b0, borrow0);\nassert_eq!(borrow1, true);\nlet (diff1, borrow2) = a1.borrowing_sub(b1, borrow1);\nassert_eq!(borrow2, false);\n\nassert_eq!((diff1, diff0), (3, u32::MAX));\n```",
"id": 10632,
"inner": {
"function": {
@@ -51746,41 +50292,39 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "u32"
+ }
+ ],
+ [
+ "borrow",
+ {
+ "primitive": "bool"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i128"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "u32"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_div_euclid",
+ "name": "borrowing_sub",
"span": {
"begin": [
- 343,
+ 1134,
5
],
"end": [
- 364,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -51790,23 +50334,17 @@
"10633": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict Euclidean division. Computes `self.div_euclid(rhs)`, panicking\nif overflow occurred.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type.\n\n# Examples\n\n```\nassert_eq!((i128::MIN + 1).strict_div_euclid(-1), 170141183460469231731687303715884105727);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i128::MIN.strict_div_euclid(-1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1i128).strict_div_euclid(0);\n```",
+ "docs": "Calculates `self` − `rhs` − `borrow` and checks for\noverflow.\n\nPerforms \"ternary subtraction\" by subtracting both an integer\noperand and a borrow-in bit from `self`, and returns a tuple of the\ndifference along with a boolean indicating whether an arithmetic\noverflow would occur. On overflow, the wrapped value is returned.\n\nThis allows chaining together multiple subtractions to create a\nwider subtraction, and can be useful for bignum subtraction. This\nmethod should only be used for the most significant word; for the\nless significant words the unsigned method\n[`u32::borrowing_sub`]\nshould be used.\n\nThe output boolean returned by this method is *not* a borrow flag,\nand should *not* be subtracted from a more significant word.\n\nIf the input borrow is false, this method is equivalent to\n[`overflowing_sub`](Self::overflowing_sub).\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n// Only the most significant word is signed.\n//\n// 6 8 (a = 6 × 2^32 + 8)\n// - -5 9 (b = -5 × 2^32 + 9)\n// ---------\n// 10 MAX (diff = 10 × 2^32 + 2^32 - 1)\n\nlet (a1, a0): (i32, u32) = (6, 8);\nlet (b1, b0): (i32, u32) = (-5, 9);\nlet borrow0 = false;\n\n// u32::borrowing_sub for the less significant words\nlet (diff0, borrow1) = a0.borrowing_sub(b0, borrow0);\nassert_eq!(borrow1, true);\n\n// i32::borrowing_sub for the most significant word\nlet (diff1, overflow) = a1.borrowing_sub(b1, borrow1);\nassert_eq!(overflow, false);\n\nassert_eq!((diff1, diff0), (10, u32::MAX));\n```",
"id": 10633,
"inner": {
"function": {
@@ -51832,26 +50370,42 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "i32"
+ }
+ ],
+ [
+ "borrow",
+ {
+ "primitive": "bool"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "tuple": [
+ {
+ "primitive": "i32"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "strict_div_euclid",
+ "links": {
+ "Self::overflowing_sub": 10631,
+ "`u32::borrowing_sub`": 10632
+ },
+ "name": "borrowing_sub",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -51861,7 +50415,10 @@
"10634": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -51871,7 +50428,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division without remainder. Computes `self / rhs`,\nreturning `None` if `rhs == 0`, the division results in overflow,\nor `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!((i128::MIN + 1).checked_exact_div(-1), Some(170141183460469231731687303715884105727));\nassert_eq!((-5i128).checked_exact_div(2), None);\nassert_eq!(i128::MIN.checked_exact_div(-1), None);\nassert_eq!((1i128).checked_exact_div(0), None);\n```",
+ "docs": "Calculates `self` - `rhs` with an unsigned `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1i32.overflowing_sub_unsigned(2), (-1, false));\nassert_eq!((i32::MAX).overflowing_sub_unsigned(u32::MAX), (i32::MIN, false));\nassert_eq!((i32::MIN + 2).overflowing_sub_unsigned(3), (i32::MAX, true));\n```",
"id": 10634,
"inner": {
"function": {
@@ -51897,41 +50454,33 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i128"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i32"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_exact_div",
+ "name": "overflowing_sub_unsigned",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -51941,7 +50490,10 @@
"10635": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -51951,7 +50503,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division without remainder. Computes `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs == 0`, the division results in overflow,\nor `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64i128.exact_div(2), 32);\nassert_eq!(64i128.exact_div(32), 2);\nassert_eq!((i128::MIN + 1).exact_div(-1), 170141183460469231731687303715884105727);\n```\n\n```should_panic\n#![feature(exact_div)]\nlet _ = 65i128.exact_div(2);\n```\n```should_panic\n#![feature(exact_div)]\nlet _ = i128::MIN.exact_div(-1);\n```",
+ "docs": "Calculates the multiplication of `self` and `rhs`.\n\nReturns a tuple of the multiplication along with a boolean indicating whether an arithmetic overflow\nwould occur. If an overflow would have occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5i32.overflowing_mul(2), (10, false));\nassert_eq!(1_000_000_000i32.overflowing_mul(10), (1410065408, true));\n```",
"id": 10635,
"inner": {
"function": {
@@ -51977,26 +50529,33 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "tuple": [
+ {
+ "primitive": "i32"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "exact_div",
+ "name": "overflowing_mul",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -52006,7 +50565,10 @@
"10636": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
},
{
"must_use": {
@@ -52016,7 +50578,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer division without remainder. Computes `self / rhs`.\n\n# Safety\n\nThis results in undefined behavior when `rhs == 0`, `self % rhs != 0`, or\n`self == i128::MIN && rhs == -1`,\ni.e. when [`checked_exact_div`](Self::checked_exact_div) would return `None`.",
+ "docs": "Calculates the \"full multiplication\" `self * rhs + carry`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need the `carry`, then you can use [`Self::widening_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.carrying_mul(-2, 0), (4294967286, -1));\nassert_eq!(5i32.carrying_mul(-2, 10), (0, 0));\nassert_eq!(1_000_000_000i32.carrying_mul(-10, 0), (2884901888, -3));\nassert_eq!(1_000_000_000i32.carrying_mul(-10, 10), (2884901898, -3));\nassert_eq!(i32::MAX.carrying_mul(i32::MAX, i32::MAX), (i32::MAX.unsigned_abs() + 1, i32::MAX / 2));\n```",
"id": 10636,
"inner": {
"function": {
@@ -52029,7 +50591,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -52042,28 +50604,41 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "i32"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "tuple": [
+ {
+ "primitive": "u32"
+ },
+ {
+ "primitive": "i32"
+ }
+ ]
}
}
}
},
"links": {
- "Self::checked_exact_div": 10634
+ "`Self::widening_mul`": 10637
},
- "name": "unchecked_exact_div",
+ "name": "carrying_mul",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -52073,10 +50648,10 @@
"10637": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
},
{
"must_use": {
@@ -52086,7 +50661,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer remainder. Computes `self % rhs`, returning `None` if\n`rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!(5i128.checked_rem(2), Some(1));\nassert_eq!(5i128.checked_rem(0), None);\nassert_eq!(i128::MIN.checked_rem(-1), None);\n```",
+ "docs": "Calculates the complete product `self * rhs` without the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nIf you also need to add a carry to the wide result, then you want\n[`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.widening_mul(-2), (4294967286, -1));\nassert_eq!(1_000_000_000i32.widening_mul(-10), (2884901888, -3));\n```",
"id": 10637,
"inner": {
"function": {
@@ -52112,41 +50687,35 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i128"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "u32"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "i32"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "checked_rem",
+ "links": {
+ "`Self::carrying_mul`": 10636
+ },
+ "name": "widening_mul",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -52156,23 +50725,20 @@
"10638": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer remainder. Computes `self % rhs`, panicking if\nthe division results in overflow.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is `x % y` for `MIN / -1` on a\nsigned type (where `MIN` is the negative minimal value), which is invalid due to implementation artifacts.\n\n# Examples\n\n```\nassert_eq!(5i128.strict_rem(2), 1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5i128.strict_rem(0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i128::MIN.strict_rem(-1);\n```",
+ "docs": "Calculates the \"full multiplication\" `self * rhs + carry1 + carry2`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need either `carry`, then you can use [`Self::widening_mul`] instead,\nand if you only need one `carry`, then you can use [`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.carrying_mul_add(-2, 0, 0), (4294967286, -1));\nassert_eq!(5i32.carrying_mul_add(-2, 10, 10), (10, 0));\nassert_eq!(1_000_000_000i32.carrying_mul_add(-10, 0, 0), (2884901888, -3));\nassert_eq!(1_000_000_000i32.carrying_mul_add(-10, 10, 10), (2884901908, -3));\nassert_eq!(i32::MAX.carrying_mul_add(i32::MAX, i32::MAX, i32::MAX), (u32::MAX, i32::MAX / 2));\n```",
"id": 10638,
"inner": {
"function": {
@@ -52198,26 +50764,48 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "i32"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "i32"
+ }
+ ],
+ [
+ "add",
+ {
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "tuple": [
+ {
+ "primitive": "u32"
+ },
+ {
+ "primitive": "i32"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "strict_rem",
+ "links": {
+ "`Self::carrying_mul`": 10636,
+ "`Self::widening_mul`": 10637
+ },
+ "name": "carrying_mul_add",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -52227,10 +50815,10 @@
"10639": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -52240,7 +50828,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked Euclidean remainder. Computes `self.rem_euclid(rhs)`, returning `None`\nif `rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!(5i128.checked_rem_euclid(2), Some(1));\nassert_eq!(5i128.checked_rem_euclid(0), None);\nassert_eq!(i128::MIN.checked_rem_euclid(-1), None);\n```",
+ "docs": "Calculates the divisor when `self` is divided by `rhs`.\n\nReturns a tuple of the divisor along with a boolean indicating whether an arithmetic overflow would\noccur. If an overflow would occur then self is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i32.overflowing_div(2), (2, false));\nassert_eq!(i32::MIN.overflowing_div(-1), (i32::MIN, true));\n```",
"id": 10639,
"inner": {
"function": {
@@ -52266,41 +50854,33 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i128"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i32"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_rem_euclid",
+ "name": "overflowing_div",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -52335,11 +50915,11 @@
"name": "Item",
"span": {
"begin": [
- 2135,
+ 2130,
5
],
"end": [
- 2135,
+ 2130,
27
],
"filename": "std/src/collections/hash/map.rs"
@@ -52349,23 +50929,20 @@
"10640": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict Euclidean remainder. Computes `self.rem_euclid(rhs)`, panicking if\nthe division results in overflow.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is `x % y` for `MIN / -1` on a\nsigned type (where `MIN` is the negative minimal value), which is invalid due to implementation artifacts.\n\n# Examples\n\n```\nassert_eq!(5i128.strict_rem_euclid(2), 1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5i128.strict_rem_euclid(0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i128::MIN.strict_rem_euclid(-1);\n```",
+ "docs": "Calculates the quotient of Euclidean division `self.div_euclid(rhs)`.\n\nReturns a tuple of the divisor along with a boolean indicating whether an arithmetic overflow would\noccur. If an overflow would occur then `self` is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i32.overflowing_div_euclid(2), (2, false));\nassert_eq!(i32::MIN.overflowing_div_euclid(-1), (i32::MIN, true));\n```",
"id": 10640,
"inner": {
"function": {
@@ -52391,26 +50968,33 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "tuple": [
+ {
+ "primitive": "i32"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "strict_rem_euclid",
+ "name": "overflowing_div_euclid",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -52420,7 +51004,7 @@
"10641": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
@@ -52433,7 +51017,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked negation. Computes `-self`, returning `None` if `self == MIN`.\n\n# Examples\n\n```\nassert_eq!(5i128.checked_neg(), Some(-5));\nassert_eq!(i128::MIN.checked_neg(), None);\n```",
+ "docs": "Calculates the remainder when `self` is divided by `rhs`.\n\nReturns a tuple of the remainder after dividing along with a boolean indicating whether an\narithmetic overflow would occur. If an overflow would occur then 0 is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i32.overflowing_rem(2), (1, false));\nassert_eq!(i32::MIN.overflowing_rem(-1), (0, true));\n```",
"id": 10641,
"inner": {
"function": {
@@ -52455,39 +51039,37 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i128"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i32"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_neg",
+ "name": "overflowing_rem",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -52497,7 +51079,10 @@
"10642": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_neg\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -52510,7 +51095,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked negation. Computes `-self`, assuming overflow cannot occur.\n\n# Safety\n\nThis results in undefined behavior when\n`self == i128::MIN`,\ni.e. when [`checked_neg`] would return `None`.\n\n[`checked_neg`]: i128::checked_neg",
+ "docs": "Overflowing Euclidean remainder. Calculates `self.rem_euclid(rhs)`.\n\nReturns a tuple of the remainder after dividing along with a boolean indicating whether an\narithmetic overflow would occur. If an overflow would occur then 0 is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i32.overflowing_rem_euclid(2), (1, false));\nassert_eq!(i32::MIN.overflowing_rem_euclid(-1), (0, true));\n```",
"id": 10642,
"inner": {
"function": {
@@ -52523,7 +51108,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -52532,26 +51117,37 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "tuple": [
+ {
+ "primitive": "i32"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
- "links": {
- "i128::checked_neg": 10641
- },
- "name": "unchecked_neg",
+ "links": {},
+ "name": "overflowing_rem_euclid",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -52561,23 +51157,20 @@
"10643": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict negation. Computes `-self`, panicking if `self == MIN`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(5i128.strict_neg(), -5);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i128::MIN.strict_neg();\n",
+ "docs": "Negates self, overflowing if this is equal to the minimum value.\n\nReturns a tuple of the negated version of self along with a boolean indicating whether an overflow\nhappened. If `self` is the minimum value (e.g., `i32::MIN` for values of type `i32`), then the\nminimum value will be returned again and `true` will be returned for an overflow happening.\n\n# Examples\n\n```\nassert_eq!(2i32.overflowing_neg(), (-2, false));\nassert_eq!(i32::MIN.overflowing_neg(), (i32::MIN, true));\n```",
"id": 10643,
"inner": {
"function": {
@@ -52603,20 +51196,27 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "tuple": [
+ {
+ "primitive": "i32"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "strict_neg",
+ "name": "overflowing_neg",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -52626,7 +51226,7 @@
"10644": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
@@ -52639,7 +51239,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked shift left. Computes `self << rhs`, returning `None` if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x1i128.checked_shl(4), Some(0x10));\nassert_eq!(0x1i128.checked_shl(129), None);\nassert_eq!(0x10i128.checked_shl(127), Some(0));\n```",
+ "docs": "Shifts self left by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean indicating whether the shift\nvalue was larger than or equal to the number of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then used to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x1i32.overflowing_shl(4), (0x10, false));\nassert_eq!(0x1i32.overflowing_shl(36), (0x10, true));\nassert_eq!(0x10i32.overflowing_shl(31), (0, false));\n```",
"id": 10644,
"inner": {
"function": {
@@ -52671,35 +51271,27 @@
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i128"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i32"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_shl",
+ "name": "overflowing_shl",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -52709,23 +51301,20 @@
"10645": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict shift left. Computes `self << rhs`, panicking if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x1i128.strict_shl(4), 0x10);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x1i128.strict_shl(129);\n```",
+ "docs": "Shifts self right by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean indicating whether the shift\nvalue was larger than or equal to the number of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then used to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x10i32.overflowing_shr(4), (0x1, false));\nassert_eq!(0x10i32.overflowing_shr(36), (0x1, true));\n```",
"id": 10645,
"inner": {
"function": {
@@ -52757,20 +51346,27 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "tuple": [
+ {
+ "primitive": "i32"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "strict_shl",
+ "name": "overflowing_shr",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -52780,20 +51376,20 @@
"10646": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked shift left. Computes `self << rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shl`] would return `None`.\n\n[`checked_shl`]: i128::checked_shl",
+ "docs": "Computes the absolute value of `self`.\n\nReturns a tuple of the absolute version of self along with a boolean indicating whether an overflow\nhappened. If self is the minimum value\n(e.g., i32::MIN for values of type i32),\nthen the minimum value will be returned again and true will be returned\nfor an overflow happening.\n\n# Examples\n\n```\nassert_eq!(10i32.overflowing_abs(), (10, false));\nassert_eq!((-10i32).overflowing_abs(), (10, false));\nassert_eq!((i32::MIN).overflowing_abs(), (i32::MIN, true));\n```",
"id": 10646,
"inner": {
"function": {
@@ -52806,7 +51402,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -52815,32 +51411,31 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "tuple": [
+ {
+ "primitive": "i32"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
- "links": {
- "i128::checked_shl": 10644
- },
- "name": "unchecked_shl",
+ "links": {},
+ "name": "overflowing_abs",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -52850,10 +51445,10 @@
"10647": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
@@ -52863,7 +51458,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x1i128.unbounded_shl(4), 0x10);\nassert_eq!(0x1i128.unbounded_shl(129), 0);\n```",
+ "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\nReturns a tuple of the exponentiation along with a bool indicating\nwhether an overflow happened.\n\n# Examples\n\n```\nassert_eq!(3i32.overflowing_pow(4), (81, false));\nassert_eq!(3i8.overflowing_pow(5), (-13, true));\n```",
"id": 10647,
"inner": {
"function": {
@@ -52887,7 +51482,7 @@
}
],
[
- "rhs",
+ "exp",
{
"primitive": "u32"
}
@@ -52895,20 +51490,27 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "tuple": [
+ {
+ "primitive": "i32"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "unbounded_shl",
+ "name": "overflowing_pow",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -52918,10 +51520,10 @@
"10648": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -52931,7 +51533,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked shift right. Computes `self >> rhs`, returning `None` if `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x10i128.checked_shr(4), Some(0x1));\nassert_eq!(0x10i128.checked_shr(128), None);\n```",
+ "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\n# Examples\n\n```\nlet x: i32 = 2; // or any other integer type\n\nassert_eq!(x.pow(5), 32);\n```",
"id": 10648,
"inner": {
"function": {
@@ -52955,7 +51557,7 @@
}
],
[
- "rhs",
+ "exp",
{
"primitive": "u32"
}
@@ -52963,35 +51565,20 @@
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i128"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "checked_shr",
+ "name": "pow",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -53001,10 +51588,10 @@
"10649": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
},
{
"must_use": {
@@ -53017,7 +51604,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict shift right. Computes `self >> rhs`, panicking `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x10i128.strict_shr(4), 0x1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10i128.strict_shr(128);\n```",
+ "docs": "Returns the square root of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is negative.\n\n# Examples\n\n```\nassert_eq!(10i32.isqrt(), 3);\n```",
"id": 10649,
"inner": {
"function": {
@@ -53039,30 +51626,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "strict_shr",
+ "name": "isqrt",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -53139,11 +51720,11 @@
"name": "next",
"span": {
"begin": [
- 2138,
+ 2133,
5
],
"end": [
- 2140,
+ 2135,
6
],
"filename": "std/src/collections/hash/map.rs"
@@ -53153,7 +51734,10 @@
"10650": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -53166,7 +51750,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked shift right. Computes `self >> rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shr`] would return `None`.\n\n[`checked_shr`]: i128::checked_shr",
+ "docs": "Calculates the quotient of Euclidean division of `self` by `rhs`.\n\nThis computes the integer `q` such that `self = q * rhs + r`, with\n`r = self.rem_euclid(rhs)` and `0 <= r < abs(rhs)`.\n\nIn other words, the result is `self / rhs` rounded to the integer `q`\nsuch that `self >= q * rhs`.\nIf `self > 0`, this is equal to rounding towards zero (the default in Rust);\nif `self < 0`, this is equal to rounding away from zero (towards +/- infinity).\nIf `rhs > 0`, this is equal to rounding towards -infinity;\nif `rhs < 0`, this is equal to rounding towards +infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\nlet a: i32 = 7; // or any other integer type\nlet b = 4;\n\nassert_eq!(a.div_euclid(b), 1); // 7 >= 4 * 1\nassert_eq!(a.div_euclid(-b), -1); // 7 >= -4 * -1\nassert_eq!((-a).div_euclid(b), -2); // -7 >= 4 * -2\nassert_eq!((-a).div_euclid(-b), 2); // -7 >= -4 * 2\n```",
"id": 10650,
"inner": {
"function": {
@@ -53179,7 +51763,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -53192,28 +51776,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i32"
}
}
}
},
- "links": {
- "i128::checked_shr": 10648
- },
- "name": "unchecked_shr",
+ "links": {},
+ "name": "div_euclid",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -53223,20 +51805,26 @@
"10651": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
+ "other": "#[doc(alias = \"modulo\", alias = \"mod\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, which yields `0` for a positive number,\nand `-1` for a negative number.\n\n# Examples\n\n```\nassert_eq!(0x10i128.unbounded_shr(4), 0x1);\nassert_eq!(0x10i128.unbounded_shr(129), 0);\nassert_eq!(i128::MIN.unbounded_shr(129), -1);\n```",
+ "docs": "Calculates the least nonnegative remainder of `self (mod rhs)`.\n\nThis is done as if by the Euclidean division algorithm -- given\n`r = self.rem_euclid(rhs)`, the result satisfies\n`self = rhs * self.div_euclid(rhs) + r` and `0 <= r < abs(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN` and\n`rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\nlet a: i32 = 7; // or any other integer type\nlet b = 4;\n\nassert_eq!(a.rem_euclid(b), 3);\nassert_eq!((-a).rem_euclid(b), 1);\nassert_eq!(a.rem_euclid(-b), 3);\nassert_eq!((-a).rem_euclid(-b), 1);\n```\n\nThis will panic:\n```should_panic\nlet _ = i32::MIN.rem_euclid(-1);\n```",
"id": 10651,
"inner": {
"function": {
@@ -53262,26 +51850,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "unbounded_shr",
+ "name": "rem_euclid",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -53291,20 +51879,20 @@
"10652": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked absolute value. Computes `self.abs()`, returning `None` if\n`self == MIN`.\n\n# Examples\n\n```\nassert_eq!((-5i128).checked_abs(), Some(5));\nassert_eq!(i128::MIN.checked_abs(), None);\n```",
+ "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards negative infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nlet a: i32 = 8;\nlet b = 3;\n\nassert_eq!(a.div_floor(b), 2);\nassert_eq!(a.div_floor(-b), -3);\nassert_eq!((-a).div_floor(b), -3);\nassert_eq!((-a).div_floor(-b), 2);\n```",
"id": 10652,
"inner": {
"function": {
@@ -53326,39 +51914,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i128"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "checked_abs",
+ "name": "div_floor",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -53368,10 +51947,7 @@
"10653": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
},
{
"must_use": {
@@ -53384,70 +51960,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict absolute value. Computes `self.abs()`, panicking if\n`self == MIN`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((-5i128).strict_abs(), 5);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i128::MIN.strict_abs();\n```",
+ "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards positive infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nlet a: i32 = 8;\nlet b = 3;\n\nassert_eq!(a.div_ceil(b), 3);\nassert_eq!(a.div_ceil(-b), -2);\nassert_eq!((-a).div_ceil(b), -2);\nassert_eq!((-a).div_ceil(-b), 3);\n```",
"id": 10653,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i128"
- }
- }
- }
- },
- "links": {},
- "name": "strict_abs",
- "span": {
- "begin": [
- 343,
- 5
- ],
- "end": [
- 364,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "10654": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Checked exponentiation. Computes `self.pow(exp)`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(8i128.checked_pow(2), Some(64));\nassert_eq!(i128::MAX.checked_pow(2), None);\n```",
- "id": 10654,
"inner": {
"function": {
"generics": {
@@ -53470,70 +51984,49 @@
}
],
[
- "exp",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i128"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "checked_pow",
+ "name": "div_ceil",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10655": {
+ "10654": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict exponentiation. Computes `self.pow(exp)`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(8i128.strict_pow(2), 64);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i128::MAX.strict_pow(2);\n```",
- "id": 10655,
+ "docs": "If `rhs` is positive, calculates the smallest value greater than or\nequal to `self` that is a multiple of `rhs`. If `rhs` is negative,\ncalculates the largest value less than or equal to `self` that is a\nmultiple of `rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nOn overflow, this function will panic if overflow checks are enabled (default in debug\nmode) and wrap if overflow checks are disabled (default in release mode).\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(16_i32.next_multiple_of(8), 16);\nassert_eq!(23_i32.next_multiple_of(8), 24);\nassert_eq!(16_i32.next_multiple_of(-8), 16);\nassert_eq!(23_i32.next_multiple_of(-8), 16);\nassert_eq!((-16_i32).next_multiple_of(8), -16);\nassert_eq!((-23_i32).next_multiple_of(8), -16);\nassert_eq!((-16_i32).next_multiple_of(-8), -16);\nassert_eq!((-23_i32).next_multiple_of(-8), -24);\n```",
+ "id": 10654,
"inner": {
"function": {
"generics": {
@@ -53556,41 +52049,38 @@
}
],
[
- "exp",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "strict_pow",
+ "name": "next_multiple_of",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10656": {
+ "10655": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
},
{
"must_use": {
@@ -53600,8 +52090,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the square root of the number, rounded down.\n\nReturns `None` if `self` is negative.\n\n# Examples\n\n```\nassert_eq!(10i128.checked_isqrt(), Some(3));\n```",
- "id": 10656,
+ "docs": "If `rhs` is positive, calculates the smallest value greater than or\nequal to `self` that is a multiple of `rhs`. If `rhs` is negative,\ncalculates the largest value less than or equal to `self` that is a\nmultiple of `rhs`. Returns `None` if `rhs` is zero or the operation\nwould result in overflow.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(16_i32.checked_next_multiple_of(8), Some(16));\nassert_eq!(23_i32.checked_next_multiple_of(8), Some(24));\nassert_eq!(16_i32.checked_next_multiple_of(-8), Some(16));\nassert_eq!(23_i32.checked_next_multiple_of(-8), Some(16));\nassert_eq!((-16_i32).checked_next_multiple_of(8), Some(-16));\nassert_eq!((-23_i32).checked_next_multiple_of(8), Some(-16));\nassert_eq!((-16_i32).checked_next_multiple_of(-8), Some(-16));\nassert_eq!((-23_i32).checked_next_multiple_of(-8), Some(-24));\nassert_eq!(1_i32.checked_next_multiple_of(0), None);\nassert_eq!(i32::MAX.checked_next_multiple_of(2), None);\n```",
+ "id": 10655,
"inner": {
"function": {
"generics": {
@@ -53622,6 +52112,12 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i32"
+ }
]
],
"is_c_variadic": false,
@@ -53632,7 +52128,7 @@
"args": [
{
"type": {
- "primitive": "i128"
+ "primitive": "i32"
}
}
],
@@ -53647,38 +52143,41 @@
}
},
"links": {},
- "name": "checked_isqrt",
+ "name": "checked_next_multiple_of",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10657": {
+ "10656": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer addition. Computes `self + rhs`, saturating at the numeric\nbounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i128.saturating_add(1), 101);\nassert_eq!(i128::MAX.saturating_add(100), i128::MAX);\nassert_eq!(i128::MIN.saturating_add(-1), i128::MIN);\n```",
- "id": 10657,
+ "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nThis method might not be optimized owing to implementation details;\n`ilog2` can produce results more efficiently for base 2, and `ilog10`\ncan produce results more efficiently for base 10.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero,\nor if `base` is less than 2.\n\n# Examples\n\n```\nassert_eq!(5i32.ilog(5), 1);\n```",
+ "id": 10656,
"inner": {
"function": {
"generics": {
@@ -53701,28 +52200,93 @@
}
],
[
- "rhs",
+ "base",
{
- "primitive": "i128"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "saturating_add",
+ "name": "ilog",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "10657": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the base 10 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero.\n\n# Example\n\n```\nassert_eq!(10i32.ilog10(), 1);\n```",
+ "id": 10657,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u32"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "ilog10",
+ "span": {
+ "begin": [
+ 295,
+ 5
+ ],
+ "end": [
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -53732,10 +52296,10 @@
"10658": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
@@ -53745,7 +52309,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating addition with an unsigned integer. Computes `self + rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1i128.saturating_add_unsigned(2), 3);\nassert_eq!(i128::MAX.saturating_add_unsigned(100), i128::MAX);\n```",
+ "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nReturns `None` if the number is negative or zero, or if the base is not at least 2.\n\nThis method might not be optimized owing to implementation details;\n`checked_ilog2` can produce results more efficiently for base 2, and\n`checked_ilog10` can produce results more efficiently for base 10.\n\n# Examples\n\n```\nassert_eq!(5i32.checked_ilog(5), Some(1));\n```",
"id": 10658,
"inner": {
"function": {
@@ -53769,28 +52333,43 @@
}
],
[
- "rhs",
+ "base",
{
- "primitive": "u128"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "saturating_add_unsigned",
+ "name": "checked_ilog",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -53800,10 +52379,10 @@
"10659": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
@@ -53813,7 +52392,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer subtraction. Computes `self - rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i128.saturating_sub(127), -27);\nassert_eq!(i128::MIN.saturating_sub(100), i128::MIN);\nassert_eq!(i128::MAX.saturating_sub(-1), i128::MAX);\n```",
+ "docs": "Returns the base 2 logarithm of the number, rounded down.\n\nReturns `None` if the number is negative or zero.\n\n# Examples\n\n```\nassert_eq!(2i32.checked_ilog2(), Some(1));\n```",
"id": 10659,
"inner": {
"function": {
@@ -53835,30 +52414,39 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i128"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "saturating_sub",
+ "name": "checked_ilog2",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -53936,11 +52524,11 @@
"name": "size_hint",
"span": {
"begin": [
- 2142,
+ 2137,
5
],
"end": [
- 2144,
+ 2139,
6
],
"filename": "std/src/collections/hash/map.rs"
@@ -53950,10 +52538,10 @@
"10660": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
@@ -53963,7 +52551,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating subtraction with an unsigned integer. Computes `self - rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i128.saturating_sub_unsigned(127), -27);\nassert_eq!(i128::MIN.saturating_sub_unsigned(100), i128::MIN);\n```",
+ "docs": "Returns the base 10 logarithm of the number, rounded down.\n\nReturns `None` if the number is negative or zero.\n\n# Example\n\n```\nassert_eq!(10i32.checked_ilog10(), Some(1));\n```",
"id": 10660,
"inner": {
"function": {
@@ -53985,30 +52573,39 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u128"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "saturating_sub_unsigned",
+ "name": "checked_ilog10",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -54018,10 +52615,10 @@
"10661": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 45, patch: 0})}, feature: \"saturating_neg\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -54031,7 +52628,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer negation. Computes `-self`, returning `MAX` if `self == MIN`\ninstead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i128.saturating_neg(), -100);\nassert_eq!((-100i128).saturating_neg(), 100);\nassert_eq!(i128::MIN.saturating_neg(), i128::MAX);\nassert_eq!(i128::MAX.saturating_neg(), i128::MIN + 1);\n```",
+ "docs": "Computes the absolute value of `self`.\n\n# Overflow behavior\n\nThe absolute value of\n`i32::MIN`\ncannot be represented as an\n`i32`,\nand attempting to calculate it will cause an overflow. This means\nthat code in debug mode will trigger a panic on this case and\noptimized code will return\n`i32::MIN`\nwithout a panic. If you do not want this behavior, consider\nusing [`unsigned_abs`](Self::unsigned_abs) instead.\n\n# Examples\n\n```\nassert_eq!(10i32.abs(), 10);\nassert_eq!((-10i32).abs(), 10);\n```",
"id": 10661,
"inner": {
"function": {
@@ -54057,20 +52654,22 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i32"
}
}
}
},
- "links": {},
- "name": "saturating_neg",
+ "links": {
+ "Self::unsigned_abs": 10625
+ },
+ "name": "abs",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -54080,10 +52679,10 @@
"10662": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 45, patch: 0})}, feature: \"saturating_neg\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\"}}]"
},
{
"must_use": {
@@ -54093,7 +52692,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating absolute value. Computes `self.abs()`, returning `MAX` if `self ==\nMIN` instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i128.saturating_abs(), 100);\nassert_eq!((-100i128).saturating_abs(), 100);\nassert_eq!(i128::MIN.saturating_abs(), i128::MAX);\nassert_eq!((i128::MIN + 1).saturating_abs(), i128::MAX);\n```",
+ "docs": "Computes the absolute difference between `self` and `other`.\n\nThis function always returns the correct answer without overflow or\npanics by returning an unsigned integer.\n\n# Examples\n\n```\nassert_eq!(100i32.abs_diff(80), 20u32);\nassert_eq!(100i32.abs_diff(110), 10u32);\nassert_eq!((-100i32).abs_diff(80), 180u32);\nassert_eq!((-100i32).abs_diff(-120), 20u32);\nassert_eq!(i32::MIN.abs_diff(i32::MAX), u32::MAX);\n```",
"id": 10662,
"inner": {
"function": {
@@ -54115,24 +52714,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "other",
+ {
+ "primitive": "i32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "saturating_abs",
+ "name": "abs_diff",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -54142,10 +52747,10 @@
"10663": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_int_sign\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -54155,7 +52760,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer multiplication. Computes `self * rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(10i128.saturating_mul(12), 120);\nassert_eq!(i128::MAX.saturating_mul(10), i128::MAX);\nassert_eq!(i128::MIN.saturating_mul(10), i128::MIN);\n```",
+ "docs": "Returns a number representing sign of `self`.\n\n - `0` if the number is zero\n - `1` if the number is positive\n - `-1` if the number is negative\n\n# Examples\n\n```\nassert_eq!(10i32.signum(), 1);\nassert_eq!(0i32.signum(), 0);\nassert_eq!((-10i32).signum(), -1);\n```",
"id": 10663,
"inner": {
"function": {
@@ -54177,30 +52782,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i128"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "saturating_mul",
+ "name": "signum",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -54210,20 +52809,20 @@
"10664": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer division. Computes `self / rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i128.saturating_div(2), 2);\nassert_eq!(i128::MAX.saturating_div(-1), i128::MIN + 1);\nassert_eq!(i128::MIN.saturating_div(-1), i128::MAX);\n\n```",
+ "docs": "Returns `true` if `self` is positive and `false` if the number is zero or\nnegative.\n\n# Examples\n\n```\nassert!(10i32.is_positive());\nassert!(!(-10i32).is_positive());\n```",
"id": 10664,
"inner": {
"function": {
@@ -54245,30 +52844,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i128"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "saturating_div",
+ "name": "is_positive",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -54278,20 +52871,20 @@
"10665": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer exponentiation. Computes `self.pow(exp)`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!((-4i128).saturating_pow(3), -64);\nassert_eq!(i128::MIN.saturating_pow(2), i128::MAX);\nassert_eq!(i128::MIN.saturating_pow(3), i128::MIN);\n```",
+ "docs": "Returns `true` if `self` is negative and `false` if the number is zero or\npositive.\n\n# Examples\n\n```\nassert!((-10i32).is_negative());\nassert!(!10i32.is_negative());\n```",
"id": 10665,
"inner": {
"function": {
@@ -54313,30 +52906,24 @@
{
"generic": "Self"
}
- ],
- [
- "exp",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "saturating_pow",
+ "name": "is_negative",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -54346,10 +52933,10 @@
"10666": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
@@ -54359,7 +52946,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) addition with an unsigned integer. Computes\n`self + rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(100i128.wrapping_add_unsigned(27), 127);\nassert_eq!(i128::MAX.wrapping_add_unsigned(2), i128::MIN + 1);\n```",
+ "docs": "Returns the memory representation of this integer as a byte array in\nbig-endian (network) byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x12345678i32.to_be_bytes();\nassert_eq!(bytes, [0x12, 0x34, 0x56, 0x78]);\n```",
"id": 10666,
"inner": {
"function": {
@@ -54381,30 +52968,29 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u128"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "array": {
+ "len": "4",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
}
}
},
"links": {},
- "name": "wrapping_add_unsigned",
+ "name": "to_be_bytes",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -54414,10 +53000,10 @@
"10667": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
@@ -54427,7 +53013,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) subtraction with an unsigned integer. Computes\n`self - rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(0i128.wrapping_sub_unsigned(127), -127);\nassert_eq!((-2i128).wrapping_sub_unsigned(u128::MAX), -1);\n```",
+ "docs": "Returns the memory representation of this integer as a byte array in\nlittle-endian byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x12345678i32.to_le_bytes();\nassert_eq!(bytes, [0x78, 0x56, 0x34, 0x12]);\n```",
"id": 10667,
"inner": {
"function": {
@@ -54449,30 +53035,29 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u128"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "array": {
+ "len": "4",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
}
}
},
"links": {},
- "name": "wrapping_sub_unsigned",
+ "name": "to_le_bytes",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -54482,10 +53067,10 @@
"10668": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
@@ -54495,7 +53080,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) division. Computes `self / rhs`, wrapping around at the\nboundary of the type.\n\nThe only case where such wrapping can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type. In such a case, this function returns `MIN` itself.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i128.wrapping_div(10), 10);\nassert_eq!((-128i8).wrapping_div(-1), -128);\n```",
+ "docs": "Returns the memory representation of this integer as a byte array in\nnative byte order.\n\nAs the target platform's native endianness is used, portable code\nshould use [`to_be_bytes`] or [`to_le_bytes`], as appropriate,\ninstead.\n\n\n\n[`to_be_bytes`]: Self::to_be_bytes\n[`to_le_bytes`]: Self::to_le_bytes\n\n# Examples\n\n```\nlet bytes = 0x12345678i32.to_ne_bytes();\nassert_eq!(\n bytes,\n if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78]\n } else {\n [0x78, 0x56, 0x34, 0x12]\n }\n);\n```",
"id": 10668,
"inner": {
"function": {
@@ -54517,30 +53102,32 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i128"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "array": {
+ "len": "4",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
}
}
},
- "links": {},
- "name": "wrapping_div",
+ "links": {
+ "Self::to_be_bytes": 10666,
+ "Self::to_le_bytes": 10667
+ },
+ "name": "to_ne_bytes",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -54550,20 +53137,20 @@
"10669": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping Euclidean division. Computes `self.div_euclid(rhs)`,\nwrapping around at the boundary of the type.\n\nWrapping will only occur in `MIN / -1` on a signed type (where `MIN` is the negative minimal value\nfor the type). This is equivalent to `-MIN`, a positive value that is too large to represent in the\ntype. In this case, this method returns `MIN` itself.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i128.wrapping_div_euclid(10), 10);\nassert_eq!((-128i8).wrapping_div_euclid(-1), -128);\n```",
+ "docs": "Creates an integer value from its representation as a byte array in\nbig endian.\n\n\n\n# Examples\n\n```\nlet value = i32::from_be_bytes([0x12, 0x34, 0x56, 0x78]);\nassert_eq!(value, 0x12345678);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_be_i32(input: &mut &[u8]) -> i32 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n i32::from_be_bytes(int_bytes.try_into().unwrap())\n}\n```",
"id": 10669,
"inner": {
"function": {
@@ -54581,34 +53168,33 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "bytes",
{
- "primitive": "i128"
+ "array": {
+ "len": "4",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "wrapping_div_euclid",
+ "name": "from_be_bytes",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -54658,11 +53244,11 @@
"name": "count",
"span": {
"begin": [
- 2146,
+ 2141,
5
],
"end": [
- 2148,
+ 2143,
6
],
"filename": "std/src/collections/hash/map.rs"
@@ -54672,20 +53258,20 @@
"10670": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) remainder. Computes `self % rhs`, wrapping around at the\nboundary of the type.\n\nSuch wrap-around never actually occurs mathematically; implementation artifacts make `x % y`\ninvalid for `MIN / -1` on a signed type (where `MIN` is the negative minimal value). In such a case,\nthis function returns `0`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i128.wrapping_rem(10), 0);\nassert_eq!((-128i8).wrapping_rem(-1), 0);\n```",
+ "docs": "Creates an integer value from its representation as a byte array in\nlittle endian.\n\n\n\n# Examples\n\n```\nlet value = i32::from_le_bytes([0x78, 0x56, 0x34, 0x12]);\nassert_eq!(value, 0x12345678);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_le_i32(input: &mut &[u8]) -> i32 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n i32::from_le_bytes(int_bytes.try_into().unwrap())\n}\n```",
"id": 10670,
"inner": {
"function": {
@@ -54703,34 +53289,33 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "bytes",
{
- "primitive": "i128"
+ "array": {
+ "len": "4",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i32"
}
}
}
},
"links": {},
- "name": "wrapping_rem",
+ "name": "from_le_bytes",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -54740,20 +53325,20 @@
"10671": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping Euclidean remainder. Computes `self.rem_euclid(rhs)`, wrapping around\nat the boundary of the type.\n\nWrapping will only occur in `MIN % -1` on a signed type (where `MIN` is the negative minimal value\nfor the type). In this case, this method returns 0.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i128.wrapping_rem_euclid(10), 0);\nassert_eq!((-128i8).wrapping_rem_euclid(-1), 0);\n```",
+ "docs": "Creates an integer value from its memory representation as a byte\narray in native endianness.\n\nAs the target platform's native endianness is used, portable code\nlikely wants to use [`from_be_bytes`] or [`from_le_bytes`], as\nappropriate instead.\n\n[`from_be_bytes`]: Self::from_be_bytes\n[`from_le_bytes`]: Self::from_le_bytes\n\n\n\n# Examples\n\n```\nlet value = i32::from_ne_bytes(if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78]\n} else {\n [0x78, 0x56, 0x34, 0x12]\n});\nassert_eq!(value, 0x12345678);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_ne_i32(input: &mut &[u8]) -> i32 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n i32::from_ne_bytes(int_bytes.try_into().unwrap())\n}\n```",
"id": 10671,
"inner": {
"function": {
@@ -54771,34 +53356,36 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "bytes",
{
- "primitive": "i128"
+ "array": {
+ "len": "4",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i32"
}
}
}
},
- "links": {},
- "name": "wrapping_rem_euclid",
+ "links": {
+ "Self::from_be_bytes": 10669,
+ "Self::from_le_bytes": 10670
+ },
+ "name": "from_ne_bytes",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -54808,20 +53395,21 @@
"10672": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[rustc_diagnostic_item = \"i32_legacy_fn_min_value\"]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_min_value\", promotable: true}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
}
],
"crate_id": 1,
- "deprecation": null,
- "docs": "Wrapping (modular) negation. Computes `-self`, wrapping around at the boundary\nof the type.\n\nThe only case where such wrapping can occur is when one negates `MIN` on a signed type (where `MIN`\nis the negative minimal value for the type); this is a positive value that is too large to represent\nin the type. In such a case, this function returns `MIN` itself.\n\n# Examples\n\n```\nassert_eq!(100i128.wrapping_neg(), -100);\nassert_eq!((-100i128).wrapping_neg(), 100);\nassert_eq!(i128::MIN.wrapping_neg(), i128::MIN);\n```",
+ "deprecation": {
+ "note": "replaced by the `MIN` associated constant on this type",
+ "since": "TBD"
+ },
+ "docs": "New code should prefer to use\n[`i32::MIN`] instead.\n\nReturns the smallest value that can be represented by this integer type.",
"id": 10672,
"inner": {
"function": {
@@ -54837,30 +53425,25 @@
"is_unsafe": false
},
"sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
+ "inputs": [],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i32"
}
}
}
},
- "links": {},
- "name": "wrapping_neg",
+ "links": {
+ "`i32::MIN`": 10536
+ },
+ "name": "min_value",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -54870,20 +53453,21 @@
"10673": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[rustc_diagnostic_item = \"i32_legacy_fn_max_value\"]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
}
],
"crate_id": 1,
- "deprecation": null,
- "docs": "Panic-free bitwise shift-left; yields `self << mask(rhs)`, where `mask` removes\nany high-order bits of `rhs` that would cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-left; the RHS of a wrapping shift-left is restricted to\nthe range of the type, rather than the bits shifted out of the LHS being returned to the other end.\nThe primitive integer types all implement a [`rotate_left`](Self::rotate_left) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!((-1i128).wrapping_shl(7), -128);\nassert_eq!((-1i128).wrapping_shl(128), -1);\n```",
+ "deprecation": {
+ "note": "replaced by the `MAX` associated constant on this type",
+ "since": "TBD"
+ },
+ "docs": "New code should prefer to use\n[`i32::MAX`] instead.\n\nReturns the largest value that can be represented by this integer type.",
"id": 10673,
"inner": {
"function": {
@@ -54899,38 +53483,25 @@
"is_unsafe": false
},
"sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
- ]
- ],
+ "inputs": [],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i32"
}
}
}
},
"links": {
- "Self::rotate_left": 10606
+ "`i32::MAX`": 10537
},
- "name": "wrapping_shl",
+ "name": "max_value",
"span": {
"begin": [
- 343,
+ 295,
5
],
"end": [
- 364,
+ 314,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -54940,10 +53511,19 @@
"10674": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[doc(alias = \"average_floor\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[doc(alias = \"average_ceil\")]"
+ },
+ {
+ "other": "#[doc(alias = \"average\")]"
+ },
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"num_midpoint_signed\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"num_midpoint_signed\"}}]"
},
{
"must_use": {
@@ -54953,7 +53533,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Panic-free bitwise shift-right; yields `self >> mask(rhs)`, where `mask`\nremoves any high-order bits of `rhs` that would cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-right; the RHS of a wrapping shift-right is restricted\nto the range of the type, rather than the bits shifted out of the LHS being returned to the other\nend. The primitive integer types all implement a [`rotate_right`](Self::rotate_right) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!((-128i128).wrapping_shr(7), -1);\nassert_eq!((-128i16).wrapping_shr(64), -128);\n```",
+ "docs": "Calculates the midpoint (average) between `self` and `rhs`.\n\n`midpoint(a, b)` is `(a + b) / 2` as if it were performed in a\nsufficiently-large signed integral type. This implies that the result is\nalways rounded towards zero and that no overflow will ever occur.\n\n# Examples\n\n```\nassert_eq!(0i32.midpoint(4), 2);\nassert_eq!((-1i32).midpoint(2), 0);\nassert_eq!((-7i32).midpoint(0), -3);\nassert_eq!(0i32.midpoint(-7), -3);\nassert_eq!(0i32.midpoint(7), 3);\n```",
"id": 10674,
"inner": {
"function": {
@@ -54979,113 +53559,221 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i32"
}
}
}
},
- "links": {
- "Self::rotate_right": 10607
- },
- "name": "wrapping_shr",
+ "links": {},
+ "name": "midpoint",
"span": {
"begin": [
- 343,
+ 315,
5
],
"end": [
- 364,
- 6
+ 315,
+ 40
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"10675": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
+ "attrs": [],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) absolute value. Computes `self.abs()`, wrapping around at\nthe boundary of the type.\n\nThe only case where such wrapping can occur is when one takes the absolute value of the negative\nminimal value for the type; this is a positive value that is too large to represent in the type. In\nsuch a case, this function returns `MIN` itself.\n\n# Examples\n\n```\nassert_eq!(100i128.wrapping_abs(), 100);\nassert_eq!((-100i128).wrapping_abs(), 100);\nassert_eq!(i128::MIN.wrapping_abs(), i128::MIN);\nassert_eq!((-128i8).wrapping_abs() as u8, 128);\n```",
+ "docs": null,
"id": 10675,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "i32"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "i128"
- }
- }
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 10536,
+ 10537,
+ 10538,
+ 10539,
+ 10540,
+ 10542,
+ 10543,
+ 10544,
+ 10545,
+ 10546,
+ 10547,
+ 10548,
+ 10549,
+ 10550,
+ 10551,
+ 10552,
+ 10553,
+ 10554,
+ 10555,
+ 10556,
+ 10557,
+ 10558,
+ 10559,
+ 10560,
+ 10562,
+ 10563,
+ 10564,
+ 10565,
+ 10566,
+ 10568,
+ 10569,
+ 10570,
+ 10571,
+ 10572,
+ 10574,
+ 10575,
+ 10576,
+ 10577,
+ 10578,
+ 10579,
+ 10580,
+ 10581,
+ 10582,
+ 10583,
+ 10584,
+ 10585,
+ 10586,
+ 10587,
+ 10588,
+ 10589,
+ 10590,
+ 10591,
+ 10592,
+ 10593,
+ 10594,
+ 10595,
+ 10596,
+ 10597,
+ 10598,
+ 10599,
+ 10600,
+ 10601,
+ 10602,
+ 10603,
+ 10604,
+ 10605,
+ 10606,
+ 10607,
+ 10608,
+ 10609,
+ 10610,
+ 10611,
+ 10612,
+ 10613,
+ 10614,
+ 10561,
+ 10615,
+ 10567,
+ 10616,
+ 10573,
+ 10617,
+ 10618,
+ 10619,
+ 10620,
+ 10621,
+ 10622,
+ 10623,
+ 10624,
+ 10625,
+ 10626,
+ 10627,
+ 10629,
+ 10630,
+ 10631,
+ 10633,
+ 10634,
+ 10635,
+ 10637,
+ 10636,
+ 10638,
+ 10639,
+ 10640,
+ 10641,
+ 10642,
+ 10643,
+ 10644,
+ 10645,
+ 10646,
+ 10647,
+ 10648,
+ 10649,
+ 10650,
+ 10651,
+ 10652,
+ 10653,
+ 10654,
+ 10655,
+ 10656,
+ 10541,
+ 10657,
+ 10658,
+ 10659,
+ 10660,
+ 10661,
+ 10662,
+ 10663,
+ 10664,
+ 10665,
+ 10666,
+ 10667,
+ 10668,
+ 10669,
+ 10670,
+ 10671,
+ 10672,
+ 10673,
+ 10674
+ ],
+ "provided_trait_methods": [],
+ "trait": null
}
},
"links": {},
- "name": "wrapping_abs",
+ "name": null,
"span": {
"begin": [
- 343,
- 5
+ 294,
+ 1
],
"end": [
- 364,
- 6
+ 294,
+ 9
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
"10676": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 51, patch: 0})}, feature: \"unsigned_abs\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 51, patch: 0})}, feature: \"unsigned_abs\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 82, patch: 0})}, feature: \"const_int_from_str\", promotable: false}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Computes the absolute value of `self` without any wrapping\nor panicking.\n\n\n# Examples\n\n```\nassert_eq!(100i128.unsigned_abs(), 100u128);\nassert_eq!((-100i128).unsigned_abs(), 100u128);\nassert_eq!((-128i8).unsigned_abs(), 128u8);\n```",
+ "docs": "Parses an integer from a string slice with digits in a given base.\n\nThe string is expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# See also\nIf the string to be parsed is in base 10 (decimal),\n[`from_str`] or [`str::parse`] can also be used.\n\n[`from_str`]: #method.from_str\n[`str::parse`]: primitive.str.html#method.parse\n\n# Examples\n\n```\nassert_eq!(i32::from_str_radix(\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\nassert!(i32::from_str_radix(\"1 \", 10).is_err());\n```",
"id": 10676,
"inner": {
"function": {
@@ -55103,29 +53791,65 @@
"sig": {
"inputs": [
[
- "self",
+ "src",
{
- "generic": "Self"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "primitive": "str"
+ }
+ }
+ }
+ ],
+ [
+ "radix",
+ {
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i32"
+ }
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 4786,
+ "path": "ParseIntError"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 57,
+ "path": "Result"
+ }
}
}
}
},
"links": {},
- "name": "unsigned_abs",
+ "name": "from_str_radix",
"span": {
"begin": [
- 343,
- 5
+ 1666,
+ 1
],
"end": [
- 364,
- 6
+ 1666,
+ 56
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -55134,20 +53858,12 @@
"10677": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) exponentiation. Computes `self.pow(exp)`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(3i128.wrapping_pow(4), 81);\nassert_eq!(3i8.wrapping_pow(5), -13);\nassert_eq!(3i8.wrapping_pow(6), -39);\n```",
+ "docs": "Parses an integer from an ASCII-byte slice with decimal digits.\n\nThe characters are expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(i32::from_ascii(b\"+10\"), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(i32::from_ascii(b\"1 \").is_err());\n```",
"id": 10677,
"inner": {
"function": {
@@ -55165,35 +53881,61 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "exp",
+ "src",
{
- "primitive": "u32"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "slice": {
+ "primitive": "u8"
+ }
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i32"
+ }
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 4786,
+ "path": "ParseIntError"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 57,
+ "path": "Result"
+ }
}
}
}
},
"links": {},
- "name": "wrapping_pow",
+ "name": "from_ascii",
"span": {
"begin": [
- 343,
- 5
+ 1666,
+ 1
],
"end": [
- 364,
- 6
+ 1666,
+ 56
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -55202,20 +53944,12 @@
"10678": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would have\noccurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5i128.overflowing_add(2), (7, false));\nassert_eq!(i128::MAX.overflowing_add(1), (i128::MIN, true));\n```",
+ "docs": "Parses an integer from an ASCII-byte slice with digits in a given base.\n\nThe characters are expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(i32::from_ascii_radix(b\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(i32::from_ascii_radix(b\"1 \", 10).is_err());\n```",
"id": 10678,
"inner": {
"function": {
@@ -55233,129 +53967,114 @@
"sig": {
"inputs": [
[
- "self",
+ "src",
{
- "generic": "Self"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "slice": {
+ "primitive": "u8"
+ }
+ }
+ }
}
],
[
- "rhs",
+ "radix",
{
- "primitive": "i128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i128"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i32"
+ }
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 4786,
+ "path": "ParseIntError"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
},
- {
- "primitive": "bool"
- }
- ]
+ "id": 57,
+ "path": "Result"
+ }
}
}
}
},
"links": {},
- "name": "overflowing_add",
+ "name": "from_ascii_radix",
"span": {
"begin": [
- 343,
- 5
+ 1666,
+ 1
],
"end": [
- 364,
- 6
+ 1666,
+ 56
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"10679": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
+ "attrs": [],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs` + `carry` and returns a tuple containing\nthe sum and the output carry.\n\nPerforms \"ternary addition\" of two integer operands and a carry-in\nbit, and returns an output integer and a carry-out bit. This allows\nchaining together multiple additions to create a wider addition, and\ncan be useful for bignum addition.\n\nThis can be thought of as a 128-bit \"full adder\", in the electronics sense.\n\nIf the input carry is false, this method is equivalent to\n[`overflowing_add`](Self::overflowing_add), and the output carry is\nequal to the overflow flag. Note that although carry and overflow\nflags are similar for unsigned integers, they are different for\nsigned integers.\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n\n// 3 MAX (a = 3 × 2^128 + 2^128 - 1)\n// + 5 7 (b = 5 × 2^128 + 7)\n// ---------\n// 9 6 (sum = 9 × 2^128 + 6)\n\nlet (a1, a0): (u128, u128) = (3, u128::MAX);\nlet (b1, b0): (u128, u128) = (5, 7);\nlet carry0 = false;\n\nlet (sum0, carry1) = a0.carrying_add(b0, carry0);\nassert_eq!(carry1, true);\nlet (sum1, carry2) = a1.carrying_add(b1, carry1);\nassert_eq!(carry2, false);\n\nassert_eq!((sum1, sum0), (9, 6));\n```",
+ "docs": null,
"id": 10679,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "i32"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u128"
- }
- ],
- [
- "carry",
- {
- "primitive": "bool"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "u128"
- },
- {
- "primitive": "bool"
- }
- ]
- }
- }
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 10676,
+ 10677,
+ 10678
+ ],
+ "provided_trait_methods": [],
+ "trait": null
}
},
- "links": {
- "Self::overflowing_add": 11370
- },
- "name": "carrying_add",
+ "links": {},
+ "name": null,
"span": {
"begin": [
- 1174,
- 5
+ 1666,
+ 1
],
"end": [
- 1194,
- 6
+ 1666,
+ 56
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
"1068": {
"attrs": [
@@ -55501,11 +54220,11 @@
"name": "fold",
"span": {
"begin": [
- 2150,
+ 2145,
5
],
"end": [
- 2156,
+ 2151,
6
],
"filename": "std/src/collections/hash/map.rs"
@@ -55515,17 +54234,12 @@
"10680": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 138215, is_soft: false}, feature: \"int_format_into\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs` + `carry` and checks for overflow.\n\nPerforms \"ternary addition\" of two integer operands and a carry-in\nbit, and returns a tuple of the sum along with a boolean indicating\nwhether an arithmetic overflow would occur. On overflow, the wrapped\nvalue is returned.\n\nThis allows chaining together multiple additions to create a wider\naddition, and can be useful for bignum addition. This method should\nonly be used for the most significant word; for the less significant\nwords the unsigned method\n[`u128::carrying_add`]\nshould be used.\n\nThe output boolean returned by this method is *not* a carry flag,\nand should *not* be added to a more significant word.\n\nIf the input carry is false, this method is equivalent to\n[`overflowing_add`](Self::overflowing_add).\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n// Only the most significant word is signed.\n//\n// 10 MAX (a = 10 × 2^128 + 2^128 - 1)\n// + -5 9 (b = -5 × 2^128 + 9)\n// ---------\n// 6 8 (sum = 6 × 2^128 + 8)\n\nlet (a1, a0): (i128, u128) = (10, u128::MAX);\nlet (b1, b0): (i128, u128) = (-5, 9);\nlet carry0 = false;\n\n// u128::carrying_add for the less significant words\nlet (sum0, carry1) = a0.carrying_add(b0, carry0);\nassert_eq!(carry1, true);\n\n// i128::carrying_add for the most significant word\nlet (sum1, overflow) = a1.carrying_add(b1, carry1);\nassert_eq!(overflow, false);\n\nassert_eq!((sum1, sum0), (6, 8));\n```",
+ "docs": "Allows users to write an integer (in signed decimal format) into a variable `buf` of\ntype [`NumBuffer`] that is passed by the caller by mutable reference.\n\n# Examples\n\n```\n#![feature(int_format_into)]\nuse core::fmt::NumBuffer;\n\nlet n = 0i32;\nlet mut buf = NumBuffer::new();\nassert_eq!(n.format_into(&mut buf), \"0\");\n\nlet n1 = 32i32;\nassert_eq!(n1.format_into(&mut buf), \"32\");\n\nlet n2 = i32 :: MAX;\nassert_eq!(n2.format_into(&mut buf), i32 :: MAX.to_string());\n```",
"id": 10680,
"inner": {
"function": {
@@ -55537,7 +54251,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -55549,194 +54263,131 @@
}
],
[
- "rhs",
- {
- "primitive": "i128"
- }
- ],
- [
- "carry",
+ "buf",
{
- "primitive": "bool"
+ "borrowed_ref": {
+ "is_mutable": true,
+ "lifetime": null,
+ "type": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 10387,
+ "path": "NumBuffer"
+ }
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i128"
- },
- {
- "primitive": "bool"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "primitive": "str"
}
- ]
+ }
}
}
}
},
"links": {
- "Self::overflowing_add": 10678,
- "`u128::carrying_add`": 10679
+ "`NumBuffer`": 10387
},
- "name": "carrying_add",
+ "name": "format_into",
"span": {
"begin": [
- 343,
+ 599,
5
],
"end": [
- 364,
- 6
+ 599,
+ 95
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/fmt/num.rs"
},
"visibility": "public"
},
"10681": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
+ "attrs": [],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs` with an unsigned `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1i128.overflowing_add_unsigned(2), (3, false));\nassert_eq!((i128::MIN).overflowing_add_unsigned(u128::MAX), (i128::MAX, false));\nassert_eq!((i128::MAX - 2).overflowing_add_unsigned(3), (i128::MIN, true));\n```",
+ "docs": null,
"id": 10681,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "i32"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u128"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "i128"
- },
- {
- "primitive": "bool"
- }
- ]
- }
- }
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 10680
+ ],
+ "provided_trait_methods": [],
+ "trait": null
}
},
"links": {},
- "name": "overflowing_add_unsigned",
+ "name": null,
"span": {
"begin": [
- 343,
+ 599,
5
],
"end": [
- 364,
- 6
+ 599,
+ 95
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/fmt/num.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
"10682": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` - `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating whether an arithmetic overflow\nwould occur. If an overflow would have occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5i128.overflowing_sub(2), (3, false));\nassert_eq!(i128::MIN.overflowing_sub(1), (i128::MAX, true));\n```",
+ "docs": "The smallest value that can be represented by this integer type\n(−263).\n\n# Examples\n\n```\nassert_eq!(i64::MIN, -9223372036854775808);\n```",
"id": 10682,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "i64"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "i128"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "i128"
- },
- {
- "primitive": "bool"
- }
- ]
- }
- }
+ "value": "_"
}
},
"links": {},
- "name": "overflowing_sub",
+ "name": "MIN",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -55746,78 +54397,30 @@
"10683": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` − `rhs` − `borrow` and returns a tuple\ncontaining the difference and the output borrow.\n\nPerforms \"ternary subtraction\" by subtracting both an integer\noperand and a borrow-in bit from `self`, and returns an output\ninteger and a borrow-out bit. This allows chaining together multiple\nsubtractions to create a wider subtraction, and can be useful for\nbignum subtraction.\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n\n// 9 6 (a = 9 × 2^128 + 6)\n// - 5 7 (b = 5 × 2^128 + 7)\n// ---------\n// 3 MAX (diff = 3 × 2^128 + 2^128 - 1)\n\nlet (a1, a0): (u128, u128) = (9, 6);\nlet (b1, b0): (u128, u128) = (5, 7);\nlet borrow0 = false;\n\nlet (diff0, borrow1) = a0.borrowing_sub(b0, borrow0);\nassert_eq!(borrow1, true);\nlet (diff1, borrow2) = a1.borrowing_sub(b1, borrow1);\nassert_eq!(borrow2, false);\n\nassert_eq!((diff1, diff0), (3, u128::MAX));\n```",
+ "docs": "The largest value that can be represented by this integer type\n(263 − 1).\n\n# Examples\n\n```\nassert_eq!(i64::MAX, 9223372036854775807);\n```",
"id": 10683,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "i64"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u128"
- }
- ],
- [
- "borrow",
- {
- "primitive": "bool"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "u128"
- },
- {
- "primitive": "bool"
- }
- ]
- }
- }
+ "value": "_"
}
},
"links": {},
- "name": "borrowing_sub",
+ "name": "MAX",
"span": {
"begin": [
- 1174,
+ 319,
5
],
"end": [
- 1194,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -55827,78 +54430,30 @@
"10684": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 53, patch: 0})}, feature: \"int_bits_const\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` − `rhs` − `borrow` and checks for\noverflow.\n\nPerforms \"ternary subtraction\" by subtracting both an integer\noperand and a borrow-in bit from `self`, and returns a tuple of the\ndifference along with a boolean indicating whether an arithmetic\noverflow would occur. On overflow, the wrapped value is returned.\n\nThis allows chaining together multiple subtractions to create a\nwider subtraction, and can be useful for bignum subtraction. This\nmethod should only be used for the most significant word; for the\nless significant words the unsigned method\n[`u128::borrowing_sub`]\nshould be used.\n\nThe output boolean returned by this method is *not* a borrow flag,\nand should *not* be subtracted from a more significant word.\n\nIf the input borrow is false, this method is equivalent to\n[`overflowing_sub`](Self::overflowing_sub).\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n// Only the most significant word is signed.\n//\n// 6 8 (a = 6 × 2^128 + 8)\n// - -5 9 (b = -5 × 2^128 + 9)\n// ---------\n// 10 MAX (diff = 10 × 2^128 + 2^128 - 1)\n\nlet (a1, a0): (i128, u128) = (6, 8);\nlet (b1, b0): (i128, u128) = (-5, 9);\nlet borrow0 = false;\n\n// u128::borrowing_sub for the less significant words\nlet (diff0, borrow1) = a0.borrowing_sub(b0, borrow0);\nassert_eq!(borrow1, true);\n\n// i128::borrowing_sub for the most significant word\nlet (diff1, overflow) = a1.borrowing_sub(b1, borrow1);\nassert_eq!(overflow, false);\n\nassert_eq!((diff1, diff0), (10, u128::MAX));\n```",
+ "docs": "The size of this integer type in bits.\n\n# Examples\n\n```\nassert_eq!(i64::BITS, 64);\n```",
"id": 10684,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "u32"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "i128"
- }
- ],
- [
- "borrow",
- {
- "primitive": "bool"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "i128"
- },
- {
- "primitive": "bool"
- }
- ]
- }
- }
+ "value": "u64::BITS"
}
},
- "links": {
- "Self::overflowing_sub": 10682,
- "`u128::borrowing_sub`": 10683
- },
- "name": "borrowing_sub",
+ "links": {},
+ "name": "BITS",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -55908,10 +54463,16 @@
"10685": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[doc(alias = \"popcount\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[doc(alias = \"popcnt\")]"
+ },
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -55921,7 +54482,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` - `rhs` with an unsigned `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1i128.overflowing_sub_unsigned(2), (-1, false));\nassert_eq!((i128::MAX).overflowing_sub_unsigned(u128::MAX), (i128::MIN, false));\nassert_eq!((i128::MIN + 2).overflowing_sub_unsigned(3), (i128::MAX, true));\n```",
+ "docs": "Returns the number of ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 0b100_0000i64;\n\nassert_eq!(n.count_ones(), 1);\n```\n",
"id": 10685,
"inner": {
"function": {
@@ -55943,37 +54504,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u128"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i128"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "overflowing_sub_unsigned",
+ "name": "count_ones",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -55986,7 +54534,7 @@
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -55996,7 +54544,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the multiplication of `self` and `rhs`.\n\nReturns a tuple of the multiplication along with a boolean indicating whether an arithmetic overflow\nwould occur. If an overflow would have occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5i128.overflowing_mul(2), (10, false));\nassert_eq!(1_000_000_000i32.overflowing_mul(10), (1410065408, true));\n```",
+ "docs": "Returns the number of zeros in the binary representation of `self`.\n\n# Examples\n\n```\nassert_eq!(i64::MAX.count_zeros(), 1);\n```",
"id": 10686,
"inner": {
"function": {
@@ -56018,37 +54566,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i128"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i128"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "overflowing_mul",
+ "name": "count_zeros",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -56058,20 +54593,23 @@
"10687": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the \"full multiplication\" `self * rhs + carry`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need the `carry`, then you can use [`Self::widening_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.carrying_mul(-2, 0), (4294967286, -1));\nassert_eq!(5i32.carrying_mul(-2, 10), (0, 0));\nassert_eq!(1_000_000_000i32.carrying_mul(-10, 0), (2884901888, -3));\nassert_eq!(1_000_000_000i32.carrying_mul(-10, 10), (2884901898, -3));\nassert_eq!(i128::MAX.carrying_mul(i128::MAX, i128::MAX), (i128::MAX.unsigned_abs() + 1, i128::MAX / 2));\n```",
+ "docs": "Returns the base 2 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero.\n\n# Examples\n\n```\nassert_eq!(2i64.ilog2(), 1);\n```",
"id": 10687,
"inner": {
"function": {
@@ -56093,45 +54631,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i128"
- }
- ],
- [
- "carry",
- {
- "primitive": "i128"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u128"
- },
- {
- "primitive": "i128"
- }
- ]
+ "primitive": "u32"
}
}
}
},
- "links": {
- "`Self::widening_mul`": 10688
- },
- "name": "carrying_mul",
+ "links": {},
+ "name": "ilog2",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -56141,10 +54658,10 @@
"10688": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -56154,7 +54671,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the complete product `self * rhs` without the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nIf you also need to add a carry to the wide result, then you want\n[`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.widening_mul(-2), (4294967286, -1));\nassert_eq!(1_000_000_000i32.widening_mul(-10), (2884901888, -3));\n```",
+ "docs": "Returns the number of leading zeros in the binary representation of `self`.\n\nDepending on what you're doing with the value, you might also be interested in the\n[`ilog2`] function which returns a consistent number, even if the type widens.\n\n# Examples\n\n```\nlet n = -1i64;\n\nassert_eq!(n.leading_zeros(), 0);\n```\n[`ilog2`]: i64::ilog2",
"id": 10688,
"inner": {
"function": {
@@ -56176,39 +54693,26 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i128"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u128"
- },
- {
- "primitive": "i128"
- }
- ]
+ "primitive": "u32"
}
}
}
},
"links": {
- "`Self::carrying_mul`": 10687
+ "i64::ilog2": 10687
},
- "name": "widening_mul",
+ "name": "leading_zeros",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -56218,10 +54722,10 @@
"10689": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -56231,7 +54735,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the \"full multiplication\" `self * rhs + carry1 + carry2`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need either `carry`, then you can use [`Self::widening_mul`] instead,\nand if you only need one `carry`, then you can use [`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.carrying_mul_add(-2, 0, 0), (4294967286, -1));\nassert_eq!(5i32.carrying_mul_add(-2, 10, 10), (10, 0));\nassert_eq!(1_000_000_000i32.carrying_mul_add(-10, 0, 0), (2884901888, -3));\nassert_eq!(1_000_000_000i32.carrying_mul_add(-10, 10, 10), (2884901908, -3));\nassert_eq!(i128::MAX.carrying_mul_add(i128::MAX, i128::MAX, i128::MAX), (u128::MAX, i128::MAX / 2));\n```",
+ "docs": "Returns the number of trailing zeros in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = -4i64;\n\nassert_eq!(n.trailing_zeros(), 2);\n```",
"id": 10689,
"inner": {
"function": {
@@ -56253,52 +54757,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i128"
- }
- ],
- [
- "carry",
- {
- "primitive": "i128"
- }
- ],
- [
- "add",
- {
- "primitive": "i128"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u128"
- },
- {
- "primitive": "i128"
- }
- ]
+ "primitive": "u32"
}
}
}
},
- "links": {
- "`Self::carrying_mul`": 10687,
- "`Self::widening_mul`": 10688
- },
- "name": "carrying_mul_add",
+ "links": {},
+ "name": "trailing_zeros",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -56476,11 +54952,11 @@
"name": null,
"span": {
"begin": [
- 2134,
+ 2129,
1
],
"end": [
- 2157,
+ 2152,
2
],
"filename": "std/src/collections/hash/map.rs"
@@ -56490,10 +54966,10 @@
"10690": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
},
{
"must_use": {
@@ -56503,7 +54979,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the divisor when `self` is divided by `rhs`.\n\nReturns a tuple of the divisor along with a boolean indicating whether an arithmetic overflow would\noccur. If an overflow would occur then self is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i128.overflowing_div(2), (2, false));\nassert_eq!(i128::MIN.overflowing_div(-1), (i128::MIN, true));\n```",
+ "docs": "Returns the number of leading ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = -1i64;\n\nassert_eq!(n.leading_ones(), 64);\n```",
"id": 10690,
"inner": {
"function": {
@@ -56525,37 +55001,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i128"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i128"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "overflowing_div",
+ "name": "leading_ones",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -56565,10 +55028,10 @@
"10691": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
},
{
"must_use": {
@@ -56578,7 +55041,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of Euclidean division `self.div_euclid(rhs)`.\n\nReturns a tuple of the divisor along with a boolean indicating whether an arithmetic overflow would\noccur. If an overflow would occur then `self` is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i128.overflowing_div_euclid(2), (2, false));\nassert_eq!(i128::MIN.overflowing_div_euclid(-1), (i128::MIN, true));\n```",
+ "docs": "Returns the number of trailing ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 3i64;\n\nassert_eq!(n.trailing_ones(), 2);\n```",
"id": 10691,
"inner": {
"function": {
@@ -56600,37 +55063,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i128"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i128"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "overflowing_div_euclid",
+ "name": "trailing_ones",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -56640,10 +55090,7 @@
"10692": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
},
{
"must_use": {
@@ -56653,7 +55100,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the remainder when `self` is divided by `rhs`.\n\nReturns a tuple of the remainder after dividing along with a boolean indicating whether an\narithmetic overflow would occur. If an overflow would occur then 0 is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i128.overflowing_rem(2), (1, false));\nassert_eq!(i128::MIN.overflowing_rem(-1), (0, true));\n```",
+ "docs": "Returns `self` with only the most significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: i64 = 0b_01100100;\n\nassert_eq!(n.isolate_highest_one(), 0b_01000000);\nassert_eq!(0_i64.isolate_highest_one(), 0);\n```",
"id": 10692,
"inner": {
"function": {
@@ -56675,37 +55122,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i128"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i128"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "overflowing_rem",
+ "name": "isolate_highest_one",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -56715,23 +55149,17 @@
"10693": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Overflowing Euclidean remainder. Calculates `self.rem_euclid(rhs)`.\n\nReturns a tuple of the remainder after dividing along with a boolean indicating whether an\narithmetic overflow would occur. If an overflow would occur then 0 is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i128.overflowing_rem_euclid(2), (1, false));\nassert_eq!(i128::MIN.overflowing_rem_euclid(-1), (0, true));\n```",
+ "docs": "Returns `self` with only the least significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: i64 = 0b_01100100;\n\nassert_eq!(n.isolate_lowest_one(), 0b_00000100);\nassert_eq!(0_i64.isolate_lowest_one(), 0);\n```",
"id": 10693,
"inner": {
"function": {
@@ -56753,37 +55181,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i128"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i128"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "overflowing_rem_euclid",
+ "name": "isolate_lowest_one",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -56793,10 +55208,7 @@
"10694": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
},
{
"must_use": {
@@ -56806,7 +55218,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Negates self, overflowing if this is equal to the minimum value.\n\nReturns a tuple of the negated version of self along with a boolean indicating whether an overflow\nhappened. If `self` is the minimum value (e.g., `i32::MIN` for values of type `i32`), then the\nminimum value will be returned again and `true` will be returned for an overflow happening.\n\n# Examples\n\n```\nassert_eq!(2i128.overflowing_neg(), (-2, false));\nassert_eq!(i128::MIN.overflowing_neg(), (i128::MIN, true));\n```",
+ "docs": "Returns the index of the highest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_i64.highest_one(), None);\nassert_eq!(0x1_i64.highest_one(), Some(0));\nassert_eq!(0x10_i64.highest_one(), Some(4));\nassert_eq!(0x1f_i64.highest_one(), Some(4));\n```",
"id": 10694,
"inner": {
"function": {
@@ -56832,27 +55244,35 @@
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i128"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
},
- {
- "primitive": "bool"
- }
- ]
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "overflowing_neg",
+ "name": "highest_one",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -56862,10 +55282,7 @@
"10695": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
},
{
"must_use": {
@@ -56875,7 +55292,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts self left by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean indicating whether the shift\nvalue was larger than or equal to the number of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then used to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x1i128.overflowing_shl(4), (0x10, false));\nassert_eq!(0x1i32.overflowing_shl(36), (0x10, true));\nassert_eq!(0x10i128.overflowing_shl(127), (0, false));\n```",
+ "docs": "Returns the index of the lowest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_i64.lowest_one(), None);\nassert_eq!(0x1_i64.lowest_one(), Some(0));\nassert_eq!(0x10_i64.lowest_one(), Some(4));\nassert_eq!(0x1f_i64.lowest_one(), Some(0));\n```",
"id": 10695,
"inner": {
"function": {
@@ -56897,37 +55314,39 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i128"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
},
- {
- "primitive": "bool"
- }
- ]
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "overflowing_shl",
+ "name": "lowest_one",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -56937,10 +55356,10 @@
"10696": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\"}}]"
},
{
"must_use": {
@@ -56950,7 +55369,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts self right by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean indicating whether the shift\nvalue was larger than or equal to the number of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then used to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x10i128.overflowing_shr(4), (0x1, false));\nassert_eq!(0x10i32.overflowing_shr(36), (0x1, true));\n```",
+ "docs": "Returns the bit pattern of `self` reinterpreted as an unsigned integer of the same size.\n\nThis produces the same result as an `as` cast, but ensures that the bit-width remains\nthe same.\n\n# Examples\n\n```\nlet n = -1i64;\n\nassert_eq!(n.cast_unsigned(), u64::MAX);\n```",
"id": 10696,
"inner": {
"function": {
@@ -56972,37 +55391,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i128"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "overflowing_shr",
+ "name": "cast_unsigned",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -57015,7 +55421,7 @@
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -57025,7 +55431,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Computes the absolute value of `self`.\n\nReturns a tuple of the absolute version of self along with a boolean indicating whether an overflow\nhappened. If self is the minimum value\n(e.g., i128::MIN for values of type i128),\nthen the minimum value will be returned again and true will be returned\nfor an overflow happening.\n\n# Examples\n\n```\nassert_eq!(10i128.overflowing_abs(), (10, false));\nassert_eq!((-10i128).overflowing_abs(), (10, false));\nassert_eq!((i128::MIN).overflowing_abs(), (i128::MIN, true));\n```",
+ "docs": "Shifts the bits to the left by a specified amount, `n`,\nwrapping the truncated bits to the end of the resulting integer.\n\nPlease note this isn't the same operation as the `<<` shifting operator!\n\n# Examples\n\n```\nlet n = 0xaa00000000006e1i64;\nlet m = 0x6e10aa;\n\nassert_eq!(n.rotate_left(12), m);\n```",
"id": 10697,
"inner": {
"function": {
@@ -57047,31 +55453,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "n",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i128"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "overflowing_abs",
+ "name": "rotate_left",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -57081,10 +55486,10 @@
"10698": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -57094,7 +55499,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\nReturns a tuple of the exponentiation along with a bool indicating\nwhether an overflow happened.\n\n# Examples\n\n```\nassert_eq!(3i128.overflowing_pow(4), (81, false));\nassert_eq!(3i8.overflowing_pow(5), (-13, true));\n```",
+ "docs": "Shifts the bits to the right by a specified amount, `n`,\nwrapping the truncated bits to the beginning of the resulting\ninteger.\n\nPlease note this isn't the same operation as the `>>` shifting operator!\n\n# Examples\n\n```\nlet n = 0x6e10aai64;\nlet m = 0xaa00000000006e1;\n\nassert_eq!(n.rotate_right(12), m);\n```",
"id": 10698,
"inner": {
"function": {
@@ -57118,7 +55523,7 @@
}
],
[
- "exp",
+ "n",
{
"primitive": "u32"
}
@@ -57126,27 +55531,20 @@
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "i128"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "overflowing_pow",
+ "name": "rotate_right",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -57156,7 +55554,7 @@
"10699": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -57169,7 +55567,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\n# Examples\n\n```\nlet x: i128 = 2; // or any other integer type\n\nassert_eq!(x.pow(5), 32);\n```",
+ "docs": "Reverses the byte order of the integer.\n\n# Examples\n\n```\nlet n = 0x1234567890123456i64;\n\nlet m = n.swap_bytes();\n\nassert_eq!(m, 0x5634129078563412);\n```",
"id": 10699,
"inner": {
"function": {
@@ -57191,30 +55589,24 @@
{
"generic": "Self"
}
- ],
- [
- "exp",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "pow",
+ "name": "swap_bytes",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -57270,11 +55662,11 @@
"name": "len",
"span": {
"begin": [
- 2161,
+ 2156,
5
],
"end": [
- 2163,
+ 2158,
6
],
"filename": "std/src/collections/hash/map.rs"
@@ -57284,23 +55676,20 @@
"10700": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the square root of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is negative.\n\n# Examples\n\n```\nassert_eq!(10i128.isqrt(), 3);\n```",
+ "docs": "Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\n second least-significant bit becomes second most-significant bit, etc.\n\n# Examples\n\n```\nlet n = 0x1234567890123456i64;\nlet m = n.reverse_bits();\n\nassert_eq!(m, 0x6a2c48091e6a2c48);\nassert_eq!(0, 0i64.reverse_bits());\n```",
"id": 10700,
"inner": {
"function": {
@@ -57326,20 +55715,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "isqrt",
+ "name": "reverse_bits",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -57349,23 +55738,20 @@
"10701": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of Euclidean division of `self` by `rhs`.\n\nThis computes the integer `q` such that `self = q * rhs + r`, with\n`r = self.rem_euclid(rhs)` and `0 <= r < abs(rhs)`.\n\nIn other words, the result is `self / rhs` rounded to the integer `q`\nsuch that `self >= q * rhs`.\nIf `self > 0`, this is equal to rounding towards zero (the default in Rust);\nif `self < 0`, this is equal to rounding away from zero (towards +/- infinity).\nIf `rhs > 0`, this is equal to rounding towards -infinity;\nif `rhs < 0`, this is equal to rounding towards +infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\nlet a: i128 = 7; // or any other integer type\nlet b = 4;\n\nassert_eq!(a.div_euclid(b), 1); // 7 >= 4 * 1\nassert_eq!(a.div_euclid(-b), -1); // 7 >= -4 * -1\nassert_eq!((-a).div_euclid(b), -2); // -7 >= 4 * -2\nassert_eq!((-a).div_euclid(-b), 2); // -7 >= -4 * 2\n```",
+ "docs": "Converts an integer from big endian to the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai64;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(i64::from_be(n), n)\n} else {\n assert_eq!(i64::from_be(n), n.swap_bytes())\n}\n```",
"id": 10701,
"inner": {
"function": {
@@ -57383,34 +55769,28 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "x",
{
- "primitive": "i128"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "div_euclid",
+ "name": "from_be",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -57420,26 +55800,20 @@
"10702": {
"attrs": [
{
- "other": "#[doc(alias = \"modulo\", alias = \"mod\")]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the least nonnegative remainder of `self (mod rhs)`.\n\nThis is done as if by the Euclidean division algorithm -- given\n`r = self.rem_euclid(rhs)`, the result satisfies\n`self = rhs * self.div_euclid(rhs) + r` and `0 <= r < abs(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN` and\n`rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\nlet a: i128 = 7; // or any other integer type\nlet b = 4;\n\nassert_eq!(a.rem_euclid(b), 3);\nassert_eq!((-a).rem_euclid(b), 1);\nassert_eq!(a.rem_euclid(-b), 3);\nassert_eq!((-a).rem_euclid(-b), 1);\n```\n\nThis will panic:\n```should_panic\nlet _ = i128::MIN.rem_euclid(-1);\n```",
+ "docs": "Converts an integer from little endian to the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai64;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(i64::from_le(n), n)\n} else {\n assert_eq!(i64::from_le(n), n.swap_bytes())\n}\n```",
"id": 10702,
"inner": {
"function": {
@@ -57457,34 +55831,28 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "x",
{
- "primitive": "i128"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "rem_euclid",
+ "name": "from_le",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -57494,20 +55862,20 @@
"10703": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards negative infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nlet a: i128 = 8;\nlet b = 3;\n\nassert_eq!(a.div_floor(b), 2);\nassert_eq!(a.div_floor(-b), -3);\nassert_eq!((-a).div_floor(b), -3);\nassert_eq!((-a).div_floor(-b), 2);\n```",
+ "docs": "Converts `self` to big endian from the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai64;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(n.to_be(), n)\n} else {\n assert_eq!(n.to_be(), n.swap_bytes())\n}\n```",
"id": 10703,
"inner": {
"function": {
@@ -57529,30 +55897,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i128"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "div_floor",
+ "name": "to_be",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -57562,20 +55924,20 @@
"10704": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards positive infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nlet a: i128 = 8;\nlet b = 3;\n\nassert_eq!(a.div_ceil(b), 3);\nassert_eq!(a.div_ceil(-b), -2);\nassert_eq!((-a).div_ceil(b), -2);\nassert_eq!((-a).div_ceil(-b), 3);\n```",
+ "docs": "Converts `self` to little endian from the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai64;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(n.to_le(), n)\n} else {\n assert_eq!(n.to_le(), n.swap_bytes())\n}\n```",
"id": 10704,
"inner": {
"function": {
@@ -57597,30 +55959,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i128"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "div_ceil",
+ "name": "to_le",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -57630,7 +55986,10 @@
"10705": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -57640,7 +55999,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "If `rhs` is positive, calculates the smallest value greater than or\nequal to `self` that is a multiple of `rhs`. If `rhs` is negative,\ncalculates the largest value less than or equal to `self` that is a\nmultiple of `rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nOn overflow, this function will panic if overflow checks are enabled (default in debug\nmode) and wrap if overflow checks are disabled (default in release mode).\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(16_i128.next_multiple_of(8), 16);\nassert_eq!(23_i128.next_multiple_of(8), 24);\nassert_eq!(16_i128.next_multiple_of(-8), 16);\nassert_eq!(23_i128.next_multiple_of(-8), 16);\nassert_eq!((-16_i128).next_multiple_of(8), -16);\nassert_eq!((-23_i128).next_multiple_of(8), -16);\nassert_eq!((-16_i128).next_multiple_of(-8), -16);\nassert_eq!((-23_i128).next_multiple_of(-8), -24);\n```",
+ "docs": "Checked integer addition. Computes `self + rhs`, returning `None`\nif overflow occurred.\n\n# Examples\n\n```\nassert_eq!((i64::MAX - 2).checked_add(1), Some(i64::MAX - 1));\nassert_eq!((i64::MAX - 2).checked_add(3), None);\n```",
"id": 10705,
"inner": {
"function": {
@@ -57666,26 +56025,41 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i64"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "next_multiple_of",
+ "name": "checked_add",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -57695,17 +56069,23 @@
"10706": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "If `rhs` is positive, calculates the smallest value greater than or\nequal to `self` that is a multiple of `rhs`. If `rhs` is negative,\ncalculates the largest value less than or equal to `self` that is a\nmultiple of `rhs`. Returns `None` if `rhs` is zero or the operation\nwould result in overflow.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(16_i128.checked_next_multiple_of(8), Some(16));\nassert_eq!(23_i128.checked_next_multiple_of(8), Some(24));\nassert_eq!(16_i128.checked_next_multiple_of(-8), Some(16));\nassert_eq!(23_i128.checked_next_multiple_of(-8), Some(16));\nassert_eq!((-16_i128).checked_next_multiple_of(8), Some(-16));\nassert_eq!((-23_i128).checked_next_multiple_of(8), Some(-16));\nassert_eq!((-16_i128).checked_next_multiple_of(-8), Some(-16));\nassert_eq!((-23_i128).checked_next_multiple_of(-8), Some(-24));\nassert_eq!(1_i128.checked_next_multiple_of(0), None);\nassert_eq!(i128::MAX.checked_next_multiple_of(2), None);\n```",
+ "docs": "Strict integer addition. Computes `self + rhs`, panicking\nif overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((i64::MAX - 2).strict_add(1), i64::MAX - 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i64::MAX - 2).strict_add(3);\n```",
"id": 10706,
"inner": {
"function": {
@@ -57731,41 +56111,26 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i128"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "checked_next_multiple_of",
+ "name": "strict_add",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -57775,23 +56140,20 @@
"10707": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nThis method might not be optimized owing to implementation details;\n`ilog2` can produce results more efficiently for base 2, and `ilog10`\ncan produce results more efficiently for base 10.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero,\nor if `base` is less than 2.\n\n# Examples\n\n```\nassert_eq!(5i128.ilog(5), 1);\n```",
+ "docs": "Wrapping (modular) addition. Computes `self + rhs`, wrapping around at the\nboundary of the type.\n\n# Examples\n\n```\nassert_eq!(100i64.wrapping_add(27), 127);\nassert_eq!(i64::MAX.wrapping_add(2), i64::MIN + 1);\n```",
"id": 10707,
"inner": {
"function": {
@@ -57815,28 +56177,28 @@
}
],
[
- "base",
+ "rhs",
{
- "primitive": "i128"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "ilog",
+ "name": "wrapping_add",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -57846,10 +56208,10 @@
"10708": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
},
{
"must_use": {
@@ -57862,7 +56224,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 10 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero.\n\n# Example\n\n```\nassert_eq!(10i128.ilog10(), 1);\n```",
+ "docs": "Unchecked integer addition. Computes `self + rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_add(y)` is semantically equivalent to calling\n`x.`[`checked_add`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_add`].\n\n# Safety\n\nThis results in undefined behavior when\n`self + rhs > i64::MAX` or `self + rhs < i64::MIN`,\ni.e. when [`checked_add`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_add`]: i64::checked_add\n[`wrapping_add`]: i64::wrapping_add",
"id": 10708,
"inner": {
"function": {
@@ -57875,7 +56237,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -57884,24 +56246,33 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i64"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i64"
}
}
}
},
- "links": {},
- "name": "ilog10",
+ "links": {
+ "i64::checked_add": 10705,
+ "i64::wrapping_add": 10707
+ },
+ "name": "unchecked_add",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -57911,10 +56282,10 @@
"10709": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -57924,7 +56295,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nReturns `None` if the number is negative or zero, or if the base is not at least 2.\n\nThis method might not be optimized owing to implementation details;\n`checked_ilog2` can produce results more efficiently for base 2, and\n`checked_ilog10` can produce results more efficiently for base 10.\n\n# Examples\n\n```\nassert_eq!(5i128.checked_ilog(5), Some(1));\n```",
+ "docs": "Checked addition with an unsigned integer. Computes `self + rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1i64.checked_add_unsigned(2), Some(3));\nassert_eq!((i64::MAX - 2).checked_add_unsigned(3), None);\n```",
"id": 10709,
"inner": {
"function": {
@@ -57948,9 +56319,9 @@
}
],
[
- "base",
+ "rhs",
{
- "primitive": "i128"
+ "primitive": "u64"
}
]
],
@@ -57962,7 +56333,7 @@
"args": [
{
"type": {
- "primitive": "u32"
+ "primitive": "i64"
}
}
],
@@ -57977,14 +56348,14 @@
}
},
"links": {},
- "name": "checked_ilog",
+ "name": "checked_add_unsigned",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -58076,11 +56447,11 @@
"name": null,
"span": {
"begin": [
- 2159,
+ 2154,
1
],
"end": [
- 2164,
+ 2159,
2
],
"filename": "std/src/collections/hash/map.rs"
@@ -58090,20 +56461,23 @@
"10710": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 2 logarithm of the number, rounded down.\n\nReturns `None` if the number is negative or zero.\n\n# Examples\n\n```\nassert_eq!(2i128.checked_ilog2(), Some(1));\n```",
+ "docs": "Strict addition with an unsigned integer. Computes `self + rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1i64.strict_add_unsigned(2), 3);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i64::MAX - 2).strict_add_unsigned(3);\n```",
"id": 10710,
"inner": {
"function": {
@@ -58125,39 +56499,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u64"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "checked_ilog2",
+ "name": "strict_add_unsigned",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -58167,10 +56532,10 @@
"10711": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -58180,7 +56545,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 10 logarithm of the number, rounded down.\n\nReturns `None` if the number is negative or zero.\n\n# Example\n\n```\nassert_eq!(10i128.checked_ilog10(), Some(1));\n```",
+ "docs": "Checked integer subtraction. Computes `self - rhs`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!((i64::MIN + 2).checked_sub(1), Some(i64::MIN + 1));\nassert_eq!((i64::MIN + 2).checked_sub(3), None);\n```",
"id": 10711,
"inner": {
"function": {
@@ -58202,6 +56567,12 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i64"
+ }
]
],
"is_c_variadic": false,
@@ -58212,7 +56583,7 @@
"args": [
{
"type": {
- "primitive": "u32"
+ "primitive": "i64"
}
}
],
@@ -58227,14 +56598,14 @@
}
},
"links": {},
- "name": "checked_ilog10",
+ "name": "checked_sub",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -58244,20 +56615,23 @@
"10712": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Computes the absolute value of `self`.\n\n# Overflow behavior\n\nThe absolute value of\n`i128::MIN`\ncannot be represented as an\n`i128`,\nand attempting to calculate it will cause an overflow. This means\nthat code in debug mode will trigger a panic on this case and\noptimized code will return\n`i128::MIN`\nwithout a panic. If you do not want this behavior, consider\nusing [`unsigned_abs`](Self::unsigned_abs) instead.\n\n# Examples\n\n```\nassert_eq!(10i128.abs(), 10);\nassert_eq!((-10i128).abs(), 10);\n```",
+ "docs": "Strict integer subtraction. Computes `self - rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((i64::MIN + 2).strict_sub(1), i64::MIN + 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i64::MIN + 2).strict_sub(3);\n```",
"id": 10712,
"inner": {
"function": {
@@ -58279,26 +56653,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i64"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i64"
}
}
}
},
- "links": {
- "Self::unsigned_abs": 10676
- },
- "name": "abs",
+ "links": {},
+ "name": "strict_sub",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -58308,10 +56686,10 @@
"10713": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -58321,7 +56699,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Computes the absolute difference between `self` and `other`.\n\nThis function always returns the correct answer without overflow or\npanics by returning an unsigned integer.\n\n# Examples\n\n```\nassert_eq!(100i128.abs_diff(80), 20u128);\nassert_eq!(100i128.abs_diff(110), 10u128);\nassert_eq!((-100i128).abs_diff(80), 180u128);\nassert_eq!((-100i128).abs_diff(-120), 20u128);\nassert_eq!(i128::MIN.abs_diff(i128::MAX), u128::MAX);\n```",
+ "docs": "Wrapping (modular) subtraction. Computes `self - rhs`, wrapping around at the\nboundary of the type.\n\n# Examples\n\n```\nassert_eq!(0i64.wrapping_sub(127), -127);\nassert_eq!((-2i64).wrapping_sub(i64::MAX), i64::MAX);\n```",
"id": 10713,
"inner": {
"function": {
@@ -58345,28 +56723,28 @@
}
],
[
- "other",
+ "rhs",
{
- "primitive": "i128"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "abs_diff",
+ "name": "wrapping_sub",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -58376,20 +56754,23 @@
"10714": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_int_sign\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns a number representing sign of `self`.\n\n - `0` if the number is zero\n - `1` if the number is positive\n - `-1` if the number is negative\n\n# Examples\n\n```\nassert_eq!(10i128.signum(), 1);\nassert_eq!(0i128.signum(), 0);\nassert_eq!((-10i128).signum(), -1);\n```",
+ "docs": "Unchecked integer subtraction. Computes `self - rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_sub(y)` is semantically equivalent to calling\n`x.`[`checked_sub`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_sub`].\n\n# Safety\n\nThis results in undefined behavior when\n`self - rhs > i64::MAX` or `self - rhs < i64::MIN`,\ni.e. when [`checked_sub`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_sub`]: i64::checked_sub\n[`wrapping_sub`]: i64::wrapping_sub",
"id": 10714,
"inner": {
"function": {
@@ -58402,7 +56783,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -58411,24 +56792,33 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i64"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i64"
}
}
}
},
- "links": {},
- "name": "signum",
+ "links": {
+ "i64::checked_sub": 10711,
+ "i64::wrapping_sub": 10713
+ },
+ "name": "unchecked_sub",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -58438,20 +56828,20 @@
"10715": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `true` if `self` is positive and `false` if the number is zero or\nnegative.\n\n# Examples\n\n```\nassert!(10i128.is_positive());\nassert!(!(-10i128).is_positive());\n```",
+ "docs": "Checked subtraction with an unsigned integer. Computes `self - rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1i64.checked_sub_unsigned(2), Some(-1));\nassert_eq!((i64::MIN + 2).checked_sub_unsigned(3), None);\n```",
"id": 10715,
"inner": {
"function": {
@@ -58473,24 +56863,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u64"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i64"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "is_positive",
+ "name": "checked_sub_unsigned",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -58500,20 +56911,23 @@
"10716": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `true` if `self` is negative and `false` if the number is zero or\npositive.\n\n# Examples\n\n```\nassert!((-10i128).is_negative());\nassert!(!10i128.is_negative());\n```",
+ "docs": "Strict subtraction with an unsigned integer. Computes `self - rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1i64.strict_sub_unsigned(2), -1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i64::MIN + 2).strict_sub_unsigned(3);\n```",
"id": 10716,
"inner": {
"function": {
@@ -58535,24 +56949,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u64"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "is_negative",
+ "name": "strict_sub_unsigned",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -58562,10 +56982,10 @@
"10717": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -58575,7 +56995,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nbig-endian (network) byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x12345678901234567890123456789012i128.to_be_bytes();\nassert_eq!(bytes, [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]);\n```",
+ "docs": "Checked integer multiplication. Computes `self * rhs`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(i64::MAX.checked_mul(1), Some(i64::MAX));\nassert_eq!(i64::MAX.checked_mul(2), None);\n```",
"id": 10717,
"inner": {
"function": {
@@ -58597,29 +57017,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i64"
+ }
]
],
"is_c_variadic": false,
"output": {
- "array": {
- "len": "16",
- "type": {
- "primitive": "u8"
- }
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i64"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
}
}
}
}
},
"links": {},
- "name": "to_be_bytes",
+ "name": "checked_mul",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -58629,20 +57065,23 @@
"10718": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nlittle-endian byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x12345678901234567890123456789012i128.to_le_bytes();\nassert_eq!(bytes, [0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]);\n```",
+ "docs": "Strict integer multiplication. Computes `self * rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(i64::MAX.strict_mul(1), i64::MAX);\n```\n\nThe following panics because of overflow:\n\n``` should_panic\nlet _ = i64::MAX.strict_mul(2);\n```",
"id": 10718,
"inner": {
"function": {
@@ -58664,29 +57103,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i64"
+ }
]
],
"is_c_variadic": false,
"output": {
- "array": {
- "len": "16",
- "type": {
- "primitive": "u8"
- }
- }
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "to_le_bytes",
+ "name": "strict_mul",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -58696,10 +57136,10 @@
"10719": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -58709,7 +57149,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nnative byte order.\n\nAs the target platform's native endianness is used, portable code\nshould use [`to_be_bytes`] or [`to_le_bytes`], as appropriate,\ninstead.\n\n\n\n[`to_be_bytes`]: Self::to_be_bytes\n[`to_le_bytes`]: Self::to_le_bytes\n\n# Examples\n\n```\nlet bytes = 0x12345678901234567890123456789012i128.to_ne_bytes();\nassert_eq!(\n bytes,\n if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]\n } else {\n [0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]\n }\n);\n```",
+ "docs": "Wrapping (modular) multiplication. Computes `self * rhs`, wrapping around at\nthe boundary of the type.\n\n# Examples\n\n```\nassert_eq!(10i64.wrapping_mul(12), 120);\nassert_eq!(11i8.wrapping_mul(12), -124);\n```",
"id": 10719,
"inner": {
"function": {
@@ -58731,32 +57171,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i64"
+ }
]
],
"is_c_variadic": false,
"output": {
- "array": {
- "len": "16",
- "type": {
- "primitive": "u8"
- }
- }
+ "primitive": "i64"
}
}
}
},
- "links": {
- "Self::to_be_bytes": 10717,
- "Self::to_le_bytes": 10718
- },
- "name": "to_ne_bytes",
+ "links": {},
+ "name": "wrapping_mul",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -58843,11 +57281,11 @@
"name": null,
"span": {
"begin": [
- 2166,
+ 2161,
1
],
"end": [
- 2166,
+ 2161,
52
],
"filename": "std/src/collections/hash/map.rs"
@@ -58857,20 +57295,23 @@
"10720": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Creates an integer value from its representation as a byte array in\nbig endian.\n\n\n\n# Examples\n\n```\nlet value = i128::from_be_bytes([0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]);\nassert_eq!(value, 0x12345678901234567890123456789012);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_be_i128(input: &mut &[u8]) -> i128 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n i128::from_be_bytes(int_bytes.try_into().unwrap())\n}\n```",
+ "docs": "Unchecked integer multiplication. Computes `self * rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_mul(y)` is semantically equivalent to calling\n`x.`[`checked_mul`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_mul`].\n\n# Safety\n\nThis results in undefined behavior when\n`self * rhs > i64::MAX` or `self * rhs < i64::MIN`,\ni.e. when [`checked_mul`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_mul`]: i64::checked_mul\n[`wrapping_mul`]: i64::wrapping_mul",
"id": 10720,
"inner": {
"function": {
@@ -58883,38 +57324,42 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
[
- "bytes",
+ "self",
{
- "array": {
- "len": "16",
- "type": {
- "primitive": "u8"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i64"
}
}
}
},
- "links": {},
- "name": "from_be_bytes",
+ "links": {
+ "i64::checked_mul": 10717,
+ "i64::wrapping_mul": 10719
+ },
+ "name": "unchecked_mul",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -58924,20 +57369,20 @@
"10721": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Creates an integer value from its representation as a byte array in\nlittle endian.\n\n\n\n# Examples\n\n```\nlet value = i128::from_le_bytes([0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]);\nassert_eq!(value, 0x12345678901234567890123456789012);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_le_i128(input: &mut &[u8]) -> i128 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n i128::from_le_bytes(int_bytes.try_into().unwrap())\n}\n```",
+ "docs": "Checked integer division. Computes `self / rhs`, returning `None` if `rhs == 0`\nor the division results in overflow.\n\n# Examples\n\n```\nassert_eq!((i64::MIN + 1).checked_div(-1), Some(9223372036854775807));\nassert_eq!(i64::MIN.checked_div(-1), None);\nassert_eq!((1i64).checked_div(0), None);\n```",
"id": 10721,
"inner": {
"function": {
@@ -58955,33 +57400,49 @@
"sig": {
"inputs": [
[
- "bytes",
+ "self",
{
- "array": {
- "len": "16",
- "type": {
- "primitive": "u8"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i64"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "from_le_bytes",
+ "name": "checked_div",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -58991,20 +57452,23 @@
"10722": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Creates an integer value from its memory representation as a byte\narray in native endianness.\n\nAs the target platform's native endianness is used, portable code\nlikely wants to use [`from_be_bytes`] or [`from_le_bytes`], as\nappropriate instead.\n\n[`from_be_bytes`]: Self::from_be_bytes\n[`from_le_bytes`]: Self::from_le_bytes\n\n\n\n# Examples\n\n```\nlet value = i128::from_ne_bytes(if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]\n} else {\n [0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]\n});\nassert_eq!(value, 0x12345678901234567890123456789012);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_ne_i128(input: &mut &[u8]) -> i128 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n i128::from_ne_bytes(int_bytes.try_into().unwrap())\n}\n```",
+ "docs": "Strict integer division. Computes `self / rhs`, panicking\nif overflow occurred.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type.\n\n# Examples\n\n```\nassert_eq!((i64::MIN + 1).strict_div(-1), 9223372036854775807);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i64::MIN.strict_div(-1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1i64).strict_div(0);\n```",
"id": 10722,
"inner": {
"function": {
@@ -59022,36 +57486,34 @@
"sig": {
"inputs": [
[
- "bytes",
+ "self",
{
- "array": {
- "len": "16",
- "type": {
- "primitive": "u8"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i64"
}
}
}
},
- "links": {
- "Self::from_be_bytes": 10720,
- "Self::from_le_bytes": 10721
- },
- "name": "from_ne_bytes",
+ "links": {},
+ "name": "strict_div",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -59061,21 +57523,20 @@
"10723": {
"attrs": [
{
- "other": "#[rustc_diagnostic_item = \"i128_legacy_fn_min_value\"]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_min_value\", promotable: true}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
- "deprecation": {
- "note": "replaced by the `MIN` associated constant on this type",
- "since": "TBD"
- },
- "docs": "New code should prefer to use\n[`i128::MIN`] instead.\n\nReturns the smallest value that can be represented by this integer type.",
+ "deprecation": null,
+ "docs": "Checked Euclidean division. Computes `self.div_euclid(rhs)`,\nreturning `None` if `rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!((i64::MIN + 1).checked_div_euclid(-1), Some(9223372036854775807));\nassert_eq!(i64::MIN.checked_div_euclid(-1), None);\nassert_eq!((1i64).checked_div_euclid(0), None);\n```",
"id": 10723,
"inner": {
"function": {
@@ -59091,25 +57552,51 @@
"is_unsafe": false
},
"sig": {
- "inputs": [],
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i64"
+ }
+ ]
+ ],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i64"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
- "links": {
- "`i128::MIN`": 10591
- },
- "name": "min_value",
+ "links": {},
+ "name": "checked_div_euclid",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -59119,21 +57606,23 @@
"10724": {
"attrs": [
{
- "other": "#[rustc_diagnostic_item = \"i128_legacy_fn_max_value\"]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
- "deprecation": {
- "note": "replaced by the `MAX` associated constant on this type",
- "since": "TBD"
- },
- "docs": "New code should prefer to use\n[`i128::MAX`] instead.\n\nReturns the largest value that can be represented by this integer type.",
+ "deprecation": null,
+ "docs": "Strict Euclidean division. Computes `self.div_euclid(rhs)`, panicking\nif overflow occurred.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type.\n\n# Examples\n\n```\nassert_eq!((i64::MIN + 1).strict_div_euclid(-1), 9223372036854775807);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i64::MIN.strict_div_euclid(-1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1i64).strict_div_euclid(0);\n```",
"id": 10724,
"inner": {
"function": {
@@ -59149,25 +57638,36 @@
"is_unsafe": false
},
"sig": {
- "inputs": [],
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i64"
+ }
+ ]
+ ],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "i64"
}
}
}
},
- "links": {
- "`i128::MAX`": 10592
- },
- "name": "max_value",
+ "links": {},
+ "name": "strict_div_euclid",
"span": {
"begin": [
- 343,
+ 319,
5
],
"end": [
- 364,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -59177,19 +57677,7 @@
"10725": {
"attrs": [
{
- "other": "#[doc(alias = \"average_floor\")]"
- },
- {
- "other": "#[doc(alias = \"average_ceil\")]"
- },
- {
- "other": "#[doc(alias = \"average\")]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"num_midpoint_signed\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"num_midpoint_signed\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
},
{
"must_use": {
@@ -59199,7 +57687,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the midpoint (average) between `self` and `rhs`.\n\n`midpoint(a, b)` is `(a + b) / 2` as if it were performed in a\nsufficiently-large signed integral type. This implies that the result is\nalways rounded towards zero and that no overflow will ever occur.\n\n# Examples\n\n```\nassert_eq!(0i128.midpoint(4), 2);\nassert_eq!((-1i128).midpoint(2), 0);\nassert_eq!((-7i128).midpoint(0), -3);\nassert_eq!(0i128.midpoint(-7), -3);\nassert_eq!(0i128.midpoint(7), 3);\n```",
+ "docs": "Checked integer division without remainder. Computes `self / rhs`,\nreturning `None` if `rhs == 0`, the division results in overflow,\nor `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!((i64::MIN + 1).checked_exact_div(-1), Some(9223372036854775807));\nassert_eq!((-5i64).checked_exact_div(2), None);\nassert_eq!(i64::MIN.checked_exact_div(-1), None);\nassert_eq!((1i64).checked_exact_div(0), None);\n```",
"id": 10725,
"inner": {
"function": {
@@ -59225,217 +57713,126 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i64"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "midpoint",
+ "name": "checked_exact_div",
"span": {
"begin": [
- 365,
+ 319,
5
],
"end": [
- 365,
- 36
+ 338,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"10726": {
- "attrs": [],
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Checked integer division without remainder. Computes `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs == 0`, the division results in overflow,\nor `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64i64.exact_div(2), 32);\nassert_eq!(64i64.exact_div(32), 2);\nassert_eq!((i64::MIN + 1).exact_div(-1), 9223372036854775807);\n```\n\n```should_panic\n#![feature(exact_div)]\nlet _ = 65i64.exact_div(2);\n```\n```should_panic\n#![feature(exact_div)]\nlet _ = i64::MIN.exact_div(-1);\n```",
"id": 10726,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "primitive": "i128"
- },
+ "function": {
"generics": {
"params": [],
"where_predicates": []
},
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 10591,
- 10592,
- 10593,
- 10594,
- 10595,
- 10597,
- 10598,
- 10599,
- 10600,
- 10601,
- 10602,
- 10603,
- 10604,
- 10605,
- 10606,
- 10607,
- 10608,
- 10609,
- 10610,
- 10611,
- 10612,
- 10613,
- 10614,
- 10615,
- 10617,
- 10618,
- 10619,
- 10620,
- 10621,
- 10623,
- 10624,
- 10625,
- 10626,
- 10627,
- 10629,
- 10630,
- 10631,
- 10632,
- 10633,
- 10634,
- 10635,
- 10636,
- 10637,
- 10638,
- 10639,
- 10640,
- 10641,
- 10642,
- 10643,
- 10644,
- 10645,
- 10646,
- 10647,
- 10648,
- 10649,
- 10650,
- 10651,
- 10652,
- 10653,
- 10654,
- 10655,
- 10656,
- 10657,
- 10658,
- 10659,
- 10660,
- 10661,
- 10662,
- 10663,
- 10664,
- 10665,
- 10616,
- 10666,
- 10622,
- 10667,
- 10628,
- 10668,
- 10669,
- 10670,
- 10671,
- 10672,
- 10673,
- 10674,
- 10675,
- 10676,
- 10677,
- 10678,
- 10680,
- 10681,
- 10682,
- 10684,
- 10685,
- 10686,
- 10688,
- 10687,
- 10689,
- 10690,
- 10691,
- 10692,
- 10693,
- 10694,
- 10695,
- 10696,
- 10697,
- 10698,
- 10699,
- 10700,
- 10701,
- 10702,
- 10703,
- 10704,
- 10705,
- 10706,
- 10707,
- 10596,
- 10708,
- 10709,
- 10710,
- 10711,
- 10712,
- 10713,
- 10714,
- 10715,
- 10716,
- 10717,
- 10718,
- 10719,
- 10720,
- 10721,
- 10722,
- 10723,
- 10724,
- 10725
- ],
- "provided_trait_methods": [],
- "trait": null
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i64"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "i64"
+ }
+ }
}
},
"links": {},
- "name": null,
+ "name": "exact_div",
"span": {
"begin": [
- 342,
- 1
+ 319,
+ 5
],
"end": [
- 342,
- 10
+ 338,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"10727": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 82, patch: 0})}, feature: \"const_int_from_str\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from a string slice with digits in a given base.\n\nThe string is expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\nassert_eq!(i128::from_str_radix(\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\nassert!(i128::from_str_radix(\"1 \", 10).is_err());\n```",
+ "docs": "Unchecked integer division without remainder. Computes `self / rhs`.\n\n# Safety\n\nThis results in undefined behavior when `rhs == 0`, `self % rhs != 0`, or\n`self == i64::MIN && rhs == -1`,\ni.e. when [`checked_exact_div`](Self::checked_exact_div) would return `None`.",
"id": 10727,
"inner": {
"function": {
@@ -59448,70 +57845,42 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
[
- "src",
+ "self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "primitive": "str"
- }
- }
+ "generic": "Self"
}
],
[
- "radix",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i128"
- }
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 4784,
- "path": "ParseIntError"
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 57,
- "path": "Result"
- }
+ "primitive": "i64"
}
}
}
},
- "links": {},
- "name": "from_str_radix",
+ "links": {
+ "Self::checked_exact_div": 10725
+ },
+ "name": "unchecked_exact_div",
"span": {
"begin": [
- 1630,
- 1
+ 319,
+ 5
],
"end": [
- 1630,
- 56
+ 338,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -59520,12 +57889,20 @@
"10728": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from an ASCII-byte slice with decimal digits.\n\nThe characters are expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(i128::from_ascii(b\"+10\"), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(i128::from_ascii(b\"1 \").is_err());\n```",
+ "docs": "Checked integer remainder. Computes `self % rhs`, returning `None` if\n`rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!(5i64.checked_rem(2), Some(1));\nassert_eq!(5i64.checked_rem(0), None);\nassert_eq!(i64::MIN.checked_rem(-1), None);\n```",
"id": 10728,
"inner": {
"function": {
@@ -59543,17 +57920,15 @@
"sig": {
"inputs": [
[
- "src",
+ "self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "slice": {
- "primitive": "u8"
- }
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i64"
}
]
],
@@ -59565,39 +57940,30 @@
"args": [
{
"type": {
- "primitive": "i128"
- }
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 4784,
- "path": "ParseIntError"
- }
+ "primitive": "i64"
}
}
],
"constraints": []
}
},
- "id": 57,
- "path": "Result"
+ "id": 51,
+ "path": "Option"
}
}
}
}
},
"links": {},
- "name": "from_ascii",
+ "name": "checked_rem",
"span": {
"begin": [
- 1630,
- 1
+ 319,
+ 5
],
"end": [
- 1630,
- 56
+ 338,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -59606,12 +57972,23 @@
"10729": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from an ASCII-byte slice with digits in a given base.\n\nThe characters are expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(i128::from_ascii_radix(b\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(i128::from_ascii_radix(b\"1 \", 10).is_err());\n```",
+ "docs": "Strict integer remainder. Computes `self % rhs`, panicking if\nthe division results in overflow.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is `x % y` for `MIN / -1` on a\nsigned type (where `MIN` is the negative minimal value), which is invalid due to implementation artifacts.\n\n# Examples\n\n```\nassert_eq!(5i64.strict_rem(2), 1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5i64.strict_rem(0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i64::MIN.strict_rem(-1);\n```",
"id": 10729,
"inner": {
"function": {
@@ -59629,67 +58006,35 @@
"sig": {
"inputs": [
[
- "src",
+ "self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "slice": {
- "primitive": "u8"
- }
- }
- }
+ "generic": "Self"
}
],
[
- "radix",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i128"
- }
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 4784,
- "path": "ParseIntError"
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 57,
- "path": "Result"
- }
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "from_ascii_radix",
+ "name": "strict_rem",
"span": {
"begin": [
- 1630,
- 1
+ 319,
+ 5
],
"end": [
- 1630,
- 56
+ 338,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -59746,7 +58091,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -59758,7 +58103,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -59769,11 +58114,11 @@
"name": "fmt",
"span": {
"begin": [
- 2170,
+ 2165,
5
],
"end": [
- 2172,
+ 2167,
6
],
"filename": "std/src/collections/hash/map.rs"
@@ -59781,57 +58126,108 @@
"visibility": "default"
},
"10730": {
- "attrs": [],
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Checked Euclidean remainder. Computes `self.rem_euclid(rhs)`, returning `None`\nif `rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!(5i64.checked_rem_euclid(2), Some(1));\nassert_eq!(5i64.checked_rem_euclid(0), None);\nassert_eq!(i64::MIN.checked_rem_euclid(-1), None);\n```",
"id": 10730,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "primitive": "i128"
- },
+ "function": {
"generics": {
"params": [],
"where_predicates": []
},
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 10727,
- 10728,
- 10729
- ],
- "provided_trait_methods": [],
- "trait": null
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i64"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i64"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
}
},
"links": {},
- "name": null,
+ "name": "checked_rem_euclid",
"span": {
"begin": [
- 1630,
- 1
+ 319,
+ 5
],
"end": [
- 1630,
- 56
+ 338,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"10731": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 138215, is_soft: false}, feature: \"int_format_into\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Allows users to write an integer (in signed decimal format) into a variable `buf` of\ntype [`NumBuffer`] that is passed by the caller by mutable reference.\n\n# Examples\n\n```\n#![feature(int_format_into)]\nuse core::fmt::NumBuffer;\n\nlet n = 0i128;\nlet mut buf = NumBuffer::new();\nassert_eq!(n.format_into(&mut buf), \"0\");\n\nlet n1 = i128::MIN;\nassert_eq!(n1.format_into(&mut buf), i128::MIN.to_string());\n\nlet n2 = i128::MAX;\nassert_eq!(n2.format_into(&mut buf), i128::MAX.to_string());\n```",
+ "docs": "Strict Euclidean remainder. Computes `self.rem_euclid(rhs)`, panicking if\nthe division results in overflow.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is `x % y` for `MIN / -1` on a\nsigned type (where `MIN` is the negative minimal value), which is invalid due to implementation artifacts.\n\n# Examples\n\n```\nassert_eq!(5i64.strict_rem_euclid(2), 1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5i64.strict_rem_euclid(0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i64::MIN.strict_rem_euclid(-1);\n```",
"id": 10731,
"inner": {
"function": {
@@ -59843,7 +58239,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -59855,131 +58251,169 @@
}
],
[
- "buf",
+ "rhs",
{
- "borrowed_ref": {
- "is_mutable": true,
- "lifetime": null,
- "type": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i128"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 10162,
- "path": "NumBuffer"
- }
- }
- }
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "primitive": "str"
- }
- }
+ "primitive": "i64"
}
}
}
},
- "links": {
- "`NumBuffer`": 10162
- },
- "name": "format_into",
+ "links": {},
+ "name": "strict_rem_euclid",
"span": {
"begin": [
- 757,
+ 319,
5
],
"end": [
- 757,
- 64
+ 338,
+ 6
],
- "filename": "checkouts/rust/library/core/src/fmt/num.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"10732": {
- "attrs": [],
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Checked negation. Computes `-self`, returning `None` if `self == MIN`.\n\n# Examples\n\n```\nassert_eq!(5i64.checked_neg(), Some(-5));\nassert_eq!(i64::MIN.checked_neg(), None);\n```",
"id": 10732,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "primitive": "i128"
- },
+ "function": {
"generics": {
"params": [],
"where_predicates": []
},
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 10731
- ],
- "provided_trait_methods": [],
- "trait": null
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i64"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
}
},
"links": {},
- "name": null,
+ "name": "checked_neg",
"span": {
"begin": [
- 736,
- 1
+ 319,
+ 5
],
"end": [
- 736,
- 10
+ 338,
+ 6
],
- "filename": "checkouts/rust/library/core/src/fmt/num.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"10733": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_neg\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "The smallest value that can be represented by this integer type.\n\n# Examples\n\n```\nassert_eq!(u8::MIN, 0);\n```",
+ "docs": "Unchecked negation. Computes `-self`, assuming overflow cannot occur.\n\n# Safety\n\nThis results in undefined behavior when\n`self == i64::MIN`,\ni.e. when [`checked_neg`] would return `None`.\n\n[`checked_neg`]: i64::checked_neg",
"id": 10733,
"inner": {
- "assoc_const": {
- "type": {
- "primitive": "u8"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "value": "0"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": true
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "i64"
+ }
+ }
}
},
- "links": {},
- "name": "MIN",
+ "links": {
+ "i64::checked_neg": 10732
+ },
+ "name": "unchecked_neg",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -59989,30 +58423,62 @@
"10734": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "The largest value that can be represented by this integer type\n(28 − 1).\n\n# Examples\n\n```\nassert_eq!(u8::MAX, 255);\n```",
+ "docs": "Strict negation. Computes `-self`, panicking if `self == MIN`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(5i64.strict_neg(), -5);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i64::MIN.strict_neg();\n```",
"id": 10734,
"inner": {
- "assoc_const": {
- "type": {
- "primitive": "u8"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "value": "_"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "i64"
+ }
+ }
}
},
"links": {},
- "name": "MAX",
+ "name": "strict_neg",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -60022,30 +58488,80 @@
"10735": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 53, patch: 0})}, feature: \"int_bits_const\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "The size of this integer type in bits.\n\n# Examples\n\n```\nassert_eq!(u8::BITS, 8);\n```",
+ "docs": "Checked shift left. Computes `self << rhs`, returning `None` if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x1i64.checked_shl(4), Some(0x10));\nassert_eq!(0x1i64.checked_shl(129), None);\nassert_eq!(0x10i64.checked_shl(63), Some(0));\n```",
"id": 10735,
"inner": {
- "assoc_const": {
- "type": {
- "primitive": "u32"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "value": "_"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i64"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
}
},
"links": {},
- "name": "BITS",
+ "name": "checked_shl",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -60055,26 +58571,23 @@
"10736": {
"attrs": [
{
- "other": "#[doc(alias = \"popcount\")]"
- },
- {
- "other": "#[doc(alias = \"popcnt\")]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 0b01001100u8;\nassert_eq!(n.count_ones(), 3);\n\nlet max = u8::MAX;\nassert_eq!(max.count_ones(), 8);\n\nlet zero = 0u8;\nassert_eq!(zero.count_ones(), 0);\n```",
+ "docs": "Strict shift left. Computes `self << rhs`, panicking if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x1i64.strict_shl(4), 0x10);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x1i64.strict_shl(129);\n```",
"id": 10736,
"inner": {
"function": {
@@ -60096,24 +58609,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "count_ones",
+ "name": "strict_shl",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -60123,20 +58642,20 @@
"10737": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of zeros in the binary representation of `self`.\n\n# Examples\n\n```\nlet zero = 0u8;\nassert_eq!(zero.count_zeros(), 8);\n\nlet max = u8::MAX;\nassert_eq!(max.count_zeros(), 0);\n```",
+ "docs": "Unchecked shift left. Computes `self << rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shl`] would return `None`.\n\n[`checked_shl`]: i64::checked_shl",
"id": 10737,
"inner": {
"function": {
@@ -60149,7 +58668,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -60158,24 +58677,32 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i64"
}
}
}
},
- "links": {},
- "name": "count_zeros",
+ "links": {
+ "i64::checked_shl": 10735
+ },
+ "name": "unchecked_shl",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -60185,23 +58712,20 @@
"10738": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 2 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is zero.\n\n# Examples\n\n```\nassert_eq!(2u8.ilog2(), 1);\n```",
+ "docs": "Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x1i64.unbounded_shl(4), 0x10);\nassert_eq!(0x1i64.unbounded_shl(129), 0);\n```",
"id": 10738,
"inner": {
"function": {
@@ -60223,24 +58747,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "ilog2",
+ "name": "unbounded_shl",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -60250,10 +58780,7 @@
"10739": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
@@ -60263,7 +58790,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of leading zeros in the binary representation of `self`.\n\nDepending on what you're doing with the value, you might also be interested in the\n[`ilog2`] function which returns a consistent number, even if the type widens.\n\n# Examples\n\n```\nlet n = u8::MAX >> 2;\nassert_eq!(n.leading_zeros(), 2);\n\nlet zero = 0u8;\nassert_eq!(zero.leading_zeros(), 8);\n\nlet max = u8::MAX;\nassert_eq!(max.leading_zeros(), 0);\n```\n[`ilog2`]: u8::ilog2",
+ "docs": "Exact shift left. Computes `self << rhs` as long as it can be reversed losslessly.\n\nReturns `None` if any bits that would be shifted out differ from the resulting sign bit\nor if `rhs` >=\n`i64::BITS`.\nOtherwise, returns `Some(self << rhs)`.\n\n# Examples\n\n```\n#![feature(exact_bitshifts)]\n\nassert_eq!(0x1i64.exact_shl(4), Some(0x10));\nassert_eq!(0x1i64.exact_shl(i64::BITS - 2), Some(1 << i64::BITS - 2));\nassert_eq!(0x1i64.exact_shl(i64::BITS - 1), None);\nassert_eq!((-0x2i64).exact_shl(i64::BITS - 2), Some(-0x2 << i64::BITS - 2));\nassert_eq!((-0x2i64).exact_shl(i64::BITS - 1), None);\n```",
"id": 10739,
"inner": {
"function": {
@@ -60285,26 +58812,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i64"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
- "links": {
- "u8::ilog2": 10738
- },
- "name": "leading_zeros",
+ "links": {},
+ "name": "exact_shl",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -60372,7 +58918,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "fmt::Debug"
}
}
@@ -60396,7 +58942,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -60405,11 +58951,11 @@
"name": null,
"span": {
"begin": [
- 2169,
+ 2164,
1
],
"end": [
- 2173,
+ 2168,
2
],
"filename": "std/src/collections/hash/map.rs"
@@ -60419,10 +58965,7 @@
"10740": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
@@ -60432,7 +58975,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of trailing zeros in the binary representation\nof `self`.\n\n# Examples\n\n```\nlet n = 0b0101000u8;\nassert_eq!(n.trailing_zeros(), 3);\n\nlet zero = 0u8;\nassert_eq!(zero.trailing_zeros(), 8);\n\nlet max = u8::MAX;\nassert_eq!(max.trailing_zeros(), 0);\n```",
+ "docs": "Unchecked exact shift left. Computes `self << rhs`, assuming the operation can be\nlosslessly reversed and `rhs` cannot be larger than\n`i64::BITS`.\n\n# Safety\n\nThis results in undefined behavior when `rhs >= self.leading_zeros() && rhs >=\nself.leading_ones()` i.e. when\n[`i64::exact_shl`]\nwould return `None`.",
"id": 10740,
"inner": {
"function": {
@@ -60445,7 +58988,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -60454,24 +58997,32 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i64"
}
}
}
},
- "links": {},
- "name": "trailing_zeros",
+ "links": {
+ "`i64::exact_shl`": 10739
+ },
+ "name": "unchecked_exact_shl",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -60481,10 +59032,10 @@
"10741": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -60494,7 +59045,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of leading ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = !(u8::MAX >> 2);\nassert_eq!(n.leading_ones(), 2);\n\nlet zero = 0u8;\nassert_eq!(zero.leading_ones(), 0);\n\nlet max = u8::MAX;\nassert_eq!(max.leading_ones(), 8);\n```",
+ "docs": "Checked shift right. Computes `self >> rhs`, returning `None` if `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x10i64.checked_shr(4), Some(0x1));\nassert_eq!(0x10i64.checked_shr(128), None);\n```",
"id": 10741,
"inner": {
"function": {
@@ -60516,24 +59067,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i64"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "leading_ones",
+ "name": "checked_shr",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -60543,20 +59115,23 @@
"10742": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of trailing ones in the binary representation\nof `self`.\n\n# Examples\n\n```\nlet n = 0b1010111u8;\nassert_eq!(n.trailing_ones(), 3);\n\nlet zero = 0u8;\nassert_eq!(zero.trailing_ones(), 0);\n\nlet max = u8::MAX;\nassert_eq!(max.trailing_ones(), 8);\n```",
+ "docs": "Strict shift right. Computes `self >> rhs`, panicking `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x10i64.strict_shr(4), 0x1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10i64.strict_shr(128);\n```",
"id": 10742,
"inner": {
"function": {
@@ -60578,24 +59153,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "trailing_ones",
+ "name": "strict_shr",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -60605,17 +59186,20 @@
"10743": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 142326, is_soft: false}, feature: \"uint_bit_width\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the minimum number of bits required to represent `self`.\n\nThis method returns zero if `self` is zero.\n\n# Examples\n\n```\n#![feature(uint_bit_width)]\n\nassert_eq!(0_u8.bit_width(), 0);\nassert_eq!(0b111_u8.bit_width(), 3);\nassert_eq!(0b1110_u8.bit_width(), 4);\nassert_eq!(u8::MAX.bit_width(), 8);\n```",
+ "docs": "Unchecked shift right. Computes `self >> rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shr`] would return `None`.\n\n[`checked_shr`]: i64::checked_shr",
"id": 10743,
"inner": {
"function": {
@@ -60628,7 +59212,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -60637,24 +59221,32 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i64"
}
}
}
},
- "links": {},
- "name": "bit_width",
+ "links": {
+ "i64::checked_shr": 10741
+ },
+ "name": "unchecked_shr",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -60664,7 +59256,10 @@
"10744": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
},
{
"must_use": {
@@ -60674,7 +59269,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `self` with only the most significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: u8 = 0b_01100100;\n\nassert_eq!(n.isolate_highest_one(), 0b_01000000);\nassert_eq!(0_u8.isolate_highest_one(), 0);\n```",
+ "docs": "Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, which yields `0` for a positive number,\nand `-1` for a negative number.\n\n# Examples\n\n```\nassert_eq!(0x10i64.unbounded_shr(4), 0x1);\nassert_eq!(0x10i64.unbounded_shr(129), 0);\nassert_eq!(i64::MIN.unbounded_shr(129), -1);\n```",
"id": 10744,
"inner": {
"function": {
@@ -60696,24 +59291,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "isolate_highest_one",
+ "name": "unbounded_shr",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -60723,7 +59324,7 @@
"10745": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
@@ -60733,7 +59334,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `self` with only the least significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: u8 = 0b_01100100;\n\nassert_eq!(n.isolate_lowest_one(), 0b_00000100);\nassert_eq!(0_u8.isolate_lowest_one(), 0);\n```",
+ "docs": "Exact shift right. Computes `self >> rhs` as long as it can be reversed losslessly.\n\nReturns `None` if any non-zero bits would be shifted out or if `rhs` >=\n`i64::BITS`.\nOtherwise, returns `Some(self >> rhs)`.\n\n# Examples\n\n```\n#![feature(exact_bitshifts)]\n\nassert_eq!(0x10i64.exact_shr(4), Some(0x1));\nassert_eq!(0x10i64.exact_shr(5), None);\n```",
"id": 10745,
"inner": {
"function": {
@@ -60755,24 +59356,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i64"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "isolate_lowest_one",
+ "name": "exact_shr",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -60782,7 +59404,7 @@
"10746": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
@@ -60792,7 +59414,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the index of the highest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_u8.highest_one(), None);\nassert_eq!(0x1_u8.highest_one(), Some(0));\nassert_eq!(0x10_u8.highest_one(), Some(4));\nassert_eq!(0x1f_u8.highest_one(), Some(4));\n```",
+ "docs": "Unchecked exact shift right. Computes `self >> rhs`, assuming the operation can be\nlosslessly reversed and `rhs` cannot be larger than\n`i64::BITS`.\n\n# Safety\n\nThis results in undefined behavior when `rhs > self.trailing_zeros() || rhs >=\ni64::BITS`\ni.e. when\n[`i64::exact_shr`]\nwould return `None`.",
"id": 10746,
"inner": {
"function": {
@@ -60805,7 +59427,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -60814,39 +59436,32 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i64"
}
}
}
},
- "links": {},
- "name": "highest_one",
+ "links": {
+ "`i64::exact_shr`": 10745
+ },
+ "name": "unchecked_exact_shr",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -60856,7 +59471,10 @@
"10747": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
},
{
"must_use": {
@@ -60866,7 +59484,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the index of the lowest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_u8.lowest_one(), None);\nassert_eq!(0x1_u8.lowest_one(), Some(0));\nassert_eq!(0x10_u8.lowest_one(), Some(4));\nassert_eq!(0x1f_u8.lowest_one(), Some(0));\n```",
+ "docs": "Checked absolute value. Computes `self.abs()`, returning `None` if\n`self == MIN`.\n\n# Examples\n\n```\nassert_eq!((-5i64).checked_abs(), Some(5));\nassert_eq!(i64::MIN.checked_abs(), None);\n```",
"id": 10747,
"inner": {
"function": {
@@ -60898,7 +59516,7 @@
"args": [
{
"type": {
- "primitive": "u32"
+ "primitive": "i64"
}
}
],
@@ -60913,14 +59531,14 @@
}
},
"links": {},
- "name": "lowest_one",
+ "name": "checked_abs",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -60930,20 +59548,23 @@
"10748": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts the bits to the left by a specified amount, `n`,\nwrapping the truncated bits to the end of the resulting integer.\n\nPlease note this isn't the same operation as the `<<` shifting operator!\n\n# Examples\n\n```\nlet n = 0x82u8;\nlet m = 0xa;\n\nassert_eq!(n.rotate_left(2), m);\n```",
+ "docs": "Strict absolute value. Computes `self.abs()`, panicking if\n`self == MIN`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((-5i64).strict_abs(), 5);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i64::MIN.strict_abs();\n```",
"id": 10748,
"inner": {
"function": {
@@ -60965,30 +59586,24 @@
{
"generic": "Self"
}
- ],
- [
- "n",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "rotate_left",
+ "name": "strict_abs",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -60998,10 +59613,10 @@
"10749": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
@@ -61011,7 +59626,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts the bits to the right by a specified amount, `n`,\nwrapping the truncated bits to the beginning of the resulting\ninteger.\n\nPlease note this isn't the same operation as the `>>` shifting operator!\n\n# Examples\n\n```\nlet n = 0xau8;\nlet m = 0x82;\n\nassert_eq!(n.rotate_right(2), m);\n```",
+ "docs": "Checked exponentiation. Computes `self.pow(exp)`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(8i64.checked_pow(2), Some(64));\nassert_eq!(i64::MAX.checked_pow(2), None);\n```",
"id": 10749,
"inner": {
"function": {
@@ -61035,7 +59650,7 @@
}
],
[
- "n",
+ "exp",
{
"primitive": "u32"
}
@@ -61043,20 +59658,35 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i64"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "rotate_right",
+ "name": "checked_pow",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -61066,20 +59696,23 @@
"10750": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Reverses the byte order of the integer.\n\n# Examples\n\n```\nlet n = 0x12u8;\nlet m = n.swap_bytes();\n\nassert_eq!(m, 0x12);\n```",
+ "docs": "Strict exponentiation. Computes `self.pow(exp)`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(8i64.strict_pow(2), 64);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i64::MAX.strict_pow(2);\n```",
"id": 10750,
"inner": {
"function": {
@@ -61101,24 +59734,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "exp",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "swap_bytes",
+ "name": "strict_pow",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -61128,10 +59767,10 @@
"10751": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
},
{
"must_use": {
@@ -61141,7 +59780,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\n second least-significant bit becomes second most-significant bit, etc.\n\n# Examples\n\n```\nlet n = 0x12u8;\nlet m = n.reverse_bits();\n\nassert_eq!(m, 0x48);\nassert_eq!(0, 0u8.reverse_bits());\n```",
+ "docs": "Returns the square root of the number, rounded down.\n\nReturns `None` if `self` is negative.\n\n# Examples\n\n```\nassert_eq!(10i64.checked_isqrt(), Some(3));\n```",
"id": 10751,
"inner": {
"function": {
@@ -61167,20 +59806,35 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i64"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "reverse_bits",
+ "name": "checked_isqrt",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -61190,20 +59844,20 @@
"10752": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts an integer from big endian to the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au8;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(u8::from_be(n), n)\n} else {\n assert_eq!(u8::from_be(n), n.swap_bytes())\n}\n```",
+ "docs": "Saturating integer addition. Computes `self + rhs`, saturating at the numeric\nbounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i64.saturating_add(1), 101);\nassert_eq!(i64::MAX.saturating_add(100), i64::MAX);\nassert_eq!(i64::MIN.saturating_add(-1), i64::MIN);\n```",
"id": 10752,
"inner": {
"function": {
@@ -61221,28 +59875,34 @@
"sig": {
"inputs": [
[
- "x",
+ "self",
{
- "primitive": "u8"
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "from_be",
+ "name": "saturating_add",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -61252,20 +59912,20 @@
"10753": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts an integer from little endian to the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au8;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(u8::from_le(n), n)\n} else {\n assert_eq!(u8::from_le(n), n.swap_bytes())\n}\n```",
+ "docs": "Saturating addition with an unsigned integer. Computes `self + rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1i64.saturating_add_unsigned(2), 3);\nassert_eq!(i64::MAX.saturating_add_unsigned(100), i64::MAX);\n```",
"id": 10753,
"inner": {
"function": {
@@ -61283,28 +59943,34 @@
"sig": {
"inputs": [
[
- "x",
+ "self",
{
- "primitive": "u8"
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "from_le",
+ "name": "saturating_add_unsigned",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -61314,7 +59980,7 @@
"10754": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -61327,7 +59993,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts `self` to big endian from the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au8;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(n.to_be(), n)\n} else {\n assert_eq!(n.to_be(), n.swap_bytes())\n}\n```",
+ "docs": "Saturating integer subtraction. Computes `self - rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i64.saturating_sub(127), -27);\nassert_eq!(i64::MIN.saturating_sub(100), i64::MIN);\nassert_eq!(i64::MAX.saturating_sub(-1), i64::MAX);\n```",
"id": 10754,
"inner": {
"function": {
@@ -61349,24 +60015,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i64"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "to_be",
+ "name": "saturating_sub",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -61376,10 +60048,10 @@
"10755": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -61389,7 +60061,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts `self` to little endian from the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au8;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(n.to_le(), n)\n} else {\n assert_eq!(n.to_le(), n.swap_bytes())\n}\n```",
+ "docs": "Saturating subtraction with an unsigned integer. Computes `self - rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i64.saturating_sub_unsigned(127), -27);\nassert_eq!(i64::MIN.saturating_sub_unsigned(100), i64::MIN);\n```",
"id": 10755,
"inner": {
"function": {
@@ -61411,24 +60083,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u64"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "to_le",
+ "name": "saturating_sub_unsigned",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -61438,10 +60116,10 @@
"10756": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 45, patch: 0})}, feature: \"saturating_neg\"}}]"
},
{
"must_use": {
@@ -61451,7 +60129,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer addition. Computes `self + rhs`, returning `None`\nif overflow occurred.\n\n# Examples\n\n```\nassert_eq!((u8::MAX - 2).checked_add(1), Some(u8::MAX - 1));\nassert_eq!((u8::MAX - 2).checked_add(3), None);\n```",
+ "docs": "Saturating integer negation. Computes `-self`, returning `MAX` if `self == MIN`\ninstead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i64.saturating_neg(), -100);\nassert_eq!((-100i64).saturating_neg(), 100);\nassert_eq!(i64::MIN.saturating_neg(), i64::MAX);\nassert_eq!(i64::MAX.saturating_neg(), i64::MIN + 1);\n```",
"id": 10756,
"inner": {
"function": {
@@ -61473,45 +60151,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u8"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "checked_add",
+ "name": "saturating_neg",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -61521,23 +60178,20 @@
"10757": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 45, patch: 0})}, feature: \"saturating_neg\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer addition. Computes `self + rhs`, panicking\nif overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((u8::MAX - 2).strict_add(1), u8::MAX - 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (u8::MAX - 2).strict_add(3);\n```",
+ "docs": "Saturating absolute value. Computes `self.abs()`, returning `MAX` if `self ==\nMIN` instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i64.saturating_abs(), 100);\nassert_eq!((-100i64).saturating_abs(), 100);\nassert_eq!(i64::MIN.saturating_abs(), i64::MAX);\nassert_eq!((i64::MIN + 1).saturating_abs(), i64::MAX);\n```",
"id": 10757,
"inner": {
"function": {
@@ -61559,30 +60213,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "strict_add",
+ "name": "saturating_abs",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -61592,10 +60240,10 @@
"10758": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -61605,7 +60253,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) addition. Computes `self + rhs`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(200u8.wrapping_add(55), 255);\nassert_eq!(200u8.wrapping_add(u8::MAX), 199);\n```",
+ "docs": "Saturating integer multiplication. Computes `self * rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(10i64.saturating_mul(12), 120);\nassert_eq!(i64::MAX.saturating_mul(10), i64::MAX);\nassert_eq!(i64::MIN.saturating_mul(10), i64::MIN);\n```",
"id": 10758,
"inner": {
"function": {
@@ -61631,26 +60279,26 @@
[
"rhs",
{
- "primitive": "u8"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "wrapping_add",
+ "name": "saturating_mul",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -61660,23 +60308,20 @@
"10759": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer addition. Computes `self + rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_add(y)` is semantically equivalent to calling\n`x.`[`checked_add`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_add`].\n\n# Safety\n\nThis results in undefined behavior when\n`self + rhs > u8::MAX` or `self + rhs < u8::MIN`,\ni.e. when [`checked_add`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_add`]: u8::checked_add\n[`wrapping_add`]: u8::wrapping_add",
+ "docs": "Saturating integer division. Computes `self / rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i64.saturating_div(2), 2);\nassert_eq!(i64::MAX.saturating_div(-1), i64::MIN + 1);\nassert_eq!(i64::MIN.saturating_div(-1), i64::MAX);\n\n```",
"id": 10759,
"inner": {
"function": {
@@ -61689,7 +60334,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -61702,29 +60347,26 @@
[
"rhs",
{
- "primitive": "u8"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i64"
}
}
}
},
- "links": {
- "u8::checked_add": 10756,
- "u8::wrapping_add": 10758
- },
- "name": "unchecked_add",
+ "links": {},
+ "name": "saturating_div",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -61851,10 +60493,10 @@
"10760": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
@@ -61864,7 +60506,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked addition with a signed integer. Computes `self + rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1u8.checked_add_signed(2), Some(3));\nassert_eq!(1u8.checked_add_signed(-2), None);\nassert_eq!((u8::MAX - 2).checked_add_signed(3), None);\n```",
+ "docs": "Saturating integer exponentiation. Computes `self.pow(exp)`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!((-4i64).saturating_pow(3), -64);\nassert_eq!(i64::MIN.saturating_pow(2), i64::MAX);\nassert_eq!(i64::MIN.saturating_pow(3), i64::MIN);\n```",
"id": 10760,
"inner": {
"function": {
@@ -61888,43 +60530,28 @@
}
],
[
- "rhs",
+ "exp",
{
- "primitive": "i8"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u8"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "checked_add_signed",
+ "name": "saturating_pow",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -61934,23 +60561,20 @@
"10761": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict addition with a signed integer. Computes `self + rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1u8.strict_add_signed(2), 3);\n```\n\nThe following panic because of overflow:\n\n```should_panic\nlet _ = 1u8.strict_add_signed(-2);\n```\n\n```should_panic\nlet _ = (u8::MAX - 2).strict_add_signed(3);\n```",
+ "docs": "Wrapping (modular) addition with an unsigned integer. Computes\n`self + rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(100i64.wrapping_add_unsigned(27), 127);\nassert_eq!(i64::MAX.wrapping_add_unsigned(2), i64::MIN + 1);\n```",
"id": 10761,
"inner": {
"function": {
@@ -61976,26 +60600,26 @@
[
"rhs",
{
- "primitive": "i8"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "strict_add_signed",
+ "name": "wrapping_add_unsigned",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -62005,10 +60629,10 @@
"10762": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -62018,7 +60642,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer subtraction. Computes `self - rhs`, returning\n`None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1u8.checked_sub(1), Some(0));\nassert_eq!(0u8.checked_sub(1), None);\n```",
+ "docs": "Wrapping (modular) subtraction with an unsigned integer. Computes\n`self - rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(0i64.wrapping_sub_unsigned(127), -127);\nassert_eq!((-2i64).wrapping_sub_unsigned(u64::MAX), -1);\n```",
"id": 10762,
"inner": {
"function": {
@@ -62044,41 +60668,26 @@
[
"rhs",
{
- "primitive": "u8"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u8"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "checked_sub",
+ "name": "wrapping_sub_unsigned",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -62088,23 +60697,20 @@
"10763": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer subtraction. Computes `self - rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1u8.strict_sub(1), 0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0u8.strict_sub(1);\n```",
+ "docs": "Wrapping (modular) division. Computes `self / rhs`, wrapping around at the\nboundary of the type.\n\nThe only case where such wrapping can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type. In such a case, this function returns `MIN` itself.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i64.wrapping_div(10), 10);\nassert_eq!((-128i8).wrapping_div(-1), -128);\n```",
"id": 10763,
"inner": {
"function": {
@@ -62130,26 +60736,26 @@
[
"rhs",
{
- "primitive": "u8"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "strict_sub",
+ "name": "wrapping_div",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -62159,10 +60765,10 @@
"10764": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -62172,7 +60778,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) subtraction. Computes `self - rhs`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(100u8.wrapping_sub(100), 0);\nassert_eq!(100u8.wrapping_sub(u8::MAX), 101);\n```",
+ "docs": "Wrapping Euclidean division. Computes `self.div_euclid(rhs)`,\nwrapping around at the boundary of the type.\n\nWrapping will only occur in `MIN / -1` on a signed type (where `MIN` is the negative minimal value\nfor the type). This is equivalent to `-MIN`, a positive value that is too large to represent in the\ntype. In this case, this method returns `MIN` itself.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i64.wrapping_div_euclid(10), 10);\nassert_eq!((-128i8).wrapping_div_euclid(-1), -128);\n```",
"id": 10764,
"inner": {
"function": {
@@ -62198,26 +60804,26 @@
[
"rhs",
{
- "primitive": "u8"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "wrapping_sub",
+ "name": "wrapping_div_euclid",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -62227,23 +60833,20 @@
"10765": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer subtraction. Computes `self - rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_sub(y)` is semantically equivalent to calling\n`x.`[`checked_sub`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_sub`].\n\nIf you find yourself writing code like this:\n\n```\n# let foo = 30_u32;\n# let bar = 20;\nif foo >= bar {\n // SAFETY: just checked it will not overflow\n let diff = unsafe { foo.unchecked_sub(bar) };\n // ... use diff ...\n}\n```\n\nConsider changing it to\n\n```\n# let foo = 30_u32;\n# let bar = 20;\nif let Some(diff) = foo.checked_sub(bar) {\n // ... use diff ...\n}\n```\n\nAs that does exactly the same thing -- including telling the optimizer\nthat the subtraction cannot overflow -- but avoids needing `unsafe`.\n\n# Safety\n\nThis results in undefined behavior when\n`self - rhs > u8::MAX` or `self - rhs < u8::MIN`,\ni.e. when [`checked_sub`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_sub`]: u8::checked_sub\n[`wrapping_sub`]: u8::wrapping_sub",
+ "docs": "Wrapping (modular) remainder. Computes `self % rhs`, wrapping around at the\nboundary of the type.\n\nSuch wrap-around never actually occurs mathematically; implementation artifacts make `x % y`\ninvalid for `MIN / -1` on a signed type (where `MIN` is the negative minimal value). In such a case,\nthis function returns `0`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i64.wrapping_rem(10), 0);\nassert_eq!((-128i8).wrapping_rem(-1), 0);\n```",
"id": 10765,
"inner": {
"function": {
@@ -62256,7 +60859,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -62269,29 +60872,26 @@
[
"rhs",
{
- "primitive": "u8"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i64"
}
}
}
},
- "links": {
- "u8::checked_sub": 10762,
- "u8::wrapping_sub": 10764
- },
- "name": "unchecked_sub",
+ "links": {},
+ "name": "wrapping_rem",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -62301,10 +60901,10 @@
"10766": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -62314,7 +60914,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked subtraction with a signed integer. Computes `self - rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1u8.checked_sub_signed(2), None);\nassert_eq!(1u8.checked_sub_signed(-2), Some(3));\nassert_eq!((u8::MAX - 2).checked_sub_signed(-4), None);\n```",
+ "docs": "Wrapping Euclidean remainder. Computes `self.rem_euclid(rhs)`, wrapping around\nat the boundary of the type.\n\nWrapping will only occur in `MIN % -1` on a signed type (where `MIN` is the negative minimal value\nfor the type). In this case, this method returns 0.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i64.wrapping_rem_euclid(10), 0);\nassert_eq!((-128i8).wrapping_rem_euclid(-1), 0);\n```",
"id": 10766,
"inner": {
"function": {
@@ -62340,41 +60940,26 @@
[
"rhs",
{
- "primitive": "i8"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u8"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "checked_sub_signed",
+ "name": "wrapping_rem_euclid",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -62384,23 +60969,20 @@
"10767": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict subtraction with a signed integer. Computes `self - rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(3u8.strict_sub_signed(2), 1);\n```\n\nThe following panic because of overflow:\n\n```should_panic\nlet _ = 1u8.strict_sub_signed(2);\n```\n\n```should_panic\nlet _ = (u8::MAX).strict_sub_signed(-1);\n```",
+ "docs": "Wrapping (modular) negation. Computes `-self`, wrapping around at the boundary\nof the type.\n\nThe only case where such wrapping can occur is when one negates `MIN` on a signed type (where `MIN`\nis the negative minimal value for the type); this is a positive value that is too large to represent\nin the type. In such a case, this function returns `MIN` itself.\n\n# Examples\n\n```\nassert_eq!(100i64.wrapping_neg(), -100);\nassert_eq!((-100i64).wrapping_neg(), 100);\nassert_eq!(i64::MIN.wrapping_neg(), i64::MIN);\n```",
"id": 10767,
"inner": {
"function": {
@@ -62422,30 +61004,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "strict_sub_signed",
+ "name": "wrapping_neg",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -62455,15 +61031,20 @@
"10768": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"unsigned_signed_diff\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"unsigned_signed_diff\"}}]"
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer subtraction. Computes `self - rhs` and checks if the result fits into an [`i8`], returning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(10u8.checked_signed_diff(2), Some(8));\nassert_eq!(2u8.checked_signed_diff(10), Some(-8));\nassert_eq!(u8::MAX.checked_signed_diff(i8::MAX as u8), None);\nassert_eq!((i8::MAX as u8).checked_signed_diff(u8::MAX), Some(i8::MIN));\nassert_eq!((i8::MAX as u8 + 1).checked_signed_diff(0), None);\nassert_eq!(u8::MAX.checked_signed_diff(u8::MAX), Some(0));\n```",
+ "docs": "Panic-free bitwise shift-left; yields `self << mask(rhs)`, where `mask` removes\nany high-order bits of `rhs` that would cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-left; the RHS of a wrapping shift-left is restricted to\nthe range of the type, rather than the bits shifted out of the LHS being returned to the other end.\nThe primitive integer types all implement a [`rotate_left`](Self::rotate_left) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!((-1i64).wrapping_shl(7), -128);\nassert_eq!((-1i64).wrapping_shl(128), -1);\n```",
"id": 10768,
"inner": {
"function": {
@@ -62489,43 +61070,28 @@
[
"rhs",
{
- "primitive": "u8"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i8"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i64"
}
}
}
},
"links": {
- "`i8`": 4812
+ "Self::rotate_left": 10697
},
- "name": "checked_signed_diff",
+ "name": "wrapping_shl",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -62535,10 +61101,10 @@
"10769": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
@@ -62548,7 +61114,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer multiplication. Computes `self * rhs`, returning\n`None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(5u8.checked_mul(1), Some(5));\nassert_eq!(u8::MAX.checked_mul(2), None);\n```",
+ "docs": "Panic-free bitwise shift-right; yields `self >> mask(rhs)`, where `mask`\nremoves any high-order bits of `rhs` that would cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-right; the RHS of a wrapping shift-right is restricted\nto the range of the type, rather than the bits shifted out of the LHS being returned to the other\nend. The primitive integer types all implement a [`rotate_right`](Self::rotate_right) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!((-128i64).wrapping_shr(7), -1);\nassert_eq!((-128i16).wrapping_shr(64), -128);\n```",
"id": 10769,
"inner": {
"function": {
@@ -62574,41 +61140,28 @@
[
"rhs",
{
- "primitive": "u8"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u8"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i64"
}
}
}
},
- "links": {},
- "name": "checked_mul",
+ "links": {
+ "Self::rotate_right": 10698
+ },
+ "name": "wrapping_shr",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -62735,23 +61288,20 @@
"10770": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer multiplication. Computes `self * rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(5u8.strict_mul(1), 5);\n```\n\nThe following panics because of overflow:\n\n``` should_panic\nlet _ = u8::MAX.strict_mul(2);\n```",
+ "docs": "Wrapping (modular) absolute value. Computes `self.abs()`, wrapping around at\nthe boundary of the type.\n\nThe only case where such wrapping can occur is when one takes the absolute value of the negative\nminimal value for the type; this is a positive value that is too large to represent in the type. In\nsuch a case, this function returns `MIN` itself.\n\n# Examples\n\n```\nassert_eq!(100i64.wrapping_abs(), 100);\nassert_eq!((-100i64).wrapping_abs(), 100);\nassert_eq!(i64::MIN.wrapping_abs(), i64::MIN);\nassert_eq!((-128i8).wrapping_abs() as u8, 128);\n```",
"id": 10770,
"inner": {
"function": {
@@ -62773,30 +61323,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "strict_mul",
+ "name": "wrapping_abs",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -62806,10 +61350,10 @@
"10771": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 51, patch: 0})}, feature: \"unsigned_abs\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 51, patch: 0})}, feature: \"unsigned_abs\"}}]"
},
{
"must_use": {
@@ -62819,7 +61363,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) multiplication. Computes `self *\nrhs`, wrapping around at the boundary of the type.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u8` is used.\n\n```\nassert_eq!(10u8.wrapping_mul(12), 120);\nassert_eq!(25u8.wrapping_mul(12), 44);\n```",
+ "docs": "Computes the absolute value of `self` without any wrapping\nor panicking.\n\n\n# Examples\n\n```\nassert_eq!(100i64.unsigned_abs(), 100u64);\nassert_eq!((-100i64).unsigned_abs(), 100u64);\nassert_eq!((-128i8).unsigned_abs(), 128u8);\n```",
"id": 10771,
"inner": {
"function": {
@@ -62841,30 +61385,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "wrapping_mul",
+ "name": "unsigned_abs",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -62874,23 +61412,20 @@
"10772": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer multiplication. Computes `self * rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_mul(y)` is semantically equivalent to calling\n`x.`[`checked_mul`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_mul`].\n\n# Safety\n\nThis results in undefined behavior when\n`self * rhs > u8::MAX` or `self * rhs < u8::MIN`,\ni.e. when [`checked_mul`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_mul`]: u8::checked_mul\n[`wrapping_mul`]: u8::wrapping_mul",
+ "docs": "Wrapping (modular) exponentiation. Computes `self.pow(exp)`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(3i64.wrapping_pow(4), 81);\nassert_eq!(3i8.wrapping_pow(5), -13);\nassert_eq!(3i8.wrapping_pow(6), -39);\n```",
"id": 10772,
"inner": {
"function": {
@@ -62903,7 +61438,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -62914,31 +61449,28 @@
}
],
[
- "rhs",
+ "exp",
{
- "primitive": "u8"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i64"
}
}
}
},
- "links": {
- "u8::checked_mul": 10769,
- "u8::wrapping_mul": 10771
- },
- "name": "unchecked_mul",
+ "links": {},
+ "name": "wrapping_pow",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -62948,10 +61480,10 @@
"10773": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -62961,7 +61493,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division. Computes `self / rhs`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(128u8.checked_div(2), Some(64));\nassert_eq!(1u8.checked_div(0), None);\n```",
+ "docs": "Calculates `self` + `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would have\noccurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5i64.overflowing_add(2), (7, false));\nassert_eq!(i64::MAX.overflowing_add(1), (i64::MIN, true));\n```",
"id": 10773,
"inner": {
"function": {
@@ -62987,41 +61519,33 @@
[
"rhs",
{
- "primitive": "u8"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u8"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i64"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_div",
+ "name": "overflowing_add",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -63031,23 +61555,20 @@
"10774": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_bigint_helpers\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer division. Computes `self / rhs`.\n\nStrict division on unsigned types is just normal division. There's no\nway overflow could ever happen. This function exists so that all\noperations are accounted for in the strict operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u8.strict_div(10), 10);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1u8).strict_div(0);\n```",
+ "docs": "Calculates `self` + `rhs` + `carry` and returns a tuple containing\nthe sum and the output carry (in that order).\n\nPerforms \"ternary addition\" of two integer operands and a carry-in\nbit, and returns an output integer and a carry-out bit. This allows\nchaining together multiple additions to create a wider addition, and\ncan be useful for bignum addition.\n\nThis can be thought of as a 64-bit \"full adder\", in the electronics sense.\n\nIf the input carry is false, this method is equivalent to\n[`overflowing_add`](Self::overflowing_add), and the output carry is\nequal to the overflow flag. Note that although carry and overflow\nflags are similar for unsigned integers, they are different for\nsigned integers.\n\n# Examples\n\n```\n// 3 MAX (a = 3 × 2^64 + 2^64 - 1)\n// + 5 7 (b = 5 × 2^64 + 7)\n// ---------\n// 9 6 (sum = 9 × 2^64 + 6)\n\nlet (a1, a0): (u64, u64) = (3, u64::MAX);\nlet (b1, b0): (u64, u64) = (5, 7);\nlet carry0 = false;\n\nlet (sum0, carry1) = a0.carrying_add(b0, carry0);\nassert_eq!(carry1, true);\nlet (sum1, carry2) = a1.carrying_add(b1, carry1);\nassert_eq!(carry2, false);\n\nassert_eq!((sum1, sum0), (9, 6));\n```",
"id": 10774,
"inner": {
"function": {
@@ -63073,26 +61594,41 @@
[
"rhs",
{
- "primitive": "u8"
+ "primitive": "u64"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "bool"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "tuple": [
+ {
+ "primitive": "u64"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "strict_div",
+ "links": {
+ "Self::overflowing_add": 11502
+ },
+ "name": "carrying_add",
"span": {
"begin": [
- 447,
+ 1160,
5
],
"end": [
- 465,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -63102,10 +61638,7 @@
"10775": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
},
{
"must_use": {
@@ -63115,7 +61648,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked Euclidean division. Computes `self.div_euclid(rhs)`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(128u8.checked_div_euclid(2), Some(64));\nassert_eq!(1u8.checked_div_euclid(0), None);\n```",
+ "docs": "Calculates `self` + `rhs` + `carry` and checks for overflow.\n\nPerforms \"ternary addition\" of two integer operands and a carry-in\nbit, and returns a tuple of the sum along with a boolean indicating\nwhether an arithmetic overflow would occur. On overflow, the wrapped\nvalue is returned.\n\nThis allows chaining together multiple additions to create a wider\naddition, and can be useful for bignum addition. This method should\nonly be used for the most significant word; for the less significant\nwords the unsigned method\n[`u64::carrying_add`]\nshould be used.\n\nThe output boolean returned by this method is *not* a carry flag,\nand should *not* be added to a more significant word.\n\nIf the input carry is false, this method is equivalent to\n[`overflowing_add`](Self::overflowing_add).\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n// Only the most significant word is signed.\n//\n// 10 MAX (a = 10 × 2^64 + 2^64 - 1)\n// + -5 9 (b = -5 × 2^64 + 9)\n// ---------\n// 6 8 (sum = 6 × 2^64 + 8)\n\nlet (a1, a0): (i64, u64) = (10, u64::MAX);\nlet (b1, b0): (i64, u64) = (-5, 9);\nlet carry0 = false;\n\n// u64::carrying_add for the less significant words\nlet (sum0, carry1) = a0.carrying_add(b0, carry0);\nassert_eq!(carry1, true);\n\n// i64::carrying_add for the most significant word\nlet (sum1, overflow) = a1.carrying_add(b1, carry1);\nassert_eq!(overflow, false);\n\nassert_eq!((sum1, sum0), (6, 8));\n```",
"id": 10775,
"inner": {
"function": {
@@ -63141,41 +61674,42 @@
[
"rhs",
{
- "primitive": "u8"
+ "primitive": "i64"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "bool"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u8"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i64"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "checked_div_euclid",
+ "links": {
+ "Self::overflowing_add": 10773,
+ "`u64::carrying_add`": 10774
+ },
+ "name": "carrying_add",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -63185,23 +61719,20 @@
"10776": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict Euclidean division. Computes `self.div_euclid(rhs)`.\n\nStrict division on unsigned types is just normal division. There's no\nway overflow could ever happen. This function exists so that all\noperations are accounted for in the strict operations. Since, for the\npositive integers, all common definitions of division are equal, this\nis exactly equal to `self.strict_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u8.strict_div_euclid(10), 10);\n```\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1u8).strict_div_euclid(0);\n```",
+ "docs": "Calculates `self` + `rhs` with an unsigned `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1i64.overflowing_add_unsigned(2), (3, false));\nassert_eq!((i64::MIN).overflowing_add_unsigned(u64::MAX), (i64::MAX, false));\nassert_eq!((i64::MAX - 2).overflowing_add_unsigned(3), (i64::MIN, true));\n```",
"id": 10776,
"inner": {
"function": {
@@ -63227,26 +61758,33 @@
[
"rhs",
{
- "primitive": "u8"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "tuple": [
+ {
+ "primitive": "i64"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "strict_div_euclid",
+ "name": "overflowing_add_unsigned",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -63256,7 +61794,10 @@
"10777": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -63266,7 +61807,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division without remainder. Computes `self / rhs`,\nreturning `None` if `rhs == 0` or if `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64u8.checked_exact_div(2), Some(32));\nassert_eq!(64u8.checked_exact_div(32), Some(2));\nassert_eq!(64u8.checked_exact_div(0), None);\nassert_eq!(65u8.checked_exact_div(2), None);\n```",
+ "docs": "Calculates `self` - `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating whether an arithmetic overflow\nwould occur. If an overflow would have occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5i64.overflowing_sub(2), (3, false));\nassert_eq!(i64::MIN.overflowing_sub(1), (i64::MAX, true));\n```",
"id": 10777,
"inner": {
"function": {
@@ -63292,41 +61833,33 @@
[
"rhs",
{
- "primitive": "u8"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u8"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i64"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_exact_div",
+ "name": "overflowing_sub",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -63336,7 +61869,10 @@
"10778": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_bigint_helpers\"}}]"
},
{
"must_use": {
@@ -63346,7 +61882,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division without remainder. Computes `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs == 0` or `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64u8.exact_div(2), 32);\nassert_eq!(64u8.exact_div(32), 2);\n```\n\n```should_panic\n#![feature(exact_div)]\nlet _ = 65u8.exact_div(2);\n```",
+ "docs": "Calculates `self` − `rhs` − `borrow` and returns a tuple\ncontaining the difference and the output borrow.\n\nPerforms \"ternary subtraction\" by subtracting both an integer\noperand and a borrow-in bit from `self`, and returns an output\ninteger and a borrow-out bit. This allows chaining together multiple\nsubtractions to create a wider subtraction, and can be useful for\nbignum subtraction.\n\n# Examples\n\n```\n// 9 6 (a = 9 × 2^64 + 6)\n// - 5 7 (b = 5 × 2^64 + 7)\n// ---------\n// 3 MAX (diff = 3 × 2^64 + 2^64 - 1)\n\nlet (a1, a0): (u64, u64) = (9, 6);\nlet (b1, b0): (u64, u64) = (5, 7);\nlet borrow0 = false;\n\nlet (diff0, borrow1) = a0.borrowing_sub(b0, borrow0);\nassert_eq!(borrow1, true);\nlet (diff1, borrow2) = a1.borrowing_sub(b1, borrow1);\nassert_eq!(borrow2, false);\n\nassert_eq!((diff1, diff0), (3, u64::MAX));\n```",
"id": 10778,
"inner": {
"function": {
@@ -63372,26 +61908,39 @@
[
"rhs",
{
- "primitive": "u8"
+ "primitive": "u64"
+ }
+ ],
+ [
+ "borrow",
+ {
+ "primitive": "bool"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "tuple": [
+ {
+ "primitive": "u64"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "exact_div",
+ "name": "borrowing_sub",
"span": {
"begin": [
- 447,
+ 1160,
5
],
"end": [
- 465,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -63401,7 +61950,7 @@
"10779": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
},
{
"must_use": {
@@ -63411,7 +61960,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer division without remainder. Computes `self / rhs`.\n\n# Safety\n\nThis results in undefined behavior when `rhs == 0` or `self % rhs != 0`,\ni.e. when [`checked_exact_div`](Self::checked_exact_div) would return `None`.",
+ "docs": "Calculates `self` − `rhs` − `borrow` and checks for\noverflow.\n\nPerforms \"ternary subtraction\" by subtracting both an integer\noperand and a borrow-in bit from `self`, and returns a tuple of the\ndifference along with a boolean indicating whether an arithmetic\noverflow would occur. On overflow, the wrapped value is returned.\n\nThis allows chaining together multiple subtractions to create a\nwider subtraction, and can be useful for bignum subtraction. This\nmethod should only be used for the most significant word; for the\nless significant words the unsigned method\n[`u64::borrowing_sub`]\nshould be used.\n\nThe output boolean returned by this method is *not* a borrow flag,\nand should *not* be subtracted from a more significant word.\n\nIf the input borrow is false, this method is equivalent to\n[`overflowing_sub`](Self::overflowing_sub).\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n// Only the most significant word is signed.\n//\n// 6 8 (a = 6 × 2^64 + 8)\n// - -5 9 (b = -5 × 2^64 + 9)\n// ---------\n// 10 MAX (diff = 10 × 2^64 + 2^64 - 1)\n\nlet (a1, a0): (i64, u64) = (6, 8);\nlet (b1, b0): (i64, u64) = (-5, 9);\nlet borrow0 = false;\n\n// u64::borrowing_sub for the less significant words\nlet (diff0, borrow1) = a0.borrowing_sub(b0, borrow0);\nassert_eq!(borrow1, true);\n\n// i64::borrowing_sub for the most significant word\nlet (diff1, overflow) = a1.borrowing_sub(b1, borrow1);\nassert_eq!(overflow, false);\n\nassert_eq!((diff1, diff0), (10, u64::MAX));\n```",
"id": 10779,
"inner": {
"function": {
@@ -63424,7 +61973,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -63437,28 +61986,42 @@
[
"rhs",
{
- "primitive": "u8"
+ "primitive": "i64"
+ }
+ ],
+ [
+ "borrow",
+ {
+ "primitive": "bool"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "tuple": [
+ {
+ "primitive": "i64"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {
- "Self::checked_exact_div": 10777
+ "Self::overflowing_sub": 10777,
+ "`u64::borrowing_sub`": 10778
},
- "name": "unchecked_exact_div",
+ "name": "borrowing_sub",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -63529,7 +62092,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -63542,10 +62105,10 @@
"10780": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -63555,7 +62118,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer remainder. Computes `self % rhs`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(5u8.checked_rem(2), Some(1));\nassert_eq!(5u8.checked_rem(0), None);\n```",
+ "docs": "Calculates `self` - `rhs` with an unsigned `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1i64.overflowing_sub_unsigned(2), (-1, false));\nassert_eq!((i64::MAX).overflowing_sub_unsigned(u64::MAX), (i64::MIN, false));\nassert_eq!((i64::MIN + 2).overflowing_sub_unsigned(3), (i64::MAX, true));\n```",
"id": 10780,
"inner": {
"function": {
@@ -63581,41 +62144,33 @@
[
"rhs",
{
- "primitive": "u8"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u8"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i64"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_rem",
+ "name": "overflowing_sub_unsigned",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -63625,23 +62180,20 @@
"10781": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer remainder. Computes `self % rhs`.\n\nStrict remainder calculation on unsigned types is just the regular\nremainder calculation. There's no way overflow could ever happen.\nThis function exists so that all operations are accounted for in the\nstrict operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u8.strict_rem(10), 0);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5u8.strict_rem(0);\n```",
+ "docs": "Calculates the multiplication of `self` and `rhs`.\n\nReturns a tuple of the multiplication along with a boolean indicating whether an arithmetic overflow\nwould occur. If an overflow would have occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5i64.overflowing_mul(2), (10, false));\nassert_eq!(1_000_000_000i32.overflowing_mul(10), (1410065408, true));\n```",
"id": 10781,
"inner": {
"function": {
@@ -63667,26 +62219,33 @@
[
"rhs",
{
- "primitive": "u8"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "tuple": [
+ {
+ "primitive": "i64"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "strict_rem",
+ "name": "overflowing_mul",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -63696,10 +62255,10 @@
"10782": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
},
{
"must_use": {
@@ -63709,7 +62268,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked Euclidean modulo. Computes `self.rem_euclid(rhs)`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(5u8.checked_rem_euclid(2), Some(1));\nassert_eq!(5u8.checked_rem_euclid(0), None);\n```",
+ "docs": "Calculates the \"full multiplication\" `self * rhs + carry`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need the `carry`, then you can use [`Self::widening_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.carrying_mul(-2, 0), (4294967286, -1));\nassert_eq!(5i32.carrying_mul(-2, 10), (0, 0));\nassert_eq!(1_000_000_000i32.carrying_mul(-10, 0), (2884901888, -3));\nassert_eq!(1_000_000_000i32.carrying_mul(-10, 10), (2884901898, -3));\nassert_eq!(i64::MAX.carrying_mul(i64::MAX, i64::MAX), (i64::MAX.unsigned_abs() + 1, i64::MAX / 2));\n```",
"id": 10782,
"inner": {
"function": {
@@ -63735,41 +62294,41 @@
[
"rhs",
{
- "primitive": "u8"
+ "primitive": "i64"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u8"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "u64"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "i64"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "checked_rem_euclid",
+ "links": {
+ "`Self::widening_mul`": 10783
+ },
+ "name": "carrying_mul",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -63779,23 +62338,20 @@
"10783": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict Euclidean modulo. Computes `self.rem_euclid(rhs)`.\n\nStrict modulo calculation on unsigned types is just the regular\nremainder calculation. There's no way overflow could ever happen.\nThis function exists so that all operations are accounted for in the\nstrict operations. Since, for the positive integers, all common\ndefinitions of division are equal, this is exactly equal to\n`self.strict_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u8.strict_rem_euclid(10), 0);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5u8.strict_rem_euclid(0);\n```",
+ "docs": "Calculates the complete product `self * rhs` without the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nIf you also need to add a carry to the wide result, then you want\n[`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.widening_mul(-2), (4294967286, -1));\nassert_eq!(1_000_000_000i32.widening_mul(-10), (2884901888, -3));\n```",
"id": 10783,
"inner": {
"function": {
@@ -63821,26 +62377,35 @@
[
"rhs",
{
- "primitive": "u8"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "tuple": [
+ {
+ "primitive": "u64"
+ },
+ {
+ "primitive": "i64"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "strict_rem_euclid",
+ "links": {
+ "`Self::carrying_mul`": 10782
+ },
+ "name": "widening_mul",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -63850,15 +62415,20 @@
"10784": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 135758, is_soft: false}, feature: \"disjoint_bitor\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 135758, is_soft: false}, feature: \"disjoint_bitor\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Same value as `self | other`, but UB if any bit position is set in both inputs.\n\nThis is a situational micro-optimization for places where you'd rather\nuse addition on some platforms and bitwise or on other platforms, based\non exactly which instructions combine better with whatever else you're\ndoing. Note that there's no reason to bother using this for places\nwhere it's clear from the operations involved that they can't overlap.\nFor example, if you're combining `u16`s into a `u32` with\n`((a as u32) << 16) | (b as u32)`, that's fine, as the backend will\nknow those sides of the `|` are disjoint without needing help.\n\n# Examples\n\n```\n#![feature(disjoint_bitor)]\n\n// SAFETY: `1` and `4` have no bits in common.\nunsafe {\n assert_eq!(1_u8.unchecked_disjoint_bitor(4), 5);\n}\n```\n\n# Safety\n\nRequires that `(self & other) == 0`, otherwise it's immediate UB.\n\nEquivalently, requires that `(self | other) == (self + other)`.",
+ "docs": "Calculates the \"full multiplication\" `self * rhs + carry1 + carry2`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need either `carry`, then you can use [`Self::widening_mul`] instead,\nand if you only need one `carry`, then you can use [`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.carrying_mul_add(-2, 0, 0), (4294967286, -1));\nassert_eq!(5i32.carrying_mul_add(-2, 10, 10), (10, 0));\nassert_eq!(1_000_000_000i32.carrying_mul_add(-10, 0, 0), (2884901888, -3));\nassert_eq!(1_000_000_000i32.carrying_mul_add(-10, 10, 10), (2884901908, -3));\nassert_eq!(i64::MAX.carrying_mul_add(i64::MAX, i64::MAX, i64::MAX), (u64::MAX, i64::MAX / 2));\n```",
"id": 10784,
"inner": {
"function": {
@@ -63871,7 +62441,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -63882,28 +62452,50 @@
}
],
[
- "other",
+ "rhs",
{
- "primitive": "u8"
+ "primitive": "i64"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "i64"
+ }
+ ],
+ [
+ "add",
+ {
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "tuple": [
+ {
+ "primitive": "u64"
+ },
+ {
+ "primitive": "i64"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "unchecked_disjoint_bitor",
+ "links": {
+ "`Self::carrying_mul`": 10782,
+ "`Self::widening_mul`": 10783
+ },
+ "name": "carrying_mul_add",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -63913,23 +62505,20 @@
"10785": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nThis method might not be optimized owing to implementation details;\n`ilog2` can produce results more efficiently for base 2, and `ilog10`\ncan produce results more efficiently for base 10.\n\n# Panics\n\nThis function will panic if `self` is zero, or if `base` is less than 2.\n\n# Examples\n\n```\nassert_eq!(5u8.ilog(5), 1);\n```",
+ "docs": "Calculates the divisor when `self` is divided by `rhs`.\n\nReturns a tuple of the divisor along with a boolean indicating whether an arithmetic overflow would\noccur. If an overflow would occur then self is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i64.overflowing_div(2), (2, false));\nassert_eq!(i64::MIN.overflowing_div(-1), (i64::MIN, true));\n```",
"id": 10785,
"inner": {
"function": {
@@ -63953,28 +62542,35 @@
}
],
[
- "base",
+ "rhs",
{
- "primitive": "u8"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "tuple": [
+ {
+ "primitive": "i64"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "ilog",
+ "name": "overflowing_div",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -63984,23 +62580,20 @@
"10786": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 10 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is zero.\n\n# Example\n\n```\nassert_eq!(10u8.ilog10(), 1);\n```",
+ "docs": "Calculates the quotient of Euclidean division `self.div_euclid(rhs)`.\n\nReturns a tuple of the divisor along with a boolean indicating whether an arithmetic overflow would\noccur. If an overflow would occur then `self` is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i64.overflowing_div_euclid(2), (2, false));\nassert_eq!(i64::MIN.overflowing_div_euclid(-1), (i64::MIN, true));\n```",
"id": 10786,
"inner": {
"function": {
@@ -64022,24 +62615,37 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i64"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "tuple": [
+ {
+ "primitive": "i64"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "ilog10",
+ "name": "overflowing_div_euclid",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -64049,10 +62655,10 @@
"10787": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -64062,7 +62668,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nReturns `None` if the number is zero, or if the base is not at least 2.\n\nThis method might not be optimized owing to implementation details;\n`checked_ilog2` can produce results more efficiently for base 2, and\n`checked_ilog10` can produce results more efficiently for base 10.\n\n# Examples\n\n```\nassert_eq!(5u8.checked_ilog(5), Some(1));\n```",
+ "docs": "Calculates the remainder when `self` is divided by `rhs`.\n\nReturns a tuple of the remainder after dividing along with a boolean indicating whether an\narithmetic overflow would occur. If an overflow would occur then 0 is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i64.overflowing_rem(2), (1, false));\nassert_eq!(i64::MIN.overflowing_rem(-1), (0, true));\n```",
"id": 10787,
"inner": {
"function": {
@@ -64086,43 +62692,35 @@
}
],
[
- "base",
+ "rhs",
{
- "primitive": "u8"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i64"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_ilog",
+ "name": "overflowing_rem",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -64132,20 +62730,23 @@
"10788": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 2 logarithm of the number, rounded down.\n\nReturns `None` if the number is zero.\n\n# Examples\n\n```\nassert_eq!(2u8.checked_ilog2(), Some(1));\n```",
+ "docs": "Overflowing Euclidean remainder. Calculates `self.rem_euclid(rhs)`.\n\nReturns a tuple of the remainder after dividing along with a boolean indicating whether an\narithmetic overflow would occur. If an overflow would occur then 0 is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i64.overflowing_rem_euclid(2), (1, false));\nassert_eq!(i64::MIN.overflowing_rem_euclid(-1), (0, true));\n```",
"id": 10788,
"inner": {
"function": {
@@ -64167,39 +62768,37 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i64"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i64"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_ilog2",
+ "name": "overflowing_rem_euclid",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -64209,10 +62808,10 @@
"10789": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -64222,7 +62821,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 10 logarithm of the number, rounded down.\n\nReturns `None` if the number is zero.\n\n# Examples\n\n```\nassert_eq!(10u8.checked_ilog10(), Some(1));\n```",
+ "docs": "Negates self, overflowing if this is equal to the minimum value.\n\nReturns a tuple of the negated version of self along with a boolean indicating whether an overflow\nhappened. If `self` is the minimum value (e.g., `i32::MIN` for values of type `i32`), then the\nminimum value will be returned again and `true` will be returned for an overflow happening.\n\n# Examples\n\n```\nassert_eq!(2i64.overflowing_neg(), (-2, false));\nassert_eq!(i64::MIN.overflowing_neg(), (i64::MIN, true));\n```",
"id": 10789,
"inner": {
"function": {
@@ -64248,35 +62847,27 @@
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i64"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_ilog10",
+ "name": "overflowing_neg",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -64403,7 +62994,7 @@
"10790": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
@@ -64416,7 +63007,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked negation. Computes `-self`, returning `None` unless `self ==\n0`.\n\nNote that negating any positive integer will overflow.\n\n# Examples\n\n```\nassert_eq!(0u8.checked_neg(), Some(0));\nassert_eq!(1u8.checked_neg(), None);\n```",
+ "docs": "Shifts self left by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean indicating whether the shift\nvalue was larger than or equal to the number of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then used to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x1i64.overflowing_shl(4), (0x10, false));\nassert_eq!(0x1i32.overflowing_shl(36), (0x10, true));\nassert_eq!(0x10i64.overflowing_shl(63), (0, false));\n```",
"id": 10790,
"inner": {
"function": {
@@ -64438,39 +63029,37 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u8"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i64"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_neg",
+ "name": "overflowing_shl",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -64480,23 +63069,20 @@
"10791": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict negation. Computes `-self`, panicking unless `self ==\n0`.\n\nNote that negating any positive integer will overflow.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0u8.strict_neg(), 0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 1u8.strict_neg();\n",
+ "docs": "Shifts self right by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean indicating whether the shift\nvalue was larger than or equal to the number of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then used to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x10i64.overflowing_shr(4), (0x1, false));\nassert_eq!(0x10i32.overflowing_shr(36), (0x1, true));\n```",
"id": 10791,
"inner": {
"function": {
@@ -64518,24 +63104,37 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "tuple": [
+ {
+ "primitive": "i64"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "strict_neg",
+ "name": "overflowing_shr",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -64545,10 +63144,10 @@
"10792": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
},
{
"must_use": {
@@ -64558,7 +63157,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked shift left. Computes `self << rhs`, returning `None`\nif `rhs` is larger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x1u8.checked_shl(4), Some(0x10));\nassert_eq!(0x10u8.checked_shl(129), None);\nassert_eq!(0x10u8.checked_shl(7), Some(0));\n```",
+ "docs": "Computes the absolute value of `self`.\n\nReturns a tuple of the absolute version of self along with a boolean indicating whether an overflow\nhappened. If self is the minimum value\n(e.g., i64::MIN for values of type i64),\nthen the minimum value will be returned again and true will be returned\nfor an overflow happening.\n\n# Examples\n\n```\nassert_eq!(10i64.overflowing_abs(), (10, false));\nassert_eq!((-10i64).overflowing_abs(), (10, false));\nassert_eq!((i64::MIN).overflowing_abs(), (i64::MIN, true));\n```",
"id": 10792,
"inner": {
"function": {
@@ -64580,45 +63179,31 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u8"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i64"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_shl",
+ "name": "overflowing_abs",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -64628,23 +63213,20 @@
"10793": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict shift left. Computes `self << rhs`, panicking if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x1u8.strict_shl(4), 0x10);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10u8.strict_shl(129);\n```",
+ "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\nReturns a tuple of the exponentiation along with a bool indicating\nwhether an overflow happened.\n\n# Examples\n\n```\nassert_eq!(3i64.overflowing_pow(4), (81, false));\nassert_eq!(3i8.overflowing_pow(5), (-13, true));\n```",
"id": 10793,
"inner": {
"function": {
@@ -64668,7 +63250,7 @@
}
],
[
- "rhs",
+ "exp",
{
"primitive": "u32"
}
@@ -64676,20 +63258,27 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "tuple": [
+ {
+ "primitive": "i64"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "strict_shl",
+ "name": "overflowing_pow",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -64699,20 +63288,20 @@
"10794": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked shift left. Computes `self << rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shl`] would return `None`.\n\n[`checked_shl`]: u8::checked_shl",
+ "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\n# Examples\n\n```\nlet x: i64 = 2; // or any other integer type\n\nassert_eq!(x.pow(5), 32);\n```",
"id": 10794,
"inner": {
"function": {
@@ -64725,7 +63314,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -64736,7 +63325,7 @@
}
],
[
- "rhs",
+ "exp",
{
"primitive": "u32"
}
@@ -64744,22 +63333,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i64"
}
}
}
},
- "links": {
- "u8::checked_shl": 10792
- },
- "name": "unchecked_shl",
+ "links": {},
+ "name": "pow",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -64769,20 +63356,23 @@
"10795": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x1u8.unbounded_shl(4), 0x10);\nassert_eq!(0x1u8.unbounded_shl(129), 0);\n```",
+ "docs": "Returns the square root of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is negative.\n\n# Examples\n\n```\nassert_eq!(10i64.isqrt(), 3);\n```",
"id": 10795,
"inner": {
"function": {
@@ -64804,30 +63394,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "unbounded_shl",
+ "name": "isqrt",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -64837,20 +63421,23 @@
"10796": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked shift right. Computes `self >> rhs`, returning `None`\nif `rhs` is larger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x10u8.checked_shr(4), Some(0x1));\nassert_eq!(0x10u8.checked_shr(129), None);\n```",
+ "docs": "Calculates the quotient of Euclidean division of `self` by `rhs`.\n\nThis computes the integer `q` such that `self = q * rhs + r`, with\n`r = self.rem_euclid(rhs)` and `0 <= r < abs(rhs)`.\n\nIn other words, the result is `self / rhs` rounded to the integer `q`\nsuch that `self >= q * rhs`.\nIf `self > 0`, this is equal to rounding towards zero (the default in Rust);\nif `self < 0`, this is equal to rounding away from zero (towards +/- infinity).\nIf `rhs > 0`, this is equal to rounding towards -infinity;\nif `rhs < 0`, this is equal to rounding towards +infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\nlet a: i64 = 7; // or any other integer type\nlet b = 4;\n\nassert_eq!(a.div_euclid(b), 1); // 7 >= 4 * 1\nassert_eq!(a.div_euclid(-b), -1); // 7 >= -4 * -1\nassert_eq!((-a).div_euclid(b), -2); // -7 >= 4 * -2\nassert_eq!((-a).div_euclid(-b), 2); // -7 >= -4 * 2\n```",
"id": 10796,
"inner": {
"function": {
@@ -64876,41 +63463,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u8"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "checked_shr",
+ "name": "div_euclid",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -64920,10 +63492,13 @@
"10797": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[doc(alias = \"modulo\", alias = \"mod\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -64936,7 +63511,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict shift right. Computes `self >> rhs`, panicking `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x10u8.strict_shr(4), 0x1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10u8.strict_shr(129);\n```",
+ "docs": "Calculates the least nonnegative remainder of `self (mod rhs)`.\n\nThis is done as if by the Euclidean division algorithm -- given\n`r = self.rem_euclid(rhs)`, the result satisfies\n`self = rhs * self.div_euclid(rhs) + r` and `0 <= r < abs(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN` and\n`rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\nlet a: i64 = 7; // or any other integer type\nlet b = 4;\n\nassert_eq!(a.rem_euclid(b), 3);\nassert_eq!((-a).rem_euclid(b), 1);\nassert_eq!(a.rem_euclid(-b), 3);\nassert_eq!((-a).rem_euclid(-b), 1);\n```\n\nThis will panic:\n```should_panic\nlet _ = i64::MIN.rem_euclid(-1);\n```",
"id": 10797,
"inner": {
"function": {
@@ -64962,26 +63537,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "strict_shr",
+ "name": "rem_euclid",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -64991,7 +63566,7 @@
"10798": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
},
{
"must_use": {
@@ -65004,7 +63579,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked shift right. Computes `self >> rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shr`] would return `None`.\n\n[`checked_shr`]: u8::checked_shr",
+ "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards negative infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nlet a: i64 = 8;\nlet b = 3;\n\nassert_eq!(a.div_floor(b), 2);\nassert_eq!(a.div_floor(-b), -3);\nassert_eq!((-a).div_floor(b), -3);\nassert_eq!((-a).div_floor(-b), 2);\n```",
"id": 10798,
"inner": {
"function": {
@@ -65017,7 +63592,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -65030,28 +63605,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i64"
}
}
}
},
- "links": {
- "u8::checked_shr": 10796
- },
- "name": "unchecked_shr",
+ "links": {},
+ "name": "div_floor",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -65061,20 +63634,20 @@
"10799": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x10u8.unbounded_shr(4), 0x1);\nassert_eq!(0x10u8.unbounded_shr(129), 0);\n```",
+ "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards positive infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nlet a: i64 = 8;\nlet b = 3;\n\nassert_eq!(a.div_ceil(b), 3);\nassert_eq!(a.div_ceil(-b), -2);\nassert_eq!((-a).div_ceil(b), -2);\nassert_eq!((-a).div_ceil(-b), 3);\n```",
"id": 10799,
"inner": {
"function": {
@@ -65100,26 +63673,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "unbounded_shr",
+ "name": "div_ceil",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -65227,7 +63800,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -65238,7 +63811,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -65259,7 +63832,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -65270,7 +63843,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -65291,7 +63864,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -65304,10 +63877,7 @@
"10800": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
},
{
"must_use": {
@@ -65317,7 +63887,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked exponentiation. Computes `self.pow(exp)`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(2u8.checked_pow(5), Some(32));\nassert_eq!(u8::MAX.checked_pow(2), None);\n```",
+ "docs": "If `rhs` is positive, calculates the smallest value greater than or\nequal to `self` that is a multiple of `rhs`. If `rhs` is negative,\ncalculates the largest value less than or equal to `self` that is a\nmultiple of `rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nOn overflow, this function will panic if overflow checks are enabled (default in debug\nmode) and wrap if overflow checks are disabled (default in release mode).\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(16_i64.next_multiple_of(8), 16);\nassert_eq!(23_i64.next_multiple_of(8), 24);\nassert_eq!(16_i64.next_multiple_of(-8), 16);\nassert_eq!(23_i64.next_multiple_of(-8), 16);\nassert_eq!((-16_i64).next_multiple_of(8), -16);\nassert_eq!((-23_i64).next_multiple_of(8), -16);\nassert_eq!((-16_i64).next_multiple_of(-8), -16);\nassert_eq!((-23_i64).next_multiple_of(-8), -24);\n```",
"id": 10800,
"inner": {
"function": {
@@ -65341,43 +63911,28 @@
}
],
[
- "exp",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u8"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "checked_pow",
+ "name": "next_multiple_of",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -65387,23 +63942,17 @@
"10801": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict exponentiation. Computes `self.pow(exp)`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(2u8.strict_pow(5), 32);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = u8::MAX.strict_pow(2);\n```",
+ "docs": "If `rhs` is positive, calculates the smallest value greater than or\nequal to `self` that is a multiple of `rhs`. If `rhs` is negative,\ncalculates the largest value less than or equal to `self` that is a\nmultiple of `rhs`. Returns `None` if `rhs` is zero or the operation\nwould result in overflow.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(16_i64.checked_next_multiple_of(8), Some(16));\nassert_eq!(23_i64.checked_next_multiple_of(8), Some(24));\nassert_eq!(16_i64.checked_next_multiple_of(-8), Some(16));\nassert_eq!(23_i64.checked_next_multiple_of(-8), Some(16));\nassert_eq!((-16_i64).checked_next_multiple_of(8), Some(-16));\nassert_eq!((-23_i64).checked_next_multiple_of(8), Some(-16));\nassert_eq!((-16_i64).checked_next_multiple_of(-8), Some(-16));\nassert_eq!((-23_i64).checked_next_multiple_of(-8), Some(-24));\nassert_eq!(1_i64.checked_next_multiple_of(0), None);\nassert_eq!(i64::MAX.checked_next_multiple_of(2), None);\n```",
"id": 10801,
"inner": {
"function": {
@@ -65427,28 +63976,43 @@
}
],
[
- "exp",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i64"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "strict_pow",
+ "name": "checked_next_multiple_of",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -65458,20 +64022,23 @@
"10802": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer addition. Computes `self + rhs`, saturating at\nthe numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100u8.saturating_add(1), 101);\nassert_eq!(u8::MAX.saturating_add(127), u8::MAX);\n```",
+ "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nThis method might not be optimized owing to implementation details;\n`ilog2` can produce results more efficiently for base 2, and `ilog10`\ncan produce results more efficiently for base 10.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero,\nor if `base` is less than 2.\n\n# Examples\n\n```\nassert_eq!(5i64.ilog(5), 1);\n```",
"id": 10802,
"inner": {
"function": {
@@ -65495,28 +64062,28 @@
}
],
[
- "rhs",
+ "base",
{
- "primitive": "u8"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "saturating_add",
+ "name": "ilog",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -65526,20 +64093,23 @@
"10803": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating addition with a signed integer. Computes `self + rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1u8.saturating_add_signed(2), 3);\nassert_eq!(1u8.saturating_add_signed(-2), 0);\nassert_eq!((u8::MAX - 2).saturating_add_signed(4), u8::MAX);\n```",
+ "docs": "Returns the base 10 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero.\n\n# Example\n\n```\nassert_eq!(10i64.ilog10(), 1);\n```",
"id": 10803,
"inner": {
"function": {
@@ -65561,30 +64131,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "saturating_add_signed",
+ "name": "ilog10",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -65594,10 +64158,10 @@
"10804": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
@@ -65607,7 +64171,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer subtraction. Computes `self - rhs`, saturating\nat the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100u8.saturating_sub(27), 73);\nassert_eq!(13u8.saturating_sub(127), 0);\n```",
+ "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nReturns `None` if the number is negative or zero, or if the base is not at least 2.\n\nThis method might not be optimized owing to implementation details;\n`checked_ilog2` can produce results more efficiently for base 2, and\n`checked_ilog10` can produce results more efficiently for base 10.\n\n# Examples\n\n```\nassert_eq!(5i64.checked_ilog(5), Some(1));\n```",
"id": 10804,
"inner": {
"function": {
@@ -65631,28 +64195,43 @@
}
],
[
- "rhs",
+ "base",
{
- "primitive": "u8"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "saturating_sub",
+ "name": "checked_ilog",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -65662,10 +64241,10 @@
"10805": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
@@ -65675,7 +64254,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer subtraction. Computes `self` - `rhs`, saturating at\nthe numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1u8.saturating_sub_signed(2), 0);\nassert_eq!(1u8.saturating_sub_signed(-2), 3);\nassert_eq!((u8::MAX - 2).saturating_sub_signed(-4), u8::MAX);\n```",
+ "docs": "Returns the base 2 logarithm of the number, rounded down.\n\nReturns `None` if the number is negative or zero.\n\n# Examples\n\n```\nassert_eq!(2i64.checked_ilog2(), Some(1));\n```",
"id": 10805,
"inner": {
"function": {
@@ -65697,30 +64276,39 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "saturating_sub_signed",
+ "name": "checked_ilog2",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -65730,10 +64318,10 @@
"10806": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
@@ -65743,7 +64331,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer multiplication. Computes `self * rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(2u8.saturating_mul(10), 20);\nassert_eq!((u8::MAX).saturating_mul(10), u8::MAX);\n```",
+ "docs": "Returns the base 10 logarithm of the number, rounded down.\n\nReturns `None` if the number is negative or zero.\n\n# Example\n\n```\nassert_eq!(10i64.checked_ilog10(), Some(1));\n```",
"id": 10806,
"inner": {
"function": {
@@ -65765,30 +64353,39 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "saturating_mul",
+ "name": "checked_ilog10",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -65798,23 +64395,20 @@
"10807": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer division. Computes `self / rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u8.saturating_div(2), 2);\n\n```",
+ "docs": "Computes the absolute value of `self`.\n\n# Overflow behavior\n\nThe absolute value of\n`i64::MIN`\ncannot be represented as an\n`i64`,\nand attempting to calculate it will cause an overflow. This means\nthat code in debug mode will trigger a panic on this case and\noptimized code will return\n`i64::MIN`\nwithout a panic. If you do not want this behavior, consider\nusing [`unsigned_abs`](Self::unsigned_abs) instead.\n\n# Examples\n\n```\nassert_eq!(10i64.abs(), 10);\nassert_eq!((-10i64).abs(), 10);\n```",
"id": 10807,
"inner": {
"function": {
@@ -65836,30 +64430,26 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i64"
}
}
}
},
- "links": {},
- "name": "saturating_div",
+ "links": {
+ "Self::unsigned_abs": 10771
+ },
+ "name": "abs",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -65869,10 +64459,10 @@
"10808": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\"}}]"
},
{
"must_use": {
@@ -65882,7 +64472,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer exponentiation. Computes `self.pow(exp)`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(4u8.saturating_pow(3), 64);\nassert_eq!(u8::MAX.saturating_pow(2), u8::MAX);\n```",
+ "docs": "Computes the absolute difference between `self` and `other`.\n\nThis function always returns the correct answer without overflow or\npanics by returning an unsigned integer.\n\n# Examples\n\n```\nassert_eq!(100i64.abs_diff(80), 20u64);\nassert_eq!(100i64.abs_diff(110), 10u64);\nassert_eq!((-100i64).abs_diff(80), 180u64);\nassert_eq!((-100i64).abs_diff(-120), 20u64);\nassert_eq!(i64::MIN.abs_diff(i64::MAX), u64::MAX);\n```",
"id": 10808,
"inner": {
"function": {
@@ -65906,28 +64496,28 @@
}
],
[
- "exp",
+ "other",
{
- "primitive": "u32"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "saturating_pow",
+ "name": "abs_diff",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -65937,10 +64527,10 @@
"10809": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_int_sign\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -65950,7 +64540,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) addition with a signed integer. Computes\n`self + rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(1u8.wrapping_add_signed(2), 3);\nassert_eq!(1u8.wrapping_add_signed(-2), u8::MAX);\nassert_eq!((u8::MAX - 2).wrapping_add_signed(4), 1);\n```",
+ "docs": "Returns a number representing sign of `self`.\n\n - `0` if the number is zero\n - `1` if the number is positive\n - `-1` if the number is negative\n\n# Examples\n\n```\nassert_eq!(10i64.signum(), 1);\nassert_eq!(0i64.signum(), 0);\nassert_eq!((-10i64).signum(), -1);\n```",
"id": 10809,
"inner": {
"function": {
@@ -65972,30 +64562,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "wrapping_add_signed",
+ "name": "signum",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -66067,7 +64651,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -66088,7 +64672,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -66109,7 +64693,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -66122,20 +64706,20 @@
"10810": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) subtraction with a signed integer. Computes\n`self - rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(1u8.wrapping_sub_signed(2), u8::MAX);\nassert_eq!(1u8.wrapping_sub_signed(-2), 3);\nassert_eq!((u8::MAX - 2).wrapping_sub_signed(-4), 1);\n```",
+ "docs": "Returns `true` if `self` is positive and `false` if the number is zero or\nnegative.\n\n# Examples\n\n```\nassert!(10i64.is_positive());\nassert!(!(-10i64).is_positive());\n```",
"id": 10810,
"inner": {
"function": {
@@ -66157,30 +64741,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "wrapping_sub_signed",
+ "name": "is_positive",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -66190,23 +64768,20 @@
"10811": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) division. Computes `self / rhs`.\n\nWrapped division on unsigned types is just normal division. There's\nno way wrapping could ever happen. This function exists so that all\noperations are accounted for in the wrapping operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u8.wrapping_div(10), 10);\n```",
+ "docs": "Returns `true` if `self` is negative and `false` if the number is zero or\npositive.\n\n# Examples\n\n```\nassert!((-10i64).is_negative());\nassert!(!10i64.is_negative());\n```",
"id": 10811,
"inner": {
"function": {
@@ -66228,30 +64803,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "wrapping_div",
+ "name": "is_negative",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -66261,23 +64830,20 @@
"10812": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping Euclidean division. Computes `self.div_euclid(rhs)`.\n\nWrapped division on unsigned types is just normal division. There's\nno way wrapping could ever happen. This function exists so that all\noperations are accounted for in the wrapping operations. Since, for\nthe positive integers, all common definitions of division are equal,\nthis is exactly equal to `self.wrapping_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u8.wrapping_div_euclid(10), 10);\n```",
+ "docs": "Returns the memory representation of this integer as a byte array in\nbig-endian (network) byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x1234567890123456i64.to_be_bytes();\nassert_eq!(bytes, [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]);\n```",
"id": 10812,
"inner": {
"function": {
@@ -66299,30 +64865,29 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "array": {
+ "len": "8",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
}
}
},
"links": {},
- "name": "wrapping_div_euclid",
+ "name": "to_be_bytes",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -66332,23 +64897,20 @@
"10813": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) remainder. Computes `self % rhs`.\n\nWrapped remainder calculation on unsigned types is just the regular\nremainder calculation. There's no way wrapping could ever happen.\nThis function exists so that all operations are accounted for in the\nwrapping operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u8.wrapping_rem(10), 0);\n```",
+ "docs": "Returns the memory representation of this integer as a byte array in\nlittle-endian byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x1234567890123456i64.to_le_bytes();\nassert_eq!(bytes, [0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]);\n```",
"id": 10813,
"inner": {
"function": {
@@ -66370,30 +64932,29 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "array": {
+ "len": "8",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
}
}
},
"links": {},
- "name": "wrapping_rem",
+ "name": "to_le_bytes",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -66403,23 +64964,20 @@
"10814": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping Euclidean modulo. Computes `self.rem_euclid(rhs)`.\n\nWrapped modulo calculation on unsigned types is just the regular\nremainder calculation. There's no way wrapping could ever happen.\nThis function exists so that all operations are accounted for in the\nwrapping operations. Since, for the positive integers, all common\ndefinitions of division are equal, this is exactly equal to\n`self.wrapping_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u8.wrapping_rem_euclid(10), 0);\n```",
+ "docs": "Returns the memory representation of this integer as a byte array in\nnative byte order.\n\nAs the target platform's native endianness is used, portable code\nshould use [`to_be_bytes`] or [`to_le_bytes`], as appropriate,\ninstead.\n\n\n\n[`to_be_bytes`]: Self::to_be_bytes\n[`to_le_bytes`]: Self::to_le_bytes\n\n# Examples\n\n```\nlet bytes = 0x1234567890123456i64.to_ne_bytes();\nassert_eq!(\n bytes,\n if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]\n } else {\n [0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]\n }\n);\n```",
"id": 10814,
"inner": {
"function": {
@@ -66441,30 +64999,32 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "array": {
+ "len": "8",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
}
}
},
- "links": {},
- "name": "wrapping_rem_euclid",
+ "links": {
+ "Self::to_be_bytes": 10812,
+ "Self::to_le_bytes": 10813
+ },
+ "name": "to_ne_bytes",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -66474,20 +65034,20 @@
"10815": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) negation. Computes `-self`,\nwrapping around at the boundary of the type.\n\nSince unsigned types do not have negative equivalents\nall applications of this function will wrap (except for `-0`).\nFor values smaller than the corresponding signed type's maximum\nthe result is the same as casting the corresponding signed value.\nAny larger values are equivalent to `MAX + 1 - (val - MAX - 1)` where\n`MAX` is the corresponding signed type's maximum.\n\n# Examples\n\n```\nassert_eq!(0_u8.wrapping_neg(), 0);\nassert_eq!(u8::MAX.wrapping_neg(), 1);\nassert_eq!(13_u8.wrapping_neg(), (!13) + 1);\nassert_eq!(42_u8.wrapping_neg(), !(42 - 1));\n```",
+ "docs": "Creates an integer value from its representation as a byte array in\nbig endian.\n\n\n\n# Examples\n\n```\nlet value = i64::from_be_bytes([0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]);\nassert_eq!(value, 0x1234567890123456);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_be_i64(input: &mut &[u8]) -> i64 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n i64::from_be_bytes(int_bytes.try_into().unwrap())\n}\n```",
"id": 10815,
"inner": {
"function": {
@@ -66505,28 +65065,33 @@
"sig": {
"inputs": [
[
- "self",
+ "bytes",
{
- "generic": "Self"
+ "array": {
+ "len": "8",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "wrapping_neg",
+ "name": "from_be_bytes",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -66536,20 +65101,20 @@
"10816": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Panic-free bitwise shift-left; yields `self << mask(rhs)`,\nwhere `mask` removes any high-order bits of `rhs` that\nwould cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-left; the\nRHS of a wrapping shift-left is restricted to the range\nof the type, rather than the bits shifted out of the LHS\nbeing returned to the other end. The primitive integer\ntypes all implement a [`rotate_left`](Self::rotate_left) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!(1u8.wrapping_shl(7), 128);\nassert_eq!(1u8.wrapping_shl(128), 1);\n```",
+ "docs": "Creates an integer value from its representation as a byte array in\nlittle endian.\n\n\n\n# Examples\n\n```\nlet value = i64::from_le_bytes([0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]);\nassert_eq!(value, 0x1234567890123456);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_le_i64(input: &mut &[u8]) -> i64 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n i64::from_le_bytes(int_bytes.try_into().unwrap())\n}\n```",
"id": 10816,
"inner": {
"function": {
@@ -66567,36 +65132,33 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "bytes",
{
- "primitive": "u32"
+ "array": {
+ "len": "8",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i64"
}
}
}
},
- "links": {
- "Self::rotate_left": 10748
- },
- "name": "wrapping_shl",
+ "links": {},
+ "name": "from_le_bytes",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -66606,20 +65168,20 @@
"10817": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Panic-free bitwise shift-right; yields `self >> mask(rhs)`,\nwhere `mask` removes any high-order bits of `rhs` that\nwould cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-right; the\nRHS of a wrapping shift-right is restricted to the range\nof the type, rather than the bits shifted out of the LHS\nbeing returned to the other end. The primitive integer\ntypes all implement a [`rotate_right`](Self::rotate_right) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!(128u8.wrapping_shr(7), 1);\nassert_eq!(128u8.wrapping_shr(128), 128);\n```",
+ "docs": "Creates an integer value from its memory representation as a byte\narray in native endianness.\n\nAs the target platform's native endianness is used, portable code\nlikely wants to use [`from_be_bytes`] or [`from_le_bytes`], as\nappropriate instead.\n\n[`from_be_bytes`]: Self::from_be_bytes\n[`from_le_bytes`]: Self::from_le_bytes\n\n\n\n# Examples\n\n```\nlet value = i64::from_ne_bytes(if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]\n} else {\n [0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]\n});\nassert_eq!(value, 0x1234567890123456);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_ne_i64(input: &mut &[u8]) -> i64 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n i64::from_ne_bytes(int_bytes.try_into().unwrap())\n}\n```",
"id": 10817,
"inner": {
"function": {
@@ -66637,36 +65199,36 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "bytes",
{
- "primitive": "u32"
+ "array": {
+ "len": "8",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i64"
}
}
}
},
"links": {
- "Self::rotate_right": 10749
+ "Self::from_be_bytes": 10815,
+ "Self::from_le_bytes": 10816
},
- "name": "wrapping_shr",
+ "name": "from_ne_bytes",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -66676,20 +65238,21 @@
"10818": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[rustc_diagnostic_item = \"i64_legacy_fn_min_value\"]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_min_value\", promotable: true}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
}
],
"crate_id": 1,
- "deprecation": null,
- "docs": "Wrapping (modular) exponentiation. Computes `self.pow(exp)`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(3u8.wrapping_pow(5), 243);\nassert_eq!(3u8.wrapping_pow(6), 217);\n```",
+ "deprecation": {
+ "note": "replaced by the `MIN` associated constant on this type",
+ "since": "TBD"
+ },
+ "docs": "New code should prefer to use\n[`i64::MIN`] instead.\n\nReturns the smallest value that can be represented by this integer type.",
"id": 10818,
"inner": {
"function": {
@@ -66705,36 +65268,25 @@
"is_unsafe": false
},
"sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "exp",
- {
- "primitive": "u32"
- }
- ]
- ],
+ "inputs": [],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i64"
}
}
}
},
- "links": {},
- "name": "wrapping_pow",
+ "links": {
+ "`i64::MIN`": 10682
+ },
+ "name": "min_value",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -66744,20 +65296,21 @@
"10819": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[rustc_diagnostic_item = \"i64_legacy_fn_max_value\"]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
}
],
"crate_id": 1,
- "deprecation": null,
- "docs": "Calculates `self` + `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5u8.overflowing_add(2), (7, false));\nassert_eq!(u8::MAX.overflowing_add(1), (0, true));\n```",
+ "deprecation": {
+ "note": "replaced by the `MAX` associated constant on this type",
+ "since": "TBD"
+ },
+ "docs": "New code should prefer to use\n[`i64::MAX`] instead.\n\nReturns the largest value that can be represented by this integer type.",
"id": 10819,
"inner": {
"function": {
@@ -66773,43 +65326,25 @@
"is_unsafe": false
},
"sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
- ]
- ],
+ "inputs": [],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u8"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i64"
}
}
}
},
- "links": {},
- "name": "overflowing_add",
+ "links": {
+ "`i64::MAX`": 10683
+ },
+ "name": "max_value",
"span": {
"begin": [
- 447,
+ 319,
5
],
"end": [
- 465,
+ 338,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -66891,7 +65426,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -66907,7 +65442,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -66916,12 +65451,12 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -66930,10 +65465,19 @@
"10820": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[doc(alias = \"average_floor\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[doc(alias = \"average_ceil\")]"
+ },
+ {
+ "other": "#[doc(alias = \"average\")]"
+ },
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"num_midpoint_signed\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"num_midpoint_signed\"}}]"
},
{
"must_use": {
@@ -66943,7 +65487,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs` with a signed `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1u8.overflowing_add_signed(2), (3, false));\nassert_eq!(1u8.overflowing_add_signed(-2), (u8::MAX, true));\nassert_eq!((u8::MAX - 2).overflowing_add_signed(4), (1, true));\n```",
+ "docs": "Calculates the midpoint (average) between `self` and `rhs`.\n\n`midpoint(a, b)` is `(a + b) / 2` as if it were performed in a\nsufficiently-large signed integral type. This implies that the result is\nalways rounded towards zero and that no overflow will ever occur.\n\n# Examples\n\n```\nassert_eq!(0i64.midpoint(4), 2);\nassert_eq!((-1i64).midpoint(2), 0);\nassert_eq!((-7i64).midpoint(0), -3);\nassert_eq!(0i64.midpoint(-7), -3);\nassert_eq!(0i64.midpoint(7), 3);\n```",
"id": 10820,
"inner": {
"function": {
@@ -66969,131 +65513,221 @@
[
"rhs",
{
- "primitive": "i8"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u8"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "overflowing_add_signed",
+ "name": "midpoint",
"span": {
"begin": [
- 447,
+ 339,
5
],
"end": [
- 465,
- 6
+ 339,
+ 35
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"10821": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
+ "attrs": [],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` - `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5u8.overflowing_sub(2), (3, false));\nassert_eq!(0u8.overflowing_sub(1), (u8::MAX, true));\n```",
+ "docs": null,
"id": 10821,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "i64"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "u8"
- },
- {
- "primitive": "bool"
- }
- ]
- }
- }
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 10682,
+ 10683,
+ 10684,
+ 10685,
+ 10686,
+ 10688,
+ 10689,
+ 10690,
+ 10691,
+ 10692,
+ 10693,
+ 10694,
+ 10695,
+ 10696,
+ 10697,
+ 10698,
+ 10699,
+ 10700,
+ 10701,
+ 10702,
+ 10703,
+ 10704,
+ 10705,
+ 10706,
+ 10708,
+ 10709,
+ 10710,
+ 10711,
+ 10712,
+ 10714,
+ 10715,
+ 10716,
+ 10717,
+ 10718,
+ 10720,
+ 10721,
+ 10722,
+ 10723,
+ 10724,
+ 10725,
+ 10726,
+ 10727,
+ 10728,
+ 10729,
+ 10730,
+ 10731,
+ 10732,
+ 10733,
+ 10734,
+ 10735,
+ 10736,
+ 10737,
+ 10738,
+ 10739,
+ 10740,
+ 10741,
+ 10742,
+ 10743,
+ 10744,
+ 10745,
+ 10746,
+ 10747,
+ 10748,
+ 10749,
+ 10750,
+ 10751,
+ 10752,
+ 10753,
+ 10754,
+ 10755,
+ 10756,
+ 10757,
+ 10758,
+ 10759,
+ 10760,
+ 10707,
+ 10761,
+ 10713,
+ 10762,
+ 10719,
+ 10763,
+ 10764,
+ 10765,
+ 10766,
+ 10767,
+ 10768,
+ 10769,
+ 10770,
+ 10771,
+ 10772,
+ 10773,
+ 10775,
+ 10776,
+ 10777,
+ 10779,
+ 10780,
+ 10781,
+ 10783,
+ 10782,
+ 10784,
+ 10785,
+ 10786,
+ 10787,
+ 10788,
+ 10789,
+ 10790,
+ 10791,
+ 10792,
+ 10793,
+ 10794,
+ 10795,
+ 10796,
+ 10797,
+ 10798,
+ 10799,
+ 10800,
+ 10801,
+ 10802,
+ 10687,
+ 10803,
+ 10804,
+ 10805,
+ 10806,
+ 10807,
+ 10808,
+ 10809,
+ 10810,
+ 10811,
+ 10812,
+ 10813,
+ 10814,
+ 10815,
+ 10816,
+ 10817,
+ 10818,
+ 10819,
+ 10820
+ ],
+ "provided_trait_methods": [],
+ "trait": null
}
},
"links": {},
- "name": "overflowing_sub",
+ "name": null,
"span": {
"begin": [
- 447,
- 5
+ 318,
+ 1
],
"end": [
- 465,
- 6
+ 318,
+ 9
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
"10822": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 82, patch: 0})}, feature: \"const_int_from_str\", promotable: false}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` - `rhs` with a signed `rhs`\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1u8.overflowing_sub_signed(2), (u8::MAX, true));\nassert_eq!(1u8.overflowing_sub_signed(-2), (3, false));\nassert_eq!((u8::MAX - 2).overflowing_sub_signed(-4), (1, true));\n```",
+ "docs": "Parses an integer from a string slice with digits in a given base.\n\nThe string is expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# See also\nIf the string to be parsed is in base 10 (decimal),\n[`from_str`] or [`str::parse`] can also be used.\n\n[`from_str`]: #method.from_str\n[`str::parse`]: primitive.str.html#method.parse\n\n# Examples\n\n```\nassert_eq!(i64::from_str_radix(\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\nassert!(i64::from_str_radix(\"1 \", 10).is_err());\n```",
"id": 10822,
"inner": {
"function": {
@@ -67111,42 +65745,65 @@
"sig": {
"inputs": [
[
- "self",
+ "src",
{
- "generic": "Self"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "primitive": "str"
+ }
+ }
}
],
[
- "rhs",
+ "radix",
{
- "primitive": "i8"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u8"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i64"
+ }
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 4786,
+ "path": "ParseIntError"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
},
- {
- "primitive": "bool"
- }
- ]
+ "id": 57,
+ "path": "Result"
+ }
}
}
}
},
"links": {},
- "name": "overflowing_sub_signed",
+ "name": "from_str_radix",
"span": {
"begin": [
- 447,
- 5
+ 1666,
+ 1
],
"end": [
- 465,
- 6
+ 1666,
+ 56
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -67155,20 +65812,12 @@
"10823": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Computes the absolute difference between `self` and `other`.\n\n# Examples\n\n```\nassert_eq!(100u8.abs_diff(80), 20u8);\nassert_eq!(100u8.abs_diff(110), 10u8);\n```",
+ "docs": "Parses an integer from an ASCII-byte slice with decimal digits.\n\nThe characters are expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(i64::from_ascii(b\"+10\"), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(i64::from_ascii(b\"1 \").is_err());\n```",
"id": 10823,
"inner": {
"function": {
@@ -67186,35 +65835,61 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "other",
+ "src",
{
- "primitive": "u8"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "slice": {
+ "primitive": "u8"
+ }
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i64"
+ }
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 4786,
+ "path": "ParseIntError"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 57,
+ "path": "Result"
+ }
}
}
}
},
"links": {},
- "name": "abs_diff",
+ "name": "from_ascii",
"span": {
"begin": [
- 447,
- 5
+ 1666,
+ 1
],
"end": [
- 465,
- 6
+ 1666,
+ 56
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -67223,20 +65898,12 @@
"10824": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the multiplication of `self` and `rhs`.\n\nReturns a tuple of the multiplication along with a boolean\nindicating whether an arithmetic overflow would occur. If an\noverflow would have occurred then the wrapped value is returned.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why why `u32`\nis used.\n\n```\nassert_eq!(5u32.overflowing_mul(2), (10, false));\nassert_eq!(1_000_000_000u32.overflowing_mul(10), (1410065408, true));\n```",
+ "docs": "Parses an integer from an ASCII-byte slice with digits in a given base.\n\nThe characters are expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(i64::from_ascii_radix(b\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(i64::from_ascii_radix(b\"1 \", 10).is_err());\n```",
"id": 10824,
"inner": {
"function": {
@@ -67254,150 +65921,124 @@
"sig": {
"inputs": [
[
- "self",
+ "src",
{
- "generic": "Self"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "slice": {
+ "primitive": "u8"
+ }
+ }
+ }
}
],
[
- "rhs",
+ "radix",
{
- "primitive": "u8"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u8"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i64"
+ }
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 4786,
+ "path": "ParseIntError"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
},
- {
- "primitive": "bool"
- }
- ]
+ "id": 57,
+ "path": "Result"
+ }
}
}
}
},
"links": {},
- "name": "overflowing_mul",
+ "name": "from_ascii_radix",
"span": {
"begin": [
- 447,
- 5
+ 1666,
+ 1
],
"end": [
- 465,
- 6
+ 1666,
+ 56
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"10825": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
+ "attrs": [],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the \"full multiplication\" `self * rhs + carry`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need the `carry`, then you can use [`Self::widening_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5u32.carrying_mul(2, 0), (10, 0));\nassert_eq!(5u32.carrying_mul(2, 10), (20, 0));\nassert_eq!(1_000_000_000u32.carrying_mul(10, 0), (1410065408, 2));\nassert_eq!(1_000_000_000u32.carrying_mul(10, 10), (1410065418, 2));\nassert_eq!(u8::MAX.carrying_mul(u8::MAX, u8::MAX), (0, u8::MAX));\n```\n\nThis is the core operation needed for scalar multiplication when\nimplementing it for wider-than-native types.\n\n```\n#![feature(bigint_helper_methods)]\nfn scalar_mul_eq(little_endian_digits: &mut Vec, multiplicand: u16) {\n let mut carry = 0;\n for d in little_endian_digits.iter_mut() {\n (*d, carry) = d.carrying_mul(multiplicand, carry);\n }\n if carry != 0 {\n little_endian_digits.push(carry);\n }\n}\n\nlet mut v = vec![10, 20];\nscalar_mul_eq(&mut v, 3);\nassert_eq!(v, [30, 60]);\n\nassert_eq!(0x87654321_u64 * 0xFEED, 0x86D3D159E38D);\nlet mut v = vec![0x4321, 0x8765];\nscalar_mul_eq(&mut v, 0xFEED);\nassert_eq!(v, [0xE38D, 0xD159, 0x86D3]);\n```\n\nIf `carry` is zero, this is similar to [`overflowing_mul`](Self::overflowing_mul),\nexcept that it gives the value of the overflow instead of just whether one happened:\n\n```\n#![feature(bigint_helper_methods)]\nlet r = u8::carrying_mul(7, 13, 0);\nassert_eq!((r.0, r.1 != 0), u8::overflowing_mul(7, 13));\nlet r = u8::carrying_mul(13, 42, 0);\nassert_eq!((r.0, r.1 != 0), u8::overflowing_mul(13, 42));\n```\n\nThe value of the first field in the returned tuple matches what you'd get\nby combining the [`wrapping_mul`](Self::wrapping_mul) and\n[`wrapping_add`](Self::wrapping_add) methods:\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(\n 789_u16.carrying_mul(456, 123).0,\n 789_u16.wrapping_mul(456).wrapping_add(123),\n);\n```",
+ "docs": null,
"id": 10825,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "i64"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
- ],
- [
- "carry",
- {
- "primitive": "u8"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "u8"
- },
- {
- "primitive": "u8"
- }
- ]
- }
- }
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 10822,
+ 10823,
+ 10824
+ ],
+ "provided_trait_methods": [],
+ "trait": null
}
},
- "links": {
- "Self::overflowing_mul": 10824,
- "Self::wrapping_add": 10758,
- "Self::wrapping_mul": 10771,
- "`Self::widening_mul`": 10826
- },
- "name": "carrying_mul",
+ "links": {},
+ "name": null,
"span": {
"begin": [
- 447,
- 5
+ 1666,
+ 1
],
"end": [
- 465,
- 6
+ 1666,
+ 56
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
"10826": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 138215, is_soft: false}, feature: \"int_format_into\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the complete product `self * rhs` without the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nIf you also need to add a carry to the wide result, then you want\n[`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5u32.widening_mul(2), (10, 0));\nassert_eq!(1_000_000_000u32.widening_mul(10), (1410065408, 2));\n```",
+ "docs": "Allows users to write an integer (in signed decimal format) into a variable `buf` of\ntype [`NumBuffer`] that is passed by the caller by mutable reference.\n\n# Examples\n\n```\n#![feature(int_format_into)]\nuse core::fmt::NumBuffer;\n\nlet n = 0i64;\nlet mut buf = NumBuffer::new();\nassert_eq!(n.format_into(&mut buf), \"0\");\n\nlet n1 = 32i64;\nassert_eq!(n1.format_into(&mut buf), \"32\");\n\nlet n2 = i64 :: MAX;\nassert_eq!(n2.format_into(&mut buf), i64 :: MAX.to_string());\n```",
"id": 10826,
"inner": {
"function": {
@@ -67409,7 +66050,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -67421,205 +66062,131 @@
}
],
[
- "rhs",
+ "buf",
{
- "primitive": "u8"
+ "borrowed_ref": {
+ "is_mutable": true,
+ "lifetime": null,
+ "type": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i64"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 10387,
+ "path": "NumBuffer"
+ }
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u8"
- },
- {
- "primitive": "u8"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "primitive": "str"
}
- ]
+ }
}
}
}
},
"links": {
- "`Self::carrying_mul`": 10825
+ "`NumBuffer`": 10387
},
- "name": "widening_mul",
+ "name": "format_into",
"span": {
"begin": [
- 447,
+ 599,
5
],
"end": [
- 465,
- 6
+ 599,
+ 95
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/fmt/num.rs"
},
"visibility": "public"
},
"10827": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
+ "attrs": [],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the \"full multiplication\" `self * rhs + carry1 + carry2`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need either `carry`, then you can use [`Self::widening_mul`] instead,\nand if you only need one `carry`, then you can use [`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared between integer types,\nwhich explains why `u32` is used here.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5u32.carrying_mul_add(2, 0, 0), (10, 0));\nassert_eq!(5u32.carrying_mul_add(2, 10, 10), (30, 0));\nassert_eq!(1_000_000_000u32.carrying_mul_add(10, 0, 0), (1410065408, 2));\nassert_eq!(1_000_000_000u32.carrying_mul_add(10, 10, 10), (1410065428, 2));\nassert_eq!(u8::MAX.carrying_mul_add(u8::MAX, u8::MAX, u8::MAX), (u8::MAX, u8::MAX));\n```\n\nThis is the core per-digit operation for \"grade school\" O(n²) multiplication.\n\nPlease note that this example is shared between integer types,\nusing `u8` for simplicity of the demonstration.\n\n```\n#![feature(bigint_helper_methods)]\n\nfn quadratic_mul(a: [u8; N], b: [u8; N]) -> [u8; N] {\n let mut out = [0; N];\n for j in 0..N {\n let mut carry = 0;\n for i in 0..(N - j) {\n (out[j + i], carry) = u8::carrying_mul_add(a[i], b[j], out[j + i], carry);\n }\n }\n out\n}\n\n// -1 * -1 == 1\nassert_eq!(quadratic_mul([0xFF; 3], [0xFF; 3]), [1, 0, 0]);\n\nassert_eq!(u32::wrapping_mul(0x9e3779b9, 0x7f4a7c15), 0xCFFC982D);\nassert_eq!(\n quadratic_mul(u32::to_le_bytes(0x9e3779b9), u32::to_le_bytes(0x7f4a7c15)),\n u32::to_le_bytes(0xCFFC982D)\n);\n```",
+ "docs": null,
"id": 10827,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "i64"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
- ],
- [
- "carry",
- {
- "primitive": "u8"
- }
- ],
- [
- "add",
- {
- "primitive": "u8"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "u8"
- },
- {
- "primitive": "u8"
- }
- ]
- }
- }
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 10826
+ ],
+ "provided_trait_methods": [],
+ "trait": null
}
},
- "links": {
- "`Self::carrying_mul`": 10825,
- "`Self::widening_mul`": 10826
- },
- "name": "carrying_mul_add",
+ "links": {},
+ "name": null,
"span": {
"begin": [
- 447,
+ 599,
5
],
"end": [
- 465,
- 6
+ 599,
+ 95
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/fmt/num.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
"10828": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- },
- {
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the divisor when `self` is divided by `rhs`.\n\nReturns a tuple of the divisor along with a boolean indicating\nwhether an arithmetic overflow would occur. Note that for unsigned\nintegers overflow never occurs, so the second value is always\n`false`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u8.overflowing_div(2), (2, false));\n```",
+ "docs": "The smallest value that can be represented by this integer type\n(−2127).\n\n# Examples\n\n```\nassert_eq!(i128::MIN, -170141183460469231731687303715884105728);\n```",
"id": 10828,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "i128"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "u8"
- },
- {
- "primitive": "bool"
- }
- ]
- }
- }
+ "value": "_"
}
},
"links": {},
- "name": "overflowing_div",
+ "name": "MIN",
"span": {
"begin": [
- 447,
+ 343,
5
],
"end": [
- 465,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -67629,75 +66196,30 @@
"10829": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- },
- {
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of Euclidean division `self.div_euclid(rhs)`.\n\nReturns a tuple of the divisor along with a boolean indicating\nwhether an arithmetic overflow would occur. Note that for unsigned\nintegers overflow never occurs, so the second value is always\n`false`.\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self.overflowing_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u8.overflowing_div_euclid(2), (2, false));\n```",
+ "docs": "The largest value that can be represented by this integer type\n(2127 − 1).\n\n# Examples\n\n```\nassert_eq!(i128::MAX, 170141183460469231731687303715884105727);\n```",
"id": 10829,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "i128"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "u8"
- },
- {
- "primitive": "bool"
- }
- ]
- }
- }
+ "value": "_"
}
},
"links": {},
- "name": "overflowing_div_euclid",
+ "name": "MAX",
"span": {
"begin": [
- 447,
+ 343,
5
],
"end": [
- 465,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -67779,7 +66301,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -67795,7 +66317,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -67804,12 +66326,12 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -67818,75 +66340,30 @@
"10830": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- },
- {
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 53, patch: 0})}, feature: \"int_bits_const\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the remainder when `self` is divided by `rhs`.\n\nReturns a tuple of the remainder after dividing along with a boolean\nindicating whether an arithmetic overflow would occur. Note that for\nunsigned integers overflow never occurs, so the second value is\nalways `false`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u8.overflowing_rem(2), (1, false));\n```",
+ "docs": "The size of this integer type in bits.\n\n# Examples\n\n```\nassert_eq!(i128::BITS, 128);\n```",
"id": 10830,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "u32"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "u8"
- },
- {
- "primitive": "bool"
- }
- ]
- }
- }
+ "value": "u128::BITS"
}
},
"links": {},
- "name": "overflowing_rem",
+ "name": "BITS",
"span": {
"begin": [
- 447,
+ 343,
5
],
"end": [
- 465,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -67896,23 +66373,26 @@
"10831": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[doc(alias = \"popcount\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[doc(alias = \"popcnt\")]"
+ },
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the remainder `self.rem_euclid(rhs)` as if by Euclidean division.\n\nReturns a tuple of the modulo after dividing along with a boolean\nindicating whether an arithmetic overflow would occur. Note that for\nunsigned integers overflow never occurs, so the second value is\nalways `false`.\nSince, for the positive integers, all common\ndefinitions of division are equal, this operation\nis exactly equal to `self.overflowing_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u8.overflowing_rem_euclid(2), (1, false));\n```",
+ "docs": "Returns the number of ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 0b100_0000i128;\n\nassert_eq!(n.count_ones(), 1);\n```\n",
"id": 10831,
"inner": {
"function": {
@@ -67934,37 +66414,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u8"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "overflowing_rem_euclid",
+ "name": "count_ones",
"span": {
"begin": [
- 447,
+ 343,
5
],
"end": [
- 465,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -67974,10 +66441,10 @@
"10832": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -67987,7 +66454,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Negates self in an overflowing fashion.\n\nReturns `!self + 1` using wrapping operations to return the value\nthat represents the negation of this unsigned value. Note that for\npositive unsigned values overflow always occurs, but negating 0 does\nnot overflow.\n\n# Examples\n\n```\nassert_eq!(0u8.overflowing_neg(), (0, false));\nassert_eq!(2u8.overflowing_neg(), (-2i32 as u8, true));\n```",
+ "docs": "Returns the number of zeros in the binary representation of `self`.\n\n# Examples\n\n```\nassert_eq!(i128::MAX.count_zeros(), 1);\n```",
"id": 10832,
"inner": {
"function": {
@@ -68013,27 +66480,20 @@
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u8"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "overflowing_neg",
+ "name": "count_zeros",
"span": {
"begin": [
- 447,
+ 343,
5
],
"end": [
- 465,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -68043,20 +66503,23 @@
"10833": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts self left by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean\nindicating whether the shift value was larger than or equal to the\nnumber of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then\nused to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x1u8.overflowing_shl(4), (0x10, false));\nassert_eq!(0x1u8.overflowing_shl(132), (0x10, true));\nassert_eq!(0x10u8.overflowing_shl(7), (0, false));\n```",
+ "docs": "Returns the base 2 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero.\n\n# Examples\n\n```\nassert_eq!(2i128.ilog2(), 1);\n```",
"id": 10833,
"inner": {
"function": {
@@ -68078,37 +66541,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u8"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "overflowing_shl",
+ "name": "ilog2",
"span": {
"begin": [
- 447,
+ 343,
5
],
"end": [
- 465,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -68118,10 +66568,10 @@
"10834": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -68131,7 +66581,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts self right by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean\nindicating whether the shift value was larger than or equal to the\nnumber of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then\nused to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x10u8.overflowing_shr(4), (0x1, false));\nassert_eq!(0x10u8.overflowing_shr(132), (0x1, true));\n```",
+ "docs": "Returns the number of leading zeros in the binary representation of `self`.\n\nDepending on what you're doing with the value, you might also be interested in the\n[`ilog2`] function which returns a consistent number, even if the type widens.\n\n# Examples\n\n```\nlet n = -1i128;\n\nassert_eq!(n.leading_zeros(), 0);\n```\n[`ilog2`]: i128::ilog2",
"id": 10834,
"inner": {
"function": {
@@ -68153,37 +66603,26 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u8"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
- "links": {},
- "name": "overflowing_shr",
+ "links": {
+ "i128::ilog2": 10833
+ },
+ "name": "leading_zeros",
"span": {
"begin": [
- 447,
+ 343,
5
],
"end": [
- 465,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -68193,10 +66632,10 @@
"10835": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -68206,7 +66645,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\nReturns a tuple of the exponentiation along with a bool indicating\nwhether an overflow happened.\n\n# Examples\n\n```\nassert_eq!(3u8.overflowing_pow(5), (243, false));\nassert_eq!(3u8.overflowing_pow(6), (217, true));\n```",
+ "docs": "Returns the number of trailing zeros in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = -4i128;\n\nassert_eq!(n.trailing_zeros(), 2);\n```",
"id": 10835,
"inner": {
"function": {
@@ -68228,37 +66667,24 @@
{
"generic": "Self"
}
- ],
- [
- "exp",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u8"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "overflowing_pow",
+ "name": "trailing_zeros",
"span": {
"begin": [
- 447,
+ 343,
5
],
"end": [
- 465,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -68268,10 +66694,10 @@
"10836": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
},
{
"must_use": {
@@ -68281,7 +66707,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\n# Examples\n\n```\nassert_eq!(2u8.pow(5), 32);\n```",
+ "docs": "Returns the number of leading ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = -1i128;\n\nassert_eq!(n.leading_ones(), 128);\n```",
"id": 10836,
"inner": {
"function": {
@@ -68303,30 +66729,24 @@
{
"generic": "Self"
}
- ],
- [
- "exp",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "pow",
+ "name": "leading_ones",
"span": {
"begin": [
- 447,
+ 343,
5
],
"end": [
- 465,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -68336,10 +66756,10 @@
"10837": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
},
{
"must_use": {
@@ -68349,7 +66769,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the square root of the number, rounded down.\n\n# Examples\n\n```\nassert_eq!(10u8.isqrt(), 3);\n```",
+ "docs": "Returns the number of trailing ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 3i128;\n\nassert_eq!(n.trailing_ones(), 2);\n```",
"id": 10837,
"inner": {
"function": {
@@ -68375,20 +66795,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "isqrt",
+ "name": "trailing_ones",
"span": {
"begin": [
- 447,
+ 343,
5
],
"end": [
- 465,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -68398,23 +66818,17 @@
"10838": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Performs Euclidean division.\n\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7u8.div_euclid(4), 1); // or any other integer type\n```",
+ "docs": "Returns `self` with only the most significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: i128 = 0b_01100100;\n\nassert_eq!(n.isolate_highest_one(), 0b_01000000);\nassert_eq!(0_i128.isolate_highest_one(), 0);\n```",
"id": 10838,
"inner": {
"function": {
@@ -68436,30 +66850,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "div_euclid",
+ "name": "isolate_highest_one",
"span": {
"begin": [
- 447,
+ 343,
5
],
"end": [
- 465,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -68469,26 +66877,17 @@
"10839": {
"attrs": [
{
- "other": "#[doc(alias = \"modulo\", alias = \"mod\")]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the least remainder of `self (mod rhs)`.\n\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self % rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7u8.rem_euclid(4), 3); // or any other integer type\n```",
+ "docs": "Returns `self` with only the least significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: i128 = 0b_01100100;\n\nassert_eq!(n.isolate_lowest_one(), 0b_00000100);\nassert_eq!(0_i128.isolate_lowest_one(), 0);\n```",
"id": 10839,
"inner": {
"function": {
@@ -68510,30 +66909,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "rem_euclid",
+ "name": "isolate_lowest_one",
"span": {
"begin": [
- 447,
+ 343,
5
],
"end": [
- 465,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -68636,7 +67029,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -68661,11 +67054,11 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -68675,20 +67068,17 @@
"10840": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards negative infinity.\n\nThis is the same as performing `self / rhs` for all unsigned integers.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(7_u8.div_floor(4), 1);\n```",
+ "docs": "Returns the index of the highest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_i128.highest_one(), None);\nassert_eq!(0x1_i128.highest_one(), Some(0));\nassert_eq!(0x10_i128.highest_one(), Some(4));\nassert_eq!(0x1f_i128.highest_one(), Some(4));\n```",
"id": 10840,
"inner": {
"function": {
@@ -68710,30 +67100,39 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "div_floor",
+ "name": "highest_one",
"span": {
"begin": [
- 447,
+ 343,
5
],
"end": [
- 465,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -68743,23 +67142,17 @@
"10841": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards positive infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7_u8.div_ceil(4), 2);\n```",
+ "docs": "Returns the index of the lowest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_i128.lowest_one(), None);\nassert_eq!(0x1_i128.lowest_one(), Some(0));\nassert_eq!(0x10_i128.lowest_one(), Some(4));\nassert_eq!(0x1f_i128.lowest_one(), Some(0));\n```",
"id": 10841,
"inner": {
"function": {
@@ -68781,30 +67174,39 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "div_ceil",
+ "name": "lowest_one",
"span": {
"begin": [
- 447,
+ 343,
5
],
"end": [
- 465,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -68814,10 +67216,10 @@
"10842": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\"}}]"
},
{
"must_use": {
@@ -68827,7 +67229,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the smallest value greater than or equal to `self` that\nis a multiple of `rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nOn overflow, this function will panic if overflow checks are enabled (default in debug\nmode) and wrap if overflow checks are disabled (default in release mode).\n\n# Examples\n\n```\nassert_eq!(16_u8.next_multiple_of(8), 16);\nassert_eq!(23_u8.next_multiple_of(8), 24);\n```",
+ "docs": "Returns the bit pattern of `self` reinterpreted as an unsigned integer of the same size.\n\nThis produces the same result as an `as` cast, but ensures that the bit-width remains\nthe same.\n\n# Examples\n\n```\nlet n = -1i128;\n\nassert_eq!(n.cast_unsigned(), u128::MAX);\n```",
"id": 10842,
"inner": {
"function": {
@@ -68849,30 +67251,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u8"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "u128"
}
}
}
},
"links": {},
- "name": "next_multiple_of",
+ "name": "cast_unsigned",
"span": {
"begin": [
- 447,
+ 343,
5
],
"end": [
- 465,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -68882,10 +67278,10 @@
"10843": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -68895,7 +67291,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the smallest value greater than or equal to `self` that\nis a multiple of `rhs`. Returns `None` if `rhs` is zero or the\noperation would result in overflow.\n\n# Examples\n\n```\nassert_eq!(16_u8.checked_next_multiple_of(8), Some(16));\nassert_eq!(23_u8.checked_next_multiple_of(8), Some(24));\nassert_eq!(1_u8.checked_next_multiple_of(0), None);\nassert_eq!(u8::MAX.checked_next_multiple_of(2), None);\n```",
+ "docs": "Shifts the bits to the left by a specified amount, `n`,\nwrapping the truncated bits to the end of the resulting integer.\n\nPlease note this isn't the same operation as the `<<` shifting operator!\n\n# Examples\n\n```\nlet n = 0x13f40000000000000000000000004f76i128;\nlet m = 0x4f7613f4;\n\nassert_eq!(n.rotate_left(16), m);\n```",
"id": 10843,
"inner": {
"function": {
@@ -68919,43 +67315,28 @@
}
],
[
- "rhs",
+ "n",
{
- "primitive": "u8"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u8"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "checked_next_multiple_of",
+ "name": "rotate_left",
"span": {
"begin": [
- 447,
+ 343,
5
],
"end": [
- 465,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -68965,20 +67346,20 @@
"10844": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unsigned_is_multiple_of\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unsigned_is_multiple_of\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `true` if `self` is an integer multiple of `rhs`, and false otherwise.\n\nThis function is equivalent to `self % rhs == 0`, except that it will not panic\nfor `rhs == 0`. Instead, `0.is_multiple_of(0) == true`, and for any non-zero `n`,\n`n.is_multiple_of(0) == false`.\n\n# Examples\n\n```\nassert!(6_u8.is_multiple_of(2));\nassert!(!5_u8.is_multiple_of(2));\n\nassert!(0_u8.is_multiple_of(0));\nassert!(!6_u8.is_multiple_of(0));\n```",
+ "docs": "Shifts the bits to the right by a specified amount, `n`,\nwrapping the truncated bits to the beginning of the resulting\ninteger.\n\nPlease note this isn't the same operation as the `>>` shifting operator!\n\n# Examples\n\n```\nlet n = 0x4f7613f4i128;\nlet m = 0x13f40000000000000000000000004f76;\n\nassert_eq!(n.rotate_right(16), m);\n```",
"id": 10844,
"inner": {
"function": {
@@ -69002,28 +67383,28 @@
}
],
[
- "rhs",
+ "n",
{
- "primitive": "u8"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "is_multiple_of",
+ "name": "rotate_right",
"span": {
"begin": [
- 447,
+ 343,
5
],
"end": [
- 465,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -69033,20 +67414,20 @@
"10845": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_is_power_of_two\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `true` if and only if `self == 2^k` for some unsigned integer `k`.\n\n# Examples\n\n```\nassert!(16u8.is_power_of_two());\nassert!(!10u8.is_power_of_two());\n```",
+ "docs": "Reverses the byte order of the integer.\n\n# Examples\n\n```\nlet n = 0x12345678901234567890123456789012i128;\n\nlet m = n.swap_bytes();\n\nassert_eq!(m, 0x12907856341290785634129078563412);\n```",
"id": 10845,
"inner": {
"function": {
@@ -69072,20 +67453,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "is_power_of_two",
+ "name": "swap_bytes",
"span": {
"begin": [
- 447,
+ 343,
5
],
"end": [
- 465,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -69095,10 +67476,10 @@
"10846": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\"}}]"
},
{
"must_use": {
@@ -69108,7 +67489,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the smallest power of two greater than or equal to `self`.\n\nWhen return value overflows (i.e., `self > (1 << (N-1))` for type\n`uN`), it panics in debug mode and the return value is wrapped to 0 in\nrelease mode (the only situation in which this method can return 0).\n\n# Examples\n\n```\nassert_eq!(2u8.next_power_of_two(), 2);\nassert_eq!(3u8.next_power_of_two(), 4);\nassert_eq!(0u8.next_power_of_two(), 1);\n```",
+ "docs": "Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\n second least-significant bit becomes second most-significant bit, etc.\n\n# Examples\n\n```\nlet n = 0x12345678901234567890123456789012i128;\nlet m = n.reverse_bits();\n\nassert_eq!(m, 0x48091e6a2c48091e6a2c48091e6a2c48);\nassert_eq!(0, 0i128.reverse_bits());\n```",
"id": 10846,
"inner": {
"function": {
@@ -69134,20 +67515,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "next_power_of_two",
+ "name": "reverse_bits",
"span": {
"begin": [
- 447,
+ 343,
5
],
"end": [
- 465,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -69157,20 +67538,20 @@
"10847": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the smallest power of two greater than or equal to `self`. If\nthe next power of two is greater than the type's maximum value,\n`None` is returned, otherwise the power of two is wrapped in `Some`.\n\n# Examples\n\n```\nassert_eq!(2u8.checked_next_power_of_two(), Some(2));\nassert_eq!(3u8.checked_next_power_of_two(), Some(4));\nassert_eq!(u8::MAX.checked_next_power_of_two(), None);\n```",
+ "docs": "Converts an integer from big endian to the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai128;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(i128::from_be(n), n)\n} else {\n assert_eq!(i128::from_be(n), n.swap_bytes())\n}\n```",
"id": 10847,
"inner": {
"function": {
@@ -69188,43 +67569,28 @@
"sig": {
"inputs": [
[
- "self",
+ "x",
{
- "generic": "Self"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u8"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "checked_next_power_of_two",
+ "name": "from_be",
"span": {
"begin": [
- 447,
+ 343,
5
],
"end": [
- 465,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -69234,17 +67600,20 @@
"10848": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"needs decision on wrapping behavior\"),\nissue: 32463, is_soft: false}, feature: \"wrapping_next_power_of_two\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the smallest power of two greater than or equal to `n`. If\nthe next power of two is greater than the type's maximum value,\nthe return value is wrapped to `0`.\n\n# Examples\n\n```\n#![feature(wrapping_next_power_of_two)]\n\nassert_eq!(2u8.wrapping_next_power_of_two(), 2);\nassert_eq!(3u8.wrapping_next_power_of_two(), 4);\nassert_eq!(u8::MAX.wrapping_next_power_of_two(), 0);\n```",
+ "docs": "Converts an integer from little endian to the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai128;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(i128::from_le(n), n)\n} else {\n assert_eq!(i128::from_le(n), n.swap_bytes())\n}\n```",
"id": 10848,
"inner": {
"function": {
@@ -69262,28 +67631,28 @@
"sig": {
"inputs": [
[
- "self",
+ "x",
{
- "generic": "Self"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "wrapping_next_power_of_two",
+ "name": "from_le",
"span": {
"begin": [
- 447,
+ 343,
5
],
"end": [
- 465,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -69293,10 +67662,10 @@
"10849": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -69306,7 +67675,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nbig-endian (network) byte order.\n\n\n**Note**: This function is meaningless on `u8`. Byte order does not exist as a\nconcept for byte-sized integers. This function is only provided in symmetry\nwith larger integer types.\n\n# Examples\n\n```\nlet bytes = 0x12u8.to_be_bytes();\nassert_eq!(bytes, [0x12]);\n```",
+ "docs": "Converts `self` to big endian from the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai128;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(n.to_be(), n)\n} else {\n assert_eq!(n.to_be(), n.swap_bytes())\n}\n```",
"id": 10849,
"inner": {
"function": {
@@ -69332,25 +67701,20 @@
],
"is_c_variadic": false,
"output": {
- "array": {
- "len": "1",
- "type": {
- "primitive": "u8"
- }
- }
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "to_be_bytes",
+ "name": "to_be",
"span": {
"begin": [
- 447,
+ 343,
5
],
"end": [
- 465,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -69410,7 +67774,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -69435,11 +67799,11 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -69449,10 +67813,10 @@
"10850": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -69462,7 +67826,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nlittle-endian byte order.\n\n\n**Note**: This function is meaningless on `u8`. Byte order does not exist as a\nconcept for byte-sized integers. This function is only provided in symmetry\nwith larger integer types.\n\n# Examples\n\n```\nlet bytes = 0x12u8.to_le_bytes();\nassert_eq!(bytes, [0x12]);\n```",
+ "docs": "Converts `self` to little endian from the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Ai128;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(n.to_le(), n)\n} else {\n assert_eq!(n.to_le(), n.swap_bytes())\n}\n```",
"id": 10850,
"inner": {
"function": {
@@ -69488,25 +67852,20 @@
],
"is_c_variadic": false,
"output": {
- "array": {
- "len": "1",
- "type": {
- "primitive": "u8"
- }
- }
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "to_le_bytes",
+ "name": "to_le",
"span": {
"begin": [
- 447,
+ 343,
5
],
"end": [
- 465,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -69516,10 +67875,10 @@
"10851": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -69529,7 +67888,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nnative byte order.\n\nAs the target platform's native endianness is used, portable code\nshould use [`to_be_bytes`] or [`to_le_bytes`], as appropriate,\ninstead.\n\n\n**Note**: This function is meaningless on `u8`. Byte order does not exist as a\nconcept for byte-sized integers. This function is only provided in symmetry\nwith larger integer types.\n\n[`to_be_bytes`]: Self::to_be_bytes\n[`to_le_bytes`]: Self::to_le_bytes\n\n# Examples\n\n```\nlet bytes = 0x12u8.to_ne_bytes();\nassert_eq!(\n bytes,\n if cfg!(target_endian = \"big\") {\n [0x12]\n } else {\n [0x12]\n }\n);\n```",
+ "docs": "Checked integer addition. Computes `self + rhs`, returning `None`\nif overflow occurred.\n\n# Examples\n\n```\nassert_eq!((i128::MAX - 2).checked_add(1), Some(i128::MAX - 1));\nassert_eq!((i128::MAX - 2).checked_add(3), None);\n```",
"id": 10851,
"inner": {
"function": {
@@ -69551,32 +67910,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i128"
+ }
]
],
"is_c_variadic": false,
"output": {
- "array": {
- "len": "1",
- "type": {
- "primitive": "u8"
- }
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i128"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
}
}
}
}
},
- "links": {
- "Self::to_be_bytes": 10849,
- "Self::to_le_bytes": 10850
- },
- "name": "to_ne_bytes",
+ "links": {},
+ "name": "checked_add",
"span": {
"begin": [
- 447,
+ 343,
5
],
"end": [
- 465,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -69586,20 +67958,23 @@
"10852": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Creates a native endian integer value from its representation\nas a byte array in big endian.\n\n\n**Note**: This function is meaningless on `u8`. Byte order does not exist as a\nconcept for byte-sized integers. This function is only provided in symmetry\nwith larger integer types.\n\n# Examples\n\n```\nlet value = u8::from_be_bytes([0x12]);\nassert_eq!(value, 0x12);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_be_u8(input: &mut &[u8]) -> u8 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n u8::from_be_bytes(int_bytes.try_into().unwrap())\n}\n```",
+ "docs": "Strict integer addition. Computes `self + rhs`, panicking\nif overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((i128::MAX - 2).strict_add(1), i128::MAX - 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i128::MAX - 2).strict_add(3);\n```",
"id": 10852,
"inner": {
"function": {
@@ -69617,33 +67992,34 @@
"sig": {
"inputs": [
[
- "bytes",
+ "self",
{
- "array": {
- "len": "1",
- "type": {
- "primitive": "u8"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "from_be_bytes",
+ "name": "strict_add",
"span": {
"begin": [
- 447,
+ 343,
5
],
"end": [
- 465,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -69653,20 +68029,20 @@
"10853": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Creates a native endian integer value from its representation\nas a byte array in little endian.\n\n\n**Note**: This function is meaningless on `u8`. Byte order does not exist as a\nconcept for byte-sized integers. This function is only provided in symmetry\nwith larger integer types.\n\n# Examples\n\n```\nlet value = u8::from_le_bytes([0x12]);\nassert_eq!(value, 0x12);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_le_u8(input: &mut &[u8]) -> u8 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n u8::from_le_bytes(int_bytes.try_into().unwrap())\n}\n```",
+ "docs": "Wrapping (modular) addition. Computes `self + rhs`, wrapping around at the\nboundary of the type.\n\n# Examples\n\n```\nassert_eq!(100i128.wrapping_add(27), 127);\nassert_eq!(i128::MAX.wrapping_add(2), i128::MIN + 1);\n```",
"id": 10853,
"inner": {
"function": {
@@ -69684,33 +68060,34 @@
"sig": {
"inputs": [
[
- "bytes",
+ "self",
{
- "array": {
- "len": "1",
- "type": {
- "primitive": "u8"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "from_le_bytes",
+ "name": "wrapping_add",
"span": {
"begin": [
- 447,
+ 343,
5
],
"end": [
- 465,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -69720,20 +68097,23 @@
"10854": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Creates a native endian integer value from its memory representation\nas a byte array in native endianness.\n\nAs the target platform's native endianness is used, portable code\nlikely wants to use [`from_be_bytes`] or [`from_le_bytes`], as\nappropriate instead.\n\n[`from_be_bytes`]: Self::from_be_bytes\n[`from_le_bytes`]: Self::from_le_bytes\n\n\n**Note**: This function is meaningless on `u8`. Byte order does not exist as a\nconcept for byte-sized integers. This function is only provided in symmetry\nwith larger integer types.\n\n# Examples\n\n```\nlet value = u8::from_ne_bytes(if cfg!(target_endian = \"big\") {\n [0x12]\n} else {\n [0x12]\n});\nassert_eq!(value, 0x12);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_ne_u8(input: &mut &[u8]) -> u8 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n u8::from_ne_bytes(int_bytes.try_into().unwrap())\n}\n```",
+ "docs": "Unchecked integer addition. Computes `self + rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_add(y)` is semantically equivalent to calling\n`x.`[`checked_add`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_add`].\n\n# Safety\n\nThis results in undefined behavior when\n`self + rhs > i128::MAX` or `self + rhs < i128::MIN`,\ni.e. when [`checked_add`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_add`]: i128::checked_add\n[`wrapping_add`]: i128::wrapping_add",
"id": 10854,
"inner": {
"function": {
@@ -69746,41 +68126,42 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
[
- "bytes",
+ "self",
{
- "array": {
- "len": "1",
- "type": {
- "primitive": "u8"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i128"
}
}
}
},
"links": {
- "Self::from_be_bytes": 10852,
- "Self::from_le_bytes": 10853
+ "i128::checked_add": 10851,
+ "i128::wrapping_add": 10853
},
- "name": "from_ne_bytes",
+ "name": "unchecked_add",
"span": {
"begin": [
- 447,
+ 343,
5
],
"end": [
- 465,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -69790,21 +68171,20 @@
"10855": {
"attrs": [
{
- "other": "#[rustc_diagnostic_item = \"u8_legacy_fn_min_value\"]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
- "deprecation": {
- "note": "replaced by the `MIN` associated constant on this type",
- "since": "TBD"
- },
- "docs": "New code should prefer to use\n[`u8::MIN`] instead.\n\nReturns the smallest value that can be represented by this integer type.",
+ "deprecation": null,
+ "docs": "Checked addition with an unsigned integer. Computes `self + rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1i128.checked_add_unsigned(2), Some(3));\nassert_eq!((i128::MAX - 2).checked_add_unsigned(3), None);\n```",
"id": 10855,
"inner": {
"function": {
@@ -69820,25 +68200,51 @@
"is_unsafe": false
},
"sig": {
- "inputs": [],
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u128"
+ }
+ ]
+ ],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i128"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
- "links": {
- "`u8::MIN`": 10733
- },
- "name": "min_value",
+ "links": {},
+ "name": "checked_add_unsigned",
"span": {
"begin": [
- 447,
+ 343,
5
],
"end": [
- 465,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -69848,21 +68254,23 @@
"10856": {
"attrs": [
{
- "other": "#[rustc_diagnostic_item = \"u8_legacy_fn_max_value\"]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
- "deprecation": {
- "note": "replaced by the `MAX` associated constant on this type",
- "since": "TBD"
- },
- "docs": "New code should prefer to use\n[`u8::MAX`] instead.\n\nReturns the largest value that can be represented by this integer type.",
+ "deprecation": null,
+ "docs": "Strict addition with an unsigned integer. Computes `self + rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1i128.strict_add_unsigned(2), 3);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i128::MAX - 2).strict_add_unsigned(3);\n```",
"id": 10856,
"inner": {
"function": {
@@ -69878,25 +68286,36 @@
"is_unsafe": false
},
"sig": {
- "inputs": [],
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u128"
+ }
+ ]
+ ],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i128"
}
}
}
},
- "links": {
- "`u8::MAX`": 10734
- },
- "name": "max_value",
+ "links": {},
+ "name": "strict_add_unsigned",
"span": {
"begin": [
- 447,
+ 343,
5
],
"end": [
- 465,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -69906,16 +68325,10 @@
"10857": {
"attrs": [
{
- "other": "#[doc(alias = \"average_floor\")]"
- },
- {
- "other": "#[doc(alias = \"average\")]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"num_midpoint\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"num_midpoint\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -69925,7 +68338,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the midpoint (average) between `self` and `rhs`.\n\n`midpoint(a, b)` is `(a + b) / 2` as if it were performed in a\nsufficiently-large unsigned integral type. This implies that the result is\nalways rounded towards zero and that no overflow will ever occur.\n\n# Examples\n\n```\nassert_eq!(0u8.midpoint(4), 2);\nassert_eq!(1u8.midpoint(4), 2);\n```",
+ "docs": "Checked integer subtraction. Computes `self - rhs`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!((i128::MIN + 2).checked_sub(1), Some(i128::MIN + 1));\nassert_eq!((i128::MIN + 2).checked_sub(3), None);\n```",
"id": 10857,
"inner": {
"function": {
@@ -69951,27 +68364,42 @@
[
"rhs",
{
- "primitive": "u8"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i128"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "midpoint",
+ "name": "checked_sub",
"span": {
"begin": [
- 466,
+ 343,
5
],
"end": [
- 466,
- 41
+ 364,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -69980,20 +68408,23 @@
"10858": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"const_u8_is_ascii\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 23, patch: 0})}, feature: \"ascii_methods_on_intrinsics\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checks if the value is within the ASCII range.\n\n# Examples\n\n```\nlet ascii = 97u8;\nlet non_ascii = 150u8;\n\nassert!(ascii.is_ascii());\nassert!(!non_ascii.is_ascii());\n```",
+ "docs": "Strict integer subtraction. Computes `self - rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((i128::MIN + 2).strict_sub(1), i128::MIN + 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i128::MIN + 2).strict_sub(3);\n```",
"id": 10858,
"inner": {
"function": {
@@ -70013,33 +68444,33 @@
[
"self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "is_ascii",
+ "name": "strict_sub",
"span": {
"begin": [
- 483,
+ 343,
5
],
"end": [
- 483,
- 41
+ 364,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -70048,17 +68479,20 @@
"10859": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 110998, is_soft: false}, feature: \"ascii_char\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "If the value of this byte is within the ASCII range, returns it as an\n[ASCII character](ascii::Char). Otherwise, returns `None`.",
+ "docs": "Wrapping (modular) subtraction. Computes `self - rhs`, wrapping around at the\nboundary of the type.\n\n# Examples\n\n```\nassert_eq!(0i128.wrapping_sub(127), -127);\nassert_eq!((-2i128).wrapping_sub(i128::MAX), i128::MAX);\n```",
"id": 10859,
"inner": {
"function": {
@@ -70078,54 +68512,33 @@
[
"self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 609,
- "path": "AsciiChar"
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i128"
}
}
}
},
- "links": {
- "ascii::Char": 609
- },
- "name": "as_ascii",
+ "links": {},
+ "name": "wrapping_sub",
"span": {
"begin": [
- 492,
+ 343,
5
],
"end": [
- 492,
- 56
+ 364,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -70209,7 +68622,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -70227,8 +68640,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -70244,7 +68657,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -70253,11 +68666,11 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -70267,17 +68680,23 @@
"10860": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 110998, is_soft: false}, feature: \"ascii_char\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts this byte to an [ASCII character](ascii::Char), without\nchecking whether or not it's valid.\n\n# Safety\n\nThis byte must be valid ASCII, or else this is UB.",
+ "docs": "Unchecked integer subtraction. Computes `self - rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_sub(y)` is semantically equivalent to calling\n`x.`[`checked_sub`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_sub`].\n\n# Safety\n\nThis results in undefined behavior when\n`self - rhs > i128::MAX` or `self - rhs < i128::MIN`,\ni.e. when [`checked_sub`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_sub`]: i128::checked_sub\n[`wrapping_sub`]: i128::wrapping_sub",
"id": 10860,
"inner": {
"function": {
@@ -70297,39 +68716,36 @@
[
"self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": null,
- "id": 609,
- "path": "AsciiChar"
- }
+ "primitive": "i128"
}
}
}
},
"links": {
- "ascii::Char": 609
+ "i128::checked_sub": 10857,
+ "i128::wrapping_sub": 10859
},
- "name": "as_ascii_unchecked",
+ "name": "unchecked_sub",
"span": {
"begin": [
- 505,
+ 343,
5
],
"end": [
- 505,
- 65
+ 364,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -70338,15 +68754,20 @@
"10861": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"const_make_ascii\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 23, patch: 0})}, feature: \"ascii_methods_on_intrinsics\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts this value to its ASCII upper case equivalent in-place.\n\nASCII letters 'a' to 'z' are mapped to 'A' to 'Z',\nbut non-ASCII letters are unchanged.\n\nTo return a new uppercased value without modifying the existing one, use\n[`to_ascii_uppercase`].\n\n# Examples\n\n```\nlet mut byte = b'a';\n\nbyte.make_ascii_uppercase();\n\nassert_eq!(b'A', byte);\n```\n\n[`to_ascii_uppercase`]: Self::to_ascii_uppercase",
+ "docs": "Checked subtraction with an unsigned integer. Computes `self - rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1i128.checked_sub_unsigned(2), Some(-1));\nassert_eq!((i128::MIN + 2).checked_sub_unsigned(3), None);\n```",
"id": 10861,
"inner": {
"function": {
@@ -70366,33 +68787,48 @@
[
"self",
{
- "borrowed_ref": {
- "is_mutable": true,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
- "output": null
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i128"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
}
}
},
- "links": {
- "Self::to_ascii_uppercase": 10862
- },
- "name": "make_ascii_uppercase",
+ "links": {},
+ "name": "checked_sub_unsigned",
"span": {
"begin": [
- 613,
+ 343,
5
],
"end": [
- 613,
- 49
+ 364,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -70401,20 +68837,23 @@
"10862": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_ascii_methods_on_intrinsics\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 23, patch: 0})}, feature: \"ascii_methods_on_intrinsics\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
- "reason": "to uppercase the value in-place, use `make_ascii_uppercase()`"
+ "reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Makes a copy of the value in its ASCII upper case equivalent.\n\nASCII letters 'a' to 'z' are mapped to 'A' to 'Z',\nbut non-ASCII letters are unchanged.\n\nTo uppercase the value in-place, use [`make_ascii_uppercase`].\n\n# Examples\n\n```\nlet lowercase_a = 97u8;\n\nassert_eq!(65, lowercase_a.to_ascii_uppercase());\n```\n\n[`make_ascii_uppercase`]: Self::make_ascii_uppercase",
+ "docs": "Strict subtraction with an unsigned integer. Computes `self - rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1i128.strict_sub_unsigned(2), -1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (i128::MIN + 2).strict_sub_unsigned(3);\n```",
"id": 10862,
"inner": {
"function": {
@@ -70434,35 +68873,33 @@
[
"self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i128"
}
}
}
},
- "links": {
- "Self::make_ascii_uppercase": 10861
- },
- "name": "to_ascii_uppercase",
+ "links": {},
+ "name": "strict_sub_unsigned",
"span": {
"begin": [
- 536,
+ 343,
5
],
"end": [
- 536,
- 49
+ 364,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -70471,15 +68908,20 @@
"10863": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"const_make_ascii\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 23, patch: 0})}, feature: \"ascii_methods_on_intrinsics\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts this value to its ASCII lower case equivalent in-place.\n\nASCII letters 'A' to 'Z' are mapped to 'a' to 'z',\nbut non-ASCII letters are unchanged.\n\nTo return a new lowercased value without modifying the existing one, use\n[`to_ascii_lowercase`].\n\n# Examples\n\n```\nlet mut byte = b'A';\n\nbyte.make_ascii_lowercase();\n\nassert_eq!(b'a', byte);\n```\n\n[`to_ascii_lowercase`]: Self::to_ascii_lowercase",
+ "docs": "Checked integer multiplication. Computes `self * rhs`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(i128::MAX.checked_mul(1), Some(i128::MAX));\nassert_eq!(i128::MAX.checked_mul(2), None);\n```",
"id": 10863,
"inner": {
"function": {
@@ -70499,33 +68941,48 @@
[
"self",
{
- "borrowed_ref": {
- "is_mutable": true,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
- "output": null
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i128"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
}
}
},
- "links": {
- "Self::to_ascii_lowercase": 10864
- },
- "name": "make_ascii_lowercase",
+ "links": {},
+ "name": "checked_mul",
"span": {
"begin": [
- 639,
+ 343,
5
],
"end": [
- 639,
- 49
+ 364,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -70534,20 +68991,23 @@
"10864": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_ascii_methods_on_intrinsics\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 23, patch: 0})}, feature: \"ascii_methods_on_intrinsics\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
- "reason": "to lowercase the value in-place, use `make_ascii_lowercase()`"
+ "reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Makes a copy of the value in its ASCII lower case equivalent.\n\nASCII letters 'A' to 'Z' are mapped to 'a' to 'z',\nbut non-ASCII letters are unchanged.\n\nTo lowercase the value in-place, use [`make_ascii_lowercase`].\n\n# Examples\n\n```\nlet uppercase_a = 65u8;\n\nassert_eq!(97, uppercase_a.to_ascii_lowercase());\n```\n\n[`make_ascii_lowercase`]: Self::make_ascii_lowercase",
+ "docs": "Strict integer multiplication. Computes `self * rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(i128::MAX.strict_mul(1), i128::MAX);\n```\n\nThe following panics because of overflow:\n\n``` should_panic\nlet _ = i128::MAX.strict_mul(2);\n```",
"id": 10864,
"inner": {
"function": {
@@ -70567,35 +69027,33 @@
[
"self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u8"
+ "primitive": "i128"
}
}
}
},
- "links": {
- "Self::make_ascii_lowercase": 10863
- },
- "name": "to_ascii_lowercase",
+ "links": {},
+ "name": "strict_mul",
"span": {
"begin": [
- 561,
+ 343,
5
],
"end": [
- 561,
- 49
+ 364,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -70604,15 +69062,20 @@
"10865": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_ascii_methods_on_intrinsics\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 23, patch: 0})}, feature: \"ascii_methods_on_intrinsics\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checks that two values are an ASCII case-insensitive match.\n\nThis is equivalent to `to_ascii_lowercase(a) == to_ascii_lowercase(b)`.\n\n# Examples\n\n```\nlet lowercase_a = 97u8;\nlet uppercase_a = 65u8;\n\nassert!(lowercase_a.eq_ignore_ascii_case(&uppercase_a));\n```",
+ "docs": "Wrapping (modular) multiplication. Computes `self * rhs`, wrapping around at\nthe boundary of the type.\n\n# Examples\n\n```\nassert_eq!(10i128.wrapping_mul(12), 120);\nassert_eq!(11i8.wrapping_mul(12), -124);\n```",
"id": 10865,
"inner": {
"function": {
@@ -70632,45 +69095,33 @@
[
"self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
+ "generic": "Self"
}
],
[
- "other",
+ "rhs",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "primitive": "u8"
- }
- }
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "eq_ignore_ascii_case",
+ "name": "wrapping_mul",
"span": {
"begin": [
- 587,
+ 343,
5
],
"end": [
- 587,
- 65
+ 364,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -70679,20 +69130,23 @@
"10866": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_ascii_ctype_on_intrinsics\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 24, patch: 0})}, feature: \"ascii_ctype_on_intrinsics\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checks if the value is an ASCII alphabetic character:\n\n- U+0041 'A' ..= U+005A 'Z', or\n- U+0061 'a' ..= U+007A 'z'.\n\n# Examples\n\n```\nlet uppercase_a = b'A';\nlet uppercase_g = b'G';\nlet a = b'a';\nlet g = b'g';\nlet zero = b'0';\nlet percent = b'%';\nlet space = b' ';\nlet lf = b'\\n';\nlet esc = b'\\x1b';\n\nassert!(uppercase_a.is_ascii_alphabetic());\nassert!(uppercase_g.is_ascii_alphabetic());\nassert!(a.is_ascii_alphabetic());\nassert!(g.is_ascii_alphabetic());\nassert!(!zero.is_ascii_alphabetic());\nassert!(!percent.is_ascii_alphabetic());\nassert!(!space.is_ascii_alphabetic());\nassert!(!lf.is_ascii_alphabetic());\nassert!(!esc.is_ascii_alphabetic());\n```",
+ "docs": "Unchecked integer multiplication. Computes `self * rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_mul(y)` is semantically equivalent to calling\n`x.`[`checked_mul`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_mul`].\n\n# Safety\n\nThis results in undefined behavior when\n`self * rhs > i128::MAX` or `self * rhs < i128::MIN`,\ni.e. when [`checked_mul`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_mul`]: i128::checked_mul\n[`wrapping_mul`]: i128::wrapping_mul",
"id": 10866,
"inner": {
"function": {
@@ -70705,40 +69159,43 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
[
"self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "primitive": "i128"
}
}
}
},
- "links": {},
- "name": "is_ascii_alphabetic",
+ "links": {
+ "i128::checked_mul": 10863,
+ "i128::wrapping_mul": 10865
+ },
+ "name": "unchecked_mul",
"span": {
"begin": [
- 675,
+ 343,
5
],
"end": [
- 675,
- 52
+ 364,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -70747,20 +69204,20 @@
"10867": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_ascii_ctype_on_intrinsics\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 24, patch: 0})}, feature: \"ascii_ctype_on_intrinsics\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checks if the value is an ASCII uppercase character:\nU+0041 'A' ..= U+005A 'Z'.\n\n# Examples\n\n```\nlet uppercase_a = b'A';\nlet uppercase_g = b'G';\nlet a = b'a';\nlet g = b'g';\nlet zero = b'0';\nlet percent = b'%';\nlet space = b' ';\nlet lf = b'\\n';\nlet esc = b'\\x1b';\n\nassert!(uppercase_a.is_ascii_uppercase());\nassert!(uppercase_g.is_ascii_uppercase());\nassert!(!a.is_ascii_uppercase());\nassert!(!g.is_ascii_uppercase());\nassert!(!zero.is_ascii_uppercase());\nassert!(!percent.is_ascii_uppercase());\nassert!(!space.is_ascii_uppercase());\nassert!(!lf.is_ascii_uppercase());\nassert!(!esc.is_ascii_uppercase());\n```",
+ "docs": "Checked integer division. Computes `self / rhs`, returning `None` if `rhs == 0`\nor the division results in overflow.\n\n# Examples\n\n```\nassert_eq!((i128::MIN + 1).checked_div(-1), Some(170141183460469231731687303715884105727));\nassert_eq!(i128::MIN.checked_div(-1), None);\nassert_eq!((1i128).checked_div(0), None);\n```",
"id": 10867,
"inner": {
"function": {
@@ -70780,33 +69237,48 @@
[
"self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i128"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "is_ascii_uppercase",
+ "name": "checked_div",
"span": {
"begin": [
- 709,
+ 343,
5
],
"end": [
- 709,
- 51
+ 364,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -70815,20 +69287,23 @@
"10868": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_ascii_ctype_on_intrinsics\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 24, patch: 0})}, feature: \"ascii_ctype_on_intrinsics\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checks if the value is an ASCII lowercase character:\nU+0061 'a' ..= U+007A 'z'.\n\n# Examples\n\n```\nlet uppercase_a = b'A';\nlet uppercase_g = b'G';\nlet a = b'a';\nlet g = b'g';\nlet zero = b'0';\nlet percent = b'%';\nlet space = b' ';\nlet lf = b'\\n';\nlet esc = b'\\x1b';\n\nassert!(!uppercase_a.is_ascii_lowercase());\nassert!(!uppercase_g.is_ascii_lowercase());\nassert!(a.is_ascii_lowercase());\nassert!(g.is_ascii_lowercase());\nassert!(!zero.is_ascii_lowercase());\nassert!(!percent.is_ascii_lowercase());\nassert!(!space.is_ascii_lowercase());\nassert!(!lf.is_ascii_lowercase());\nassert!(!esc.is_ascii_lowercase());\n```",
+ "docs": "Strict integer division. Computes `self / rhs`, panicking\nif overflow occurred.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type.\n\n# Examples\n\n```\nassert_eq!((i128::MIN + 1).strict_div(-1), 170141183460469231731687303715884105727);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i128::MIN.strict_div(-1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1i128).strict_div(0);\n```",
"id": 10868,
"inner": {
"function": {
@@ -70848,33 +69323,33 @@
[
"self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "is_ascii_lowercase",
+ "name": "strict_div",
"span": {
"begin": [
- 743,
+ 343,
5
],
"end": [
- 743,
- 51
+ 364,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -70883,20 +69358,20 @@
"10869": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_ascii_ctype_on_intrinsics\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 24, patch: 0})}, feature: \"ascii_ctype_on_intrinsics\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checks if the value is an ASCII alphanumeric character:\n\n- U+0041 'A' ..= U+005A 'Z', or\n- U+0061 'a' ..= U+007A 'z', or\n- U+0030 '0' ..= U+0039 '9'.\n\n# Examples\n\n```\nlet uppercase_a = b'A';\nlet uppercase_g = b'G';\nlet a = b'a';\nlet g = b'g';\nlet zero = b'0';\nlet percent = b'%';\nlet space = b' ';\nlet lf = b'\\n';\nlet esc = b'\\x1b';\n\nassert!(uppercase_a.is_ascii_alphanumeric());\nassert!(uppercase_g.is_ascii_alphanumeric());\nassert!(a.is_ascii_alphanumeric());\nassert!(g.is_ascii_alphanumeric());\nassert!(zero.is_ascii_alphanumeric());\nassert!(!percent.is_ascii_alphanumeric());\nassert!(!space.is_ascii_alphanumeric());\nassert!(!lf.is_ascii_alphanumeric());\nassert!(!esc.is_ascii_alphanumeric());\n```",
+ "docs": "Checked Euclidean division. Computes `self.div_euclid(rhs)`,\nreturning `None` if `rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!((i128::MIN + 1).checked_div_euclid(-1), Some(170141183460469231731687303715884105727));\nassert_eq!(i128::MIN.checked_div_euclid(-1), None);\nassert_eq!((1i128).checked_div_euclid(0), None);\n```",
"id": 10869,
"inner": {
"function": {
@@ -70916,33 +69391,48 @@
[
"self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i128"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "is_ascii_alphanumeric",
+ "name": "checked_div_euclid",
"span": {
"begin": [
- 780,
+ 343,
5
],
"end": [
- 780,
- 54
+ 364,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -71044,8 +69534,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -71061,7 +69551,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -71070,11 +69560,11 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -71084,20 +69574,23 @@
"10870": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_ascii_ctype_on_intrinsics\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 24, patch: 0})}, feature: \"ascii_ctype_on_intrinsics\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checks if the value is an ASCII decimal digit:\nU+0030 '0' ..= U+0039 '9'.\n\n# Examples\n\n```\nlet uppercase_a = b'A';\nlet uppercase_g = b'G';\nlet a = b'a';\nlet g = b'g';\nlet zero = b'0';\nlet percent = b'%';\nlet space = b' ';\nlet lf = b'\\n';\nlet esc = b'\\x1b';\n\nassert!(!uppercase_a.is_ascii_digit());\nassert!(!uppercase_g.is_ascii_digit());\nassert!(!a.is_ascii_digit());\nassert!(!g.is_ascii_digit());\nassert!(zero.is_ascii_digit());\nassert!(!percent.is_ascii_digit());\nassert!(!space.is_ascii_digit());\nassert!(!lf.is_ascii_digit());\nassert!(!esc.is_ascii_digit());\n```",
+ "docs": "Strict Euclidean division. Computes `self.div_euclid(rhs)`, panicking\nif overflow occurred.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type.\n\n# Examples\n\n```\nassert_eq!((i128::MIN + 1).strict_div_euclid(-1), 170141183460469231731687303715884105727);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i128::MIN.strict_div_euclid(-1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1i128).strict_div_euclid(0);\n```",
"id": 10870,
"inner": {
"function": {
@@ -71117,33 +69610,33 @@
[
"self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "is_ascii_digit",
+ "name": "strict_div_euclid",
"span": {
"begin": [
- 814,
+ 343,
5
],
"end": [
- 814,
- 47
+ 364,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -71152,17 +69645,17 @@
"10871": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 101288, is_soft: false}, feature: \"is_ascii_octdigit\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checks if the value is an ASCII octal digit:\nU+0030 '0' ..= U+0037 '7'.\n\n# Examples\n\n```\n#![feature(is_ascii_octdigit)]\n\nlet uppercase_a = b'A';\nlet a = b'a';\nlet zero = b'0';\nlet seven = b'7';\nlet nine = b'9';\nlet percent = b'%';\nlet lf = b'\\n';\n\nassert!(!uppercase_a.is_ascii_octdigit());\nassert!(!a.is_ascii_octdigit());\nassert!(zero.is_ascii_octdigit());\nassert!(seven.is_ascii_octdigit());\nassert!(!nine.is_ascii_octdigit());\nassert!(!percent.is_ascii_octdigit());\nassert!(!lf.is_ascii_octdigit());\n```",
+ "docs": "Checked integer division without remainder. Computes `self / rhs`,\nreturning `None` if `rhs == 0`, the division results in overflow,\nor `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!((i128::MIN + 1).checked_exact_div(-1), Some(170141183460469231731687303715884105727));\nassert_eq!((-5i128).checked_exact_div(2), None);\nassert_eq!(i128::MIN.checked_exact_div(-1), None);\nassert_eq!((1i128).checked_exact_div(0), None);\n```",
"id": 10871,
"inner": {
"function": {
@@ -71182,33 +69675,48 @@
[
"self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i128"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "is_ascii_octdigit",
+ "name": "checked_exact_div",
"span": {
"begin": [
- 845,
+ 343,
5
],
"end": [
- 845,
- 50
+ 364,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -71217,20 +69725,17 @@
"10872": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_ascii_ctype_on_intrinsics\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 24, patch: 0})}, feature: \"ascii_ctype_on_intrinsics\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checks if the value is an ASCII hexadecimal digit:\n\n- U+0030 '0' ..= U+0039 '9', or\n- U+0041 'A' ..= U+0046 'F', or\n- U+0061 'a' ..= U+0066 'f'.\n\n# Examples\n\n```\nlet uppercase_a = b'A';\nlet uppercase_g = b'G';\nlet a = b'a';\nlet g = b'g';\nlet zero = b'0';\nlet percent = b'%';\nlet space = b' ';\nlet lf = b'\\n';\nlet esc = b'\\x1b';\n\nassert!(uppercase_a.is_ascii_hexdigit());\nassert!(!uppercase_g.is_ascii_hexdigit());\nassert!(a.is_ascii_hexdigit());\nassert!(!g.is_ascii_hexdigit());\nassert!(zero.is_ascii_hexdigit());\nassert!(!percent.is_ascii_hexdigit());\nassert!(!space.is_ascii_hexdigit());\nassert!(!lf.is_ascii_hexdigit());\nassert!(!esc.is_ascii_hexdigit());\n```",
+ "docs": "Checked integer division without remainder. Computes `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs == 0`, the division results in overflow,\nor `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64i128.exact_div(2), 32);\nassert_eq!(64i128.exact_div(32), 2);\nassert_eq!((i128::MIN + 1).exact_div(-1), 170141183460469231731687303715884105727);\n```\n\n```should_panic\n#![feature(exact_div)]\nlet _ = 65i128.exact_div(2);\n```\n```should_panic\n#![feature(exact_div)]\nlet _ = i128::MIN.exact_div(-1);\n```",
"id": 10872,
"inner": {
"function": {
@@ -71250,33 +69755,33 @@
[
"self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "is_ascii_hexdigit",
+ "name": "exact_div",
"span": {
"begin": [
- 882,
+ 343,
5
],
"end": [
- 882,
- 50
+ 364,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -71285,20 +69790,17 @@
"10873": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_ascii_ctype_on_intrinsics\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 24, patch: 0})}, feature: \"ascii_ctype_on_intrinsics\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checks if the value is an ASCII punctuation character:\n\n- U+0021 ..= U+002F `! \" # $ % & ' ( ) * + , - . /`, or\n- U+003A ..= U+0040 `: ; < = > ? @`, or\n- U+005B ..= U+0060 `` [ \\ ] ^ _ ` ``, or\n- U+007B ..= U+007E `{ | } ~`\n\n# Examples\n\n```\nlet uppercase_a = b'A';\nlet uppercase_g = b'G';\nlet a = b'a';\nlet g = b'g';\nlet zero = b'0';\nlet percent = b'%';\nlet space = b' ';\nlet lf = b'\\n';\nlet esc = b'\\x1b';\n\nassert!(!uppercase_a.is_ascii_punctuation());\nassert!(!uppercase_g.is_ascii_punctuation());\nassert!(!a.is_ascii_punctuation());\nassert!(!g.is_ascii_punctuation());\nassert!(!zero.is_ascii_punctuation());\nassert!(percent.is_ascii_punctuation());\nassert!(!space.is_ascii_punctuation());\nassert!(!lf.is_ascii_punctuation());\nassert!(!esc.is_ascii_punctuation());\n```",
+ "docs": "Unchecked integer division without remainder. Computes `self / rhs`.\n\n# Safety\n\nThis results in undefined behavior when `rhs == 0`, `self % rhs != 0`, or\n`self == i128::MIN && rhs == -1`,\ni.e. when [`checked_exact_div`](Self::checked_exact_div) would return `None`.",
"id": 10873,
"inner": {
"function": {
@@ -71311,40 +69813,42 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
[
"self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "primitive": "i128"
}
}
}
},
- "links": {},
- "name": "is_ascii_punctuation",
+ "links": {
+ "Self::checked_exact_div": 10871
+ },
+ "name": "unchecked_exact_div",
"span": {
"begin": [
- 920,
+ 343,
5
],
"end": [
- 920,
- 53
+ 364,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -71353,20 +69857,20 @@
"10874": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_ascii_ctype_on_intrinsics\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 24, patch: 0})}, feature: \"ascii_ctype_on_intrinsics\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checks if the value is an ASCII graphic character:\nU+0021 '!' ..= U+007E '~'.\n\n# Examples\n\n```\nlet uppercase_a = b'A';\nlet uppercase_g = b'G';\nlet a = b'a';\nlet g = b'g';\nlet zero = b'0';\nlet percent = b'%';\nlet space = b' ';\nlet lf = b'\\n';\nlet esc = b'\\x1b';\n\nassert!(uppercase_a.is_ascii_graphic());\nassert!(uppercase_g.is_ascii_graphic());\nassert!(a.is_ascii_graphic());\nassert!(g.is_ascii_graphic());\nassert!(zero.is_ascii_graphic());\nassert!(percent.is_ascii_graphic());\nassert!(!space.is_ascii_graphic());\nassert!(!lf.is_ascii_graphic());\nassert!(!esc.is_ascii_graphic());\n```",
+ "docs": "Checked integer remainder. Computes `self % rhs`, returning `None` if\n`rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!(5i128.checked_rem(2), Some(1));\nassert_eq!(5i128.checked_rem(0), None);\nassert_eq!(i128::MIN.checked_rem(-1), None);\n```",
"id": 10874,
"inner": {
"function": {
@@ -71386,33 +69890,48 @@
[
"self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i128"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "is_ascii_graphic",
+ "name": "checked_rem",
"span": {
"begin": [
- 957,
+ 343,
5
],
"end": [
- 957,
- 49
+ 364,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -71421,20 +69940,23 @@
"10875": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_ascii_ctype_on_intrinsics\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 24, patch: 0})}, feature: \"ascii_ctype_on_intrinsics\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checks if the value is an ASCII control character:\nU+0000 NUL ..= U+001F UNIT SEPARATOR, or U+007F DELETE.\nNote that most ASCII whitespace characters are control\ncharacters, but SPACE is not.\n\n# Examples\n\n```\nlet uppercase_a = b'A';\nlet uppercase_g = b'G';\nlet a = b'a';\nlet g = b'g';\nlet zero = b'0';\nlet percent = b'%';\nlet space = b' ';\nlet lf = b'\\n';\nlet esc = b'\\x1b';\n\nassert!(!uppercase_a.is_ascii_control());\nassert!(!uppercase_g.is_ascii_control());\nassert!(!a.is_ascii_control());\nassert!(!g.is_ascii_control());\nassert!(!zero.is_ascii_control());\nassert!(!percent.is_ascii_control());\nassert!(!space.is_ascii_control());\nassert!(lf.is_ascii_control());\nassert!(esc.is_ascii_control());\n```",
+ "docs": "Strict integer remainder. Computes `self % rhs`, panicking if\nthe division results in overflow.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is `x % y` for `MIN / -1` on a\nsigned type (where `MIN` is the negative minimal value), which is invalid due to implementation artifacts.\n\n# Examples\n\n```\nassert_eq!(5i128.strict_rem(2), 1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5i128.strict_rem(0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i128::MIN.strict_rem(-1);\n```",
"id": 10875,
"inner": {
"function": {
@@ -71454,33 +69976,33 @@
[
"self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "is_ascii_control",
+ "name": "strict_rem",
"span": {
"begin": [
- 1044,
+ 343,
5
],
"end": [
- 1044,
- 49
+ 364,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -71489,17 +70011,20 @@
"10876": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"inherent_ascii_escape\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
- "reason": "this returns the escaped byte as an iterator, without modifying the original"
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns an iterator that produces an escaped version of a `u8`,\ntreating it as an ASCII character.\n\nThe behavior is identical to [`ascii::escape_default`].\n\n# Examples\n\n```\nassert_eq!(\"0\", b'0'.escape_ascii().to_string());\nassert_eq!(\"\\\\t\", b'\\t'.escape_ascii().to_string());\nassert_eq!(\"\\\\r\", b'\\r'.escape_ascii().to_string());\nassert_eq!(\"\\\\n\", b'\\n'.escape_ascii().to_string());\nassert_eq!(\"\\\\'\", b'\\''.escape_ascii().to_string());\nassert_eq!(\"\\\\\\\"\", b'\"'.escape_ascii().to_string());\nassert_eq!(\"\\\\\\\\\", b'\\\\'.escape_ascii().to_string());\nassert_eq!(\"\\\\x9d\", b'\\x9d'.escape_ascii().to_string());\n```",
+ "docs": "Checked Euclidean remainder. Computes `self.rem_euclid(rhs)`, returning `None`\nif `rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!(5i128.checked_rem_euclid(2), Some(1));\nassert_eq!(5i128.checked_rem_euclid(0), None);\nassert_eq!(i128::MIN.checked_rem_euclid(-1), None);\n```",
"id": 10876,
"inner": {
"function": {
@@ -71511,7 +70036,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -71521,236 +70046,139 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i128"
+ }
]
],
"is_c_variadic": false,
"output": {
"resolved_path": {
- "args": null,
- "id": 611,
- "path": "EscapeDefault"
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i128"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
}
}
}
}
},
- "links": {
- "`ascii::escape_default`": 613
- },
- "name": "escape_ascii",
+ "links": {},
+ "name": "checked_rem_euclid",
"span": {
"begin": [
- 1069,
+ 343,
5
],
"end": [
- 1069,
- 54
+ 364,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"10877": {
- "attrs": [],
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Strict Euclidean remainder. Computes `self.rem_euclid(rhs)`, panicking if\nthe division results in overflow.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is `x % y` for `MIN / -1` on a\nsigned type (where `MIN` is the negative minimal value), which is invalid due to implementation artifacts.\n\n# Examples\n\n```\nassert_eq!(5i128.strict_rem_euclid(2), 1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5i128.strict_rem_euclid(0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i128::MIN.strict_rem_euclid(-1);\n```",
"id": 10877,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "primitive": "u8"
- },
+ "function": {
"generics": {
"params": [],
"where_predicates": []
},
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 10733,
- 10734,
- 10735,
- 10736,
- 10737,
- 10739,
- 10740,
- 10741,
- 10742,
- 10743,
- 10744,
- 10745,
- 10746,
- 10747,
- 10147,
- 10748,
- 10749,
- 10750,
- 10751,
- 10752,
- 10753,
- 10754,
- 10755,
- 10756,
- 10757,
- 10759,
- 10760,
- 10761,
- 10762,
- 10763,
- 10765,
- 10766,
- 10767,
- 10768,
- 10769,
- 10770,
- 10772,
- 10773,
- 10774,
- 10775,
- 10776,
- 10777,
- 10778,
- 10779,
- 10780,
- 10781,
- 10782,
- 10783,
- 10784,
- 10785,
- 10738,
- 10786,
- 10787,
- 10788,
- 10789,
- 10790,
- 10791,
- 10792,
- 10793,
- 10794,
- 10795,
- 10796,
- 10797,
- 10798,
- 10799,
- 10800,
- 10801,
- 10802,
- 10803,
- 10804,
- 10805,
- 10806,
- 10807,
- 10808,
- 10758,
- 10809,
- 10764,
- 10810,
- 10771,
- 10811,
- 10812,
- 10813,
- 10814,
- 10815,
- 10816,
- 10817,
- 10818,
- 10819,
- 10109,
- 10820,
- 10821,
- 10113,
- 10822,
- 10823,
- 10824,
- 10826,
- 10825,
- 10827,
- 10828,
- 10829,
- 10830,
- 10831,
- 10832,
- 10833,
- 10834,
- 10835,
- 10836,
- 10837,
- 10838,
- 10839,
- 10840,
- 10841,
- 10842,
- 10843,
- 10844,
- 10845,
- 10846,
- 10847,
- 10848,
- 10849,
- 10850,
- 10851,
- 10852,
- 10853,
- 10854,
- 10855,
- 10856,
- 10857,
- 10858,
- 10859,
- 10860,
- 10862,
- 10864,
- 10865,
- 10861,
- 10863,
- 10866,
- 10867,
- 10868,
- 10869,
- 10870,
- 10871,
- 10872,
- 10873,
- 10874,
- 9546,
- 10875,
- 10876
- ],
- "provided_trait_methods": [],
- "trait": null
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i128"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "i128"
+ }
+ }
}
},
"links": {},
- "name": null,
+ "name": "strict_rem_euclid",
"span": {
"begin": [
- 446,
- 1
+ 343,
+ 5
],
"end": [
- 446,
- 8
+ 364,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"10878": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 82, patch: 0})}, feature: \"const_int_from_str\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from a string slice with digits in a given base.\n\nThe string is expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\nassert_eq!(u8::from_str_radix(\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\nassert!(u8::from_str_radix(\"1 \", 10).is_err());\n```",
+ "docs": "Checked negation. Computes `-self`, returning `None` if `self == MIN`.\n\n# Examples\n\n```\nassert_eq!(5i128.checked_neg(), Some(-5));\nassert_eq!(i128::MIN.checked_neg(), None);\n```",
"id": 10878,
"inner": {
"function": {
@@ -71768,21 +70196,9 @@
"sig": {
"inputs": [
[
- "src",
- {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "primitive": "str"
- }
- }
- }
- ],
- [
- "radix",
+ "self",
{
- "primitive": "u32"
+ "generic": "Self"
}
]
],
@@ -71794,39 +70210,30 @@
"args": [
{
"type": {
- "primitive": "u8"
- }
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 4784,
- "path": "ParseIntError"
- }
+ "primitive": "i128"
}
}
],
"constraints": []
}
},
- "id": 57,
- "path": "Result"
+ "id": 51,
+ "path": "Option"
}
}
}
}
},
"links": {},
- "name": "from_str_radix",
+ "name": "checked_neg",
"span": {
"begin": [
- 1631,
- 1
+ 343,
+ 5
],
"end": [
- 1631,
- 58
+ 364,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -71835,12 +70242,20 @@
"10879": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_neg\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from an ASCII-byte slice with decimal digits.\n\nThe characters are expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(u8::from_ascii(b\"+10\"), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(u8::from_ascii(b\"1 \").is_err());\n```",
+ "docs": "Unchecked negation. Computes `-self`, assuming overflow cannot occur.\n\n# Safety\n\nThis results in undefined behavior when\n`self == i128::MIN`,\ni.e. when [`checked_neg`] would return `None`.\n\n[`checked_neg`]: i128::checked_neg",
"id": 10879,
"inner": {
"function": {
@@ -71853,66 +70268,36 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
[
- "src",
+ "self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "slice": {
- "primitive": "u8"
- }
- }
- }
+ "generic": "Self"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u8"
- }
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 4784,
- "path": "ParseIntError"
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 57,
- "path": "Result"
- }
+ "primitive": "i128"
}
}
}
},
- "links": {},
- "name": "from_ascii",
+ "links": {
+ "i128::checked_neg": 10878
+ },
+ "name": "unchecked_neg",
"span": {
"begin": [
- 1631,
- 1
+ 343,
+ 5
],
"end": [
- 1631,
- 58
+ 364,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -71996,12 +70381,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -72024,12 +70409,23 @@
"10880": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from an ASCII-byte slice with digits in a given base.\n\nThe characters are expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(u8::from_ascii_radix(b\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(u8::from_ascii_radix(b\"1 \", 10).is_err());\n```",
+ "docs": "Strict negation. Computes `-self`, panicking if `self == MIN`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(5i128.strict_neg(), -5);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i128::MIN.strict_neg();\n```",
"id": 10880,
"inner": {
"function": {
@@ -72047,124 +70443,137 @@
"sig": {
"inputs": [
[
- "src",
- {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "slice": {
- "primitive": "u8"
- }
- }
- }
- }
- ],
- [
- "radix",
+ "self",
{
- "primitive": "u32"
+ "generic": "Self"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u8"
- }
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 4784,
- "path": "ParseIntError"
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 57,
- "path": "Result"
- }
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "from_ascii_radix",
+ "name": "strict_neg",
"span": {
"begin": [
- 1631,
- 1
+ 343,
+ 5
],
"end": [
- 1631,
- 58
+ 364,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"10881": {
- "attrs": [],
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Checked shift left. Computes `self << rhs`, returning `None` if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x1i128.checked_shl(4), Some(0x10));\nassert_eq!(0x1i128.checked_shl(129), None);\nassert_eq!(0x10i128.checked_shl(127), Some(0));\n```",
"id": 10881,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "primitive": "u8"
- },
+ "function": {
"generics": {
"params": [],
"where_predicates": []
},
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 10878,
- 10879,
- 10880
- ],
- "provided_trait_methods": [],
- "trait": null
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i128"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
}
},
"links": {},
- "name": null,
+ "name": "checked_shl",
"span": {
"begin": [
- 1631,
- 1
+ 343,
+ 5
],
"end": [
- 1631,
- 58
+ 364,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"10882": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 138215, is_soft: false}, feature: \"int_format_into\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Allows users to write an integer (in signed decimal format) into a variable `buf` of\ntype [`NumBuffer`] that is passed by the caller by mutable reference.\n\n# Examples\n\n```\n#![feature(int_format_into)]\nuse core::fmt::NumBuffer;\n\nlet n = 0u8;\nlet mut buf = NumBuffer::new();\nassert_eq!(n.format_into(&mut buf), \"0\");\n\nlet n1 = 32u8;\nassert_eq!(n1.format_into(&mut buf), \"32\");\n\nlet n2 = u8 :: MAX;\nassert_eq!(n2.format_into(&mut buf), u8 :: MAX.to_string());\n```",
+ "docs": "Strict shift left. Computes `self << rhs`, panicking if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x1i128.strict_shl(4), 0x10);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x1i128.strict_shl(129);\n```",
"id": 10882,
"inner": {
"function": {
@@ -72176,7 +70585,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -72188,131 +70597,166 @@
}
],
[
- "buf",
+ "rhs",
{
- "borrowed_ref": {
- "is_mutable": true,
- "lifetime": null,
- "type": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u8"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 10162,
- "path": "NumBuffer"
- }
- }
- }
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "primitive": "str"
- }
- }
+ "primitive": "i128"
}
}
}
},
- "links": {
- "`NumBuffer`": 10162
- },
- "name": "format_into",
+ "links": {},
+ "name": "strict_shl",
"span": {
"begin": [
- 562,
+ 343,
5
],
"end": [
- 562,
- 95
+ 364,
+ 6
],
- "filename": "checkouts/rust/library/core/src/fmt/num.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"10883": {
- "attrs": [],
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Unchecked shift left. Computes `self << rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shl`] would return `None`.\n\n[`checked_shl`]: i128::checked_shl",
"id": 10883,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "primitive": "u8"
- },
+ "function": {
"generics": {
"params": [],
"where_predicates": []
},
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 10882
- ],
- "provided_trait_methods": [],
- "trait": null
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": true
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "i128"
+ }
+ }
}
},
- "links": {},
- "name": null,
+ "links": {
+ "i128::checked_shl": 10881
+ },
+ "name": "unchecked_shl",
"span": {
"begin": [
- 562,
+ 343,
5
],
"end": [
- 562,
- 95
+ 364,
+ 6
],
- "filename": "checkouts/rust/library/core/src/fmt/num.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"10884": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "The smallest value that can be represented by this integer type.\n\n# Examples\n\n```\nassert_eq!(u16::MIN, 0);\n```",
+ "docs": "Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x1i128.unbounded_shl(4), 0x10);\nassert_eq!(0x1i128.unbounded_shl(129), 0);\n```",
"id": 10884,
"inner": {
- "assoc_const": {
- "type": {
- "primitive": "u16"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "value": "0"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "i128"
+ }
+ }
}
},
"links": {},
- "name": "MIN",
+ "name": "unbounded_shl",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -72322,30 +70766,77 @@
"10885": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "The largest value that can be represented by this integer type\n(216 − 1).\n\n# Examples\n\n```\nassert_eq!(u16::MAX, 65535);\n```",
+ "docs": "Exact shift left. Computes `self << rhs` as long as it can be reversed losslessly.\n\nReturns `None` if any bits that would be shifted out differ from the resulting sign bit\nor if `rhs` >=\n`i128::BITS`.\nOtherwise, returns `Some(self << rhs)`.\n\n# Examples\n\n```\n#![feature(exact_bitshifts)]\n\nassert_eq!(0x1i128.exact_shl(4), Some(0x10));\nassert_eq!(0x1i128.exact_shl(i128::BITS - 2), Some(1 << i128::BITS - 2));\nassert_eq!(0x1i128.exact_shl(i128::BITS - 1), None);\nassert_eq!((-0x2i128).exact_shl(i128::BITS - 2), Some(-0x2 << i128::BITS - 2));\nassert_eq!((-0x2i128).exact_shl(i128::BITS - 1), None);\n```",
"id": 10885,
"inner": {
- "assoc_const": {
- "type": {
- "primitive": "u16"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "value": "_"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i128"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
}
},
"links": {},
- "name": "MAX",
+ "name": "exact_shl",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -72355,30 +70846,64 @@
"10886": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 53, patch: 0})}, feature: \"int_bits_const\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "The size of this integer type in bits.\n\n# Examples\n\n```\nassert_eq!(u16::BITS, 16);\n```",
+ "docs": "Unchecked exact shift left. Computes `self << rhs`, assuming the operation can be\nlosslessly reversed and `rhs` cannot be larger than\n`i128::BITS`.\n\n# Safety\n\nThis results in undefined behavior when `rhs >= self.leading_zeros() && rhs >=\nself.leading_ones()` i.e. when\n[`i128::exact_shl`]\nwould return `None`.",
"id": 10886,
"inner": {
- "assoc_const": {
- "type": {
- "primitive": "u32"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "value": "_"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": true
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "i128"
+ }
+ }
}
},
- "links": {},
- "name": "BITS",
+ "links": {
+ "`i128::exact_shl`": 10885
+ },
+ "name": "unchecked_exact_shl",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -72388,16 +70913,10 @@
"10887": {
"attrs": [
{
- "other": "#[doc(alias = \"popcount\")]"
- },
- {
- "other": "#[doc(alias = \"popcnt\")]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -72407,7 +70926,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 0b01001100u16;\nassert_eq!(n.count_ones(), 3);\n\nlet max = u16::MAX;\nassert_eq!(max.count_ones(), 16);\n\nlet zero = 0u16;\nassert_eq!(zero.count_ones(), 0);\n```",
+ "docs": "Checked shift right. Computes `self >> rhs`, returning `None` if `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x10i128.checked_shr(4), Some(0x1));\nassert_eq!(0x10i128.checked_shr(128), None);\n```",
"id": 10887,
"inner": {
"function": {
@@ -72429,24 +70948,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i128"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "count_ones",
+ "name": "checked_shr",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -72456,20 +70996,23 @@
"10888": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of zeros in the binary representation of `self`.\n\n# Examples\n\n```\nlet zero = 0u16;\nassert_eq!(zero.count_zeros(), 16);\n\nlet max = u16::MAX;\nassert_eq!(max.count_zeros(), 0);\n```",
+ "docs": "Strict shift right. Computes `self >> rhs`, panicking `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x10i128.strict_shr(4), 0x1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10i128.strict_shr(128);\n```",
"id": 10888,
"inner": {
"function": {
@@ -72491,24 +71034,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "count_zeros",
+ "name": "strict_shr",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -72518,10 +71067,7 @@
"10889": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
},
{
"must_use": {
@@ -72534,7 +71080,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 2 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is zero.\n\n# Examples\n\n```\nassert_eq!(2u16.ilog2(), 1);\n```",
+ "docs": "Unchecked shift right. Computes `self >> rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shr`] would return `None`.\n\n[`checked_shr`]: i128::checked_shr",
"id": 10889,
"inner": {
"function": {
@@ -72547,7 +71093,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -72556,24 +71102,32 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i128"
}
}
}
},
- "links": {},
- "name": "ilog2",
+ "links": {
+ "i128::checked_shr": 10887
+ },
+ "name": "unchecked_shr",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -72685,10 +71239,10 @@
"10890": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
},
{
"must_use": {
@@ -72698,7 +71252,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of leading zeros in the binary representation of `self`.\n\nDepending on what you're doing with the value, you might also be interested in the\n[`ilog2`] function which returns a consistent number, even if the type widens.\n\n# Examples\n\n```\nlet n = u16::MAX >> 2;\nassert_eq!(n.leading_zeros(), 2);\n\nlet zero = 0u16;\nassert_eq!(zero.leading_zeros(), 16);\n\nlet max = u16::MAX;\nassert_eq!(max.leading_zeros(), 0);\n```\n[`ilog2`]: u16::ilog2",
+ "docs": "Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, which yields `0` for a positive number,\nand `-1` for a negative number.\n\n# Examples\n\n```\nassert_eq!(0x10i128.unbounded_shr(4), 0x1);\nassert_eq!(0x10i128.unbounded_shr(129), 0);\nassert_eq!(i128::MIN.unbounded_shr(129), -1);\n```",
"id": 10890,
"inner": {
"function": {
@@ -72720,26 +71274,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i128"
}
}
}
},
- "links": {
- "u16::ilog2": 10889
- },
- "name": "leading_zeros",
+ "links": {},
+ "name": "unbounded_shr",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -72749,10 +71307,7 @@
"10891": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
@@ -72762,7 +71317,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of trailing zeros in the binary representation\nof `self`.\n\n# Examples\n\n```\nlet n = 0b0101000u16;\nassert_eq!(n.trailing_zeros(), 3);\n\nlet zero = 0u16;\nassert_eq!(zero.trailing_zeros(), 16);\n\nlet max = u16::MAX;\nassert_eq!(max.trailing_zeros(), 0);\n```",
+ "docs": "Exact shift right. Computes `self >> rhs` as long as it can be reversed losslessly.\n\nReturns `None` if any non-zero bits would be shifted out or if `rhs` >=\n`i128::BITS`.\nOtherwise, returns `Some(self >> rhs)`.\n\n# Examples\n\n```\n#![feature(exact_bitshifts)]\n\nassert_eq!(0x10i128.exact_shr(4), Some(0x1));\nassert_eq!(0x10i128.exact_shr(5), None);\n```",
"id": 10891,
"inner": {
"function": {
@@ -72784,24 +71339,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i128"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "trailing_zeros",
+ "name": "exact_shr",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -72811,10 +71387,7 @@
"10892": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
@@ -72824,7 +71397,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of leading ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = !(u16::MAX >> 2);\nassert_eq!(n.leading_ones(), 2);\n\nlet zero = 0u16;\nassert_eq!(zero.leading_ones(), 0);\n\nlet max = u16::MAX;\nassert_eq!(max.leading_ones(), 16);\n```",
+ "docs": "Unchecked exact shift right. Computes `self >> rhs`, assuming the operation can be\nlosslessly reversed and `rhs` cannot be larger than\n`i128::BITS`.\n\n# Safety\n\nThis results in undefined behavior when `rhs > self.trailing_zeros() || rhs >=\ni128::BITS`\ni.e. when\n[`i128::exact_shr`]\nwould return `None`.",
"id": 10892,
"inner": {
"function": {
@@ -72837,7 +71410,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -72846,24 +71419,32 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i128"
}
}
}
},
- "links": {},
- "name": "leading_ones",
+ "links": {
+ "`i128::exact_shr`": 10891
+ },
+ "name": "unchecked_exact_shr",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -72873,10 +71454,10 @@
"10893": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
},
{
"must_use": {
@@ -72886,7 +71467,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of trailing ones in the binary representation\nof `self`.\n\n# Examples\n\n```\nlet n = 0b1010111u16;\nassert_eq!(n.trailing_ones(), 3);\n\nlet zero = 0u16;\nassert_eq!(zero.trailing_ones(), 0);\n\nlet max = u16::MAX;\nassert_eq!(max.trailing_ones(), 16);\n```",
+ "docs": "Checked absolute value. Computes `self.abs()`, returning `None` if\n`self == MIN`.\n\n# Examples\n\n```\nassert_eq!((-5i128).checked_abs(), Some(5));\nassert_eq!(i128::MIN.checked_abs(), None);\n```",
"id": 10893,
"inner": {
"function": {
@@ -72912,20 +71493,35 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i128"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "trailing_ones",
+ "name": "checked_abs",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -72935,17 +71531,23 @@
"10894": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 142326, is_soft: false}, feature: \"uint_bit_width\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the minimum number of bits required to represent `self`.\n\nThis method returns zero if `self` is zero.\n\n# Examples\n\n```\n#![feature(uint_bit_width)]\n\nassert_eq!(0_u16.bit_width(), 0);\nassert_eq!(0b111_u16.bit_width(), 3);\nassert_eq!(0b1110_u16.bit_width(), 4);\nassert_eq!(u16::MAX.bit_width(), 16);\n```",
+ "docs": "Strict absolute value. Computes `self.abs()`, panicking if\n`self == MIN`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((-5i128).strict_abs(), 5);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i128::MIN.strict_abs();\n```",
"id": 10894,
"inner": {
"function": {
@@ -72971,20 +71573,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "bit_width",
+ "name": "strict_abs",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -72994,7 +71596,10 @@
"10895": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
@@ -73004,7 +71609,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `self` with only the most significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: u16 = 0b_01100100;\n\nassert_eq!(n.isolate_highest_one(), 0b_01000000);\nassert_eq!(0_u16.isolate_highest_one(), 0);\n```",
+ "docs": "Checked exponentiation. Computes `self.pow(exp)`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(8i128.checked_pow(2), Some(64));\nassert_eq!(i128::MAX.checked_pow(2), None);\n```",
"id": 10895,
"inner": {
"function": {
@@ -73026,24 +71631,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "exp",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i128"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "isolate_highest_one",
+ "name": "checked_pow",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -73053,17 +71679,23 @@
"10896": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `self` with only the least significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: u16 = 0b_01100100;\n\nassert_eq!(n.isolate_lowest_one(), 0b_00000100);\nassert_eq!(0_u16.isolate_lowest_one(), 0);\n```",
+ "docs": "Strict exponentiation. Computes `self.pow(exp)`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(8i128.strict_pow(2), 64);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = i128::MAX.strict_pow(2);\n```",
"id": 10896,
"inner": {
"function": {
@@ -73085,24 +71717,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "exp",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "isolate_lowest_one",
+ "name": "strict_pow",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -73112,7 +71750,10 @@
"10897": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
},
{
"must_use": {
@@ -73122,7 +71763,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the index of the highest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_u16.highest_one(), None);\nassert_eq!(0x1_u16.highest_one(), Some(0));\nassert_eq!(0x10_u16.highest_one(), Some(4));\nassert_eq!(0x1f_u16.highest_one(), Some(4));\n```",
+ "docs": "Returns the square root of the number, rounded down.\n\nReturns `None` if `self` is negative.\n\n# Examples\n\n```\nassert_eq!(10i128.checked_isqrt(), Some(3));\n```",
"id": 10897,
"inner": {
"function": {
@@ -73154,7 +71795,7 @@
"args": [
{
"type": {
- "primitive": "u32"
+ "primitive": "i128"
}
}
],
@@ -73169,14 +71810,14 @@
}
},
"links": {},
- "name": "highest_one",
+ "name": "checked_isqrt",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -73186,7 +71827,10 @@
"10898": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -73196,7 +71840,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the index of the lowest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_u16.lowest_one(), None);\nassert_eq!(0x1_u16.lowest_one(), Some(0));\nassert_eq!(0x10_u16.lowest_one(), Some(4));\nassert_eq!(0x1f_u16.lowest_one(), Some(0));\n```",
+ "docs": "Saturating integer addition. Computes `self + rhs`, saturating at the numeric\nbounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i128.saturating_add(1), 101);\nassert_eq!(i128::MAX.saturating_add(100), i128::MAX);\nassert_eq!(i128::MIN.saturating_add(-1), i128::MIN);\n```",
"id": 10898,
"inner": {
"function": {
@@ -73218,39 +71862,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i128"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "lowest_one",
+ "name": "saturating_add",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -73260,10 +71895,10 @@
"10899": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -73273,7 +71908,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the bit pattern of `self` reinterpreted as a signed integer of the same size.\n\nThis produces the same result as an `as` cast, but ensures that the bit-width remains\nthe same.\n\n# Examples\n\n```\nlet n = u16::MAX;\n\nassert_eq!(n.cast_signed(), -1i16);\n```",
+ "docs": "Saturating addition with an unsigned integer. Computes `self + rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1i128.saturating_add_unsigned(2), 3);\nassert_eq!(i128::MAX.saturating_add_unsigned(100), i128::MAX);\n```",
"id": 10899,
"inner": {
"function": {
@@ -73295,24 +71930,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u128"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i16"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "cast_signed",
+ "name": "saturating_add_unsigned",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -73369,7 +72010,7 @@
"10900": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -73382,7 +72023,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts the bits to the left by a specified amount, `n`,\nwrapping the truncated bits to the end of the resulting integer.\n\nPlease note this isn't the same operation as the `<<` shifting operator!\n\n# Examples\n\n```\nlet n = 0xa003u16;\nlet m = 0x3a;\n\nassert_eq!(n.rotate_left(4), m);\n```",
+ "docs": "Saturating integer subtraction. Computes `self - rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i128.saturating_sub(127), -27);\nassert_eq!(i128::MIN.saturating_sub(100), i128::MIN);\nassert_eq!(i128::MAX.saturating_sub(-1), i128::MAX);\n```",
"id": 10900,
"inner": {
"function": {
@@ -73406,28 +72047,28 @@
}
],
[
- "n",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "rotate_left",
+ "name": "saturating_sub",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -73437,10 +72078,10 @@
"10901": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -73450,7 +72091,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts the bits to the right by a specified amount, `n`,\nwrapping the truncated bits to the beginning of the resulting\ninteger.\n\nPlease note this isn't the same operation as the `>>` shifting operator!\n\n# Examples\n\n```\nlet n = 0x3au16;\nlet m = 0xa003;\n\nassert_eq!(n.rotate_right(4), m);\n```",
+ "docs": "Saturating subtraction with an unsigned integer. Computes `self - rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i128.saturating_sub_unsigned(127), -27);\nassert_eq!(i128::MIN.saturating_sub_unsigned(100), i128::MIN);\n```",
"id": 10901,
"inner": {
"function": {
@@ -73474,28 +72115,28 @@
}
],
[
- "n",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "rotate_right",
+ "name": "saturating_sub_unsigned",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -73505,10 +72146,10 @@
"10902": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 45, patch: 0})}, feature: \"saturating_neg\"}}]"
},
{
"must_use": {
@@ -73518,7 +72159,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Reverses the byte order of the integer.\n\n# Examples\n\n```\nlet n = 0x1234u16;\nlet m = n.swap_bytes();\n\nassert_eq!(m, 0x3412);\n```",
+ "docs": "Saturating integer negation. Computes `-self`, returning `MAX` if `self == MIN`\ninstead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i128.saturating_neg(), -100);\nassert_eq!((-100i128).saturating_neg(), 100);\nassert_eq!(i128::MIN.saturating_neg(), i128::MAX);\nassert_eq!(i128::MAX.saturating_neg(), i128::MIN + 1);\n```",
"id": 10902,
"inner": {
"function": {
@@ -73544,20 +72185,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "swap_bytes",
+ "name": "saturating_neg",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -73567,10 +72208,10 @@
"10903": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 45, patch: 0})}, feature: \"saturating_neg\"}}]"
},
{
"must_use": {
@@ -73580,7 +72221,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\n second least-significant bit becomes second most-significant bit, etc.\n\n# Examples\n\n```\nlet n = 0x1234u16;\nlet m = n.reverse_bits();\n\nassert_eq!(m, 0x2c48);\nassert_eq!(0, 0u16.reverse_bits());\n```",
+ "docs": "Saturating absolute value. Computes `self.abs()`, returning `MAX` if `self ==\nMIN` instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100i128.saturating_abs(), 100);\nassert_eq!((-100i128).saturating_abs(), 100);\nassert_eq!(i128::MIN.saturating_abs(), i128::MAX);\nassert_eq!((i128::MIN + 1).saturating_abs(), i128::MAX);\n```",
"id": 10903,
"inner": {
"function": {
@@ -73606,20 +72247,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "reverse_bits",
+ "name": "saturating_abs",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -73629,20 +72270,20 @@
"10904": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts an integer from big endian to the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au16;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(u16::from_be(n), n)\n} else {\n assert_eq!(u16::from_be(n), n.swap_bytes())\n}\n```",
+ "docs": "Saturating integer multiplication. Computes `self * rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(10i128.saturating_mul(12), 120);\nassert_eq!(i128::MAX.saturating_mul(10), i128::MAX);\nassert_eq!(i128::MIN.saturating_mul(10), i128::MIN);\n```",
"id": 10904,
"inner": {
"function": {
@@ -73660,28 +72301,34 @@
"sig": {
"inputs": [
[
- "x",
+ "self",
{
- "primitive": "u16"
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "from_be",
+ "name": "saturating_mul",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -73691,20 +72338,20 @@
"10905": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts an integer from little endian to the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au16;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(u16::from_le(n), n)\n} else {\n assert_eq!(u16::from_le(n), n.swap_bytes())\n}\n```",
+ "docs": "Saturating integer division. Computes `self / rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i128.saturating_div(2), 2);\nassert_eq!(i128::MAX.saturating_div(-1), i128::MIN + 1);\nassert_eq!(i128::MIN.saturating_div(-1), i128::MAX);\n\n```",
"id": 10905,
"inner": {
"function": {
@@ -73722,28 +72369,34 @@
"sig": {
"inputs": [
[
- "x",
+ "self",
{
- "primitive": "u16"
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "from_le",
+ "name": "saturating_div",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -73753,10 +72406,10 @@
"10906": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
@@ -73766,7 +72419,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts `self` to big endian from the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au16;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(n.to_be(), n)\n} else {\n assert_eq!(n.to_be(), n.swap_bytes())\n}\n```",
+ "docs": "Saturating integer exponentiation. Computes `self.pow(exp)`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!((-4i128).saturating_pow(3), -64);\nassert_eq!(i128::MIN.saturating_pow(2), i128::MAX);\nassert_eq!(i128::MIN.saturating_pow(3), i128::MIN);\n```",
"id": 10906,
"inner": {
"function": {
@@ -73788,24 +72441,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "exp",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "to_be",
+ "name": "saturating_pow",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -73815,10 +72474,10 @@
"10907": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -73828,7 +72487,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts `self` to little endian from the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au16;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(n.to_le(), n)\n} else {\n assert_eq!(n.to_le(), n.swap_bytes())\n}\n```",
+ "docs": "Wrapping (modular) addition with an unsigned integer. Computes\n`self + rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(100i128.wrapping_add_unsigned(27), 127);\nassert_eq!(i128::MAX.wrapping_add_unsigned(2), i128::MIN + 1);\n```",
"id": 10907,
"inner": {
"function": {
@@ -73850,24 +72509,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u128"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "to_le",
+ "name": "wrapping_add_unsigned",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -73877,10 +72542,10 @@
"10908": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -73890,7 +72555,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer addition. Computes `self + rhs`, returning `None`\nif overflow occurred.\n\n# Examples\n\n```\nassert_eq!((u16::MAX - 2).checked_add(1), Some(u16::MAX - 1));\nassert_eq!((u16::MAX - 2).checked_add(3), None);\n```",
+ "docs": "Wrapping (modular) subtraction with an unsigned integer. Computes\n`self - rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(0i128.wrapping_sub_unsigned(127), -127);\nassert_eq!((-2i128).wrapping_sub_unsigned(u128::MAX), -1);\n```",
"id": 10908,
"inner": {
"function": {
@@ -73916,41 +72581,26 @@
[
"rhs",
{
- "primitive": "u16"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u16"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "checked_add",
+ "name": "wrapping_sub_unsigned",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -73960,23 +72610,20 @@
"10909": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer addition. Computes `self + rhs`, panicking\nif overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((u16::MAX - 2).strict_add(1), u16::MAX - 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (u16::MAX - 2).strict_add(3);\n```",
+ "docs": "Wrapping (modular) division. Computes `self / rhs`, wrapping around at the\nboundary of the type.\n\nThe only case where such wrapping can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type. In such a case, this function returns `MIN` itself.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i128.wrapping_div(10), 10);\nassert_eq!((-128i8).wrapping_div(-1), -128);\n```",
"id": 10909,
"inner": {
"function": {
@@ -74002,26 +72649,26 @@
[
"rhs",
{
- "primitive": "u16"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "strict_add",
+ "name": "wrapping_div",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -74098,7 +72745,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 109,
+ "id": 107,
"path": "Default"
}
}
@@ -74121,10 +72768,10 @@
"10910": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -74134,7 +72781,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) addition. Computes `self + rhs`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(200u16.wrapping_add(55), 255);\nassert_eq!(200u16.wrapping_add(u16::MAX), 199);\n```",
+ "docs": "Wrapping Euclidean division. Computes `self.div_euclid(rhs)`,\nwrapping around at the boundary of the type.\n\nWrapping will only occur in `MIN / -1` on a signed type (where `MIN` is the negative minimal value\nfor the type). This is equivalent to `-MIN`, a positive value that is too large to represent in the\ntype. In this case, this method returns `MIN` itself.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i128.wrapping_div_euclid(10), 10);\nassert_eq!((-128i8).wrapping_div_euclid(-1), -128);\n```",
"id": 10910,
"inner": {
"function": {
@@ -74160,26 +72807,26 @@
[
"rhs",
{
- "primitive": "u16"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "wrapping_add",
+ "name": "wrapping_div_euclid",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -74189,23 +72836,20 @@
"10911": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer addition. Computes `self + rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_add(y)` is semantically equivalent to calling\n`x.`[`checked_add`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_add`].\n\n# Safety\n\nThis results in undefined behavior when\n`self + rhs > u16::MAX` or `self + rhs < u16::MIN`,\ni.e. when [`checked_add`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_add`]: u16::checked_add\n[`wrapping_add`]: u16::wrapping_add",
+ "docs": "Wrapping (modular) remainder. Computes `self % rhs`, wrapping around at the\nboundary of the type.\n\nSuch wrap-around never actually occurs mathematically; implementation artifacts make `x % y`\ninvalid for `MIN / -1` on a signed type (where `MIN` is the negative minimal value). In such a case,\nthis function returns `0`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i128.wrapping_rem(10), 0);\nassert_eq!((-128i8).wrapping_rem(-1), 0);\n```",
"id": 10911,
"inner": {
"function": {
@@ -74218,7 +72862,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -74231,29 +72875,26 @@
[
"rhs",
{
- "primitive": "u16"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "i128"
}
}
}
},
- "links": {
- "u16::checked_add": 10908,
- "u16::wrapping_add": 10910
- },
- "name": "unchecked_add",
+ "links": {},
+ "name": "wrapping_rem",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -74263,10 +72904,10 @@
"10912": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -74276,7 +72917,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked addition with a signed integer. Computes `self + rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1u16.checked_add_signed(2), Some(3));\nassert_eq!(1u16.checked_add_signed(-2), None);\nassert_eq!((u16::MAX - 2).checked_add_signed(3), None);\n```",
+ "docs": "Wrapping Euclidean remainder. Computes `self.rem_euclid(rhs)`, wrapping around\nat the boundary of the type.\n\nWrapping will only occur in `MIN % -1` on a signed type (where `MIN` is the negative minimal value\nfor the type). In this case, this method returns 0.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100i128.wrapping_rem_euclid(10), 0);\nassert_eq!((-128i8).wrapping_rem_euclid(-1), 0);\n```",
"id": 10912,
"inner": {
"function": {
@@ -74302,41 +72943,26 @@
[
"rhs",
{
- "primitive": "i16"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u16"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "checked_add_signed",
+ "name": "wrapping_rem_euclid",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -74346,23 +72972,20 @@
"10913": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict addition with a signed integer. Computes `self + rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1u16.strict_add_signed(2), 3);\n```\n\nThe following panic because of overflow:\n\n```should_panic\nlet _ = 1u16.strict_add_signed(-2);\n```\n\n```should_panic\nlet _ = (u16::MAX - 2).strict_add_signed(3);\n```",
+ "docs": "Wrapping (modular) negation. Computes `-self`, wrapping around at the boundary\nof the type.\n\nThe only case where such wrapping can occur is when one negates `MIN` on a signed type (where `MIN`\nis the negative minimal value for the type); this is a positive value that is too large to represent\nin the type. In such a case, this function returns `MIN` itself.\n\n# Examples\n\n```\nassert_eq!(100i128.wrapping_neg(), -100);\nassert_eq!((-100i128).wrapping_neg(), 100);\nassert_eq!(i128::MIN.wrapping_neg(), i128::MIN);\n```",
"id": 10913,
"inner": {
"function": {
@@ -74384,30 +73007,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i16"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "strict_add_signed",
+ "name": "wrapping_neg",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -74417,10 +73034,10 @@
"10914": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
@@ -74430,7 +73047,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer subtraction. Computes `self - rhs`, returning\n`None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1u16.checked_sub(1), Some(0));\nassert_eq!(0u16.checked_sub(1), None);\n```",
+ "docs": "Panic-free bitwise shift-left; yields `self << mask(rhs)`, where `mask` removes\nany high-order bits of `rhs` that would cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-left; the RHS of a wrapping shift-left is restricted to\nthe range of the type, rather than the bits shifted out of the LHS being returned to the other end.\nThe primitive integer types all implement a [`rotate_left`](Self::rotate_left) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!((-1i128).wrapping_shl(7), -128);\nassert_eq!((-1i128).wrapping_shl(128), -1);\n```",
"id": 10914,
"inner": {
"function": {
@@ -74456,41 +73073,28 @@
[
"rhs",
{
- "primitive": "u16"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u16"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i128"
}
}
}
},
- "links": {},
- "name": "checked_sub",
+ "links": {
+ "Self::rotate_left": 10843
+ },
+ "name": "wrapping_shl",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -74500,23 +73104,20 @@
"10915": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer subtraction. Computes `self - rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1u16.strict_sub(1), 0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0u16.strict_sub(1);\n```",
+ "docs": "Panic-free bitwise shift-right; yields `self >> mask(rhs)`, where `mask`\nremoves any high-order bits of `rhs` that would cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-right; the RHS of a wrapping shift-right is restricted\nto the range of the type, rather than the bits shifted out of the LHS being returned to the other\nend. The primitive integer types all implement a [`rotate_right`](Self::rotate_right) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!((-128i128).wrapping_shr(7), -1);\nassert_eq!((-128i16).wrapping_shr(64), -128);\n```",
"id": 10915,
"inner": {
"function": {
@@ -74542,26 +73143,28 @@
[
"rhs",
{
- "primitive": "u16"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "i128"
}
}
}
},
- "links": {},
- "name": "strict_sub",
+ "links": {
+ "Self::rotate_right": 10844
+ },
+ "name": "wrapping_shr",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -74571,10 +73174,10 @@
"10916": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
},
{
"must_use": {
@@ -74584,7 +73187,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) subtraction. Computes `self - rhs`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(100u16.wrapping_sub(100), 0);\nassert_eq!(100u16.wrapping_sub(u16::MAX), 101);\n```",
+ "docs": "Wrapping (modular) absolute value. Computes `self.abs()`, wrapping around at\nthe boundary of the type.\n\nThe only case where such wrapping can occur is when one takes the absolute value of the negative\nminimal value for the type; this is a positive value that is too large to represent in the type. In\nsuch a case, this function returns `MIN` itself.\n\n# Examples\n\n```\nassert_eq!(100i128.wrapping_abs(), 100);\nassert_eq!((-100i128).wrapping_abs(), 100);\nassert_eq!(i128::MIN.wrapping_abs(), i128::MIN);\nassert_eq!((-128i8).wrapping_abs() as u8, 128);\n```",
"id": 10916,
"inner": {
"function": {
@@ -74606,30 +73209,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u16"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "wrapping_sub",
+ "name": "wrapping_abs",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -74639,23 +73236,20 @@
"10917": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 51, patch: 0})}, feature: \"unsigned_abs\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 51, patch: 0})}, feature: \"unsigned_abs\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer subtraction. Computes `self - rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_sub(y)` is semantically equivalent to calling\n`x.`[`checked_sub`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_sub`].\n\nIf you find yourself writing code like this:\n\n```\n# let foo = 30_u32;\n# let bar = 20;\nif foo >= bar {\n // SAFETY: just checked it will not overflow\n let diff = unsafe { foo.unchecked_sub(bar) };\n // ... use diff ...\n}\n```\n\nConsider changing it to\n\n```\n# let foo = 30_u32;\n# let bar = 20;\nif let Some(diff) = foo.checked_sub(bar) {\n // ... use diff ...\n}\n```\n\nAs that does exactly the same thing -- including telling the optimizer\nthat the subtraction cannot overflow -- but avoids needing `unsafe`.\n\n# Safety\n\nThis results in undefined behavior when\n`self - rhs > u16::MAX` or `self - rhs < u16::MIN`,\ni.e. when [`checked_sub`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_sub`]: u16::checked_sub\n[`wrapping_sub`]: u16::wrapping_sub",
+ "docs": "Computes the absolute value of `self` without any wrapping\nor panicking.\n\n\n# Examples\n\n```\nassert_eq!(100i128.unsigned_abs(), 100u128);\nassert_eq!((-100i128).unsigned_abs(), 100u128);\nassert_eq!((-128i8).unsigned_abs(), 128u8);\n```",
"id": 10917,
"inner": {
"function": {
@@ -74668,7 +73262,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -74677,33 +73271,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u16"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "u128"
}
}
}
},
- "links": {
- "u16::checked_sub": 10914,
- "u16::wrapping_sub": 10916
- },
- "name": "unchecked_sub",
+ "links": {},
+ "name": "unsigned_abs",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -74713,10 +73298,10 @@
"10918": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
@@ -74726,7 +73311,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked subtraction with a signed integer. Computes `self - rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1u16.checked_sub_signed(2), None);\nassert_eq!(1u16.checked_sub_signed(-2), Some(3));\nassert_eq!((u16::MAX - 2).checked_sub_signed(-4), None);\n```",
+ "docs": "Wrapping (modular) exponentiation. Computes `self.pow(exp)`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(3i128.wrapping_pow(4), 81);\nassert_eq!(3i8.wrapping_pow(5), -13);\nassert_eq!(3i8.wrapping_pow(6), -39);\n```",
"id": 10918,
"inner": {
"function": {
@@ -74750,43 +73335,28 @@
}
],
[
- "rhs",
+ "exp",
{
- "primitive": "i16"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u16"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "checked_sub_signed",
+ "name": "wrapping_pow",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -74796,23 +73366,20 @@
"10919": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict subtraction with a signed integer. Computes `self - rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(3u16.strict_sub_signed(2), 1);\n```\n\nThe following panic because of overflow:\n\n```should_panic\nlet _ = 1u16.strict_sub_signed(2);\n```\n\n```should_panic\nlet _ = (u16::MAX).strict_sub_signed(-1);\n```",
+ "docs": "Calculates `self` + `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would have\noccurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5i128.overflowing_add(2), (7, false));\nassert_eq!(i128::MAX.overflowing_add(1), (i128::MIN, true));\n```",
"id": 10919,
"inner": {
"function": {
@@ -74838,26 +73405,33 @@
[
"rhs",
{
- "primitive": "i16"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "tuple": [
+ {
+ "primitive": "i128"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "strict_sub_signed",
+ "name": "overflowing_add",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -74886,11 +73460,11 @@
"name": "Item",
"span": {
"begin": [
- 2177,
+ 2172,
5
],
"end": [
- 2177,
+ 2172,
19
],
"filename": "std/src/collections/hash/map.rs"
@@ -74900,15 +73474,20 @@
"10920": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"unsigned_signed_diff\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_bigint_helpers\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"unsigned_signed_diff\"}}]"
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer subtraction. Computes `self - rhs` and checks if the result fits into an [`i16`], returning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(10u16.checked_signed_diff(2), Some(8));\nassert_eq!(2u16.checked_signed_diff(10), Some(-8));\nassert_eq!(u16::MAX.checked_signed_diff(i16::MAX as u16), None);\nassert_eq!((i16::MAX as u16).checked_signed_diff(u16::MAX), Some(i16::MIN));\nassert_eq!((i16::MAX as u16 + 1).checked_signed_diff(0), None);\nassert_eq!(u16::MAX.checked_signed_diff(u16::MAX), Some(0));\n```",
+ "docs": "Calculates `self` + `rhs` + `carry` and returns a tuple containing\nthe sum and the output carry (in that order).\n\nPerforms \"ternary addition\" of two integer operands and a carry-in\nbit, and returns an output integer and a carry-out bit. This allows\nchaining together multiple additions to create a wider addition, and\ncan be useful for bignum addition.\n\nThis can be thought of as a 128-bit \"full adder\", in the electronics sense.\n\nIf the input carry is false, this method is equivalent to\n[`overflowing_add`](Self::overflowing_add), and the output carry is\nequal to the overflow flag. Note that although carry and overflow\nflags are similar for unsigned integers, they are different for\nsigned integers.\n\n# Examples\n\n```\n// 3 MAX (a = 3 × 2^128 + 2^128 - 1)\n// + 5 7 (b = 5 × 2^128 + 7)\n// ---------\n// 9 6 (sum = 9 × 2^128 + 6)\n\nlet (a1, a0): (u128, u128) = (3, u128::MAX);\nlet (b1, b0): (u128, u128) = (5, 7);\nlet carry0 = false;\n\nlet (sum0, carry1) = a0.carrying_add(b0, carry0);\nassert_eq!(carry1, true);\nlet (sum1, carry2) = a1.carrying_add(b1, carry1);\nassert_eq!(carry2, false);\n\nassert_eq!((sum1, sum0), (9, 6));\n```",
"id": 10920,
"inner": {
"function": {
@@ -74934,43 +73513,41 @@
[
"rhs",
{
- "primitive": "u16"
+ "primitive": "u128"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "bool"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i16"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "u128"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {
- "`i16`": 4816
+ "Self::overflowing_add": 11641
},
- "name": "checked_signed_diff",
+ "name": "carrying_add",
"span": {
"begin": [
- 1081,
+ 1186,
5
],
"end": [
- 1099,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -74980,10 +73557,7 @@
"10921": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
},
{
"must_use": {
@@ -74993,7 +73567,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer multiplication. Computes `self * rhs`, returning\n`None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(5u16.checked_mul(1), Some(5));\nassert_eq!(u16::MAX.checked_mul(2), None);\n```",
+ "docs": "Calculates `self` + `rhs` + `carry` and checks for overflow.\n\nPerforms \"ternary addition\" of two integer operands and a carry-in\nbit, and returns a tuple of the sum along with a boolean indicating\nwhether an arithmetic overflow would occur. On overflow, the wrapped\nvalue is returned.\n\nThis allows chaining together multiple additions to create a wider\naddition, and can be useful for bignum addition. This method should\nonly be used for the most significant word; for the less significant\nwords the unsigned method\n[`u128::carrying_add`]\nshould be used.\n\nThe output boolean returned by this method is *not* a carry flag,\nand should *not* be added to a more significant word.\n\nIf the input carry is false, this method is equivalent to\n[`overflowing_add`](Self::overflowing_add).\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n// Only the most significant word is signed.\n//\n// 10 MAX (a = 10 × 2^128 + 2^128 - 1)\n// + -5 9 (b = -5 × 2^128 + 9)\n// ---------\n// 6 8 (sum = 6 × 2^128 + 8)\n\nlet (a1, a0): (i128, u128) = (10, u128::MAX);\nlet (b1, b0): (i128, u128) = (-5, 9);\nlet carry0 = false;\n\n// u128::carrying_add for the less significant words\nlet (sum0, carry1) = a0.carrying_add(b0, carry0);\nassert_eq!(carry1, true);\n\n// i128::carrying_add for the most significant word\nlet (sum1, overflow) = a1.carrying_add(b1, carry1);\nassert_eq!(overflow, false);\n\nassert_eq!((sum1, sum0), (6, 8));\n```",
"id": 10921,
"inner": {
"function": {
@@ -75019,41 +73593,42 @@
[
"rhs",
{
- "primitive": "u16"
+ "primitive": "i128"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "bool"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u16"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i128"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "checked_mul",
+ "links": {
+ "Self::overflowing_add": 10919,
+ "`u128::carrying_add`": 10920
+ },
+ "name": "carrying_add",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -75063,23 +73638,20 @@
"10922": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer multiplication. Computes `self * rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(5u16.strict_mul(1), 5);\n```\n\nThe following panics because of overflow:\n\n``` should_panic\nlet _ = u16::MAX.strict_mul(2);\n```",
+ "docs": "Calculates `self` + `rhs` with an unsigned `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1i128.overflowing_add_unsigned(2), (3, false));\nassert_eq!((i128::MIN).overflowing_add_unsigned(u128::MAX), (i128::MAX, false));\nassert_eq!((i128::MAX - 2).overflowing_add_unsigned(3), (i128::MIN, true));\n```",
"id": 10922,
"inner": {
"function": {
@@ -75105,26 +73677,33 @@
[
"rhs",
{
- "primitive": "u16"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "tuple": [
+ {
+ "primitive": "i128"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "strict_mul",
+ "name": "overflowing_add_unsigned",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -75134,10 +73713,10 @@
"10923": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -75147,7 +73726,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) multiplication. Computes `self *\nrhs`, wrapping around at the boundary of the type.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u8` is used.\n\n```\nassert_eq!(10u8.wrapping_mul(12), 120);\nassert_eq!(25u8.wrapping_mul(12), 44);\n```",
+ "docs": "Calculates `self` - `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating whether an arithmetic overflow\nwould occur. If an overflow would have occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5i128.overflowing_sub(2), (3, false));\nassert_eq!(i128::MIN.overflowing_sub(1), (i128::MAX, true));\n```",
"id": 10923,
"inner": {
"function": {
@@ -75173,26 +73752,33 @@
[
"rhs",
{
- "primitive": "u16"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "tuple": [
+ {
+ "primitive": "i128"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "wrapping_mul",
+ "name": "overflowing_sub",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -75202,23 +73788,20 @@
"10924": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_bigint_helpers\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer multiplication. Computes `self * rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_mul(y)` is semantically equivalent to calling\n`x.`[`checked_mul`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_mul`].\n\n# Safety\n\nThis results in undefined behavior when\n`self * rhs > u16::MAX` or `self * rhs < u16::MIN`,\ni.e. when [`checked_mul`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_mul`]: u16::checked_mul\n[`wrapping_mul`]: u16::wrapping_mul",
+ "docs": "Calculates `self` − `rhs` − `borrow` and returns a tuple\ncontaining the difference and the output borrow.\n\nPerforms \"ternary subtraction\" by subtracting both an integer\noperand and a borrow-in bit from `self`, and returns an output\ninteger and a borrow-out bit. This allows chaining together multiple\nsubtractions to create a wider subtraction, and can be useful for\nbignum subtraction.\n\n# Examples\n\n```\n// 9 6 (a = 9 × 2^128 + 6)\n// - 5 7 (b = 5 × 2^128 + 7)\n// ---------\n// 3 MAX (diff = 3 × 2^128 + 2^128 - 1)\n\nlet (a1, a0): (u128, u128) = (9, 6);\nlet (b1, b0): (u128, u128) = (5, 7);\nlet borrow0 = false;\n\nlet (diff0, borrow1) = a0.borrowing_sub(b0, borrow0);\nassert_eq!(borrow1, true);\nlet (diff1, borrow2) = a1.borrowing_sub(b1, borrow1);\nassert_eq!(borrow2, false);\n\nassert_eq!((diff1, diff0), (3, u128::MAX));\n```",
"id": 10924,
"inner": {
"function": {
@@ -75231,7 +73814,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -75244,29 +73827,39 @@
[
"rhs",
{
- "primitive": "u16"
+ "primitive": "u128"
+ }
+ ],
+ [
+ "borrow",
+ {
+ "primitive": "bool"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "tuple": [
+ {
+ "primitive": "u128"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
- "links": {
- "u16::checked_mul": 10921,
- "u16::wrapping_mul": 10923
- },
- "name": "unchecked_mul",
+ "links": {},
+ "name": "borrowing_sub",
"span": {
"begin": [
- 1081,
+ 1186,
5
],
"end": [
- 1099,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -75276,10 +73869,7 @@
"10925": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
},
{
"must_use": {
@@ -75289,7 +73879,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division. Computes `self / rhs`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(128u16.checked_div(2), Some(64));\nassert_eq!(1u16.checked_div(0), None);\n```",
+ "docs": "Calculates `self` − `rhs` − `borrow` and checks for\noverflow.\n\nPerforms \"ternary subtraction\" by subtracting both an integer\noperand and a borrow-in bit from `self`, and returns a tuple of the\ndifference along with a boolean indicating whether an arithmetic\noverflow would occur. On overflow, the wrapped value is returned.\n\nThis allows chaining together multiple subtractions to create a\nwider subtraction, and can be useful for bignum subtraction. This\nmethod should only be used for the most significant word; for the\nless significant words the unsigned method\n[`u128::borrowing_sub`]\nshould be used.\n\nThe output boolean returned by this method is *not* a borrow flag,\nand should *not* be subtracted from a more significant word.\n\nIf the input borrow is false, this method is equivalent to\n[`overflowing_sub`](Self::overflowing_sub).\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n// Only the most significant word is signed.\n//\n// 6 8 (a = 6 × 2^128 + 8)\n// - -5 9 (b = -5 × 2^128 + 9)\n// ---------\n// 10 MAX (diff = 10 × 2^128 + 2^128 - 1)\n\nlet (a1, a0): (i128, u128) = (6, 8);\nlet (b1, b0): (i128, u128) = (-5, 9);\nlet borrow0 = false;\n\n// u128::borrowing_sub for the less significant words\nlet (diff0, borrow1) = a0.borrowing_sub(b0, borrow0);\nassert_eq!(borrow1, true);\n\n// i128::borrowing_sub for the most significant word\nlet (diff1, overflow) = a1.borrowing_sub(b1, borrow1);\nassert_eq!(overflow, false);\n\nassert_eq!((diff1, diff0), (10, u128::MAX));\n```",
"id": 10925,
"inner": {
"function": {
@@ -75315,41 +73905,42 @@
[
"rhs",
{
- "primitive": "u16"
+ "primitive": "i128"
+ }
+ ],
+ [
+ "borrow",
+ {
+ "primitive": "bool"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u16"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i128"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "checked_div",
+ "links": {
+ "Self::overflowing_sub": 10923,
+ "`u128::borrowing_sub`": 10924
+ },
+ "name": "borrowing_sub",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -75359,23 +73950,20 @@
"10926": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer division. Computes `self / rhs`.\n\nStrict division on unsigned types is just normal division. There's no\nway overflow could ever happen. This function exists so that all\noperations are accounted for in the strict operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u16.strict_div(10), 10);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1u16).strict_div(0);\n```",
+ "docs": "Calculates `self` - `rhs` with an unsigned `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1i128.overflowing_sub_unsigned(2), (-1, false));\nassert_eq!((i128::MAX).overflowing_sub_unsigned(u128::MAX), (i128::MIN, false));\nassert_eq!((i128::MIN + 2).overflowing_sub_unsigned(3), (i128::MAX, true));\n```",
"id": 10926,
"inner": {
"function": {
@@ -75401,26 +73989,33 @@
[
"rhs",
{
- "primitive": "u16"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "tuple": [
+ {
+ "primitive": "i128"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "strict_div",
+ "name": "overflowing_sub_unsigned",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -75430,10 +74025,10 @@
"10927": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -75443,7 +74038,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked Euclidean division. Computes `self.div_euclid(rhs)`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(128u16.checked_div_euclid(2), Some(64));\nassert_eq!(1u16.checked_div_euclid(0), None);\n```",
+ "docs": "Calculates the multiplication of `self` and `rhs`.\n\nReturns a tuple of the multiplication along with a boolean indicating whether an arithmetic overflow\nwould occur. If an overflow would have occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5i128.overflowing_mul(2), (10, false));\nassert_eq!(1_000_000_000i32.overflowing_mul(10), (1410065408, true));\n```",
"id": 10927,
"inner": {
"function": {
@@ -75469,41 +74064,33 @@
[
"rhs",
{
- "primitive": "u16"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u16"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i128"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_div_euclid",
+ "name": "overflowing_mul",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -75513,23 +74100,20 @@
"10928": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict Euclidean division. Computes `self.div_euclid(rhs)`.\n\nStrict division on unsigned types is just normal division. There's no\nway overflow could ever happen. This function exists so that all\noperations are accounted for in the strict operations. Since, for the\npositive integers, all common definitions of division are equal, this\nis exactly equal to `self.strict_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u16.strict_div_euclid(10), 10);\n```\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1u16).strict_div_euclid(0);\n```",
+ "docs": "Calculates the \"full multiplication\" `self * rhs + carry`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need the `carry`, then you can use [`Self::widening_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.carrying_mul(-2, 0), (4294967286, -1));\nassert_eq!(5i32.carrying_mul(-2, 10), (0, 0));\nassert_eq!(1_000_000_000i32.carrying_mul(-10, 0), (2884901888, -3));\nassert_eq!(1_000_000_000i32.carrying_mul(-10, 10), (2884901898, -3));\nassert_eq!(i128::MAX.carrying_mul(i128::MAX, i128::MAX), (i128::MAX.unsigned_abs() + 1, i128::MAX / 2));\n```",
"id": 10928,
"inner": {
"function": {
@@ -75555,26 +74139,41 @@
[
"rhs",
{
- "primitive": "u16"
+ "primitive": "i128"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "tuple": [
+ {
+ "primitive": "u128"
+ },
+ {
+ "primitive": "i128"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "strict_div_euclid",
+ "links": {
+ "`Self::widening_mul`": 10929
+ },
+ "name": "carrying_mul",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -75584,7 +74183,10 @@
"10929": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
},
{
"must_use": {
@@ -75594,7 +74196,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division without remainder. Computes `self / rhs`,\nreturning `None` if `rhs == 0` or if `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64u16.checked_exact_div(2), Some(32));\nassert_eq!(64u16.checked_exact_div(32), Some(2));\nassert_eq!(64u16.checked_exact_div(0), None);\nassert_eq!(65u16.checked_exact_div(2), None);\n```",
+ "docs": "Calculates the complete product `self * rhs` without the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nIf you also need to add a carry to the wide result, then you want\n[`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.widening_mul(-2), (4294967286, -1));\nassert_eq!(1_000_000_000i32.widening_mul(-10), (2884901888, -3));\n```",
"id": 10929,
"inner": {
"function": {
@@ -75620,41 +74222,35 @@
[
"rhs",
{
- "primitive": "u16"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u16"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "u128"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "i128"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "checked_exact_div",
+ "links": {
+ "`Self::carrying_mul`": 10928
+ },
+ "name": "widening_mul",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -75725,11 +74321,11 @@
"name": "next",
"span": {
"begin": [
- 2180,
+ 2175,
5
],
"end": [
- 2182,
+ 2177,
6
],
"filename": "std/src/collections/hash/map.rs"
@@ -75739,7 +74335,10 @@
"10930": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
},
{
"must_use": {
@@ -75749,7 +74348,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division without remainder. Computes `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs == 0` or `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64u16.exact_div(2), 32);\nassert_eq!(64u16.exact_div(32), 2);\n```\n\n```should_panic\n#![feature(exact_div)]\nlet _ = 65u16.exact_div(2);\n```",
+ "docs": "Calculates the \"full multiplication\" `self * rhs + carry1 + carry2`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need either `carry`, then you can use [`Self::widening_mul`] instead,\nand if you only need one `carry`, then you can use [`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.carrying_mul_add(-2, 0, 0), (4294967286, -1));\nassert_eq!(5i32.carrying_mul_add(-2, 10, 10), (10, 0));\nassert_eq!(1_000_000_000i32.carrying_mul_add(-10, 0, 0), (2884901888, -3));\nassert_eq!(1_000_000_000i32.carrying_mul_add(-10, 10, 10), (2884901908, -3));\nassert_eq!(i128::MAX.carrying_mul_add(i128::MAX, i128::MAX, i128::MAX), (u128::MAX, i128::MAX / 2));\n```",
"id": 10930,
"inner": {
"function": {
@@ -75775,26 +74374,48 @@
[
"rhs",
{
- "primitive": "u16"
+ "primitive": "i128"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "i128"
+ }
+ ],
+ [
+ "add",
+ {
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "tuple": [
+ {
+ "primitive": "u128"
+ },
+ {
+ "primitive": "i128"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "exact_div",
+ "links": {
+ "`Self::carrying_mul`": 10928,
+ "`Self::widening_mul`": 10929
+ },
+ "name": "carrying_mul_add",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -75804,7 +74425,10 @@
"10931": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -75814,7 +74438,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer division without remainder. Computes `self / rhs`.\n\n# Safety\n\nThis results in undefined behavior when `rhs == 0` or `self % rhs != 0`,\ni.e. when [`checked_exact_div`](Self::checked_exact_div) would return `None`.",
+ "docs": "Calculates the divisor when `self` is divided by `rhs`.\n\nReturns a tuple of the divisor along with a boolean indicating whether an arithmetic overflow would\noccur. If an overflow would occur then self is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i128.overflowing_div(2), (2, false));\nassert_eq!(i128::MIN.overflowing_div(-1), (i128::MIN, true));\n```",
"id": 10931,
"inner": {
"function": {
@@ -75827,7 +74451,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -75840,28 +74464,33 @@
[
"rhs",
{
- "primitive": "u16"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "tuple": [
+ {
+ "primitive": "i128"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
- "links": {
- "Self::checked_exact_div": 10929
- },
- "name": "unchecked_exact_div",
+ "links": {},
+ "name": "overflowing_div",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -75871,10 +74500,10 @@
"10932": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -75884,7 +74513,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer remainder. Computes `self % rhs`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(5u16.checked_rem(2), Some(1));\nassert_eq!(5u16.checked_rem(0), None);\n```",
+ "docs": "Calculates the quotient of Euclidean division `self.div_euclid(rhs)`.\n\nReturns a tuple of the divisor along with a boolean indicating whether an arithmetic overflow would\noccur. If an overflow would occur then `self` is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i128.overflowing_div_euclid(2), (2, false));\nassert_eq!(i128::MIN.overflowing_div_euclid(-1), (i128::MIN, true));\n```",
"id": 10932,
"inner": {
"function": {
@@ -75910,41 +74539,33 @@
[
"rhs",
{
- "primitive": "u16"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u16"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i128"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_rem",
+ "name": "overflowing_div_euclid",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -75954,23 +74575,20 @@
"10933": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer remainder. Computes `self % rhs`.\n\nStrict remainder calculation on unsigned types is just the regular\nremainder calculation. There's no way overflow could ever happen.\nThis function exists so that all operations are accounted for in the\nstrict operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u16.strict_rem(10), 0);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5u16.strict_rem(0);\n```",
+ "docs": "Calculates the remainder when `self` is divided by `rhs`.\n\nReturns a tuple of the remainder after dividing along with a boolean indicating whether an\narithmetic overflow would occur. If an overflow would occur then 0 is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i128.overflowing_rem(2), (1, false));\nassert_eq!(i128::MIN.overflowing_rem(-1), (0, true));\n```",
"id": 10933,
"inner": {
"function": {
@@ -75996,26 +74614,33 @@
[
"rhs",
{
- "primitive": "u16"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "tuple": [
+ {
+ "primitive": "i128"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "strict_rem",
+ "name": "overflowing_rem",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -76034,11 +74659,14 @@
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked Euclidean modulo. Computes `self.rem_euclid(rhs)`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(5u16.checked_rem_euclid(2), Some(1));\nassert_eq!(5u16.checked_rem_euclid(0), None);\n```",
+ "docs": "Overflowing Euclidean remainder. Calculates `self.rem_euclid(rhs)`.\n\nReturns a tuple of the remainder after dividing along with a boolean indicating whether an\narithmetic overflow would occur. If an overflow would occur then 0 is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5i128.overflowing_rem_euclid(2), (1, false));\nassert_eq!(i128::MIN.overflowing_rem_euclid(-1), (0, true));\n```",
"id": 10934,
"inner": {
"function": {
@@ -76064,41 +74692,33 @@
[
"rhs",
{
- "primitive": "u16"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u16"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i128"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_rem_euclid",
+ "name": "overflowing_rem_euclid",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -76108,23 +74728,20 @@
"10935": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict Euclidean modulo. Computes `self.rem_euclid(rhs)`.\n\nStrict modulo calculation on unsigned types is just the regular\nremainder calculation. There's no way overflow could ever happen.\nThis function exists so that all operations are accounted for in the\nstrict operations. Since, for the positive integers, all common\ndefinitions of division are equal, this is exactly equal to\n`self.strict_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u16.strict_rem_euclid(10), 0);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5u16.strict_rem_euclid(0);\n```",
+ "docs": "Negates self, overflowing if this is equal to the minimum value.\n\nReturns a tuple of the negated version of self along with a boolean indicating whether an overflow\nhappened. If `self` is the minimum value (e.g., `i32::MIN` for values of type `i32`), then the\nminimum value will be returned again and `true` will be returned for an overflow happening.\n\n# Examples\n\n```\nassert_eq!(2i128.overflowing_neg(), (-2, false));\nassert_eq!(i128::MIN.overflowing_neg(), (i128::MIN, true));\n```",
"id": 10935,
"inner": {
"function": {
@@ -76146,30 +74763,31 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u16"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "tuple": [
+ {
+ "primitive": "i128"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "strict_rem_euclid",
+ "name": "overflowing_neg",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -76179,15 +74797,20 @@
"10936": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 135758, is_soft: false}, feature: \"disjoint_bitor\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 135758, is_soft: false}, feature: \"disjoint_bitor\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Same value as `self | other`, but UB if any bit position is set in both inputs.\n\nThis is a situational micro-optimization for places where you'd rather\nuse addition on some platforms and bitwise or on other platforms, based\non exactly which instructions combine better with whatever else you're\ndoing. Note that there's no reason to bother using this for places\nwhere it's clear from the operations involved that they can't overlap.\nFor example, if you're combining `u16`s into a `u32` with\n`((a as u32) << 16) | (b as u32)`, that's fine, as the backend will\nknow those sides of the `|` are disjoint without needing help.\n\n# Examples\n\n```\n#![feature(disjoint_bitor)]\n\n// SAFETY: `1` and `4` have no bits in common.\nunsafe {\n assert_eq!(1_u16.unchecked_disjoint_bitor(4), 5);\n}\n```\n\n# Safety\n\nRequires that `(self & other) == 0`, otherwise it's immediate UB.\n\nEquivalently, requires that `(self | other) == (self + other)`.",
+ "docs": "Shifts self left by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean indicating whether the shift\nvalue was larger than or equal to the number of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then used to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x1i128.overflowing_shl(4), (0x10, false));\nassert_eq!(0x1i32.overflowing_shl(36), (0x10, true));\nassert_eq!(0x10i128.overflowing_shl(127), (0, false));\n```",
"id": 10936,
"inner": {
"function": {
@@ -76200,7 +74823,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -76211,28 +74834,35 @@
}
],
[
- "other",
+ "rhs",
{
- "primitive": "u16"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "tuple": [
+ {
+ "primitive": "i128"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "unchecked_disjoint_bitor",
+ "name": "overflowing_shl",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -76242,23 +74872,20 @@
"10937": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nThis method might not be optimized owing to implementation details;\n`ilog2` can produce results more efficiently for base 2, and `ilog10`\ncan produce results more efficiently for base 10.\n\n# Panics\n\nThis function will panic if `self` is zero, or if `base` is less than 2.\n\n# Examples\n\n```\nassert_eq!(5u16.ilog(5), 1);\n```",
+ "docs": "Shifts self right by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean indicating whether the shift\nvalue was larger than or equal to the number of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then used to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x10i128.overflowing_shr(4), (0x1, false));\nassert_eq!(0x10i32.overflowing_shr(36), (0x1, true));\n```",
"id": 10937,
"inner": {
"function": {
@@ -76282,28 +74909,35 @@
}
],
[
- "base",
+ "rhs",
{
- "primitive": "u16"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "tuple": [
+ {
+ "primitive": "i128"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "ilog",
+ "name": "overflowing_shr",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -76313,23 +74947,20 @@
"10938": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 10 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is zero.\n\n# Example\n\n```\nassert_eq!(10u16.ilog10(), 1);\n```",
+ "docs": "Computes the absolute value of `self`.\n\nReturns a tuple of the absolute version of self along with a boolean indicating whether an overflow\nhappened. If self is the minimum value\n(e.g., i128::MIN for values of type i128),\nthen the minimum value will be returned again and true will be returned\nfor an overflow happening.\n\n# Examples\n\n```\nassert_eq!(10i128.overflowing_abs(), (10, false));\nassert_eq!((-10i128).overflowing_abs(), (10, false));\nassert_eq!((i128::MIN).overflowing_abs(), (i128::MIN, true));\n```",
"id": 10938,
"inner": {
"function": {
@@ -76355,20 +74986,27 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "tuple": [
+ {
+ "primitive": "i128"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "ilog10",
+ "name": "overflowing_abs",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -76378,10 +75016,10 @@
"10939": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
@@ -76391,7 +75029,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nReturns `None` if the number is zero, or if the base is not at least 2.\n\nThis method might not be optimized owing to implementation details;\n`checked_ilog2` can produce results more efficiently for base 2, and\n`checked_ilog10` can produce results more efficiently for base 10.\n\n# Examples\n\n```\nassert_eq!(5u16.checked_ilog(5), Some(1));\n```",
+ "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\nReturns a tuple of the exponentiation along with a bool indicating\nwhether an overflow happened.\n\n# Examples\n\n```\nassert_eq!(3i128.overflowing_pow(4), (81, false));\nassert_eq!(3i8.overflowing_pow(5), (-13, true));\n```",
"id": 10939,
"inner": {
"function": {
@@ -76415,43 +75053,35 @@
}
],
[
- "base",
+ "exp",
{
- "primitive": "u16"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "i128"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_ilog",
+ "name": "overflowing_pow",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -76529,11 +75159,11 @@
"name": "size_hint",
"span": {
"begin": [
- 2184,
+ 2179,
5
],
"end": [
- 2186,
+ 2181,
6
],
"filename": "std/src/collections/hash/map.rs"
@@ -76543,10 +75173,10 @@
"10940": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -76556,7 +75186,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 2 logarithm of the number, rounded down.\n\nReturns `None` if the number is zero.\n\n# Examples\n\n```\nassert_eq!(2u16.checked_ilog2(), Some(1));\n```",
+ "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\n# Examples\n\n```\nlet x: i128 = 2; // or any other integer type\n\nassert_eq!(x.pow(5), 32);\n```",
"id": 10940,
"inner": {
"function": {
@@ -76578,39 +75208,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "exp",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "checked_ilog2",
+ "name": "pow",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -76620,20 +75241,23 @@
"10941": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 10 logarithm of the number, rounded down.\n\nReturns `None` if the number is zero.\n\n# Examples\n\n```\nassert_eq!(10u16.checked_ilog10(), Some(1));\n```",
+ "docs": "Returns the square root of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is negative.\n\n# Examples\n\n```\nassert_eq!(10i128.isqrt(), 3);\n```",
"id": 10941,
"inner": {
"function": {
@@ -76659,35 +75283,20 @@
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "checked_ilog10",
+ "name": "isqrt",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -76697,20 +75306,23 @@
"10942": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked negation. Computes `-self`, returning `None` unless `self ==\n0`.\n\nNote that negating any positive integer will overflow.\n\n# Examples\n\n```\nassert_eq!(0u16.checked_neg(), Some(0));\nassert_eq!(1u16.checked_neg(), None);\n```",
+ "docs": "Calculates the quotient of Euclidean division of `self` by `rhs`.\n\nThis computes the integer `q` such that `self = q * rhs + r`, with\n`r = self.rem_euclid(rhs)` and `0 <= r < abs(rhs)`.\n\nIn other words, the result is `self / rhs` rounded to the integer `q`\nsuch that `self >= q * rhs`.\nIf `self > 0`, this is equal to rounding towards zero (the default in Rust);\nif `self < 0`, this is equal to rounding away from zero (towards +/- infinity).\nIf `rhs > 0`, this is equal to rounding towards -infinity;\nif `rhs < 0`, this is equal to rounding towards +infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\nlet a: i128 = 7; // or any other integer type\nlet b = 4;\n\nassert_eq!(a.div_euclid(b), 1); // 7 >= 4 * 1\nassert_eq!(a.div_euclid(-b), -1); // 7 >= -4 * -1\nassert_eq!((-a).div_euclid(b), -2); // -7 >= 4 * -2\nassert_eq!((-a).div_euclid(-b), 2); // -7 >= -4 * 2\n```",
"id": 10942,
"inner": {
"function": {
@@ -76732,39 +75344,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i128"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u16"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "checked_neg",
+ "name": "div_euclid",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -76774,10 +75377,13 @@
"10943": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[doc(alias = \"modulo\", alias = \"mod\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -76790,7 +75396,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict negation. Computes `-self`, panicking unless `self ==\n0`.\n\nNote that negating any positive integer will overflow.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0u16.strict_neg(), 0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 1u16.strict_neg();\n",
+ "docs": "Calculates the least nonnegative remainder of `self (mod rhs)`.\n\nThis is done as if by the Euclidean division algorithm -- given\n`r = self.rem_euclid(rhs)`, the result satisfies\n`self = rhs * self.div_euclid(rhs) + r` and `0 <= r < abs(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN` and\n`rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\nlet a: i128 = 7; // or any other integer type\nlet b = 4;\n\nassert_eq!(a.rem_euclid(b), 3);\nassert_eq!((-a).rem_euclid(b), 1);\nassert_eq!(a.rem_euclid(-b), 3);\nassert_eq!((-a).rem_euclid(-b), 1);\n```\n\nThis will panic:\n```should_panic\nlet _ = i128::MIN.rem_euclid(-1);\n```",
"id": 10943,
"inner": {
"function": {
@@ -76812,24 +75418,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i128"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "strict_neg",
+ "name": "rem_euclid",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -76839,20 +75451,20 @@
"10944": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked shift left. Computes `self << rhs`, returning `None`\nif `rhs` is larger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x1u16.checked_shl(4), Some(0x10));\nassert_eq!(0x10u16.checked_shl(129), None);\nassert_eq!(0x10u16.checked_shl(15), Some(0));\n```",
+ "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards negative infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nlet a: i128 = 8;\nlet b = 3;\n\nassert_eq!(a.div_floor(b), 2);\nassert_eq!(a.div_floor(-b), -3);\nassert_eq!((-a).div_floor(b), -3);\nassert_eq!((-a).div_floor(-b), 2);\n```",
"id": 10944,
"inner": {
"function": {
@@ -76878,41 +75490,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u16"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "checked_shl",
+ "name": "div_floor",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -76922,10 +75519,7 @@
"10945": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
},
{
"must_use": {
@@ -76938,7 +75532,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict shift left. Computes `self << rhs`, panicking if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x1u16.strict_shl(4), 0x10);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10u16.strict_shl(129);\n```",
+ "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards positive infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nlet a: i128 = 8;\nlet b = 3;\n\nassert_eq!(a.div_ceil(b), 3);\nassert_eq!(a.div_ceil(-b), -2);\nassert_eq!((-a).div_ceil(b), -2);\nassert_eq!((-a).div_ceil(-b), 3);\n```",
"id": 10945,
"inner": {
"function": {
@@ -76964,26 +75558,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "strict_shl",
+ "name": "div_ceil",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -76993,20 +75587,17 @@
"10946": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked shift left. Computes `self << rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shl`] would return `None`.\n\n[`checked_shl`]: u16::checked_shl",
+ "docs": "If `rhs` is positive, calculates the smallest value greater than or\nequal to `self` that is a multiple of `rhs`. If `rhs` is negative,\ncalculates the largest value less than or equal to `self` that is a\nmultiple of `rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nOn overflow, this function will panic if overflow checks are enabled (default in debug\nmode) and wrap if overflow checks are disabled (default in release mode).\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(16_i128.next_multiple_of(8), 16);\nassert_eq!(23_i128.next_multiple_of(8), 24);\nassert_eq!(16_i128.next_multiple_of(-8), 16);\nassert_eq!(23_i128.next_multiple_of(-8), 16);\nassert_eq!((-16_i128).next_multiple_of(8), -16);\nassert_eq!((-23_i128).next_multiple_of(8), -16);\nassert_eq!((-16_i128).next_multiple_of(-8), -16);\nassert_eq!((-23_i128).next_multiple_of(-8), -24);\n```",
"id": 10946,
"inner": {
"function": {
@@ -77019,7 +75610,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -77032,28 +75623,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "i128"
}
}
}
},
- "links": {
- "u16::checked_shl": 10944
- },
- "name": "unchecked_shl",
+ "links": {},
+ "name": "next_multiple_of",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -77063,10 +75652,7 @@
"10947": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
},
{
"must_use": {
@@ -77076,7 +75662,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x1u16.unbounded_shl(4), 0x10);\nassert_eq!(0x1u16.unbounded_shl(129), 0);\n```",
+ "docs": "If `rhs` is positive, calculates the smallest value greater than or\nequal to `self` that is a multiple of `rhs`. If `rhs` is negative,\ncalculates the largest value less than or equal to `self` that is a\nmultiple of `rhs`. Returns `None` if `rhs` is zero or the operation\nwould result in overflow.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(16_i128.checked_next_multiple_of(8), Some(16));\nassert_eq!(23_i128.checked_next_multiple_of(8), Some(24));\nassert_eq!(16_i128.checked_next_multiple_of(-8), Some(16));\nassert_eq!(23_i128.checked_next_multiple_of(-8), Some(16));\nassert_eq!((-16_i128).checked_next_multiple_of(8), Some(-16));\nassert_eq!((-23_i128).checked_next_multiple_of(8), Some(-16));\nassert_eq!((-16_i128).checked_next_multiple_of(-8), Some(-16));\nassert_eq!((-23_i128).checked_next_multiple_of(-8), Some(-24));\nassert_eq!(1_i128.checked_next_multiple_of(0), None);\nassert_eq!(i128::MAX.checked_next_multiple_of(2), None);\n```",
"id": 10947,
"inner": {
"function": {
@@ -77102,26 +75688,41 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i128"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "unbounded_shl",
+ "name": "checked_next_multiple_of",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -77131,20 +75732,23 @@
"10948": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked shift right. Computes `self >> rhs`, returning `None`\nif `rhs` is larger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x10u16.checked_shr(4), Some(0x1));\nassert_eq!(0x10u16.checked_shr(129), None);\n```",
+ "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nThis method might not be optimized owing to implementation details;\n`ilog2` can produce results more efficiently for base 2, and `ilog10`\ncan produce results more efficiently for base 10.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero,\nor if `base` is less than 2.\n\n# Examples\n\n```\nassert_eq!(5i128.ilog(5), 1);\n```",
"id": 10948,
"inner": {
"function": {
@@ -77168,43 +75772,28 @@
}
],
[
- "rhs",
+ "base",
{
- "primitive": "u32"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u16"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "checked_shr",
+ "name": "ilog",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -77214,10 +75803,10 @@
"10949": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
@@ -77230,7 +75819,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict shift right. Computes `self >> rhs`, panicking `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x10u16.strict_shr(4), 0x1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10u16.strict_shr(129);\n```",
+ "docs": "Returns the base 10 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero.\n\n# Example\n\n```\nassert_eq!(10i128.ilog10(), 1);\n```",
"id": 10949,
"inner": {
"function": {
@@ -77252,30 +75841,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "strict_shr",
+ "name": "ilog10",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -77325,11 +75908,11 @@
"name": "count",
"span": {
"begin": [
- 2188,
+ 2183,
5
],
"end": [
- 2190,
+ 2185,
6
],
"filename": "std/src/collections/hash/map.rs"
@@ -77339,20 +75922,20 @@
"10950": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked shift right. Computes `self >> rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shr`] would return `None`.\n\n[`checked_shr`]: u16::checked_shr",
+ "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nReturns `None` if the number is negative or zero, or if the base is not at least 2.\n\nThis method might not be optimized owing to implementation details;\n`checked_ilog2` can produce results more efficiently for base 2, and\n`checked_ilog10` can produce results more efficiently for base 10.\n\n# Examples\n\n```\nassert_eq!(5i128.checked_ilog(5), Some(1));\n```",
"id": 10950,
"inner": {
"function": {
@@ -77365,7 +75948,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -77376,30 +75959,43 @@
}
],
[
- "rhs",
+ "base",
{
- "primitive": "u32"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
- "links": {
- "u16::checked_shr": 10948
- },
- "name": "unchecked_shr",
+ "links": {},
+ "name": "checked_ilog",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -77409,10 +76005,10 @@
"10951": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
@@ -77422,7 +76018,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x10u16.unbounded_shr(4), 0x1);\nassert_eq!(0x10u16.unbounded_shr(129), 0);\n```",
+ "docs": "Returns the base 2 logarithm of the number, rounded down.\n\nReturns `None` if the number is negative or zero.\n\n# Examples\n\n```\nassert_eq!(2i128.checked_ilog2(), Some(1));\n```",
"id": 10951,
"inner": {
"function": {
@@ -77444,30 +76040,39 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "unbounded_shr",
+ "name": "checked_ilog2",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -77477,10 +76082,10 @@
"10952": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
@@ -77490,7 +76095,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked exponentiation. Computes `self.pow(exp)`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(2u16.checked_pow(5), Some(32));\nassert_eq!(u16::MAX.checked_pow(2), None);\n```",
+ "docs": "Returns the base 10 logarithm of the number, rounded down.\n\nReturns `None` if the number is negative or zero.\n\n# Example\n\n```\nassert_eq!(10i128.checked_ilog10(), Some(1));\n```",
"id": 10952,
"inner": {
"function": {
@@ -77512,12 +76117,6 @@
{
"generic": "Self"
}
- ],
- [
- "exp",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
@@ -77528,7 +76127,7 @@
"args": [
{
"type": {
- "primitive": "u16"
+ "primitive": "u32"
}
}
],
@@ -77543,14 +76142,14 @@
}
},
"links": {},
- "name": "checked_pow",
+ "name": "checked_ilog10",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -77560,23 +76159,20 @@
"10953": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict exponentiation. Computes `self.pow(exp)`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(2u16.strict_pow(5), 32);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = u16::MAX.strict_pow(2);\n```",
+ "docs": "Computes the absolute value of `self`.\n\n# Overflow behavior\n\nThe absolute value of\n`i128::MIN`\ncannot be represented as an\n`i128`,\nand attempting to calculate it will cause an overflow. This means\nthat code in debug mode will trigger a panic on this case and\noptimized code will return\n`i128::MIN`\nwithout a panic. If you do not want this behavior, consider\nusing [`unsigned_abs`](Self::unsigned_abs) instead.\n\n# Examples\n\n```\nassert_eq!(10i128.abs(), 10);\nassert_eq!((-10i128).abs(), 10);\n```",
"id": 10953,
"inner": {
"function": {
@@ -77598,30 +76194,26 @@
{
"generic": "Self"
}
- ],
- [
- "exp",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "i128"
}
}
}
},
- "links": {},
- "name": "strict_pow",
+ "links": {
+ "Self::unsigned_abs": 10917
+ },
+ "name": "abs",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -77631,10 +76223,10 @@
"10954": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\"}}]"
},
{
"must_use": {
@@ -77644,7 +76236,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer addition. Computes `self + rhs`, saturating at\nthe numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100u16.saturating_add(1), 101);\nassert_eq!(u16::MAX.saturating_add(127), u16::MAX);\n```",
+ "docs": "Computes the absolute difference between `self` and `other`.\n\nThis function always returns the correct answer without overflow or\npanics by returning an unsigned integer.\n\n# Examples\n\n```\nassert_eq!(100i128.abs_diff(80), 20u128);\nassert_eq!(100i128.abs_diff(110), 10u128);\nassert_eq!((-100i128).abs_diff(80), 180u128);\nassert_eq!((-100i128).abs_diff(-120), 20u128);\nassert_eq!(i128::MIN.abs_diff(i128::MAX), u128::MAX);\n```",
"id": 10954,
"inner": {
"function": {
@@ -77668,28 +76260,28 @@
}
],
[
- "rhs",
+ "other",
{
- "primitive": "u16"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "u128"
}
}
}
},
"links": {},
- "name": "saturating_add",
+ "name": "abs_diff",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -77699,10 +76291,10 @@
"10955": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_int_sign\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -77712,7 +76304,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating addition with a signed integer. Computes `self + rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1u16.saturating_add_signed(2), 3);\nassert_eq!(1u16.saturating_add_signed(-2), 0);\nassert_eq!((u16::MAX - 2).saturating_add_signed(4), u16::MAX);\n```",
+ "docs": "Returns a number representing sign of `self`.\n\n - `0` if the number is zero\n - `1` if the number is positive\n - `-1` if the number is negative\n\n# Examples\n\n```\nassert_eq!(10i128.signum(), 1);\nassert_eq!(0i128.signum(), 0);\nassert_eq!((-10i128).signum(), -1);\n```",
"id": 10955,
"inner": {
"function": {
@@ -77734,30 +76326,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i16"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "saturating_add_signed",
+ "name": "signum",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -77767,20 +76353,20 @@
"10956": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer subtraction. Computes `self - rhs`, saturating\nat the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100u16.saturating_sub(27), 73);\nassert_eq!(13u16.saturating_sub(127), 0);\n```",
+ "docs": "Returns `true` if `self` is positive and `false` if the number is zero or\nnegative.\n\n# Examples\n\n```\nassert!(10i128.is_positive());\nassert!(!(-10i128).is_positive());\n```",
"id": 10956,
"inner": {
"function": {
@@ -77802,30 +76388,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u16"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "saturating_sub",
+ "name": "is_positive",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -77835,20 +76415,20 @@
"10957": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer subtraction. Computes `self` - `rhs`, saturating at\nthe numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1u16.saturating_sub_signed(2), 0);\nassert_eq!(1u16.saturating_sub_signed(-2), 3);\nassert_eq!((u16::MAX - 2).saturating_sub_signed(-4), u16::MAX);\n```",
+ "docs": "Returns `true` if `self` is negative and `false` if the number is zero or\npositive.\n\n# Examples\n\n```\nassert!((-10i128).is_negative());\nassert!(!10i128.is_negative());\n```",
"id": 10957,
"inner": {
"function": {
@@ -77870,30 +76450,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i16"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "saturating_sub_signed",
+ "name": "is_negative",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -77903,10 +76477,10 @@
"10958": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
@@ -77916,7 +76490,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer multiplication. Computes `self * rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(2u16.saturating_mul(10), 20);\nassert_eq!((u16::MAX).saturating_mul(10), u16::MAX);\n```",
+ "docs": "Returns the memory representation of this integer as a byte array in\nbig-endian (network) byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x12345678901234567890123456789012i128.to_be_bytes();\nassert_eq!(bytes, [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]);\n```",
"id": 10958,
"inner": {
"function": {
@@ -77938,30 +76512,29 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u16"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "array": {
+ "len": "16",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
}
}
},
"links": {},
- "name": "saturating_mul",
+ "name": "to_be_bytes",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -77971,23 +76544,20 @@
"10959": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer division. Computes `self / rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u16.saturating_div(2), 2);\n\n```",
+ "docs": "Returns the memory representation of this integer as a byte array in\nlittle-endian byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x12345678901234567890123456789012i128.to_le_bytes();\nassert_eq!(bytes, [0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]);\n```",
"id": 10959,
"inner": {
"function": {
@@ -78009,30 +76579,29 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u16"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "array": {
+ "len": "16",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
}
}
},
"links": {},
- "name": "saturating_div",
+ "name": "to_le_bytes",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -78183,11 +76752,11 @@
"name": "fold",
"span": {
"begin": [
- 2192,
+ 2187,
5
],
"end": [
- 2198,
+ 2193,
6
],
"filename": "std/src/collections/hash/map.rs"
@@ -78197,10 +76766,10 @@
"10960": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
@@ -78210,7 +76779,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer exponentiation. Computes `self.pow(exp)`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(4u16.saturating_pow(3), 64);\nassert_eq!(u16::MAX.saturating_pow(2), u16::MAX);\n```",
+ "docs": "Returns the memory representation of this integer as a byte array in\nnative byte order.\n\nAs the target platform's native endianness is used, portable code\nshould use [`to_be_bytes`] or [`to_le_bytes`], as appropriate,\ninstead.\n\n\n\n[`to_be_bytes`]: Self::to_be_bytes\n[`to_le_bytes`]: Self::to_le_bytes\n\n# Examples\n\n```\nlet bytes = 0x12345678901234567890123456789012i128.to_ne_bytes();\nassert_eq!(\n bytes,\n if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]\n } else {\n [0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]\n }\n);\n```",
"id": 10960,
"inner": {
"function": {
@@ -78232,30 +76801,32 @@
{
"generic": "Self"
}
- ],
- [
- "exp",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "array": {
+ "len": "16",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
}
}
},
- "links": {},
- "name": "saturating_pow",
+ "links": {
+ "Self::to_be_bytes": 10958,
+ "Self::to_le_bytes": 10959
+ },
+ "name": "to_ne_bytes",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -78265,20 +76836,20 @@
"10961": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) addition with a signed integer. Computes\n`self + rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(1u16.wrapping_add_signed(2), 3);\nassert_eq!(1u16.wrapping_add_signed(-2), u16::MAX);\nassert_eq!((u16::MAX - 2).wrapping_add_signed(4), 1);\n```",
+ "docs": "Creates an integer value from its representation as a byte array in\nbig endian.\n\n\n\n# Examples\n\n```\nlet value = i128::from_be_bytes([0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]);\nassert_eq!(value, 0x12345678901234567890123456789012);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_be_i128(input: &mut &[u8]) -> i128 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n i128::from_be_bytes(int_bytes.try_into().unwrap())\n}\n```",
"id": 10961,
"inner": {
"function": {
@@ -78296,34 +76867,33 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "bytes",
{
- "primitive": "i16"
+ "array": {
+ "len": "16",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "wrapping_add_signed",
+ "name": "from_be_bytes",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -78333,20 +76903,20 @@
"10962": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) subtraction with a signed integer. Computes\n`self - rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(1u16.wrapping_sub_signed(2), u16::MAX);\nassert_eq!(1u16.wrapping_sub_signed(-2), 3);\nassert_eq!((u16::MAX - 2).wrapping_sub_signed(-4), 1);\n```",
+ "docs": "Creates an integer value from its representation as a byte array in\nlittle endian.\n\n\n\n# Examples\n\n```\nlet value = i128::from_le_bytes([0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]);\nassert_eq!(value, 0x12345678901234567890123456789012);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_le_i128(input: &mut &[u8]) -> i128 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n i128::from_le_bytes(int_bytes.try_into().unwrap())\n}\n```",
"id": 10962,
"inner": {
"function": {
@@ -78364,34 +76934,33 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "bytes",
{
- "primitive": "i16"
+ "array": {
+ "len": "16",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "wrapping_sub_signed",
+ "name": "from_le_bytes",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -78401,23 +76970,20 @@
"10963": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) division. Computes `self / rhs`.\n\nWrapped division on unsigned types is just normal division. There's\nno way wrapping could ever happen. This function exists so that all\noperations are accounted for in the wrapping operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u16.wrapping_div(10), 10);\n```",
+ "docs": "Creates an integer value from its memory representation as a byte\narray in native endianness.\n\nAs the target platform's native endianness is used, portable code\nlikely wants to use [`from_be_bytes`] or [`from_le_bytes`], as\nappropriate instead.\n\n[`from_be_bytes`]: Self::from_be_bytes\n[`from_le_bytes`]: Self::from_le_bytes\n\n\n\n# Examples\n\n```\nlet value = i128::from_ne_bytes(if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]\n} else {\n [0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]\n});\nassert_eq!(value, 0x12345678901234567890123456789012);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_ne_i128(input: &mut &[u8]) -> i128 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n i128::from_ne_bytes(int_bytes.try_into().unwrap())\n}\n```",
"id": 10963,
"inner": {
"function": {
@@ -78435,34 +77001,36 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "bytes",
{
- "primitive": "u16"
+ "array": {
+ "len": "16",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "i128"
}
}
}
},
- "links": {},
- "name": "wrapping_div",
+ "links": {
+ "Self::from_be_bytes": 10961,
+ "Self::from_le_bytes": 10962
+ },
+ "name": "from_ne_bytes",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -78472,24 +77040,80 @@
"10964": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[rustc_diagnostic_item = \"i128_legacy_fn_min_value\"]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_min_value\", promotable: true}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": {
+ "note": "replaced by the `MIN` associated constant on this type",
+ "since": "TBD"
+ },
+ "docs": "New code should prefer to use\n[`i128::MIN`] instead.\n\nReturns the smallest value that can be represented by this integer type.",
+ "id": 10964,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "i128"
+ }
}
+ }
+ },
+ "links": {
+ "`i128::MIN`": 10828
+ },
+ "name": "min_value",
+ "span": {
+ "begin": [
+ 343,
+ 5
+ ],
+ "end": [
+ 364,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "10965": {
+ "attrs": [
+ {
+ "other": "#[rustc_diagnostic_item = \"i128_legacy_fn_max_value\"]"
},
{
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
}
],
"crate_id": 1,
- "deprecation": null,
- "docs": "Wrapping Euclidean division. Computes `self.div_euclid(rhs)`.\n\nWrapped division on unsigned types is just normal division. There's\nno way wrapping could ever happen. This function exists so that all\noperations are accounted for in the wrapping operations. Since, for\nthe positive integers, all common definitions of division are equal,\nthis is exactly equal to `self.wrapping_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u16.wrapping_div_euclid(10), 10);\n```",
- "id": 10964,
+ "deprecation": {
+ "note": "replaced by the `MAX` associated constant on this type",
+ "since": "TBD"
+ },
+ "docs": "New code should prefer to use\n[`i128::MAX`] instead.\n\nReturns the largest value that can be represented by this integer type.",
+ "id": 10965,
"inner": {
"function": {
"generics": {
@@ -78504,63 +77128,58 @@
"is_unsafe": false
},
"sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u16"
- }
- ]
- ],
+ "inputs": [],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "i128"
}
}
}
},
- "links": {},
- "name": "wrapping_div_euclid",
+ "links": {
+ "`i128::MAX`": 10829
+ },
+ "name": "max_value",
"span": {
"begin": [
- 1081,
+ 343,
5
],
"end": [
- 1099,
+ 364,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "10965": {
+ "10966": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
+ "other": "#[doc(alias = \"average_floor\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[doc(alias = \"average_ceil\")]"
+ },
+ {
+ "other": "#[doc(alias = \"average\")]"
+ },
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"num_midpoint_signed\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"num_midpoint_signed\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) remainder. Computes `self % rhs`.\n\nWrapped remainder calculation on unsigned types is just the regular\nremainder calculation. There's no way wrapping could ever happen.\nThis function exists so that all operations are accounted for in the\nwrapping operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u16.wrapping_rem(10), 0);\n```",
- "id": 10965,
+ "docs": "Calculates the midpoint (average) between `self` and `rhs`.\n\n`midpoint(a, b)` is `(a + b) / 2` as if it were performed in a\nsufficiently-large signed integral type. This implies that the result is\nalways rounded towards zero and that no overflow will ever occur.\n\n# Examples\n\n```\nassert_eq!(0i128.midpoint(4), 2);\nassert_eq!((-1i128).midpoint(2), 0);\nassert_eq!((-7i128).midpoint(0), -3);\nassert_eq!(0i128.midpoint(-7), -3);\nassert_eq!(0i128.midpoint(7), 3);\n```",
+ "id": 10966,
"inner": {
"function": {
"generics": {
@@ -78585,182 +77204,221 @@
[
"rhs",
{
- "primitive": "u16"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "u16"
- }
- }
- }
- },
- "links": {},
- "name": "wrapping_rem",
- "span": {
- "begin": [
- 1081,
- 5
- ],
- "end": [
- 1099,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "10966": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- },
- {
- "other": "#[attr = TrackCaller]"
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Wrapping Euclidean modulo. Computes `self.rem_euclid(rhs)`.\n\nWrapped modulo calculation on unsigned types is just the regular\nremainder calculation. There's no way wrapping could ever happen.\nThis function exists so that all operations are accounted for in the\nwrapping operations. Since, for the positive integers, all common\ndefinitions of division are equal, this is exactly equal to\n`self.wrapping_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u16.wrapping_rem_euclid(10), 0);\n```",
- "id": 10966,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u16"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "wrapping_rem_euclid",
+ "name": "midpoint",
"span": {
"begin": [
- 1081,
+ 365,
5
],
"end": [
- 1099,
- 6
+ 365,
+ 36
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"10967": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
+ "attrs": [],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) negation. Computes `-self`,\nwrapping around at the boundary of the type.\n\nSince unsigned types do not have negative equivalents\nall applications of this function will wrap (except for `-0`).\nFor values smaller than the corresponding signed type's maximum\nthe result is the same as casting the corresponding signed value.\nAny larger values are equivalent to `MAX + 1 - (val - MAX - 1)` where\n`MAX` is the corresponding signed type's maximum.\n\n# Examples\n\n```\nassert_eq!(0_u16.wrapping_neg(), 0);\nassert_eq!(u16::MAX.wrapping_neg(), 1);\nassert_eq!(13_u16.wrapping_neg(), (!13) + 1);\nassert_eq!(42_u16.wrapping_neg(), !(42 - 1));\n```",
+ "docs": null,
"id": 10967,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "i128"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "u16"
- }
- }
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 10828,
+ 10829,
+ 10830,
+ 10831,
+ 10832,
+ 10834,
+ 10835,
+ 10836,
+ 10837,
+ 10838,
+ 10839,
+ 10840,
+ 10841,
+ 10842,
+ 10843,
+ 10844,
+ 10845,
+ 10846,
+ 10847,
+ 10848,
+ 10849,
+ 10850,
+ 10851,
+ 10852,
+ 10854,
+ 10855,
+ 10856,
+ 10857,
+ 10858,
+ 10860,
+ 10861,
+ 10862,
+ 10863,
+ 10864,
+ 10866,
+ 10867,
+ 10868,
+ 10869,
+ 10870,
+ 10871,
+ 10872,
+ 10873,
+ 10874,
+ 10875,
+ 10876,
+ 10877,
+ 10878,
+ 10879,
+ 10880,
+ 10881,
+ 10882,
+ 10883,
+ 10884,
+ 10885,
+ 10886,
+ 10887,
+ 10888,
+ 10889,
+ 10890,
+ 10891,
+ 10892,
+ 10893,
+ 10894,
+ 10895,
+ 10896,
+ 10897,
+ 10898,
+ 10899,
+ 10900,
+ 10901,
+ 10902,
+ 10903,
+ 10904,
+ 10905,
+ 10906,
+ 10853,
+ 10907,
+ 10859,
+ 10908,
+ 10865,
+ 10909,
+ 10910,
+ 10911,
+ 10912,
+ 10913,
+ 10914,
+ 10915,
+ 10916,
+ 10917,
+ 10918,
+ 10919,
+ 10921,
+ 10922,
+ 10923,
+ 10925,
+ 10926,
+ 10927,
+ 10929,
+ 10928,
+ 10930,
+ 10931,
+ 10932,
+ 10933,
+ 10934,
+ 10935,
+ 10936,
+ 10937,
+ 10938,
+ 10939,
+ 10940,
+ 10941,
+ 10942,
+ 10943,
+ 10944,
+ 10945,
+ 10946,
+ 10947,
+ 10948,
+ 10833,
+ 10949,
+ 10950,
+ 10951,
+ 10952,
+ 10953,
+ 10954,
+ 10955,
+ 10956,
+ 10957,
+ 10958,
+ 10959,
+ 10960,
+ 10961,
+ 10962,
+ 10963,
+ 10964,
+ 10965,
+ 10966
+ ],
+ "provided_trait_methods": [],
+ "trait": null
}
},
"links": {},
- "name": "wrapping_neg",
+ "name": null,
"span": {
"begin": [
- 1081,
- 5
+ 342,
+ 1
],
"end": [
- 1099,
- 6
+ 342,
+ 10
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
"10968": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 82, patch: 0})}, feature: \"const_int_from_str\", promotable: false}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Panic-free bitwise shift-left; yields `self << mask(rhs)`,\nwhere `mask` removes any high-order bits of `rhs` that\nwould cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-left; the\nRHS of a wrapping shift-left is restricted to the range\nof the type, rather than the bits shifted out of the LHS\nbeing returned to the other end. The primitive integer\ntypes all implement a [`rotate_left`](Self::rotate_left) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!(1u16.wrapping_shl(7), 128);\nassert_eq!(1u16.wrapping_shl(128), 1);\n```",
+ "docs": "Parses an integer from a string slice with digits in a given base.\n\nThe string is expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# See also\nIf the string to be parsed is in base 10 (decimal),\n[`from_str`] or [`str::parse`] can also be used.\n\n[`from_str`]: #method.from_str\n[`str::parse`]: primitive.str.html#method.parse\n\n# Examples\n\n```\nassert_eq!(i128::from_str_radix(\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\nassert!(i128::from_str_radix(\"1 \", 10).is_err());\n```",
"id": 10968,
"inner": {
"function": {
@@ -78778,13 +77436,19 @@
"sig": {
"inputs": [
[
- "self",
+ "src",
{
- "generic": "Self"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "primitive": "str"
+ }
+ }
}
],
[
- "rhs",
+ "radix",
{
"primitive": "u32"
}
@@ -78792,23 +77456,45 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i128"
+ }
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 4786,
+ "path": "ParseIntError"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 57,
+ "path": "Result"
+ }
}
}
}
},
- "links": {
- "Self::rotate_left": 10900
- },
- "name": "wrapping_shl",
+ "links": {},
+ "name": "from_str_radix",
"span": {
"begin": [
- 1081,
- 5
+ 1666,
+ 1
],
"end": [
- 1099,
- 6
+ 1666,
+ 56
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -78817,20 +77503,12 @@
"10969": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Panic-free bitwise shift-right; yields `self >> mask(rhs)`,\nwhere `mask` removes any high-order bits of `rhs` that\nwould cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-right; the\nRHS of a wrapping shift-right is restricted to the range\nof the type, rather than the bits shifted out of the LHS\nbeing returned to the other end. The primitive integer\ntypes all implement a [`rotate_right`](Self::rotate_right) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!(128u16.wrapping_shr(7), 1);\nassert_eq!(128u16.wrapping_shr(128), 128);\n```",
+ "docs": "Parses an integer from an ASCII-byte slice with decimal digits.\n\nThe characters are expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(i128::from_ascii(b\"+10\"), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(i128::from_ascii(b\"1 \").is_err());\n```",
"id": 10969,
"inner": {
"function": {
@@ -78848,37 +77526,61 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "src",
{
- "primitive": "u32"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "slice": {
+ "primitive": "u8"
+ }
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i128"
+ }
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 4786,
+ "path": "ParseIntError"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 57,
+ "path": "Result"
+ }
}
}
}
},
- "links": {
- "Self::rotate_right": 10901
- },
- "name": "wrapping_shr",
+ "links": {},
+ "name": "from_ascii",
"span": {
"begin": [
- 1081,
- 5
+ 1666,
+ 1
],
"end": [
- 1099,
- 6
+ 1666,
+ 56
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -79044,11 +77746,11 @@
"name": null,
"span": {
"begin": [
- 2176,
+ 2171,
1
],
"end": [
- 2199,
+ 2194,
2
],
"filename": "std/src/collections/hash/map.rs"
@@ -79058,20 +77760,12 @@
"10970": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) exponentiation. Computes `self.pow(exp)`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(3u16.wrapping_pow(5), 243);\nassert_eq!(3u8.wrapping_pow(6), 217);\n```",
+ "docs": "Parses an integer from an ASCII-byte slice with digits in a given base.\n\nThe characters are expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(i128::from_ascii_radix(b\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(i128::from_ascii_radix(b\"1 \", 10).is_err());\n```",
"id": 10970,
"inner": {
"function": {
@@ -79089,13 +77783,21 @@
"sig": {
"inputs": [
[
- "self",
+ "src",
{
- "generic": "Self"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "slice": {
+ "primitive": "u8"
+ }
+ }
+ }
}
],
[
- "exp",
+ "radix",
{
"primitive": "u32"
}
@@ -79103,118 +77805,102 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i128"
+ }
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 4786,
+ "path": "ParseIntError"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 57,
+ "path": "Result"
+ }
}
}
}
},
"links": {},
- "name": "wrapping_pow",
+ "name": "from_ascii_radix",
"span": {
"begin": [
- 1081,
- 5
+ 1666,
+ 1
],
"end": [
- 1099,
- 6
+ 1666,
+ 56
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"10971": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
+ "attrs": [],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5u16.overflowing_add(2), (7, false));\nassert_eq!(u16::MAX.overflowing_add(1), (0, true));\n```",
+ "docs": null,
"id": 10971,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "i128"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u16"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "u16"
- },
- {
- "primitive": "bool"
- }
- ]
- }
- }
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 10968,
+ 10969,
+ 10970
+ ],
+ "provided_trait_methods": [],
+ "trait": null
}
},
"links": {},
- "name": "overflowing_add",
+ "name": null,
"span": {
"begin": [
- 1081,
- 5
+ 1666,
+ 1
],
"end": [
- 1099,
- 6
+ 1666,
+ 56
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
"10972": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 138215, is_soft: false}, feature: \"int_format_into\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs` with a signed `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1u16.overflowing_add_signed(2), (3, false));\nassert_eq!(1u16.overflowing_add_signed(-2), (u16::MAX, true));\nassert_eq!((u16::MAX - 2).overflowing_add_signed(4), (1, true));\n```",
+ "docs": "Allows users to write an integer (in signed decimal format) into a variable `buf` of\ntype [`NumBuffer`] that is passed by the caller by mutable reference.\n\n# Examples\n\n```\n#![feature(int_format_into)]\nuse core::fmt::NumBuffer;\n\nlet n = 0i128;\nlet mut buf = NumBuffer::new();\nassert_eq!(n.format_into(&mut buf), \"0\");\n\nlet n1 = i128::MIN;\nassert_eq!(n1.format_into(&mut buf), i128::MIN.to_string());\n\nlet n2 = i128::MAX;\nassert_eq!(n2.format_into(&mut buf), i128::MAX.to_string());\n```",
"id": 10972,
"inner": {
"function": {
@@ -79226,7 +77912,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -79238,185 +77924,131 @@
}
],
[
- "rhs",
+ "buf",
{
- "primitive": "i16"
+ "borrowed_ref": {
+ "is_mutable": true,
+ "lifetime": null,
+ "type": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i128"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 10387,
+ "path": "NumBuffer"
+ }
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u16"
- },
- {
- "primitive": "bool"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "primitive": "str"
}
- ]
+ }
}
}
}
},
- "links": {},
- "name": "overflowing_add_signed",
+ "links": {
+ "`NumBuffer`": 10387
+ },
+ "name": "format_into",
"span": {
"begin": [
- 1081,
+ 794,
5
],
"end": [
- 1099,
- 6
+ 794,
+ 64
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/fmt/num.rs"
},
"visibility": "public"
},
"10973": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
+ "attrs": [],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` - `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5u16.overflowing_sub(2), (3, false));\nassert_eq!(0u16.overflowing_sub(1), (u16::MAX, true));\n```",
+ "docs": null,
"id": 10973,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "i128"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u16"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "u16"
- },
- {
- "primitive": "bool"
- }
- ]
- }
- }
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 10972
+ ],
+ "provided_trait_methods": [],
+ "trait": null
}
},
"links": {},
- "name": "overflowing_sub",
+ "name": null,
"span": {
"begin": [
- 1081,
- 5
+ 773,
+ 1
],
"end": [
- 1099,
- 6
+ 773,
+ 10
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/fmt/num.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
"10974": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` - `rhs` with a signed `rhs`\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1u16.overflowing_sub_signed(2), (u16::MAX, true));\nassert_eq!(1u16.overflowing_sub_signed(-2), (3, false));\nassert_eq!((u16::MAX - 2).overflowing_sub_signed(-4), (1, true));\n```",
+ "docs": "The smallest value that can be represented by this integer type.\n\n# Examples\n\n```\nassert_eq!(u8::MIN, 0);\n```",
"id": 10974,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "u8"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "i16"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "u16"
- },
- {
- "primitive": "bool"
- }
- ]
- }
- }
+ "value": "0"
}
},
"links": {},
- "name": "overflowing_sub_signed",
+ "name": "MIN",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -79426,65 +78058,30 @@
"10975": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Computes the absolute difference between `self` and `other`.\n\n# Examples\n\n```\nassert_eq!(100u16.abs_diff(80), 20u16);\nassert_eq!(100u16.abs_diff(110), 10u16);\n```",
+ "docs": "The largest value that can be represented by this integer type\n(28 − 1).\n\n# Examples\n\n```\nassert_eq!(u8::MAX, 255);\n```",
"id": 10975,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "u8"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "other",
- {
- "primitive": "u16"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "u16"
- }
- }
+ "value": "_"
}
},
"links": {},
- "name": "abs_diff",
+ "name": "MAX",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -79494,72 +78091,30 @@
"10976": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 53, patch: 0})}, feature: \"int_bits_const\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the multiplication of `self` and `rhs`.\n\nReturns a tuple of the multiplication along with a boolean\nindicating whether an arithmetic overflow would occur. If an\noverflow would have occurred then the wrapped value is returned.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why why `u32`\nis used.\n\n```\nassert_eq!(5u32.overflowing_mul(2), (10, false));\nassert_eq!(1_000_000_000u32.overflowing_mul(10), (1410065408, true));\n```",
+ "docs": "The size of this integer type in bits.\n\n# Examples\n\n```\nassert_eq!(u8::BITS, 8);\n```",
"id": 10976,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "u32"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u16"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "u16"
- },
- {
- "primitive": "bool"
- }
- ]
- }
- }
+ "value": "_"
}
},
"links": {},
- "name": "overflowing_mul",
+ "name": "BITS",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -79569,10 +78124,16 @@
"10977": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ "other": "#[doc(alias = \"popcount\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[doc(alias = \"popcnt\")]"
+ },
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -79582,7 +78143,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the \"full multiplication\" `self * rhs + carry`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need the `carry`, then you can use [`Self::widening_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5u32.carrying_mul(2, 0), (10, 0));\nassert_eq!(5u32.carrying_mul(2, 10), (20, 0));\nassert_eq!(1_000_000_000u32.carrying_mul(10, 0), (1410065408, 2));\nassert_eq!(1_000_000_000u32.carrying_mul(10, 10), (1410065418, 2));\nassert_eq!(u16::MAX.carrying_mul(u16::MAX, u16::MAX), (0, u16::MAX));\n```\n\nThis is the core operation needed for scalar multiplication when\nimplementing it for wider-than-native types.\n\n```\n#![feature(bigint_helper_methods)]\nfn scalar_mul_eq(little_endian_digits: &mut Vec, multiplicand: u16) {\n let mut carry = 0;\n for d in little_endian_digits.iter_mut() {\n (*d, carry) = d.carrying_mul(multiplicand, carry);\n }\n if carry != 0 {\n little_endian_digits.push(carry);\n }\n}\n\nlet mut v = vec![10, 20];\nscalar_mul_eq(&mut v, 3);\nassert_eq!(v, [30, 60]);\n\nassert_eq!(0x87654321_u64 * 0xFEED, 0x86D3D159E38D);\nlet mut v = vec![0x4321, 0x8765];\nscalar_mul_eq(&mut v, 0xFEED);\nassert_eq!(v, [0xE38D, 0xD159, 0x86D3]);\n```\n\nIf `carry` is zero, this is similar to [`overflowing_mul`](Self::overflowing_mul),\nexcept that it gives the value of the overflow instead of just whether one happened:\n\n```\n#![feature(bigint_helper_methods)]\nlet r = u8::carrying_mul(7, 13, 0);\nassert_eq!((r.0, r.1 != 0), u8::overflowing_mul(7, 13));\nlet r = u8::carrying_mul(13, 42, 0);\nassert_eq!((r.0, r.1 != 0), u8::overflowing_mul(13, 42));\n```\n\nThe value of the first field in the returned tuple matches what you'd get\nby combining the [`wrapping_mul`](Self::wrapping_mul) and\n[`wrapping_add`](Self::wrapping_add) methods:\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(\n 789_u16.carrying_mul(456, 123).0,\n 789_u16.wrapping_mul(456).wrapping_add(123),\n);\n```",
+ "docs": "Returns the number of ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 0b01001100u8;\nassert_eq!(n.count_ones(), 3);\n\nlet max = u8::MAX;\nassert_eq!(max.count_ones(), 8);\n\nlet zero = 0u8;\nassert_eq!(zero.count_ones(), 0);\n```",
"id": 10977,
"inner": {
"function": {
@@ -79604,48 +78165,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u16"
- }
- ],
- [
- "carry",
- {
- "primitive": "u16"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u16"
- },
- {
- "primitive": "u16"
- }
- ]
+ "primitive": "u32"
}
}
}
},
- "links": {
- "Self::overflowing_mul": 10976,
- "Self::wrapping_add": 10910,
- "Self::wrapping_mul": 10923,
- "`Self::widening_mul`": 10978
- },
- "name": "carrying_mul",
+ "links": {},
+ "name": "count_ones",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -79655,10 +78192,10 @@
"10978": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -79668,7 +78205,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the complete product `self * rhs` without the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nIf you also need to add a carry to the wide result, then you want\n[`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5u32.widening_mul(2), (10, 0));\nassert_eq!(1_000_000_000u32.widening_mul(10), (1410065408, 2));\n```",
+ "docs": "Returns the number of zeros in the binary representation of `self`.\n\n# Examples\n\n```\nlet zero = 0u8;\nassert_eq!(zero.count_zeros(), 8);\n\nlet max = u8::MAX;\nassert_eq!(max.count_zeros(), 0);\n```",
"id": 10978,
"inner": {
"function": {
@@ -79690,39 +78227,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u16"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u16"
- },
- {
- "primitive": "u16"
- }
- ]
+ "primitive": "u32"
}
}
}
},
- "links": {
- "`Self::carrying_mul`": 10977
- },
- "name": "widening_mul",
+ "links": {},
+ "name": "count_zeros",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -79732,20 +78254,23 @@
"10979": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the \"full multiplication\" `self * rhs + carry1 + carry2`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need either `carry`, then you can use [`Self::widening_mul`] instead,\nand if you only need one `carry`, then you can use [`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared between integer types,\nwhich explains why `u32` is used here.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5u32.carrying_mul_add(2, 0, 0), (10, 0));\nassert_eq!(5u32.carrying_mul_add(2, 10, 10), (30, 0));\nassert_eq!(1_000_000_000u32.carrying_mul_add(10, 0, 0), (1410065408, 2));\nassert_eq!(1_000_000_000u32.carrying_mul_add(10, 10, 10), (1410065428, 2));\nassert_eq!(u16::MAX.carrying_mul_add(u16::MAX, u16::MAX, u16::MAX), (u16::MAX, u16::MAX));\n```\n\nThis is the core per-digit operation for \"grade school\" O(n²) multiplication.\n\nPlease note that this example is shared between integer types,\nusing `u8` for simplicity of the demonstration.\n\n```\n#![feature(bigint_helper_methods)]\n\nfn quadratic_mul(a: [u8; N], b: [u8; N]) -> [u8; N] {\n let mut out = [0; N];\n for j in 0..N {\n let mut carry = 0;\n for i in 0..(N - j) {\n (out[j + i], carry) = u8::carrying_mul_add(a[i], b[j], out[j + i], carry);\n }\n }\n out\n}\n\n// -1 * -1 == 1\nassert_eq!(quadratic_mul([0xFF; 3], [0xFF; 3]), [1, 0, 0]);\n\nassert_eq!(u32::wrapping_mul(0x9e3779b9, 0x7f4a7c15), 0xCFFC982D);\nassert_eq!(\n quadratic_mul(u32::to_le_bytes(0x9e3779b9), u32::to_le_bytes(0x7f4a7c15)),\n u32::to_le_bytes(0xCFFC982D)\n);\n```",
+ "docs": "Returns the base 2 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is zero.\n\n# Examples\n\n```\nassert_eq!(2u8.ilog2(), 1);\n```",
"id": 10979,
"inner": {
"function": {
@@ -79767,52 +78292,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u16"
- }
- ],
- [
- "carry",
- {
- "primitive": "u16"
- }
- ],
- [
- "add",
- {
- "primitive": "u16"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u16"
- },
- {
- "primitive": "u16"
- }
- ]
+ "primitive": "u32"
}
}
}
},
- "links": {
- "`Self::carrying_mul`": 10977,
- "`Self::widening_mul`": 10978
- },
- "name": "carrying_mul_add",
+ "links": {},
+ "name": "ilog2",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -79868,11 +78365,11 @@
"name": "len",
"span": {
"begin": [
- 2203,
+ 2198,
5
],
"end": [
- 2205,
+ 2200,
6
],
"filename": "std/src/collections/hash/map.rs"
@@ -79882,23 +78379,20 @@
"10980": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the divisor when `self` is divided by `rhs`.\n\nReturns a tuple of the divisor along with a boolean indicating\nwhether an arithmetic overflow would occur. Note that for unsigned\nintegers overflow never occurs, so the second value is always\n`false`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u16.overflowing_div(2), (2, false));\n```",
+ "docs": "Returns the number of leading zeros in the binary representation of `self`.\n\nDepending on what you're doing with the value, you might also be interested in the\n[`ilog2`] function which returns a consistent number, even if the type widens.\n\n# Examples\n\n```\nlet n = u8::MAX >> 2;\nassert_eq!(n.leading_zeros(), 2);\n\nlet zero = 0u8;\nassert_eq!(zero.leading_zeros(), 8);\n\nlet max = u8::MAX;\nassert_eq!(max.leading_zeros(), 0);\n```\n[`ilog2`]: u8::ilog2",
"id": 10980,
"inner": {
"function": {
@@ -79920,37 +78414,26 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u16"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u16"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
- "links": {},
- "name": "overflowing_div",
+ "links": {
+ "u8::ilog2": 10979
+ },
+ "name": "leading_zeros",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -79960,23 +78443,20 @@
"10981": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of Euclidean division `self.div_euclid(rhs)`.\n\nReturns a tuple of the divisor along with a boolean indicating\nwhether an arithmetic overflow would occur. Note that for unsigned\nintegers overflow never occurs, so the second value is always\n`false`.\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self.overflowing_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u16.overflowing_div_euclid(2), (2, false));\n```",
+ "docs": "Returns the number of trailing zeros in the binary representation\nof `self`.\n\n# Examples\n\n```\nlet n = 0b0101000u8;\nassert_eq!(n.trailing_zeros(), 3);\n\nlet zero = 0u8;\nassert_eq!(zero.trailing_zeros(), 8);\n\nlet max = u8::MAX;\nassert_eq!(max.trailing_zeros(), 0);\n```",
"id": 10981,
"inner": {
"function": {
@@ -79998,37 +78478,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u16"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u16"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "overflowing_div_euclid",
+ "name": "trailing_zeros",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -80038,23 +78505,20 @@
"10982": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the remainder when `self` is divided by `rhs`.\n\nReturns a tuple of the remainder after dividing along with a boolean\nindicating whether an arithmetic overflow would occur. Note that for\nunsigned integers overflow never occurs, so the second value is\nalways `false`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u16.overflowing_rem(2), (1, false));\n```",
+ "docs": "Returns the number of leading ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = !(u8::MAX >> 2);\nassert_eq!(n.leading_ones(), 2);\n\nlet zero = 0u8;\nassert_eq!(zero.leading_ones(), 0);\n\nlet max = u8::MAX;\nassert_eq!(max.leading_ones(), 8);\n```",
"id": 10982,
"inner": {
"function": {
@@ -80076,37 +78540,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u16"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u16"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "overflowing_rem",
+ "name": "leading_ones",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -80116,23 +78567,20 @@
"10983": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the remainder `self.rem_euclid(rhs)` as if by Euclidean division.\n\nReturns a tuple of the modulo after dividing along with a boolean\nindicating whether an arithmetic overflow would occur. Note that for\nunsigned integers overflow never occurs, so the second value is\nalways `false`.\nSince, for the positive integers, all common\ndefinitions of division are equal, this operation\nis exactly equal to `self.overflowing_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u16.overflowing_rem_euclid(2), (1, false));\n```",
+ "docs": "Returns the number of trailing ones in the binary representation\nof `self`.\n\n# Examples\n\n```\nlet n = 0b1010111u8;\nassert_eq!(n.trailing_ones(), 3);\n\nlet zero = 0u8;\nassert_eq!(zero.trailing_ones(), 0);\n\nlet max = u8::MAX;\nassert_eq!(max.trailing_ones(), 8);\n```",
"id": 10983,
"inner": {
"function": {
@@ -80154,37 +78602,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u16"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u16"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "overflowing_rem_euclid",
+ "name": "trailing_ones",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -80194,10 +78629,7 @@
"10984": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 142326, is_soft: false}, feature: \"uint_bit_width\"}}]"
},
{
"must_use": {
@@ -80207,7 +78639,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Negates self in an overflowing fashion.\n\nReturns `!self + 1` using wrapping operations to return the value\nthat represents the negation of this unsigned value. Note that for\npositive unsigned values overflow always occurs, but negating 0 does\nnot overflow.\n\n# Examples\n\n```\nassert_eq!(0u16.overflowing_neg(), (0, false));\nassert_eq!(2u16.overflowing_neg(), (-2i32 as u16, true));\n```",
+ "docs": "Returns the minimum number of bits required to represent `self`.\n\nThis method returns zero if `self` is zero.\n\n# Examples\n\n```\n#![feature(uint_bit_width)]\n\nassert_eq!(0_u8.bit_width(), 0);\nassert_eq!(0b111_u8.bit_width(), 3);\nassert_eq!(0b1110_u8.bit_width(), 4);\nassert_eq!(u8::MAX.bit_width(), 8);\n```",
"id": 10984,
"inner": {
"function": {
@@ -80233,27 +78665,20 @@
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u16"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "overflowing_neg",
+ "name": "bit_width",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -80263,10 +78688,7 @@
"10985": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
},
{
"must_use": {
@@ -80276,7 +78698,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts self left by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean\nindicating whether the shift value was larger than or equal to the\nnumber of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then\nused to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x1u16.overflowing_shl(4), (0x10, false));\nassert_eq!(0x1u16.overflowing_shl(132), (0x10, true));\nassert_eq!(0x10u16.overflowing_shl(15), (0, false));\n```",
+ "docs": "Returns `self` with only the most significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: u8 = 0b_01100100;\n\nassert_eq!(n.isolate_highest_one(), 0b_01000000);\nassert_eq!(0_u8.isolate_highest_one(), 0);\n```",
"id": 10985,
"inner": {
"function": {
@@ -80298,37 +78720,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u16"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "overflowing_shl",
+ "name": "isolate_highest_one",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -80338,10 +78747,7 @@
"10986": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
},
{
"must_use": {
@@ -80351,7 +78757,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts self right by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean\nindicating whether the shift value was larger than or equal to the\nnumber of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then\nused to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x10u16.overflowing_shr(4), (0x1, false));\nassert_eq!(0x10u16.overflowing_shr(132), (0x1, true));\n```",
+ "docs": "Returns `self` with only the least significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: u8 = 0b_01100100;\n\nassert_eq!(n.isolate_lowest_one(), 0b_00000100);\nassert_eq!(0_u8.isolate_lowest_one(), 0);\n```",
"id": 10986,
"inner": {
"function": {
@@ -80373,37 +78779,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u16"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "overflowing_shr",
+ "name": "isolate_lowest_one",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -80413,10 +78806,7 @@
"10987": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
},
{
"must_use": {
@@ -80426,7 +78816,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\nReturns a tuple of the exponentiation along with a bool indicating\nwhether an overflow happened.\n\n# Examples\n\n```\nassert_eq!(3u16.overflowing_pow(5), (243, false));\nassert_eq!(3u8.overflowing_pow(6), (217, true));\n```",
+ "docs": "Returns the index of the highest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_u8.highest_one(), None);\nassert_eq!(0x1_u8.highest_one(), Some(0));\nassert_eq!(0x10_u8.highest_one(), Some(4));\nassert_eq!(0x1f_u8.highest_one(), Some(4));\n```",
"id": 10987,
"inner": {
"function": {
@@ -80448,37 +78838,39 @@
{
"generic": "Self"
}
- ],
- [
- "exp",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u16"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
},
- {
- "primitive": "bool"
- }
- ]
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "overflowing_pow",
+ "name": "highest_one",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -80488,10 +78880,7 @@
"10988": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
},
{
"must_use": {
@@ -80501,7 +78890,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\n# Examples\n\n```\nassert_eq!(2u16.pow(5), 32);\n```",
+ "docs": "Returns the index of the lowest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_u8.lowest_one(), None);\nassert_eq!(0x1_u8.lowest_one(), Some(0));\nassert_eq!(0x10_u8.lowest_one(), Some(4));\nassert_eq!(0x1f_u8.lowest_one(), Some(0));\n```",
"id": 10988,
"inner": {
"function": {
@@ -80523,30 +78912,39 @@
{
"generic": "Self"
}
- ],
- [
- "exp",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "pow",
+ "name": "lowest_one",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -80556,10 +78954,10 @@
"10989": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -80569,7 +78967,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the square root of the number, rounded down.\n\n# Examples\n\n```\nassert_eq!(10u16.isqrt(), 3);\n```",
+ "docs": "Shifts the bits to the left by a specified amount, `n`,\nwrapping the truncated bits to the end of the resulting integer.\n\nPlease note this isn't the same operation as the `<<` shifting operator!\n\n# Examples\n\n```\nlet n = 0x82u8;\nlet m = 0xa;\n\nassert_eq!(n.rotate_left(2), m);\n```",
"id": 10989,
"inner": {
"function": {
@@ -80591,24 +78989,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "n",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "isqrt",
+ "name": "rotate_left",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -80697,11 +79101,11 @@
"name": null,
"span": {
"begin": [
- 2201,
+ 2196,
1
],
"end": [
- 2206,
+ 2201,
2
],
"filename": "std/src/collections/hash/map.rs"
@@ -80711,23 +79115,20 @@
"10990": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Performs Euclidean division.\n\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7u16.div_euclid(4), 1); // or any other integer type\n```",
+ "docs": "Shifts the bits to the right by a specified amount, `n`,\nwrapping the truncated bits to the beginning of the resulting\ninteger.\n\nPlease note this isn't the same operation as the `>>` shifting operator!\n\n# Examples\n\n```\nlet n = 0xau8;\nlet m = 0x82;\n\nassert_eq!(n.rotate_right(2), m);\n```",
"id": 10990,
"inner": {
"function": {
@@ -80751,28 +79152,28 @@
}
],
[
- "rhs",
+ "n",
{
- "primitive": "u16"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "div_euclid",
+ "name": "rotate_right",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -80782,26 +79183,20 @@
"10991": {
"attrs": [
{
- "other": "#[doc(alias = \"modulo\", alias = \"mod\")]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 145686, is_soft: false}, feature: \"funnel_shifts\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145686, is_soft: false}, feature: \"funnel_shifts\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the least remainder of `self (mod rhs)`.\n\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self % rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7u16.rem_euclid(4), 3); // or any other integer type\n```",
+ "docs": "Performs a left funnel shift (concatenates `self` with `rhs`, with `self`\nmaking up the most significant half, then shifts the combined value left\nby `n`, and most significant half is extracted to produce the result).\n\nPlease note this isn't the same operation as the `<<` shifting operator or\n[`rotate_left`](Self::rotate_left), although `a.funnel_shl(a, n)` is *equivalent*\nto `a.rotate_left(n)`.\n\n# Panics\n\nIf `n` is greater than or equal to the number of bits in `self`\n\n# Examples\n\nBasic usage:\n\n```\n#![feature(funnel_shifts)]\nlet a = 0x82u8;\nlet b = 0x36u8;\nlet m = 0x8;\n\nassert_eq!(a.funnel_shl(b, 2), m);\n```",
"id": 10991,
"inner": {
"function": {
@@ -80827,26 +79222,34 @@
[
"rhs",
{
- "primitive": "u16"
+ "primitive": "u8"
+ }
+ ],
+ [
+ "n",
+ {
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "u8"
}
}
}
},
- "links": {},
- "name": "rem_euclid",
+ "links": {
+ "Self::rotate_left": 10989
+ },
+ "name": "funnel_shl",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -80856,20 +79259,20 @@
"10992": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 145686, is_soft: false}, feature: \"funnel_shifts\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145686, is_soft: false}, feature: \"funnel_shifts\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards negative infinity.\n\nThis is the same as performing `self / rhs` for all unsigned integers.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(7_u16.div_floor(4), 1);\n```",
+ "docs": "Performs a right funnel shift (concatenates `self` and `rhs`, with `self`\nmaking up the most significant half, then shifts the combined value right\nby `n`, and least significant half is extracted to produce the result).\n\nPlease note this isn't the same operation as the `>>` shifting operator or\n[`rotate_right`](Self::rotate_right), although `a.funnel_shr(a, n)` is *equivalent*\nto `a.rotate_right(n)`.\n\n# Panics\n\nIf `n` is greater than or equal to the number of bits in `self`\n\n# Examples\n\nBasic usage:\n\n```\n#![feature(funnel_shifts)]\nlet a = 0x82u8;\nlet b = 0x36u8;\nlet m = 0x8d;\n\nassert_eq!(a.funnel_shr(b, 2), m);\n```",
"id": 10992,
"inner": {
"function": {
@@ -80895,26 +79298,34 @@
[
"rhs",
{
- "primitive": "u16"
+ "primitive": "u8"
+ }
+ ],
+ [
+ "n",
+ {
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "u8"
}
}
}
},
- "links": {},
- "name": "div_floor",
+ "links": {
+ "Self::rotate_right": 10990
+ },
+ "name": "funnel_shr",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -80924,23 +79335,20 @@
"10993": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards positive infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7_u16.div_ceil(4), 2);\n```",
+ "docs": "Reverses the byte order of the integer.\n\n# Examples\n\n```\nlet n = 0x12u8;\nlet m = n.swap_bytes();\n\nassert_eq!(m, 0x12);\n```",
"id": 10993,
"inner": {
"function": {
@@ -80962,30 +79370,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u16"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "div_ceil",
+ "name": "swap_bytes",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -80995,10 +79397,10 @@
"10994": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\"}}]"
},
{
"must_use": {
@@ -81008,7 +79410,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the smallest value greater than or equal to `self` that\nis a multiple of `rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nOn overflow, this function will panic if overflow checks are enabled (default in debug\nmode) and wrap if overflow checks are disabled (default in release mode).\n\n# Examples\n\n```\nassert_eq!(16_u16.next_multiple_of(8), 16);\nassert_eq!(23_u16.next_multiple_of(8), 24);\n```",
+ "docs": "Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\n second least-significant bit becomes second most-significant bit, etc.\n\n# Examples\n\n```\nlet n = 0x12u8;\nlet m = n.reverse_bits();\n\nassert_eq!(m, 0x48);\nassert_eq!(0, 0u8.reverse_bits());\n```",
"id": 10994,
"inner": {
"function": {
@@ -81030,30 +79432,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u16"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "next_multiple_of",
+ "name": "reverse_bits",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -81063,20 +79459,20 @@
"10995": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the smallest value greater than or equal to `self` that\nis a multiple of `rhs`. Returns `None` if `rhs` is zero or the\noperation would result in overflow.\n\n# Examples\n\n```\nassert_eq!(16_u16.checked_next_multiple_of(8), Some(16));\nassert_eq!(23_u16.checked_next_multiple_of(8), Some(24));\nassert_eq!(1_u16.checked_next_multiple_of(0), None);\nassert_eq!(u16::MAX.checked_next_multiple_of(2), None);\n```",
+ "docs": "Converts an integer from big endian to the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au8;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(u8::from_be(n), n)\n} else {\n assert_eq!(u8::from_be(n), n.swap_bytes())\n}\n```",
"id": 10995,
"inner": {
"function": {
@@ -81094,49 +79490,28 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "x",
{
- "primitive": "u16"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u16"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "checked_next_multiple_of",
+ "name": "from_be",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -81146,10 +79521,10 @@
"10996": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unsigned_is_multiple_of\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unsigned_is_multiple_of\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -81159,7 +79534,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `true` if `self` is an integer multiple of `rhs`, and false otherwise.\n\nThis function is equivalent to `self % rhs == 0`, except that it will not panic\nfor `rhs == 0`. Instead, `0.is_multiple_of(0) == true`, and for any non-zero `n`,\n`n.is_multiple_of(0) == false`.\n\n# Examples\n\n```\nassert!(6_u16.is_multiple_of(2));\nassert!(!5_u16.is_multiple_of(2));\n\nassert!(0_u16.is_multiple_of(0));\nassert!(!6_u16.is_multiple_of(0));\n```",
+ "docs": "Converts an integer from little endian to the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au8;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(u8::from_le(n), n)\n} else {\n assert_eq!(u8::from_le(n), n.swap_bytes())\n}\n```",
"id": 10996,
"inner": {
"function": {
@@ -81177,34 +79552,28 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "x",
{
- "primitive": "u16"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "is_multiple_of",
+ "name": "from_le",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -81214,20 +79583,20 @@
"10997": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_is_power_of_two\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `true` if and only if `self == 2^k` for some unsigned integer `k`.\n\n# Examples\n\n```\nassert!(16u16.is_power_of_two());\nassert!(!10u16.is_power_of_two());\n```",
+ "docs": "Converts `self` to big endian from the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au8;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(n.to_be(), n)\n} else {\n assert_eq!(n.to_be(), n.swap_bytes())\n}\n```",
"id": 10997,
"inner": {
"function": {
@@ -81253,20 +79622,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "is_power_of_two",
+ "name": "to_be",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -81276,7 +79645,7 @@
"10998": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -81289,7 +79658,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the smallest power of two greater than or equal to `self`.\n\nWhen return value overflows (i.e., `self > (1 << (N-1))` for type\n`uN`), it panics in debug mode and the return value is wrapped to 0 in\nrelease mode (the only situation in which this method can return 0).\n\n# Examples\n\n```\nassert_eq!(2u16.next_power_of_two(), 2);\nassert_eq!(3u16.next_power_of_two(), 4);\nassert_eq!(0u16.next_power_of_two(), 1);\n```",
+ "docs": "Converts `self` to little endian from the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au8;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(n.to_le(), n)\n} else {\n assert_eq!(n.to_le(), n.swap_bytes())\n}\n```",
"id": 10998,
"inner": {
"function": {
@@ -81315,20 +79684,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "next_power_of_two",
+ "name": "to_le",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -81338,7 +79707,7 @@
"10999": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -81351,7 +79720,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the smallest power of two greater than or equal to `self`. If\nthe next power of two is greater than the type's maximum value,\n`None` is returned, otherwise the power of two is wrapped in `Some`.\n\n# Examples\n\n```\nassert_eq!(2u16.checked_next_power_of_two(), Some(2));\nassert_eq!(3u16.checked_next_power_of_two(), Some(4));\nassert_eq!(u16::MAX.checked_next_power_of_two(), None);\n```",
+ "docs": "Checked integer addition. Computes `self + rhs`, returning `None`\nif overflow occurred.\n\n# Examples\n\n```\nassert_eq!((u8::MAX - 2).checked_add(1), Some(u8::MAX - 1));\nassert_eq!((u8::MAX - 2).checked_add(3), None);\n```",
"id": 10999,
"inner": {
"function": {
@@ -81373,6 +79742,12 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u8"
+ }
]
],
"is_c_variadic": false,
@@ -81383,7 +79758,7 @@
"args": [
{
"type": {
- "primitive": "u16"
+ "primitive": "u8"
}
}
],
@@ -81398,14 +79773,14 @@
}
},
"links": {},
- "name": "checked_next_power_of_two",
+ "name": "checked_add",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -81429,8 +79804,8 @@
"use": {
"id": 111,
"is_glob": false,
- "name": "Default",
- "source": "core::prelude::v1::Default"
+ "name": "Eq",
+ "source": "core::prelude::v1::Eq"
}
},
"links": {},
@@ -81438,11 +79813,11 @@
"span": {
"begin": [
52,
- 50
+ 59
],
"end": [
52,
- 57
+ 61
],
"filename": "std/src/prelude/v1.rs"
},
@@ -81525,11 +79900,11 @@
"name": null,
"span": {
"begin": [
- 2208,
+ 2203,
1
],
"end": [
- 2208,
+ 2203,
47
],
"filename": "std/src/collections/hash/map.rs"
@@ -81539,17 +79914,23 @@
"11000": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"needs decision on wrapping behavior\"),\nissue: 32463, is_soft: false}, feature: \"wrapping_next_power_of_two\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the smallest power of two greater than or equal to `n`. If\nthe next power of two is greater than the type's maximum value,\nthe return value is wrapped to `0`.\n\n# Examples\n\n```\n#![feature(wrapping_next_power_of_two)]\n\nassert_eq!(2u16.wrapping_next_power_of_two(), 2);\nassert_eq!(3u16.wrapping_next_power_of_two(), 4);\nassert_eq!(u16::MAX.wrapping_next_power_of_two(), 0);\n```",
+ "docs": "Strict integer addition. Computes `self + rhs`, panicking\nif overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((u8::MAX - 2).strict_add(1), u8::MAX - 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (u8::MAX - 2).strict_add(3);\n```",
"id": 11000,
"inner": {
"function": {
@@ -81571,24 +79952,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "wrapping_next_power_of_two",
+ "name": "strict_add",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -81598,10 +79985,10 @@
"11001": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -81611,7 +79998,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nbig-endian (network) byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x1234u16.to_be_bytes();\nassert_eq!(bytes, [0x12, 0x34]);\n```",
+ "docs": "Wrapping (modular) addition. Computes `self + rhs`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(200u8.wrapping_add(55), 255);\nassert_eq!(200u8.wrapping_add(u8::MAX), 199);\n```",
"id": 11001,
"inner": {
"function": {
@@ -81633,29 +80020,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "array": {
- "len": "2",
- "type": {
- "primitive": "u8"
- }
- }
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "to_be_bytes",
+ "name": "wrapping_add",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -81665,20 +80053,23 @@
"11002": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nlittle-endian byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x1234u16.to_le_bytes();\nassert_eq!(bytes, [0x34, 0x12]);\n```",
+ "docs": "Unchecked integer addition. Computes `self + rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_add(y)` is semantically equivalent to calling\n`x.`[`checked_add`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_add`].\n\n# Safety\n\nThis results in undefined behavior when\n`self + rhs > u8::MAX` or `self + rhs < u8::MIN`,\ni.e. when [`checked_add`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_add`]: u8::checked_add\n[`wrapping_add`]: u8::wrapping_add",
"id": 11002,
"inner": {
"function": {
@@ -81691,7 +80082,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -81700,29 +80091,33 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "array": {
- "len": "2",
- "type": {
- "primitive": "u8"
- }
- }
+ "primitive": "u8"
}
}
}
},
- "links": {},
- "name": "to_le_bytes",
+ "links": {
+ "u8::checked_add": 10999,
+ "u8::wrapping_add": 11001
+ },
+ "name": "unchecked_add",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -81732,10 +80127,10 @@
"11003": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -81745,7 +80140,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nnative byte order.\n\nAs the target platform's native endianness is used, portable code\nshould use [`to_be_bytes`] or [`to_le_bytes`], as appropriate,\ninstead.\n\n\n\n[`to_be_bytes`]: Self::to_be_bytes\n[`to_le_bytes`]: Self::to_le_bytes\n\n# Examples\n\n```\nlet bytes = 0x1234u16.to_ne_bytes();\nassert_eq!(\n bytes,\n if cfg!(target_endian = \"big\") {\n [0x12, 0x34]\n } else {\n [0x34, 0x12]\n }\n);\n```",
+ "docs": "Checked addition with a signed integer. Computes `self + rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1u8.checked_add_signed(2), Some(3));\nassert_eq!(1u8.checked_add_signed(-2), None);\nassert_eq!((u8::MAX - 2).checked_add_signed(3), None);\n```",
"id": 11003,
"inner": {
"function": {
@@ -81767,32 +80162,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "array": {
- "len": "2",
- "type": {
- "primitive": "u8"
- }
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u8"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
}
}
}
}
},
- "links": {
- "Self::to_be_bytes": 11001,
- "Self::to_le_bytes": 11002
- },
- "name": "to_ne_bytes",
+ "links": {},
+ "name": "checked_add_signed",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -81802,20 +80210,23 @@
"11004": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Creates a native endian integer value from its representation\nas a byte array in big endian.\n\n\n\n# Examples\n\n```\nlet value = u16::from_be_bytes([0x12, 0x34]);\nassert_eq!(value, 0x1234);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_be_u16(input: &mut &[u8]) -> u16 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n u16::from_be_bytes(int_bytes.try_into().unwrap())\n}\n```",
+ "docs": "Strict addition with a signed integer. Computes `self + rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1u8.strict_add_signed(2), 3);\n```\n\nThe following panic because of overflow:\n\n```should_panic\nlet _ = 1u8.strict_add_signed(-2);\n```\n\n```should_panic\nlet _ = (u8::MAX - 2).strict_add_signed(3);\n```",
"id": 11004,
"inner": {
"function": {
@@ -81833,33 +80244,34 @@
"sig": {
"inputs": [
[
- "bytes",
+ "self",
{
- "array": {
- "len": "2",
- "type": {
- "primitive": "u8"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "from_be_bytes",
+ "name": "strict_add_signed",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -81869,20 +80281,20 @@
"11005": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Creates a native endian integer value from its representation\nas a byte array in little endian.\n\n\n\n# Examples\n\n```\nlet value = u16::from_le_bytes([0x34, 0x12]);\nassert_eq!(value, 0x1234);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_le_u16(input: &mut &[u8]) -> u16 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n u16::from_le_bytes(int_bytes.try_into().unwrap())\n}\n```",
+ "docs": "Checked integer subtraction. Computes `self - rhs`, returning\n`None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1u8.checked_sub(1), Some(0));\nassert_eq!(0u8.checked_sub(1), None);\n```",
"id": 11005,
"inner": {
"function": {
@@ -81900,33 +80312,49 @@
"sig": {
"inputs": [
[
- "bytes",
+ "self",
{
- "array": {
- "len": "2",
- "type": {
- "primitive": "u8"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u8"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "from_le_bytes",
+ "name": "checked_sub",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -81936,20 +80364,23 @@
"11006": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Creates a native endian integer value from its memory representation\nas a byte array in native endianness.\n\nAs the target platform's native endianness is used, portable code\nlikely wants to use [`from_be_bytes`] or [`from_le_bytes`], as\nappropriate instead.\n\n[`from_be_bytes`]: Self::from_be_bytes\n[`from_le_bytes`]: Self::from_le_bytes\n\n\n\n# Examples\n\n```\nlet value = u16::from_ne_bytes(if cfg!(target_endian = \"big\") {\n [0x12, 0x34]\n} else {\n [0x34, 0x12]\n});\nassert_eq!(value, 0x1234);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_ne_u16(input: &mut &[u8]) -> u16 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n u16::from_ne_bytes(int_bytes.try_into().unwrap())\n}\n```",
+ "docs": "Strict integer subtraction. Computes `self - rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1u8.strict_sub(1), 0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0u8.strict_sub(1);\n```",
"id": 11006,
"inner": {
"function": {
@@ -81967,36 +80398,34 @@
"sig": {
"inputs": [
[
- "bytes",
+ "self",
{
- "array": {
- "len": "2",
- "type": {
- "primitive": "u8"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "u8"
}
}
}
},
- "links": {
- "Self::from_be_bytes": 11004,
- "Self::from_le_bytes": 11005
- },
- "name": "from_ne_bytes",
+ "links": {},
+ "name": "strict_sub",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -82006,21 +80435,20 @@
"11007": {
"attrs": [
{
- "other": "#[rustc_diagnostic_item = \"u16_legacy_fn_min_value\"]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
- "deprecation": {
- "note": "replaced by the `MIN` associated constant on this type",
- "since": "TBD"
- },
- "docs": "New code should prefer to use\n[`u16::MIN`] instead.\n\nReturns the smallest value that can be represented by this integer type.",
+ "deprecation": null,
+ "docs": "Wrapping (modular) subtraction. Computes `self - rhs`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(100u8.wrapping_sub(100), 0);\nassert_eq!(100u8.wrapping_sub(u8::MAX), 101);\n```",
"id": 11007,
"inner": {
"function": {
@@ -82036,25 +80464,36 @@
"is_unsafe": false
},
"sig": {
- "inputs": [],
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u8"
+ }
+ ]
+ ],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "u8"
}
}
}
},
- "links": {
- "`u16::MIN`": 10884
- },
- "name": "min_value",
+ "links": {},
+ "name": "wrapping_sub",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -82064,21 +80503,23 @@
"11008": {
"attrs": [
{
- "other": "#[rustc_diagnostic_item = \"u16_legacy_fn_max_value\"]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
},
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
- "deprecation": {
- "note": "replaced by the `MAX` associated constant on this type",
- "since": "TBD"
- },
- "docs": "New code should prefer to use\n[`u16::MAX`] instead.\n\nReturns the largest value that can be represented by this integer type.",
+ "deprecation": null,
+ "docs": "Unchecked integer subtraction. Computes `self - rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_sub(y)` is semantically equivalent to calling\n`x.`[`checked_sub`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_sub`].\n\nIf you find yourself writing code like this:\n\n```\n# let foo = 30_u32;\n# let bar = 20;\nif foo >= bar {\n // SAFETY: just checked it will not overflow\n let diff = unsafe { foo.unchecked_sub(bar) };\n // ... use diff ...\n}\n```\n\nConsider changing it to\n\n```\n# let foo = 30_u32;\n# let bar = 20;\nif let Some(diff) = foo.checked_sub(bar) {\n // ... use diff ...\n}\n```\n\nAs that does exactly the same thing -- including telling the optimizer\nthat the subtraction cannot overflow -- but avoids needing `unsafe`.\n\n# Safety\n\nThis results in undefined behavior when\n`self - rhs > u8::MAX` or `self - rhs < u8::MIN`,\ni.e. when [`checked_sub`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_sub`]: u8::checked_sub\n[`wrapping_sub`]: u8::wrapping_sub",
"id": 11008,
"inner": {
"function": {
@@ -82091,28 +80532,42 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
- "inputs": [],
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u8"
+ }
+ ]
+ ],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "primitive": "u8"
}
}
}
},
"links": {
- "`u16::MAX`": 10885
+ "u8::checked_sub": 11005,
+ "u8::wrapping_sub": 11007
},
- "name": "max_value",
+ "name": "unchecked_sub",
"span": {
"begin": [
- 1081,
+ 447,
5
],
"end": [
- 1099,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -82122,16 +80577,10 @@
"11009": {
"attrs": [
{
- "other": "#[doc(alias = \"average_floor\")]"
- },
- {
- "other": "#[doc(alias = \"average\")]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"num_midpoint\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"num_midpoint\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
},
{
"must_use": {
@@ -82141,7 +80590,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the midpoint (average) between `self` and `rhs`.\n\n`midpoint(a, b)` is `(a + b) / 2` as if it were performed in a\nsufficiently-large unsigned integral type. This implies that the result is\nalways rounded towards zero and that no overflow will ever occur.\n\n# Examples\n\n```\nassert_eq!(0u16.midpoint(4), 2);\nassert_eq!(1u16.midpoint(4), 2);\n```",
+ "docs": "Checked subtraction with a signed integer. Computes `self - rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1u8.checked_sub_signed(2), None);\nassert_eq!(1u8.checked_sub_signed(-2), Some(3));\nassert_eq!((u8::MAX - 2).checked_sub_signed(-4), None);\n```",
"id": 11009,
"inner": {
"function": {
@@ -82167,27 +80616,42 @@
[
"rhs",
{
- "primitive": "u16"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u16"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u8"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "midpoint",
+ "name": "checked_sub_signed",
"span": {
"begin": [
- 1100,
+ 447,
5
],
"end": [
- 1100,
- 42
+ 468,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -82244,7 +80708,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -82256,7 +80720,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -82267,11 +80731,11 @@
"name": "fmt",
"span": {
"begin": [
- 2212,
+ 2207,
5
],
"end": [
- 2214,
+ 2209,
6
],
"filename": "std/src/collections/hash/map.rs"
@@ -82281,17 +80745,23 @@
"11010": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 94919, is_soft: false}, feature: \"utf16_extra\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checks if the value is a Unicode surrogate code point, which are disallowed values for [`char`].\n\n# Examples\n\n```\n#![feature(utf16_extra)]\n\nlet low_non_surrogate = 0xA000u16;\nlet low_surrogate = 0xD800u16;\nlet high_surrogate = 0xDC00u16;\nlet high_non_surrogate = 0xE000u16;\n\nassert!(!low_non_surrogate.is_utf16_surrogate());\nassert!(low_surrogate.is_utf16_surrogate());\nassert!(high_surrogate.is_utf16_surrogate());\nassert!(!high_non_surrogate.is_utf16_surrogate());\n```",
+ "docs": "Strict subtraction with a signed integer. Computes `self - rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(3u8.strict_sub_signed(2), 1);\n```\n\nThe following panic because of overflow:\n\n```should_panic\nlet _ = 1u8.strict_sub_signed(2);\n```\n\n```should_panic\nlet _ = (u8::MAX).strict_sub_signed(-1);\n```",
"id": 11010,
"inner": {
"function": {
@@ -82313,216 +80783,136 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "primitive": "u8"
}
}
}
},
- "links": {
- "`char`": 2397
- },
- "name": "is_utf16_surrogate",
+ "links": {},
+ "name": "strict_sub_signed",
"span": {
"begin": [
- 1122,
+ 447,
5
],
"end": [
- 1122,
- 50
+ 468,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"11011": {
- "attrs": [],
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_signed_diff\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_signed_diff\"}}]"
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Checked integer subtraction. Computes `self - rhs` and checks if the result fits into an [`i8`], returning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(10u8.checked_signed_diff(2), Some(8));\nassert_eq!(2u8.checked_signed_diff(10), Some(-8));\nassert_eq!(u8::MAX.checked_signed_diff(i8::MAX as u8), None);\nassert_eq!((i8::MAX as u8).checked_signed_diff(u8::MAX), Some(i8::MIN));\nassert_eq!((i8::MAX as u8 + 1).checked_signed_diff(0), None);\nassert_eq!(u8::MAX.checked_signed_diff(u8::MAX), Some(0));\n```",
"id": 11011,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "primitive": "u16"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
},
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 10884,
- 10885,
- 10886,
- 10887,
- 10888,
- 10890,
- 10891,
- 10892,
- 10893,
- 10894,
- 10895,
- 10896,
- 10897,
- 10898,
- 10899,
- 10900,
- 10901,
- 10902,
- 10903,
- 10904,
- 10905,
- 10906,
- 10907,
- 10908,
- 10909,
- 10911,
- 10912,
- 10913,
- 10914,
- 10915,
- 10917,
- 10918,
- 10919,
- 10920,
- 10921,
- 10922,
- 10924,
- 10925,
- 10926,
- 10927,
- 10928,
- 10929,
- 10930,
- 10931,
- 10932,
- 10933,
- 10934,
- 10935,
- 10936,
- 10937,
- 10889,
- 10938,
- 10939,
- 10940,
- 10941,
- 10942,
- 10943,
- 10944,
- 10945,
- 10946,
- 10947,
- 10948,
- 10949,
- 10950,
- 10951,
- 10952,
- 10953,
- 10954,
- 10955,
- 10956,
- 10957,
- 10958,
- 10959,
- 10960,
- 10910,
- 10961,
- 10916,
- 10962,
- 10923,
- 10963,
- 10964,
- 10965,
- 10966,
- 10967,
- 10968,
- 10969,
- 10970,
- 10971,
- 10253,
- 10972,
- 10973,
- 10257,
- 10974,
- 10975,
- 10976,
- 10978,
- 10977,
- 10979,
- 10980,
- 10981,
- 10982,
- 10983,
- 10984,
- 10985,
- 10986,
- 10987,
- 10988,
- 10989,
- 10990,
- 10991,
- 10992,
- 10993,
- 10994,
- 10995,
- 10996,
- 10997,
- 10998,
- 10999,
- 11000,
- 11001,
- 11002,
- 11003,
- 11004,
- 11005,
- 11006,
- 11007,
- 11008,
- 11009,
- 11010
- ],
- "provided_trait_methods": [],
- "trait": null
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 1080,
- 1
- ],
- "end": [
- 1080,
- 9
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "default"
- },
- "11012": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 82, patch: 0})}, feature: \"const_int_from_str\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Parses an integer from a string slice with digits in a given base.\n\nThe string is expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\nassert_eq!(u16::from_str_radix(\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\nassert!(u16::from_str_radix(\"1 \", 10).is_err());\n```",
- "id": 11012,
- "inner": {
- "function": {
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u8"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i8"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {
+ "`i8`": 4814
+ },
+ "name": "checked_signed_diff",
+ "span": {
+ "begin": [
+ 447,
+ 5
+ ],
+ "end": [
+ 468,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11012": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Checked integer multiplication. Computes `self * rhs`, returning\n`None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(5u8.checked_mul(1), Some(5));\nassert_eq!(u8::MAX.checked_mul(2), None);\n```",
+ "id": 11012,
+ "inner": {
+ "function": {
"generics": {
"params": [],
"where_predicates": []
@@ -82537,21 +80927,15 @@
"sig": {
"inputs": [
[
- "src",
+ "self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "primitive": "str"
- }
- }
+ "generic": "Self"
}
],
[
- "radix",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "u8"
}
]
],
@@ -82563,39 +80947,30 @@
"args": [
{
"type": {
- "primitive": "u16"
- }
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 4784,
- "path": "ParseIntError"
- }
+ "primitive": "u8"
}
}
],
"constraints": []
}
},
- "id": 57,
- "path": "Result"
+ "id": 51,
+ "path": "Option"
}
}
}
}
},
"links": {},
- "name": "from_str_radix",
+ "name": "checked_mul",
"span": {
"begin": [
- 1631,
- 1
+ 447,
+ 5
],
"end": [
- 1631,
- 58
+ 468,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -82604,12 +80979,23 @@
"11013": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from an ASCII-byte slice with decimal digits.\n\nThe characters are expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(u16::from_ascii(b\"+10\"), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(u16::from_ascii(b\"1 \").is_err());\n```",
+ "docs": "Strict integer multiplication. Computes `self * rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(5u8.strict_mul(1), 5);\n```\n\nThe following panics because of overflow:\n\n``` should_panic\nlet _ = u8::MAX.strict_mul(2);\n```",
"id": 11013,
"inner": {
"function": {
@@ -82627,61 +81013,35 @@
"sig": {
"inputs": [
[
- "src",
+ "self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "slice": {
- "primitive": "u8"
- }
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u16"
- }
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 4784,
- "path": "ParseIntError"
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 57,
- "path": "Result"
- }
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "from_ascii",
+ "name": "strict_mul",
"span": {
"begin": [
- 1631,
- 1
+ 447,
+ 5
],
"end": [
- 1631,
- 58
+ 468,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -82690,12 +81050,20 @@
"11014": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from an ASCII-byte slice with digits in a given base.\n\nThe characters are expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(u16::from_ascii_radix(b\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(u16::from_ascii_radix(b\"1 \", 10).is_err());\n```",
+ "docs": "Wrapping (modular) multiplication. Computes `self *\nrhs`, wrapping around at the boundary of the type.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u8` is used.\n\n```\nassert_eq!(10u8.wrapping_mul(12), 120);\nassert_eq!(25u8.wrapping_mul(12), 44);\n```",
"id": 11014,
"inner": {
"function": {
@@ -82713,124 +81081,131 @@
"sig": {
"inputs": [
[
- "src",
+ "self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "slice": {
- "primitive": "u8"
- }
- }
- }
+ "generic": "Self"
}
],
[
- "radix",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u16"
- }
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 4784,
- "path": "ParseIntError"
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 57,
- "path": "Result"
- }
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "from_ascii_radix",
+ "name": "wrapping_mul",
"span": {
"begin": [
- 1631,
- 1
+ 447,
+ 5
],
"end": [
- 1631,
- 58
+ 468,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"11015": {
- "attrs": [],
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Unchecked integer multiplication. Computes `self * rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_mul(y)` is semantically equivalent to calling\n`x.`[`checked_mul`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_mul`].\n\n# Safety\n\nThis results in undefined behavior when\n`self * rhs > u8::MAX` or `self * rhs < u8::MIN`,\ni.e. when [`checked_mul`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_mul`]: u8::checked_mul\n[`wrapping_mul`]: u8::wrapping_mul",
"id": 11015,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "primitive": "u16"
- },
+ "function": {
"generics": {
"params": [],
"where_predicates": []
},
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 11012,
- 11013,
- 11014
- ],
- "provided_trait_methods": [],
- "trait": null
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": true
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u8"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u8"
+ }
+ }
}
},
- "links": {},
- "name": null,
+ "links": {
+ "u8::checked_mul": 11012,
+ "u8::wrapping_mul": 11014
+ },
+ "name": "unchecked_mul",
"span": {
"begin": [
- 1631,
- 1
+ 447,
+ 5
],
"end": [
- 1631,
- 58
+ 468,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"11016": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 138215, is_soft: false}, feature: \"int_format_into\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Allows users to write an integer (in signed decimal format) into a variable `buf` of\ntype [`NumBuffer`] that is passed by the caller by mutable reference.\n\n# Examples\n\n```\n#![feature(int_format_into)]\nuse core::fmt::NumBuffer;\n\nlet n = 0u16;\nlet mut buf = NumBuffer::new();\nassert_eq!(n.format_into(&mut buf), \"0\");\n\nlet n1 = 32u16;\nassert_eq!(n1.format_into(&mut buf), \"32\");\n\nlet n2 = u16 :: MAX;\nassert_eq!(n2.format_into(&mut buf), u16 :: MAX.to_string());\n```",
+ "docs": "Checked integer division. Computes `self / rhs`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(128u8.checked_div(2), Some(64));\nassert_eq!(1u8.checked_div(0), None);\n```",
"id": 11016,
"inner": {
"function": {
@@ -82842,7 +81217,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -82854,131 +81229,197 @@
}
],
[
- "buf",
+ "rhs",
{
- "borrowed_ref": {
- "is_mutable": true,
- "lifetime": null,
- "type": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u16"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 10162,
- "path": "NumBuffer"
- }
- }
- }
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "primitive": "str"
- }
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u8"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
}
}
}
}
},
- "links": {
- "`NumBuffer`": 10162
- },
- "name": "format_into",
+ "links": {},
+ "name": "checked_div",
"span": {
"begin": [
- 562,
+ 447,
5
],
"end": [
- 562,
- 95
+ 468,
+ 6
],
- "filename": "checkouts/rust/library/core/src/fmt/num.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"11017": {
- "attrs": [],
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Strict integer division. Computes `self / rhs`.\n\nStrict division on unsigned types is just normal division. There's no\nway overflow could ever happen. This function exists so that all\noperations are accounted for in the strict operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u8.strict_div(10), 10);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1u8).strict_div(0);\n```",
"id": 11017,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "primitive": "u16"
- },
+ "function": {
"generics": {
"params": [],
"where_predicates": []
},
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 11016
- ],
- "provided_trait_methods": [],
- "trait": null
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u8"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u8"
+ }
+ }
}
},
"links": {},
- "name": null,
+ "name": "strict_div",
"span": {
"begin": [
- 562,
+ 447,
5
],
"end": [
- 562,
- 95
+ 468,
+ 6
],
- "filename": "checkouts/rust/library/core/src/fmt/num.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"11018": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "The smallest value that can be represented by this integer type.\n\n# Examples\n\n```\nassert_eq!(u32::MIN, 0);\n```",
+ "docs": "Checked Euclidean division. Computes `self.div_euclid(rhs)`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(128u8.checked_div_euclid(2), Some(64));\nassert_eq!(1u8.checked_div_euclid(0), None);\n```",
"id": 11018,
"inner": {
- "assoc_const": {
- "type": {
- "primitive": "u32"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "value": "0"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u8"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u8"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
}
},
"links": {},
- "name": "MIN",
+ "name": "checked_div_euclid",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -82988,30 +81429,68 @@
"11019": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 53, patch: 0})}, feature: \"int_bits_const\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "The size of this integer type in bits.\n\n# Examples\n\n```\nassert_eq!(u32::BITS, 32);\n```",
+ "docs": "Strict Euclidean division. Computes `self.div_euclid(rhs)`.\n\nStrict division on unsigned types is just normal division. There's no\nway overflow could ever happen. This function exists so that all\noperations are accounted for in the strict operations. Since, for the\npositive integers, all common definitions of division are equal, this\nis exactly equal to `self.strict_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u8.strict_div_euclid(10), 10);\n```\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1u8).strict_div_euclid(0);\n```",
"id": 11019,
"inner": {
- "assoc_const": {
- "type": {
- "primitive": "u32"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "value": "_"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u8"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u8"
+ }
+ }
}
},
"links": {},
- "name": "BITS",
+ "name": "strict_div_euclid",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -83066,7 +81545,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -83100,7 +81579,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -83109,11 +81588,11 @@
"name": null,
"span": {
"begin": [
- 2211,
+ 2206,
1
],
"end": [
- 2215,
+ 2210,
2
],
"filename": "std/src/collections/hash/map.rs"
@@ -83123,16 +81602,7 @@
"11020": {
"attrs": [
{
- "other": "#[doc(alias = \"popcount\")]"
- },
- {
- "other": "#[doc(alias = \"popcnt\")]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
},
{
"must_use": {
@@ -83142,7 +81612,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 0b01001100u32;\nassert_eq!(n.count_ones(), 3);\n\nlet max = u32::MAX;\nassert_eq!(max.count_ones(), 32);\n\nlet zero = 0u32;\nassert_eq!(zero.count_ones(), 0);\n```",
+ "docs": "Checked integer division without remainder. Computes `self / rhs`,\nreturning `None` if `rhs == 0` or if `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64u8.checked_exact_div(2), Some(32));\nassert_eq!(64u8.checked_exact_div(32), Some(2));\nassert_eq!(64u8.checked_exact_div(0), None);\nassert_eq!(65u8.checked_exact_div(2), None);\n```",
"id": 11020,
"inner": {
"function": {
@@ -83164,24 +81634,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u8"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "count_ones",
+ "name": "checked_exact_div",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -83191,10 +81682,7 @@
"11021": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
},
{
"must_use": {
@@ -83204,7 +81692,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of zeros in the binary representation of `self`.\n\n# Examples\n\n```\nlet zero = 0u32;\nassert_eq!(zero.count_zeros(), 32);\n\nlet max = u32::MAX;\nassert_eq!(max.count_zeros(), 0);\n```",
+ "docs": "Checked integer division without remainder. Computes `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs == 0` or `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64u8.exact_div(2), 32);\nassert_eq!(64u8.exact_div(32), 2);\n```\n\n```should_panic\n#![feature(exact_div)]\nlet _ = 65u8.exact_div(2);\n```",
"id": 11021,
"inner": {
"function": {
@@ -83226,24 +81714,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "count_zeros",
+ "name": "exact_div",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -83253,23 +81747,17 @@
"11022": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 2 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is zero.\n\n# Examples\n\n```\nassert_eq!(2u32.ilog2(), 1);\n```",
+ "docs": "Unchecked integer division without remainder. Computes `self / rhs`.\n\n# Safety\n\nThis results in undefined behavior when `rhs == 0` or `self % rhs != 0`,\ni.e. when [`checked_exact_div`](Self::checked_exact_div) would return `None`.",
"id": 11022,
"inner": {
"function": {
@@ -83282,7 +81770,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -83291,24 +81779,32 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
- "links": {},
- "name": "ilog2",
+ "links": {
+ "Self::checked_exact_div": 11020
+ },
+ "name": "unchecked_exact_div",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -83318,10 +81814,10 @@
"11023": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -83331,7 +81827,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of leading zeros in the binary representation of `self`.\n\nDepending on what you're doing with the value, you might also be interested in the\n[`ilog2`] function which returns a consistent number, even if the type widens.\n\n# Examples\n\n```\nlet n = u32::MAX >> 2;\nassert_eq!(n.leading_zeros(), 2);\n\nlet zero = 0u32;\nassert_eq!(zero.leading_zeros(), 32);\n\nlet max = u32::MAX;\nassert_eq!(max.leading_zeros(), 0);\n```\n[`ilog2`]: u32::ilog2",
+ "docs": "Checked integer remainder. Computes `self % rhs`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(5u8.checked_rem(2), Some(1));\nassert_eq!(5u8.checked_rem(0), None);\n```",
"id": 11023,
"inner": {
"function": {
@@ -83353,26 +81849,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u8"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
- "links": {
- "u32::ilog2": 11022
- },
- "name": "leading_zeros",
+ "links": {},
+ "name": "checked_rem",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -83382,20 +81897,23 @@
"11024": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of trailing zeros in the binary representation\nof `self`.\n\n# Examples\n\n```\nlet n = 0b0101000u32;\nassert_eq!(n.trailing_zeros(), 3);\n\nlet zero = 0u32;\nassert_eq!(zero.trailing_zeros(), 32);\n\nlet max = u32::MAX;\nassert_eq!(max.trailing_zeros(), 0);\n```",
+ "docs": "Strict integer remainder. Computes `self % rhs`.\n\nStrict remainder calculation on unsigned types is just the regular\nremainder calculation. There's no way overflow could ever happen.\nThis function exists so that all operations are accounted for in the\nstrict operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u8.strict_rem(10), 0);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5u8.strict_rem(0);\n```",
"id": 11024,
"inner": {
"function": {
@@ -83417,24 +81935,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "trailing_zeros",
+ "name": "strict_rem",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -83444,10 +81968,10 @@
"11025": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -83457,7 +81981,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of leading ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = !(u32::MAX >> 2);\nassert_eq!(n.leading_ones(), 2);\n\nlet zero = 0u32;\nassert_eq!(zero.leading_ones(), 0);\n\nlet max = u32::MAX;\nassert_eq!(max.leading_ones(), 32);\n```",
+ "docs": "Checked Euclidean modulo. Computes `self.rem_euclid(rhs)`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(5u8.checked_rem_euclid(2), Some(1));\nassert_eq!(5u8.checked_rem_euclid(0), None);\n```",
"id": 11025,
"inner": {
"function": {
@@ -83479,24 +82003,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u8"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "leading_ones",
+ "name": "checked_rem_euclid",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -83506,20 +82051,23 @@
"11026": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of trailing ones in the binary representation\nof `self`.\n\n# Examples\n\n```\nlet n = 0b1010111u32;\nassert_eq!(n.trailing_ones(), 3);\n\nlet zero = 0u32;\nassert_eq!(zero.trailing_ones(), 0);\n\nlet max = u32::MAX;\nassert_eq!(max.trailing_ones(), 32);\n```",
+ "docs": "Strict Euclidean modulo. Computes `self.rem_euclid(rhs)`.\n\nStrict modulo calculation on unsigned types is just the regular\nremainder calculation. There's no way overflow could ever happen.\nThis function exists so that all operations are accounted for in the\nstrict operations. Since, for the positive integers, all common\ndefinitions of division are equal, this is exactly equal to\n`self.strict_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u8.strict_rem_euclid(10), 0);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5u8.strict_rem_euclid(0);\n```",
"id": 11026,
"inner": {
"function": {
@@ -83541,24 +82089,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "trailing_ones",
+ "name": "strict_rem_euclid",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -83568,17 +82122,15 @@
"11027": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 142326, is_soft: false}, feature: \"uint_bit_width\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 135758, is_soft: false}, feature: \"disjoint_bitor\",\npromotable: false}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 135758, is_soft: false}, feature: \"disjoint_bitor\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the minimum number of bits required to represent `self`.\n\nThis method returns zero if `self` is zero.\n\n# Examples\n\n```\n#![feature(uint_bit_width)]\n\nassert_eq!(0_u32.bit_width(), 0);\nassert_eq!(0b111_u32.bit_width(), 3);\nassert_eq!(0b1110_u32.bit_width(), 4);\nassert_eq!(u32::MAX.bit_width(), 32);\n```",
+ "docs": "Same value as `self | other`, but UB if any bit position is set in both inputs.\n\nThis is a situational micro-optimization for places where you'd rather\nuse addition on some platforms and bitwise or on other platforms, based\non exactly which instructions combine better with whatever else you're\ndoing. Note that there's no reason to bother using this for places\nwhere it's clear from the operations involved that they can't overlap.\nFor example, if you're combining `u16`s into a `u32` with\n`((a as u32) << 16) | (b as u32)`, that's fine, as the backend will\nknow those sides of the `|` are disjoint without needing help.\n\n# Examples\n\n```\n#![feature(disjoint_bitor)]\n\n// SAFETY: `1` and `4` have no bits in common.\nunsafe {\n assert_eq!(1_u8.unchecked_disjoint_bitor(4), 5);\n}\n```\n\n# Safety\n\nRequires that `(self & other) == 0`, otherwise it's immediate UB.\n\nEquivalently, requires that `(self | other) == (self + other)`.",
"id": 11027,
"inner": {
"function": {
@@ -83591,7 +82143,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -83600,24 +82152,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "other",
+ {
+ "primitive": "u8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "bit_width",
+ "name": "unchecked_disjoint_bitor",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -83627,17 +82185,23 @@
"11028": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `self` with only the most significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: u32 = 0b_01100100;\n\nassert_eq!(n.isolate_highest_one(), 0b_01000000);\nassert_eq!(0_u32.isolate_highest_one(), 0);\n```",
+ "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nThis method might not be optimized owing to implementation details;\n`ilog2` can produce results more efficiently for base 2, and `ilog10`\ncan produce results more efficiently for base 10.\n\n# Panics\n\nThis function will panic if `self` is zero, or if `base` is less than 2.\n\n# Examples\n\n```\nassert_eq!(5u8.ilog(5), 1);\n```",
"id": 11028,
"inner": {
"function": {
@@ -83659,6 +82223,12 @@
{
"generic": "Self"
}
+ ],
+ [
+ "base",
+ {
+ "primitive": "u8"
+ }
]
],
"is_c_variadic": false,
@@ -83669,14 +82239,14 @@
}
},
"links": {},
- "name": "isolate_highest_one",
+ "name": "ilog",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -83686,17 +82256,23 @@
"11029": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `self` with only the least significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: u32 = 0b_01100100;\n\nassert_eq!(n.isolate_lowest_one(), 0b_00000100);\nassert_eq!(0_u32.isolate_lowest_one(), 0);\n```",
+ "docs": "Returns the base 10 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is zero.\n\n# Example\n\n```\nassert_eq!(10u8.ilog10(), 1);\n```",
"id": 11029,
"inner": {
"function": {
@@ -83728,14 +82304,14 @@
}
},
"links": {},
- "name": "isolate_lowest_one",
+ "name": "ilog10",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -83745,7 +82321,10 @@
"11030": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
@@ -83755,7 +82334,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the index of the highest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_u32.highest_one(), None);\nassert_eq!(0x1_u32.highest_one(), Some(0));\nassert_eq!(0x10_u32.highest_one(), Some(4));\nassert_eq!(0x1f_u32.highest_one(), Some(4));\n```",
+ "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nReturns `None` if the number is zero, or if the base is not at least 2.\n\nThis method might not be optimized owing to implementation details;\n`checked_ilog2` can produce results more efficiently for base 2, and\n`checked_ilog10` can produce results more efficiently for base 10.\n\n# Examples\n\n```\nassert_eq!(5u8.checked_ilog(5), Some(1));\n```",
"id": 11030,
"inner": {
"function": {
@@ -83777,6 +82356,12 @@
{
"generic": "Self"
}
+ ],
+ [
+ "base",
+ {
+ "primitive": "u8"
+ }
]
],
"is_c_variadic": false,
@@ -83802,14 +82387,14 @@
}
},
"links": {},
- "name": "highest_one",
+ "name": "checked_ilog",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -83819,7 +82404,10 @@
"11031": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
@@ -83829,7 +82417,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the index of the lowest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_u32.lowest_one(), None);\nassert_eq!(0x1_u32.lowest_one(), Some(0));\nassert_eq!(0x10_u32.lowest_one(), Some(4));\nassert_eq!(0x1f_u32.lowest_one(), Some(0));\n```",
+ "docs": "Returns the base 2 logarithm of the number, rounded down.\n\nReturns `None` if the number is zero.\n\n# Examples\n\n```\nassert_eq!(2u8.checked_ilog2(), Some(1));\n```",
"id": 11031,
"inner": {
"function": {
@@ -83876,14 +82464,14 @@
}
},
"links": {},
- "name": "lowest_one",
+ "name": "checked_ilog2",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -83893,10 +82481,10 @@
"11032": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
@@ -83906,7 +82494,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the bit pattern of `self` reinterpreted as a signed integer of the same size.\n\nThis produces the same result as an `as` cast, but ensures that the bit-width remains\nthe same.\n\n# Examples\n\n```\nlet n = u32::MAX;\n\nassert_eq!(n.cast_signed(), -1i32);\n```",
+ "docs": "Returns the base 10 logarithm of the number, rounded down.\n\nReturns `None` if the number is zero.\n\n# Examples\n\n```\nassert_eq!(10u8.checked_ilog10(), Some(1));\n```",
"id": 11032,
"inner": {
"function": {
@@ -83932,20 +82520,35 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "i32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "cast_signed",
+ "name": "checked_ilog10",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -83955,10 +82558,10 @@
"11033": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -83968,7 +82571,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts the bits to the left by a specified amount, `n`,\nwrapping the truncated bits to the end of the resulting integer.\n\nPlease note this isn't the same operation as the `<<` shifting operator!\n\n# Examples\n\n```\nlet n = 0x10000b3u32;\nlet m = 0xb301;\n\nassert_eq!(n.rotate_left(8), m);\n```",
+ "docs": "Checked negation. Computes `-self`, returning `None` unless `self ==\n0`.\n\nNote that negating any positive integer will overflow.\n\n# Examples\n\n```\nassert_eq!(0u8.checked_neg(), Some(0));\nassert_eq!(1u8.checked_neg(), None);\n```",
"id": 11033,
"inner": {
"function": {
@@ -83990,30 +82593,39 @@
{
"generic": "Self"
}
- ],
- [
- "n",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u8"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "rotate_left",
+ "name": "checked_neg",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -84023,20 +82635,23 @@
"11034": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts the bits to the right by a specified amount, `n`,\nwrapping the truncated bits to the beginning of the resulting\ninteger.\n\nPlease note this isn't the same operation as the `>>` shifting operator!\n\n# Examples\n\n```\nlet n = 0xb301u32;\nlet m = 0x10000b3;\n\nassert_eq!(n.rotate_right(8), m);\n```",
+ "docs": "Strict negation. Computes `-self`, panicking unless `self ==\n0`.\n\nNote that negating any positive integer will overflow.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0u8.strict_neg(), 0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 1u8.strict_neg();\n```",
"id": 11034,
"inner": {
"function": {
@@ -84058,30 +82673,24 @@
{
"generic": "Self"
}
- ],
- [
- "n",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "rotate_right",
+ "name": "strict_neg",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -84091,10 +82700,10 @@
"11035": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -84104,7 +82713,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Reverses the byte order of the integer.\n\n# Examples\n\n```\nlet n = 0x12345678u32;\nlet m = n.swap_bytes();\n\nassert_eq!(m, 0x78563412);\n```",
+ "docs": "Checked shift left. Computes `self << rhs`, returning `None`\nif `rhs` is larger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x1u8.checked_shl(4), Some(0x10));\nassert_eq!(0x10u8.checked_shl(129), None);\nassert_eq!(0x10u8.checked_shl(7), Some(0));\n```",
"id": 11035,
"inner": {
"function": {
@@ -84126,24 +82735,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u8"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "swap_bytes",
+ "name": "checked_shl",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -84153,20 +82783,23 @@
"11036": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\n second least-significant bit becomes second most-significant bit, etc.\n\n# Examples\n\n```\nlet n = 0x12345678u32;\nlet m = n.reverse_bits();\n\nassert_eq!(m, 0x1e6a2c48);\nassert_eq!(0, 0u32.reverse_bits());\n```",
+ "docs": "Strict shift left. Computes `self << rhs`, panicking if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x1u8.strict_shl(4), 0x10);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10u8.strict_shl(129);\n```",
"id": 11036,
"inner": {
"function": {
@@ -84188,24 +82821,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "reverse_bits",
+ "name": "strict_shl",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -84215,20 +82854,20 @@
"11037": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts an integer from big endian to the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au32;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(u32::from_be(n), n)\n} else {\n assert_eq!(u32::from_be(n), n.swap_bytes())\n}\n```",
+ "docs": "Unchecked shift left. Computes `self << rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shl`] would return `None`.\n\n[`checked_shl`]: u8::checked_shl",
"id": 11037,
"inner": {
"function": {
@@ -84241,12 +82880,18 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
[
- "x",
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
{
"primitive": "u32"
}
@@ -84254,20 +82899,22 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
- "links": {},
- "name": "from_be",
+ "links": {
+ "u8::checked_shl": 11035
+ },
+ "name": "unchecked_shl",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -84277,20 +82924,20 @@
"11038": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts an integer from little endian to the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au32;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(u32::from_le(n), n)\n} else {\n assert_eq!(u32::from_le(n), n.swap_bytes())\n}\n```",
+ "docs": "Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x1u8.unbounded_shl(4), 0x10);\nassert_eq!(0x1u8.unbounded_shl(129), 0);\n```",
"id": 11038,
"inner": {
"function": {
@@ -84308,7 +82955,13 @@
"sig": {
"inputs": [
[
- "x",
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
{
"primitive": "u32"
}
@@ -84316,20 +82969,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "from_le",
+ "name": "unbounded_shl",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -84339,10 +82992,7 @@
"11039": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
@@ -84352,7 +83002,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts `self` to big endian from the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au32;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(n.to_be(), n)\n} else {\n assert_eq!(n.to_be(), n.swap_bytes())\n}\n```",
+ "docs": "Exact shift left. Computes `self << rhs` as long as it can be reversed losslessly.\n\nReturns `None` if any non-zero bits would be shifted out or if `rhs` >=\n`u8::BITS`.\nOtherwise, returns `Some(self << rhs)`.\n\n# Examples\n\n```\n#![feature(exact_bitshifts)]\n\nassert_eq!(0x1u8.exact_shl(4), Some(0x10));\nassert_eq!(0x1u8.exact_shl(129), None);\n```",
"id": 11039,
"inner": {
"function": {
@@ -84374,24 +83024,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u8"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "to_be",
+ "name": "exact_shl",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -84518,10 +83189,7 @@
"11040": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
@@ -84531,7 +83199,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts `self` to little endian from the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au32;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(n.to_le(), n)\n} else {\n assert_eq!(n.to_le(), n.swap_bytes())\n}\n```",
+ "docs": "Unchecked exact shift left. Computes `self << rhs`, assuming the operation can be\nlosslessly reversed `rhs` cannot be larger than\n`u8::BITS`.\n\n# Safety\n\nThis results in undefined behavior when `rhs > self.leading_zeros() || rhs >=\nu8::BITS`\ni.e. when\n[`u8::exact_shl`]\nwould return `None`.",
"id": 11040,
"inner": {
"function": {
@@ -84544,7 +83212,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -84553,24 +83221,32 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
- "links": {},
- "name": "to_le",
+ "links": {
+ "`u8::exact_shl`": 11039
+ },
+ "name": "unchecked_exact_shl",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -84583,7 +83259,7 @@
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -84593,7 +83269,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer addition. Computes `self + rhs`, returning `None`\nif overflow occurred.\n\n# Examples\n\n```\nassert_eq!((u32::MAX - 2).checked_add(1), Some(u32::MAX - 1));\nassert_eq!((u32::MAX - 2).checked_add(3), None);\n```",
+ "docs": "Checked shift right. Computes `self >> rhs`, returning `None`\nif `rhs` is larger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x10u8.checked_shr(4), Some(0x1));\nassert_eq!(0x10u8.checked_shr(129), None);\n```",
"id": 11041,
"inner": {
"function": {
@@ -84631,7 +83307,7 @@
"args": [
{
"type": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
],
@@ -84646,14 +83322,14 @@
}
},
"links": {},
- "name": "checked_add",
+ "name": "checked_shr",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -84663,10 +83339,10 @@
"11042": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -84679,7 +83355,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer addition. Computes `self + rhs`, panicking\nif overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((u32::MAX - 2).strict_add(1), u32::MAX - 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (u32::MAX - 2).strict_add(3);\n```",
+ "docs": "Strict shift right. Computes `self >> rhs`, panicking `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x10u8.strict_shr(4), 0x1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10u8.strict_shr(129);\n```",
"id": 11042,
"inner": {
"function": {
@@ -84711,20 +83387,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "strict_add",
+ "name": "strict_shr",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -84734,20 +83410,20 @@
"11043": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) addition. Computes `self + rhs`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(200u32.wrapping_add(55), 255);\nassert_eq!(200u32.wrapping_add(u32::MAX), 199);\n```",
+ "docs": "Unchecked shift right. Computes `self >> rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shr`] would return `None`.\n\n[`checked_shr`]: u8::checked_shr",
"id": 11043,
"inner": {
"function": {
@@ -84760,7 +83436,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -84779,20 +83455,22 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
- "links": {},
- "name": "wrapping_add",
+ "links": {
+ "u8::checked_shr": 11041
+ },
+ "name": "unchecked_shr",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -84802,23 +83480,20 @@
"11044": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer addition. Computes `self + rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_add(y)` is semantically equivalent to calling\n`x.`[`checked_add`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_add`].\n\n# Safety\n\nThis results in undefined behavior when\n`self + rhs > u32::MAX` or `self + rhs < u32::MIN`,\ni.e. when [`checked_add`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_add`]: u32::checked_add\n[`wrapping_add`]: u32::wrapping_add",
+ "docs": "Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x10u8.unbounded_shr(4), 0x1);\nassert_eq!(0x10u8.unbounded_shr(129), 0);\n```",
"id": 11044,
"inner": {
"function": {
@@ -84831,7 +83506,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -84850,23 +83525,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
- "links": {
- "u32::checked_add": 11041,
- "u32::wrapping_add": 11043
- },
- "name": "unchecked_add",
+ "links": {},
+ "name": "unbounded_shr",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -84876,10 +83548,7 @@
"11045": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
@@ -84889,7 +83558,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked addition with a signed integer. Computes `self + rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1u32.checked_add_signed(2), Some(3));\nassert_eq!(1u32.checked_add_signed(-2), None);\nassert_eq!((u32::MAX - 2).checked_add_signed(3), None);\n```",
+ "docs": "Exact shift right. Computes `self >> rhs` as long as it can be reversed losslessly.\n\nReturns `None` if any non-zero bits would be shifted out or if `rhs` >=\n`u8::BITS`.\nOtherwise, returns `Some(self >> rhs)`.\n\n# Examples\n\n```\n#![feature(exact_bitshifts)]\n\nassert_eq!(0x10u8.exact_shr(4), Some(0x1));\nassert_eq!(0x10u8.exact_shr(5), None);\n```",
"id": 11045,
"inner": {
"function": {
@@ -84915,7 +83584,7 @@
[
"rhs",
{
- "primitive": "i32"
+ "primitive": "u32"
}
]
],
@@ -84927,7 +83596,7 @@
"args": [
{
"type": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
],
@@ -84942,14 +83611,14 @@
}
},
"links": {},
- "name": "checked_add_signed",
+ "name": "exact_shr",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -84959,23 +83628,17 @@
"11046": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict addition with a signed integer. Computes `self + rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1u32.strict_add_signed(2), 3);\n```\n\nThe following panic because of overflow:\n\n```should_panic\nlet _ = 1u32.strict_add_signed(-2);\n```\n\n```should_panic\nlet _ = (u32::MAX - 2).strict_add_signed(3);\n```",
+ "docs": "Unchecked exact shift right. Computes `self >> rhs`, assuming the operation can be\nlosslessly reversed and `rhs` cannot be larger than\n`u8::BITS`.\n\n# Safety\n\nThis results in undefined behavior when `rhs > self.trailing_zeros() || rhs >=\nu8::BITS`\ni.e. when\n[`u8::exact_shr`]\nwould return `None`.",
"id": 11046,
"inner": {
"function": {
@@ -84988,7 +83651,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -85001,26 +83664,28 @@
[
"rhs",
{
- "primitive": "i32"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
- "links": {},
- "name": "strict_add_signed",
+ "links": {
+ "`u8::exact_shr`": 11045
+ },
+ "name": "unchecked_exact_shr",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -85030,10 +83695,10 @@
"11047": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
@@ -85043,7 +83708,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer subtraction. Computes `self - rhs`, returning\n`None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1u32.checked_sub(1), Some(0));\nassert_eq!(0u32.checked_sub(1), None);\n```",
+ "docs": "Checked exponentiation. Computes `self.pow(exp)`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(2u8.checked_pow(5), Some(32));\nassert_eq!(u8::MAX.checked_pow(2), None);\n```",
"id": 11047,
"inner": {
"function": {
@@ -85067,7 +83732,7 @@
}
],
[
- "rhs",
+ "exp",
{
"primitive": "u32"
}
@@ -85081,7 +83746,7 @@
"args": [
{
"type": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
],
@@ -85096,14 +83761,14 @@
}
},
"links": {},
- "name": "checked_sub",
+ "name": "checked_pow",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -85113,10 +83778,10 @@
"11048": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -85129,7 +83794,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer subtraction. Computes `self - rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1u32.strict_sub(1), 0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0u32.strict_sub(1);\n```",
+ "docs": "Strict exponentiation. Computes `self.pow(exp)`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(2u8.strict_pow(5), 32);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = u8::MAX.strict_pow(2);\n```",
"id": 11048,
"inner": {
"function": {
@@ -85153,7 +83818,7 @@
}
],
[
- "rhs",
+ "exp",
{
"primitive": "u32"
}
@@ -85161,20 +83826,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "strict_sub",
+ "name": "strict_pow",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -85184,7 +83849,7 @@
"11049": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -85197,7 +83862,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) subtraction. Computes `self - rhs`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(100u32.wrapping_sub(100), 0);\nassert_eq!(100u32.wrapping_sub(u32::MAX), 101);\n```",
+ "docs": "Saturating integer addition. Computes `self + rhs`, saturating at\nthe numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100u8.saturating_add(1), 101);\nassert_eq!(u8::MAX.saturating_add(127), u8::MAX);\n```",
"id": 11049,
"inner": {
"function": {
@@ -85223,26 +83888,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "wrapping_sub",
+ "name": "saturating_add",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -85369,23 +84034,20 @@
"11050": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer subtraction. Computes `self - rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_sub(y)` is semantically equivalent to calling\n`x.`[`checked_sub`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_sub`].\n\nIf you find yourself writing code like this:\n\n```\n# let foo = 30_u32;\n# let bar = 20;\nif foo >= bar {\n // SAFETY: just checked it will not overflow\n let diff = unsafe { foo.unchecked_sub(bar) };\n // ... use diff ...\n}\n```\n\nConsider changing it to\n\n```\n# let foo = 30_u32;\n# let bar = 20;\nif let Some(diff) = foo.checked_sub(bar) {\n // ... use diff ...\n}\n```\n\nAs that does exactly the same thing -- including telling the optimizer\nthat the subtraction cannot overflow -- but avoids needing `unsafe`.\n\n# Safety\n\nThis results in undefined behavior when\n`self - rhs > u32::MAX` or `self - rhs < u32::MIN`,\ni.e. when [`checked_sub`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_sub`]: u32::checked_sub\n[`wrapping_sub`]: u32::wrapping_sub",
+ "docs": "Saturating addition with a signed integer. Computes `self + rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1u8.saturating_add_signed(2), 3);\nassert_eq!(1u8.saturating_add_signed(-2), 0);\nassert_eq!((u8::MAX - 2).saturating_add_signed(4), u8::MAX);\n```",
"id": 11050,
"inner": {
"function": {
@@ -85398,7 +84060,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -85411,29 +84073,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
- "links": {
- "u32::checked_sub": 11047,
- "u32::wrapping_sub": 11049
- },
- "name": "unchecked_sub",
+ "links": {},
+ "name": "saturating_add_signed",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -85443,10 +84102,10 @@
"11051": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -85456,7 +84115,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked subtraction with a signed integer. Computes `self - rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1u32.checked_sub_signed(2), None);\nassert_eq!(1u32.checked_sub_signed(-2), Some(3));\nassert_eq!((u32::MAX - 2).checked_sub_signed(-4), None);\n```",
+ "docs": "Saturating integer subtraction. Computes `self - rhs`, saturating\nat the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100u8.saturating_sub(27), 73);\nassert_eq!(13u8.saturating_sub(127), 0);\n```",
"id": 11051,
"inner": {
"function": {
@@ -85482,41 +84141,26 @@
[
"rhs",
{
- "primitive": "i32"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "checked_sub_signed",
+ "name": "saturating_sub",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -85526,10 +84170,146 @@
"11052": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Saturating integer subtraction. Computes `self` - `rhs`, saturating at\nthe numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1u8.saturating_sub_signed(2), 0);\nassert_eq!(1u8.saturating_sub_signed(-2), 3);\nassert_eq!((u8::MAX - 2).saturating_sub_signed(-4), u8::MAX);\n```",
+ "id": 11052,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i8"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u8"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "saturating_sub_signed",
+ "span": {
+ "begin": [
+ 447,
+ 5
+ ],
+ "end": [
+ 468,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11053": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Saturating integer multiplication. Computes `self * rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(2u8.saturating_mul(10), 20);\nassert_eq!((u8::MAX).saturating_mul(10), u8::MAX);\n```",
+ "id": 11053,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u8"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u8"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "saturating_mul",
+ "span": {
+ "begin": [
+ 447,
+ 5
+ ],
+ "end": [
+ 468,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11054": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\"}}]"
},
{
"must_use": {
@@ -85542,8 +84322,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict subtraction with a signed integer. Computes `self - rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(3u32.strict_sub_signed(2), 1);\n```\n\nThe following panic because of overflow:\n\n```should_panic\nlet _ = 1u32.strict_sub_signed(2);\n```\n\n```should_panic\nlet _ = (u32::MAX).strict_sub_signed(-1);\n```",
- "id": 11052,
+ "docs": "Saturating integer division. Computes `self / rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u8.saturating_div(2), 2);\n\n```",
+ "id": 11054,
"inner": {
"function": {
"generics": {
@@ -85568,189 +84348,26 @@
[
"rhs",
{
- "primitive": "i32"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "u32"
- }
- }
- }
- },
- "links": {},
- "name": "strict_sub_signed",
- "span": {
- "begin": [
- 1128,
- 5
- ],
- "end": [
- 1146,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "11053": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"unsigned_signed_diff\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"unsigned_signed_diff\"}}]"
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Checked integer subtraction. Computes `self - rhs` and checks if the result fits into an [`i32`], returning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(10u32.checked_signed_diff(2), Some(8));\nassert_eq!(2u32.checked_signed_diff(10), Some(-8));\nassert_eq!(u32::MAX.checked_signed_diff(i32::MAX as u32), None);\nassert_eq!((i32::MAX as u32).checked_signed_diff(u32::MAX), Some(i32::MIN));\nassert_eq!((i32::MAX as u32 + 1).checked_signed_diff(0), None);\nassert_eq!(u32::MAX.checked_signed_diff(u32::MAX), Some(0));\n```",
- "id": 11053,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
- }
- }
- }
- },
- "links": {
- "`i32`": 3367
- },
- "name": "checked_signed_diff",
- "span": {
- "begin": [
- 1128,
- 5
- ],
- "end": [
- 1146,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "11054": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Checked integer multiplication. Computes `self * rhs`, returning\n`None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(5u32.checked_mul(1), Some(5));\nassert_eq!(u32::MAX.checked_mul(2), None);\n```",
- "id": 11054,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u32"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "checked_mul",
+ "name": "saturating_div",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -85760,23 +84377,20 @@
"11055": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer multiplication. Computes `self * rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(5u32.strict_mul(1), 5);\n```\n\nThe following panics because of overflow:\n\n``` should_panic\nlet _ = u32::MAX.strict_mul(2);\n```",
+ "docs": "Saturating integer exponentiation. Computes `self.pow(exp)`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(4u8.saturating_pow(3), 64);\nassert_eq!(u8::MAX.saturating_pow(2), u8::MAX);\n```",
"id": 11055,
"inner": {
"function": {
@@ -85800,7 +84414,7 @@
}
],
[
- "rhs",
+ "exp",
{
"primitive": "u32"
}
@@ -85808,20 +84422,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "strict_mul",
+ "name": "saturating_pow",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -85831,10 +84445,10 @@
"11056": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -85844,7 +84458,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) multiplication. Computes `self *\nrhs`, wrapping around at the boundary of the type.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u8` is used.\n\n```\nassert_eq!(10u8.wrapping_mul(12), 120);\nassert_eq!(25u8.wrapping_mul(12), 44);\n```",
+ "docs": "Wrapping (modular) addition with a signed integer. Computes\n`self + rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(1u8.wrapping_add_signed(2), 3);\nassert_eq!(1u8.wrapping_add_signed(-2), u8::MAX);\nassert_eq!((u8::MAX - 2).wrapping_add_signed(4), 1);\n```",
"id": 11056,
"inner": {
"function": {
@@ -85870,26 +84484,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "wrapping_mul",
+ "name": "wrapping_add_signed",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -85899,23 +84513,20 @@
"11057": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer multiplication. Computes `self * rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_mul(y)` is semantically equivalent to calling\n`x.`[`checked_mul`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_mul`].\n\n# Safety\n\nThis results in undefined behavior when\n`self * rhs > u32::MAX` or `self * rhs < u32::MIN`,\ni.e. when [`checked_mul`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_mul`]: u32::checked_mul\n[`wrapping_mul`]: u32::wrapping_mul",
+ "docs": "Wrapping (modular) subtraction with a signed integer. Computes\n`self - rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(1u8.wrapping_sub_signed(2), u8::MAX);\nassert_eq!(1u8.wrapping_sub_signed(-2), 3);\nassert_eq!((u8::MAX - 2).wrapping_sub_signed(-4), 1);\n```",
"id": 11057,
"inner": {
"function": {
@@ -85928,7 +84539,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -85941,29 +84552,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
- "links": {
- "u32::checked_mul": 11054,
- "u32::wrapping_mul": 11056
- },
- "name": "unchecked_mul",
+ "links": {},
+ "name": "wrapping_sub_signed",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -85973,20 +84581,23 @@
"11058": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division. Computes `self / rhs`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(128u32.checked_div(2), Some(64));\nassert_eq!(1u32.checked_div(0), None);\n```",
+ "docs": "Wrapping (modular) division. Computes `self / rhs`.\n\nWrapped division on unsigned types is just normal division. There's\nno way wrapping could ever happen. This function exists so that all\noperations are accounted for in the wrapping operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u8.wrapping_div(10), 10);\n```",
"id": 11058,
"inner": {
"function": {
@@ -86012,41 +84623,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "checked_div",
+ "name": "wrapping_div",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -86056,10 +84652,10 @@
"11059": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -86072,7 +84668,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer division. Computes `self / rhs`.\n\nStrict division on unsigned types is just normal division. There's no\nway overflow could ever happen. This function exists so that all\noperations are accounted for in the strict operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u32.strict_div(10), 10);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1u32).strict_div(0);\n```",
+ "docs": "Wrapping Euclidean division. Computes `self.div_euclid(rhs)`.\n\nWrapped division on unsigned types is just normal division. There's\nno way wrapping could ever happen. This function exists so that all\noperations are accounted for in the wrapping operations. Since, for\nthe positive integers, all common definitions of division are equal,\nthis is exactly equal to `self.wrapping_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u8.wrapping_div_euclid(10), 10);\n```",
"id": 11059,
"inner": {
"function": {
@@ -86098,26 +84694,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "strict_div",
+ "name": "wrapping_div_euclid",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -86188,7 +84784,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -86201,20 +84797,23 @@
"11060": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked Euclidean division. Computes `self.div_euclid(rhs)`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(128u32.checked_div_euclid(2), Some(64));\nassert_eq!(1u32.checked_div_euclid(0), None);\n```",
+ "docs": "Wrapping (modular) remainder. Computes `self % rhs`.\n\nWrapped remainder calculation on unsigned types is just the regular\nremainder calculation. There's no way wrapping could ever happen.\nThis function exists so that all operations are accounted for in the\nwrapping operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u8.wrapping_rem(10), 0);\n```",
"id": 11060,
"inner": {
"function": {
@@ -86240,41 +84839,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "checked_div_euclid",
+ "name": "wrapping_rem",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -86284,10 +84868,10 @@
"11061": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -86300,7 +84884,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict Euclidean division. Computes `self.div_euclid(rhs)`.\n\nStrict division on unsigned types is just normal division. There's no\nway overflow could ever happen. This function exists so that all\noperations are accounted for in the strict operations. Since, for the\npositive integers, all common definitions of division are equal, this\nis exactly equal to `self.strict_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u32.strict_div_euclid(10), 10);\n```\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1u32).strict_div_euclid(0);\n```",
+ "docs": "Wrapping Euclidean modulo. Computes `self.rem_euclid(rhs)`.\n\nWrapped modulo calculation on unsigned types is just the regular\nremainder calculation. There's no way wrapping could ever happen.\nThis function exists so that all operations are accounted for in the\nwrapping operations. Since, for the positive integers, all common\ndefinitions of division are equal, this is exactly equal to\n`self.wrapping_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u8.wrapping_rem_euclid(10), 0);\n```",
"id": 11061,
"inner": {
"function": {
@@ -86326,26 +84910,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "strict_div_euclid",
+ "name": "wrapping_rem_euclid",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -86355,7 +84939,10 @@
"11062": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
@@ -86365,7 +84952,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division without remainder. Computes `self / rhs`,\nreturning `None` if `rhs == 0` or if `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64u32.checked_exact_div(2), Some(32));\nassert_eq!(64u32.checked_exact_div(32), Some(2));\nassert_eq!(64u32.checked_exact_div(0), None);\nassert_eq!(65u32.checked_exact_div(2), None);\n```",
+ "docs": "Wrapping (modular) negation. Computes `-self`,\nwrapping around at the boundary of the type.\n\nSince unsigned types do not have negative equivalents\nall applications of this function will wrap (except for `-0`).\nFor values smaller than the corresponding signed type's maximum\nthe result is the same as casting the corresponding signed value.\nAny larger values are equivalent to `MAX + 1 - (val - MAX - 1)` where\n`MAX` is the corresponding signed type's maximum.\n\n# Examples\n\n```\nassert_eq!(0_u8.wrapping_neg(), 0);\nassert_eq!(u8::MAX.wrapping_neg(), 1);\nassert_eq!(13_u8.wrapping_neg(), (!13) + 1);\nassert_eq!(42_u8.wrapping_neg(), !(42 - 1));\n```",
"id": 11062,
"inner": {
"function": {
@@ -86387,45 +84974,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "checked_exact_div",
+ "name": "wrapping_neg",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -86435,7 +85001,10 @@
"11063": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
@@ -86445,7 +85014,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division without remainder. Computes `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs == 0` or `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64u32.exact_div(2), 32);\nassert_eq!(64u32.exact_div(32), 2);\n```\n\n```should_panic\n#![feature(exact_div)]\nlet _ = 65u32.exact_div(2);\n```",
+ "docs": "Panic-free bitwise shift-left; yields `self << mask(rhs)`,\nwhere `mask` removes any high-order bits of `rhs` that\nwould cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-left; the\nRHS of a wrapping shift-left is restricted to the range\nof the type, rather than the bits shifted out of the LHS\nbeing returned to the other end. The primitive integer\ntypes all implement a [`rotate_left`](Self::rotate_left) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!(1u8.wrapping_shl(7), 128);\nassert_eq!(1u8.wrapping_shl(128), 1);\n```",
"id": 11063,
"inner": {
"function": {
@@ -86477,20 +85046,22 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
- "links": {},
- "name": "exact_div",
+ "links": {
+ "Self::rotate_left": 10989
+ },
+ "name": "wrapping_shl",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -86500,7 +85071,10 @@
"11064": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
@@ -86510,7 +85084,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer division without remainder. Computes `self / rhs`.\n\n# Safety\n\nThis results in undefined behavior when `rhs == 0` or `self % rhs != 0`,\ni.e. when [`checked_exact_div`](Self::checked_exact_div) would return `None`.",
+ "docs": "Panic-free bitwise shift-right; yields `self >> mask(rhs)`,\nwhere `mask` removes any high-order bits of `rhs` that\nwould cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-right; the\nRHS of a wrapping shift-right is restricted to the range\nof the type, rather than the bits shifted out of the LHS\nbeing returned to the other end. The primitive integer\ntypes all implement a [`rotate_right`](Self::rotate_right) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!(128u8.wrapping_shr(7), 1);\nassert_eq!(128u8.wrapping_shr(128), 128);\n```",
"id": 11064,
"inner": {
"function": {
@@ -86523,7 +85097,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -86542,22 +85116,22 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
"links": {
- "Self::checked_exact_div": 11062
+ "Self::rotate_right": 10990
},
- "name": "unchecked_exact_div",
+ "name": "wrapping_shr",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -86567,10 +85141,10 @@
"11065": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
@@ -86580,7 +85154,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer remainder. Computes `self % rhs`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(5u32.checked_rem(2), Some(1));\nassert_eq!(5u32.checked_rem(0), None);\n```",
+ "docs": "Wrapping (modular) exponentiation. Computes `self.pow(exp)`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(3u8.wrapping_pow(5), 243);\nassert_eq!(3u8.wrapping_pow(6), 217);\n```",
"id": 11065,
"inner": {
"function": {
@@ -86604,7 +85178,7 @@
}
],
[
- "rhs",
+ "exp",
{
"primitive": "u32"
}
@@ -86612,35 +85186,20 @@
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "checked_rem",
+ "name": "wrapping_pow",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -86650,23 +85209,20 @@
"11066": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer remainder. Computes `self % rhs`.\n\nStrict remainder calculation on unsigned types is just the regular\nremainder calculation. There's no way overflow could ever happen.\nThis function exists so that all operations are accounted for in the\nstrict operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u32.strict_rem(10), 0);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5u32.strict_rem(0);\n```",
+ "docs": "Calculates `self` + `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5u8.overflowing_add(2), (7, false));\nassert_eq!(u8::MAX.overflowing_add(1), (0, true));\n```",
"id": 11066,
"inner": {
"function": {
@@ -86692,26 +85248,33 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "tuple": [
+ {
+ "primitive": "u8"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "strict_rem",
+ "name": "overflowing_add",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -86721,10 +85284,10 @@
"11067": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -86734,7 +85297,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked Euclidean modulo. Computes `self.rem_euclid(rhs)`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(5u32.checked_rem_euclid(2), Some(1));\nassert_eq!(5u32.checked_rem_euclid(0), None);\n```",
+ "docs": "Calculates `self` + `rhs` with a signed `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1u8.overflowing_add_signed(2), (3, false));\nassert_eq!(1u8.overflowing_add_signed(-2), (u8::MAX, true));\nassert_eq!((u8::MAX - 2).overflowing_add_signed(4), (1, true));\n```",
"id": 11067,
"inner": {
"function": {
@@ -86760,41 +85323,33 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "u8"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_rem_euclid",
+ "name": "overflowing_add_signed",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -86804,23 +85359,20 @@
"11068": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict Euclidean modulo. Computes `self.rem_euclid(rhs)`.\n\nStrict modulo calculation on unsigned types is just the regular\nremainder calculation. There's no way overflow could ever happen.\nThis function exists so that all operations are accounted for in the\nstrict operations. Since, for the positive integers, all common\ndefinitions of division are equal, this is exactly equal to\n`self.strict_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u32.strict_rem_euclid(10), 0);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5u32.strict_rem_euclid(0);\n```",
+ "docs": "Calculates `self` - `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5u8.overflowing_sub(2), (3, false));\nassert_eq!(0u8.overflowing_sub(1), (u8::MAX, true));\n```",
"id": 11068,
"inner": {
"function": {
@@ -86846,26 +85398,33 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "tuple": [
+ {
+ "primitive": "u8"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "strict_rem_euclid",
+ "name": "overflowing_sub",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -86875,15 +85434,20 @@
"11069": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 135758, is_soft: false}, feature: \"disjoint_bitor\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 135758, is_soft: false}, feature: \"disjoint_bitor\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Same value as `self | other`, but UB if any bit position is set in both inputs.\n\nThis is a situational micro-optimization for places where you'd rather\nuse addition on some platforms and bitwise or on other platforms, based\non exactly which instructions combine better with whatever else you're\ndoing. Note that there's no reason to bother using this for places\nwhere it's clear from the operations involved that they can't overlap.\nFor example, if you're combining `u16`s into a `u32` with\n`((a as u32) << 16) | (b as u32)`, that's fine, as the backend will\nknow those sides of the `|` are disjoint without needing help.\n\n# Examples\n\n```\n#![feature(disjoint_bitor)]\n\n// SAFETY: `1` and `4` have no bits in common.\nunsafe {\n assert_eq!(1_u32.unchecked_disjoint_bitor(4), 5);\n}\n```\n\n# Safety\n\nRequires that `(self & other) == 0`, otherwise it's immediate UB.\n\nEquivalently, requires that `(self | other) == (self + other)`.",
+ "docs": "Calculates `self` - `rhs` with a signed `rhs`\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1u8.overflowing_sub_signed(2), (u8::MAX, true));\nassert_eq!(1u8.overflowing_sub_signed(-2), (3, false));\nassert_eq!((u8::MAX - 2).overflowing_sub_signed(-4), (1, true));\n```",
"id": 11069,
"inner": {
"function": {
@@ -86896,7 +85460,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -86907,28 +85471,35 @@
}
],
[
- "other",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "i8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "tuple": [
+ {
+ "primitive": "u8"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "unchecked_disjoint_bitor",
+ "name": "overflowing_sub_signed",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -87055,23 +85626,20 @@
"11070": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nThis method might not be optimized owing to implementation details;\n`ilog2` can produce results more efficiently for base 2, and `ilog10`\ncan produce results more efficiently for base 10.\n\n# Panics\n\nThis function will panic if `self` is zero, or if `base` is less than 2.\n\n# Examples\n\n```\nassert_eq!(5u32.ilog(5), 1);\n```",
+ "docs": "Computes the absolute difference between `self` and `other`.\n\n# Examples\n\n```\nassert_eq!(100u8.abs_diff(80), 20u8);\nassert_eq!(100u8.abs_diff(110), 10u8);\n```",
"id": 11070,
"inner": {
"function": {
@@ -87095,28 +85663,28 @@
}
],
[
- "base",
+ "other",
{
- "primitive": "u32"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "ilog",
+ "name": "abs_diff",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -87126,23 +85694,20 @@
"11071": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_bigint_helpers\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 10 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is zero.\n\n# Example\n\n```\nassert_eq!(10u32.ilog10(), 1);\n```",
+ "docs": "Calculates the \"full multiplication\" `self * rhs + carry`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you also need to add a value, then use [`Self::carrying_mul_add`].\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u32` is used.\n\n```\nassert_eq!(5u32.carrying_mul(2, 0), (10, 0));\nassert_eq!(5u32.carrying_mul(2, 10), (20, 0));\nassert_eq!(1_000_000_000u32.carrying_mul(10, 0), (1410065408, 2));\nassert_eq!(1_000_000_000u32.carrying_mul(10, 10), (1410065418, 2));\nassert_eq!(u8::MAX.carrying_mul(u8::MAX, u8::MAX), (0, u8::MAX));\n```\n\nThis is the core operation needed for scalar multiplication when\nimplementing it for wider-than-native types.\n\n```\n#![feature(bigint_helper_methods)]\nfn scalar_mul_eq(little_endian_digits: &mut Vec, multiplicand: u16) {\n let mut carry = 0;\n for d in little_endian_digits.iter_mut() {\n (*d, carry) = d.carrying_mul(multiplicand, carry);\n }\n if carry != 0 {\n little_endian_digits.push(carry);\n }\n}\n\nlet mut v = vec![10, 20];\nscalar_mul_eq(&mut v, 3);\nassert_eq!(v, [30, 60]);\n\nassert_eq!(0x87654321_u64 * 0xFEED, 0x86D3D159E38D);\nlet mut v = vec![0x4321, 0x8765];\nscalar_mul_eq(&mut v, 0xFEED);\nassert_eq!(v, [0xE38D, 0xD159, 0x86D3]);\n```\n\nIf `carry` is zero, this is similar to [`overflowing_mul`](Self::overflowing_mul),\nexcept that it gives the value of the overflow instead of just whether one happened:\n\n```\n#![feature(bigint_helper_methods)]\nlet r = u8::carrying_mul(7, 13, 0);\nassert_eq!((r.0, r.1 != 0), u8::overflowing_mul(7, 13));\nlet r = u8::carrying_mul(13, 42, 0);\nassert_eq!((r.0, r.1 != 0), u8::overflowing_mul(13, 42));\n```\n\nThe value of the first field in the returned tuple matches what you'd get\nby combining the [`wrapping_mul`](Self::wrapping_mul) and\n[`wrapping_add`](Self::wrapping_add) methods:\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(\n 789_u16.carrying_mul(456, 123).0,\n 789_u16.wrapping_mul(456).wrapping_add(123),\n);\n```",
"id": 11071,
"inner": {
"function": {
@@ -87164,24 +85729,48 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u8"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "u8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "tuple": [
+ {
+ "primitive": "u8"
+ },
+ {
+ "primitive": "u8"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "ilog10",
+ "links": {
+ "Self::overflowing_mul": 11072,
+ "Self::wrapping_add": 11001,
+ "Self::wrapping_mul": 11014,
+ "`Self::carrying_mul_add`": 11073
+ },
+ "name": "carrying_mul",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -87191,10 +85780,10 @@
"11072": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -87204,7 +85793,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nReturns `None` if the number is zero, or if the base is not at least 2.\n\nThis method might not be optimized owing to implementation details;\n`checked_ilog2` can produce results more efficiently for base 2, and\n`checked_ilog10` can produce results more efficiently for base 10.\n\n# Examples\n\n```\nassert_eq!(5u32.checked_ilog(5), Some(1));\n```",
+ "docs": "Calculates the multiplication of `self` and `rhs`.\n\nReturns a tuple of the multiplication along with a boolean\nindicating whether an arithmetic overflow would occur. If an\noverflow would have occurred then the wrapped value is returned.\n\nIf you want the *value* of the overflow, rather than just *whether*\nan overflow occurred, see [`Self::carrying_mul`].\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u32` is used.\n\n```\nassert_eq!(5u32.overflowing_mul(2), (10, false));\nassert_eq!(1_000_000_000u32.overflowing_mul(10), (1410065408, true));\n```",
"id": 11072,
"inner": {
"function": {
@@ -87228,43 +85817,37 @@
}
],
[
- "base",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "u8"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "checked_ilog",
+ "links": {
+ "`Self::carrying_mul`": 11071
+ },
+ "name": "overflowing_mul",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -87274,10 +85857,10 @@
"11073": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_bigint_helpers\"}}]"
},
{
"must_use": {
@@ -87287,7 +85870,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 2 logarithm of the number, rounded down.\n\nReturns `None` if the number is zero.\n\n# Examples\n\n```\nassert_eq!(2u32.checked_ilog2(), Some(1));\n```",
+ "docs": "Calculates the \"full multiplication\" `self * rhs + carry1 + carry2`.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nThis cannot overflow, as the double-width result has exactly enough\nspace for the largest possible result. This is equivalent to how, in\ndecimal, 9 × 9 + 9 + 9 = 81 + 18 = 99 = 9×10⁰ + 9×10¹ = 10² - 1.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need the `add` part, then you can use [`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared between integer types,\nwhich explains why `u32` is used here.\n\n```\nassert_eq!(5u32.carrying_mul_add(2, 0, 0), (10, 0));\nassert_eq!(5u32.carrying_mul_add(2, 10, 10), (30, 0));\nassert_eq!(1_000_000_000u32.carrying_mul_add(10, 0, 0), (1410065408, 2));\nassert_eq!(1_000_000_000u32.carrying_mul_add(10, 10, 10), (1410065428, 2));\nassert_eq!(u8::MAX.carrying_mul_add(u8::MAX, u8::MAX, u8::MAX), (u8::MAX, u8::MAX));\n```\n\nThis is the core per-digit operation for \"grade school\" O(n²) multiplication.\n\nPlease note that this example is shared between integer types,\nusing `u8` for simplicity of the demonstration.\n\n```\nfn quadratic_mul(a: [u8; N], b: [u8; N]) -> [u8; N] {\n let mut out = [0; N];\n for j in 0..N {\n let mut carry = 0;\n for i in 0..(N - j) {\n (out[j + i], carry) = u8::carrying_mul_add(a[i], b[j], out[j + i], carry);\n }\n }\n out\n}\n\n// -1 * -1 == 1\nassert_eq!(quadratic_mul([0xFF; 3], [0xFF; 3]), [1, 0, 0]);\n\nassert_eq!(u32::wrapping_mul(0x9e3779b9, 0x7f4a7c15), 0xcffc982d);\nassert_eq!(\n quadratic_mul(u32::to_le_bytes(0x9e3779b9), u32::to_le_bytes(0x7f4a7c15)),\n u32::to_le_bytes(0xcffc982d)\n);\n```",
"id": 11073,
"inner": {
"function": {
@@ -87309,39 +85892,51 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u8"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "u8"
+ }
+ ],
+ [
+ "add",
+ {
+ "primitive": "u8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "u8"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "u8"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "checked_ilog2",
+ "links": {
+ "`Self::carrying_mul`": 11071
+ },
+ "name": "carrying_mul_add",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -87351,10 +85946,10 @@
"11074": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
},
{
"must_use": {
@@ -87364,7 +85959,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 10 logarithm of the number, rounded down.\n\nReturns `None` if the number is zero.\n\n# Examples\n\n```\nassert_eq!(10u32.checked_ilog10(), Some(1));\n```",
+ "docs": "Calculates the complete double-width product `self * rhs`.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order. As such,\n`a.widening_mul(b).0` produces the same result as `a.wrapping_mul(b)`.\n\nIf you also need to add a value and carry to the wide result, then you want\n[`Self::carrying_mul_add`] instead.\n\nIf you also need to add a carry to the wide result, then you want\n[`Self::carrying_mul`] instead.\n\nIf you just want to know *whether* the multiplication overflowed, then you\nwant [`Self::overflowing_mul`] instead.\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5_u8.widening_mul(7), (35, 0));\nassert_eq!(u8::MAX.widening_mul(u8::MAX), (1, u8::MAX - 1));\n```\n\nCompared to other `*_mul` methods:\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(u8::widening_mul(1 << 7, 6), (0, 3));\nassert_eq!(u8::overflowing_mul(1 << 7, 6), (0, true));\nassert_eq!(u8::wrapping_mul(1 << 7, 6), 0);\nassert_eq!(u8::checked_mul(1 << 7, 6), None);\n```\n\nPlease note that this example is shared among integer types, which is why `u32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5u32.widening_mul(2), (10, 0));\nassert_eq!(1_000_000_000u32.widening_mul(10), (1410065408, 2));\n```",
"id": 11074,
"inner": {
"function": {
@@ -87386,39 +85981,41 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "u8"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "u8"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "checked_ilog10",
+ "links": {
+ "`Self::carrying_mul_add`": 11073,
+ "`Self::carrying_mul`": 11071,
+ "`Self::overflowing_mul`": 11072
+ },
+ "name": "widening_mul",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -87428,7 +86025,7 @@
"11075": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
@@ -87437,11 +86034,14 @@
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked negation. Computes `-self`, returning `None` unless `self ==\n0`.\n\nNote that negating any positive integer will overflow.\n\n# Examples\n\n```\nassert_eq!(0u32.checked_neg(), Some(0));\nassert_eq!(1u32.checked_neg(), None);\n```",
+ "docs": "Calculates the divisor when `self` is divided by `rhs`.\n\nReturns a tuple of the divisor along with a boolean indicating\nwhether an arithmetic overflow would occur. Note that for unsigned\nintegers overflow never occurs, so the second value is always\n`false`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u8.overflowing_div(2), (2, false));\n```",
"id": 11075,
"inner": {
"function": {
@@ -87463,39 +86063,37 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "u8"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_neg",
+ "name": "overflowing_div",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -87505,10 +86103,10 @@
"11076": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -87521,7 +86119,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict negation. Computes `-self`, panicking unless `self ==\n0`.\n\nNote that negating any positive integer will overflow.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0u32.strict_neg(), 0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 1u32.strict_neg();\n",
+ "docs": "Calculates the quotient of Euclidean division `self.div_euclid(rhs)`.\n\nReturns a tuple of the divisor along with a boolean indicating\nwhether an arithmetic overflow would occur. Note that for unsigned\nintegers overflow never occurs, so the second value is always\n`false`.\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self.overflowing_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u8.overflowing_div_euclid(2), (2, false));\n```",
"id": 11076,
"inner": {
"function": {
@@ -87543,24 +86141,37 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u8"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "tuple": [
+ {
+ "primitive": "u8"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "strict_neg",
+ "name": "overflowing_div_euclid",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -87570,7 +86181,7 @@
"11077": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
@@ -87579,11 +86190,14 @@
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked shift left. Computes `self << rhs`, returning `None`\nif `rhs` is larger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x1u32.checked_shl(4), Some(0x10));\nassert_eq!(0x10u32.checked_shl(129), None);\nassert_eq!(0x10u32.checked_shl(31), Some(0));\n```",
+ "docs": "Calculates the remainder when `self` is divided by `rhs`.\n\nReturns a tuple of the remainder after dividing along with a boolean\nindicating whether an arithmetic overflow would occur. Note that for\nunsigned integers overflow never occurs, so the second value is\nalways `false`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u8.overflowing_rem(2), (1, false));\n```",
"id": 11077,
"inner": {
"function": {
@@ -87609,41 +86223,33 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "u8"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_shl",
+ "name": "overflowing_rem",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -87653,10 +86259,10 @@
"11078": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -87669,7 +86275,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict shift left. Computes `self << rhs`, panicking if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x1u32.strict_shl(4), 0x10);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10u32.strict_shl(129);\n```",
+ "docs": "Calculates the remainder `self.rem_euclid(rhs)` as if by Euclidean division.\n\nReturns a tuple of the modulo after dividing along with a boolean\nindicating whether an arithmetic overflow would occur. Note that for\nunsigned integers overflow never occurs, so the second value is\nalways `false`.\nSince, for the positive integers, all common\ndefinitions of division are equal, this operation\nis exactly equal to `self.overflowing_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u8.overflowing_rem_euclid(2), (1, false));\n```",
"id": 11078,
"inner": {
"function": {
@@ -87695,26 +86301,33 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "tuple": [
+ {
+ "primitive": "u8"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "strict_shl",
+ "name": "overflowing_rem_euclid",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -87724,20 +86337,20 @@
"11079": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked shift left. Computes `self << rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shl`] would return `None`.\n\n[`checked_shl`]: u32::checked_shl",
+ "docs": "Negates self in an overflowing fashion.\n\nReturns `!self + 1` using wrapping operations to return the value\nthat represents the negation of this unsigned value. Note that for\npositive unsigned values overflow always occurs, but negating 0 does\nnot overflow.\n\n# Examples\n\n```\nassert_eq!(0u8.overflowing_neg(), (0, false));\nassert_eq!(2u8.overflowing_neg(), (-2i32 as u8, true));\n```",
"id": 11079,
"inner": {
"function": {
@@ -87750,7 +86363,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -87759,32 +86372,31 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "tuple": [
+ {
+ "primitive": "u8"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
- "links": {
- "u32::checked_shl": 11077
- },
- "name": "unchecked_shl",
+ "links": {},
+ "name": "overflowing_neg",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -87856,7 +86468,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -87867,7 +86479,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -87888,7 +86500,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -87899,7 +86511,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -87920,7 +86532,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -87933,10 +86545,10 @@
"11080": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -87946,7 +86558,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x1u32.unbounded_shl(4), 0x10);\nassert_eq!(0x1u32.unbounded_shl(129), 0);\n```",
+ "docs": "Shifts self left by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean\nindicating whether the shift value was larger than or equal to the\nnumber of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then\nused to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x1u8.overflowing_shl(4), (0x10, false));\nassert_eq!(0x1u8.overflowing_shl(132), (0x10, true));\nassert_eq!(0x10u8.overflowing_shl(7), (0, false));\n```",
"id": 11080,
"inner": {
"function": {
@@ -87978,20 +86590,27 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "tuple": [
+ {
+ "primitive": "u8"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "unbounded_shl",
+ "name": "overflowing_shl",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -88001,7 +86620,7 @@
"11081": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
@@ -88014,7 +86633,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked shift right. Computes `self >> rhs`, returning `None`\nif `rhs` is larger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x10u32.checked_shr(4), Some(0x1));\nassert_eq!(0x10u32.checked_shr(129), None);\n```",
+ "docs": "Shifts self right by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean\nindicating whether the shift value was larger than or equal to the\nnumber of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then\nused to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x10u8.overflowing_shr(4), (0x1, false));\nassert_eq!(0x10u8.overflowing_shr(132), (0x1, true));\n```",
"id": 11081,
"inner": {
"function": {
@@ -88046,35 +86665,27 @@
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
+ "tuple": [
+ {
+ "primitive": "u8"
},
- "id": 51,
- "path": "Option"
- }
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "checked_shr",
+ "name": "overflowing_shr",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -88084,23 +86695,20 @@
"11082": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict shift right. Computes `self >> rhs`, panicking `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x10u32.strict_shr(4), 0x1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10u32.strict_shr(129);\n```",
+ "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\nReturns a tuple of the exponentiation along with a bool indicating\nwhether an overflow happened.\n\n# Examples\n\n```\nassert_eq!(3u8.overflowing_pow(5), (243, false));\nassert_eq!(3u8.overflowing_pow(6), (217, true));\n```",
"id": 11082,
"inner": {
"function": {
@@ -88124,7 +86732,7 @@
}
],
[
- "rhs",
+ "exp",
{
"primitive": "u32"
}
@@ -88132,20 +86740,27 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "tuple": [
+ {
+ "primitive": "u8"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "strict_shr",
+ "name": "overflowing_pow",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -88155,20 +86770,20 @@
"11083": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked shift right. Computes `self >> rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shr`] would return `None`.\n\n[`checked_shr`]: u32::checked_shr",
+ "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\n# Examples\n\n```\nassert_eq!(2u8.pow(5), 32);\n```",
"id": 11083,
"inner": {
"function": {
@@ -88181,7 +86796,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -88192,7 +86807,7 @@
}
],
[
- "rhs",
+ "exp",
{
"primitive": "u32"
}
@@ -88200,22 +86815,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
- "links": {
- "u32::checked_shr": 11081
- },
- "name": "unchecked_shr",
+ "links": {},
+ "name": "pow",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -88225,10 +86838,10 @@
"11084": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
},
{
"must_use": {
@@ -88238,7 +86851,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x10u32.unbounded_shr(4), 0x1);\nassert_eq!(0x10u32.unbounded_shr(129), 0);\n```",
+ "docs": "Returns the square root of the number, rounded down.\n\n# Examples\n\n```\nassert_eq!(10u8.isqrt(), 3);\n```",
"id": 11084,
"inner": {
"function": {
@@ -88260,30 +86873,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "unbounded_shr",
+ "name": "isqrt",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -88293,20 +86900,23 @@
"11085": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked exponentiation. Computes `self.pow(exp)`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(2u32.checked_pow(5), Some(32));\nassert_eq!(u32::MAX.checked_pow(2), None);\n```",
+ "docs": "Performs Euclidean division.\n\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7u8.div_euclid(4), 1); // or any other integer type\n```",
"id": 11085,
"inner": {
"function": {
@@ -88330,43 +86940,28 @@
}
],
[
- "exp",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "checked_pow",
+ "name": "div_euclid",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -88376,10 +86971,13 @@
"11086": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[doc(alias = \"modulo\", alias = \"mod\")]"
+ },
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -88392,7 +86990,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict exponentiation. Computes `self.pow(exp)`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(2u32.strict_pow(5), 32);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = u32::MAX.strict_pow(2);\n```",
+ "docs": "Calculates the least remainder of `self (mod rhs)`.\n\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self % rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7u8.rem_euclid(4), 3); // or any other integer type\n```",
"id": 11086,
"inner": {
"function": {
@@ -88416,28 +87014,28 @@
}
],
[
- "exp",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "strict_pow",
+ "name": "rem_euclid",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -88447,20 +87045,20 @@
"11087": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer addition. Computes `self + rhs`, saturating at\nthe numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100u32.saturating_add(1), 101);\nassert_eq!(u32::MAX.saturating_add(127), u32::MAX);\n```",
+ "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards negative infinity.\n\nThis is the same as performing `self / rhs` for all unsigned integers.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(7_u8.div_floor(4), 1);\n```",
"id": 11087,
"inner": {
"function": {
@@ -88486,26 +87084,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "saturating_add",
+ "name": "div_floor",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -88515,20 +87113,23 @@
"11088": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating addition with a signed integer. Computes `self + rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1u32.saturating_add_signed(2), 3);\nassert_eq!(1u32.saturating_add_signed(-2), 0);\nassert_eq!((u32::MAX - 2).saturating_add_signed(4), u32::MAX);\n```",
+ "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards positive infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7_u8.div_ceil(4), 2);\n```",
"id": 11088,
"inner": {
"function": {
@@ -88554,26 +87155,26 @@
[
"rhs",
{
- "primitive": "i32"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "saturating_add_signed",
+ "name": "div_ceil",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -88583,10 +87184,10 @@
"11089": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
},
{
"must_use": {
@@ -88596,7 +87197,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer subtraction. Computes `self - rhs`, saturating\nat the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100u32.saturating_sub(27), 73);\nassert_eq!(13u32.saturating_sub(127), 0);\n```",
+ "docs": "Calculates the smallest value greater than or equal to `self` that\nis a multiple of `rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nOn overflow, this function will panic if overflow checks are enabled (default in debug\nmode) and wrap if overflow checks are disabled (default in release mode).\n\n# Examples\n\n```\nassert_eq!(16_u8.next_multiple_of(8), 16);\nassert_eq!(23_u8.next_multiple_of(8), 24);\n```",
"id": 11089,
"inner": {
"function": {
@@ -88622,26 +87223,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "saturating_sub",
+ "name": "next_multiple_of",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -88713,7 +87314,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -88734,7 +87335,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -88755,7 +87356,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -88768,10 +87369,10 @@
"11090": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
},
{
"must_use": {
@@ -88781,7 +87382,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer subtraction. Computes `self` - `rhs`, saturating at\nthe numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1u32.saturating_sub_signed(2), 0);\nassert_eq!(1u32.saturating_sub_signed(-2), 3);\nassert_eq!((u32::MAX - 2).saturating_sub_signed(-4), u32::MAX);\n```",
+ "docs": "Calculates the smallest value greater than or equal to `self` that\nis a multiple of `rhs`. Returns `None` if `rhs` is zero or the\noperation would result in overflow.\n\n# Examples\n\n```\nassert_eq!(16_u8.checked_next_multiple_of(8), Some(16));\nassert_eq!(23_u8.checked_next_multiple_of(8), Some(24));\nassert_eq!(1_u8.checked_next_multiple_of(0), None);\nassert_eq!(u8::MAX.checked_next_multiple_of(2), None);\n```",
"id": 11090,
"inner": {
"function": {
@@ -88807,26 +87408,41 @@
[
"rhs",
{
- "primitive": "i32"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u8"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "saturating_sub_signed",
+ "name": "checked_next_multiple_of",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -88836,20 +87452,20 @@
"11091": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unsigned_is_multiple_of\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unsigned_is_multiple_of\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer multiplication. Computes `self * rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(2u32.saturating_mul(10), 20);\nassert_eq!((u32::MAX).saturating_mul(10), u32::MAX);\n```",
+ "docs": "Returns `true` if `self` is an integer multiple of `rhs`, and false otherwise.\n\nThis function is equivalent to `self % rhs == 0`, except that it will not panic\nfor `rhs == 0`. Instead, `0.is_multiple_of(0) == true`, and for any non-zero `n`,\n`n.is_multiple_of(0) == false`.\n\n# Examples\n\n```\nassert!(6_u8.is_multiple_of(2));\nassert!(!5_u8.is_multiple_of(2));\n\nassert!(0_u8.is_multiple_of(0));\nassert!(!6_u8.is_multiple_of(0));\n```",
"id": 11091,
"inner": {
"function": {
@@ -88875,26 +87491,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "saturating_mul",
+ "name": "is_multiple_of",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -88904,23 +87520,20 @@
"11092": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_is_power_of_two\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer division. Computes `self / rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u32.saturating_div(2), 2);\n\n```",
+ "docs": "Returns `true` if and only if `self == 2^k` for some unsigned integer `k`.\n\n# Examples\n\n```\nassert!(16u8.is_power_of_two());\nassert!(!10u8.is_power_of_two());\n```",
"id": 11092,
"inner": {
"function": {
@@ -88942,30 +87555,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "saturating_div",
+ "name": "is_power_of_two",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -88978,7 +87585,7 @@
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -88988,7 +87595,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer exponentiation. Computes `self.pow(exp)`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(4u32.saturating_pow(3), 64);\nassert_eq!(u32::MAX.saturating_pow(2), u32::MAX);\n```",
+ "docs": "Returns the smallest power of two greater than or equal to `self`.\n\nWhen return value overflows (i.e., `self > (1 << (N-1))` for type\n`uN`), it panics in debug mode and the return value is wrapped to 0 in\nrelease mode (the only situation in which this method can return 0).\n\n# Examples\n\n```\nassert_eq!(2u8.next_power_of_two(), 2);\nassert_eq!(3u8.next_power_of_two(), 4);\nassert_eq!(0u8.next_power_of_two(), 1);\n```",
"id": 11093,
"inner": {
"function": {
@@ -89010,30 +87617,24 @@
{
"generic": "Self"
}
- ],
- [
- "exp",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "saturating_pow",
+ "name": "next_power_of_two",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -89043,10 +87644,10 @@
"11094": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -89056,7 +87657,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) addition with a signed integer. Computes\n`self + rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(1u32.wrapping_add_signed(2), 3);\nassert_eq!(1u32.wrapping_add_signed(-2), u32::MAX);\nassert_eq!((u32::MAX - 2).wrapping_add_signed(4), 1);\n```",
+ "docs": "Returns the smallest power of two greater than or equal to `self`. If\nthe next power of two is greater than the type's maximum value,\n`None` is returned, otherwise the power of two is wrapped in `Some`.\n\n# Examples\n\n```\nassert_eq!(2u8.checked_next_power_of_two(), Some(2));\nassert_eq!(3u8.checked_next_power_of_two(), Some(4));\nassert_eq!(u8::MAX.checked_next_power_of_two(), None);\n```",
"id": 11094,
"inner": {
"function": {
@@ -89078,30 +87679,39 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u8"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "wrapping_add_signed",
+ "name": "checked_next_power_of_two",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -89111,10 +87721,7 @@
"11095": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"needs decision on wrapping behavior\"),\nissue: 32463, is_soft: false}, feature: \"wrapping_next_power_of_two\"}}]"
},
{
"must_use": {
@@ -89124,7 +87731,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) subtraction with a signed integer. Computes\n`self - rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(1u32.wrapping_sub_signed(2), u32::MAX);\nassert_eq!(1u32.wrapping_sub_signed(-2), 3);\nassert_eq!((u32::MAX - 2).wrapping_sub_signed(-4), 1);\n```",
+ "docs": "Returns the smallest power of two greater than or equal to `n`. If\nthe next power of two is greater than the type's maximum value,\nthe return value is wrapped to `0`.\n\n# Examples\n\n```\n#![feature(wrapping_next_power_of_two)]\n\nassert_eq!(2u8.wrapping_next_power_of_two(), 2);\nassert_eq!(3u8.wrapping_next_power_of_two(), 4);\nassert_eq!(u8::MAX.wrapping_next_power_of_two(), 0);\n```",
"id": 11095,
"inner": {
"function": {
@@ -89146,30 +87753,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "i32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "wrapping_sub_signed",
+ "name": "wrapping_next_power_of_two",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -89179,23 +87780,20 @@
"11096": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) division. Computes `self / rhs`.\n\nWrapped division on unsigned types is just normal division. There's\nno way wrapping could ever happen. This function exists so that all\noperations are accounted for in the wrapping operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u32.wrapping_div(10), 10);\n```",
+ "docs": "Returns the memory representation of this integer as a byte array in\nbig-endian (network) byte order.\n\n\n**Note**: This function is meaningless on `u8`. Byte order does not exist as a\nconcept for byte-sized integers. This function is only provided in symmetry\nwith larger integer types.\n\n# Examples\n\n```\nlet bytes = 0x12u8.to_be_bytes();\nassert_eq!(bytes, [0x12]);\n```",
"id": 11096,
"inner": {
"function": {
@@ -89217,30 +87815,29 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "array": {
+ "len": "1",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
}
}
},
"links": {},
- "name": "wrapping_div",
+ "name": "to_be_bytes",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -89250,23 +87847,20 @@
"11097": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping Euclidean division. Computes `self.div_euclid(rhs)`.\n\nWrapped division on unsigned types is just normal division. There's\nno way wrapping could ever happen. This function exists so that all\noperations are accounted for in the wrapping operations. Since, for\nthe positive integers, all common definitions of division are equal,\nthis is exactly equal to `self.wrapping_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u32.wrapping_div_euclid(10), 10);\n```",
+ "docs": "Returns the memory representation of this integer as a byte array in\nlittle-endian byte order.\n\n\n**Note**: This function is meaningless on `u8`. Byte order does not exist as a\nconcept for byte-sized integers. This function is only provided in symmetry\nwith larger integer types.\n\n# Examples\n\n```\nlet bytes = 0x12u8.to_le_bytes();\nassert_eq!(bytes, [0x12]);\n```",
"id": 11097,
"inner": {
"function": {
@@ -89288,30 +87882,29 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "array": {
+ "len": "1",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
}
}
},
"links": {},
- "name": "wrapping_div_euclid",
+ "name": "to_le_bytes",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -89321,23 +87914,20 @@
"11098": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) remainder. Computes `self % rhs`.\n\nWrapped remainder calculation on unsigned types is just the regular\nremainder calculation. There's no way wrapping could ever happen.\nThis function exists so that all operations are accounted for in the\nwrapping operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u32.wrapping_rem(10), 0);\n```",
+ "docs": "Returns the memory representation of this integer as a byte array in\nnative byte order.\n\nAs the target platform's native endianness is used, portable code\nshould use [`to_be_bytes`] or [`to_le_bytes`], as appropriate,\ninstead.\n\n\n**Note**: This function is meaningless on `u8`. Byte order does not exist as a\nconcept for byte-sized integers. This function is only provided in symmetry\nwith larger integer types.\n\n[`to_be_bytes`]: Self::to_be_bytes\n[`to_le_bytes`]: Self::to_le_bytes\n\n# Examples\n\n```\nlet bytes = 0x12u8.to_ne_bytes();\nassert_eq!(\n bytes,\n if cfg!(target_endian = \"big\") {\n [0x12]\n } else {\n [0x12]\n }\n);\n```",
"id": 11098,
"inner": {
"function": {
@@ -89359,30 +87949,32 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "array": {
+ "len": "1",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
}
}
},
- "links": {},
- "name": "wrapping_rem",
+ "links": {
+ "Self::to_be_bytes": 11096,
+ "Self::to_le_bytes": 11097
+ },
+ "name": "to_ne_bytes",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -89392,23 +87984,20 @@
"11099": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping Euclidean modulo. Computes `self.rem_euclid(rhs)`.\n\nWrapped modulo calculation on unsigned types is just the regular\nremainder calculation. There's no way wrapping could ever happen.\nThis function exists so that all operations are accounted for in the\nwrapping operations. Since, for the positive integers, all common\ndefinitions of division are equal, this is exactly equal to\n`self.wrapping_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u32.wrapping_rem_euclid(10), 0);\n```",
+ "docs": "Creates a native endian integer value from its representation\nas a byte array in big endian.\n\n\n**Note**: This function is meaningless on `u8`. Byte order does not exist as a\nconcept for byte-sized integers. This function is only provided in symmetry\nwith larger integer types.\n\n# Examples\n\n```\nlet value = u8::from_be_bytes([0x12]);\nassert_eq!(value, 0x12);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_be_u8(input: &mut &[u8]) -> u8 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n u8::from_be_bytes(int_bytes.try_into().unwrap())\n}\n```",
"id": 11099,
"inner": {
"function": {
@@ -89426,34 +88015,33 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "bytes",
{
- "primitive": "u32"
+ "array": {
+ "len": "1",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "wrapping_rem_euclid",
+ "name": "from_be_bytes",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -89535,7 +88123,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -89551,7 +88139,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -89560,12 +88148,12 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -89574,20 +88162,20 @@
"11100": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) negation. Computes `-self`,\nwrapping around at the boundary of the type.\n\nSince unsigned types do not have negative equivalents\nall applications of this function will wrap (except for `-0`).\nFor values smaller than the corresponding signed type's maximum\nthe result is the same as casting the corresponding signed value.\nAny larger values are equivalent to `MAX + 1 - (val - MAX - 1)` where\n`MAX` is the corresponding signed type's maximum.\n\n# Examples\n\n```\nassert_eq!(0_u32.wrapping_neg(), 0);\nassert_eq!(u32::MAX.wrapping_neg(), 1);\nassert_eq!(13_u32.wrapping_neg(), (!13) + 1);\nassert_eq!(42_u32.wrapping_neg(), !(42 - 1));\n```",
+ "docs": "Creates a native endian integer value from its representation\nas a byte array in little endian.\n\n\n**Note**: This function is meaningless on `u8`. Byte order does not exist as a\nconcept for byte-sized integers. This function is only provided in symmetry\nwith larger integer types.\n\n# Examples\n\n```\nlet value = u8::from_le_bytes([0x12]);\nassert_eq!(value, 0x12);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_le_u8(input: &mut &[u8]) -> u8 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n u8::from_le_bytes(int_bytes.try_into().unwrap())\n}\n```",
"id": 11100,
"inner": {
"function": {
@@ -89605,28 +88193,33 @@
"sig": {
"inputs": [
[
- "self",
+ "bytes",
{
- "generic": "Self"
+ "array": {
+ "len": "1",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "wrapping_neg",
+ "name": "from_le_bytes",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -89636,20 +88229,20 @@
"11101": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Panic-free bitwise shift-left; yields `self << mask(rhs)`,\nwhere `mask` removes any high-order bits of `rhs` that\nwould cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-left; the\nRHS of a wrapping shift-left is restricted to the range\nof the type, rather than the bits shifted out of the LHS\nbeing returned to the other end. The primitive integer\ntypes all implement a [`rotate_left`](Self::rotate_left) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!(1u32.wrapping_shl(7), 128);\nassert_eq!(1u32.wrapping_shl(128), 1);\n```",
+ "docs": "Creates a native endian integer value from its memory representation\nas a byte array in native endianness.\n\nAs the target platform's native endianness is used, portable code\nlikely wants to use [`from_be_bytes`] or [`from_le_bytes`], as\nappropriate instead.\n\n[`from_be_bytes`]: Self::from_be_bytes\n[`from_le_bytes`]: Self::from_le_bytes\n\n\n**Note**: This function is meaningless on `u8`. Byte order does not exist as a\nconcept for byte-sized integers. This function is only provided in symmetry\nwith larger integer types.\n\n# Examples\n\n```\nlet value = u8::from_ne_bytes(if cfg!(target_endian = \"big\") {\n [0x12]\n} else {\n [0x12]\n});\nassert_eq!(value, 0x12);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_ne_u8(input: &mut &[u8]) -> u8 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n u8::from_ne_bytes(int_bytes.try_into().unwrap())\n}\n```",
"id": 11101,
"inner": {
"function": {
@@ -89667,36 +88260,36 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "bytes",
{
- "primitive": "u32"
+ "array": {
+ "len": "1",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
"links": {
- "Self::rotate_left": 11033
+ "Self::from_be_bytes": 11099,
+ "Self::from_le_bytes": 11100
},
- "name": "wrapping_shl",
+ "name": "from_ne_bytes",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -89706,20 +88299,21 @@
"11102": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[rustc_diagnostic_item = \"u8_legacy_fn_min_value\"]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
}
],
"crate_id": 1,
- "deprecation": null,
- "docs": "Panic-free bitwise shift-right; yields `self >> mask(rhs)`,\nwhere `mask` removes any high-order bits of `rhs` that\nwould cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-right; the\nRHS of a wrapping shift-right is restricted to the range\nof the type, rather than the bits shifted out of the LHS\nbeing returned to the other end. The primitive integer\ntypes all implement a [`rotate_right`](Self::rotate_right) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!(128u32.wrapping_shr(7), 1);\nassert_eq!(128u32.wrapping_shr(128), 128);\n```",
+ "deprecation": {
+ "note": "replaced by the `MIN` associated constant on this type",
+ "since": "TBD"
+ },
+ "docs": "New code should prefer to use\n[`u8::MIN`] instead.\n\nReturns the smallest value that can be represented by this integer type.",
"id": 11102,
"inner": {
"function": {
@@ -89735,38 +88329,25 @@
"is_unsafe": false
},
"sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
- ]
- ],
+ "inputs": [],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
"links": {
- "Self::rotate_right": 11034
+ "`u8::MIN`": 10974
},
- "name": "wrapping_shr",
+ "name": "min_value",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -89776,20 +88357,21 @@
"11103": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[rustc_diagnostic_item = \"u8_legacy_fn_max_value\"]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
}
],
"crate_id": 1,
- "deprecation": null,
- "docs": "Wrapping (modular) exponentiation. Computes `self.pow(exp)`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(3u32.wrapping_pow(5), 243);\nassert_eq!(3u8.wrapping_pow(6), 217);\n```",
+ "deprecation": {
+ "note": "replaced by the `MAX` associated constant on this type",
+ "since": "TBD"
+ },
+ "docs": "New code should prefer to use\n[`u8::MAX`] instead.\n\nReturns the largest value that can be represented by this integer type.",
"id": 11103,
"inner": {
"function": {
@@ -89805,36 +88387,25 @@
"is_unsafe": false
},
"sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "exp",
- {
- "primitive": "u32"
- }
- ]
- ],
+ "inputs": [],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u8"
}
}
}
},
- "links": {},
- "name": "wrapping_pow",
+ "links": {
+ "`u8::MAX`": 10975
+ },
+ "name": "max_value",
"span": {
"begin": [
- 1128,
+ 447,
5
],
"end": [
- 1146,
+ 468,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -89844,10 +88415,16 @@
"11104": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[doc(alias = \"average_floor\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[doc(alias = \"average\")]"
+ },
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"num_midpoint\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"num_midpoint\"}}]"
},
{
"must_use": {
@@ -89857,7 +88434,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5u32.overflowing_add(2), (7, false));\nassert_eq!(u32::MAX.overflowing_add(1), (0, true));\n```",
+ "docs": "Calculates the midpoint (average) between `self` and `rhs`.\n\n`midpoint(a, b)` is `(a + b) / 2` as if it were performed in a\nsufficiently-large unsigned integral type. This implies that the result is\nalways rounded towards zero and that no overflow will ever occur.\n\n# Examples\n\n```\nassert_eq!(0u8.midpoint(4), 2);\nassert_eq!(1u8.midpoint(4), 2);\n```",
"id": 11104,
"inner": {
"function": {
@@ -89883,34 +88460,27 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "u8"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u32"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u8"
}
}
}
},
"links": {},
- "name": "overflowing_add",
+ "name": "midpoint",
"span": {
"begin": [
- 1128,
+ 469,
5
],
"end": [
- 1146,
- 6
+ 469,
+ 41
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -89919,20 +88489,20 @@
"11105": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"const_u8_is_ascii\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 23, patch: 0})}, feature: \"ascii_methods_on_intrinsics\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs` with a signed `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1u32.overflowing_add_signed(2), (3, false));\nassert_eq!(1u32.overflowing_add_signed(-2), (u32::MAX, true));\nassert_eq!((u32::MAX - 2).overflowing_add_signed(4), (1, true));\n```",
+ "docs": "Checks if the value is within the ASCII range.\n\n# Examples\n\n```\nlet ascii = 97u8;\nlet non_ascii = 150u8;\n\nassert!(ascii.is_ascii());\nassert!(!non_ascii.is_ascii());\n```",
"id": 11105,
"inner": {
"function": {
@@ -89952,40 +88522,33 @@
[
"self",
{
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "i32"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u32"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "overflowing_add_signed",
+ "name": "is_ascii",
"span": {
"begin": [
- 1128,
+ 486,
5
],
"end": [
- 1146,
- 6
+ 486,
+ 41
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -89994,20 +88557,17 @@
"11106": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 110998, is_soft: false}, feature: \"ascii_char\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` - `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5u32.overflowing_sub(2), (3, false));\nassert_eq!(0u32.overflowing_sub(1), (u32::MAX, true));\n```",
+ "docs": "If the value of this byte is within the ASCII range, returns it as an\n[ASCII character](ascii::Char). Otherwise, returns `None`.",
"id": 11106,
"inner": {
"function": {
@@ -90027,40 +88587,54 @@
[
"self",
{
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u32"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 609,
+ "path": "AsciiChar"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
},
- {
- "primitive": "bool"
- }
- ]
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
- "links": {},
- "name": "overflowing_sub",
+ "links": {
+ "ascii::Char": 609
+ },
+ "name": "as_ascii",
"span": {
"begin": [
- 1128,
+ 495,
5
],
"end": [
- 1146,
- 6
+ 495,
+ 56
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -90069,20 +88643,17 @@
"11107": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 110998, is_soft: false}, feature: \"ascii_char\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` - `rhs` with a signed `rhs`\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1u32.overflowing_sub_signed(2), (u32::MAX, true));\nassert_eq!(1u32.overflowing_sub_signed(-2), (3, false));\nassert_eq!((u32::MAX - 2).overflowing_sub_signed(-4), (1, true));\n```",
+ "docs": "Converts this byte to an [ASCII character](ascii::Char), without\nchecking whether or not it's valid.\n\n# Safety\n\nThis byte must be valid ASCII, or else this is UB.",
"id": 11107,
"inner": {
"function": {
@@ -90095,47 +88666,46 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
[
"self",
{
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "i32"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u32"
- },
- {
- "primitive": "bool"
- }
- ]
+ "resolved_path": {
+ "args": null,
+ "id": 609,
+ "path": "AsciiChar"
+ }
}
}
}
},
- "links": {},
- "name": "overflowing_sub_signed",
+ "links": {
+ "ascii::Char": 609
+ },
+ "name": "as_ascii_unchecked",
"span": {
"begin": [
- 1128,
+ 508,
5
],
"end": [
- 1146,
- 6
+ 508,
+ 65
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -90144,20 +88714,15 @@
"11108": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"const_make_ascii\", promotable: false}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 23, patch: 0})}, feature: \"ascii_methods_on_intrinsics\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Computes the absolute difference between `self` and `other`.\n\n# Examples\n\n```\nassert_eq!(100u32.abs_diff(80), 20u32);\nassert_eq!(100u32.abs_diff(110), 10u32);\n```",
+ "docs": "Converts this value to its ASCII upper case equivalent in-place.\n\nASCII letters 'a' to 'z' are mapped to 'A' to 'Z',\nbut non-ASCII letters are unchanged.\n\nTo return a new uppercased value without modifying the existing one, use\n[`to_ascii_uppercase`].\n\n# Examples\n\n```\nlet mut byte = b'a';\n\nbyte.make_ascii_uppercase();\n\nassert_eq!(b'A', byte);\n```\n\n[`to_ascii_uppercase`]: Self::to_ascii_uppercase",
"id": 11108,
"inner": {
"function": {
@@ -90177,33 +88742,33 @@
[
"self",
{
- "generic": "Self"
- }
- ],
- [
- "other",
- {
- "primitive": "u32"
+ "borrowed_ref": {
+ "is_mutable": true,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
}
]
],
"is_c_variadic": false,
- "output": {
- "primitive": "u32"
- }
+ "output": null
}
}
},
- "links": {},
- "name": "abs_diff",
+ "links": {
+ "Self::to_ascii_uppercase": 11109
+ },
+ "name": "make_ascii_uppercase",
"span": {
"begin": [
- 1128,
+ 616,
5
],
"end": [
- 1146,
- 6
+ 616,
+ 49
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -90212,20 +88777,20 @@
"11109": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_ascii_methods_on_intrinsics\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 23, patch: 0})}, feature: \"ascii_methods_on_intrinsics\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "to uppercase the value in-place, use `make_ascii_uppercase()`"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the multiplication of `self` and `rhs`.\n\nReturns a tuple of the multiplication along with a boolean\nindicating whether an arithmetic overflow would occur. If an\noverflow would have occurred then the wrapped value is returned.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why why `u32`\nis used.\n\n```\nassert_eq!(5u32.overflowing_mul(2), (10, false));\nassert_eq!(1_000_000_000u32.overflowing_mul(10), (1410065408, true));\n```",
+ "docs": "Makes a copy of the value in its ASCII upper case equivalent.\n\nASCII letters 'a' to 'z' are mapped to 'A' to 'Z',\nbut non-ASCII letters are unchanged.\n\nTo uppercase the value in-place, use [`make_ascii_uppercase`].\n\n# Examples\n\n```\nlet lowercase_a = 97u8;\n\nassert_eq!(65, lowercase_a.to_ascii_uppercase());\n```\n\n[`make_ascii_uppercase`]: Self::make_ascii_uppercase",
"id": 11109,
"inner": {
"function": {
@@ -90245,40 +88810,35 @@
[
"self",
{
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u32"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u32"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u8"
}
}
}
},
- "links": {},
- "name": "overflowing_mul",
+ "links": {
+ "Self::make_ascii_uppercase": 11108
+ },
+ "name": "to_ascii_uppercase",
"span": {
"begin": [
- 1128,
+ 539,
5
],
"end": [
- 1146,
- 6
+ 539,
+ 49
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -90359,7 +88919,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -90375,7 +88935,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -90384,12 +88944,12 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -90398,20 +88958,15 @@
"11110": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"const_make_ascii\", promotable: false}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 23, patch: 0})}, feature: \"ascii_methods_on_intrinsics\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the \"full multiplication\" `self * rhs + carry`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need the `carry`, then you can use [`Self::widening_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5u32.carrying_mul(2, 0), (10, 0));\nassert_eq!(5u32.carrying_mul(2, 10), (20, 0));\nassert_eq!(1_000_000_000u32.carrying_mul(10, 0), (1410065408, 2));\nassert_eq!(1_000_000_000u32.carrying_mul(10, 10), (1410065418, 2));\nassert_eq!(u32::MAX.carrying_mul(u32::MAX, u32::MAX), (0, u32::MAX));\n```\n\nThis is the core operation needed for scalar multiplication when\nimplementing it for wider-than-native types.\n\n```\n#![feature(bigint_helper_methods)]\nfn scalar_mul_eq(little_endian_digits: &mut Vec, multiplicand: u16) {\n let mut carry = 0;\n for d in little_endian_digits.iter_mut() {\n (*d, carry) = d.carrying_mul(multiplicand, carry);\n }\n if carry != 0 {\n little_endian_digits.push(carry);\n }\n}\n\nlet mut v = vec![10, 20];\nscalar_mul_eq(&mut v, 3);\nassert_eq!(v, [30, 60]);\n\nassert_eq!(0x87654321_u64 * 0xFEED, 0x86D3D159E38D);\nlet mut v = vec![0x4321, 0x8765];\nscalar_mul_eq(&mut v, 0xFEED);\nassert_eq!(v, [0xE38D, 0xD159, 0x86D3]);\n```\n\nIf `carry` is zero, this is similar to [`overflowing_mul`](Self::overflowing_mul),\nexcept that it gives the value of the overflow instead of just whether one happened:\n\n```\n#![feature(bigint_helper_methods)]\nlet r = u8::carrying_mul(7, 13, 0);\nassert_eq!((r.0, r.1 != 0), u8::overflowing_mul(7, 13));\nlet r = u8::carrying_mul(13, 42, 0);\nassert_eq!((r.0, r.1 != 0), u8::overflowing_mul(13, 42));\n```\n\nThe value of the first field in the returned tuple matches what you'd get\nby combining the [`wrapping_mul`](Self::wrapping_mul) and\n[`wrapping_add`](Self::wrapping_add) methods:\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(\n 789_u16.carrying_mul(456, 123).0,\n 789_u16.wrapping_mul(456).wrapping_add(123),\n);\n```",
+ "docs": "Converts this value to its ASCII lower case equivalent in-place.\n\nASCII letters 'A' to 'Z' are mapped to 'a' to 'z',\nbut non-ASCII letters are unchanged.\n\nTo return a new lowercased value without modifying the existing one, use\n[`to_ascii_lowercase`].\n\n# Examples\n\n```\nlet mut byte = b'A';\n\nbyte.make_ascii_lowercase();\n\nassert_eq!(b'a', byte);\n```\n\n[`to_ascii_lowercase`]: Self::to_ascii_lowercase",
"id": 11110,
"inner": {
"function": {
@@ -90431,51 +88986,33 @@
[
"self",
{
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
- ],
- [
- "carry",
- {
- "primitive": "u32"
+ "borrowed_ref": {
+ "is_mutable": true,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
}
]
],
"is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "u32"
- },
- {
- "primitive": "u32"
- }
- ]
- }
+ "output": null
}
}
},
"links": {
- "Self::overflowing_mul": 11109,
- "Self::wrapping_add": 11043,
- "Self::wrapping_mul": 11056,
- "`Self::widening_mul`": 11111
+ "Self::to_ascii_lowercase": 11111
},
- "name": "carrying_mul",
+ "name": "make_ascii_lowercase",
"span": {
"begin": [
- 1128,
+ 642,
5
],
"end": [
- 1146,
- 6
+ 642,
+ 49
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -90484,20 +89021,20 @@
"11111": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_ascii_methods_on_intrinsics\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 23, patch: 0})}, feature: \"ascii_methods_on_intrinsics\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "to lowercase the value in-place, use `make_ascii_lowercase()`"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the complete product `self * rhs` without the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nIf you also need to add a carry to the wide result, then you want\n[`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5u32.widening_mul(2), (10, 0));\nassert_eq!(1_000_000_000u32.widening_mul(10), (1410065408, 2));\n```",
+ "docs": "Makes a copy of the value in its ASCII lower case equivalent.\n\nASCII letters 'A' to 'Z' are mapped to 'a' to 'z',\nbut non-ASCII letters are unchanged.\n\nTo lowercase the value in-place, use [`make_ascii_lowercase`].\n\n# Examples\n\n```\nlet uppercase_a = 65u8;\n\nassert_eq!(97, uppercase_a.to_ascii_lowercase());\n```\n\n[`make_ascii_lowercase`]: Self::make_ascii_lowercase",
"id": 11111,
"inner": {
"function": {
@@ -90517,42 +89054,35 @@
[
"self",
{
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u32"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u32"
- },
- {
- "primitive": "u32"
- }
- ]
+ "primitive": "u8"
}
}
}
},
"links": {
- "`Self::carrying_mul`": 11110
+ "Self::make_ascii_lowercase": 11110
},
- "name": "widening_mul",
+ "name": "to_ascii_lowercase",
"span": {
"begin": [
- 1128,
+ 564,
5
],
"end": [
- 1146,
- 6
+ 564,
+ 49
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -90561,20 +89091,15 @@
"11112": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_ascii_methods_on_intrinsics\",\npromotable: false}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 23, patch: 0})}, feature: \"ascii_methods_on_intrinsics\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the \"full multiplication\" `self * rhs + carry1 + carry2`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need either `carry`, then you can use [`Self::widening_mul`] instead,\nand if you only need one `carry`, then you can use [`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared between integer types,\nwhich explains why `u32` is used here.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5u32.carrying_mul_add(2, 0, 0), (10, 0));\nassert_eq!(5u32.carrying_mul_add(2, 10, 10), (30, 0));\nassert_eq!(1_000_000_000u32.carrying_mul_add(10, 0, 0), (1410065408, 2));\nassert_eq!(1_000_000_000u32.carrying_mul_add(10, 10, 10), (1410065428, 2));\nassert_eq!(u32::MAX.carrying_mul_add(u32::MAX, u32::MAX, u32::MAX), (u32::MAX, u32::MAX));\n```\n\nThis is the core per-digit operation for \"grade school\" O(n²) multiplication.\n\nPlease note that this example is shared between integer types,\nusing `u8` for simplicity of the demonstration.\n\n```\n#![feature(bigint_helper_methods)]\n\nfn quadratic_mul(a: [u8; N], b: [u8; N]) -> [u8; N] {\n let mut out = [0; N];\n for j in 0..N {\n let mut carry = 0;\n for i in 0..(N - j) {\n (out[j + i], carry) = u8::carrying_mul_add(a[i], b[j], out[j + i], carry);\n }\n }\n out\n}\n\n// -1 * -1 == 1\nassert_eq!(quadratic_mul([0xFF; 3], [0xFF; 3]), [1, 0, 0]);\n\nassert_eq!(u32::wrapping_mul(0x9e3779b9, 0x7f4a7c15), 0xCFFC982D);\nassert_eq!(\n quadratic_mul(u32::to_le_bytes(0x9e3779b9), u32::to_le_bytes(0x7f4a7c15)),\n u32::to_le_bytes(0xCFFC982D)\n);\n```",
+ "docs": "Checks that two values are an ASCII case-insensitive match.\n\nThis is equivalent to `to_ascii_lowercase(a) == to_ascii_lowercase(b)`.\n\n# Examples\n\n```\nlet lowercase_a = 97u8;\nlet uppercase_a = 65u8;\n\nassert!(lowercase_a.eq_ignore_ascii_case(&uppercase_a));\n```",
"id": 11112,
"inner": {
"function": {
@@ -90594,55 +89119,45 @@
[
"self",
{
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
- ],
- [
- "carry",
- {
- "primitive": "u32"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
}
],
[
- "add",
+ "other",
{
- "primitive": "u32"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u32"
- },
- {
- "primitive": "u32"
- }
- ]
+ "primitive": "bool"
}
}
}
},
- "links": {
- "`Self::carrying_mul`": 11110,
- "`Self::widening_mul`": 11111
- },
- "name": "carrying_mul_add",
+ "links": {},
+ "name": "eq_ignore_ascii_case",
"span": {
"begin": [
- 1128,
+ 590,
5
],
"end": [
- 1146,
- 6
+ 590,
+ 65
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -90651,23 +89166,20 @@
"11113": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_ascii_ctype_on_intrinsics\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 24, patch: 0})}, feature: \"ascii_ctype_on_intrinsics\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the divisor when `self` is divided by `rhs`.\n\nReturns a tuple of the divisor along with a boolean indicating\nwhether an arithmetic overflow would occur. Note that for unsigned\nintegers overflow never occurs, so the second value is always\n`false`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u32.overflowing_div(2), (2, false));\n```",
+ "docs": "Checks if the value is an ASCII alphabetic character:\n\n- U+0041 'A' ..= U+005A 'Z', or\n- U+0061 'a' ..= U+007A 'z'.\n\n# Examples\n\n```\nlet uppercase_a = b'A';\nlet uppercase_g = b'G';\nlet a = b'a';\nlet g = b'g';\nlet zero = b'0';\nlet percent = b'%';\nlet space = b' ';\nlet lf = b'\\n';\nlet esc = b'\\x1b';\n\nassert!(uppercase_a.is_ascii_alphabetic());\nassert!(uppercase_g.is_ascii_alphabetic());\nassert!(a.is_ascii_alphabetic());\nassert!(g.is_ascii_alphabetic());\nassert!(!zero.is_ascii_alphabetic());\nassert!(!percent.is_ascii_alphabetic());\nassert!(!space.is_ascii_alphabetic());\nassert!(!lf.is_ascii_alphabetic());\nassert!(!esc.is_ascii_alphabetic());\n```",
"id": 11113,
"inner": {
"function": {
@@ -90687,40 +89199,33 @@
[
"self",
{
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u32"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u32"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "overflowing_div",
+ "name": "is_ascii_alphabetic",
"span": {
"begin": [
- 1128,
+ 678,
5
],
"end": [
- 1146,
- 6
+ 678,
+ 52
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -90729,23 +89234,20 @@
"11114": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_ascii_ctype_on_intrinsics\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 24, patch: 0})}, feature: \"ascii_ctype_on_intrinsics\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of Euclidean division `self.div_euclid(rhs)`.\n\nReturns a tuple of the divisor along with a boolean indicating\nwhether an arithmetic overflow would occur. Note that for unsigned\nintegers overflow never occurs, so the second value is always\n`false`.\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self.overflowing_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u32.overflowing_div_euclid(2), (2, false));\n```",
+ "docs": "Checks if the value is an ASCII uppercase character:\nU+0041 'A' ..= U+005A 'Z'.\n\n# Examples\n\n```\nlet uppercase_a = b'A';\nlet uppercase_g = b'G';\nlet a = b'a';\nlet g = b'g';\nlet zero = b'0';\nlet percent = b'%';\nlet space = b' ';\nlet lf = b'\\n';\nlet esc = b'\\x1b';\n\nassert!(uppercase_a.is_ascii_uppercase());\nassert!(uppercase_g.is_ascii_uppercase());\nassert!(!a.is_ascii_uppercase());\nassert!(!g.is_ascii_uppercase());\nassert!(!zero.is_ascii_uppercase());\nassert!(!percent.is_ascii_uppercase());\nassert!(!space.is_ascii_uppercase());\nassert!(!lf.is_ascii_uppercase());\nassert!(!esc.is_ascii_uppercase());\n```",
"id": 11114,
"inner": {
"function": {
@@ -90765,40 +89267,33 @@
[
"self",
{
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u32"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u32"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "overflowing_div_euclid",
+ "name": "is_ascii_uppercase",
"span": {
"begin": [
- 1128,
+ 712,
5
],
"end": [
- 1146,
- 6
+ 712,
+ 51
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -90807,23 +89302,20 @@
"11115": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_ascii_ctype_on_intrinsics\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 24, patch: 0})}, feature: \"ascii_ctype_on_intrinsics\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the remainder when `self` is divided by `rhs`.\n\nReturns a tuple of the remainder after dividing along with a boolean\nindicating whether an arithmetic overflow would occur. Note that for\nunsigned integers overflow never occurs, so the second value is\nalways `false`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u32.overflowing_rem(2), (1, false));\n```",
+ "docs": "Checks if the value is an ASCII lowercase character:\nU+0061 'a' ..= U+007A 'z'.\n\n# Examples\n\n```\nlet uppercase_a = b'A';\nlet uppercase_g = b'G';\nlet a = b'a';\nlet g = b'g';\nlet zero = b'0';\nlet percent = b'%';\nlet space = b' ';\nlet lf = b'\\n';\nlet esc = b'\\x1b';\n\nassert!(!uppercase_a.is_ascii_lowercase());\nassert!(!uppercase_g.is_ascii_lowercase());\nassert!(a.is_ascii_lowercase());\nassert!(g.is_ascii_lowercase());\nassert!(!zero.is_ascii_lowercase());\nassert!(!percent.is_ascii_lowercase());\nassert!(!space.is_ascii_lowercase());\nassert!(!lf.is_ascii_lowercase());\nassert!(!esc.is_ascii_lowercase());\n```",
"id": 11115,
"inner": {
"function": {
@@ -90843,40 +89335,33 @@
[
"self",
{
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u32"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u32"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "overflowing_rem",
+ "name": "is_ascii_lowercase",
"span": {
"begin": [
- 1128,
+ 746,
5
],
"end": [
- 1146,
- 6
+ 746,
+ 51
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -90885,23 +89370,20 @@
"11116": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_ascii_ctype_on_intrinsics\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 24, patch: 0})}, feature: \"ascii_ctype_on_intrinsics\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the remainder `self.rem_euclid(rhs)` as if by Euclidean division.\n\nReturns a tuple of the modulo after dividing along with a boolean\nindicating whether an arithmetic overflow would occur. Note that for\nunsigned integers overflow never occurs, so the second value is\nalways `false`.\nSince, for the positive integers, all common\ndefinitions of division are equal, this operation\nis exactly equal to `self.overflowing_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u32.overflowing_rem_euclid(2), (1, false));\n```",
+ "docs": "Checks if the value is an ASCII alphanumeric character:\n\n- U+0041 'A' ..= U+005A 'Z', or\n- U+0061 'a' ..= U+007A 'z', or\n- U+0030 '0' ..= U+0039 '9'.\n\n# Examples\n\n```\nlet uppercase_a = b'A';\nlet uppercase_g = b'G';\nlet a = b'a';\nlet g = b'g';\nlet zero = b'0';\nlet percent = b'%';\nlet space = b' ';\nlet lf = b'\\n';\nlet esc = b'\\x1b';\n\nassert!(uppercase_a.is_ascii_alphanumeric());\nassert!(uppercase_g.is_ascii_alphanumeric());\nassert!(a.is_ascii_alphanumeric());\nassert!(g.is_ascii_alphanumeric());\nassert!(zero.is_ascii_alphanumeric());\nassert!(!percent.is_ascii_alphanumeric());\nassert!(!space.is_ascii_alphanumeric());\nassert!(!lf.is_ascii_alphanumeric());\nassert!(!esc.is_ascii_alphanumeric());\n```",
"id": 11116,
"inner": {
"function": {
@@ -90921,40 +89403,33 @@
[
"self",
{
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u32"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u32"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "overflowing_rem_euclid",
+ "name": "is_ascii_alphanumeric",
"span": {
"begin": [
- 1128,
+ 783,
5
],
"end": [
- 1146,
- 6
+ 783,
+ 54
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -90963,20 +89438,20 @@
"11117": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_ascii_ctype_on_intrinsics\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 24, patch: 0})}, feature: \"ascii_ctype_on_intrinsics\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Negates self in an overflowing fashion.\n\nReturns `!self + 1` using wrapping operations to return the value\nthat represents the negation of this unsigned value. Note that for\npositive unsigned values overflow always occurs, but negating 0 does\nnot overflow.\n\n# Examples\n\n```\nassert_eq!(0u32.overflowing_neg(), (0, false));\nassert_eq!(2u32.overflowing_neg(), (-2i32 as u32, true));\n```",
+ "docs": "Checks if the value is an ASCII decimal digit:\nU+0030 '0' ..= U+0039 '9'.\n\n# Examples\n\n```\nlet uppercase_a = b'A';\nlet uppercase_g = b'G';\nlet a = b'a';\nlet g = b'g';\nlet zero = b'0';\nlet percent = b'%';\nlet space = b' ';\nlet lf = b'\\n';\nlet esc = b'\\x1b';\n\nassert!(!uppercase_a.is_ascii_digit());\nassert!(!uppercase_g.is_ascii_digit());\nassert!(!a.is_ascii_digit());\nassert!(!g.is_ascii_digit());\nassert!(zero.is_ascii_digit());\nassert!(!percent.is_ascii_digit());\nassert!(!space.is_ascii_digit());\nassert!(!lf.is_ascii_digit());\nassert!(!esc.is_ascii_digit());\n```",
"id": 11117,
"inner": {
"function": {
@@ -90996,34 +89471,33 @@
[
"self",
{
- "generic": "Self"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u32"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "overflowing_neg",
+ "name": "is_ascii_digit",
"span": {
"begin": [
- 1128,
+ 817,
5
],
"end": [
- 1146,
- 6
+ 817,
+ 47
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -91032,20 +89506,17 @@
"11118": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 101288, is_soft: false}, feature: \"is_ascii_octdigit\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts self left by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean\nindicating whether the shift value was larger than or equal to the\nnumber of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then\nused to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x1u32.overflowing_shl(4), (0x10, false));\nassert_eq!(0x1u32.overflowing_shl(132), (0x10, true));\nassert_eq!(0x10u32.overflowing_shl(31), (0, false));\n```",
+ "docs": "Checks if the value is an ASCII octal digit:\nU+0030 '0' ..= U+0037 '7'.\n\n# Examples\n\n```\n#![feature(is_ascii_octdigit)]\n\nlet uppercase_a = b'A';\nlet a = b'a';\nlet zero = b'0';\nlet seven = b'7';\nlet nine = b'9';\nlet percent = b'%';\nlet lf = b'\\n';\n\nassert!(!uppercase_a.is_ascii_octdigit());\nassert!(!a.is_ascii_octdigit());\nassert!(zero.is_ascii_octdigit());\nassert!(seven.is_ascii_octdigit());\nassert!(!nine.is_ascii_octdigit());\nassert!(!percent.is_ascii_octdigit());\nassert!(!lf.is_ascii_octdigit());\n```",
"id": 11118,
"inner": {
"function": {
@@ -91065,40 +89536,33 @@
[
"self",
{
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u32"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u32"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "overflowing_shl",
+ "name": "is_ascii_octdigit",
"span": {
"begin": [
- 1128,
+ 848,
5
],
"end": [
- 1146,
- 6
+ 848,
+ 50
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -91107,20 +89571,20 @@
"11119": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_ascii_ctype_on_intrinsics\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 24, patch: 0})}, feature: \"ascii_ctype_on_intrinsics\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts self right by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean\nindicating whether the shift value was larger than or equal to the\nnumber of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then\nused to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x10u32.overflowing_shr(4), (0x1, false));\nassert_eq!(0x10u32.overflowing_shr(132), (0x1, true));\n```",
+ "docs": "Checks if the value is an ASCII hexadecimal digit:\n\n- U+0030 '0' ..= U+0039 '9', or\n- U+0041 'A' ..= U+0046 'F', or\n- U+0061 'a' ..= U+0066 'f'.\n\n# Examples\n\n```\nlet uppercase_a = b'A';\nlet uppercase_g = b'G';\nlet a = b'a';\nlet g = b'g';\nlet zero = b'0';\nlet percent = b'%';\nlet space = b' ';\nlet lf = b'\\n';\nlet esc = b'\\x1b';\n\nassert!(uppercase_a.is_ascii_hexdigit());\nassert!(!uppercase_g.is_ascii_hexdigit());\nassert!(a.is_ascii_hexdigit());\nassert!(!g.is_ascii_hexdigit());\nassert!(zero.is_ascii_hexdigit());\nassert!(!percent.is_ascii_hexdigit());\nassert!(!space.is_ascii_hexdigit());\nassert!(!lf.is_ascii_hexdigit());\nassert!(!esc.is_ascii_hexdigit());\n```",
"id": 11119,
"inner": {
"function": {
@@ -91140,40 +89604,33 @@
[
"self",
{
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u32"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u32"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "overflowing_shr",
+ "name": "is_ascii_hexdigit",
"span": {
"begin": [
- 1128,
+ 885,
5
],
"end": [
- 1146,
- 6
+ 885,
+ 50
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -91275,7 +89732,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -91300,11 +89757,11 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -91314,20 +89771,20 @@
"11120": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_ascii_ctype_on_intrinsics\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 24, patch: 0})}, feature: \"ascii_ctype_on_intrinsics\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\nReturns a tuple of the exponentiation along with a bool indicating\nwhether an overflow happened.\n\n# Examples\n\n```\nassert_eq!(3u32.overflowing_pow(5), (243, false));\nassert_eq!(3u8.overflowing_pow(6), (217, true));\n```",
+ "docs": "Checks if the value is an ASCII punctuation character:\n\n- U+0021 ..= U+002F `! \" # $ % & ' ( ) * + , - . /`, or\n- U+003A ..= U+0040 `: ; < = > ? @`, or\n- U+005B ..= U+0060 `` [ \\ ] ^ _ ` ``, or\n- U+007B ..= U+007E `{ | } ~`\n\n# Examples\n\n```\nlet uppercase_a = b'A';\nlet uppercase_g = b'G';\nlet a = b'a';\nlet g = b'g';\nlet zero = b'0';\nlet percent = b'%';\nlet space = b' ';\nlet lf = b'\\n';\nlet esc = b'\\x1b';\n\nassert!(!uppercase_a.is_ascii_punctuation());\nassert!(!uppercase_g.is_ascii_punctuation());\nassert!(!a.is_ascii_punctuation());\nassert!(!g.is_ascii_punctuation());\nassert!(!zero.is_ascii_punctuation());\nassert!(percent.is_ascii_punctuation());\nassert!(!space.is_ascii_punctuation());\nassert!(!lf.is_ascii_punctuation());\nassert!(!esc.is_ascii_punctuation());\n```",
"id": 11120,
"inner": {
"function": {
@@ -91347,40 +89804,33 @@
[
"self",
{
- "generic": "Self"
- }
- ],
- [
- "exp",
- {
- "primitive": "u32"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u32"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "overflowing_pow",
+ "name": "is_ascii_punctuation",
"span": {
"begin": [
- 1128,
+ 923,
5
],
"end": [
- 1146,
- 6
+ 923,
+ 53
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -91389,20 +89839,20 @@
"11121": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_ascii_ctype_on_intrinsics\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 24, patch: 0})}, feature: \"ascii_ctype_on_intrinsics\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\n# Examples\n\n```\nassert_eq!(2u32.pow(5), 32);\n```",
+ "docs": "Checks if the value is an ASCII graphic character:\nU+0021 '!' ..= U+007E '~'.\n\n# Examples\n\n```\nlet uppercase_a = b'A';\nlet uppercase_g = b'G';\nlet a = b'a';\nlet g = b'g';\nlet zero = b'0';\nlet percent = b'%';\nlet space = b' ';\nlet lf = b'\\n';\nlet esc = b'\\x1b';\n\nassert!(uppercase_a.is_ascii_graphic());\nassert!(uppercase_g.is_ascii_graphic());\nassert!(a.is_ascii_graphic());\nassert!(g.is_ascii_graphic());\nassert!(zero.is_ascii_graphic());\nassert!(percent.is_ascii_graphic());\nassert!(!space.is_ascii_graphic());\nassert!(!lf.is_ascii_graphic());\nassert!(!esc.is_ascii_graphic());\n```",
"id": 11121,
"inner": {
"function": {
@@ -91422,33 +89872,33 @@
[
"self",
{
- "generic": "Self"
- }
- ],
- [
- "exp",
- {
- "primitive": "u32"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "pow",
+ "name": "is_ascii_graphic",
"span": {
"begin": [
- 1128,
+ 960,
5
],
"end": [
- 1146,
- 6
+ 960,
+ 49
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -91457,20 +89907,20 @@
"11122": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_ascii_ctype_on_intrinsics\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 24, patch: 0})}, feature: \"ascii_ctype_on_intrinsics\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the square root of the number, rounded down.\n\n# Examples\n\n```\nassert_eq!(10u32.isqrt(), 3);\n```",
+ "docs": "Checks if the value is an ASCII control character:\nU+0000 NUL ..= U+001F UNIT SEPARATOR, or U+007F DELETE.\nNote that most ASCII whitespace characters are control\ncharacters, but SPACE is not.\n\n# Examples\n\n```\nlet uppercase_a = b'A';\nlet uppercase_g = b'G';\nlet a = b'a';\nlet g = b'g';\nlet zero = b'0';\nlet percent = b'%';\nlet space = b' ';\nlet lf = b'\\n';\nlet esc = b'\\x1b';\n\nassert!(!uppercase_a.is_ascii_control());\nassert!(!uppercase_g.is_ascii_control());\nassert!(!a.is_ascii_control());\nassert!(!g.is_ascii_control());\nassert!(!zero.is_ascii_control());\nassert!(!percent.is_ascii_control());\nassert!(!space.is_ascii_control());\nassert!(lf.is_ascii_control());\nassert!(esc.is_ascii_control());\n```",
"id": 11122,
"inner": {
"function": {
@@ -91490,27 +89940,33 @@
[
"self",
{
- "generic": "Self"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "isqrt",
+ "name": "is_ascii_control",
"span": {
"begin": [
- 1128,
+ 1047,
5
],
"end": [
- 1146,
- 6
+ 1047,
+ 49
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -91519,23 +89975,17 @@
"11123": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"inherent_ascii_escape\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": "this returns the escaped byte as an iterator, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Performs Euclidean division.\n\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7u32.div_euclid(4), 1); // or any other integer type\n```",
+ "docs": "Returns an iterator that produces an escaped version of a `u8`,\ntreating it as an ASCII character.\n\nThe behavior is identical to [`ascii::escape_default`].\n\n# Examples\n\n```\nassert_eq!(\"0\", b'0'.escape_ascii().to_string());\nassert_eq!(\"\\\\t\", b'\\t'.escape_ascii().to_string());\nassert_eq!(\"\\\\r\", b'\\r'.escape_ascii().to_string());\nassert_eq!(\"\\\\n\", b'\\n'.escape_ascii().to_string());\nassert_eq!(\"\\\\'\", b'\\''.escape_ascii().to_string());\nassert_eq!(\"\\\\\\\"\", b'\"'.escape_ascii().to_string());\nassert_eq!(\"\\\\\\\\\", b'\\\\'.escape_ascii().to_string());\nassert_eq!(\"\\\\x9d\", b'\\x9d'.escape_ascii().to_string());\n```",
"id": 11123,
"inner": {
"function": {
@@ -91547,7 +89997,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -91557,127 +90007,242 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "resolved_path": {
+ "args": null,
+ "id": 611,
+ "path": "EscapeDefault"
+ }
}
}
}
},
- "links": {},
- "name": "div_euclid",
+ "links": {
+ "`ascii::escape_default`": 613
+ },
+ "name": "escape_ascii",
"span": {
"begin": [
- 1128,
+ 1072,
5
],
"end": [
- 1146,
- 6
+ 1072,
+ 54
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"11124": {
- "attrs": [
- {
- "other": "#[doc(alias = \"modulo\", alias = \"mod\")]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- },
- {
- "other": "#[attr = TrackCaller]"
- }
- ],
+ "attrs": [],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the least remainder of `self (mod rhs)`.\n\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self % rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7u32.rem_euclid(4), 3); // or any other integer type\n```",
+ "docs": null,
"id": 11124,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "u8"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "u32"
- }
- }
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 10974,
+ 10975,
+ 10976,
+ 10977,
+ 10978,
+ 10980,
+ 10981,
+ 10982,
+ 10983,
+ 10984,
+ 10985,
+ 10986,
+ 10987,
+ 10988,
+ 10372,
+ 10989,
+ 10990,
+ 10991,
+ 10992,
+ 10993,
+ 10994,
+ 10995,
+ 10996,
+ 10997,
+ 10998,
+ 10999,
+ 11000,
+ 11002,
+ 11003,
+ 11004,
+ 11005,
+ 11006,
+ 11008,
+ 11009,
+ 11010,
+ 11011,
+ 11012,
+ 11013,
+ 11015,
+ 11016,
+ 11017,
+ 11018,
+ 11019,
+ 11020,
+ 11021,
+ 11022,
+ 11023,
+ 11024,
+ 11025,
+ 11026,
+ 11027,
+ 11028,
+ 10979,
+ 11029,
+ 11030,
+ 11031,
+ 11032,
+ 11033,
+ 11034,
+ 11035,
+ 11036,
+ 11037,
+ 11038,
+ 11039,
+ 11040,
+ 11041,
+ 11042,
+ 11043,
+ 11044,
+ 11045,
+ 11046,
+ 11047,
+ 11048,
+ 11049,
+ 11050,
+ 11051,
+ 11052,
+ 11053,
+ 11054,
+ 11055,
+ 11001,
+ 11056,
+ 11007,
+ 11057,
+ 11014,
+ 11058,
+ 11059,
+ 11060,
+ 11061,
+ 11062,
+ 11063,
+ 11064,
+ 11065,
+ 11066,
+ 10334,
+ 11067,
+ 11068,
+ 10338,
+ 11069,
+ 11070,
+ 11072,
+ 11074,
+ 11071,
+ 11073,
+ 11075,
+ 11076,
+ 11077,
+ 11078,
+ 11079,
+ 11080,
+ 11081,
+ 11082,
+ 11083,
+ 11084,
+ 11085,
+ 11086,
+ 11087,
+ 11088,
+ 11089,
+ 11090,
+ 11091,
+ 11092,
+ 11093,
+ 11094,
+ 11095,
+ 11096,
+ 11097,
+ 11098,
+ 11099,
+ 11100,
+ 11101,
+ 11102,
+ 11103,
+ 11104,
+ 11105,
+ 11106,
+ 11107,
+ 11109,
+ 11111,
+ 11112,
+ 11108,
+ 11110,
+ 11113,
+ 11114,
+ 11115,
+ 11116,
+ 11117,
+ 11118,
+ 11119,
+ 11120,
+ 11121,
+ 9767,
+ 11122,
+ 11123
+ ],
+ "provided_trait_methods": [],
+ "trait": null
}
},
"links": {},
- "name": "rem_euclid",
+ "name": null,
"span": {
"begin": [
- 1128,
- 5
+ 446,
+ 1
],
"end": [
- 1146,
- 6
+ 446,
+ 8
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
"11125": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 82, patch: 0})}, feature: \"const_int_from_str\", promotable: false}}]"
},
{
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards negative infinity.\n\nThis is the same as performing `self / rhs` for all unsigned integers.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(7_u32.div_floor(4), 1);\n```",
+ "docs": "Parses an integer from a string slice with digits in a given base.\n\nThe string is expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# See also\nIf the string to be parsed is in base 10 (decimal),\n[`from_str`] or [`str::parse`] can also be used.\n\n[`from_str`]: #method.from_str\n[`str::parse`]: primitive.str.html#method.parse\n\n# Examples\n\n```\nassert_eq!(u8::from_str_radix(\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\nassert!(u8::from_str_radix(\"1 \", 10).is_err());\n```",
"id": 11125,
"inner": {
"function": {
@@ -91695,13 +90260,19 @@
"sig": {
"inputs": [
[
- "self",
+ "src",
{
- "generic": "Self"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "primitive": "str"
+ }
+ }
}
],
[
- "rhs",
+ "radix",
{
"primitive": "u32"
}
@@ -91709,21 +90280,45 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u8"
+ }
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 4786,
+ "path": "ParseIntError"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 57,
+ "path": "Result"
+ }
}
}
}
},
"links": {},
- "name": "div_floor",
+ "name": "from_str_radix",
"span": {
"begin": [
- 1128,
- 5
+ 1667,
+ 1
],
"end": [
- 1146,
- 6
+ 1667,
+ 58
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -91732,23 +90327,12 @@
"11126": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- },
- {
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards positive infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7_u32.div_ceil(4), 2);\n```",
+ "docs": "Parses an integer from an ASCII-byte slice with decimal digits.\n\nThe characters are expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(u8::from_ascii(b\"+10\"), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(u8::from_ascii(b\"1 \").is_err());\n```",
"id": 11126,
"inner": {
"function": {
@@ -91766,35 +90350,61 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "src",
{
- "primitive": "u32"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "slice": {
+ "primitive": "u8"
+ }
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u8"
+ }
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 4786,
+ "path": "ParseIntError"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 57,
+ "path": "Result"
+ }
}
}
}
},
"links": {},
- "name": "div_ceil",
+ "name": "from_ascii",
"span": {
"begin": [
- 1128,
- 5
+ 1667,
+ 1
],
"end": [
- 1146,
- 6
+ 1667,
+ 58
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -91803,20 +90413,12 @@
"11127": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the smallest value greater than or equal to `self` that\nis a multiple of `rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nOn overflow, this function will panic if overflow checks are enabled (default in debug\nmode) and wrap if overflow checks are disabled (default in release mode).\n\n# Examples\n\n```\nassert_eq!(16_u32.next_multiple_of(8), 16);\nassert_eq!(23_u32.next_multiple_of(8), 24);\n```",
+ "docs": "Parses an integer from an ASCII-byte slice with digits in a given base.\n\nThe characters are expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(u8::from_ascii_radix(b\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(u8::from_ascii_radix(b\"1 \", 10).is_err());\n```",
"id": 11127,
"inner": {
"function": {
@@ -91834,13 +90436,21 @@
"sig": {
"inputs": [
[
- "self",
+ "src",
{
- "generic": "Self"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "slice": {
+ "primitive": "u8"
+ }
+ }
+ }
}
],
[
- "rhs",
+ "radix",
{
"primitive": "u32"
}
@@ -91848,126 +90458,102 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u8"
+ }
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 4786,
+ "path": "ParseIntError"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 57,
+ "path": "Result"
+ }
}
}
}
},
"links": {},
- "name": "next_multiple_of",
+ "name": "from_ascii_radix",
"span": {
"begin": [
- 1128,
- 5
+ 1667,
+ 1
],
"end": [
- 1146,
- 6
+ 1667,
+ 58
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"11128": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
+ "attrs": [],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the smallest value greater than or equal to `self` that\nis a multiple of `rhs`. Returns `None` if `rhs` is zero or the\noperation would result in overflow.\n\n# Examples\n\n```\nassert_eq!(16_u32.checked_next_multiple_of(8), Some(16));\nassert_eq!(23_u32.checked_next_multiple_of(8), Some(24));\nassert_eq!(1_u32.checked_next_multiple_of(0), None);\nassert_eq!(u32::MAX.checked_next_multiple_of(2), None);\n```",
+ "docs": null,
"id": 11128,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "u8"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
- }
- }
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 11125,
+ 11126,
+ 11127
+ ],
+ "provided_trait_methods": [],
+ "trait": null
}
},
"links": {},
- "name": "checked_next_multiple_of",
+ "name": null,
"span": {
"begin": [
- 1128,
- 5
+ 1667,
+ 1
],
"end": [
- 1146,
- 6
+ 1667,
+ 58
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
"11129": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unsigned_is_multiple_of\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unsigned_is_multiple_of\"}}]"
- },
- {
- "must_use": {
- "reason": null
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 138215, is_soft: false}, feature: \"int_format_into\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `true` if `self` is an integer multiple of `rhs`, and false otherwise.\n\nThis function is equivalent to `self % rhs == 0`, except that it will not panic\nfor `rhs == 0`. Instead, `0.is_multiple_of(0) == true`, and for any non-zero `n`,\n`n.is_multiple_of(0) == false`.\n\n# Examples\n\n```\nassert!(6_u32.is_multiple_of(2));\nassert!(!5_u32.is_multiple_of(2));\n\nassert!(0_u32.is_multiple_of(0));\nassert!(!6_u32.is_multiple_of(0));\n```",
+ "docs": "Allows users to write an integer (in signed decimal format) into a variable `buf` of\ntype [`NumBuffer`] that is passed by the caller by mutable reference.\n\n# Examples\n\n```\n#![feature(int_format_into)]\nuse core::fmt::NumBuffer;\n\nlet n = 0u8;\nlet mut buf = NumBuffer::new();\nassert_eq!(n.format_into(&mut buf), \"0\");\n\nlet n1 = 32u8;\nassert_eq!(n1.format_into(&mut buf), \"32\");\n\nlet n2 = u8 :: MAX;\nassert_eq!(n2.format_into(&mut buf), u8 :: MAX.to_string());\n```",
"id": 11129,
"inner": {
"function": {
@@ -91979,7 +90565,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -91991,31 +90577,60 @@
}
],
[
- "rhs",
+ "buf",
{
- "primitive": "u32"
+ "borrowed_ref": {
+ "is_mutable": true,
+ "lifetime": null,
+ "type": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u8"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 10387,
+ "path": "NumBuffer"
+ }
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "primitive": "str"
+ }
+ }
}
}
}
},
- "links": {},
- "name": "is_multiple_of",
+ "links": {
+ "`NumBuffer`": 10387
+ },
+ "name": "format_into",
"span": {
"begin": [
- 1128,
+ 599,
5
],
"end": [
- 1146,
- 6
+ 599,
+ 95
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/fmt/num.rs"
},
"visibility": "public"
},
@@ -92072,7 +90687,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -92097,11 +90712,11 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -92109,123 +90724,73 @@
"visibility": "default"
},
"11130": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_is_power_of_two\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- },
- {
- "must_use": {
- "reason": null
- }
- }
- ],
+ "attrs": [],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `true` if and only if `self == 2^k` for some unsigned integer `k`.\n\n# Examples\n\n```\nassert!(16u32.is_power_of_two());\nassert!(!10u32.is_power_of_two());\n```",
+ "docs": null,
"id": 11130,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "u8"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "bool"
- }
- }
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 11129
+ ],
+ "provided_trait_methods": [],
+ "trait": null
}
},
"links": {},
- "name": "is_power_of_two",
+ "name": null,
"span": {
"begin": [
- 1128,
+ 599,
5
],
"end": [
- 1146,
- 6
+ 599,
+ 95
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/fmt/num.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
"11131": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the smallest power of two greater than or equal to `self`.\n\nWhen return value overflows (i.e., `self > (1 << (N-1))` for type\n`uN`), it panics in debug mode and the return value is wrapped to 0 in\nrelease mode (the only situation in which this method can return 0).\n\n# Examples\n\n```\nassert_eq!(2u32.next_power_of_two(), 2);\nassert_eq!(3u32.next_power_of_two(), 4);\nassert_eq!(0u32.next_power_of_two(), 1);\n```",
+ "docs": "The smallest value that can be represented by this integer type.\n\n# Examples\n\n```\nassert_eq!(u16::MIN, 0);\n```",
"id": 11131,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "u16"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "u32"
- }
- }
+ "value": "0"
}
},
"links": {},
- "name": "next_power_of_two",
+ "name": "MIN",
"span": {
"begin": [
- 1128,
+ 1084,
5
],
"end": [
- 1146,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -92235,74 +90800,30 @@
"11132": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the smallest power of two greater than or equal to `self`. If\nthe next power of two is greater than the type's maximum value,\n`None` is returned, otherwise the power of two is wrapped in `Some`.\n\n# Examples\n\n```\nassert_eq!(2u32.checked_next_power_of_two(), Some(2));\nassert_eq!(3u32.checked_next_power_of_two(), Some(4));\nassert_eq!(u32::MAX.checked_next_power_of_two(), None);\n```",
+ "docs": "The largest value that can be represented by this integer type\n(216 − 1).\n\n# Examples\n\n```\nassert_eq!(u16::MAX, 65535);\n```",
"id": 11132,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "u16"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
- }
- }
+ "value": "_"
}
},
"links": {},
- "name": "checked_next_power_of_two",
+ "name": "MAX",
"span": {
"begin": [
- 1128,
+ 1084,
5
],
"end": [
- 1146,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -92312,56 +90833,30 @@
"11133": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"needs decision on wrapping behavior\"),\nissue: 32463, is_soft: false}, feature: \"wrapping_next_power_of_two\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 53, patch: 0})}, feature: \"int_bits_const\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the smallest power of two greater than or equal to `n`. If\nthe next power of two is greater than the type's maximum value,\nthe return value is wrapped to `0`.\n\n# Examples\n\n```\n#![feature(wrapping_next_power_of_two)]\n\nassert_eq!(2u32.wrapping_next_power_of_two(), 2);\nassert_eq!(3u32.wrapping_next_power_of_two(), 4);\nassert_eq!(u32::MAX.wrapping_next_power_of_two(), 0);\n```",
+ "docs": "The size of this integer type in bits.\n\n# Examples\n\n```\nassert_eq!(u16::BITS, 16);\n```",
"id": 11133,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "u32"
},
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "u32"
- }
- }
+ "value": "_"
}
},
"links": {},
- "name": "wrapping_next_power_of_two",
+ "name": "BITS",
"span": {
"begin": [
- 1128,
+ 1084,
5
],
"end": [
- 1146,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -92371,10 +90866,16 @@
"11134": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[doc(alias = \"popcount\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[doc(alias = \"popcnt\")]"
+ },
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -92384,7 +90885,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nbig-endian (network) byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x12345678u32.to_be_bytes();\nassert_eq!(bytes, [0x12, 0x34, 0x56, 0x78]);\n```",
+ "docs": "Returns the number of ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 0b01001100u16;\nassert_eq!(n.count_ones(), 3);\n\nlet max = u16::MAX;\nassert_eq!(max.count_ones(), 16);\n\nlet zero = 0u16;\nassert_eq!(zero.count_ones(), 0);\n```",
"id": 11134,
"inner": {
"function": {
@@ -92410,25 +90911,20 @@
],
"is_c_variadic": false,
"output": {
- "array": {
- "len": "4",
- "type": {
- "primitive": "u8"
- }
- }
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "to_be_bytes",
+ "name": "count_ones",
"span": {
"begin": [
- 1128,
+ 1084,
5
],
"end": [
- 1146,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -92438,10 +90934,10 @@
"11135": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -92451,7 +90947,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nlittle-endian byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x12345678u32.to_le_bytes();\nassert_eq!(bytes, [0x78, 0x56, 0x34, 0x12]);\n```",
+ "docs": "Returns the number of zeros in the binary representation of `self`.\n\n# Examples\n\n```\nlet zero = 0u16;\nassert_eq!(zero.count_zeros(), 16);\n\nlet max = u16::MAX;\nassert_eq!(max.count_zeros(), 0);\n```",
"id": 11135,
"inner": {
"function": {
@@ -92477,25 +90973,20 @@
],
"is_c_variadic": false,
"output": {
- "array": {
- "len": "4",
- "type": {
- "primitive": "u8"
- }
- }
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "to_le_bytes",
+ "name": "count_zeros",
"span": {
"begin": [
- 1128,
+ 1084,
5
],
"end": [
- 1146,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -92505,20 +90996,23 @@
"11136": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nnative byte order.\n\nAs the target platform's native endianness is used, portable code\nshould use [`to_be_bytes`] or [`to_le_bytes`], as appropriate,\ninstead.\n\n\n\n[`to_be_bytes`]: Self::to_be_bytes\n[`to_le_bytes`]: Self::to_le_bytes\n\n# Examples\n\n```\nlet bytes = 0x12345678u32.to_ne_bytes();\nassert_eq!(\n bytes,\n if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78]\n } else {\n [0x78, 0x56, 0x34, 0x12]\n }\n);\n```",
+ "docs": "Returns the base 2 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is zero.\n\n# Examples\n\n```\nassert_eq!(2u16.ilog2(), 1);\n```",
"id": 11136,
"inner": {
"function": {
@@ -92544,28 +91038,20 @@
],
"is_c_variadic": false,
"output": {
- "array": {
- "len": "4",
- "type": {
- "primitive": "u8"
- }
- }
+ "primitive": "u32"
}
}
}
},
- "links": {
- "Self::to_be_bytes": 11134,
- "Self::to_le_bytes": 11135
- },
- "name": "to_ne_bytes",
+ "links": {},
+ "name": "ilog2",
"span": {
"begin": [
- 1128,
+ 1084,
5
],
"end": [
- 1146,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -92575,20 +91061,20 @@
"11137": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Creates a native endian integer value from its representation\nas a byte array in big endian.\n\n\n\n# Examples\n\n```\nlet value = u32::from_be_bytes([0x12, 0x34, 0x56, 0x78]);\nassert_eq!(value, 0x12345678);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_be_u32(input: &mut &[u8]) -> u32 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n u32::from_be_bytes(int_bytes.try_into().unwrap())\n}\n```",
+ "docs": "Returns the number of leading zeros in the binary representation of `self`.\n\nDepending on what you're doing with the value, you might also be interested in the\n[`ilog2`] function which returns a consistent number, even if the type widens.\n\n# Examples\n\n```\nlet n = u16::MAX >> 2;\nassert_eq!(n.leading_zeros(), 2);\n\nlet zero = 0u16;\nassert_eq!(zero.leading_zeros(), 16);\n\nlet max = u16::MAX;\nassert_eq!(max.leading_zeros(), 0);\n```\n[`ilog2`]: u16::ilog2",
"id": 11137,
"inner": {
"function": {
@@ -92606,14 +91092,9 @@
"sig": {
"inputs": [
[
- "bytes",
+ "self",
{
- "array": {
- "len": "4",
- "type": {
- "primitive": "u8"
- }
- }
+ "generic": "Self"
}
]
],
@@ -92624,15 +91105,17 @@
}
}
},
- "links": {},
- "name": "from_be_bytes",
+ "links": {
+ "u16::ilog2": 11136
+ },
+ "name": "leading_zeros",
"span": {
"begin": [
- 1128,
+ 1084,
5
],
"end": [
- 1146,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -92642,20 +91125,20 @@
"11138": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Creates a native endian integer value from its representation\nas a byte array in little endian.\n\n\n\n# Examples\n\n```\nlet value = u32::from_le_bytes([0x78, 0x56, 0x34, 0x12]);\nassert_eq!(value, 0x12345678);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_le_u32(input: &mut &[u8]) -> u32 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n u32::from_le_bytes(int_bytes.try_into().unwrap())\n}\n```",
+ "docs": "Returns the number of trailing zeros in the binary representation\nof `self`.\n\n# Examples\n\n```\nlet n = 0b0101000u16;\nassert_eq!(n.trailing_zeros(), 3);\n\nlet zero = 0u16;\nassert_eq!(zero.trailing_zeros(), 16);\n\nlet max = u16::MAX;\nassert_eq!(max.trailing_zeros(), 0);\n```",
"id": 11138,
"inner": {
"function": {
@@ -92673,14 +91156,9 @@
"sig": {
"inputs": [
[
- "bytes",
+ "self",
{
- "array": {
- "len": "4",
- "type": {
- "primitive": "u8"
- }
- }
+ "generic": "Self"
}
]
],
@@ -92692,14 +91170,14 @@
}
},
"links": {},
- "name": "from_le_bytes",
+ "name": "trailing_zeros",
"span": {
"begin": [
- 1128,
+ 1084,
5
],
"end": [
- 1146,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -92709,20 +91187,20 @@
"11139": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Creates a native endian integer value from its memory representation\nas a byte array in native endianness.\n\nAs the target platform's native endianness is used, portable code\nlikely wants to use [`from_be_bytes`] or [`from_le_bytes`], as\nappropriate instead.\n\n[`from_be_bytes`]: Self::from_be_bytes\n[`from_le_bytes`]: Self::from_le_bytes\n\n\n\n# Examples\n\n```\nlet value = u32::from_ne_bytes(if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78]\n} else {\n [0x78, 0x56, 0x34, 0x12]\n});\nassert_eq!(value, 0x12345678);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_ne_u32(input: &mut &[u8]) -> u32 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n u32::from_ne_bytes(int_bytes.try_into().unwrap())\n}\n```",
+ "docs": "Returns the number of leading ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = !(u16::MAX >> 2);\nassert_eq!(n.leading_ones(), 2);\n\nlet zero = 0u16;\nassert_eq!(zero.leading_ones(), 0);\n\nlet max = u16::MAX;\nassert_eq!(max.leading_ones(), 16);\n```",
"id": 11139,
"inner": {
"function": {
@@ -92740,14 +91218,9 @@
"sig": {
"inputs": [
[
- "bytes",
+ "self",
{
- "array": {
- "len": "4",
- "type": {
- "primitive": "u8"
- }
- }
+ "generic": "Self"
}
]
],
@@ -92758,18 +91231,15 @@
}
}
},
- "links": {
- "Self::from_be_bytes": 11137,
- "Self::from_le_bytes": 11138
- },
- "name": "from_ne_bytes",
+ "links": {},
+ "name": "leading_ones",
"span": {
"begin": [
- 1128,
+ 1084,
5
],
"end": [
- 1146,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -92854,7 +91324,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -92872,8 +91342,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -92889,7 +91359,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -92898,11 +91368,11 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -92912,21 +91382,20 @@
"11140": {
"attrs": [
{
- "other": "#[rustc_diagnostic_item = \"u32_legacy_fn_min_value\"]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
},
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
- "deprecation": {
- "note": "replaced by the `MIN` associated constant on this type",
- "since": "TBD"
- },
- "docs": "New code should prefer to use\n[`u32::MIN`] instead.\n\nReturns the smallest value that can be represented by this integer type.",
+ "deprecation": null,
+ "docs": "Returns the number of trailing ones in the binary representation\nof `self`.\n\n# Examples\n\n```\nlet n = 0b1010111u16;\nassert_eq!(n.trailing_ones(), 3);\n\nlet zero = 0u16;\nassert_eq!(zero.trailing_ones(), 0);\n\nlet max = u16::MAX;\nassert_eq!(max.trailing_ones(), 16);\n```",
"id": 11140,
"inner": {
"function": {
@@ -92942,7 +91411,14 @@
"is_unsafe": false
},
"sig": {
- "inputs": [],
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
"is_c_variadic": false,
"output": {
"primitive": "u32"
@@ -92950,17 +91426,15 @@
}
}
},
- "links": {
- "`u32::MIN`": 11018
- },
- "name": "min_value",
+ "links": {},
+ "name": "trailing_ones",
"span": {
"begin": [
- 1128,
+ 1084,
5
],
"end": [
- 1146,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -92970,21 +91444,17 @@
"11141": {
"attrs": [
{
- "other": "#[rustc_diagnostic_item = \"u32_legacy_fn_max_value\"]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 142326, is_soft: false}, feature: \"uint_bit_width\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
- "deprecation": {
- "note": "replaced by the `MAX` associated constant on this type",
- "since": "TBD"
- },
- "docs": "New code should prefer to use\n[`u32::MAX`] instead.\n\nReturns the largest value that can be represented by this integer type.",
+ "deprecation": null,
+ "docs": "Returns the minimum number of bits required to represent `self`.\n\nThis method returns zero if `self` is zero.\n\n# Examples\n\n```\n#![feature(uint_bit_width)]\n\nassert_eq!(0_u16.bit_width(), 0);\nassert_eq!(0b111_u16.bit_width(), 3);\nassert_eq!(0b1110_u16.bit_width(), 4);\nassert_eq!(u16::MAX.bit_width(), 16);\n```",
"id": 11141,
"inner": {
"function": {
@@ -93000,7 +91470,14 @@
"is_unsafe": false
},
"sig": {
- "inputs": [],
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
"is_c_variadic": false,
"output": {
"primitive": "u32"
@@ -93008,17 +91485,15 @@
}
}
},
- "links": {
- "`u32::MAX`": 6009
- },
- "name": "max_value",
+ "links": {},
+ "name": "bit_width",
"span": {
"begin": [
- 1128,
+ 1084,
5
],
"end": [
- 1146,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -93028,16 +91503,7 @@
"11142": {
"attrs": [
{
- "other": "#[doc(alias = \"average_floor\")]"
- },
- {
- "other": "#[doc(alias = \"average\")]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"num_midpoint\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"num_midpoint\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
},
{
"must_use": {
@@ -93047,7 +91513,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the midpoint (average) between `self` and `rhs`.\n\n`midpoint(a, b)` is `(a + b) / 2` as if it were performed in a\nsufficiently-large unsigned integral type. This implies that the result is\nalways rounded towards zero and that no overflow will ever occur.\n\n# Examples\n\n```\nassert_eq!(0u32.midpoint(4), 2);\nassert_eq!(1u32.midpoint(4), 2);\n```",
+ "docs": "Returns `self` with only the most significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: u16 = 0b_01100100;\n\nassert_eq!(n.isolate_highest_one(), 0b_01000000);\nassert_eq!(0_u16.isolate_highest_one(), 0);\n```",
"id": 11142,
"inner": {
"function": {
@@ -93069,216 +91535,103 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "midpoint",
+ "name": "isolate_highest_one",
"span": {
"begin": [
- 1147,
+ 1084,
5
],
"end": [
- 1147,
- 42
+ 1105,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"11143": {
- "attrs": [],
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Returns `self` with only the least significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: u16 = 0b_01100100;\n\nassert_eq!(n.isolate_lowest_one(), 0b_00000100);\nassert_eq!(0_u16.isolate_lowest_one(), 0);\n```",
"id": 11143,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "primitive": "u32"
- },
+ "function": {
"generics": {
"params": [],
"where_predicates": []
},
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 11018,
- 6009,
- 11019,
- 11020,
- 11021,
- 11023,
- 11024,
- 11025,
- 11026,
- 11027,
- 11028,
- 11029,
- 11030,
- 11031,
- 11032,
- 11033,
- 11034,
- 11035,
- 11036,
- 11037,
- 11038,
- 11039,
- 11040,
- 11041,
- 11042,
- 11044,
- 11045,
- 11046,
- 11047,
- 11048,
- 11050,
- 11051,
- 11052,
- 11053,
- 11054,
- 11055,
- 11057,
- 11058,
- 11059,
- 11060,
- 11061,
- 11062,
- 11063,
- 11064,
- 11065,
- 11066,
- 11067,
- 11068,
- 11069,
- 11070,
- 11022,
- 11071,
- 11072,
- 11073,
- 11074,
- 11075,
- 11076,
- 11077,
- 11078,
- 11079,
- 11080,
- 11081,
- 11082,
- 11083,
- 11084,
- 11085,
- 11086,
- 11087,
- 11088,
- 11089,
- 11090,
- 11091,
- 11092,
- 11093,
- 11043,
- 11094,
- 11049,
- 11095,
- 11056,
- 11096,
- 11097,
- 11098,
- 11099,
- 11100,
- 11101,
- 11102,
- 11103,
- 11104,
- 10395,
- 11105,
- 11106,
- 10399,
- 11107,
- 11108,
- 11109,
- 11111,
- 11110,
- 11112,
- 11113,
- 11114,
- 11115,
- 11116,
- 11117,
- 11118,
- 11119,
- 11120,
- 11121,
- 11122,
- 11123,
- 11124,
- 11125,
- 11126,
- 11127,
- 11128,
- 11129,
- 11130,
- 11131,
- 11132,
- 11133,
- 11134,
- 11135,
- 11136,
- 11137,
- 11138,
- 11139,
- 11140,
- 11141,
- 11142
- ],
- "provided_trait_methods": [],
- "trait": null
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u16"
+ }
+ }
}
},
"links": {},
- "name": null,
+ "name": "isolate_lowest_one",
"span": {
"begin": [
- 1127,
- 1
+ 1084,
+ 5
],
"end": [
- 1127,
- 9
+ 1105,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"11144": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 82, patch: 0})}, feature: \"const_int_from_str\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from a string slice with digits in a given base.\n\nThe string is expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\nassert_eq!(u32::from_str_radix(\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\nassert!(u32::from_str_radix(\"1 \", 10).is_err());\n```",
+ "docs": "Returns the index of the highest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_u16.highest_one(), None);\nassert_eq!(0x1_u16.highest_one(), Some(0));\nassert_eq!(0x10_u16.highest_one(), Some(4));\nassert_eq!(0x1f_u16.highest_one(), Some(4));\n```",
"id": 11144,
"inner": {
"function": {
@@ -93296,21 +91649,9 @@
"sig": {
"inputs": [
[
- "src",
- {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "primitive": "str"
- }
- }
- }
- ],
- [
- "radix",
+ "self",
{
- "primitive": "u32"
+ "generic": "Self"
}
]
],
@@ -93324,37 +91665,28 @@
"type": {
"primitive": "u32"
}
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 4784,
- "path": "ParseIntError"
- }
- }
}
],
"constraints": []
}
},
- "id": 57,
- "path": "Result"
+ "id": 51,
+ "path": "Option"
}
}
}
}
},
"links": {},
- "name": "from_str_radix",
+ "name": "highest_one",
"span": {
"begin": [
- 1631,
- 1
+ 1084,
+ 5
],
"end": [
- 1631,
- 58
+ 1105,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -93363,12 +91695,17 @@
"11145": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from an ASCII-byte slice with decimal digits.\n\nThe characters are expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(u32::from_ascii(b\"+10\"), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(u32::from_ascii(b\"1 \").is_err());\n```",
+ "docs": "Returns the index of the lowest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_u16.lowest_one(), None);\nassert_eq!(0x1_u16.lowest_one(), Some(0));\nassert_eq!(0x10_u16.lowest_one(), Some(4));\nassert_eq!(0x1f_u16.lowest_one(), Some(0));\n```",
"id": 11145,
"inner": {
"function": {
@@ -93386,17 +91723,9 @@
"sig": {
"inputs": [
[
- "src",
+ "self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "slice": {
- "primitive": "u8"
- }
- }
- }
+ "generic": "Self"
}
]
],
@@ -93410,37 +91739,28 @@
"type": {
"primitive": "u32"
}
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 4784,
- "path": "ParseIntError"
- }
- }
}
],
"constraints": []
}
},
- "id": 57,
- "path": "Result"
+ "id": 51,
+ "path": "Option"
}
}
}
}
},
"links": {},
- "name": "from_ascii",
+ "name": "lowest_one",
"span": {
"begin": [
- 1631,
- 1
+ 1084,
+ 5
],
"end": [
- 1631,
- 58
+ 1105,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -93449,12 +91769,20 @@
"11146": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from an ASCII-byte slice with digits in a given base.\n\nThe characters are expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(u32::from_ascii_radix(b\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(u32::from_ascii_radix(b\"1 \", 10).is_err());\n```",
+ "docs": "Returns the bit pattern of `self` reinterpreted as a signed integer of the same size.\n\nThis produces the same result as an `as` cast, but ensures that the bit-width remains\nthe same.\n\n# Examples\n\n```\nlet n = u16::MAX;\n\nassert_eq!(n.cast_signed(), -1i16);\n```",
"id": 11146,
"inner": {
"function": {
@@ -93472,124 +91800,119 @@
"sig": {
"inputs": [
[
- "src",
- {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "slice": {
- "primitive": "u8"
- }
- }
- }
- }
- ],
- [
- "radix",
+ "self",
{
- "primitive": "u32"
+ "generic": "Self"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 4784,
- "path": "ParseIntError"
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 57,
- "path": "Result"
- }
+ "primitive": "i16"
}
}
}
},
"links": {},
- "name": "from_ascii_radix",
+ "name": "cast_signed",
"span": {
"begin": [
- 1631,
- 1
+ 1084,
+ 5
],
"end": [
- 1631,
- 58
+ 1105,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"11147": {
- "attrs": [],
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Shifts the bits to the left by a specified amount, `n`,\nwrapping the truncated bits to the end of the resulting integer.\n\nPlease note this isn't the same operation as the `<<` shifting operator!\n\n# Examples\n\n```\nlet n = 0xa003u16;\nlet m = 0x3a;\n\nassert_eq!(n.rotate_left(4), m);\n```",
"id": 11147,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "primitive": "u32"
- },
+ "function": {
"generics": {
"params": [],
"where_predicates": []
},
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 11144,
- 11145,
- 11146
- ],
- "provided_trait_methods": [],
- "trait": null
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "n",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u16"
+ }
+ }
}
},
"links": {},
- "name": null,
+ "name": "rotate_left",
"span": {
"begin": [
- 1631,
- 1
+ 1084,
+ 5
],
"end": [
- 1631,
- 58
+ 1105,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"11148": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 138215, is_soft: false}, feature: \"int_format_into\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Allows users to write an integer (in signed decimal format) into a variable `buf` of\ntype [`NumBuffer`] that is passed by the caller by mutable reference.\n\n# Examples\n\n```\n#![feature(int_format_into)]\nuse core::fmt::NumBuffer;\n\nlet n = 0u32;\nlet mut buf = NumBuffer::new();\nassert_eq!(n.format_into(&mut buf), \"0\");\n\nlet n1 = 32u32;\nassert_eq!(n1.format_into(&mut buf), \"32\");\n\nlet n2 = u32 :: MAX;\nassert_eq!(n2.format_into(&mut buf), u32 :: MAX.to_string());\n```",
+ "docs": "Shifts the bits to the right by a specified amount, `n`,\nwrapping the truncated bits to the beginning of the resulting\ninteger.\n\nPlease note this isn't the same operation as the `>>` shifting operator!\n\n# Examples\n\n```\nlet n = 0x3au16;\nlet m = 0xa003;\n\nassert_eq!(n.rotate_right(4), m);\n```",
"id": 11148,
"inner": {
"function": {
@@ -93601,7 +91924,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -93613,103 +91936,109 @@
}
],
[
- "buf",
+ "n",
{
- "borrowed_ref": {
- "is_mutable": true,
- "lifetime": null,
- "type": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 10162,
- "path": "NumBuffer"
- }
- }
- }
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "primitive": "str"
- }
- }
+ "primitive": "u16"
}
}
}
},
- "links": {
- "`NumBuffer`": 10162
- },
- "name": "format_into",
+ "links": {},
+ "name": "rotate_right",
"span": {
"begin": [
- 562,
+ 1084,
5
],
"end": [
- 562,
- 95
+ 1105,
+ 6
],
- "filename": "checkouts/rust/library/core/src/fmt/num.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"11149": {
- "attrs": [],
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 145686, is_soft: false}, feature: \"funnel_shifts\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145686, is_soft: false}, feature: \"funnel_shifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Performs a left funnel shift (concatenates `self` with `rhs`, with `self`\nmaking up the most significant half, then shifts the combined value left\nby `n`, and most significant half is extracted to produce the result).\n\nPlease note this isn't the same operation as the `<<` shifting operator or\n[`rotate_left`](Self::rotate_left), although `a.funnel_shl(a, n)` is *equivalent*\nto `a.rotate_left(n)`.\n\n# Panics\n\nIf `n` is greater than or equal to the number of bits in `self`\n\n# Examples\n\nBasic usage:\n\n```\n#![feature(funnel_shifts)]\nlet a = 0xa003u16;\nlet b = 0x2deu16;\nlet m = 0x30;\n\nassert_eq!(a.funnel_shl(b, 4), m);\n```",
"id": 11149,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "primitive": "u32"
- },
+ "function": {
"generics": {
"params": [],
"where_predicates": []
},
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 11148
- ],
- "provided_trait_methods": [],
- "trait": null
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u16"
+ }
+ ],
+ [
+ "n",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u16"
+ }
+ }
}
},
- "links": {},
- "name": null,
+ "links": {
+ "Self::rotate_left": 11147
+ },
+ "name": "funnel_shl",
"span": {
"begin": [
- 562,
+ 1084,
5
],
"end": [
- 562,
- 95
+ 1105,
+ 6
],
- "filename": "checkouts/rust/library/core/src/fmt/num.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"1115": {
"attrs": [],
@@ -93807,8 +92136,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -93824,7 +92153,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -93833,11 +92162,11 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -93847,30 +92176,73 @@
"11150": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 145686, is_soft: false}, feature: \"funnel_shifts\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145686, is_soft: false}, feature: \"funnel_shifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "The smallest value that can be represented by this integer type.\n\n# Examples\n\n```\nassert_eq!(u64::MIN, 0);\n```",
+ "docs": "Performs a right funnel shift (concatenates `self` and `rhs`, with `self`\nmaking up the most significant half, then shifts the combined value right\nby `n`, and least significant half is extracted to produce the result).\n\nPlease note this isn't the same operation as the `>>` shifting operator or\n[`rotate_right`](Self::rotate_right), although `a.funnel_shr(a, n)` is *equivalent*\nto `a.rotate_right(n)`.\n\n# Panics\n\nIf `n` is greater than or equal to the number of bits in `self`\n\n# Examples\n\nBasic usage:\n\n```\n#![feature(funnel_shifts)]\nlet a = 0xa003u16;\nlet b = 0x2deu16;\nlet m = 0x302d;\n\nassert_eq!(a.funnel_shr(b, 4), m);\n```",
"id": 11150,
"inner": {
- "assoc_const": {
- "type": {
- "primitive": "u64"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "value": "0"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u16"
+ }
+ ],
+ [
+ "n",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u16"
+ }
+ }
}
},
- "links": {},
- "name": "MIN",
+ "links": {
+ "Self::rotate_right": 11148
+ },
+ "name": "funnel_shr",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -93880,30 +92252,59 @@
"11151": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "The largest value that can be represented by this integer type\n(264 − 1).\n\n# Examples\n\n```\nassert_eq!(u64::MAX, 18446744073709551615);\n```",
+ "docs": "Reverses the byte order of the integer.\n\n# Examples\n\n```\nlet n = 0x1234u16;\nlet m = n.swap_bytes();\n\nassert_eq!(m, 0x3412);\n```",
"id": 11151,
"inner": {
- "assoc_const": {
- "type": {
- "primitive": "u64"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "value": "_"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u16"
+ }
+ }
}
},
"links": {},
- "name": "MAX",
+ "name": "swap_bytes",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -93913,30 +92314,59 @@
"11152": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 53, patch: 0})}, feature: \"int_bits_const\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "The size of this integer type in bits.\n\n# Examples\n\n```\nassert_eq!(u64::BITS, 64);\n```",
+ "docs": "Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\n second least-significant bit becomes second most-significant bit, etc.\n\n# Examples\n\n```\nlet n = 0x1234u16;\nlet m = n.reverse_bits();\n\nassert_eq!(m, 0x2c48);\nassert_eq!(0, 0u16.reverse_bits());\n```",
"id": 11152,
"inner": {
- "assoc_const": {
- "type": {
- "primitive": "u32"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "value": "_"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u16"
+ }
+ }
}
},
"links": {},
- "name": "BITS",
+ "name": "reverse_bits",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -93945,12 +92375,6 @@
},
"11153": {
"attrs": [
- {
- "other": "#[doc(alias = \"popcount\")]"
- },
- {
- "other": "#[doc(alias = \"popcnt\")]"
- },
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
@@ -93959,13 +92383,13 @@
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 0b01001100u64;\nassert_eq!(n.count_ones(), 3);\n\nlet max = u64::MAX;\nassert_eq!(max.count_ones(), 64);\n\nlet zero = 0u64;\nassert_eq!(zero.count_ones(), 0);\n```",
+ "docs": "Converts an integer from big endian to the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au16;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(u16::from_be(n), n)\n} else {\n assert_eq!(u16::from_be(n), n.swap_bytes())\n}\n```",
"id": 11153,
"inner": {
"function": {
@@ -93983,28 +92407,28 @@
"sig": {
"inputs": [
[
- "self",
+ "x",
{
- "generic": "Self"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "count_ones",
+ "name": "from_be",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -94021,13 +92445,13 @@
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of zeros in the binary representation of `self`.\n\n# Examples\n\n```\nlet zero = 0u64;\nassert_eq!(zero.count_zeros(), 64);\n\nlet max = u64::MAX;\nassert_eq!(max.count_zeros(), 0);\n```",
+ "docs": "Converts an integer from little endian to the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au16;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(u16::from_le(n), n)\n} else {\n assert_eq!(u16::from_le(n), n.swap_bytes())\n}\n```",
"id": 11154,
"inner": {
"function": {
@@ -94045,28 +92469,28 @@
"sig": {
"inputs": [
[
- "self",
+ "x",
{
- "generic": "Self"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "count_zeros",
+ "name": "from_le",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -94076,23 +92500,20 @@
"11155": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 2 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is zero.\n\n# Examples\n\n```\nassert_eq!(2u64.ilog2(), 1);\n```",
+ "docs": "Converts `self` to big endian from the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au16;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(n.to_be(), n)\n} else {\n assert_eq!(n.to_be(), n.swap_bytes())\n}\n```",
"id": 11155,
"inner": {
"function": {
@@ -94118,20 +92539,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "ilog2",
+ "name": "to_be",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -94154,7 +92575,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of leading zeros in the binary representation of `self`.\n\nDepending on what you're doing with the value, you might also be interested in the\n[`ilog2`] function which returns a consistent number, even if the type widens.\n\n# Examples\n\n```\nlet n = u64::MAX >> 2;\nassert_eq!(n.leading_zeros(), 2);\n\nlet zero = 0u64;\nassert_eq!(zero.leading_zeros(), 64);\n\nlet max = u64::MAX;\nassert_eq!(max.leading_zeros(), 0);\n```\n[`ilog2`]: u64::ilog2",
+ "docs": "Converts `self` to little endian from the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au16;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(n.to_le(), n)\n} else {\n assert_eq!(n.to_le(), n.swap_bytes())\n}\n```",
"id": 11156,
"inner": {
"function": {
@@ -94180,22 +92601,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u16"
}
}
}
},
- "links": {
- "u64::ilog2": 11155
- },
- "name": "leading_zeros",
+ "links": {},
+ "name": "to_le",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -94205,7 +92624,7 @@
"11157": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -94218,7 +92637,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of trailing zeros in the binary representation\nof `self`.\n\n# Examples\n\n```\nlet n = 0b0101000u64;\nassert_eq!(n.trailing_zeros(), 3);\n\nlet zero = 0u64;\nassert_eq!(zero.trailing_zeros(), 64);\n\nlet max = u64::MAX;\nassert_eq!(max.trailing_zeros(), 0);\n```",
+ "docs": "Checked integer addition. Computes `self + rhs`, returning `None`\nif overflow occurred.\n\n# Examples\n\n```\nassert_eq!((u16::MAX - 2).checked_add(1), Some(u16::MAX - 1));\nassert_eq!((u16::MAX - 2).checked_add(3), None);\n```",
"id": 11157,
"inner": {
"function": {
@@ -94240,24 +92659,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u16"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "trailing_zeros",
+ "name": "checked_add",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -94267,20 +92707,23 @@
"11158": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of leading ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = !(u64::MAX >> 2);\nassert_eq!(n.leading_ones(), 2);\n\nlet zero = 0u64;\nassert_eq!(zero.leading_ones(), 0);\n\nlet max = u64::MAX;\nassert_eq!(max.leading_ones(), 64);\n```",
+ "docs": "Strict integer addition. Computes `self + rhs`, panicking\nif overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((u16::MAX - 2).strict_add(1), u16::MAX - 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (u16::MAX - 2).strict_add(3);\n```",
"id": 11158,
"inner": {
"function": {
@@ -94302,24 +92745,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "leading_ones",
+ "name": "strict_add",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -94329,10 +92778,10 @@
"11159": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -94342,7 +92791,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of trailing ones in the binary representation\nof `self`.\n\n# Examples\n\n```\nlet n = 0b1010111u64;\nassert_eq!(n.trailing_ones(), 3);\n\nlet zero = 0u64;\nassert_eq!(zero.trailing_ones(), 0);\n\nlet max = u64::MAX;\nassert_eq!(max.trailing_ones(), 64);\n```",
+ "docs": "Wrapping (modular) addition. Computes `self + rhs`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(200u16.wrapping_add(55), 255);\nassert_eq!(200u16.wrapping_add(u16::MAX), 199);\n```",
"id": 11159,
"inner": {
"function": {
@@ -94364,24 +92813,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "trailing_ones",
+ "name": "wrapping_add",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -94466,12 +92921,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -94494,17 +92949,23 @@
"11160": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 142326, is_soft: false}, feature: \"uint_bit_width\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the minimum number of bits required to represent `self`.\n\nThis method returns zero if `self` is zero.\n\n# Examples\n\n```\n#![feature(uint_bit_width)]\n\nassert_eq!(0_u64.bit_width(), 0);\nassert_eq!(0b111_u64.bit_width(), 3);\nassert_eq!(0b1110_u64.bit_width(), 4);\nassert_eq!(u64::MAX.bit_width(), 64);\n```",
+ "docs": "Unchecked integer addition. Computes `self + rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_add(y)` is semantically equivalent to calling\n`x.`[`checked_add`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_add`].\n\n# Safety\n\nThis results in undefined behavior when\n`self + rhs > u16::MAX` or `self + rhs < u16::MIN`,\ni.e. when [`checked_add`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_add`]: u16::checked_add\n[`wrapping_add`]: u16::wrapping_add",
"id": 11160,
"inner": {
"function": {
@@ -94517,7 +92978,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -94526,24 +92987,33 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u16"
}
}
}
},
- "links": {},
- "name": "bit_width",
+ "links": {
+ "u16::checked_add": 11157,
+ "u16::wrapping_add": 11159
+ },
+ "name": "unchecked_add",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -94553,7 +93023,10 @@
"11161": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -94563,7 +93036,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `self` with only the most significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: u64 = 0b_01100100;\n\nassert_eq!(n.isolate_highest_one(), 0b_01000000);\nassert_eq!(0_u64.isolate_highest_one(), 0);\n```",
+ "docs": "Checked addition with a signed integer. Computes `self + rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1u16.checked_add_signed(2), Some(3));\nassert_eq!(1u16.checked_add_signed(-2), None);\nassert_eq!((u16::MAX - 2).checked_add_signed(3), None);\n```",
"id": 11161,
"inner": {
"function": {
@@ -94585,24 +93058,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u16"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "isolate_highest_one",
+ "name": "checked_add_signed",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -94612,17 +93106,23 @@
"11162": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `self` with only the least significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: u64 = 0b_01100100;\n\nassert_eq!(n.isolate_lowest_one(), 0b_00000100);\nassert_eq!(0_u64.isolate_lowest_one(), 0);\n```",
+ "docs": "Strict addition with a signed integer. Computes `self + rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1u16.strict_add_signed(2), 3);\n```\n\nThe following panic because of overflow:\n\n```should_panic\nlet _ = 1u16.strict_add_signed(-2);\n```\n\n```should_panic\nlet _ = (u16::MAX - 2).strict_add_signed(3);\n```",
"id": 11162,
"inner": {
"function": {
@@ -94644,24 +93144,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "isolate_lowest_one",
+ "name": "strict_add_signed",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -94671,7 +93177,10 @@
"11163": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -94681,7 +93190,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the index of the highest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_u64.highest_one(), None);\nassert_eq!(0x1_u64.highest_one(), Some(0));\nassert_eq!(0x10_u64.highest_one(), Some(4));\nassert_eq!(0x1f_u64.highest_one(), Some(4));\n```",
+ "docs": "Checked integer subtraction. Computes `self - rhs`, returning\n`None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1u16.checked_sub(1), Some(0));\nassert_eq!(0u16.checked_sub(1), None);\n```",
"id": 11163,
"inner": {
"function": {
@@ -94703,6 +93212,12 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u16"
+ }
]
],
"is_c_variadic": false,
@@ -94713,7 +93228,7 @@
"args": [
{
"type": {
- "primitive": "u32"
+ "primitive": "u16"
}
}
],
@@ -94728,14 +93243,14 @@
}
},
"links": {},
- "name": "highest_one",
+ "name": "checked_sub",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -94745,17 +93260,23 @@
"11164": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the index of the lowest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_u64.lowest_one(), None);\nassert_eq!(0x1_u64.lowest_one(), Some(0));\nassert_eq!(0x10_u64.lowest_one(), Some(4));\nassert_eq!(0x1f_u64.lowest_one(), Some(0));\n```",
+ "docs": "Strict integer subtraction. Computes `self - rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1u16.strict_sub(1), 0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0u16.strict_sub(1);\n```",
"id": 11164,
"inner": {
"function": {
@@ -94777,39 +93298,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "lowest_one",
+ "name": "strict_sub",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -94819,10 +93331,10 @@
"11165": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -94832,7 +93344,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the bit pattern of `self` reinterpreted as a signed integer of the same size.\n\nThis produces the same result as an `as` cast, but ensures that the bit-width remains\nthe same.\n\n# Examples\n\n```\nlet n = u64::MAX;\n\nassert_eq!(n.cast_signed(), -1i64);\n```",
+ "docs": "Wrapping (modular) subtraction. Computes `self - rhs`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(100u16.wrapping_sub(100), 0);\nassert_eq!(100u16.wrapping_sub(u16::MAX), 101);\n```",
"id": 11165,
"inner": {
"function": {
@@ -94854,24 +93366,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i64"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "cast_signed",
+ "name": "wrapping_sub",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -94881,20 +93399,23 @@
"11166": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts the bits to the left by a specified amount, `n`,\nwrapping the truncated bits to the end of the resulting integer.\n\nPlease note this isn't the same operation as the `<<` shifting operator!\n\n# Examples\n\n```\nlet n = 0xaa00000000006e1u64;\nlet m = 0x6e10aa;\n\nassert_eq!(n.rotate_left(12), m);\n```",
+ "docs": "Unchecked integer subtraction. Computes `self - rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_sub(y)` is semantically equivalent to calling\n`x.`[`checked_sub`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_sub`].\n\nIf you find yourself writing code like this:\n\n```\n# let foo = 30_u32;\n# let bar = 20;\nif foo >= bar {\n // SAFETY: just checked it will not overflow\n let diff = unsafe { foo.unchecked_sub(bar) };\n // ... use diff ...\n}\n```\n\nConsider changing it to\n\n```\n# let foo = 30_u32;\n# let bar = 20;\nif let Some(diff) = foo.checked_sub(bar) {\n // ... use diff ...\n}\n```\n\nAs that does exactly the same thing -- including telling the optimizer\nthat the subtraction cannot overflow -- but avoids needing `unsafe`.\n\n# Safety\n\nThis results in undefined behavior when\n`self - rhs > u16::MAX` or `self - rhs < u16::MIN`,\ni.e. when [`checked_sub`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_sub`]: u16::checked_sub\n[`wrapping_sub`]: u16::wrapping_sub",
"id": 11166,
"inner": {
"function": {
@@ -94907,7 +93428,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -94918,28 +93439,31 @@
}
],
[
- "n",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
- "links": {},
- "name": "rotate_left",
+ "links": {
+ "u16::checked_sub": 11163,
+ "u16::wrapping_sub": 11165
+ },
+ "name": "unchecked_sub",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -94949,10 +93473,10 @@
"11167": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
},
{
"must_use": {
@@ -94962,7 +93486,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts the bits to the right by a specified amount, `n`,\nwrapping the truncated bits to the beginning of the resulting\ninteger.\n\nPlease note this isn't the same operation as the `>>` shifting operator!\n\n# Examples\n\n```\nlet n = 0x6e10aau64;\nlet m = 0xaa00000000006e1;\n\nassert_eq!(n.rotate_right(12), m);\n```",
+ "docs": "Checked subtraction with a signed integer. Computes `self - rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1u16.checked_sub_signed(2), None);\nassert_eq!(1u16.checked_sub_signed(-2), Some(3));\nassert_eq!((u16::MAX - 2).checked_sub_signed(-4), None);\n```",
"id": 11167,
"inner": {
"function": {
@@ -94986,28 +93510,43 @@
}
],
[
- "n",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u16"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "rotate_right",
+ "name": "checked_sub_signed",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -95017,20 +93556,23 @@
"11168": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Reverses the byte order of the integer.\n\n# Examples\n\n```\nlet n = 0x1234567890123456u64;\nlet m = n.swap_bytes();\n\nassert_eq!(m, 0x5634129078563412);\n```",
+ "docs": "Strict subtraction with a signed integer. Computes `self - rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(3u16.strict_sub_signed(2), 1);\n```\n\nThe following panic because of overflow:\n\n```should_panic\nlet _ = 1u16.strict_sub_signed(2);\n```\n\n```should_panic\nlet _ = (u16::MAX).strict_sub_signed(-1);\n```",
"id": 11168,
"inner": {
"function": {
@@ -95052,24 +93594,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "swap_bytes",
+ "name": "strict_sub_signed",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -95079,20 +93627,15 @@
"11169": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_signed_diff\", promotable: false}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_signed_diff\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\n second least-significant bit becomes second most-significant bit, etc.\n\n# Examples\n\n```\nlet n = 0x1234567890123456u64;\nlet m = n.reverse_bits();\n\nassert_eq!(m, 0x6a2c48091e6a2c48);\nassert_eq!(0, 0u64.reverse_bits());\n```",
+ "docs": "Checked integer subtraction. Computes `self - rhs` and checks if the result fits into an [`i16`], returning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(10u16.checked_signed_diff(2), Some(8));\nassert_eq!(2u16.checked_signed_diff(10), Some(-8));\nassert_eq!(u16::MAX.checked_signed_diff(i16::MAX as u16), None);\nassert_eq!((i16::MAX as u16).checked_signed_diff(u16::MAX), Some(i16::MIN));\nassert_eq!((i16::MAX as u16 + 1).checked_signed_diff(0), None);\nassert_eq!(u16::MAX.checked_signed_diff(u16::MAX), Some(0));\n```",
"id": 11169,
"inner": {
"function": {
@@ -95114,24 +93657,47 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i16"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
- "links": {},
- "name": "reverse_bits",
+ "links": {
+ "`i16`": 4818
+ },
+ "name": "checked_signed_diff",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -95243,20 +93809,20 @@
"11170": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts an integer from big endian to the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au64;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(u64::from_be(n), n)\n} else {\n assert_eq!(u64::from_be(n), n.swap_bytes())\n}\n```",
+ "docs": "Checked integer multiplication. Computes `self * rhs`, returning\n`None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(5u16.checked_mul(1), Some(5));\nassert_eq!(u16::MAX.checked_mul(2), None);\n```",
"id": 11170,
"inner": {
"function": {
@@ -95274,28 +93840,49 @@
"sig": {
"inputs": [
[
- "x",
+ "self",
{
- "primitive": "u64"
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u16"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "from_be",
+ "name": "checked_mul",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -95305,20 +93892,23 @@
"11171": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts an integer from little endian to the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au64;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(u64::from_le(n), n)\n} else {\n assert_eq!(u64::from_le(n), n.swap_bytes())\n}\n```",
+ "docs": "Strict integer multiplication. Computes `self * rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(5u16.strict_mul(1), 5);\n```\n\nThe following panics because of overflow:\n\n``` should_panic\nlet _ = u16::MAX.strict_mul(2);\n```",
"id": 11171,
"inner": {
"function": {
@@ -95336,28 +93926,34 @@
"sig": {
"inputs": [
[
- "x",
+ "self",
{
- "primitive": "u64"
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "from_le",
+ "name": "strict_mul",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -95367,7 +93963,7 @@
"11172": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -95380,7 +93976,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts `self` to big endian from the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au64;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(n.to_be(), n)\n} else {\n assert_eq!(n.to_be(), n.swap_bytes())\n}\n```",
+ "docs": "Wrapping (modular) multiplication. Computes `self *\nrhs`, wrapping around at the boundary of the type.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u8` is used.\n\n```\nassert_eq!(10u8.wrapping_mul(12), 120);\nassert_eq!(25u8.wrapping_mul(12), 44);\n```",
"id": 11172,
"inner": {
"function": {
@@ -95402,24 +93998,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "to_be",
+ "name": "wrapping_mul",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -95429,20 +94031,23 @@
"11173": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts `self` to little endian from the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au64;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(n.to_le(), n)\n} else {\n assert_eq!(n.to_le(), n.swap_bytes())\n}\n```",
+ "docs": "Unchecked integer multiplication. Computes `self * rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_mul(y)` is semantically equivalent to calling\n`x.`[`checked_mul`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_mul`].\n\n# Safety\n\nThis results in undefined behavior when\n`self * rhs > u16::MAX` or `self * rhs < u16::MIN`,\ni.e. when [`checked_mul`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_mul`]: u16::checked_mul\n[`wrapping_mul`]: u16::wrapping_mul",
"id": 11173,
"inner": {
"function": {
@@ -95455,7 +94060,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -95464,24 +94069,33 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
- "links": {},
- "name": "to_le",
+ "links": {
+ "u16::checked_mul": 11170,
+ "u16::wrapping_mul": 11172
+ },
+ "name": "unchecked_mul",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -95491,7 +94105,7 @@
"11174": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -95504,7 +94118,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer addition. Computes `self + rhs`, returning `None`\nif overflow occurred.\n\n# Examples\n\n```\nassert_eq!((u64::MAX - 2).checked_add(1), Some(u64::MAX - 1));\nassert_eq!((u64::MAX - 2).checked_add(3), None);\n```",
+ "docs": "Checked integer division. Computes `self / rhs`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(128u16.checked_div(2), Some(64));\nassert_eq!(1u16.checked_div(0), None);\n```",
"id": 11174,
"inner": {
"function": {
@@ -95530,7 +94144,7 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u16"
}
]
],
@@ -95542,7 +94156,7 @@
"args": [
{
"type": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
],
@@ -95557,14 +94171,14 @@
}
},
"links": {},
- "name": "checked_add",
+ "name": "checked_div",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -95574,10 +94188,10 @@
"11175": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -95590,7 +94204,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer addition. Computes `self + rhs`, panicking\nif overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((u64::MAX - 2).strict_add(1), u64::MAX - 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (u64::MAX - 2).strict_add(3);\n```",
+ "docs": "Strict integer division. Computes `self / rhs`.\n\nStrict division on unsigned types is just normal division. There's no\nway overflow could ever happen. This function exists so that all\noperations are accounted for in the strict operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u16.strict_div(10), 10);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1u16).strict_div(0);\n```",
"id": 11175,
"inner": {
"function": {
@@ -95616,26 +94230,26 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "strict_add",
+ "name": "strict_div",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -95645,10 +94259,10 @@
"11176": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -95658,7 +94272,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) addition. Computes `self + rhs`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(200u64.wrapping_add(55), 255);\nassert_eq!(200u64.wrapping_add(u64::MAX), 199);\n```",
+ "docs": "Checked Euclidean division. Computes `self.div_euclid(rhs)`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(128u16.checked_div_euclid(2), Some(64));\nassert_eq!(1u16.checked_div_euclid(0), None);\n```",
"id": 11176,
"inner": {
"function": {
@@ -95684,26 +94298,41 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u16"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "wrapping_add",
+ "name": "checked_div_euclid",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -95713,10 +94342,10 @@
"11177": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -95729,7 +94358,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer addition. Computes `self + rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_add(y)` is semantically equivalent to calling\n`x.`[`checked_add`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_add`].\n\n# Safety\n\nThis results in undefined behavior when\n`self + rhs > u64::MAX` or `self + rhs < u64::MIN`,\ni.e. when [`checked_add`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_add`]: u64::checked_add\n[`wrapping_add`]: u64::wrapping_add",
+ "docs": "Strict Euclidean division. Computes `self.div_euclid(rhs)`.\n\nStrict division on unsigned types is just normal division. There's no\nway overflow could ever happen. This function exists so that all\noperations are accounted for in the strict operations. Since, for the\npositive integers, all common definitions of division are equal, this\nis exactly equal to `self.strict_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u16.strict_div_euclid(10), 10);\n```\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1u16).strict_div_euclid(0);\n```",
"id": 11177,
"inner": {
"function": {
@@ -95742,7 +94371,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -95755,29 +94384,26 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
- "links": {
- "u64::checked_add": 11174,
- "u64::wrapping_add": 11176
- },
- "name": "unchecked_add",
+ "links": {},
+ "name": "strict_div_euclid",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -95787,10 +94413,7 @@
"11178": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
},
{
"must_use": {
@@ -95800,7 +94423,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked addition with a signed integer. Computes `self + rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1u64.checked_add_signed(2), Some(3));\nassert_eq!(1u64.checked_add_signed(-2), None);\nassert_eq!((u64::MAX - 2).checked_add_signed(3), None);\n```",
+ "docs": "Checked integer division without remainder. Computes `self / rhs`,\nreturning `None` if `rhs == 0` or if `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64u16.checked_exact_div(2), Some(32));\nassert_eq!(64u16.checked_exact_div(32), Some(2));\nassert_eq!(64u16.checked_exact_div(0), None);\nassert_eq!(65u16.checked_exact_div(2), None);\n```",
"id": 11178,
"inner": {
"function": {
@@ -95826,7 +94449,7 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "u16"
}
]
],
@@ -95838,7 +94461,7 @@
"args": [
{
"type": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
],
@@ -95853,14 +94476,14 @@
}
},
"links": {},
- "name": "checked_add_signed",
+ "name": "checked_exact_div",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -95870,23 +94493,17 @@
"11179": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict addition with a signed integer. Computes `self + rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1u64.strict_add_signed(2), 3);\n```\n\nThe following panic because of overflow:\n\n```should_panic\nlet _ = 1u64.strict_add_signed(-2);\n```\n\n```should_panic\nlet _ = (u64::MAX - 2).strict_add_signed(3);\n```",
+ "docs": "Checked integer division without remainder. Computes `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs == 0` or `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64u16.exact_div(2), 32);\nassert_eq!(64u16.exact_div(32), 2);\n```\n\n```should_panic\n#![feature(exact_div)]\nlet _ = 65u16.exact_div(2);\n```",
"id": 11179,
"inner": {
"function": {
@@ -95912,26 +94529,26 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "strict_add_signed",
+ "name": "exact_div",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -95988,10 +94605,7 @@
"11180": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
},
{
"must_use": {
@@ -96001,7 +94615,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer subtraction. Computes `self - rhs`, returning\n`None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1u64.checked_sub(1), Some(0));\nassert_eq!(0u64.checked_sub(1), None);\n```",
+ "docs": "Unchecked integer division without remainder. Computes `self / rhs`.\n\n# Safety\n\nThis results in undefined behavior when `rhs == 0` or `self % rhs != 0`,\ni.e. when [`checked_exact_div`](Self::checked_exact_div) would return `None`.",
"id": 11180,
"inner": {
"function": {
@@ -96014,7 +94628,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -96027,41 +94641,28 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u64"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u16"
}
}
}
},
- "links": {},
- "name": "checked_sub",
+ "links": {
+ "Self::checked_exact_div": 11178
+ },
+ "name": "unchecked_exact_div",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -96071,23 +94672,20 @@
"11181": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer subtraction. Computes `self - rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1u64.strict_sub(1), 0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0u64.strict_sub(1);\n```",
+ "docs": "Checked integer remainder. Computes `self % rhs`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(5u16.checked_rem(2), Some(1));\nassert_eq!(5u16.checked_rem(0), None);\n```",
"id": 11181,
"inner": {
"function": {
@@ -96113,26 +94711,41 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u16"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "strict_sub",
+ "name": "checked_rem",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -96142,20 +94755,23 @@
"11182": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) subtraction. Computes `self - rhs`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(100u64.wrapping_sub(100), 0);\nassert_eq!(100u64.wrapping_sub(u64::MAX), 101);\n```",
+ "docs": "Strict integer remainder. Computes `self % rhs`.\n\nStrict remainder calculation on unsigned types is just the regular\nremainder calculation. There's no way overflow could ever happen.\nThis function exists so that all operations are accounted for in the\nstrict operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u16.strict_rem(10), 0);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5u16.strict_rem(0);\n```",
"id": 11182,
"inner": {
"function": {
@@ -96181,26 +94797,26 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "wrapping_sub",
+ "name": "strict_rem",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -96210,95 +94826,21 @@
"11183": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer subtraction. Computes `self - rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_sub(y)` is semantically equivalent to calling\n`x.`[`checked_sub`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_sub`].\n\nIf you find yourself writing code like this:\n\n```\n# let foo = 30_u32;\n# let bar = 20;\nif foo >= bar {\n // SAFETY: just checked it will not overflow\n let diff = unsafe { foo.unchecked_sub(bar) };\n // ... use diff ...\n}\n```\n\nConsider changing it to\n\n```\n# let foo = 30_u32;\n# let bar = 20;\nif let Some(diff) = foo.checked_sub(bar) {\n // ... use diff ...\n}\n```\n\nAs that does exactly the same thing -- including telling the optimizer\nthat the subtraction cannot overflow -- but avoids needing `unsafe`.\n\n# Safety\n\nThis results in undefined behavior when\n`self - rhs > u64::MAX` or `self - rhs < u64::MIN`,\ni.e. when [`checked_sub`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_sub`]: u64::checked_sub\n[`wrapping_sub`]: u64::wrapping_sub",
+ "docs": "Checked Euclidean modulo. Computes `self.rem_euclid(rhs)`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(5u16.checked_rem_euclid(2), Some(1));\nassert_eq!(5u16.checked_rem_euclid(0), None);\n```",
"id": 11183,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": true
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u64"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "u64"
- }
- }
- }
- },
- "links": {
- "u64::checked_sub": 11180,
- "u64::wrapping_sub": 11182
- },
- "name": "unchecked_sub",
- "span": {
- "begin": [
- 1151,
- 5
- ],
- "end": [
- 1169,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "11184": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Checked subtraction with a signed integer. Computes `self - rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1u64.checked_sub_signed(2), None);\nassert_eq!(1u64.checked_sub_signed(-2), Some(3));\nassert_eq!((u64::MAX - 2).checked_sub_signed(-4), None);\n```",
- "id": 11184,
"inner": {
"function": {
"generics": {
@@ -96323,7 +94865,7 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "u16"
}
]
],
@@ -96335,7 +94877,7 @@
"args": [
{
"type": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
],
@@ -96350,27 +94892,27 @@
}
},
"links": {},
- "name": "checked_sub_signed",
+ "name": "checked_rem_euclid",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11185": {
+ "11184": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -96383,8 +94925,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict subtraction with a signed integer. Computes `self - rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(3u64.strict_sub_signed(2), 1);\n```\n\nThe following panic because of overflow:\n\n```should_panic\nlet _ = 1u64.strict_sub_signed(2);\n```\n\n```should_panic\nlet _ = (u64::MAX).strict_sub_signed(-1);\n```",
- "id": 11185,
+ "docs": "Strict Euclidean modulo. Computes `self.rem_euclid(rhs)`.\n\nStrict modulo calculation on unsigned types is just the regular\nremainder calculation. There's no way overflow could ever happen.\nThis function exists so that all operations are accounted for in the\nstrict operations. Since, for the positive integers, all common\ndefinitions of division are equal, this is exactly equal to\n`self.strict_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u16.strict_rem_euclid(10), 0);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5u16.strict_rem_euclid(0);\n```",
+ "id": 11184,
"inner": {
"function": {
"generics": {
@@ -96409,45 +94951,45 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "strict_sub_signed",
+ "name": "strict_rem_euclid",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11186": {
+ "11185": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"unsigned_signed_diff\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 135758, is_soft: false}, feature: \"disjoint_bitor\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"unsigned_signed_diff\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 135758, is_soft: false}, feature: \"disjoint_bitor\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer subtraction. Computes `self - rhs` and checks if the result fits into an [`i64`], returning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(10u64.checked_signed_diff(2), Some(8));\nassert_eq!(2u64.checked_signed_diff(10), Some(-8));\nassert_eq!(u64::MAX.checked_signed_diff(i64::MAX as u64), None);\nassert_eq!((i64::MAX as u64).checked_signed_diff(u64::MAX), Some(i64::MIN));\nassert_eq!((i64::MAX as u64 + 1).checked_signed_diff(0), None);\nassert_eq!(u64::MAX.checked_signed_diff(u64::MAX), Some(0));\n```",
- "id": 11186,
+ "docs": "Same value as `self | other`, but UB if any bit position is set in both inputs.\n\nThis is a situational micro-optimization for places where you'd rather\nuse addition on some platforms and bitwise or on other platforms, based\non exactly which instructions combine better with whatever else you're\ndoing. Note that there's no reason to bother using this for places\nwhere it's clear from the operations involved that they can't overlap.\nFor example, if you're combining `u16`s into a `u32` with\n`((a as u32) << 16) | (b as u32)`, that's fine, as the backend will\nknow those sides of the `|` are disjoint without needing help.\n\n# Examples\n\n```\n#![feature(disjoint_bitor)]\n\n// SAFETY: `1` and `4` have no bits in common.\nunsafe {\n assert_eq!(1_u16.unchecked_disjoint_bitor(4), 5);\n}\n```\n\n# Safety\n\nRequires that `(self & other) == 0`, otherwise it's immediate UB.\n\nEquivalently, requires that `(self | other) == (self + other)`.",
+ "id": 11185,
"inner": {
"function": {
"generics": {
@@ -96459,7 +95001,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -96470,69 +95012,55 @@
}
],
[
- "rhs",
+ "other",
{
- "primitive": "u64"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i64"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u16"
}
}
}
},
- "links": {
- "`i64`": 4822
- },
- "name": "checked_signed_diff",
+ "links": {},
+ "name": "unchecked_disjoint_bitor",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11187": {
+ "11186": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer multiplication. Computes `self * rhs`, returning\n`None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(5u64.checked_mul(1), Some(5));\nassert_eq!(u64::MAX.checked_mul(2), None);\n```",
- "id": 11187,
+ "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nThis method might not be optimized owing to implementation details;\n`ilog2` can produce results more efficiently for base 2, and `ilog10`\ncan produce results more efficiently for base 10.\n\n# Panics\n\nThis function will panic if `self` is zero, or if `base` is less than 2.\n\n# Examples\n\n```\nassert_eq!(5u16.ilog(5), 1);\n```",
+ "id": 11186,
"inner": {
"function": {
"generics": {
@@ -96555,56 +95083,41 @@
}
],
[
- "rhs",
+ "base",
{
- "primitive": "u64"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u64"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "checked_mul",
+ "name": "ilog",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11188": {
+ "11187": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
@@ -96617,7 +95130,69 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer multiplication. Computes `self * rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(5u64.strict_mul(1), 5);\n```\n\nThe following panics because of overflow:\n\n``` should_panic\nlet _ = u64::MAX.strict_mul(2);\n```",
+ "docs": "Returns the base 10 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is zero.\n\n# Example\n\n```\nassert_eq!(10u16.ilog10(), 1);\n```",
+ "id": 11187,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u32"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "ilog10",
+ "span": {
+ "begin": [
+ 1084,
+ 5
+ ],
+ "end": [
+ 1105,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11188": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nReturns `None` if the number is zero, or if the base is not at least 2.\n\nThis method might not be optimized owing to implementation details;\n`checked_ilog2` can produce results more efficiently for base 2, and\n`checked_ilog10` can produce results more efficiently for base 10.\n\n# Examples\n\n```\nassert_eq!(5u16.checked_ilog(5), Some(1));\n```",
"id": 11188,
"inner": {
"function": {
@@ -96641,28 +95216,43 @@
}
],
[
- "rhs",
+ "base",
{
- "primitive": "u64"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "strict_mul",
+ "name": "checked_ilog",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -96672,10 +95262,10 @@
"11189": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
@@ -96685,7 +95275,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) multiplication. Computes `self *\nrhs`, wrapping around at the boundary of the type.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u8` is used.\n\n```\nassert_eq!(10u8.wrapping_mul(12), 120);\nassert_eq!(25u8.wrapping_mul(12), 44);\n```",
+ "docs": "Returns the base 2 logarithm of the number, rounded down.\n\nReturns `None` if the number is zero.\n\n# Examples\n\n```\nassert_eq!(2u16.checked_ilog2(), Some(1));\n```",
"id": 11189,
"inner": {
"function": {
@@ -96707,30 +95297,39 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u64"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "wrapping_mul",
+ "name": "checked_ilog2",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -96807,7 +95406,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 109,
+ "id": 107,
"path": "Default"
}
}
@@ -96830,23 +95429,20 @@
"11190": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer multiplication. Computes `self * rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_mul(y)` is semantically equivalent to calling\n`x.`[`checked_mul`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_mul`].\n\n# Safety\n\nThis results in undefined behavior when\n`self * rhs > u64::MAX` or `self * rhs < u64::MIN`,\ni.e. when [`checked_mul`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_mul`]: u64::checked_mul\n[`wrapping_mul`]: u64::wrapping_mul",
+ "docs": "Returns the base 10 logarithm of the number, rounded down.\n\nReturns `None` if the number is zero.\n\n# Examples\n\n```\nassert_eq!(10u16.checked_ilog10(), Some(1));\n```",
"id": 11190,
"inner": {
"function": {
@@ -96859,7 +95455,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -96868,33 +95464,39 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u64"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
- "links": {
- "u64::checked_mul": 11187,
- "u64::wrapping_mul": 11189
- },
- "name": "unchecked_mul",
+ "links": {},
+ "name": "checked_ilog10",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -96904,10 +95506,10 @@
"11191": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -96917,7 +95519,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division. Computes `self / rhs`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(128u64.checked_div(2), Some(64));\nassert_eq!(1u64.checked_div(0), None);\n```",
+ "docs": "Checked negation. Computes `-self`, returning `None` unless `self ==\n0`.\n\nNote that negating any positive integer will overflow.\n\n# Examples\n\n```\nassert_eq!(0u16.checked_neg(), Some(0));\nassert_eq!(1u16.checked_neg(), None);\n```",
"id": 11191,
"inner": {
"function": {
@@ -96939,12 +95541,6 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u64"
- }
]
],
"is_c_variadic": false,
@@ -96955,7 +95551,7 @@
"args": [
{
"type": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
],
@@ -96970,14 +95566,14 @@
}
},
"links": {},
- "name": "checked_div",
+ "name": "checked_neg",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -96987,10 +95583,10 @@
"11192": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -97003,7 +95599,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer division. Computes `self / rhs`.\n\nStrict division on unsigned types is just normal division. There's no\nway overflow could ever happen. This function exists so that all\noperations are accounted for in the strict operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u64.strict_div(10), 10);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1u64).strict_div(0);\n```",
+ "docs": "Strict negation. Computes `-self`, panicking unless `self ==\n0`.\n\nNote that negating any positive integer will overflow.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0u16.strict_neg(), 0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 1u16.strict_neg();\n```",
"id": 11192,
"inner": {
"function": {
@@ -97025,30 +95621,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u64"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "strict_div",
+ "name": "strict_neg",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -97058,10 +95648,10 @@
"11193": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -97071,7 +95661,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked Euclidean division. Computes `self.div_euclid(rhs)`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(128u64.checked_div_euclid(2), Some(64));\nassert_eq!(1u64.checked_div_euclid(0), None);\n```",
+ "docs": "Checked shift left. Computes `self << rhs`, returning `None`\nif `rhs` is larger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x1u16.checked_shl(4), Some(0x10));\nassert_eq!(0x10u16.checked_shl(129), None);\nassert_eq!(0x10u16.checked_shl(15), Some(0));\n```",
"id": 11193,
"inner": {
"function": {
@@ -97097,7 +95687,7 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u32"
}
]
],
@@ -97109,7 +95699,7 @@
"args": [
{
"type": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
],
@@ -97124,14 +95714,14 @@
}
},
"links": {},
- "name": "checked_div_euclid",
+ "name": "checked_shl",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -97141,10 +95731,10 @@
"11194": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -97157,7 +95747,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict Euclidean division. Computes `self.div_euclid(rhs)`.\n\nStrict division on unsigned types is just normal division. There's no\nway overflow could ever happen. This function exists so that all\noperations are accounted for in the strict operations. Since, for the\npositive integers, all common definitions of division are equal, this\nis exactly equal to `self.strict_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u64.strict_div_euclid(10), 10);\n```\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1u64).strict_div_euclid(0);\n```",
+ "docs": "Strict shift left. Computes `self << rhs`, panicking if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x1u16.strict_shl(4), 0x10);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10u16.strict_shl(129);\n```",
"id": 11194,
"inner": {
"function": {
@@ -97183,26 +95773,26 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "strict_div_euclid",
+ "name": "strict_shl",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -97212,17 +95802,20 @@
"11195": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division without remainder. Computes `self / rhs`,\nreturning `None` if `rhs == 0` or if `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64u64.checked_exact_div(2), Some(32));\nassert_eq!(64u64.checked_exact_div(32), Some(2));\nassert_eq!(64u64.checked_exact_div(0), None);\nassert_eq!(65u64.checked_exact_div(2), None);\n```",
+ "docs": "Unchecked shift left. Computes `self << rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shl`] would return `None`.\n\n[`checked_shl`]: u16::checked_shl",
"id": 11195,
"inner": {
"function": {
@@ -97235,7 +95828,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -97248,41 +95841,28 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u64"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u16"
}
}
}
},
- "links": {},
- "name": "checked_exact_div",
+ "links": {
+ "u16::checked_shl": 11193
+ },
+ "name": "unchecked_shl",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -97292,7 +95872,10 @@
"11196": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
},
{
"must_use": {
@@ -97302,7 +95885,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division without remainder. Computes `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs == 0` or `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64u64.exact_div(2), 32);\nassert_eq!(64u64.exact_div(32), 2);\n```\n\n```should_panic\n#![feature(exact_div)]\nlet _ = 65u64.exact_div(2);\n```",
+ "docs": "Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x1u16.unbounded_shl(4), 0x10);\nassert_eq!(0x1u16.unbounded_shl(129), 0);\n```",
"id": 11196,
"inner": {
"function": {
@@ -97328,26 +95911,26 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "exact_div",
+ "name": "unbounded_shl",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -97357,7 +95940,7 @@
"11197": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
@@ -97367,7 +95950,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer division without remainder. Computes `self / rhs`.\n\n# Safety\n\nThis results in undefined behavior when `rhs == 0` or `self % rhs != 0`,\ni.e. when [`checked_exact_div`](Self::checked_exact_div) would return `None`.",
+ "docs": "Exact shift left. Computes `self << rhs` as long as it can be reversed losslessly.\n\nReturns `None` if any non-zero bits would be shifted out or if `rhs` >=\n`u16::BITS`.\nOtherwise, returns `Some(self << rhs)`.\n\n# Examples\n\n```\n#![feature(exact_bitshifts)]\n\nassert_eq!(0x1u16.exact_shl(4), Some(0x10));\nassert_eq!(0x1u16.exact_shl(129), None);\n```",
"id": 11197,
"inner": {
"function": {
@@ -97380,7 +95963,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -97393,28 +95976,41 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u16"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
- "links": {
- "Self::checked_exact_div": 11195
- },
- "name": "unchecked_exact_div",
+ "links": {},
+ "name": "exact_shl",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -97424,10 +96020,7 @@
"11198": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
@@ -97437,7 +96030,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer remainder. Computes `self % rhs`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(5u64.checked_rem(2), Some(1));\nassert_eq!(5u64.checked_rem(0), None);\n```",
+ "docs": "Unchecked exact shift left. Computes `self << rhs`, assuming the operation can be\nlosslessly reversed `rhs` cannot be larger than\n`u16::BITS`.\n\n# Safety\n\nThis results in undefined behavior when `rhs > self.leading_zeros() || rhs >=\nu16::BITS`\ni.e. when\n[`u16::exact_shl`]\nwould return `None`.",
"id": 11198,
"inner": {
"function": {
@@ -97450,7 +96043,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -97463,41 +96056,28 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u64"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u16"
}
}
}
},
- "links": {},
- "name": "checked_rem",
+ "links": {
+ "`u16::exact_shl`": 11197
+ },
+ "name": "unchecked_exact_shl",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -97507,23 +96087,20 @@
"11199": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer remainder. Computes `self % rhs`.\n\nStrict remainder calculation on unsigned types is just the regular\nremainder calculation. There's no way overflow could ever happen.\nThis function exists so that all operations are accounted for in the\nstrict operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u64.strict_rem(10), 0);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5u64.strict_rem(0);\n```",
+ "docs": "Checked shift right. Computes `self >> rhs`, returning `None`\nif `rhs` is larger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x10u16.checked_shr(4), Some(0x1));\nassert_eq!(0x10u16.checked_shr(129), None);\n```",
"id": 11199,
"inner": {
"function": {
@@ -97549,26 +96126,41 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u16"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "strict_rem",
+ "name": "checked_shr",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -97633,11 +96225,11 @@
"name": "Item",
"span": {
"begin": [
- 2219,
+ 2214,
5
],
"end": [
- 2219,
+ 2214,
19
],
"filename": "std/src/collections/hash/map.rs"
@@ -97647,20 +96239,23 @@
"11200": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked Euclidean modulo. Computes `self.rem_euclid(rhs)`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(5u64.checked_rem_euclid(2), Some(1));\nassert_eq!(5u64.checked_rem_euclid(0), None);\n```",
+ "docs": "Strict shift right. Computes `self >> rhs`, panicking `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x10u16.strict_shr(4), 0x1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10u16.strict_shr(129);\n```",
"id": 11200,
"inner": {
"function": {
@@ -97686,41 +96281,26 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u64"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "checked_rem_euclid",
+ "name": "strict_shr",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -97730,10 +96310,7 @@
"11201": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
},
{
"must_use": {
@@ -97746,7 +96323,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict Euclidean modulo. Computes `self.rem_euclid(rhs)`.\n\nStrict modulo calculation on unsigned types is just the regular\nremainder calculation. There's no way overflow could ever happen.\nThis function exists so that all operations are accounted for in the\nstrict operations. Since, for the positive integers, all common\ndefinitions of division are equal, this is exactly equal to\n`self.strict_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u64.strict_rem_euclid(10), 0);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5u64.strict_rem_euclid(0);\n```",
+ "docs": "Unchecked shift right. Computes `self >> rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shr`] would return `None`.\n\n[`checked_shr`]: u16::checked_shr",
"id": 11201,
"inner": {
"function": {
@@ -97759,7 +96336,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -97772,26 +96349,28 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
- "links": {},
- "name": "strict_rem_euclid",
+ "links": {
+ "u16::checked_shr": 11199
+ },
+ "name": "unchecked_shr",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -97801,15 +96380,20 @@
"11202": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 135758, is_soft: false}, feature: \"disjoint_bitor\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 135758, is_soft: false}, feature: \"disjoint_bitor\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Same value as `self | other`, but UB if any bit position is set in both inputs.\n\nThis is a situational micro-optimization for places where you'd rather\nuse addition on some platforms and bitwise or on other platforms, based\non exactly which instructions combine better with whatever else you're\ndoing. Note that there's no reason to bother using this for places\nwhere it's clear from the operations involved that they can't overlap.\nFor example, if you're combining `u16`s into a `u32` with\n`((a as u32) << 16) | (b as u32)`, that's fine, as the backend will\nknow those sides of the `|` are disjoint without needing help.\n\n# Examples\n\n```\n#![feature(disjoint_bitor)]\n\n// SAFETY: `1` and `4` have no bits in common.\nunsafe {\n assert_eq!(1_u64.unchecked_disjoint_bitor(4), 5);\n}\n```\n\n# Safety\n\nRequires that `(self & other) == 0`, otherwise it's immediate UB.\n\nEquivalently, requires that `(self | other) == (self + other)`.",
+ "docs": "Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x10u16.unbounded_shr(4), 0x1);\nassert_eq!(0x10u16.unbounded_shr(129), 0);\n```",
"id": 11202,
"inner": {
"function": {
@@ -97822,7 +96406,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -97833,28 +96417,28 @@
}
],
[
- "other",
+ "rhs",
{
- "primitive": "u64"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "unchecked_disjoint_bitor",
+ "name": "unbounded_shr",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -97864,23 +96448,17 @@
"11203": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nThis method might not be optimized owing to implementation details;\n`ilog2` can produce results more efficiently for base 2, and `ilog10`\ncan produce results more efficiently for base 10.\n\n# Panics\n\nThis function will panic if `self` is zero, or if `base` is less than 2.\n\n# Examples\n\n```\nassert_eq!(5u64.ilog(5), 1);\n```",
+ "docs": "Exact shift right. Computes `self >> rhs` as long as it can be reversed losslessly.\n\nReturns `None` if any non-zero bits would be shifted out or if `rhs` >=\n`u16::BITS`.\nOtherwise, returns `Some(self >> rhs)`.\n\n# Examples\n\n```\n#![feature(exact_bitshifts)]\n\nassert_eq!(0x10u16.exact_shr(4), Some(0x1));\nassert_eq!(0x10u16.exact_shr(5), None);\n```",
"id": 11203,
"inner": {
"function": {
@@ -97904,28 +96482,43 @@
}
],
[
- "base",
+ "rhs",
{
- "primitive": "u64"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u16"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "ilog",
+ "name": "exact_shr",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -97935,23 +96528,17 @@
"11204": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 10 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is zero.\n\n# Example\n\n```\nassert_eq!(10u64.ilog10(), 1);\n```",
+ "docs": "Unchecked exact shift right. Computes `self >> rhs`, assuming the operation can be\nlosslessly reversed and `rhs` cannot be larger than\n`u16::BITS`.\n\n# Safety\n\nThis results in undefined behavior when `rhs > self.trailing_zeros() || rhs >=\nu16::BITS`\ni.e. when\n[`u16::exact_shr`]\nwould return `None`.",
"id": 11204,
"inner": {
"function": {
@@ -97964,7 +96551,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -97973,24 +96560,32 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u16"
}
}
}
},
- "links": {},
- "name": "ilog10",
+ "links": {
+ "`u16::exact_shr`": 11203
+ },
+ "name": "unchecked_exact_shr",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -98000,10 +96595,10 @@
"11205": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
@@ -98013,7 +96608,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nReturns `None` if the number is zero, or if the base is not at least 2.\n\nThis method might not be optimized owing to implementation details;\n`checked_ilog2` can produce results more efficiently for base 2, and\n`checked_ilog10` can produce results more efficiently for base 10.\n\n# Examples\n\n```\nassert_eq!(5u64.checked_ilog(5), Some(1));\n```",
+ "docs": "Checked exponentiation. Computes `self.pow(exp)`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(2u16.checked_pow(5), Some(32));\nassert_eq!(u16::MAX.checked_pow(2), None);\n```",
"id": 11205,
"inner": {
"function": {
@@ -98037,9 +96632,9 @@
}
],
[
- "base",
+ "exp",
{
- "primitive": "u64"
+ "primitive": "u32"
}
]
],
@@ -98051,7 +96646,7 @@
"args": [
{
"type": {
- "primitive": "u32"
+ "primitive": "u16"
}
}
],
@@ -98066,14 +96661,14 @@
}
},
"links": {},
- "name": "checked_ilog",
+ "name": "checked_pow",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -98083,20 +96678,23 @@
"11206": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 2 logarithm of the number, rounded down.\n\nReturns `None` if the number is zero.\n\n# Examples\n\n```\nassert_eq!(2u64.checked_ilog2(), Some(1));\n```",
+ "docs": "Strict exponentiation. Computes `self.pow(exp)`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(2u16.strict_pow(5), 32);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = u16::MAX.strict_pow(2);\n```",
"id": 11206,
"inner": {
"function": {
@@ -98118,39 +96716,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "exp",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "checked_ilog2",
+ "name": "strict_pow",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -98160,10 +96749,10 @@
"11207": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -98173,7 +96762,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 10 logarithm of the number, rounded down.\n\nReturns `None` if the number is zero.\n\n# Examples\n\n```\nassert_eq!(10u64.checked_ilog10(), Some(1));\n```",
+ "docs": "Saturating integer addition. Computes `self + rhs`, saturating at\nthe numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100u16.saturating_add(1), 101);\nassert_eq!(u16::MAX.saturating_add(127), u16::MAX);\n```",
"id": 11207,
"inner": {
"function": {
@@ -98195,39 +96784,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "checked_ilog10",
+ "name": "saturating_add",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -98237,10 +96817,10 @@
"11208": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -98250,7 +96830,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked negation. Computes `-self`, returning `None` unless `self ==\n0`.\n\nNote that negating any positive integer will overflow.\n\n# Examples\n\n```\nassert_eq!(0u64.checked_neg(), Some(0));\nassert_eq!(1u64.checked_neg(), None);\n```",
+ "docs": "Saturating addition with a signed integer. Computes `self + rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1u16.saturating_add_signed(2), 3);\nassert_eq!(1u16.saturating_add_signed(-2), 0);\nassert_eq!((u16::MAX - 2).saturating_add_signed(4), u16::MAX);\n```",
"id": 11208,
"inner": {
"function": {
@@ -98272,39 +96852,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u64"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "checked_neg",
+ "name": "saturating_add_signed",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -98314,23 +96885,20 @@
"11209": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict negation. Computes `-self`, panicking unless `self ==\n0`.\n\nNote that negating any positive integer will overflow.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0u64.strict_neg(), 0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 1u64.strict_neg();\n",
+ "docs": "Saturating integer subtraction. Computes `self - rhs`, saturating\nat the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100u16.saturating_sub(27), 73);\nassert_eq!(13u16.saturating_sub(127), 0);\n```",
"id": 11209,
"inner": {
"function": {
@@ -98352,24 +96920,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "strict_neg",
+ "name": "saturating_sub",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -98440,11 +97014,11 @@
"name": "next",
"span": {
"begin": [
- 2222,
+ 2217,
5
],
"end": [
- 2224,
+ 2219,
6
],
"filename": "std/src/collections/hash/map.rs"
@@ -98454,10 +97028,10 @@
"11210": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
},
{
"must_use": {
@@ -98467,7 +97041,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked shift left. Computes `self << rhs`, returning `None`\nif `rhs` is larger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x1u64.checked_shl(4), Some(0x10));\nassert_eq!(0x10u64.checked_shl(129), None);\nassert_eq!(0x10u64.checked_shl(63), Some(0));\n```",
+ "docs": "Saturating integer subtraction. Computes `self` - `rhs`, saturating at\nthe numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1u16.saturating_sub_signed(2), 0);\nassert_eq!(1u16.saturating_sub_signed(-2), 3);\nassert_eq!((u16::MAX - 2).saturating_sub_signed(-4), u16::MAX);\n```",
"id": 11210,
"inner": {
"function": {
@@ -98493,41 +97067,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u64"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "checked_shl",
+ "name": "saturating_sub_signed",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -98537,23 +97096,20 @@
"11211": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict shift left. Computes `self << rhs`, panicking if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x1u64.strict_shl(4), 0x10);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10u64.strict_shl(129);\n```",
+ "docs": "Saturating integer multiplication. Computes `self * rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(2u16.saturating_mul(10), 20);\nassert_eq!((u16::MAX).saturating_mul(10), u16::MAX);\n```",
"id": 11211,
"inner": {
"function": {
@@ -98579,26 +97135,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "strict_shl",
+ "name": "saturating_mul",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -98608,7 +97164,10 @@
"11212": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\"}}]"
},
{
"must_use": {
@@ -98621,7 +97180,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked shift left. Computes `self << rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shl`] would return `None`.\n\n[`checked_shl`]: u64::checked_shl",
+ "docs": "Saturating integer division. Computes `self / rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u16.saturating_div(2), 2);\n\n```",
"id": 11212,
"inner": {
"function": {
@@ -98634,7 +97193,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -98647,28 +97206,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
- "links": {
- "u64::checked_shl": 11210
- },
- "name": "unchecked_shl",
+ "links": {},
+ "name": "saturating_div",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -98678,10 +97235,10 @@
"11213": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
@@ -98691,7 +97248,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x1u64.unbounded_shl(4), 0x10);\nassert_eq!(0x1u64.unbounded_shl(129), 0);\n```",
+ "docs": "Saturating integer exponentiation. Computes `self.pow(exp)`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(4u16.saturating_pow(3), 64);\nassert_eq!(u16::MAX.saturating_pow(2), u16::MAX);\n```",
"id": 11213,
"inner": {
"function": {
@@ -98715,7 +97272,7 @@
}
],
[
- "rhs",
+ "exp",
{
"primitive": "u32"
}
@@ -98723,20 +97280,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "unbounded_shl",
+ "name": "saturating_pow",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -98746,10 +97303,10 @@
"11214": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -98759,7 +97316,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked shift right. Computes `self >> rhs`, returning `None`\nif `rhs` is larger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x10u64.checked_shr(4), Some(0x1));\nassert_eq!(0x10u64.checked_shr(129), None);\n```",
+ "docs": "Wrapping (modular) addition with a signed integer. Computes\n`self + rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(1u16.wrapping_add_signed(2), 3);\nassert_eq!(1u16.wrapping_add_signed(-2), u16::MAX);\nassert_eq!((u16::MAX - 2).wrapping_add_signed(4), 1);\n```",
"id": 11214,
"inner": {
"function": {
@@ -98785,41 +97342,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u64"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "checked_shr",
+ "name": "wrapping_add_signed",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -98829,23 +97371,20 @@
"11215": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict shift right. Computes `self >> rhs`, panicking `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x10u64.strict_shr(4), 0x1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10u64.strict_shr(129);\n```",
+ "docs": "Wrapping (modular) subtraction with a signed integer. Computes\n`self - rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(1u16.wrapping_sub_signed(2), u16::MAX);\nassert_eq!(1u16.wrapping_sub_signed(-2), 3);\nassert_eq!((u16::MAX - 2).wrapping_sub_signed(-4), 1);\n```",
"id": 11215,
"inner": {
"function": {
@@ -98871,26 +97410,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "strict_shr",
+ "name": "wrapping_sub_signed",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -98900,7 +97439,10 @@
"11216": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
@@ -98913,7 +97455,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked shift right. Computes `self >> rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shr`] would return `None`.\n\n[`checked_shr`]: u64::checked_shr",
+ "docs": "Wrapping (modular) division. Computes `self / rhs`.\n\nWrapped division on unsigned types is just normal division. There's\nno way wrapping could ever happen. This function exists so that all\noperations are accounted for in the wrapping operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u16.wrapping_div(10), 10);\n```",
"id": 11216,
"inner": {
"function": {
@@ -98926,7 +97468,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -98939,28 +97481,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
- "links": {
- "u64::checked_shr": 11214
- },
- "name": "unchecked_shr",
+ "links": {},
+ "name": "wrapping_div",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -98970,20 +97510,23 @@
"11217": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x10u64.unbounded_shr(4), 0x1);\nassert_eq!(0x10u64.unbounded_shr(129), 0);\n```",
+ "docs": "Wrapping Euclidean division. Computes `self.div_euclid(rhs)`.\n\nWrapped division on unsigned types is just normal division. There's\nno way wrapping could ever happen. This function exists so that all\noperations are accounted for in the wrapping operations. Since, for\nthe positive integers, all common definitions of division are equal,\nthis is exactly equal to `self.wrapping_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u16.wrapping_div_euclid(10), 10);\n```",
"id": 11217,
"inner": {
"function": {
@@ -99009,26 +97552,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "unbounded_shr",
+ "name": "wrapping_div_euclid",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -99038,20 +97581,23 @@
"11218": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked exponentiation. Computes `self.pow(exp)`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(2u64.checked_pow(5), Some(32));\nassert_eq!(u64::MAX.checked_pow(2), None);\n```",
+ "docs": "Wrapping (modular) remainder. Computes `self % rhs`.\n\nWrapped remainder calculation on unsigned types is just the regular\nremainder calculation. There's no way wrapping could ever happen.\nThis function exists so that all operations are accounted for in the\nwrapping operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u16.wrapping_rem(10), 0);\n```",
"id": 11218,
"inner": {
"function": {
@@ -99075,43 +97621,28 @@
}
],
[
- "exp",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u64"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "checked_pow",
+ "name": "wrapping_rem",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -99121,10 +97652,10 @@
"11219": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -99137,7 +97668,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict exponentiation. Computes `self.pow(exp)`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(2u64.strict_pow(5), 32);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = u64::MAX.strict_pow(2);\n```",
+ "docs": "Wrapping Euclidean modulo. Computes `self.rem_euclid(rhs)`.\n\nWrapped modulo calculation on unsigned types is just the regular\nremainder calculation. There's no way wrapping could ever happen.\nThis function exists so that all operations are accounted for in the\nwrapping operations. Since, for the positive integers, all common\ndefinitions of division are equal, this is exactly equal to\n`self.wrapping_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u16.wrapping_rem_euclid(10), 0);\n```",
"id": 11219,
"inner": {
"function": {
@@ -99161,28 +97692,28 @@
}
],
[
- "exp",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "strict_pow",
+ "name": "wrapping_rem_euclid",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -99260,11 +97791,11 @@
"name": "size_hint",
"span": {
"begin": [
- 2226,
+ 2221,
5
],
"end": [
- 2228,
+ 2223,
6
],
"filename": "std/src/collections/hash/map.rs"
@@ -99274,10 +97805,10 @@
"11220": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
@@ -99287,7 +97818,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer addition. Computes `self + rhs`, saturating at\nthe numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100u64.saturating_add(1), 101);\nassert_eq!(u64::MAX.saturating_add(127), u64::MAX);\n```",
+ "docs": "Wrapping (modular) negation. Computes `-self`,\nwrapping around at the boundary of the type.\n\nSince unsigned types do not have negative equivalents\nall applications of this function will wrap (except for `-0`).\nFor values smaller than the corresponding signed type's maximum\nthe result is the same as casting the corresponding signed value.\nAny larger values are equivalent to `MAX + 1 - (val - MAX - 1)` where\n`MAX` is the corresponding signed type's maximum.\n\n# Examples\n\n```\nassert_eq!(0_u16.wrapping_neg(), 0);\nassert_eq!(u16::MAX.wrapping_neg(), 1);\nassert_eq!(13_u16.wrapping_neg(), (!13) + 1);\nassert_eq!(42_u16.wrapping_neg(), !(42 - 1));\n```",
"id": 11220,
"inner": {
"function": {
@@ -99309,30 +97840,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u64"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "saturating_add",
+ "name": "wrapping_neg",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -99342,10 +97867,10 @@
"11221": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
@@ -99355,7 +97880,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating addition with a signed integer. Computes `self + rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1u64.saturating_add_signed(2), 3);\nassert_eq!(1u64.saturating_add_signed(-2), 0);\nassert_eq!((u64::MAX - 2).saturating_add_signed(4), u64::MAX);\n```",
+ "docs": "Panic-free bitwise shift-left; yields `self << mask(rhs)`,\nwhere `mask` removes any high-order bits of `rhs` that\nwould cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-left; the\nRHS of a wrapping shift-left is restricted to the range\nof the type, rather than the bits shifted out of the LHS\nbeing returned to the other end. The primitive integer\ntypes all implement a [`rotate_left`](Self::rotate_left) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!(1u16.wrapping_shl(7), 128);\nassert_eq!(1u16.wrapping_shl(128), 1);\n```",
"id": 11221,
"inner": {
"function": {
@@ -99381,26 +97906,28 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
- "links": {},
- "name": "saturating_add_signed",
+ "links": {
+ "Self::rotate_left": 11147
+ },
+ "name": "wrapping_shl",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -99410,10 +97937,10 @@
"11222": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
@@ -99423,7 +97950,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer subtraction. Computes `self - rhs`, saturating\nat the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100u64.saturating_sub(27), 73);\nassert_eq!(13u64.saturating_sub(127), 0);\n```",
+ "docs": "Panic-free bitwise shift-right; yields `self >> mask(rhs)`,\nwhere `mask` removes any high-order bits of `rhs` that\nwould cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-right; the\nRHS of a wrapping shift-right is restricted to the range\nof the type, rather than the bits shifted out of the LHS\nbeing returned to the other end. The primitive integer\ntypes all implement a [`rotate_right`](Self::rotate_right) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!(128u16.wrapping_shr(7), 1);\nassert_eq!(128u16.wrapping_shr(128), 128);\n```",
"id": 11222,
"inner": {
"function": {
@@ -99449,26 +97976,28 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
- "links": {},
- "name": "saturating_sub",
+ "links": {
+ "Self::rotate_right": 11148
+ },
+ "name": "wrapping_shr",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -99478,10 +98007,10 @@
"11223": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
@@ -99491,7 +98020,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer subtraction. Computes `self` - `rhs`, saturating at\nthe numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1u64.saturating_sub_signed(2), 0);\nassert_eq!(1u64.saturating_sub_signed(-2), 3);\nassert_eq!((u64::MAX - 2).saturating_sub_signed(-4), u64::MAX);\n```",
+ "docs": "Wrapping (modular) exponentiation. Computes `self.pow(exp)`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(3u16.wrapping_pow(5), 243);\nassert_eq!(3u8.wrapping_pow(6), 217);\n```",
"id": 11223,
"inner": {
"function": {
@@ -99515,28 +98044,28 @@
}
],
[
- "rhs",
+ "exp",
{
- "primitive": "i64"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "saturating_sub_signed",
+ "name": "wrapping_pow",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -99546,7 +98075,7 @@
"11224": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
@@ -99559,7 +98088,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer multiplication. Computes `self * rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(2u64.saturating_mul(10), 20);\nassert_eq!((u64::MAX).saturating_mul(10), u64::MAX);\n```",
+ "docs": "Calculates `self` + `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5u16.overflowing_add(2), (7, false));\nassert_eq!(u16::MAX.overflowing_add(1), (0, true));\n```",
"id": 11224,
"inner": {
"function": {
@@ -99585,26 +98114,33 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "tuple": [
+ {
+ "primitive": "u16"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "saturating_mul",
+ "name": "overflowing_add",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -99614,23 +98150,20 @@
"11225": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer division. Computes `self / rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u64.saturating_div(2), 2);\n\n```",
+ "docs": "Calculates `self` + `rhs` with a signed `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1u16.overflowing_add_signed(2), (3, false));\nassert_eq!(1u16.overflowing_add_signed(-2), (u16::MAX, true));\nassert_eq!((u16::MAX - 2).overflowing_add_signed(4), (1, true));\n```",
"id": 11225,
"inner": {
"function": {
@@ -99656,26 +98189,33 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "tuple": [
+ {
+ "primitive": "u16"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "saturating_div",
+ "name": "overflowing_add_signed",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -99685,10 +98225,10 @@
"11226": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -99698,7 +98238,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer exponentiation. Computes `self.pow(exp)`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(4u64.saturating_pow(3), 64);\nassert_eq!(u64::MAX.saturating_pow(2), u64::MAX);\n```",
+ "docs": "Calculates `self` - `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5u16.overflowing_sub(2), (3, false));\nassert_eq!(0u16.overflowing_sub(1), (u16::MAX, true));\n```",
"id": 11226,
"inner": {
"function": {
@@ -99722,103 +98262,42 @@
}
],
[
- "exp",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
- }
- }
- }
- },
- "links": {},
- "name": "saturating_pow",
- "span": {
- "begin": [
- 1151,
- 5
- ],
- "end": [
- 1169,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "11227": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Wrapping (modular) addition with a signed integer. Computes\n`self + rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(1u64.wrapping_add_signed(2), 3);\nassert_eq!(1u64.wrapping_add_signed(-2), u64::MAX);\nassert_eq!((u64::MAX - 2).wrapping_add_signed(4), 1);\n```",
- "id": 11227,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
+ "tuple": [
{
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "primitive": "u16"
+ },
{
- "primitive": "i64"
+ "primitive": "bool"
}
]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "u64"
}
}
}
},
"links": {},
- "name": "wrapping_add_signed",
+ "name": "overflowing_sub",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11228": {
+ "11227": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
@@ -99834,8 +98313,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) subtraction with a signed integer. Computes\n`self - rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(1u64.wrapping_sub_signed(2), u64::MAX);\nassert_eq!(1u64.wrapping_sub_signed(-2), 3);\nassert_eq!((u64::MAX - 2).wrapping_sub_signed(-4), 1);\n```",
- "id": 11228,
+ "docs": "Calculates `self` - `rhs` with a signed `rhs`\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1u16.overflowing_sub_signed(2), (u16::MAX, true));\nassert_eq!(1u16.overflowing_sub_signed(-2), (3, false));\nassert_eq!((u16::MAX - 2).overflowing_sub_signed(-4), (1, true));\n```",
+ "id": 11227,
"inner": {
"function": {
"generics": {
@@ -99860,52 +98339,124 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "i16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "tuple": [
+ {
+ "primitive": "u16"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "wrapping_sub_signed",
+ "name": "overflowing_sub_signed",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11229": {
+ "11228": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Computes the absolute difference between `self` and `other`.\n\n# Examples\n\n```\nassert_eq!(100u16.abs_diff(80), 20u16);\nassert_eq!(100u16.abs_diff(110), 10u16);\n```",
+ "id": 11228,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "other",
+ {
+ "primitive": "u16"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u16"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "abs_diff",
+ "span": {
+ "begin": [
+ 1084,
+ 5
+ ],
+ "end": [
+ 1105,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11229": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_bigint_helpers\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) division. Computes `self / rhs`.\n\nWrapped division on unsigned types is just normal division. There's\nno way wrapping could ever happen. This function exists so that all\noperations are accounted for in the wrapping operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u64.wrapping_div(10), 10);\n```",
+ "docs": "Calculates the \"full multiplication\" `self * rhs + carry`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you also need to add a value, then use [`Self::carrying_mul_add`].\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u32` is used.\n\n```\nassert_eq!(5u32.carrying_mul(2, 0), (10, 0));\nassert_eq!(5u32.carrying_mul(2, 10), (20, 0));\nassert_eq!(1_000_000_000u32.carrying_mul(10, 0), (1410065408, 2));\nassert_eq!(1_000_000_000u32.carrying_mul(10, 10), (1410065418, 2));\nassert_eq!(u16::MAX.carrying_mul(u16::MAX, u16::MAX), (0, u16::MAX));\n```\n\nThis is the core operation needed for scalar multiplication when\nimplementing it for wider-than-native types.\n\n```\n#![feature(bigint_helper_methods)]\nfn scalar_mul_eq(little_endian_digits: &mut Vec, multiplicand: u16) {\n let mut carry = 0;\n for d in little_endian_digits.iter_mut() {\n (*d, carry) = d.carrying_mul(multiplicand, carry);\n }\n if carry != 0 {\n little_endian_digits.push(carry);\n }\n}\n\nlet mut v = vec![10, 20];\nscalar_mul_eq(&mut v, 3);\nassert_eq!(v, [30, 60]);\n\nassert_eq!(0x87654321_u64 * 0xFEED, 0x86D3D159E38D);\nlet mut v = vec![0x4321, 0x8765];\nscalar_mul_eq(&mut v, 0xFEED);\nassert_eq!(v, [0xE38D, 0xD159, 0x86D3]);\n```\n\nIf `carry` is zero, this is similar to [`overflowing_mul`](Self::overflowing_mul),\nexcept that it gives the value of the overflow instead of just whether one happened:\n\n```\n#![feature(bigint_helper_methods)]\nlet r = u8::carrying_mul(7, 13, 0);\nassert_eq!((r.0, r.1 != 0), u8::overflowing_mul(7, 13));\nlet r = u8::carrying_mul(13, 42, 0);\nassert_eq!((r.0, r.1 != 0), u8::overflowing_mul(13, 42));\n```\n\nThe value of the first field in the returned tuple matches what you'd get\nby combining the [`wrapping_mul`](Self::wrapping_mul) and\n[`wrapping_add`](Self::wrapping_add) methods:\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(\n 789_u16.carrying_mul(456, 123).0,\n 789_u16.wrapping_mul(456).wrapping_add(123),\n);\n```",
"id": 11229,
"inner": {
"function": {
@@ -99931,26 +98482,44 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u16"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "tuple": [
+ {
+ "primitive": "u16"
+ },
+ {
+ "primitive": "u16"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "wrapping_div",
+ "links": {
+ "Self::overflowing_mul": 11230,
+ "Self::wrapping_add": 11159,
+ "Self::wrapping_mul": 11172,
+ "`Self::carrying_mul_add`": 11231
+ },
+ "name": "carrying_mul",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -100000,11 +98569,11 @@
"name": "count",
"span": {
"begin": [
- 2230,
+ 2225,
5
],
"end": [
- 2232,
+ 2227,
6
],
"filename": "std/src/collections/hash/map.rs"
@@ -100014,23 +98583,20 @@
"11230": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping Euclidean division. Computes `self.div_euclid(rhs)`.\n\nWrapped division on unsigned types is just normal division. There's\nno way wrapping could ever happen. This function exists so that all\noperations are accounted for in the wrapping operations. Since, for\nthe positive integers, all common definitions of division are equal,\nthis is exactly equal to `self.wrapping_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u64.wrapping_div_euclid(10), 10);\n```",
+ "docs": "Calculates the multiplication of `self` and `rhs`.\n\nReturns a tuple of the multiplication along with a boolean\nindicating whether an arithmetic overflow would occur. If an\noverflow would have occurred then the wrapped value is returned.\n\nIf you want the *value* of the overflow, rather than just *whether*\nan overflow occurred, see [`Self::carrying_mul`].\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u32` is used.\n\n```\nassert_eq!(5u32.overflowing_mul(2), (10, false));\nassert_eq!(1_000_000_000u32.overflowing_mul(10), (1410065408, true));\n```",
"id": 11230,
"inner": {
"function": {
@@ -100056,26 +98622,35 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "tuple": [
+ {
+ "primitive": "u16"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "wrapping_div_euclid",
+ "links": {
+ "`Self::carrying_mul`": 11229
+ },
+ "name": "overflowing_mul",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -100085,23 +98660,20 @@
"11231": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_bigint_helpers\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) remainder. Computes `self % rhs`.\n\nWrapped remainder calculation on unsigned types is just the regular\nremainder calculation. There's no way wrapping could ever happen.\nThis function exists so that all operations are accounted for in the\nwrapping operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u64.wrapping_rem(10), 0);\n```",
+ "docs": "Calculates the \"full multiplication\" `self * rhs + carry1 + carry2`.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nThis cannot overflow, as the double-width result has exactly enough\nspace for the largest possible result. This is equivalent to how, in\ndecimal, 9 × 9 + 9 + 9 = 81 + 18 = 99 = 9×10⁰ + 9×10¹ = 10² - 1.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need the `add` part, then you can use [`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared between integer types,\nwhich explains why `u32` is used here.\n\n```\nassert_eq!(5u32.carrying_mul_add(2, 0, 0), (10, 0));\nassert_eq!(5u32.carrying_mul_add(2, 10, 10), (30, 0));\nassert_eq!(1_000_000_000u32.carrying_mul_add(10, 0, 0), (1410065408, 2));\nassert_eq!(1_000_000_000u32.carrying_mul_add(10, 10, 10), (1410065428, 2));\nassert_eq!(u16::MAX.carrying_mul_add(u16::MAX, u16::MAX, u16::MAX), (u16::MAX, u16::MAX));\n```\n\nThis is the core per-digit operation for \"grade school\" O(n²) multiplication.\n\nPlease note that this example is shared between integer types,\nusing `u8` for simplicity of the demonstration.\n\n```\nfn quadratic_mul(a: [u8; N], b: [u8; N]) -> [u8; N] {\n let mut out = [0; N];\n for j in 0..N {\n let mut carry = 0;\n for i in 0..(N - j) {\n (out[j + i], carry) = u8::carrying_mul_add(a[i], b[j], out[j + i], carry);\n }\n }\n out\n}\n\n// -1 * -1 == 1\nassert_eq!(quadratic_mul([0xFF; 3], [0xFF; 3]), [1, 0, 0]);\n\nassert_eq!(u32::wrapping_mul(0x9e3779b9, 0x7f4a7c15), 0xcffc982d);\nassert_eq!(\n quadratic_mul(u32::to_le_bytes(0x9e3779b9), u32::to_le_bytes(0x7f4a7c15)),\n u32::to_le_bytes(0xcffc982d)\n);\n```",
"id": 11231,
"inner": {
"function": {
@@ -100127,26 +98699,47 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u16"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "u16"
+ }
+ ],
+ [
+ "add",
+ {
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "tuple": [
+ {
+ "primitive": "u16"
+ },
+ {
+ "primitive": "u16"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "wrapping_rem",
+ "links": {
+ "`Self::carrying_mul`": 11229
+ },
+ "name": "carrying_mul_add",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -100156,23 +98749,20 @@
"11232": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping Euclidean modulo. Computes `self.rem_euclid(rhs)`.\n\nWrapped modulo calculation on unsigned types is just the regular\nremainder calculation. There's no way wrapping could ever happen.\nThis function exists so that all operations are accounted for in the\nwrapping operations. Since, for the positive integers, all common\ndefinitions of division are equal, this is exactly equal to\n`self.wrapping_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u64.wrapping_rem_euclid(10), 0);\n```",
+ "docs": "Calculates the complete double-width product `self * rhs`.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order. As such,\n`a.widening_mul(b).0` produces the same result as `a.wrapping_mul(b)`.\n\nIf you also need to add a value and carry to the wide result, then you want\n[`Self::carrying_mul_add`] instead.\n\nIf you also need to add a carry to the wide result, then you want\n[`Self::carrying_mul`] instead.\n\nIf you just want to know *whether* the multiplication overflowed, then you\nwant [`Self::overflowing_mul`] instead.\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5_u16.widening_mul(7), (35, 0));\nassert_eq!(u16::MAX.widening_mul(u16::MAX), (1, u16::MAX - 1));\n```\n\nCompared to other `*_mul` methods:\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(u16::widening_mul(1 << 15, 6), (0, 3));\nassert_eq!(u16::overflowing_mul(1 << 15, 6), (0, true));\nassert_eq!(u16::wrapping_mul(1 << 15, 6), 0);\nassert_eq!(u16::checked_mul(1 << 15, 6), None);\n```\n\nPlease note that this example is shared among integer types, which is why `u32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5u32.widening_mul(2), (10, 0));\nassert_eq!(1_000_000_000u32.widening_mul(10), (1410065408, 2));\n```",
"id": 11232,
"inner": {
"function": {
@@ -100198,26 +98788,37 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "tuple": [
+ {
+ "primitive": "u16"
+ },
+ {
+ "primitive": "u16"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "wrapping_rem_euclid",
+ "links": {
+ "`Self::carrying_mul_add`": 11231,
+ "`Self::carrying_mul`": 11229,
+ "`Self::overflowing_mul`": 11230
+ },
+ "name": "widening_mul",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -100227,20 +98828,23 @@
"11233": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) negation. Computes `-self`,\nwrapping around at the boundary of the type.\n\nSince unsigned types do not have negative equivalents\nall applications of this function will wrap (except for `-0`).\nFor values smaller than the corresponding signed type's maximum\nthe result is the same as casting the corresponding signed value.\nAny larger values are equivalent to `MAX + 1 - (val - MAX - 1)` where\n`MAX` is the corresponding signed type's maximum.\n\n# Examples\n\n```\nassert_eq!(0_u64.wrapping_neg(), 0);\nassert_eq!(u64::MAX.wrapping_neg(), 1);\nassert_eq!(13_u64.wrapping_neg(), (!13) + 1);\nassert_eq!(42_u64.wrapping_neg(), !(42 - 1));\n```",
+ "docs": "Calculates the divisor when `self` is divided by `rhs`.\n\nReturns a tuple of the divisor along with a boolean indicating\nwhether an arithmetic overflow would occur. Note that for unsigned\nintegers overflow never occurs, so the second value is always\n`false`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u16.overflowing_div(2), (2, false));\n```",
"id": 11233,
"inner": {
"function": {
@@ -100262,24 +98866,37 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u16"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "tuple": [
+ {
+ "primitive": "u16"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "wrapping_neg",
+ "name": "overflowing_div",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -100289,20 +98906,23 @@
"11234": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Panic-free bitwise shift-left; yields `self << mask(rhs)`,\nwhere `mask` removes any high-order bits of `rhs` that\nwould cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-left; the\nRHS of a wrapping shift-left is restricted to the range\nof the type, rather than the bits shifted out of the LHS\nbeing returned to the other end. The primitive integer\ntypes all implement a [`rotate_left`](Self::rotate_left) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!(1u64.wrapping_shl(7), 128);\nassert_eq!(1u64.wrapping_shl(128), 1);\n```",
+ "docs": "Calculates the quotient of Euclidean division `self.div_euclid(rhs)`.\n\nReturns a tuple of the divisor along with a boolean indicating\nwhether an arithmetic overflow would occur. Note that for unsigned\nintegers overflow never occurs, so the second value is always\n`false`.\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self.overflowing_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u16.overflowing_div_euclid(2), (2, false));\n```",
"id": 11234,
"inner": {
"function": {
@@ -100328,28 +98948,33 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "tuple": [
+ {
+ "primitive": "u16"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
- "links": {
- "Self::rotate_left": 11166
- },
- "name": "wrapping_shl",
+ "links": {},
+ "name": "overflowing_div_euclid",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -100359,20 +98984,23 @@
"11235": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Panic-free bitwise shift-right; yields `self >> mask(rhs)`,\nwhere `mask` removes any high-order bits of `rhs` that\nwould cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-right; the\nRHS of a wrapping shift-right is restricted to the range\nof the type, rather than the bits shifted out of the LHS\nbeing returned to the other end. The primitive integer\ntypes all implement a [`rotate_right`](Self::rotate_right) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!(128u64.wrapping_shr(7), 1);\nassert_eq!(128u64.wrapping_shr(128), 128);\n```",
+ "docs": "Calculates the remainder when `self` is divided by `rhs`.\n\nReturns a tuple of the remainder after dividing along with a boolean\nindicating whether an arithmetic overflow would occur. Note that for\nunsigned integers overflow never occurs, so the second value is\nalways `false`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u16.overflowing_rem(2), (1, false));\n```",
"id": 11235,
"inner": {
"function": {
@@ -100398,28 +99026,33 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "tuple": [
+ {
+ "primitive": "u16"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
- "links": {
- "Self::rotate_right": 11167
- },
- "name": "wrapping_shr",
+ "links": {},
+ "name": "overflowing_rem",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -100429,20 +99062,23 @@
"11236": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) exponentiation. Computes `self.pow(exp)`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(3u64.wrapping_pow(5), 243);\nassert_eq!(3u8.wrapping_pow(6), 217);\n```",
+ "docs": "Calculates the remainder `self.rem_euclid(rhs)` as if by Euclidean division.\n\nReturns a tuple of the modulo after dividing along with a boolean\nindicating whether an arithmetic overflow would occur. Note that for\nunsigned integers overflow never occurs, so the second value is\nalways `false`.\nSince, for the positive integers, all common\ndefinitions of division are equal, this operation\nis exactly equal to `self.overflowing_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u16.overflowing_rem_euclid(2), (1, false));\n```",
"id": 11236,
"inner": {
"function": {
@@ -100466,28 +99102,35 @@
}
],
[
- "exp",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "tuple": [
+ {
+ "primitive": "u16"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "wrapping_pow",
+ "name": "overflowing_rem_euclid",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -100510,7 +99153,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5u64.overflowing_add(2), (7, false));\nassert_eq!(u64::MAX.overflowing_add(1), (0, true));\n```",
+ "docs": "Negates self in an overflowing fashion.\n\nReturns `!self + 1` using wrapping operations to return the value\nthat represents the negation of this unsigned value. Note that for\npositive unsigned values overflow always occurs, but negating 0 does\nnot overflow.\n\n# Examples\n\n```\nassert_eq!(0u16.overflowing_neg(), (0, false));\nassert_eq!(2u16.overflowing_neg(), (-2i32 as u16, true));\n```",
"id": 11237,
"inner": {
"function": {
@@ -100532,19 +99175,13 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u64"
- }
]
],
"is_c_variadic": false,
"output": {
"tuple": [
{
- "primitive": "u64"
+ "primitive": "u16"
},
{
"primitive": "bool"
@@ -100555,14 +99192,14 @@
}
},
"links": {},
- "name": "overflowing_add",
+ "name": "overflowing_neg",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -100572,10 +99209,10 @@
"11238": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -100585,7 +99222,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs` with a signed `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1u64.overflowing_add_signed(2), (3, false));\nassert_eq!(1u64.overflowing_add_signed(-2), (u64::MAX, true));\nassert_eq!((u64::MAX - 2).overflowing_add_signed(4), (1, true));\n```",
+ "docs": "Shifts self left by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean\nindicating whether the shift value was larger than or equal to the\nnumber of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then\nused to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x1u16.overflowing_shl(4), (0x10, false));\nassert_eq!(0x1u16.overflowing_shl(132), (0x10, true));\nassert_eq!(0x10u16.overflowing_shl(15), (0, false));\n```",
"id": 11238,
"inner": {
"function": {
@@ -100611,7 +99248,7 @@
[
"rhs",
{
- "primitive": "i64"
+ "primitive": "u32"
}
]
],
@@ -100619,7 +99256,7 @@
"output": {
"tuple": [
{
- "primitive": "u64"
+ "primitive": "u16"
},
{
"primitive": "bool"
@@ -100630,14 +99267,14 @@
}
},
"links": {},
- "name": "overflowing_add_signed",
+ "name": "overflowing_shl",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -100660,7 +99297,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` - `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5u64.overflowing_sub(2), (3, false));\nassert_eq!(0u64.overflowing_sub(1), (u64::MAX, true));\n```",
+ "docs": "Shifts self right by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean\nindicating whether the shift value was larger than or equal to the\nnumber of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then\nused to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x10u16.overflowing_shr(4), (0x1, false));\nassert_eq!(0x10u16.overflowing_shr(132), (0x1, true));\n```",
"id": 11239,
"inner": {
"function": {
@@ -100686,7 +99323,7 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u32"
}
]
],
@@ -100694,7 +99331,7 @@
"output": {
"tuple": [
{
- "primitive": "u64"
+ "primitive": "u16"
},
{
"primitive": "bool"
@@ -100705,14 +99342,14 @@
}
},
"links": {},
- "name": "overflowing_sub",
+ "name": "overflowing_shr",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -100863,11 +99500,11 @@
"name": "fold",
"span": {
"begin": [
- 2234,
+ 2229,
5
],
"end": [
- 2240,
+ 2235,
6
],
"filename": "std/src/collections/hash/map.rs"
@@ -100877,10 +99514,10 @@
"11240": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
@@ -100890,7 +99527,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` - `rhs` with a signed `rhs`\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1u64.overflowing_sub_signed(2), (u64::MAX, true));\nassert_eq!(1u64.overflowing_sub_signed(-2), (3, false));\nassert_eq!((u64::MAX - 2).overflowing_sub_signed(-4), (1, true));\n```",
+ "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\nReturns a tuple of the exponentiation along with a bool indicating\nwhether an overflow happened.\n\n# Examples\n\n```\nassert_eq!(3u16.overflowing_pow(5), (243, false));\nassert_eq!(3u8.overflowing_pow(6), (217, true));\n```",
"id": 11240,
"inner": {
"function": {
@@ -100914,9 +99551,9 @@
}
],
[
- "rhs",
+ "exp",
{
- "primitive": "i64"
+ "primitive": "u32"
}
]
],
@@ -100924,7 +99561,7 @@
"output": {
"tuple": [
{
- "primitive": "u64"
+ "primitive": "u16"
},
{
"primitive": "bool"
@@ -100935,14 +99572,14 @@
}
},
"links": {},
- "name": "overflowing_sub_signed",
+ "name": "overflowing_pow",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -100952,10 +99589,10 @@
"11241": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -100965,7 +99602,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Computes the absolute difference between `self` and `other`.\n\n# Examples\n\n```\nassert_eq!(100u64.abs_diff(80), 20u64);\nassert_eq!(100u64.abs_diff(110), 10u64);\n```",
+ "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\n# Examples\n\n```\nassert_eq!(2u16.pow(5), 32);\n```",
"id": 11241,
"inner": {
"function": {
@@ -100989,28 +99626,28 @@
}
],
[
- "other",
+ "exp",
{
- "primitive": "u64"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "abs_diff",
+ "name": "pow",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -101020,10 +99657,10 @@
"11242": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
},
{
"must_use": {
@@ -101033,7 +99670,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the multiplication of `self` and `rhs`.\n\nReturns a tuple of the multiplication along with a boolean\nindicating whether an arithmetic overflow would occur. If an\noverflow would have occurred then the wrapped value is returned.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why why `u32`\nis used.\n\n```\nassert_eq!(5u32.overflowing_mul(2), (10, false));\nassert_eq!(1_000_000_000u32.overflowing_mul(10), (1410065408, true));\n```",
+ "docs": "Returns the square root of the number, rounded down.\n\n# Examples\n\n```\nassert_eq!(10u16.isqrt(), 3);\n```",
"id": 11242,
"inner": {
"function": {
@@ -101055,37 +99692,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u64"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u64"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "overflowing_mul",
+ "name": "isqrt",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -101095,20 +99719,23 @@
"11243": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the \"full multiplication\" `self * rhs + carry`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need the `carry`, then you can use [`Self::widening_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5u32.carrying_mul(2, 0), (10, 0));\nassert_eq!(5u32.carrying_mul(2, 10), (20, 0));\nassert_eq!(1_000_000_000u32.carrying_mul(10, 0), (1410065408, 2));\nassert_eq!(1_000_000_000u32.carrying_mul(10, 10), (1410065418, 2));\nassert_eq!(u64::MAX.carrying_mul(u64::MAX, u64::MAX), (0, u64::MAX));\n```\n\nThis is the core operation needed for scalar multiplication when\nimplementing it for wider-than-native types.\n\n```\n#![feature(bigint_helper_methods)]\nfn scalar_mul_eq(little_endian_digits: &mut Vec, multiplicand: u16) {\n let mut carry = 0;\n for d in little_endian_digits.iter_mut() {\n (*d, carry) = d.carrying_mul(multiplicand, carry);\n }\n if carry != 0 {\n little_endian_digits.push(carry);\n }\n}\n\nlet mut v = vec![10, 20];\nscalar_mul_eq(&mut v, 3);\nassert_eq!(v, [30, 60]);\n\nassert_eq!(0x87654321_u64 * 0xFEED, 0x86D3D159E38D);\nlet mut v = vec![0x4321, 0x8765];\nscalar_mul_eq(&mut v, 0xFEED);\nassert_eq!(v, [0xE38D, 0xD159, 0x86D3]);\n```\n\nIf `carry` is zero, this is similar to [`overflowing_mul`](Self::overflowing_mul),\nexcept that it gives the value of the overflow instead of just whether one happened:\n\n```\n#![feature(bigint_helper_methods)]\nlet r = u8::carrying_mul(7, 13, 0);\nassert_eq!((r.0, r.1 != 0), u8::overflowing_mul(7, 13));\nlet r = u8::carrying_mul(13, 42, 0);\nassert_eq!((r.0, r.1 != 0), u8::overflowing_mul(13, 42));\n```\n\nThe value of the first field in the returned tuple matches what you'd get\nby combining the [`wrapping_mul`](Self::wrapping_mul) and\n[`wrapping_add`](Self::wrapping_add) methods:\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(\n 789_u16.carrying_mul(456, 123).0,\n 789_u16.wrapping_mul(456).wrapping_add(123),\n);\n```",
+ "docs": "Performs Euclidean division.\n\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7u16.div_euclid(4), 1); // or any other integer type\n```",
"id": 11243,
"inner": {
"function": {
@@ -101134,44 +99761,26 @@
[
"rhs",
{
- "primitive": "u64"
- }
- ],
- [
- "carry",
- {
- "primitive": "u64"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u64"
- },
- {
- "primitive": "u64"
- }
- ]
+ "primitive": "u16"
}
}
}
},
- "links": {
- "Self::overflowing_mul": 11242,
- "Self::wrapping_add": 11176,
- "Self::wrapping_mul": 11189,
- "`Self::widening_mul`": 11244
- },
- "name": "carrying_mul",
+ "links": {},
+ "name": "div_euclid",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -101181,98 +99790,27 @@
"11244": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[doc(alias = \"modulo\", alias = \"mod\")]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Calculates the complete product `self * rhs` without the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nIf you also need to add a carry to the wide result, then you want\n[`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5u32.widening_mul(2), (10, 0));\nassert_eq!(1_000_000_000u32.widening_mul(10), (1410065408, 2));\n```",
- "id": 11244,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u64"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "u64"
- },
- {
- "primitive": "u64"
- }
- ]
- }
- }
- }
- },
- "links": {
- "`Self::carrying_mul`": 11243
- },
- "name": "widening_mul",
- "span": {
- "begin": [
- 1151,
- 5
- ],
- "end": [
- 1169,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "11245": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the \"full multiplication\" `self * rhs + carry1 + carry2`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need either `carry`, then you can use [`Self::widening_mul`] instead,\nand if you only need one `carry`, then you can use [`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared between integer types,\nwhich explains why `u32` is used here.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5u32.carrying_mul_add(2, 0, 0), (10, 0));\nassert_eq!(5u32.carrying_mul_add(2, 10, 10), (30, 0));\nassert_eq!(1_000_000_000u32.carrying_mul_add(10, 0, 0), (1410065408, 2));\nassert_eq!(1_000_000_000u32.carrying_mul_add(10, 10, 10), (1410065428, 2));\nassert_eq!(u64::MAX.carrying_mul_add(u64::MAX, u64::MAX, u64::MAX), (u64::MAX, u64::MAX));\n```\n\nThis is the core per-digit operation for \"grade school\" O(n²) multiplication.\n\nPlease note that this example is shared between integer types,\nusing `u8` for simplicity of the demonstration.\n\n```\n#![feature(bigint_helper_methods)]\n\nfn quadratic_mul(a: [u8; N], b: [u8; N]) -> [u8; N] {\n let mut out = [0; N];\n for j in 0..N {\n let mut carry = 0;\n for i in 0..(N - j) {\n (out[j + i], carry) = u8::carrying_mul_add(a[i], b[j], out[j + i], carry);\n }\n }\n out\n}\n\n// -1 * -1 == 1\nassert_eq!(quadratic_mul([0xFF; 3], [0xFF; 3]), [1, 0, 0]);\n\nassert_eq!(u32::wrapping_mul(0x9e3779b9, 0x7f4a7c15), 0xCFFC982D);\nassert_eq!(\n quadratic_mul(u32::to_le_bytes(0x9e3779b9), u32::to_le_bytes(0x7f4a7c15)),\n u32::to_le_bytes(0xCFFC982D)\n);\n```",
- "id": 11245,
+ "docs": "Calculates the least remainder of `self (mod rhs)`.\n\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self % rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7u16.rem_euclid(4), 3); // or any other integer type\n```",
+ "id": 11244,
"inner": {
"function": {
"generics": {
@@ -101297,61 +99835,36 @@
[
"rhs",
{
- "primitive": "u64"
- }
- ],
- [
- "carry",
- {
- "primitive": "u64"
- }
- ],
- [
- "add",
- {
- "primitive": "u64"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u64"
- },
- {
- "primitive": "u64"
- }
- ]
+ "primitive": "u16"
}
}
}
},
- "links": {
- "`Self::carrying_mul`": 11243,
- "`Self::widening_mul`": 11244
- },
- "name": "carrying_mul_add",
+ "links": {},
+ "name": "rem_euclid",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11246": {
+ "11245": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
},
{
"must_use": {
@@ -101364,8 +99877,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the divisor when `self` is divided by `rhs`.\n\nReturns a tuple of the divisor along with a boolean indicating\nwhether an arithmetic overflow would occur. Note that for unsigned\nintegers overflow never occurs, so the second value is always\n`false`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u64.overflowing_div(2), (2, false));\n```",
- "id": 11246,
+ "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards negative infinity.\n\nThis is the same as performing `self / rhs` for all unsigned integers.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(7_u16.div_floor(4), 1);\n```",
+ "id": 11245,
"inner": {
"function": {
"generics": {
@@ -101390,46 +99903,39 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u64"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "overflowing_div",
+ "name": "div_floor",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11247": {
+ "11246": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
},
{
"must_use": {
@@ -101442,8 +99948,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of Euclidean division `self.div_euclid(rhs)`.\n\nReturns a tuple of the divisor along with a boolean indicating\nwhether an arithmetic overflow would occur. Note that for unsigned\nintegers overflow never occurs, so the second value is always\n`false`.\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self.overflowing_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u64.overflowing_div_euclid(2), (2, false));\n```",
- "id": 11247,
+ "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards positive infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7_u16.div_ceil(4), 2);\n```",
+ "id": 11246,
"inner": {
"function": {
"generics": {
@@ -101468,33 +99974,94 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
+ "primitive": "u16"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "div_ceil",
+ "span": {
+ "begin": [
+ 1084,
+ 5
+ ],
+ "end": [
+ 1105,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11247": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates the smallest value greater than or equal to `self` that\nis a multiple of `rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nOn overflow, this function will panic if overflow checks are enabled (default in debug\nmode) and wrap if overflow checks are disabled (default in release mode).\n\n# Examples\n\n```\nassert_eq!(16_u16.next_multiple_of(8), 16);\nassert_eq!(23_u16.next_multiple_of(8), 24);\n```",
+ "id": 11247,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
{
- "primitive": "u64"
- },
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
{
- "primitive": "bool"
+ "primitive": "u16"
}
]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "overflowing_div_euclid",
+ "name": "next_multiple_of",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -101504,23 +100071,20 @@
"11248": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the remainder when `self` is divided by `rhs`.\n\nReturns a tuple of the remainder after dividing along with a boolean\nindicating whether an arithmetic overflow would occur. Note that for\nunsigned integers overflow never occurs, so the second value is\nalways `false`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u64.overflowing_rem(2), (1, false));\n```",
+ "docs": "Calculates the smallest value greater than or equal to `self` that\nis a multiple of `rhs`. Returns `None` if `rhs` is zero or the\noperation would result in overflow.\n\n# Examples\n\n```\nassert_eq!(16_u16.checked_next_multiple_of(8), Some(16));\nassert_eq!(23_u16.checked_next_multiple_of(8), Some(24));\nassert_eq!(1_u16.checked_next_multiple_of(0), None);\nassert_eq!(u16::MAX.checked_next_multiple_of(2), None);\n```",
"id": 11248,
"inner": {
"function": {
@@ -101546,33 +100110,41 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u64"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u16"
+ }
+ }
+ ],
+ "constraints": []
+ }
},
- {
- "primitive": "bool"
- }
- ]
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "overflowing_rem",
+ "name": "checked_next_multiple_of",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -101582,23 +100154,20 @@
"11249": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unsigned_is_multiple_of\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unsigned_is_multiple_of\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the remainder `self.rem_euclid(rhs)` as if by Euclidean division.\n\nReturns a tuple of the modulo after dividing along with a boolean\nindicating whether an arithmetic overflow would occur. Note that for\nunsigned integers overflow never occurs, so the second value is\nalways `false`.\nSince, for the positive integers, all common\ndefinitions of division are equal, this operation\nis exactly equal to `self.overflowing_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u64.overflowing_rem_euclid(2), (1, false));\n```",
+ "docs": "Returns `true` if `self` is an integer multiple of `rhs`, and false otherwise.\n\nThis function is equivalent to `self % rhs == 0`, except that it will not panic\nfor `rhs == 0`. Instead, `0.is_multiple_of(0) == true`, and for any non-zero `n`,\n`n.is_multiple_of(0) == false`.\n\n# Examples\n\n```\nassert!(6_u16.is_multiple_of(2));\nassert!(!5_u16.is_multiple_of(2));\n\nassert!(0_u16.is_multiple_of(0));\nassert!(!6_u16.is_multiple_of(0));\n```",
"id": 11249,
"inner": {
"function": {
@@ -101624,33 +100193,26 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u64"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "overflowing_rem_euclid",
+ "name": "is_multiple_of",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -101817,11 +100379,11 @@
"name": null,
"span": {
"begin": [
- 2218,
+ 2213,
1
],
"end": [
- 2241,
+ 2236,
2
],
"filename": "std/src/collections/hash/map.rs"
@@ -101831,20 +100393,20 @@
"11250": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_is_power_of_two\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Negates self in an overflowing fashion.\n\nReturns `!self + 1` using wrapping operations to return the value\nthat represents the negation of this unsigned value. Note that for\npositive unsigned values overflow always occurs, but negating 0 does\nnot overflow.\n\n# Examples\n\n```\nassert_eq!(0u64.overflowing_neg(), (0, false));\nassert_eq!(2u64.overflowing_neg(), (-2i32 as u64, true));\n```",
+ "docs": "Returns `true` if and only if `self == 2^k` for some unsigned integer `k`.\n\n# Examples\n\n```\nassert!(16u16.is_power_of_two());\nassert!(!10u16.is_power_of_two());\n```",
"id": 11250,
"inner": {
"function": {
@@ -101870,27 +100432,20 @@
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u64"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "overflowing_neg",
+ "name": "is_power_of_two",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -101900,10 +100455,10 @@
"11251": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -101913,7 +100468,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts self left by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean\nindicating whether the shift value was larger than or equal to the\nnumber of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then\nused to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x1u64.overflowing_shl(4), (0x10, false));\nassert_eq!(0x1u64.overflowing_shl(132), (0x10, true));\nassert_eq!(0x10u64.overflowing_shl(63), (0, false));\n```",
+ "docs": "Returns the smallest power of two greater than or equal to `self`.\n\nWhen return value overflows (i.e., `self > (1 << (N-1))` for type\n`uN`), it panics in debug mode and the return value is wrapped to 0 in\nrelease mode (the only situation in which this method can return 0).\n\n# Examples\n\n```\nassert_eq!(2u16.next_power_of_two(), 2);\nassert_eq!(3u16.next_power_of_two(), 4);\nassert_eq!(0u16.next_power_of_two(), 1);\n```",
"id": 11251,
"inner": {
"function": {
@@ -101935,37 +100490,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u64"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "overflowing_shl",
+ "name": "next_power_of_two",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -101975,10 +100517,10 @@
"11252": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -101988,7 +100530,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts self right by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean\nindicating whether the shift value was larger than or equal to the\nnumber of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then\nused to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x10u64.overflowing_shr(4), (0x1, false));\nassert_eq!(0x10u64.overflowing_shr(132), (0x1, true));\n```",
+ "docs": "Returns the smallest power of two greater than or equal to `self`. If\nthe next power of two is greater than the type's maximum value,\n`None` is returned, otherwise the power of two is wrapped in `Some`.\n\n# Examples\n\n```\nassert_eq!(2u16.checked_next_power_of_two(), Some(2));\nassert_eq!(3u16.checked_next_power_of_two(), Some(4));\nassert_eq!(u16::MAX.checked_next_power_of_two(), None);\n```",
"id": 11252,
"inner": {
"function": {
@@ -102010,37 +100552,39 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u64"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u16"
+ }
+ }
+ ],
+ "constraints": []
+ }
},
- {
- "primitive": "bool"
- }
- ]
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "overflowing_shr",
+ "name": "checked_next_power_of_two",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -102050,10 +100594,7 @@
"11253": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"needs decision on wrapping behavior\"),\nissue: 32463, is_soft: false}, feature: \"wrapping_next_power_of_two\"}}]"
},
{
"must_use": {
@@ -102063,7 +100604,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\nReturns a tuple of the exponentiation along with a bool indicating\nwhether an overflow happened.\n\n# Examples\n\n```\nassert_eq!(3u64.overflowing_pow(5), (243, false));\nassert_eq!(3u8.overflowing_pow(6), (217, true));\n```",
+ "docs": "Returns the smallest power of two greater than or equal to `n`. If\nthe next power of two is greater than the type's maximum value,\nthe return value is wrapped to `0`.\n\n# Examples\n\n```\n#![feature(wrapping_next_power_of_two)]\n\nassert_eq!(2u16.wrapping_next_power_of_two(), 2);\nassert_eq!(3u16.wrapping_next_power_of_two(), 4);\nassert_eq!(u16::MAX.wrapping_next_power_of_two(), 0);\n```",
"id": 11253,
"inner": {
"function": {
@@ -102085,37 +100626,24 @@
{
"generic": "Self"
}
- ],
- [
- "exp",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u64"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "overflowing_pow",
+ "name": "wrapping_next_power_of_two",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -102125,10 +100653,10 @@
"11254": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
@@ -102138,7 +100666,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\n# Examples\n\n```\nassert_eq!(2u64.pow(5), 32);\n```",
+ "docs": "Returns the memory representation of this integer as a byte array in\nbig-endian (network) byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x1234u16.to_be_bytes();\nassert_eq!(bytes, [0x12, 0x34]);\n```",
"id": 11254,
"inner": {
"function": {
@@ -102160,30 +100688,29 @@
{
"generic": "Self"
}
- ],
- [
- "exp",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "array": {
+ "len": "2",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
}
}
},
"links": {},
- "name": "pow",
+ "name": "to_be_bytes",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -102193,10 +100720,10 @@
"11255": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
@@ -102206,7 +100733,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the square root of the number, rounded down.\n\n# Examples\n\n```\nassert_eq!(10u64.isqrt(), 3);\n```",
+ "docs": "Returns the memory representation of this integer as a byte array in\nlittle-endian byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x1234u16.to_le_bytes();\nassert_eq!(bytes, [0x34, 0x12]);\n```",
"id": 11255,
"inner": {
"function": {
@@ -102232,20 +100759,25 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "array": {
+ "len": "2",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
}
}
},
"links": {},
- "name": "isqrt",
+ "name": "to_le_bytes",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -102255,23 +100787,20 @@
"11256": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Performs Euclidean division.\n\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7u64.div_euclid(4), 1); // or any other integer type\n```",
+ "docs": "Returns the memory representation of this integer as a byte array in\nnative byte order.\n\nAs the target platform's native endianness is used, portable code\nshould use [`to_be_bytes`] or [`to_le_bytes`], as appropriate,\ninstead.\n\n\n\n[`to_be_bytes`]: Self::to_be_bytes\n[`to_le_bytes`]: Self::to_le_bytes\n\n# Examples\n\n```\nlet bytes = 0x1234u16.to_ne_bytes();\nassert_eq!(\n bytes,\n if cfg!(target_endian = \"big\") {\n [0x12, 0x34]\n } else {\n [0x34, 0x12]\n }\n);\n```",
"id": 11256,
"inner": {
"function": {
@@ -102293,30 +100822,32 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u64"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "array": {
+ "len": "2",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
}
}
},
- "links": {},
- "name": "div_euclid",
+ "links": {
+ "Self::to_be_bytes": 11254,
+ "Self::to_le_bytes": 11255
+ },
+ "name": "to_ne_bytes",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -102326,26 +100857,20 @@
"11257": {
"attrs": [
{
- "other": "#[doc(alias = \"modulo\", alias = \"mod\")]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the least remainder of `self (mod rhs)`.\n\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self % rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7u64.rem_euclid(4), 3); // or any other integer type\n```",
+ "docs": "Creates a native endian integer value from its representation\nas a byte array in big endian.\n\n\n\n# Examples\n\n```\nlet value = u16::from_be_bytes([0x12, 0x34]);\nassert_eq!(value, 0x1234);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_be_u16(input: &mut &[u8]) -> u16 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n u16::from_be_bytes(int_bytes.try_into().unwrap())\n}\n```",
"id": 11257,
"inner": {
"function": {
@@ -102363,34 +100888,33 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "bytes",
{
- "primitive": "u64"
+ "array": {
+ "len": "2",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "rem_euclid",
+ "name": "from_be_bytes",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -102400,20 +100924,20 @@
"11258": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
- "other": "#[attr = TrackCaller]"
+ "must_use": {
+ "reason": null
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards negative infinity.\n\nThis is the same as performing `self / rhs` for all unsigned integers.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(7_u64.div_floor(4), 1);\n```",
+ "docs": "Creates a native endian integer value from its representation\nas a byte array in little endian.\n\n\n\n# Examples\n\n```\nlet value = u16::from_le_bytes([0x34, 0x12]);\nassert_eq!(value, 0x1234);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_le_u16(input: &mut &[u8]) -> u16 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n u16::from_le_bytes(int_bytes.try_into().unwrap())\n}\n```",
"id": 11258,
"inner": {
"function": {
@@ -102431,34 +100955,33 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "bytes",
{
- "primitive": "u64"
+ "array": {
+ "len": "2",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "div_floor",
+ "name": "from_le_bytes",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -102468,23 +100991,20 @@
"11259": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards positive infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7_u64.div_ceil(4), 2);\n```",
+ "docs": "Creates a native endian integer value from its memory representation\nas a byte array in native endianness.\n\nAs the target platform's native endianness is used, portable code\nlikely wants to use [`from_be_bytes`] or [`from_le_bytes`], as\nappropriate instead.\n\n[`from_be_bytes`]: Self::from_be_bytes\n[`from_le_bytes`]: Self::from_le_bytes\n\n\n\n# Examples\n\n```\nlet value = u16::from_ne_bytes(if cfg!(target_endian = \"big\") {\n [0x12, 0x34]\n} else {\n [0x34, 0x12]\n});\nassert_eq!(value, 0x1234);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_ne_u16(input: &mut &[u8]) -> u16 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n u16::from_ne_bytes(int_bytes.try_into().unwrap())\n}\n```",
"id": 11259,
"inner": {
"function": {
@@ -102502,34 +101022,36 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
+ "bytes",
{
- "primitive": "u64"
+ "array": {
+ "len": "2",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
- "links": {},
- "name": "div_ceil",
+ "links": {
+ "Self::from_be_bytes": 11257,
+ "Self::from_le_bytes": 11258
+ },
+ "name": "from_ne_bytes",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -102585,11 +101107,11 @@
"name": "len",
"span": {
"begin": [
- 2245,
+ 2240,
5
],
"end": [
- 2247,
+ 2242,
6
],
"filename": "std/src/collections/hash/map.rs"
@@ -102599,20 +101121,21 @@
"11260": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
+ "other": "#[rustc_diagnostic_item = \"u16_legacy_fn_min_value\"]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
}
],
"crate_id": 1,
- "deprecation": null,
- "docs": "Calculates the smallest value greater than or equal to `self` that\nis a multiple of `rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nOn overflow, this function will panic if overflow checks are enabled (default in debug\nmode) and wrap if overflow checks are disabled (default in release mode).\n\n# Examples\n\n```\nassert_eq!(16_u64.next_multiple_of(8), 16);\nassert_eq!(23_u64.next_multiple_of(8), 24);\n```",
+ "deprecation": {
+ "note": "replaced by the `MIN` associated constant on this type",
+ "since": "TBD"
+ },
+ "docs": "New code should prefer to use\n[`u16::MIN`] instead.\n\nReturns the smallest value that can be represented by this integer type.",
"id": 11260,
"inner": {
"function": {
@@ -102628,36 +101151,25 @@
"is_unsafe": false
},
"sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u64"
- }
- ]
- ],
+ "inputs": [],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u16"
}
}
}
},
- "links": {},
- "name": "next_multiple_of",
+ "links": {
+ "`u16::MIN`": 11131
+ },
+ "name": "min_value",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -102667,20 +101179,21 @@
"11261": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
+ "other": "#[rustc_diagnostic_item = \"u16_legacy_fn_max_value\"]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
}
],
"crate_id": 1,
- "deprecation": null,
- "docs": "Calculates the smallest value greater than or equal to `self` that\nis a multiple of `rhs`. Returns `None` if `rhs` is zero or the\noperation would result in overflow.\n\n# Examples\n\n```\nassert_eq!(16_u64.checked_next_multiple_of(8), Some(16));\nassert_eq!(23_u64.checked_next_multiple_of(8), Some(24));\nassert_eq!(1_u64.checked_next_multiple_of(0), None);\nassert_eq!(u64::MAX.checked_next_multiple_of(2), None);\n```",
+ "deprecation": {
+ "note": "replaced by the `MAX` associated constant on this type",
+ "since": "TBD"
+ },
+ "docs": "New code should prefer to use\n[`u16::MAX`] instead.\n\nReturns the largest value that can be represented by this integer type.",
"id": 11261,
"inner": {
"function": {
@@ -102696,51 +101209,25 @@
"is_unsafe": false
},
"sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u64"
- }
- ]
- ],
+ "inputs": [],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u64"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u16"
}
}
}
},
- "links": {},
- "name": "checked_next_multiple_of",
+ "links": {
+ "`u16::MAX`": 11132
+ },
+ "name": "max_value",
"span": {
"begin": [
- 1151,
+ 1084,
5
],
"end": [
- 1169,
+ 1105,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -102750,20 +101237,26 @@
"11262": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unsigned_is_multiple_of\",\npromotable: false}}]"
+ "other": "#[doc(alias = \"average_floor\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unsigned_is_multiple_of\"}}]"
+ "other": "#[doc(alias = \"average\")]"
+ },
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"num_midpoint\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"num_midpoint\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `true` if `self` is an integer multiple of `rhs`, and false otherwise.\n\nThis function is equivalent to `self % rhs == 0`, except that it will not panic\nfor `rhs == 0`. Instead, `0.is_multiple_of(0) == true`, and for any non-zero `n`,\n`n.is_multiple_of(0) == false`.\n\n# Examples\n\n```\nassert!(6_u64.is_multiple_of(2));\nassert!(!5_u64.is_multiple_of(2));\n\nassert!(0_u64.is_multiple_of(0));\nassert!(!6_u64.is_multiple_of(0));\n```",
+ "docs": "Calculates the midpoint (average) between `self` and `rhs`.\n\n`midpoint(a, b)` is `(a + b) / 2` as if it were performed in a\nsufficiently-large unsigned integral type. This implies that the result is\nalways rounded towards zero and that no overflow will ever occur.\n\n# Examples\n\n```\nassert_eq!(0u16.midpoint(4), 2);\nassert_eq!(1u16.midpoint(4), 2);\n```",
"id": 11262,
"inner": {
"function": {
@@ -102789,27 +101282,27 @@
[
"rhs",
{
- "primitive": "u64"
+ "primitive": "u16"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "primitive": "u16"
}
}
}
},
"links": {},
- "name": "is_multiple_of",
+ "name": "midpoint",
"span": {
"begin": [
- 1151,
+ 1106,
5
],
"end": [
- 1169,
- 6
+ 1106,
+ 42
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -102818,10 +101311,7 @@
"11263": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_is_power_of_two\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 94919, is_soft: false}, feature: \"utf16_extra\"}}]"
},
{
"must_use": {
@@ -102831,7 +101321,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `true` if and only if `self == 2^k` for some unsigned integer `k`.\n\n# Examples\n\n```\nassert!(16u64.is_power_of_two());\nassert!(!10u64.is_power_of_two());\n```",
+ "docs": "Checks if the value is a Unicode surrogate code point, which are disallowed values for [`char`].\n\n# Examples\n\n```\n#![feature(utf16_extra)]\n\nlet low_non_surrogate = 0xA000u16;\nlet low_surrogate = 0xD800u16;\nlet high_surrogate = 0xDC00u16;\nlet high_non_surrogate = 0xE000u16;\n\nassert!(!low_non_surrogate.is_utf16_surrogate());\nassert!(low_surrogate.is_utf16_surrogate());\nassert!(high_surrogate.is_utf16_surrogate());\nassert!(!high_non_surrogate.is_utf16_surrogate());\n```",
"id": 11263,
"inner": {
"function": {
@@ -102862,100 +101352,210 @@
}
}
},
- "links": {},
- "name": "is_power_of_two",
+ "links": {
+ "`char`": 2395
+ },
+ "name": "is_utf16_surrogate",
"span": {
"begin": [
- 1151,
+ 1128,
5
],
"end": [
- 1169,
- 6
+ 1128,
+ 50
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"11264": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
+ "attrs": [],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the smallest power of two greater than or equal to `self`.\n\nWhen return value overflows (i.e., `self > (1 << (N-1))` for type\n`uN`), it panics in debug mode and the return value is wrapped to 0 in\nrelease mode (the only situation in which this method can return 0).\n\n# Examples\n\n```\nassert_eq!(2u64.next_power_of_two(), 2);\nassert_eq!(3u64.next_power_of_two(), 4);\nassert_eq!(0u64.next_power_of_two(), 1);\n```",
+ "docs": null,
"id": 11264,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "u16"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "u64"
- }
- }
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 11131,
+ 11132,
+ 11133,
+ 11134,
+ 11135,
+ 11137,
+ 11138,
+ 11139,
+ 11140,
+ 11141,
+ 11142,
+ 11143,
+ 11144,
+ 11145,
+ 11146,
+ 11147,
+ 11148,
+ 11149,
+ 11150,
+ 11151,
+ 11152,
+ 11153,
+ 11154,
+ 11155,
+ 11156,
+ 11157,
+ 11158,
+ 11160,
+ 11161,
+ 11162,
+ 11163,
+ 11164,
+ 11166,
+ 11167,
+ 11168,
+ 11169,
+ 11170,
+ 11171,
+ 11173,
+ 11174,
+ 11175,
+ 11176,
+ 11177,
+ 11178,
+ 11179,
+ 11180,
+ 11181,
+ 11182,
+ 11183,
+ 11184,
+ 11185,
+ 11186,
+ 11136,
+ 11187,
+ 11188,
+ 11189,
+ 11190,
+ 11191,
+ 11192,
+ 11193,
+ 11194,
+ 11195,
+ 11196,
+ 11197,
+ 11198,
+ 11199,
+ 11200,
+ 11201,
+ 11202,
+ 11203,
+ 11204,
+ 11205,
+ 11206,
+ 11207,
+ 11208,
+ 11209,
+ 11210,
+ 11211,
+ 11212,
+ 11213,
+ 11159,
+ 11214,
+ 11165,
+ 11215,
+ 11172,
+ 11216,
+ 11217,
+ 11218,
+ 11219,
+ 11220,
+ 11221,
+ 11222,
+ 11223,
+ 11224,
+ 10482,
+ 11225,
+ 11226,
+ 10486,
+ 11227,
+ 11228,
+ 11230,
+ 11232,
+ 11229,
+ 11231,
+ 11233,
+ 11234,
+ 11235,
+ 11236,
+ 11237,
+ 11238,
+ 11239,
+ 11240,
+ 11241,
+ 11242,
+ 11243,
+ 11244,
+ 11245,
+ 11246,
+ 11247,
+ 11248,
+ 11249,
+ 11250,
+ 11251,
+ 11252,
+ 11253,
+ 11254,
+ 11255,
+ 11256,
+ 11257,
+ 11258,
+ 11259,
+ 11260,
+ 11261,
+ 11262,
+ 11263
+ ],
+ "provided_trait_methods": [],
+ "trait": null
}
},
"links": {},
- "name": "next_power_of_two",
+ "name": null,
"span": {
"begin": [
- 1151,
- 5
+ 1083,
+ 1
],
"end": [
- 1169,
- 6
+ 1083,
+ 9
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
"11265": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 82, patch: 0})}, feature: \"const_int_from_str\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the smallest power of two greater than or equal to `self`. If\nthe next power of two is greater than the type's maximum value,\n`None` is returned, otherwise the power of two is wrapped in `Some`.\n\n# Examples\n\n```\nassert_eq!(2u64.checked_next_power_of_two(), Some(2));\nassert_eq!(3u64.checked_next_power_of_two(), Some(4));\nassert_eq!(u64::MAX.checked_next_power_of_two(), None);\n```",
+ "docs": "Parses an integer from a string slice with digits in a given base.\n\nThe string is expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# See also\nIf the string to be parsed is in base 10 (decimal),\n[`from_str`] or [`str::parse`] can also be used.\n\n[`from_str`]: #method.from_str\n[`str::parse`]: primitive.str.html#method.parse\n\n# Examples\n\n```\nassert_eq!(u16::from_str_radix(\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\nassert!(u16::from_str_radix(\"1 \", 10).is_err());\n```",
"id": 11265,
"inner": {
"function": {
@@ -102973,9 +101573,21 @@
"sig": {
"inputs": [
[
- "self",
+ "src",
{
- "generic": "Self"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "primitive": "str"
+ }
+ }
+ }
+ ],
+ [
+ "radix",
+ {
+ "primitive": "u32"
}
]
],
@@ -102987,30 +101599,39 @@
"args": [
{
"type": {
- "primitive": "u64"
+ "primitive": "u16"
+ }
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 4786,
+ "path": "ParseIntError"
+ }
}
}
],
"constraints": []
}
},
- "id": 51,
- "path": "Option"
+ "id": 57,
+ "path": "Result"
}
}
}
}
},
"links": {},
- "name": "checked_next_power_of_two",
+ "name": "from_str_radix",
"span": {
"begin": [
- 1151,
- 5
+ 1667,
+ 1
],
"end": [
- 1169,
- 6
+ 1667,
+ 58
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -103019,17 +101640,12 @@
"11266": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"needs decision on wrapping behavior\"),\nissue: 32463, is_soft: false}, feature: \"wrapping_next_power_of_two\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the smallest power of two greater than or equal to `n`. If\nthe next power of two is greater than the type's maximum value,\nthe return value is wrapped to `0`.\n\n# Examples\n\n```\n#![feature(wrapping_next_power_of_two)]\n\nassert_eq!(2u64.wrapping_next_power_of_two(), 2);\nassert_eq!(3u64.wrapping_next_power_of_two(), 4);\nassert_eq!(u64::MAX.wrapping_next_power_of_two(), 0);\n```",
+ "docs": "Parses an integer from an ASCII-byte slice with decimal digits.\n\nThe characters are expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(u16::from_ascii(b\"+10\"), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(u16::from_ascii(b\"1 \").is_err());\n```",
"id": 11266,
"inner": {
"function": {
@@ -103047,29 +101663,61 @@
"sig": {
"inputs": [
[
- "self",
+ "src",
{
- "generic": "Self"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "slice": {
+ "primitive": "u8"
+ }
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u16"
+ }
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 4786,
+ "path": "ParseIntError"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 57,
+ "path": "Result"
+ }
}
}
}
},
"links": {},
- "name": "wrapping_next_power_of_two",
+ "name": "from_ascii",
"span": {
"begin": [
- 1151,
- 5
+ 1667,
+ 1
],
"end": [
- 1169,
- 6
+ 1667,
+ 58
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -103078,20 +101726,12 @@
"11267": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nbig-endian (network) byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x1234567890123456u64.to_be_bytes();\nassert_eq!(bytes, [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]);\n```",
+ "docs": "Parses an integer from an ASCII-byte slice with digits in a given base.\n\nThe characters are expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(u16::from_ascii_radix(b\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(u16::from_ascii_radix(b\"1 \", 10).is_err());\n```",
"id": 11267,
"inner": {
"function": {
@@ -103109,123 +101749,124 @@
"sig": {
"inputs": [
[
- "self",
+ "src",
{
- "generic": "Self"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "slice": {
+ "primitive": "u8"
+ }
+ }
+ }
+ }
+ ],
+ [
+ "radix",
+ {
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "array": {
- "len": "8",
- "type": {
- "primitive": "u8"
- }
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u16"
+ }
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 4786,
+ "path": "ParseIntError"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 57,
+ "path": "Result"
}
}
}
}
},
"links": {},
- "name": "to_be_bytes",
+ "name": "from_ascii_radix",
"span": {
"begin": [
- 1151,
- 5
+ 1667,
+ 1
],
"end": [
- 1169,
- 6
+ 1667,
+ 58
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"11268": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
+ "attrs": [],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nlittle-endian byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x1234567890123456u64.to_le_bytes();\nassert_eq!(bytes, [0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]);\n```",
+ "docs": null,
"id": 11268,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "u16"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "array": {
- "len": "8",
- "type": {
- "primitive": "u8"
- }
- }
- }
- }
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 11265,
+ 11266,
+ 11267
+ ],
+ "provided_trait_methods": [],
+ "trait": null
}
},
"links": {},
- "name": "to_le_bytes",
+ "name": null,
"span": {
"begin": [
- 1151,
- 5
+ 1667,
+ 1
],
"end": [
- 1169,
- 6
+ 1667,
+ 58
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
"11269": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 138215, is_soft: false}, feature: \"int_format_into\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nnative byte order.\n\nAs the target platform's native endianness is used, portable code\nshould use [`to_be_bytes`] or [`to_le_bytes`], as appropriate,\ninstead.\n\n\n\n[`to_be_bytes`]: Self::to_be_bytes\n[`to_le_bytes`]: Self::to_le_bytes\n\n# Examples\n\n```\nlet bytes = 0x1234567890123456u64.to_ne_bytes();\nassert_eq!(\n bytes,\n if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]\n } else {\n [0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]\n }\n);\n```",
+ "docs": "Allows users to write an integer (in signed decimal format) into a variable `buf` of\ntype [`NumBuffer`] that is passed by the caller by mutable reference.\n\n# Examples\n\n```\n#![feature(int_format_into)]\nuse core::fmt::NumBuffer;\n\nlet n = 0u16;\nlet mut buf = NumBuffer::new();\nassert_eq!(n.format_into(&mut buf), \"0\");\n\nlet n1 = 32u16;\nassert_eq!(n1.format_into(&mut buf), \"32\");\n\nlet n2 = u16 :: MAX;\nassert_eq!(n2.format_into(&mut buf), u16 :: MAX.to_string());\n```",
"id": 11269,
"inner": {
"function": {
@@ -103237,7 +101878,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -103247,14 +101888,42 @@
{
"generic": "Self"
}
+ ],
+ [
+ "buf",
+ {
+ "borrowed_ref": {
+ "is_mutable": true,
+ "lifetime": null,
+ "type": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u16"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 10387,
+ "path": "NumBuffer"
+ }
+ }
+ }
+ }
]
],
"is_c_variadic": false,
"output": {
- "array": {
- "len": "8",
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
"type": {
- "primitive": "u8"
+ "primitive": "str"
}
}
}
@@ -103262,20 +101931,19 @@
}
},
"links": {
- "Self::to_be_bytes": 11267,
- "Self::to_le_bytes": 11268
+ "`NumBuffer`": 10387
},
- "name": "to_ne_bytes",
+ "name": "format_into",
"span": {
"begin": [
- 1151,
+ 599,
5
],
"end": [
- 1169,
- 6
+ 599,
+ 95
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "checkouts/rust/library/core/src/fmt/num.rs"
},
"visibility": "public"
},
@@ -103361,11 +102029,11 @@
"name": null,
"span": {
"begin": [
- 2243,
+ 2238,
1
],
"end": [
- 2248,
+ 2243,
2
],
"filename": "std/src/collections/hash/map.rs"
@@ -103373,157 +102041,136 @@
"visibility": "default"
},
"11270": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
- },
- {
- "must_use": {
- "reason": null
- }
- }
- ],
+ "attrs": [],
"crate_id": 1,
"deprecation": null,
- "docs": "Creates a native endian integer value from its representation\nas a byte array in big endian.\n\n\n\n# Examples\n\n```\nlet value = u64::from_be_bytes([0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]);\nassert_eq!(value, 0x1234567890123456);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_be_u64(input: &mut &[u8]) -> u64 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n u64::from_be_bytes(int_bytes.try_into().unwrap())\n}\n```",
+ "docs": null,
"id": 11270,
"inner": {
- "function": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "u16"
+ },
"generics": {
"params": [],
"where_predicates": []
},
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 11269
+ ],
+ "provided_trait_methods": [],
+ "trait": null
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 599,
+ 5
+ ],
+ "end": [
+ 599,
+ 95
+ ],
+ "filename": "checkouts/rust/library/core/src/fmt/num.rs"
+ },
+ "visibility": "default"
+ },
+ "11271": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "The smallest value that can be represented by this integer type.\n\n# Examples\n\n```\nassert_eq!(u32::MIN, 0);\n```",
+ "id": 11271,
+ "inner": {
+ "assoc_const": {
+ "type": {
+ "primitive": "u32"
},
- "sig": {
- "inputs": [
- [
- "bytes",
- {
- "array": {
- "len": "8",
- "type": {
- "primitive": "u8"
- }
- }
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "u64"
- }
- }
+ "value": "0"
}
},
"links": {},
- "name": "from_be_bytes",
+ "name": "MIN",
"span": {
"begin": [
- 1151,
+ 1134,
5
],
"end": [
- 1169,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11271": {
+ "11272": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
- },
- {
- "must_use": {
- "reason": null
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 53, patch: 0})}, feature: \"int_bits_const\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Creates a native endian integer value from its representation\nas a byte array in little endian.\n\n\n\n# Examples\n\n```\nlet value = u64::from_le_bytes([0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]);\nassert_eq!(value, 0x1234567890123456);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_le_u64(input: &mut &[u8]) -> u64 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n u64::from_le_bytes(int_bytes.try_into().unwrap())\n}\n```",
- "id": 11271,
+ "docs": "The size of this integer type in bits.\n\n# Examples\n\n```\nassert_eq!(u32::BITS, 32);\n```",
+ "id": 11272,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
+ "assoc_const": {
+ "type": {
+ "primitive": "u32"
},
- "sig": {
- "inputs": [
- [
- "bytes",
- {
- "array": {
- "len": "8",
- "type": {
- "primitive": "u8"
- }
- }
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "u64"
- }
- }
+ "value": "_"
}
},
"links": {},
- "name": "from_le_bytes",
+ "name": "BITS",
"span": {
"begin": [
- 1151,
+ 1134,
5
],
"end": [
- 1169,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11272": {
+ "11273": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[doc(alias = \"popcount\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[doc(alias = \"popcnt\")]"
+ },
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Creates a native endian integer value from its memory representation\nas a byte array in native endianness.\n\nAs the target platform's native endianness is used, portable code\nlikely wants to use [`from_be_bytes`] or [`from_le_bytes`], as\nappropriate instead.\n\n[`from_be_bytes`]: Self::from_be_bytes\n[`from_le_bytes`]: Self::from_le_bytes\n\n\n\n# Examples\n\n```\nlet value = u64::from_ne_bytes(if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]\n} else {\n [0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]\n});\nassert_eq!(value, 0x1234567890123456);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_ne_u64(input: &mut &[u8]) -> u64 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n u64::from_ne_bytes(int_bytes.try_into().unwrap())\n}\n```",
- "id": 11272,
+ "docs": "Returns the number of ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 0b01001100u32;\nassert_eq!(n.count_ones(), 3);\n\nlet max = u32::MAX;\nassert_eq!(max.count_ones(), 32);\n\nlet zero = 0u32;\nassert_eq!(zero.count_ones(), 0);\n```",
+ "id": 11273,
"inner": {
"function": {
"generics": {
@@ -103540,61 +102187,52 @@
"sig": {
"inputs": [
[
- "bytes",
+ "self",
{
- "array": {
- "len": "8",
- "type": {
- "primitive": "u8"
- }
- }
+ "generic": "Self"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u32"
}
}
}
},
- "links": {
- "Self::from_be_bytes": 11270,
- "Self::from_le_bytes": 11271
- },
- "name": "from_ne_bytes",
+ "links": {},
+ "name": "count_ones",
"span": {
"begin": [
- 1151,
+ 1134,
5
],
"end": [
- 1169,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11273": {
+ "11274": {
"attrs": [
{
- "other": "#[rustc_diagnostic_item = \"u64_legacy_fn_min_value\"]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
- "deprecation": {
- "note": "replaced by the `MIN` associated constant on this type",
- "since": "TBD"
- },
- "docs": "New code should prefer to use\n[`u64::MIN`] instead.\n\nReturns the smallest value that can be represented by this integer type.",
- "id": 11273,
+ "deprecation": null,
+ "docs": "Returns the number of zeros in the binary representation of `self`.\n\n# Examples\n\n```\nlet zero = 0u32;\nassert_eq!(zero.count_zeros(), 32);\n\nlet max = u32::MAX;\nassert_eq!(max.count_zeros(), 0);\n```",
+ "id": 11274,
"inner": {
"function": {
"generics": {
@@ -103609,50 +102247,57 @@
"is_unsafe": false
},
"sig": {
- "inputs": [],
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u32"
}
}
}
},
- "links": {
- "`u64::MIN`": 11150
- },
- "name": "min_value",
+ "links": {},
+ "name": "count_zeros",
"span": {
"begin": [
- 1151,
+ 1134,
5
],
"end": [
- 1169,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11274": {
+ "11275": {
"attrs": [
{
- "other": "#[rustc_diagnostic_item = \"u64_legacy_fn_max_value\"]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
- "deprecation": {
- "note": "replaced by the `MAX` associated constant on this type",
- "since": "TBD"
- },
- "docs": "New code should prefer to use\n[`u64::MAX`] instead.\n\nReturns the largest value that can be represented by this integer type.",
- "id": 11274,
+ "deprecation": null,
+ "docs": "Returns the base 2 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is zero.\n\n# Examples\n\n```\nassert_eq!(2u32.ilog2(), 1);\n```",
+ "id": 11275,
"inner": {
"function": {
"generics": {
@@ -103667,44 +102312,43 @@
"is_unsafe": false
},
"sig": {
- "inputs": [],
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u32"
}
}
}
},
- "links": {
- "`u64::MAX`": 11151
- },
- "name": "max_value",
+ "links": {},
+ "name": "ilog2",
"span": {
"begin": [
- 1151,
+ 1134,
5
],
"end": [
- 1169,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11275": {
+ "11276": {
"attrs": [
{
- "other": "#[doc(alias = \"average_floor\")]"
- },
- {
- "other": "#[doc(alias = \"average\")]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"num_midpoint\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"num_midpoint\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -103714,8 +102358,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the midpoint (average) between `self` and `rhs`.\n\n`midpoint(a, b)` is `(a + b) / 2` as if it were performed in a\nsufficiently-large unsigned integral type. This implies that the result is\nalways rounded towards zero and that no overflow will ever occur.\n\n# Examples\n\n```\nassert_eq!(0u64.midpoint(4), 2);\nassert_eq!(1u64.midpoint(4), 2);\n```",
- "id": 11275,
+ "docs": "Returns the number of leading zeros in the binary representation of `self`.\n\nDepending on what you're doing with the value, you might also be interested in the\n[`ilog2`] function which returns a consistent number, even if the type widens.\n\n# Examples\n\n```\nlet n = u32::MAX >> 2;\nassert_eq!(n.leading_zeros(), 2);\n\nlet zero = 0u32;\nassert_eq!(zero.leading_zeros(), 32);\n\nlet max = u32::MAX;\nassert_eq!(max.leading_zeros(), 0);\n```\n[`ilog2`]: u32::ilog2",
+ "id": 11276,
"inner": {
"function": {
"generics": {
@@ -103736,216 +102380,49 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u64"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u32"
}
}
}
},
- "links": {},
- "name": "midpoint",
+ "links": {
+ "u32::ilog2": 11275
+ },
+ "name": "leading_zeros",
"span": {
"begin": [
- 1170,
+ 1134,
5
],
"end": [
- 1170,
- 43
+ 1155,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11276": {
- "attrs": [],
- "crate_id": 1,
- "deprecation": null,
- "docs": null,
- "id": 11276,
- "inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "primitive": "u64"
- },
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 11150,
- 11151,
- 11152,
- 11153,
- 11154,
- 11156,
- 11157,
- 11158,
- 11159,
- 11160,
- 11161,
- 11162,
- 11163,
- 11164,
- 11165,
- 11166,
- 11167,
- 11168,
- 11169,
- 11170,
- 11171,
- 11172,
- 11173,
- 11174,
- 11175,
- 11177,
- 11178,
- 11179,
- 11180,
- 11181,
- 11183,
- 11184,
- 11185,
- 11186,
- 11187,
- 11188,
- 11190,
- 11191,
- 11192,
- 11193,
- 11194,
- 11195,
- 11196,
- 11197,
- 11198,
- 11199,
- 11200,
- 11201,
- 11202,
- 11203,
- 11155,
- 11204,
- 11205,
- 11206,
- 11207,
- 11208,
- 11209,
- 11210,
- 11211,
- 11212,
- 11213,
- 11214,
- 11215,
- 11216,
- 11217,
- 11218,
- 11219,
- 11220,
- 11221,
- 11222,
- 11223,
- 11224,
- 11225,
- 11226,
- 11176,
- 11227,
- 11182,
- 11228,
- 11189,
- 11229,
- 11230,
- 11231,
- 11232,
- 11233,
- 11234,
- 11235,
- 11236,
- 11237,
- 10537,
- 11238,
- 11239,
- 10541,
- 11240,
- 11241,
- 11242,
- 11244,
- 11243,
- 11245,
- 11246,
- 11247,
- 11248,
- 11249,
- 11250,
- 11251,
- 11252,
- 11253,
- 11254,
- 11255,
- 11256,
- 11257,
- 11258,
- 11259,
- 11260,
- 11261,
- 11262,
- 11263,
- 11264,
- 11265,
- 11266,
- 11267,
- 11268,
- 11269,
- 11270,
- 11271,
- 11272,
- 11273,
- 11274,
- 11275
- ],
- "provided_trait_methods": [],
- "trait": null
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 1150,
- 1
- ],
- "end": [
- 1150,
- 9
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "default"
- },
"11277": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 82, patch: 0})}, feature: \"const_int_from_str\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from a string slice with digits in a given base.\n\nThe string is expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\nassert_eq!(u64::from_str_radix(\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\nassert!(u64::from_str_radix(\"1 \", 10).is_err());\n```",
+ "docs": "Returns the number of trailing zeros in the binary representation\nof `self`.\n\n# Examples\n\n```\nlet n = 0b0101000u32;\nassert_eq!(n.trailing_zeros(), 3);\n\nlet zero = 0u32;\nassert_eq!(zero.trailing_zeros(), 32);\n\nlet max = u32::MAX;\nassert_eq!(max.trailing_zeros(), 0);\n```",
"id": 11277,
"inner": {
"function": {
@@ -103963,65 +102440,29 @@
"sig": {
"inputs": [
[
- "src",
- {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "primitive": "str"
- }
- }
- }
- ],
- [
- "radix",
+ "self",
{
- "primitive": "u32"
+ "generic": "Self"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u64"
- }
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 4784,
- "path": "ParseIntError"
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 57,
- "path": "Result"
- }
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "from_str_radix",
+ "name": "trailing_zeros",
"span": {
"begin": [
- 1631,
- 1
+ 1134,
+ 5
],
"end": [
- 1631,
- 58
+ 1155,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -104030,12 +102471,20 @@
"11278": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from an ASCII-byte slice with decimal digits.\n\nThe characters are expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(u64::from_ascii(b\"+10\"), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(u64::from_ascii(b\"1 \").is_err());\n```",
+ "docs": "Returns the number of leading ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = !(u32::MAX >> 2);\nassert_eq!(n.leading_ones(), 2);\n\nlet zero = 0u32;\nassert_eq!(zero.leading_ones(), 0);\n\nlet max = u32::MAX;\nassert_eq!(max.leading_ones(), 32);\n```",
"id": 11278,
"inner": {
"function": {
@@ -104053,61 +102502,29 @@
"sig": {
"inputs": [
[
- "src",
+ "self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "slice": {
- "primitive": "u8"
- }
- }
- }
+ "generic": "Self"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u64"
- }
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 4784,
- "path": "ParseIntError"
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 57,
- "path": "Result"
- }
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "from_ascii",
+ "name": "leading_ones",
"span": {
"begin": [
- 1631,
- 1
+ 1134,
+ 5
],
"end": [
- 1631,
- 58
+ 1155,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -104116,12 +102533,20 @@
"11279": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from an ASCII-byte slice with digits in a given base.\n\nThe characters are expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(u64::from_ascii_radix(b\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(u64::from_ascii_radix(b\"1 \", 10).is_err());\n```",
+ "docs": "Returns the number of trailing ones in the binary representation\nof `self`.\n\n# Examples\n\n```\nlet n = 0b1010111u32;\nassert_eq!(n.trailing_ones(), 3);\n\nlet zero = 0u32;\nassert_eq!(zero.trailing_ones(), 0);\n\nlet max = u32::MAX;\nassert_eq!(max.trailing_ones(), 32);\n```",
"id": 11279,
"inner": {
"function": {
@@ -104139,67 +102564,29 @@
"sig": {
"inputs": [
[
- "src",
- {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "slice": {
- "primitive": "u8"
- }
- }
- }
- }
- ],
- [
- "radix",
+ "self",
{
- "primitive": "u32"
+ "generic": "Self"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u64"
- }
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 4784,
- "path": "ParseIntError"
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 57,
- "path": "Result"
- }
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "from_ascii_radix",
+ "name": "trailing_ones",
"span": {
"begin": [
- 1631,
- 1
+ 1134,
+ 5
],
"end": [
- 1631,
- 58
+ 1155,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
@@ -104282,11 +102669,11 @@
"name": null,
"span": {
"begin": [
- 2250,
+ 2245,
1
],
"end": [
- 2250,
+ 2245,
49
],
"filename": "std/src/collections/hash/map.rs"
@@ -104294,57 +102681,78 @@
"visibility": "default"
},
"11280": {
- "attrs": [],
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 142326, is_soft: false}, feature: \"uint_bit_width\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Returns the minimum number of bits required to represent `self`.\n\nThis method returns zero if `self` is zero.\n\n# Examples\n\n```\n#![feature(uint_bit_width)]\n\nassert_eq!(0_u32.bit_width(), 0);\nassert_eq!(0b111_u32.bit_width(), 3);\nassert_eq!(0b1110_u32.bit_width(), 4);\nassert_eq!(u32::MAX.bit_width(), 32);\n```",
"id": 11280,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "primitive": "u64"
- },
+ "function": {
"generics": {
"params": [],
"where_predicates": []
},
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 11277,
- 11278,
- 11279
- ],
- "provided_trait_methods": [],
- "trait": null
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u32"
+ }
+ }
}
},
"links": {},
- "name": null,
+ "name": "bit_width",
"span": {
"begin": [
- 1631,
- 1
+ 1134,
+ 5
],
"end": [
- 1631,
- 58
+ 1155,
+ 6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"11281": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 138215, is_soft: false}, feature: \"int_format_into\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Allows users to write an integer (in signed decimal format) into a variable `buf` of\ntype [`NumBuffer`] that is passed by the caller by mutable reference.\n\n# Examples\n\n```\n#![feature(int_format_into)]\nuse core::fmt::NumBuffer;\n\nlet n = 0u64;\nlet mut buf = NumBuffer::new();\nassert_eq!(n.format_into(&mut buf), \"0\");\n\nlet n1 = 32u64;\nassert_eq!(n1.format_into(&mut buf), \"32\");\n\nlet n2 = u64 :: MAX;\nassert_eq!(n2.format_into(&mut buf), u64 :: MAX.to_string());\n```",
+ "docs": "Returns `self` with only the most significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: u32 = 0b_01100100;\n\nassert_eq!(n.isolate_highest_one(), 0b_01000000);\nassert_eq!(0_u32.isolate_highest_one(), 0);\n```",
"id": 11281,
"inner": {
"function": {
@@ -104356,7 +102764,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -104366,133 +102774,157 @@
{
"generic": "Self"
}
- ],
- [
- "buf",
- {
- "borrowed_ref": {
- "is_mutable": true,
- "lifetime": null,
- "type": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u64"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 10162,
- "path": "NumBuffer"
- }
- }
- }
- }
]
],
"is_c_variadic": false,
"output": {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "primitive": "str"
- }
- }
+ "primitive": "u32"
}
}
}
},
- "links": {
- "`NumBuffer`": 10162
- },
- "name": "format_into",
+ "links": {},
+ "name": "isolate_highest_one",
"span": {
"begin": [
- 562,
+ 1134,
5
],
"end": [
- 562,
- 95
+ 1155,
+ 6
],
- "filename": "checkouts/rust/library/core/src/fmt/num.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
"11282": {
- "attrs": [],
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Returns `self` with only the least significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: u32 = 0b_01100100;\n\nassert_eq!(n.isolate_lowest_one(), 0b_00000100);\nassert_eq!(0_u32.isolate_lowest_one(), 0);\n```",
"id": 11282,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "primitive": "u64"
- },
+ "function": {
"generics": {
"params": [],
"where_predicates": []
},
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 11281
- ],
- "provided_trait_methods": [],
- "trait": null
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u32"
+ }
+ }
}
},
"links": {},
- "name": null,
+ "name": "isolate_lowest_one",
"span": {
"begin": [
- 562,
+ 1134,
5
],
"end": [
- 562,
- 95
+ 1155,
+ 6
],
- "filename": "checkouts/rust/library/core/src/fmt/num.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"11283": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "The smallest value that can be represented by this integer type.\n\n# Examples\n\n```\nassert_eq!(u128::MIN, 0);\n```",
+ "docs": "Returns the index of the highest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_u32.highest_one(), None);\nassert_eq!(0x1_u32.highest_one(), Some(0));\nassert_eq!(0x10_u32.highest_one(), Some(4));\nassert_eq!(0x1f_u32.highest_one(), Some(4));\n```",
"id": 11283,
"inner": {
- "assoc_const": {
- "type": {
- "primitive": "u128"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "value": "0"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
}
},
"links": {},
- "name": "MIN",
+ "name": "highest_one",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -104502,30 +102934,71 @@
"11284": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "The largest value that can be represented by this integer type\n(2128 − 1).\n\n# Examples\n\n```\nassert_eq!(u128::MAX, 340282366920938463463374607431768211455);\n```",
+ "docs": "Returns the index of the lowest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_u32.lowest_one(), None);\nassert_eq!(0x1_u32.lowest_one(), Some(0));\nassert_eq!(0x10_u32.lowest_one(), Some(4));\nassert_eq!(0x1f_u32.lowest_one(), Some(0));\n```",
"id": 11284,
"inner": {
- "assoc_const": {
- "type": {
- "primitive": "u128"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "value": "_"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
}
},
"links": {},
- "name": "MAX",
+ "name": "lowest_one",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -104535,30 +103008,59 @@
"11285": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 53, patch: 0})}, feature: \"int_bits_const\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "The size of this integer type in bits.\n\n# Examples\n\n```\nassert_eq!(u128::BITS, 128);\n```",
+ "docs": "Returns the bit pattern of `self` reinterpreted as a signed integer of the same size.\n\nThis produces the same result as an `as` cast, but ensures that the bit-width remains\nthe same.\n\n# Examples\n\n```\nlet n = u32::MAX;\n\nassert_eq!(n.cast_signed(), -1i32);\n```",
"id": 11285,
"inner": {
- "assoc_const": {
- "type": {
- "primitive": "u32"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "value": "_"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "i32"
+ }
+ }
}
},
"links": {},
- "name": "BITS",
+ "name": "cast_signed",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -104567,12 +103069,6 @@
},
"11286": {
"attrs": [
- {
- "other": "#[doc(alias = \"popcount\")]"
- },
- {
- "other": "#[doc(alias = \"popcnt\")]"
- },
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
@@ -104587,7 +103083,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 0b01001100u128;\nassert_eq!(n.count_ones(), 3);\n\nlet max = u128::MAX;\nassert_eq!(max.count_ones(), 128);\n\nlet zero = 0u128;\nassert_eq!(zero.count_ones(), 0);\n```",
+ "docs": "Shifts the bits to the left by a specified amount, `n`,\nwrapping the truncated bits to the end of the resulting integer.\n\nPlease note this isn't the same operation as the `<<` shifting operator!\n\n# Examples\n\n```\nlet n = 0x10000b3u32;\nlet m = 0xb301;\n\nassert_eq!(n.rotate_left(8), m);\n```",
"id": 11286,
"inner": {
"function": {
@@ -104609,6 +103105,12 @@
{
"generic": "Self"
}
+ ],
+ [
+ "n",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
@@ -104619,14 +103121,14 @@
}
},
"links": {},
- "name": "count_ones",
+ "name": "rotate_left",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -104649,7 +103151,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of zeros in the binary representation of `self`.\n\n# Examples\n\n```\nlet zero = 0u128;\nassert_eq!(zero.count_zeros(), 128);\n\nlet max = u128::MAX;\nassert_eq!(max.count_zeros(), 0);\n```",
+ "docs": "Shifts the bits to the right by a specified amount, `n`,\nwrapping the truncated bits to the beginning of the resulting\ninteger.\n\nPlease note this isn't the same operation as the `>>` shifting operator!\n\n# Examples\n\n```\nlet n = 0xb301u32;\nlet m = 0x10000b3;\n\nassert_eq!(n.rotate_right(8), m);\n```",
"id": 11287,
"inner": {
"function": {
@@ -104671,6 +103173,12 @@
{
"generic": "Self"
}
+ ],
+ [
+ "n",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
@@ -104681,14 +103189,14 @@
}
},
"links": {},
- "name": "count_zeros",
+ "name": "rotate_right",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -104698,23 +103206,20 @@
"11288": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 145686, is_soft: false}, feature: \"funnel_shifts\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145686, is_soft: false}, feature: \"funnel_shifts\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 2 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is zero.\n\n# Examples\n\n```\nassert_eq!(2u128.ilog2(), 1);\n```",
+ "docs": "Performs a left funnel shift (concatenates `self` with `rhs`, with `self`\nmaking up the most significant half, then shifts the combined value left\nby `n`, and most significant half is extracted to produce the result).\n\nPlease note this isn't the same operation as the `<<` shifting operator or\n[`rotate_left`](Self::rotate_left), although `a.funnel_shl(a, n)` is *equivalent*\nto `a.rotate_left(n)`.\n\n# Panics\n\nIf `n` is greater than or equal to the number of bits in `self`\n\n# Examples\n\nBasic usage:\n\n```\n#![feature(funnel_shifts)]\nlet a = 0x10000b3u32;\nlet b = 0x2fe78e45u32;\nlet m = 0xb32f;\n\nassert_eq!(a.funnel_shl(b, 8), m);\n```",
"id": 11288,
"inner": {
"function": {
@@ -104736,6 +103241,18 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ],
+ [
+ "n",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
@@ -104745,15 +103262,17 @@
}
}
},
- "links": {},
- "name": "ilog2",
+ "links": {
+ "Self::rotate_left": 11286
+ },
+ "name": "funnel_shl",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -104763,10 +103282,10 @@
"11289": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 145686, is_soft: false}, feature: \"funnel_shifts\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145686, is_soft: false}, feature: \"funnel_shifts\"}}]"
},
{
"must_use": {
@@ -104776,7 +103295,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of leading zeros in the binary representation of `self`.\n\nDepending on what you're doing with the value, you might also be interested in the\n[`ilog2`] function which returns a consistent number, even if the type widens.\n\n# Examples\n\n```\nlet n = u128::MAX >> 2;\nassert_eq!(n.leading_zeros(), 2);\n\nlet zero = 0u128;\nassert_eq!(zero.leading_zeros(), 128);\n\nlet max = u128::MAX;\nassert_eq!(max.leading_zeros(), 0);\n```\n[`ilog2`]: u128::ilog2",
+ "docs": "Performs a right funnel shift (concatenates `self` and `rhs`, with `self`\nmaking up the most significant half, then shifts the combined value right\nby `n`, and least significant half is extracted to produce the result).\n\nPlease note this isn't the same operation as the `>>` shifting operator or\n[`rotate_right`](Self::rotate_right), although `a.funnel_shr(a, n)` is *equivalent*\nto `a.rotate_right(n)`.\n\n# Panics\n\nIf `n` is greater than or equal to the number of bits in `self`\n\n# Examples\n\nBasic usage:\n\n```\n#![feature(funnel_shifts)]\nlet a = 0x10000b3u32;\nlet b = 0x2fe78e45u32;\nlet m = 0xb32fe78e;\n\nassert_eq!(a.funnel_shr(b, 8), m);\n```",
"id": 11289,
"inner": {
"function": {
@@ -104798,6 +103317,18 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ],
+ [
+ "n",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
@@ -104808,16 +103339,16 @@
}
},
"links": {
- "u128::ilog2": 11288
+ "Self::rotate_right": 11287
},
- "name": "leading_zeros",
+ "name": "funnel_shr",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -104875,7 +103406,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -104887,7 +103418,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -104898,11 +103429,11 @@
"name": "fmt",
"span": {
"begin": [
- 2254,
+ 2249,
5
],
"end": [
- 2256,
+ 2251,
6
],
"filename": "std/src/collections/hash/map.rs"
@@ -104925,7 +103456,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of trailing zeros in the binary representation\nof `self`.\n\n# Examples\n\n```\nlet n = 0b0101000u128;\nassert_eq!(n.trailing_zeros(), 3);\n\nlet zero = 0u128;\nassert_eq!(zero.trailing_zeros(), 128);\n\nlet max = u128::MAX;\nassert_eq!(max.trailing_zeros(), 0);\n```",
+ "docs": "Reverses the byte order of the integer.\n\n# Examples\n\n```\nlet n = 0x12345678u32;\nlet m = n.swap_bytes();\n\nassert_eq!(m, 0x78563412);\n```",
"id": 11290,
"inner": {
"function": {
@@ -104957,14 +103488,14 @@
}
},
"links": {},
- "name": "trailing_zeros",
+ "name": "swap_bytes",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -104974,10 +103505,10 @@
"11291": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\"}}]"
},
{
"must_use": {
@@ -104987,7 +103518,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of leading ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = !(u128::MAX >> 2);\nassert_eq!(n.leading_ones(), 2);\n\nlet zero = 0u128;\nassert_eq!(zero.leading_ones(), 0);\n\nlet max = u128::MAX;\nassert_eq!(max.leading_ones(), 128);\n```",
+ "docs": "Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\n second least-significant bit becomes second most-significant bit, etc.\n\n# Examples\n\n```\nlet n = 0x12345678u32;\nlet m = n.reverse_bits();\n\nassert_eq!(m, 0x1e6a2c48);\nassert_eq!(0, 0u32.reverse_bits());\n```",
"id": 11291,
"inner": {
"function": {
@@ -105019,14 +103550,14 @@
}
},
"links": {},
- "name": "leading_ones",
+ "name": "reverse_bits",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -105036,20 +103567,20 @@
"11292": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of trailing ones in the binary representation\nof `self`.\n\n# Examples\n\n```\nlet n = 0b1010111u128;\nassert_eq!(n.trailing_ones(), 3);\n\nlet zero = 0u128;\nassert_eq!(zero.trailing_ones(), 0);\n\nlet max = u128::MAX;\nassert_eq!(max.trailing_ones(), 128);\n```",
+ "docs": "Converts an integer from big endian to the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au32;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(u32::from_be(n), n)\n} else {\n assert_eq!(u32::from_be(n), n.swap_bytes())\n}\n```",
"id": 11292,
"inner": {
"function": {
@@ -105067,9 +103598,9 @@
"sig": {
"inputs": [
[
- "self",
+ "x",
{
- "generic": "Self"
+ "primitive": "u32"
}
]
],
@@ -105081,14 +103612,14 @@
}
},
"links": {},
- "name": "trailing_ones",
+ "name": "from_be",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -105098,17 +103629,20 @@
"11293": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 142326, is_soft: false}, feature: \"uint_bit_width\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the minimum number of bits required to represent `self`.\n\nThis method returns zero if `self` is zero.\n\n# Examples\n\n```\n#![feature(uint_bit_width)]\n\nassert_eq!(0_u128.bit_width(), 0);\nassert_eq!(0b111_u128.bit_width(), 3);\nassert_eq!(0b1110_u128.bit_width(), 4);\nassert_eq!(u128::MAX.bit_width(), 128);\n```",
+ "docs": "Converts an integer from little endian to the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au32;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(u32::from_le(n), n)\n} else {\n assert_eq!(u32::from_le(n), n.swap_bytes())\n}\n```",
"id": 11293,
"inner": {
"function": {
@@ -105126,9 +103660,9 @@
"sig": {
"inputs": [
[
- "self",
+ "x",
{
- "generic": "Self"
+ "primitive": "u32"
}
]
],
@@ -105140,14 +103674,14 @@
}
},
"links": {},
- "name": "bit_width",
+ "name": "from_le",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -105157,7 +103691,10 @@
"11294": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -105167,7 +103704,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `self` with only the most significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: u128 = 0b_01100100;\n\nassert_eq!(n.isolate_highest_one(), 0b_01000000);\nassert_eq!(0_u128.isolate_highest_one(), 0);\n```",
+ "docs": "Converts `self` to big endian from the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au32;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(n.to_be(), n)\n} else {\n assert_eq!(n.to_be(), n.swap_bytes())\n}\n```",
"id": 11294,
"inner": {
"function": {
@@ -105193,20 +103730,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "isolate_highest_one",
+ "name": "to_be",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -105216,7 +103753,10 @@
"11295": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -105226,7 +103766,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `self` with only the least significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: u128 = 0b_01100100;\n\nassert_eq!(n.isolate_lowest_one(), 0b_00000100);\nassert_eq!(0_u128.isolate_lowest_one(), 0);\n```",
+ "docs": "Converts `self` to little endian from the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au32;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(n.to_le(), n)\n} else {\n assert_eq!(n.to_le(), n.swap_bytes())\n}\n```",
"id": 11295,
"inner": {
"function": {
@@ -105252,20 +103792,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "isolate_lowest_one",
+ "name": "to_le",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -105275,7 +103815,10 @@
"11296": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -105285,7 +103828,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the index of the highest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_u128.highest_one(), None);\nassert_eq!(0x1_u128.highest_one(), Some(0));\nassert_eq!(0x10_u128.highest_one(), Some(4));\nassert_eq!(0x1f_u128.highest_one(), Some(4));\n```",
+ "docs": "Checked integer addition. Computes `self + rhs`, returning `None`\nif overflow occurred.\n\n# Examples\n\n```\nassert_eq!((u32::MAX - 2).checked_add(1), Some(u32::MAX - 1));\nassert_eq!((u32::MAX - 2).checked_add(3), None);\n```",
"id": 11296,
"inner": {
"function": {
@@ -105307,6 +103850,12 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
@@ -105332,14 +103881,14 @@
}
},
"links": {},
- "name": "highest_one",
+ "name": "checked_add",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -105349,17 +103898,23 @@
"11297": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the index of the lowest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_u128.lowest_one(), None);\nassert_eq!(0x1_u128.lowest_one(), Some(0));\nassert_eq!(0x10_u128.lowest_one(), Some(4));\nassert_eq!(0x1f_u128.lowest_one(), Some(0));\n```",
+ "docs": "Strict integer addition. Computes `self + rhs`, panicking\nif overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((u32::MAX - 2).strict_add(1), u32::MAX - 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (u32::MAX - 2).strict_add(3);\n```",
"id": 11297,
"inner": {
"function": {
@@ -105381,39 +103936,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "lowest_one",
+ "name": "strict_add",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -105423,10 +103969,10 @@
"11298": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -105436,7 +103982,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the bit pattern of `self` reinterpreted as a signed integer of the same size.\n\nThis produces the same result as an `as` cast, but ensures that the bit-width remains\nthe same.\n\n# Examples\n\n```\nlet n = u128::MAX;\n\nassert_eq!(n.cast_signed(), -1i128);\n```",
+ "docs": "Wrapping (modular) addition. Computes `self + rhs`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(200u32.wrapping_add(55), 255);\nassert_eq!(200u32.wrapping_add(u32::MAX), 199);\n```",
"id": 11298,
"inner": {
"function": {
@@ -105458,24 +104004,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "i128"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "cast_signed",
+ "name": "wrapping_add",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -105485,20 +104037,23 @@
"11299": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts the bits to the left by a specified amount, `n`,\nwrapping the truncated bits to the end of the resulting integer.\n\nPlease note this isn't the same operation as the `<<` shifting operator!\n\n# Examples\n\n```\nlet n = 0x13f40000000000000000000000004f76u128;\nlet m = 0x4f7613f4;\n\nassert_eq!(n.rotate_left(16), m);\n```",
+ "docs": "Unchecked integer addition. Computes `self + rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_add(y)` is semantically equivalent to calling\n`x.`[`checked_add`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_add`].\n\n# Safety\n\nThis results in undefined behavior when\n`self + rhs > u32::MAX` or `self + rhs < u32::MIN`,\ni.e. when [`checked_add`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_add`]: u32::checked_add\n[`wrapping_add`]: u32::wrapping_add",
"id": 11299,
"inner": {
"function": {
@@ -105511,7 +104066,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -105522,7 +104077,7 @@
}
],
[
- "n",
+ "rhs",
{
"primitive": "u32"
}
@@ -105530,20 +104085,23 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
- "links": {},
- "name": "rotate_left",
+ "links": {
+ "u32::checked_add": 11296,
+ "u32::wrapping_add": 11298
+ },
+ "name": "unchecked_add",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -105608,7 +104166,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -105632,7 +104190,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -105641,11 +104199,11 @@
"name": null,
"span": {
"begin": [
- 2253,
+ 2248,
1
],
"end": [
- 2257,
+ 2252,
2
],
"filename": "std/src/collections/hash/map.rs"
@@ -105655,10 +104213,10 @@
"11300": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -105668,7 +104226,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts the bits to the right by a specified amount, `n`,\nwrapping the truncated bits to the beginning of the resulting\ninteger.\n\nPlease note this isn't the same operation as the `>>` shifting operator!\n\n# Examples\n\n```\nlet n = 0x4f7613f4u128;\nlet m = 0x13f40000000000000000000000004f76;\n\nassert_eq!(n.rotate_right(16), m);\n```",
+ "docs": "Checked addition with a signed integer. Computes `self + rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1u32.checked_add_signed(2), Some(3));\nassert_eq!(1u32.checked_add_signed(-2), None);\nassert_eq!((u32::MAX - 2).checked_add_signed(3), None);\n```",
"id": 11300,
"inner": {
"function": {
@@ -105692,28 +104250,43 @@
}
],
[
- "n",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "rotate_right",
+ "name": "checked_add_signed",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -105723,20 +104296,23 @@
"11301": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Reverses the byte order of the integer.\n\n# Examples\n\n```\nlet n = 0x12345678901234567890123456789012u128;\nlet m = n.swap_bytes();\n\nassert_eq!(m, 0x12907856341290785634129078563412);\n```",
+ "docs": "Strict addition with a signed integer. Computes `self + rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1u32.strict_add_signed(2), 3);\n```\n\nThe following panic because of overflow:\n\n```should_panic\nlet _ = 1u32.strict_add_signed(-2);\n```\n\n```should_panic\nlet _ = (u32::MAX - 2).strict_add_signed(3);\n```",
"id": 11301,
"inner": {
"function": {
@@ -105758,24 +104334,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "swap_bytes",
+ "name": "strict_add_signed",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -105785,10 +104367,10 @@
"11302": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -105798,7 +104380,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\n second least-significant bit becomes second most-significant bit, etc.\n\n# Examples\n\n```\nlet n = 0x12345678901234567890123456789012u128;\nlet m = n.reverse_bits();\n\nassert_eq!(m, 0x48091e6a2c48091e6a2c48091e6a2c48);\nassert_eq!(0, 0u128.reverse_bits());\n```",
+ "docs": "Checked integer subtraction. Computes `self - rhs`, returning\n`None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1u32.checked_sub(1), Some(0));\nassert_eq!(0u32.checked_sub(1), None);\n```",
"id": 11302,
"inner": {
"function": {
@@ -105820,24 +104402,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "reverse_bits",
+ "name": "checked_sub",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -105847,20 +104450,23 @@
"11303": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts an integer from big endian to the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au128;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(u128::from_be(n), n)\n} else {\n assert_eq!(u128::from_be(n), n.swap_bytes())\n}\n```",
+ "docs": "Strict integer subtraction. Computes `self - rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1u32.strict_sub(1), 0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0u32.strict_sub(1);\n```",
"id": 11303,
"inner": {
"function": {
@@ -105878,28 +104484,34 @@
"sig": {
"inputs": [
[
- "x",
+ "self",
{
- "primitive": "u128"
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "from_be",
+ "name": "strict_sub",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -105909,20 +104521,20 @@
"11304": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts an integer from little endian to the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au128;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(u128::from_le(n), n)\n} else {\n assert_eq!(u128::from_le(n), n.swap_bytes())\n}\n```",
+ "docs": "Wrapping (modular) subtraction. Computes `self - rhs`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(100u32.wrapping_sub(100), 0);\nassert_eq!(100u32.wrapping_sub(u32::MAX), 101);\n```",
"id": 11304,
"inner": {
"function": {
@@ -105940,28 +104552,34 @@
"sig": {
"inputs": [
[
- "x",
+ "self",
{
- "primitive": "u128"
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "from_le",
+ "name": "wrapping_sub",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -105971,20 +104589,23 @@
"11305": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts `self` to big endian from the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au128;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(n.to_be(), n)\n} else {\n assert_eq!(n.to_be(), n.swap_bytes())\n}\n```",
+ "docs": "Unchecked integer subtraction. Computes `self - rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_sub(y)` is semantically equivalent to calling\n`x.`[`checked_sub`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_sub`].\n\nIf you find yourself writing code like this:\n\n```\n# let foo = 30_u32;\n# let bar = 20;\nif foo >= bar {\n // SAFETY: just checked it will not overflow\n let diff = unsafe { foo.unchecked_sub(bar) };\n // ... use diff ...\n}\n```\n\nConsider changing it to\n\n```\n# let foo = 30_u32;\n# let bar = 20;\nif let Some(diff) = foo.checked_sub(bar) {\n // ... use diff ...\n}\n```\n\nAs that does exactly the same thing -- including telling the optimizer\nthat the subtraction cannot overflow -- but avoids needing `unsafe`.\n\n# Safety\n\nThis results in undefined behavior when\n`self - rhs > u32::MAX` or `self - rhs < u32::MIN`,\ni.e. when [`checked_sub`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_sub`]: u32::checked_sub\n[`wrapping_sub`]: u32::wrapping_sub",
"id": 11305,
"inner": {
"function": {
@@ -105997,7 +104618,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -106006,24 +104627,33 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
- "links": {},
- "name": "to_be",
+ "links": {
+ "u32::checked_sub": 11302,
+ "u32::wrapping_sub": 11304
+ },
+ "name": "unchecked_sub",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -106033,10 +104663,10 @@
"11306": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
},
{
"must_use": {
@@ -106046,7 +104676,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts `self` to little endian from the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au128;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(n.to_le(), n)\n} else {\n assert_eq!(n.to_le(), n.swap_bytes())\n}\n```",
+ "docs": "Checked subtraction with a signed integer. Computes `self - rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1u32.checked_sub_signed(2), None);\nassert_eq!(1u32.checked_sub_signed(-2), Some(3));\nassert_eq!((u32::MAX - 2).checked_sub_signed(-4), None);\n```",
"id": 11306,
"inner": {
"function": {
@@ -106068,24 +104698,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "to_le",
+ "name": "checked_sub_signed",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -106095,20 +104746,23 @@
"11307": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer addition. Computes `self + rhs`, returning `None`\nif overflow occurred.\n\n# Examples\n\n```\nassert_eq!((u128::MAX - 2).checked_add(1), Some(u128::MAX - 1));\nassert_eq!((u128::MAX - 2).checked_add(3), None);\n```",
+ "docs": "Strict subtraction with a signed integer. Computes `self - rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(3u32.strict_sub_signed(2), 1);\n```\n\nThe following panic because of overflow:\n\n```should_panic\nlet _ = 1u32.strict_sub_signed(2);\n```\n\n```should_panic\nlet _ = (u32::MAX).strict_sub_signed(-1);\n```",
"id": 11307,
"inner": {
"function": {
@@ -106134,41 +104788,26 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u128"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "checked_add",
+ "name": "strict_sub_signed",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -106178,23 +104817,15 @@
"11308": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_signed_diff\", promotable: false}}]"
},
{
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_signed_diff\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer addition. Computes `self + rhs`, panicking\nif overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((u128::MAX - 2).strict_add(1), u128::MAX - 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (u128::MAX - 2).strict_add(3);\n```",
+ "docs": "Checked integer subtraction. Computes `self - rhs` and checks if the result fits into an [`i32`], returning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(10u32.checked_signed_diff(2), Some(8));\nassert_eq!(2u32.checked_signed_diff(10), Some(-8));\nassert_eq!(u32::MAX.checked_signed_diff(i32::MAX as u32), None);\nassert_eq!((i32::MAX as u32).checked_signed_diff(u32::MAX), Some(i32::MIN));\nassert_eq!((i32::MAX as u32 + 1).checked_signed_diff(0), None);\nassert_eq!(u32::MAX.checked_signed_diff(u32::MAX), Some(0));\n```",
"id": 11308,
"inner": {
"function": {
@@ -106220,26 +104851,43 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "i32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
- "links": {},
- "name": "strict_add",
+ "links": {
+ "`i32`": 3366
+ },
+ "name": "checked_signed_diff",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -106249,7 +104897,7 @@
"11309": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -106262,7 +104910,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) addition. Computes `self + rhs`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(200u128.wrapping_add(55), 255);\nassert_eq!(200u128.wrapping_add(u128::MAX), 199);\n```",
+ "docs": "Checked integer multiplication. Computes `self * rhs`, returning\n`None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(5u32.checked_mul(1), Some(5));\nassert_eq!(u32::MAX.checked_mul(2), None);\n```",
"id": 11309,
"inner": {
"function": {
@@ -106288,26 +104936,41 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "wrapping_add",
+ "name": "checked_mul",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -106370,10 +105033,10 @@
"11310": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -106386,7 +105049,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer addition. Computes `self + rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_add(y)` is semantically equivalent to calling\n`x.`[`checked_add`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_add`].\n\n# Safety\n\nThis results in undefined behavior when\n`self + rhs > u128::MAX` or `self + rhs < u128::MIN`,\ni.e. when [`checked_add`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_add`]: u128::checked_add\n[`wrapping_add`]: u128::wrapping_add",
+ "docs": "Strict integer multiplication. Computes `self * rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(5u32.strict_mul(1), 5);\n```\n\nThe following panics because of overflow:\n\n``` should_panic\nlet _ = u32::MAX.strict_mul(2);\n```",
"id": 11310,
"inner": {
"function": {
@@ -106399,7 +105062,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -106412,29 +105075,26 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
- "links": {
- "u128::checked_add": 11307,
- "u128::wrapping_add": 11309
- },
- "name": "unchecked_add",
+ "links": {},
+ "name": "strict_mul",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -106444,10 +105104,10 @@
"11311": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -106457,7 +105117,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked addition with a signed integer. Computes `self + rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1u128.checked_add_signed(2), Some(3));\nassert_eq!(1u128.checked_add_signed(-2), None);\nassert_eq!((u128::MAX - 2).checked_add_signed(3), None);\n```",
+ "docs": "Wrapping (modular) multiplication. Computes `self *\nrhs`, wrapping around at the boundary of the type.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u8` is used.\n\n```\nassert_eq!(10u8.wrapping_mul(12), 120);\nassert_eq!(25u8.wrapping_mul(12), 44);\n```",
"id": 11311,
"inner": {
"function": {
@@ -106483,41 +105143,26 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u128"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "checked_add_signed",
+ "name": "wrapping_mul",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -106527,10 +105172,10 @@
"11312": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
},
{
"must_use": {
@@ -106543,7 +105188,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict addition with a signed integer. Computes `self + rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1u128.strict_add_signed(2), 3);\n```\n\nThe following panic because of overflow:\n\n```should_panic\nlet _ = 1u128.strict_add_signed(-2);\n```\n\n```should_panic\nlet _ = (u128::MAX - 2).strict_add_signed(3);\n```",
+ "docs": "Unchecked integer multiplication. Computes `self * rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_mul(y)` is semantically equivalent to calling\n`x.`[`checked_mul`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_mul`].\n\n# Safety\n\nThis results in undefined behavior when\n`self * rhs > u32::MAX` or `self * rhs < u32::MIN`,\ni.e. when [`checked_mul`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_mul`]: u32::checked_mul\n[`wrapping_mul`]: u32::wrapping_mul",
"id": 11312,
"inner": {
"function": {
@@ -106556,7 +105201,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -106569,26 +105214,29 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
- "links": {},
- "name": "strict_add_signed",
+ "links": {
+ "u32::checked_mul": 11309,
+ "u32::wrapping_mul": 11311
+ },
+ "name": "unchecked_mul",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -106598,7 +105246,7 @@
"11313": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -106611,7 +105259,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer subtraction. Computes `self - rhs`, returning\n`None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1u128.checked_sub(1), Some(0));\nassert_eq!(0u128.checked_sub(1), None);\n```",
+ "docs": "Checked integer division. Computes `self / rhs`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(128u32.checked_div(2), Some(64));\nassert_eq!(1u32.checked_div(0), None);\n```",
"id": 11313,
"inner": {
"function": {
@@ -106637,7 +105285,7 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
@@ -106649,7 +105297,7 @@
"args": [
{
"type": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
],
@@ -106664,14 +105312,14 @@
}
},
"links": {},
- "name": "checked_sub",
+ "name": "checked_div",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -106681,10 +105329,10 @@
"11314": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -106697,7 +105345,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer subtraction. Computes `self - rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1u128.strict_sub(1), 0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0u128.strict_sub(1);\n```",
+ "docs": "Strict integer division. Computes `self / rhs`.\n\nStrict division on unsigned types is just normal division. There's no\nway overflow could ever happen. This function exists so that all\noperations are accounted for in the strict operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u32.strict_div(10), 10);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1u32).strict_div(0);\n```",
"id": 11314,
"inner": {
"function": {
@@ -106723,26 +105371,26 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "strict_sub",
+ "name": "strict_div",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -106752,10 +105400,10 @@
"11315": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -106765,7 +105413,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) subtraction. Computes `self - rhs`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(100u128.wrapping_sub(100), 0);\nassert_eq!(100u128.wrapping_sub(u128::MAX), 101);\n```",
+ "docs": "Checked Euclidean division. Computes `self.div_euclid(rhs)`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(128u32.checked_div_euclid(2), Some(64));\nassert_eq!(1u32.checked_div_euclid(0), None);\n```",
"id": 11315,
"inner": {
"function": {
@@ -106791,26 +105439,41 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "wrapping_sub",
+ "name": "checked_div_euclid",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -106820,10 +105483,10 @@
"11316": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -106836,7 +105499,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer subtraction. Computes `self - rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_sub(y)` is semantically equivalent to calling\n`x.`[`checked_sub`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_sub`].\n\nIf you find yourself writing code like this:\n\n```\n# let foo = 30_u32;\n# let bar = 20;\nif foo >= bar {\n // SAFETY: just checked it will not overflow\n let diff = unsafe { foo.unchecked_sub(bar) };\n // ... use diff ...\n}\n```\n\nConsider changing it to\n\n```\n# let foo = 30_u32;\n# let bar = 20;\nif let Some(diff) = foo.checked_sub(bar) {\n // ... use diff ...\n}\n```\n\nAs that does exactly the same thing -- including telling the optimizer\nthat the subtraction cannot overflow -- but avoids needing `unsafe`.\n\n# Safety\n\nThis results in undefined behavior when\n`self - rhs > u128::MAX` or `self - rhs < u128::MIN`,\ni.e. when [`checked_sub`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_sub`]: u128::checked_sub\n[`wrapping_sub`]: u128::wrapping_sub",
+ "docs": "Strict Euclidean division. Computes `self.div_euclid(rhs)`.\n\nStrict division on unsigned types is just normal division. There's no\nway overflow could ever happen. This function exists so that all\noperations are accounted for in the strict operations. Since, for the\npositive integers, all common definitions of division are equal, this\nis exactly equal to `self.strict_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u32.strict_div_euclid(10), 10);\n```\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1u32).strict_div_euclid(0);\n```",
"id": 11316,
"inner": {
"function": {
@@ -106849,7 +105512,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -106862,29 +105525,26 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
- "links": {
- "u128::checked_sub": 11313,
- "u128::wrapping_sub": 11315
- },
- "name": "unchecked_sub",
+ "links": {},
+ "name": "strict_div_euclid",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -106894,10 +105554,7 @@
"11317": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
},
{
"must_use": {
@@ -106907,7 +105564,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked subtraction with a signed integer. Computes `self - rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1u128.checked_sub_signed(2), None);\nassert_eq!(1u128.checked_sub_signed(-2), Some(3));\nassert_eq!((u128::MAX - 2).checked_sub_signed(-4), None);\n```",
+ "docs": "Checked integer division without remainder. Computes `self / rhs`,\nreturning `None` if `rhs == 0` or if `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64u32.checked_exact_div(2), Some(32));\nassert_eq!(64u32.checked_exact_div(32), Some(2));\nassert_eq!(64u32.checked_exact_div(0), None);\nassert_eq!(65u32.checked_exact_div(2), None);\n```",
"id": 11317,
"inner": {
"function": {
@@ -106933,7 +105590,7 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "u32"
}
]
],
@@ -106945,7 +105602,7 @@
"args": [
{
"type": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
],
@@ -106960,14 +105617,14 @@
}
},
"links": {},
- "name": "checked_sub_signed",
+ "name": "checked_exact_div",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -106977,23 +105634,17 @@
"11318": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict subtraction with a signed integer. Computes `self - rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(3u128.strict_sub_signed(2), 1);\n```\n\nThe following panic because of overflow:\n\n```should_panic\nlet _ = 1u128.strict_sub_signed(2);\n```\n\n```should_panic\nlet _ = (u128::MAX).strict_sub_signed(-1);\n```",
+ "docs": "Checked integer division without remainder. Computes `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs == 0` or `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64u32.exact_div(2), 32);\nassert_eq!(64u32.exact_div(32), 2);\n```\n\n```should_panic\n#![feature(exact_div)]\nlet _ = 65u32.exact_div(2);\n```",
"id": 11318,
"inner": {
"function": {
@@ -107019,26 +105670,26 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "strict_sub_signed",
+ "name": "exact_div",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -107048,15 +105699,17 @@
"11319": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"unsigned_signed_diff\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"unsigned_signed_diff\"}}]"
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer subtraction. Computes `self - rhs` and checks if the result fits into an [`i128`], returning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(10u128.checked_signed_diff(2), Some(8));\nassert_eq!(2u128.checked_signed_diff(10), Some(-8));\nassert_eq!(u128::MAX.checked_signed_diff(i128::MAX as u128), None);\nassert_eq!((i128::MAX as u128).checked_signed_diff(u128::MAX), Some(i128::MIN));\nassert_eq!((i128::MAX as u128 + 1).checked_signed_diff(0), None);\nassert_eq!(u128::MAX.checked_signed_diff(u128::MAX), Some(0));\n```",
+ "docs": "Unchecked integer division without remainder. Computes `self / rhs`.\n\n# Safety\n\nThis results in undefined behavior when `rhs == 0` or `self % rhs != 0`,\ni.e. when [`checked_exact_div`](Self::checked_exact_div) would return `None`.",
"id": 11319,
"inner": {
"function": {
@@ -107069,7 +105722,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -107082,43 +105735,28 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "i128"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u32"
}
}
}
},
"links": {
- "`i128`": 4826
+ "Self::checked_exact_div": 11317
},
- "name": "checked_signed_diff",
+ "name": "unchecked_exact_div",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -107223,10 +105861,10 @@
"11320": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -107236,7 +105874,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer multiplication. Computes `self * rhs`, returning\n`None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(5u128.checked_mul(1), Some(5));\nassert_eq!(u128::MAX.checked_mul(2), None);\n```",
+ "docs": "Checked integer remainder. Computes `self % rhs`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(5u32.checked_rem(2), Some(1));\nassert_eq!(5u32.checked_rem(0), None);\n```",
"id": 11320,
"inner": {
"function": {
@@ -107262,7 +105900,7 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
@@ -107274,7 +105912,7 @@
"args": [
{
"type": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
],
@@ -107289,14 +105927,14 @@
}
},
"links": {},
- "name": "checked_mul",
+ "name": "checked_rem",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -107306,10 +105944,10 @@
"11321": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -107322,7 +105960,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer multiplication. Computes `self * rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(5u128.strict_mul(1), 5);\n```\n\nThe following panics because of overflow:\n\n``` should_panic\nlet _ = u128::MAX.strict_mul(2);\n```",
+ "docs": "Strict integer remainder. Computes `self % rhs`.\n\nStrict remainder calculation on unsigned types is just the regular\nremainder calculation. There's no way overflow could ever happen.\nThis function exists so that all operations are accounted for in the\nstrict operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u32.strict_rem(10), 0);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5u32.strict_rem(0);\n```",
"id": 11321,
"inner": {
"function": {
@@ -107348,26 +105986,26 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "strict_mul",
+ "name": "strict_rem",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -107377,10 +106015,10 @@
"11322": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -107390,7 +106028,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) multiplication. Computes `self *\nrhs`, wrapping around at the boundary of the type.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u8` is used.\n\n```\nassert_eq!(10u8.wrapping_mul(12), 120);\nassert_eq!(25u8.wrapping_mul(12), 44);\n```",
+ "docs": "Checked Euclidean modulo. Computes `self.rem_euclid(rhs)`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(5u32.checked_rem_euclid(2), Some(1));\nassert_eq!(5u32.checked_rem_euclid(0), None);\n```",
"id": 11322,
"inner": {
"function": {
@@ -107416,26 +106054,41 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "wrapping_mul",
+ "name": "checked_rem_euclid",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -107445,10 +106098,10 @@
"11323": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -107461,7 +106114,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer multiplication. Computes `self * rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_mul(y)` is semantically equivalent to calling\n`x.`[`checked_mul`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_mul`].\n\n# Safety\n\nThis results in undefined behavior when\n`self * rhs > u128::MAX` or `self * rhs < u128::MIN`,\ni.e. when [`checked_mul`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_mul`]: u128::checked_mul\n[`wrapping_mul`]: u128::wrapping_mul",
+ "docs": "Strict Euclidean modulo. Computes `self.rem_euclid(rhs)`.\n\nStrict modulo calculation on unsigned types is just the regular\nremainder calculation. There's no way overflow could ever happen.\nThis function exists so that all operations are accounted for in the\nstrict operations. Since, for the positive integers, all common\ndefinitions of division are equal, this is exactly equal to\n`self.strict_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u32.strict_rem_euclid(10), 0);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5u32.strict_rem_euclid(0);\n```",
"id": 11323,
"inner": {
"function": {
@@ -107474,7 +106127,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -107487,29 +106140,26 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
- "links": {
- "u128::checked_mul": 11320,
- "u128::wrapping_mul": 11322
- },
- "name": "unchecked_mul",
+ "links": {},
+ "name": "strict_rem_euclid",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -107519,20 +106169,15 @@
"11324": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 135758, is_soft: false}, feature: \"disjoint_bitor\",\npromotable: false}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 135758, is_soft: false}, feature: \"disjoint_bitor\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division. Computes `self / rhs`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(128u128.checked_div(2), Some(64));\nassert_eq!(1u128.checked_div(0), None);\n```",
+ "docs": "Same value as `self | other`, but UB if any bit position is set in both inputs.\n\nThis is a situational micro-optimization for places where you'd rather\nuse addition on some platforms and bitwise or on other platforms, based\non exactly which instructions combine better with whatever else you're\ndoing. Note that there's no reason to bother using this for places\nwhere it's clear from the operations involved that they can't overlap.\nFor example, if you're combining `u16`s into a `u32` with\n`((a as u32) << 16) | (b as u32)`, that's fine, as the backend will\nknow those sides of the `|` are disjoint without needing help.\n\n# Examples\n\n```\n#![feature(disjoint_bitor)]\n\n// SAFETY: `1` and `4` have no bits in common.\nunsafe {\n assert_eq!(1_u32.unchecked_disjoint_bitor(4), 5);\n}\n```\n\n# Safety\n\nRequires that `(self & other) == 0`, otherwise it's immediate UB.\n\nEquivalently, requires that `(self | other) == (self + other)`.",
"id": 11324,
"inner": {
"function": {
@@ -107545,7 +106190,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -107556,43 +106201,28 @@
}
],
[
- "rhs",
+ "other",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u128"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "checked_div",
+ "name": "unchecked_disjoint_bitor",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -107602,10 +106232,10 @@
"11325": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
@@ -107618,7 +106248,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer division. Computes `self / rhs`.\n\nStrict division on unsigned types is just normal division. There's no\nway overflow could ever happen. This function exists so that all\noperations are accounted for in the strict operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u128.strict_div(10), 10);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1u128).strict_div(0);\n```",
+ "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nThis method might not be optimized owing to implementation details;\n`ilog2` can produce results more efficiently for base 2, and `ilog10`\ncan produce results more efficiently for base 10.\n\n# Panics\n\nThis function will panic if `self` is zero, or if `base` is less than 2.\n\n# Examples\n\n```\nassert_eq!(5u32.ilog(5), 1);\n```",
"id": 11325,
"inner": {
"function": {
@@ -107642,28 +106272,28 @@
}
],
[
- "rhs",
+ "base",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "strict_div",
+ "name": "ilog",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -107673,20 +106303,23 @@
"11326": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked Euclidean division. Computes `self.div_euclid(rhs)`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(128u128.checked_div_euclid(2), Some(64));\nassert_eq!(1u128.checked_div_euclid(0), None);\n```",
+ "docs": "Returns the base 10 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is zero.\n\n# Example\n\n```\nassert_eq!(10u32.ilog10(), 1);\n```",
"id": 11326,
"inner": {
"function": {
@@ -107708,45 +106341,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u128"
- }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u128"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "checked_div_euclid",
+ "name": "ilog10",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -107756,23 +106368,20 @@
"11327": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict Euclidean division. Computes `self.div_euclid(rhs)`.\n\nStrict division on unsigned types is just normal division. There's no\nway overflow could ever happen. This function exists so that all\noperations are accounted for in the strict operations. Since, for the\npositive integers, all common definitions of division are equal, this\nis exactly equal to `self.strict_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u128.strict_div_euclid(10), 10);\n```\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1u128).strict_div_euclid(0);\n```",
+ "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nReturns `None` if the number is zero, or if the base is not at least 2.\n\nThis method might not be optimized owing to implementation details;\n`checked_ilog2` can produce results more efficiently for base 2, and\n`checked_ilog10` can produce results more efficiently for base 10.\n\n# Examples\n\n```\nassert_eq!(5u32.checked_ilog(5), Some(1));\n```",
"id": 11327,
"inner": {
"function": {
@@ -107796,28 +106405,43 @@
}
],
[
- "rhs",
+ "base",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "strict_div_euclid",
+ "name": "checked_ilog",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -107827,7 +106451,10 @@
"11328": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
@@ -107837,7 +106464,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division without remainder. Computes `self / rhs`,\nreturning `None` if `rhs == 0` or if `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64u128.checked_exact_div(2), Some(32));\nassert_eq!(64u128.checked_exact_div(32), Some(2));\nassert_eq!(64u128.checked_exact_div(0), None);\nassert_eq!(65u128.checked_exact_div(2), None);\n```",
+ "docs": "Returns the base 2 logarithm of the number, rounded down.\n\nReturns `None` if the number is zero.\n\n# Examples\n\n```\nassert_eq!(2u32.checked_ilog2(), Some(1));\n```",
"id": 11328,
"inner": {
"function": {
@@ -107859,12 +106486,6 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u128"
- }
]
],
"is_c_variadic": false,
@@ -107875,7 +106496,7 @@
"args": [
{
"type": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
],
@@ -107890,14 +106511,14 @@
}
},
"links": {},
- "name": "checked_exact_div",
+ "name": "checked_ilog2",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -107907,7 +106528,10 @@
"11329": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
@@ -107917,7 +106541,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division without remainder. Computes `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs == 0` or `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64u128.exact_div(2), 32);\nassert_eq!(64u128.exact_div(32), 2);\n```\n\n```should_panic\n#![feature(exact_div)]\nlet _ = 65u128.exact_div(2);\n```",
+ "docs": "Returns the base 10 logarithm of the number, rounded down.\n\nReturns `None` if the number is zero.\n\n# Examples\n\n```\nassert_eq!(10u32.checked_ilog10(), Some(1));\n```",
"id": 11329,
"inner": {
"function": {
@@ -107939,30 +106563,39 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u128"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "exact_div",
+ "name": "checked_ilog10",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -108007,74 +106640,7 @@
"11330": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Unchecked integer division without remainder. Computes `self / rhs`.\n\n# Safety\n\nThis results in undefined behavior when `rhs == 0` or `self % rhs != 0`,\ni.e. when [`checked_exact_div`](Self::checked_exact_div) would return `None`.",
- "id": 11330,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": true
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u128"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "u128"
- }
- }
- }
- },
- "links": {
- "Self::checked_exact_div": 11328
- },
- "name": "unchecked_exact_div",
- "span": {
- "begin": [
- 1174,
- 5
- ],
- "end": [
- 1194,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "11331": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
@@ -108087,8 +106653,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer remainder. Computes `self % rhs`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(5u128.checked_rem(2), Some(1));\nassert_eq!(5u128.checked_rem(0), None);\n```",
- "id": 11331,
+ "docs": "Checked negation. Computes `-self`, returning `None` unless `self ==\n0`.\n\nNote that negating any positive integer will overflow.\n\n# Examples\n\n```\nassert_eq!(0u32.checked_neg(), Some(0));\nassert_eq!(1u32.checked_neg(), None);\n```",
+ "id": 11330,
"inner": {
"function": {
"generics": {
@@ -108109,12 +106675,6 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u128"
- }
]
],
"is_c_variadic": false,
@@ -108125,7 +106685,7 @@
"args": [
{
"type": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
],
@@ -108140,27 +106700,27 @@
}
},
"links": {},
- "name": "checked_rem",
+ "name": "checked_neg",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11332": {
+ "11331": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -108173,8 +106733,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer remainder. Computes `self % rhs`.\n\nStrict remainder calculation on unsigned types is just the regular\nremainder calculation. There's no way overflow could ever happen.\nThis function exists so that all operations are accounted for in the\nstrict operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u128.strict_rem(10), 0);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5u128.strict_rem(0);\n```",
- "id": 11332,
+ "docs": "Strict negation. Computes `-self`, panicking unless `self ==\n0`.\n\nNote that negating any positive integer will overflow.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0u32.strict_neg(), 0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 1u32.strict_neg();\n```",
+ "id": 11331,
"inner": {
"function": {
"generics": {
@@ -108195,43 +106755,37 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u128"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "strict_rem",
+ "name": "strict_neg",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11333": {
+ "11332": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -108241,8 +106795,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked Euclidean modulo. Computes `self.rem_euclid(rhs)`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(5u128.checked_rem_euclid(2), Some(1));\nassert_eq!(5u128.checked_rem_euclid(0), None);\n```",
- "id": 11333,
+ "docs": "Checked shift left. Computes `self << rhs`, returning `None`\nif `rhs` is larger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x1u32.checked_shl(4), Some(0x10));\nassert_eq!(0x10u32.checked_shl(129), None);\nassert_eq!(0x10u32.checked_shl(31), Some(0));\n```",
+ "id": 11332,
"inner": {
"function": {
"generics": {
@@ -108267,7 +106821,7 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
@@ -108279,7 +106833,7 @@
"args": [
{
"type": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
],
@@ -108294,27 +106848,27 @@
}
},
"links": {},
- "name": "checked_rem_euclid",
+ "name": "checked_shl",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11334": {
+ "11333": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -108327,8 +106881,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict Euclidean modulo. Computes `self.rem_euclid(rhs)`.\n\nStrict modulo calculation on unsigned types is just the regular\nremainder calculation. There's no way overflow could ever happen.\nThis function exists so that all operations are accounted for in the\nstrict operations. Since, for the positive integers, all common\ndefinitions of division are equal, this is exactly equal to\n`self.strict_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u128.strict_rem_euclid(10), 0);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5u128.strict_rem_euclid(0);\n```",
- "id": 11334,
+ "docs": "Strict shift left. Computes `self << rhs`, panicking if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x1u32.strict_shl(4), 0x10);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10u32.strict_shl(129);\n```",
+ "id": 11333,
"inner": {
"function": {
"generics": {
@@ -108353,45 +106907,50 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "strict_rem_euclid",
+ "name": "strict_shl",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11335": {
+ "11334": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 135758, is_soft: false}, feature: \"disjoint_bitor\",\npromotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 135758, is_soft: false}, feature: \"disjoint_bitor\"}}]"
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Same value as `self | other`, but UB if any bit position is set in both inputs.\n\nThis is a situational micro-optimization for places where you'd rather\nuse addition on some platforms and bitwise or on other platforms, based\non exactly which instructions combine better with whatever else you're\ndoing. Note that there's no reason to bother using this for places\nwhere it's clear from the operations involved that they can't overlap.\nFor example, if you're combining `u16`s into a `u32` with\n`((a as u32) << 16) | (b as u32)`, that's fine, as the backend will\nknow those sides of the `|` are disjoint without needing help.\n\n# Examples\n\n```\n#![feature(disjoint_bitor)]\n\n// SAFETY: `1` and `4` have no bits in common.\nunsafe {\n assert_eq!(1_u128.unchecked_disjoint_bitor(4), 5);\n}\n```\n\n# Safety\n\nRequires that `(self & other) == 0`, otherwise it's immediate UB.\n\nEquivalently, requires that `(self | other) == (self + other)`.",
- "id": 11335,
+ "docs": "Unchecked shift left. Computes `self << rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shl`] would return `None`.\n\n[`checked_shl`]: u32::checked_shl",
+ "id": 11334,
"inner": {
"function": {
"generics": {
@@ -108414,54 +106973,118 @@
}
],
[
- "other",
+ "rhs",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
- "links": {},
- "name": "unchecked_disjoint_bitor",
+ "links": {
+ "u32::checked_shl": 11332
+ },
+ "name": "unchecked_shl",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11336": {
+ "11335": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x1u32.unbounded_shl(4), 0x10);\nassert_eq!(0x1u32.unbounded_shl(129), 0);\n```",
+ "id": 11335,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u32"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "unbounded_shl",
+ "span": {
+ "begin": [
+ 1134,
+ 5
+ ],
+ "end": [
+ 1155,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11336": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
- "other": "#[attr = TrackCaller]"
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nThis method might not be optimized owing to implementation details;\n`ilog2` can produce results more efficiently for base 2, and `ilog10`\ncan produce results more efficiently for base 10.\n\n# Panics\n\nThis function will panic if `self` is zero, or if `base` is less than 2.\n\n# Examples\n\n```\nassert_eq!(5u128.ilog(5), 1);\n```",
+ "docs": "Exact shift left. Computes `self << rhs` as long as it can be reversed losslessly.\n\nReturns `None` if any non-zero bits would be shifted out or if `rhs` >=\n`u32::BITS`.\nOtherwise, returns `Some(self << rhs)`.\n\n# Examples\n\n```\n#![feature(exact_bitshifts)]\n\nassert_eq!(0x1u32.exact_shl(4), Some(0x10));\nassert_eq!(0x1u32.exact_shl(129), None);\n```",
"id": 11336,
"inner": {
"function": {
@@ -108485,28 +107108,43 @@
}
],
[
- "base",
+ "rhs",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "ilog",
+ "name": "exact_shl",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -108516,23 +107154,17 @@
"11337": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 10 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is zero.\n\n# Example\n\n```\nassert_eq!(10u128.ilog10(), 1);\n```",
+ "docs": "Unchecked exact shift left. Computes `self << rhs`, assuming the operation can be\nlosslessly reversed `rhs` cannot be larger than\n`u32::BITS`.\n\n# Safety\n\nThis results in undefined behavior when `rhs > self.leading_zeros() || rhs >=\nu32::BITS`\ni.e. when\n[`u32::exact_shl`]\nwould return `None`.",
"id": 11337,
"inner": {
"function": {
@@ -108545,7 +107177,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -108554,6 +107186,12 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
@@ -108563,15 +107201,17 @@
}
}
},
- "links": {},
- "name": "ilog10",
+ "links": {
+ "`u32::exact_shl`": 11336
+ },
+ "name": "unchecked_exact_shl",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -108581,10 +107221,10 @@
"11338": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -108594,7 +107234,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nReturns `None` if the number is zero, or if the base is not at least 2.\n\nThis method might not be optimized owing to implementation details;\n`checked_ilog2` can produce results more efficiently for base 2, and\n`checked_ilog10` can produce results more efficiently for base 10.\n\n# Examples\n\n```\nassert_eq!(5u128.checked_ilog(5), Some(1));\n```",
+ "docs": "Checked shift right. Computes `self >> rhs`, returning `None`\nif `rhs` is larger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x10u32.checked_shr(4), Some(0x1));\nassert_eq!(0x10u32.checked_shr(129), None);\n```",
"id": 11338,
"inner": {
"function": {
@@ -108618,9 +107258,9 @@
}
],
[
- "base",
+ "rhs",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
@@ -108647,14 +107287,14 @@
}
},
"links": {},
- "name": "checked_ilog",
+ "name": "checked_shr",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -108664,20 +107304,23 @@
"11339": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 2 logarithm of the number, rounded down.\n\nReturns `None` if the number is zero.\n\n# Examples\n\n```\nassert_eq!(2u128.checked_ilog2(), Some(1));\n```",
+ "docs": "Strict shift right. Computes `self >> rhs`, panicking `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x10u32.strict_shr(4), 0x1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10u32.strict_shr(129);\n```",
"id": 11339,
"inner": {
"function": {
@@ -108699,39 +107342,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "checked_ilog2",
+ "name": "strict_shr",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -108794,20 +107428,20 @@
"11340": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 10 logarithm of the number, rounded down.\n\nReturns `None` if the number is zero.\n\n# Examples\n\n```\nassert_eq!(10u128.checked_ilog10(), Some(1));\n```",
+ "docs": "Unchecked shift right. Computes `self >> rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shr`] would return `None`.\n\n[`checked_shr`]: u32::checked_shr",
"id": 11340,
"inner": {
"function": {
@@ -108820,7 +107454,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -108829,39 +107463,32 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u32"
}
}
}
},
- "links": {},
- "name": "checked_ilog10",
+ "links": {
+ "u32::checked_shr": 11338
+ },
+ "name": "unchecked_shr",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -108871,10 +107498,10 @@
"11341": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
},
{
"must_use": {
@@ -108884,7 +107511,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked negation. Computes `-self`, returning `None` unless `self ==\n0`.\n\nNote that negating any positive integer will overflow.\n\n# Examples\n\n```\nassert_eq!(0u128.checked_neg(), Some(0));\nassert_eq!(1u128.checked_neg(), None);\n```",
+ "docs": "Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x10u32.unbounded_shr(4), 0x1);\nassert_eq!(0x10u32.unbounded_shr(129), 0);\n```",
"id": 11341,
"inner": {
"function": {
@@ -108906,39 +107533,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u128"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "checked_neg",
+ "name": "unbounded_shr",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -108948,23 +107566,17 @@
"11342": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict negation. Computes `-self`, panicking unless `self ==\n0`.\n\nNote that negating any positive integer will overflow.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0u128.strict_neg(), 0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 1u128.strict_neg();\n",
+ "docs": "Exact shift right. Computes `self >> rhs` as long as it can be reversed losslessly.\n\nReturns `None` if any non-zero bits would be shifted out or if `rhs` >=\n`u32::BITS`.\nOtherwise, returns `Some(self >> rhs)`.\n\n# Examples\n\n```\n#![feature(exact_bitshifts)]\n\nassert_eq!(0x10u32.exact_shr(4), Some(0x1));\nassert_eq!(0x10u32.exact_shr(5), None);\n```",
"id": 11342,
"inner": {
"function": {
@@ -108986,24 +107598,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "strict_neg",
+ "name": "exact_shr",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -109013,10 +107646,7 @@
"11343": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
@@ -109026,7 +107656,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked shift left. Computes `self << rhs`, returning `None`\nif `rhs` is larger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x1u128.checked_shl(4), Some(0x10));\nassert_eq!(0x10u128.checked_shl(129), None);\nassert_eq!(0x10u128.checked_shl(127), Some(0));\n```",
+ "docs": "Unchecked exact shift right. Computes `self >> rhs`, assuming the operation can be\nlosslessly reversed and `rhs` cannot be larger than\n`u32::BITS`.\n\n# Safety\n\nThis results in undefined behavior when `rhs > self.trailing_zeros() || rhs >=\nu32::BITS`\ni.e. when\n[`u32::exact_shr`]\nwould return `None`.",
"id": 11343,
"inner": {
"function": {
@@ -109039,7 +107669,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -109058,35 +107688,22 @@
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u128"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u32"
}
}
}
},
- "links": {},
- "name": "checked_shl",
+ "links": {
+ "`u32::exact_shr`": 11342
+ },
+ "name": "unchecked_exact_shr",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -109096,23 +107713,20 @@
"11344": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict shift left. Computes `self << rhs`, panicking if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x1u128.strict_shl(4), 0x10);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10u128.strict_shl(129);\n```",
+ "docs": "Checked exponentiation. Computes `self.pow(exp)`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(2u32.checked_pow(5), Some(32));\nassert_eq!(u32::MAX.checked_pow(2), None);\n```",
"id": 11344,
"inner": {
"function": {
@@ -109136,7 +107750,7 @@
}
],
[
- "rhs",
+ "exp",
{
"primitive": "u32"
}
@@ -109144,20 +107758,35 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "strict_shl",
+ "name": "checked_pow",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -109167,7 +107796,10 @@
"11345": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -109180,7 +107812,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked shift left. Computes `self << rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shl`] would return `None`.\n\n[`checked_shl`]: u128::checked_shl",
+ "docs": "Strict exponentiation. Computes `self.pow(exp)`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(2u32.strict_pow(5), 32);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = u32::MAX.strict_pow(2);\n```",
"id": 11345,
"inner": {
"function": {
@@ -109193,7 +107825,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -109204,7 +107836,7 @@
}
],
[
- "rhs",
+ "exp",
{
"primitive": "u32"
}
@@ -109212,22 +107844,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
- "links": {
- "u128::checked_shl": 11343
- },
- "name": "unchecked_shl",
+ "links": {},
+ "name": "strict_pow",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -109237,10 +107867,10 @@
"11346": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -109250,7 +107880,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x1u128.unbounded_shl(4), 0x10);\nassert_eq!(0x1u128.unbounded_shl(129), 0);\n```",
+ "docs": "Saturating integer addition. Computes `self + rhs`, saturating at\nthe numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100u32.saturating_add(1), 101);\nassert_eq!(u32::MAX.saturating_add(127), u32::MAX);\n```",
"id": 11346,
"inner": {
"function": {
@@ -109282,20 +107912,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "unbounded_shl",
+ "name": "saturating_add",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -109305,10 +107935,10 @@
"11347": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -109318,7 +107948,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked shift right. Computes `self >> rhs`, returning `None`\nif `rhs` is larger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x10u128.checked_shr(4), Some(0x1));\nassert_eq!(0x10u128.checked_shr(129), None);\n```",
+ "docs": "Saturating addition with a signed integer. Computes `self + rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1u32.saturating_add_signed(2), 3);\nassert_eq!(1u32.saturating_add_signed(-2), 0);\nassert_eq!((u32::MAX - 2).saturating_add_signed(4), u32::MAX);\n```",
"id": 11347,
"inner": {
"function": {
@@ -109344,41 +107974,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u128"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "checked_shr",
+ "name": "saturating_add_signed",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -109388,23 +108003,20 @@
"11348": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict shift right. Computes `self >> rhs`, panicking `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x10u128.strict_shr(4), 0x1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10u128.strict_shr(129);\n```",
+ "docs": "Saturating integer subtraction. Computes `self - rhs`, saturating\nat the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100u32.saturating_sub(27), 73);\nassert_eq!(13u32.saturating_sub(127), 0);\n```",
"id": 11348,
"inner": {
"function": {
@@ -109436,20 +108048,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "strict_shr",
+ "name": "saturating_sub",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -109459,20 +108071,20 @@
"11349": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked shift right. Computes `self >> rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shr`] would return `None`.\n\n[`checked_shr`]: u128::checked_shr",
+ "docs": "Saturating integer subtraction. Computes `self` - `rhs`, saturating at\nthe numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1u32.saturating_sub_signed(2), 0);\nassert_eq!(1u32.saturating_sub_signed(-2), 3);\nassert_eq!((u32::MAX - 2).saturating_sub_signed(-4), u32::MAX);\n```",
"id": 11349,
"inner": {
"function": {
@@ -109485,7 +108097,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -109498,28 +108110,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
- "links": {
- "u128::checked_shr": 11347
- },
- "name": "unchecked_shr",
+ "links": {},
+ "name": "saturating_sub_signed",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -109624,10 +108234,10 @@
"11350": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -109637,7 +108247,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x10u128.unbounded_shr(4), 0x1);\nassert_eq!(0x10u128.unbounded_shr(129), 0);\n```",
+ "docs": "Saturating integer multiplication. Computes `self * rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(2u32.saturating_mul(10), 20);\nassert_eq!((u32::MAX).saturating_mul(10), u32::MAX);\n```",
"id": 11350,
"inner": {
"function": {
@@ -109669,20 +108279,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "unbounded_shr",
+ "name": "saturating_mul",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -109692,20 +108302,23 @@
"11351": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked exponentiation. Computes `self.pow(exp)`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(2u128.checked_pow(5), Some(32));\nassert_eq!(u128::MAX.checked_pow(2), None);\n```",
+ "docs": "Saturating integer division. Computes `self / rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u32.saturating_div(2), 2);\n\n```",
"id": 11351,
"inner": {
"function": {
@@ -109729,7 +108342,7 @@
}
],
[
- "exp",
+ "rhs",
{
"primitive": "u32"
}
@@ -109737,35 +108350,20 @@
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u128"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "checked_pow",
+ "name": "saturating_div",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -109775,23 +108373,20 @@
"11352": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict exponentiation. Computes `self.pow(exp)`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(2u128.strict_pow(5), 32);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = u128::MAX.strict_pow(2);\n```",
+ "docs": "Saturating integer exponentiation. Computes `self.pow(exp)`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(4u32.saturating_pow(3), 64);\nassert_eq!(u32::MAX.saturating_pow(2), u32::MAX);\n```",
"id": 11352,
"inner": {
"function": {
@@ -109823,20 +108418,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "strict_pow",
+ "name": "saturating_pow",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -109846,10 +108441,10 @@
"11353": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -109859,7 +108454,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer addition. Computes `self + rhs`, saturating at\nthe numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100u128.saturating_add(1), 101);\nassert_eq!(u128::MAX.saturating_add(127), u128::MAX);\n```",
+ "docs": "Wrapping (modular) addition with a signed integer. Computes\n`self + rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(1u32.wrapping_add_signed(2), 3);\nassert_eq!(1u32.wrapping_add_signed(-2), u32::MAX);\nassert_eq!((u32::MAX - 2).wrapping_add_signed(4), 1);\n```",
"id": 11353,
"inner": {
"function": {
@@ -109885,26 +108480,26 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "saturating_add",
+ "name": "wrapping_add_signed",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -109914,10 +108509,10 @@
"11354": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
},
{
"must_use": {
@@ -109927,7 +108522,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating addition with a signed integer. Computes `self + rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1u128.saturating_add_signed(2), 3);\nassert_eq!(1u128.saturating_add_signed(-2), 0);\nassert_eq!((u128::MAX - 2).saturating_add_signed(4), u128::MAX);\n```",
+ "docs": "Wrapping (modular) subtraction with a signed integer. Computes\n`self - rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(1u32.wrapping_sub_signed(2), u32::MAX);\nassert_eq!(1u32.wrapping_sub_signed(-2), 3);\nassert_eq!((u32::MAX - 2).wrapping_sub_signed(-4), 1);\n```",
"id": 11354,
"inner": {
"function": {
@@ -109953,26 +108548,26 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "saturating_add_signed",
+ "name": "wrapping_sub_signed",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -109982,20 +108577,23 @@
"11355": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer subtraction. Computes `self - rhs`, saturating\nat the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100u128.saturating_sub(27), 73);\nassert_eq!(13u128.saturating_sub(127), 0);\n```",
+ "docs": "Wrapping (modular) division. Computes `self / rhs`.\n\nWrapped division on unsigned types is just normal division. There's\nno way wrapping could ever happen. This function exists so that all\noperations are accounted for in the wrapping operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u32.wrapping_div(10), 10);\n```",
"id": 11355,
"inner": {
"function": {
@@ -110021,26 +108619,26 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "saturating_sub",
+ "name": "wrapping_div",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -110050,20 +108648,23 @@
"11356": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer subtraction. Computes `self` - `rhs`, saturating at\nthe numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1u128.saturating_sub_signed(2), 0);\nassert_eq!(1u128.saturating_sub_signed(-2), 3);\nassert_eq!((u128::MAX - 2).saturating_sub_signed(-4), u128::MAX);\n```",
+ "docs": "Wrapping Euclidean division. Computes `self.div_euclid(rhs)`.\n\nWrapped division on unsigned types is just normal division. There's\nno way wrapping could ever happen. This function exists so that all\noperations are accounted for in the wrapping operations. Since, for\nthe positive integers, all common definitions of division are equal,\nthis is exactly equal to `self.wrapping_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u32.wrapping_div_euclid(10), 10);\n```",
"id": 11356,
"inner": {
"function": {
@@ -110089,26 +108690,26 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "saturating_sub_signed",
+ "name": "wrapping_div_euclid",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -110118,20 +108719,23 @@
"11357": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer multiplication. Computes `self * rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(2u128.saturating_mul(10), 20);\nassert_eq!((u128::MAX).saturating_mul(10), u128::MAX);\n```",
+ "docs": "Wrapping (modular) remainder. Computes `self % rhs`.\n\nWrapped remainder calculation on unsigned types is just the regular\nremainder calculation. There's no way wrapping could ever happen.\nThis function exists so that all operations are accounted for in the\nwrapping operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u32.wrapping_rem(10), 0);\n```",
"id": 11357,
"inner": {
"function": {
@@ -110157,26 +108761,26 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "saturating_mul",
+ "name": "wrapping_rem",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -110186,10 +108790,10 @@
"11358": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -110202,7 +108806,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer division. Computes `self / rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u128.saturating_div(2), 2);\n\n```",
+ "docs": "Wrapping Euclidean modulo. Computes `self.rem_euclid(rhs)`.\n\nWrapped modulo calculation on unsigned types is just the regular\nremainder calculation. There's no way wrapping could ever happen.\nThis function exists so that all operations are accounted for in the\nwrapping operations. Since, for the positive integers, all common\ndefinitions of division are equal, this is exactly equal to\n`self.wrapping_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u32.wrapping_rem_euclid(10), 0);\n```",
"id": 11358,
"inner": {
"function": {
@@ -110228,26 +108832,26 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "saturating_div",
+ "name": "wrapping_rem_euclid",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -110257,10 +108861,10 @@
"11359": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
@@ -110270,7 +108874,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer exponentiation. Computes `self.pow(exp)`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(4u128.saturating_pow(3), 64);\nassert_eq!(u128::MAX.saturating_pow(2), u128::MAX);\n```",
+ "docs": "Wrapping (modular) negation. Computes `-self`,\nwrapping around at the boundary of the type.\n\nSince unsigned types do not have negative equivalents\nall applications of this function will wrap (except for `-0`).\nFor values smaller than the corresponding signed type's maximum\nthe result is the same as casting the corresponding signed value.\nAny larger values are equivalent to `MAX + 1 - (val - MAX - 1)` where\n`MAX` is the corresponding signed type's maximum.\n\n# Examples\n\n```\nassert_eq!(0_u32.wrapping_neg(), 0);\nassert_eq!(u32::MAX.wrapping_neg(), 1);\nassert_eq!(13_u32.wrapping_neg(), (!13) + 1);\nassert_eq!(42_u32.wrapping_neg(), !(42 - 1));\n```",
"id": 11359,
"inner": {
"function": {
@@ -110292,30 +108896,24 @@
{
"generic": "Self"
}
- ],
- [
- "exp",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "saturating_pow",
+ "name": "wrapping_neg",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -110360,10 +108958,10 @@
"11360": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
@@ -110373,7 +108971,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) addition with a signed integer. Computes\n`self + rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(1u128.wrapping_add_signed(2), 3);\nassert_eq!(1u128.wrapping_add_signed(-2), u128::MAX);\nassert_eq!((u128::MAX - 2).wrapping_add_signed(4), 1);\n```",
+ "docs": "Panic-free bitwise shift-left; yields `self << mask(rhs)`,\nwhere `mask` removes any high-order bits of `rhs` that\nwould cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-left; the\nRHS of a wrapping shift-left is restricted to the range\nof the type, rather than the bits shifted out of the LHS\nbeing returned to the other end. The primitive integer\ntypes all implement a [`rotate_left`](Self::rotate_left) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!(1u32.wrapping_shl(7), 128);\nassert_eq!(1u32.wrapping_shl(128), 1);\n```",
"id": 11360,
"inner": {
"function": {
@@ -110399,26 +108997,28 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
- "links": {},
- "name": "wrapping_add_signed",
+ "links": {
+ "Self::rotate_left": 11286
+ },
+ "name": "wrapping_shl",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -110428,10 +109028,10 @@
"11361": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
@@ -110441,7 +109041,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) subtraction with a signed integer. Computes\n`self - rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(1u128.wrapping_sub_signed(2), u128::MAX);\nassert_eq!(1u128.wrapping_sub_signed(-2), 3);\nassert_eq!((u128::MAX - 2).wrapping_sub_signed(-4), 1);\n```",
+ "docs": "Panic-free bitwise shift-right; yields `self >> mask(rhs)`,\nwhere `mask` removes any high-order bits of `rhs` that\nwould cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-right; the\nRHS of a wrapping shift-right is restricted to the range\nof the type, rather than the bits shifted out of the LHS\nbeing returned to the other end. The primitive integer\ntypes all implement a [`rotate_right`](Self::rotate_right) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!(128u32.wrapping_shr(7), 1);\nassert_eq!(128u32.wrapping_shr(128), 128);\n```",
"id": 11361,
"inner": {
"function": {
@@ -110467,26 +109067,28 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
- "links": {},
- "name": "wrapping_sub_signed",
+ "links": {
+ "Self::rotate_right": 11287
+ },
+ "name": "wrapping_shr",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -110496,23 +109098,20 @@
"11362": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) division. Computes `self / rhs`.\n\nWrapped division on unsigned types is just normal division. There's\nno way wrapping could ever happen. This function exists so that all\noperations are accounted for in the wrapping operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u128.wrapping_div(10), 10);\n```",
+ "docs": "Wrapping (modular) exponentiation. Computes `self.pow(exp)`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(3u32.wrapping_pow(5), 243);\nassert_eq!(3u8.wrapping_pow(6), 217);\n```",
"id": 11362,
"inner": {
"function": {
@@ -110536,28 +109135,28 @@
}
],
[
- "rhs",
+ "exp",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "wrapping_div",
+ "name": "wrapping_pow",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -110567,23 +109166,20 @@
"11363": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping Euclidean division. Computes `self.div_euclid(rhs)`.\n\nWrapped division on unsigned types is just normal division. There's\nno way wrapping could ever happen. This function exists so that all\noperations are accounted for in the wrapping operations. Since, for\nthe positive integers, all common definitions of division are equal,\nthis is exactly equal to `self.wrapping_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u128.wrapping_div_euclid(10), 10);\n```",
+ "docs": "Calculates `self` + `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5u32.overflowing_add(2), (7, false));\nassert_eq!(u32::MAX.overflowing_add(1), (0, true));\n```",
"id": 11363,
"inner": {
"function": {
@@ -110609,26 +109205,33 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "tuple": [
+ {
+ "primitive": "u32"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "wrapping_div_euclid",
+ "name": "overflowing_add",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -110638,24 +109241,96 @@
"11364": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates `self` + `rhs` with a signed `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1u32.overflowing_add_signed(2), (3, false));\nassert_eq!(1u32.overflowing_add_signed(-2), (u32::MAX, true));\nassert_eq!((u32::MAX - 2).overflowing_add_signed(4), (1, true));\n```",
+ "id": 11364,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "i32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "u32"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "overflowing_add_signed",
+ "span": {
+ "begin": [
+ 1134,
+ 5
+ ],
+ "end": [
+ 1155,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11365": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) remainder. Computes `self % rhs`.\n\nWrapped remainder calculation on unsigned types is just the regular\nremainder calculation. There's no way wrapping could ever happen.\nThis function exists so that all operations are accounted for in the\nwrapping operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u128.wrapping_rem(10), 0);\n```",
- "id": 11364,
+ "docs": "Calculates `self` - `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5u32.overflowing_sub(2), (3, false));\nassert_eq!(0u32.overflowing_sub(1), (u32::MAX, true));\n```",
+ "id": 11365,
"inner": {
"function": {
"generics": {
@@ -110680,53 +109355,57 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "tuple": [
+ {
+ "primitive": "u32"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "wrapping_rem",
+ "name": "overflowing_sub",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11365": {
+ "11366": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping Euclidean modulo. Computes `self.rem_euclid(rhs)`.\n\nWrapped modulo calculation on unsigned types is just the regular\nremainder calculation. There's no way wrapping could ever happen.\nThis function exists so that all operations are accounted for in the\nwrapping operations. Since, for the positive integers, all common\ndefinitions of division are equal, this is exactly equal to\n`self.wrapping_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u128.wrapping_rem_euclid(10), 0);\n```",
- "id": 11365,
+ "docs": "Calculates `self` - `rhs` with a signed `rhs`\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1u32.overflowing_sub_signed(2), (u32::MAX, true));\nassert_eq!(1u32.overflowing_sub_signed(-2), (3, false));\nassert_eq!((u32::MAX - 2).overflowing_sub_signed(-4), (1, true));\n```",
+ "id": 11366,
"inner": {
"function": {
"generics": {
@@ -110751,88 +109430,33 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "i32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
- }
- }
- }
- },
- "links": {},
- "name": "wrapping_rem_euclid",
- "span": {
- "begin": [
- 1174,
- 5
- ],
- "end": [
- 1194,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "11366": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Wrapping (modular) negation. Computes `-self`,\nwrapping around at the boundary of the type.\n\nSince unsigned types do not have negative equivalents\nall applications of this function will wrap (except for `-0`).\nFor values smaller than the corresponding signed type's maximum\nthe result is the same as casting the corresponding signed value.\nAny larger values are equivalent to `MAX + 1 - (val - MAX - 1)` where\n`MAX` is the corresponding signed type's maximum.\n\n# Examples\n\n```\nassert_eq!(0_u128.wrapping_neg(), 0);\nassert_eq!(u128::MAX.wrapping_neg(), 1);\nassert_eq!(13_u128.wrapping_neg(), (!13) + 1);\nassert_eq!(42_u128.wrapping_neg(), !(42 - 1));\n```",
- "id": 11366,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
+ "tuple": [
{
- "generic": "Self"
+ "primitive": "u32"
+ },
+ {
+ "primitive": "bool"
}
]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "u128"
}
}
}
},
"links": {},
- "name": "wrapping_neg",
+ "name": "overflowing_sub_signed",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -110842,10 +109466,10 @@
"11367": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\"}}]"
},
{
"must_use": {
@@ -110855,7 +109479,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Panic-free bitwise shift-left; yields `self << mask(rhs)`,\nwhere `mask` removes any high-order bits of `rhs` that\nwould cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-left; the\nRHS of a wrapping shift-left is restricted to the range\nof the type, rather than the bits shifted out of the LHS\nbeing returned to the other end. The primitive integer\ntypes all implement a [`rotate_left`](Self::rotate_left) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!(1u128.wrapping_shl(7), 128);\nassert_eq!(1u128.wrapping_shl(128), 1);\n```",
+ "docs": "Computes the absolute difference between `self` and `other`.\n\n# Examples\n\n```\nassert_eq!(100u32.abs_diff(80), 20u32);\nassert_eq!(100u32.abs_diff(110), 10u32);\n```",
"id": 11367,
"inner": {
"function": {
@@ -110879,7 +109503,7 @@
}
],
[
- "rhs",
+ "other",
{
"primitive": "u32"
}
@@ -110887,22 +109511,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
- "links": {
- "Self::rotate_left": 11299
- },
- "name": "wrapping_shl",
+ "links": {},
+ "name": "abs_diff",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -110912,10 +109534,10 @@
"11368": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_bigint_helpers\"}}]"
},
{
"must_use": {
@@ -110925,7 +109547,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Panic-free bitwise shift-right; yields `self >> mask(rhs)`,\nwhere `mask` removes any high-order bits of `rhs` that\nwould cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-right; the\nRHS of a wrapping shift-right is restricted to the range\nof the type, rather than the bits shifted out of the LHS\nbeing returned to the other end. The primitive integer\ntypes all implement a [`rotate_right`](Self::rotate_right) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!(128u128.wrapping_shr(7), 1);\nassert_eq!(128u128.wrapping_shr(128), 128);\n```",
+ "docs": "Calculates the \"full multiplication\" `self * rhs + carry`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you also need to add a value, then use [`Self::carrying_mul_add`].\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u32` is used.\n\n```\nassert_eq!(5u32.carrying_mul(2, 0), (10, 0));\nassert_eq!(5u32.carrying_mul(2, 10), (20, 0));\nassert_eq!(1_000_000_000u32.carrying_mul(10, 0), (1410065408, 2));\nassert_eq!(1_000_000_000u32.carrying_mul(10, 10), (1410065418, 2));\nassert_eq!(u32::MAX.carrying_mul(u32::MAX, u32::MAX), (0, u32::MAX));\n```\n\nThis is the core operation needed for scalar multiplication when\nimplementing it for wider-than-native types.\n\n```\n#![feature(bigint_helper_methods)]\nfn scalar_mul_eq(little_endian_digits: &mut Vec, multiplicand: u16) {\n let mut carry = 0;\n for d in little_endian_digits.iter_mut() {\n (*d, carry) = d.carrying_mul(multiplicand, carry);\n }\n if carry != 0 {\n little_endian_digits.push(carry);\n }\n}\n\nlet mut v = vec![10, 20];\nscalar_mul_eq(&mut v, 3);\nassert_eq!(v, [30, 60]);\n\nassert_eq!(0x87654321_u64 * 0xFEED, 0x86D3D159E38D);\nlet mut v = vec![0x4321, 0x8765];\nscalar_mul_eq(&mut v, 0xFEED);\nassert_eq!(v, [0xE38D, 0xD159, 0x86D3]);\n```\n\nIf `carry` is zero, this is similar to [`overflowing_mul`](Self::overflowing_mul),\nexcept that it gives the value of the overflow instead of just whether one happened:\n\n```\n#![feature(bigint_helper_methods)]\nlet r = u8::carrying_mul(7, 13, 0);\nassert_eq!((r.0, r.1 != 0), u8::overflowing_mul(7, 13));\nlet r = u8::carrying_mul(13, 42, 0);\nassert_eq!((r.0, r.1 != 0), u8::overflowing_mul(13, 42));\n```\n\nThe value of the first field in the returned tuple matches what you'd get\nby combining the [`wrapping_mul`](Self::wrapping_mul) and\n[`wrapping_add`](Self::wrapping_add) methods:\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(\n 789_u16.carrying_mul(456, 123).0,\n 789_u16.wrapping_mul(456).wrapping_add(123),\n);\n```",
"id": 11368,
"inner": {
"function": {
@@ -110953,26 +109575,42 @@
{
"primitive": "u32"
}
+ ],
+ [
+ "carry",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "tuple": [
+ {
+ "primitive": "u32"
+ },
+ {
+ "primitive": "u32"
+ }
+ ]
}
}
}
},
"links": {
- "Self::rotate_right": 11300
+ "Self::overflowing_mul": 11369,
+ "Self::wrapping_add": 11298,
+ "Self::wrapping_mul": 11311,
+ "`Self::carrying_mul_add`": 11370
},
- "name": "wrapping_shr",
+ "name": "carrying_mul",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -110982,10 +109620,10 @@
"11369": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -110995,7 +109633,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) exponentiation. Computes `self.pow(exp)`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(3u128.wrapping_pow(5), 243);\nassert_eq!(3u8.wrapping_pow(6), 217);\n```",
+ "docs": "Calculates the multiplication of `self` and `rhs`.\n\nReturns a tuple of the multiplication along with a boolean\nindicating whether an arithmetic overflow would occur. If an\noverflow would have occurred then the wrapped value is returned.\n\nIf you want the *value* of the overflow, rather than just *whether*\nan overflow occurred, see [`Self::carrying_mul`].\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u32` is used.\n\n```\nassert_eq!(5u32.overflowing_mul(2), (10, false));\nassert_eq!(1_000_000_000u32.overflowing_mul(10), (1410065408, true));\n```",
"id": 11369,
"inner": {
"function": {
@@ -111019,7 +109657,7 @@
}
],
[
- "exp",
+ "rhs",
{
"primitive": "u32"
}
@@ -111027,20 +109665,29 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "tuple": [
+ {
+ "primitive": "u32"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "wrapping_pow",
+ "links": {
+ "`Self::carrying_mul`": 11368
+ },
+ "name": "overflowing_mul",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -111105,11 +109752,11 @@
"name": "or_insert",
"span": {
"begin": [
- 2351,
+ 2346,
5
],
"end": [
- 2356,
+ 2351,
6
],
"filename": "std/src/collections/hash/map.rs"
@@ -111119,10 +109766,10 @@
"11370": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_bigint_helpers\"}}]"
},
{
"must_use": {
@@ -111132,7 +109779,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5u128.overflowing_add(2), (7, false));\nassert_eq!(u128::MAX.overflowing_add(1), (0, true));\n```",
+ "docs": "Calculates the \"full multiplication\" `self * rhs + carry1 + carry2`.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nThis cannot overflow, as the double-width result has exactly enough\nspace for the largest possible result. This is equivalent to how, in\ndecimal, 9 × 9 + 9 + 9 = 81 + 18 = 99 = 9×10⁰ + 9×10¹ = 10² - 1.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need the `add` part, then you can use [`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared between integer types,\nwhich explains why `u32` is used here.\n\n```\nassert_eq!(5u32.carrying_mul_add(2, 0, 0), (10, 0));\nassert_eq!(5u32.carrying_mul_add(2, 10, 10), (30, 0));\nassert_eq!(1_000_000_000u32.carrying_mul_add(10, 0, 0), (1410065408, 2));\nassert_eq!(1_000_000_000u32.carrying_mul_add(10, 10, 10), (1410065428, 2));\nassert_eq!(u32::MAX.carrying_mul_add(u32::MAX, u32::MAX, u32::MAX), (u32::MAX, u32::MAX));\n```\n\nThis is the core per-digit operation for \"grade school\" O(n²) multiplication.\n\nPlease note that this example is shared between integer types,\nusing `u8` for simplicity of the demonstration.\n\n```\nfn quadratic_mul(a: [u8; N], b: [u8; N]) -> [u8; N] {\n let mut out = [0; N];\n for j in 0..N {\n let mut carry = 0;\n for i in 0..(N - j) {\n (out[j + i], carry) = u8::carrying_mul_add(a[i], b[j], out[j + i], carry);\n }\n }\n out\n}\n\n// -1 * -1 == 1\nassert_eq!(quadratic_mul([0xFF; 3], [0xFF; 3]), [1, 0, 0]);\n\nassert_eq!(u32::wrapping_mul(0x9e3779b9, 0x7f4a7c15), 0xcffc982d);\nassert_eq!(\n quadratic_mul(u32::to_le_bytes(0x9e3779b9), u32::to_le_bytes(0x7f4a7c15)),\n u32::to_le_bytes(0xcffc982d)\n);\n```",
"id": 11370,
"inner": {
"function": {
@@ -111158,7 +109805,19 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "u32"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "u32"
+ }
+ ],
+ [
+ "add",
+ {
+ "primitive": "u32"
}
]
],
@@ -111166,25 +109825,27 @@
"output": {
"tuple": [
{
- "primitive": "u128"
+ "primitive": "u32"
},
{
- "primitive": "bool"
+ "primitive": "u32"
}
]
}
}
}
},
- "links": {},
- "name": "overflowing_add",
+ "links": {
+ "`Self::carrying_mul`": 11368
+ },
+ "name": "carrying_mul_add",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -111194,10 +109855,10 @@
"11371": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
},
{
"must_use": {
@@ -111207,7 +109868,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs` with a signed `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1u128.overflowing_add_signed(2), (3, false));\nassert_eq!(1u128.overflowing_add_signed(-2), (u128::MAX, true));\nassert_eq!((u128::MAX - 2).overflowing_add_signed(4), (1, true));\n```",
+ "docs": "Calculates the complete double-width product `self * rhs`.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order. As such,\n`a.widening_mul(b).0` produces the same result as `a.wrapping_mul(b)`.\n\nIf you also need to add a value and carry to the wide result, then you want\n[`Self::carrying_mul_add`] instead.\n\nIf you also need to add a carry to the wide result, then you want\n[`Self::carrying_mul`] instead.\n\nIf you just want to know *whether* the multiplication overflowed, then you\nwant [`Self::overflowing_mul`] instead.\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5_u32.widening_mul(7), (35, 0));\nassert_eq!(u32::MAX.widening_mul(u32::MAX), (1, u32::MAX - 1));\n```\n\nCompared to other `*_mul` methods:\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(u32::widening_mul(1 << 31, 6), (0, 3));\nassert_eq!(u32::overflowing_mul(1 << 31, 6), (0, true));\nassert_eq!(u32::wrapping_mul(1 << 31, 6), 0);\nassert_eq!(u32::checked_mul(1 << 31, 6), None);\n```\n\nPlease note that this example is shared among integer types, which is why `u32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5u32.widening_mul(2), (10, 0));\nassert_eq!(1_000_000_000u32.widening_mul(10), (1410065408, 2));\n```",
"id": 11371,
"inner": {
"function": {
@@ -111233,7 +109894,7 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "u32"
}
]
],
@@ -111241,25 +109902,29 @@
"output": {
"tuple": [
{
- "primitive": "u128"
+ "primitive": "u32"
},
{
- "primitive": "bool"
+ "primitive": "u32"
}
]
}
}
}
},
- "links": {},
- "name": "overflowing_add_signed",
+ "links": {
+ "`Self::carrying_mul_add`": 11370,
+ "`Self::carrying_mul`": 11368,
+ "`Self::overflowing_mul`": 11369
+ },
+ "name": "widening_mul",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -111269,7 +109934,7 @@
"11372": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
@@ -111278,11 +109943,14 @@
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` - `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5u128.overflowing_sub(2), (3, false));\nassert_eq!(0u128.overflowing_sub(1), (u128::MAX, true));\n```",
+ "docs": "Calculates the divisor when `self` is divided by `rhs`.\n\nReturns a tuple of the divisor along with a boolean indicating\nwhether an arithmetic overflow would occur. Note that for unsigned\nintegers overflow never occurs, so the second value is always\n`false`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u32.overflowing_div(2), (2, false));\n```",
"id": 11372,
"inner": {
"function": {
@@ -111308,7 +109976,7 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
@@ -111316,7 +109984,7 @@
"output": {
"tuple": [
{
- "primitive": "u128"
+ "primitive": "u32"
},
{
"primitive": "bool"
@@ -111327,14 +109995,14 @@
}
},
"links": {},
- "name": "overflowing_sub",
+ "name": "overflowing_div",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -111344,20 +110012,23 @@
"11373": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` - `rhs` with a signed `rhs`\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1u128.overflowing_sub_signed(2), (u128::MAX, true));\nassert_eq!(1u128.overflowing_sub_signed(-2), (3, false));\nassert_eq!((u128::MAX - 2).overflowing_sub_signed(-4), (1, true));\n```",
+ "docs": "Calculates the quotient of Euclidean division `self.div_euclid(rhs)`.\n\nReturns a tuple of the divisor along with a boolean indicating\nwhether an arithmetic overflow would occur. Note that for unsigned\nintegers overflow never occurs, so the second value is always\n`false`.\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self.overflowing_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u32.overflowing_div_euclid(2), (2, false));\n```",
"id": 11373,
"inner": {
"function": {
@@ -111383,7 +110054,7 @@
[
"rhs",
{
- "primitive": "i128"
+ "primitive": "u32"
}
]
],
@@ -111391,7 +110062,7 @@
"output": {
"tuple": [
{
- "primitive": "u128"
+ "primitive": "u32"
},
{
"primitive": "bool"
@@ -111402,14 +110073,14 @@
}
},
"links": {},
- "name": "overflowing_sub_signed",
+ "name": "overflowing_div_euclid",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -111419,20 +110090,23 @@
"11374": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Computes the absolute difference between `self` and `other`.\n\n# Examples\n\n```\nassert_eq!(100u128.abs_diff(80), 20u128);\nassert_eq!(100u128.abs_diff(110), 10u128);\n```",
+ "docs": "Calculates the remainder when `self` is divided by `rhs`.\n\nReturns a tuple of the remainder after dividing along with a boolean\nindicating whether an arithmetic overflow would occur. Note that for\nunsigned integers overflow never occurs, so the second value is\nalways `false`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u32.overflowing_rem(2), (1, false));\n```",
"id": 11374,
"inner": {
"function": {
@@ -111456,28 +110130,35 @@
}
],
[
- "other",
+ "rhs",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "tuple": [
+ {
+ "primitive": "u32"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "abs_diff",
+ "name": "overflowing_rem",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -111487,20 +110168,23 @@
"11375": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the multiplication of `self` and `rhs`.\n\nReturns a tuple of the multiplication along with a boolean\nindicating whether an arithmetic overflow would occur. If an\noverflow would have occurred then the wrapped value is returned.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why why `u32`\nis used.\n\n```\nassert_eq!(5u32.overflowing_mul(2), (10, false));\nassert_eq!(1_000_000_000u32.overflowing_mul(10), (1410065408, true));\n```",
+ "docs": "Calculates the remainder `self.rem_euclid(rhs)` as if by Euclidean division.\n\nReturns a tuple of the modulo after dividing along with a boolean\nindicating whether an arithmetic overflow would occur. Note that for\nunsigned integers overflow never occurs, so the second value is\nalways `false`.\nSince, for the positive integers, all common\ndefinitions of division are equal, this operation\nis exactly equal to `self.overflowing_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u32.overflowing_rem_euclid(2), (1, false));\n```",
"id": 11375,
"inner": {
"function": {
@@ -111526,7 +110210,7 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
@@ -111534,7 +110218,7 @@
"output": {
"tuple": [
{
- "primitive": "u128"
+ "primitive": "u32"
},
{
"primitive": "bool"
@@ -111545,14 +110229,14 @@
}
},
"links": {},
- "name": "overflowing_mul",
+ "name": "overflowing_rem_euclid",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -111562,10 +110246,10 @@
"11376": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -111575,7 +110259,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the \"full multiplication\" `self * rhs + carry`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need the `carry`, then you can use [`Self::widening_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5u32.carrying_mul(2, 0), (10, 0));\nassert_eq!(5u32.carrying_mul(2, 10), (20, 0));\nassert_eq!(1_000_000_000u32.carrying_mul(10, 0), (1410065408, 2));\nassert_eq!(1_000_000_000u32.carrying_mul(10, 10), (1410065418, 2));\nassert_eq!(u128::MAX.carrying_mul(u128::MAX, u128::MAX), (0, u128::MAX));\n```\n\nThis is the core operation needed for scalar multiplication when\nimplementing it for wider-than-native types.\n\n```\n#![feature(bigint_helper_methods)]\nfn scalar_mul_eq(little_endian_digits: &mut Vec, multiplicand: u16) {\n let mut carry = 0;\n for d in little_endian_digits.iter_mut() {\n (*d, carry) = d.carrying_mul(multiplicand, carry);\n }\n if carry != 0 {\n little_endian_digits.push(carry);\n }\n}\n\nlet mut v = vec![10, 20];\nscalar_mul_eq(&mut v, 3);\nassert_eq!(v, [30, 60]);\n\nassert_eq!(0x87654321_u64 * 0xFEED, 0x86D3D159E38D);\nlet mut v = vec![0x4321, 0x8765];\nscalar_mul_eq(&mut v, 0xFEED);\nassert_eq!(v, [0xE38D, 0xD159, 0x86D3]);\n```\n\nIf `carry` is zero, this is similar to [`overflowing_mul`](Self::overflowing_mul),\nexcept that it gives the value of the overflow instead of just whether one happened:\n\n```\n#![feature(bigint_helper_methods)]\nlet r = u8::carrying_mul(7, 13, 0);\nassert_eq!((r.0, r.1 != 0), u8::overflowing_mul(7, 13));\nlet r = u8::carrying_mul(13, 42, 0);\nassert_eq!((r.0, r.1 != 0), u8::overflowing_mul(13, 42));\n```\n\nThe value of the first field in the returned tuple matches what you'd get\nby combining the [`wrapping_mul`](Self::wrapping_mul) and\n[`wrapping_add`](Self::wrapping_add) methods:\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(\n 789_u16.carrying_mul(456, 123).0,\n 789_u16.wrapping_mul(456).wrapping_add(123),\n);\n```",
+ "docs": "Negates self in an overflowing fashion.\n\nReturns `!self + 1` using wrapping operations to return the value\nthat represents the negation of this unsigned value. Note that for\npositive unsigned values overflow always occurs, but negating 0 does\nnot overflow.\n\n# Examples\n\n```\nassert_eq!(0u32.overflowing_neg(), (0, false));\nassert_eq!(2u32.overflowing_neg(), (-2i32 as u32, true));\n```",
"id": 11376,
"inner": {
"function": {
@@ -111597,48 +110281,31 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u128"
- }
- ],
- [
- "carry",
- {
- "primitive": "u128"
- }
]
],
"is_c_variadic": false,
"output": {
"tuple": [
{
- "primitive": "u128"
+ "primitive": "u32"
},
{
- "primitive": "u128"
+ "primitive": "bool"
}
]
}
}
}
},
- "links": {
- "Self::overflowing_mul": 11375,
- "Self::wrapping_add": 11309,
- "Self::wrapping_mul": 11322,
- "`Self::widening_mul`": 11377
- },
- "name": "carrying_mul",
+ "links": {},
+ "name": "overflowing_neg",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -111648,10 +110315,10 @@
"11377": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -111661,7 +110328,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the complete product `self * rhs` without the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nIf you also need to add a carry to the wide result, then you want\n[`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5u32.widening_mul(2), (10, 0));\nassert_eq!(1_000_000_000u32.widening_mul(10), (1410065408, 2));\n```",
+ "docs": "Shifts self left by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean\nindicating whether the shift value was larger than or equal to the\nnumber of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then\nused to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x1u32.overflowing_shl(4), (0x10, false));\nassert_eq!(0x1u32.overflowing_shl(132), (0x10, true));\nassert_eq!(0x10u32.overflowing_shl(31), (0, false));\n```",
"id": 11377,
"inner": {
"function": {
@@ -111687,7 +110354,7 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
@@ -111695,27 +110362,25 @@
"output": {
"tuple": [
{
- "primitive": "u128"
+ "primitive": "u32"
},
{
- "primitive": "u128"
+ "primitive": "bool"
}
]
}
}
}
},
- "links": {
- "`Self::carrying_mul`": 11376
- },
- "name": "widening_mul",
+ "links": {},
+ "name": "overflowing_shl",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -111725,10 +110390,10 @@
"11378": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -111738,7 +110403,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the \"full multiplication\" `self * rhs + carry1 + carry2`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need either `carry`, then you can use [`Self::widening_mul`] instead,\nand if you only need one `carry`, then you can use [`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared between integer types,\nwhich explains why `u32` is used here.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5u32.carrying_mul_add(2, 0, 0), (10, 0));\nassert_eq!(5u32.carrying_mul_add(2, 10, 10), (30, 0));\nassert_eq!(1_000_000_000u32.carrying_mul_add(10, 0, 0), (1410065408, 2));\nassert_eq!(1_000_000_000u32.carrying_mul_add(10, 10, 10), (1410065428, 2));\nassert_eq!(u128::MAX.carrying_mul_add(u128::MAX, u128::MAX, u128::MAX), (u128::MAX, u128::MAX));\n```\n\nThis is the core per-digit operation for \"grade school\" O(n²) multiplication.\n\nPlease note that this example is shared between integer types,\nusing `u8` for simplicity of the demonstration.\n\n```\n#![feature(bigint_helper_methods)]\n\nfn quadratic_mul(a: [u8; N], b: [u8; N]) -> [u8; N] {\n let mut out = [0; N];\n for j in 0..N {\n let mut carry = 0;\n for i in 0..(N - j) {\n (out[j + i], carry) = u8::carrying_mul_add(a[i], b[j], out[j + i], carry);\n }\n }\n out\n}\n\n// -1 * -1 == 1\nassert_eq!(quadratic_mul([0xFF; 3], [0xFF; 3]), [1, 0, 0]);\n\nassert_eq!(u32::wrapping_mul(0x9e3779b9, 0x7f4a7c15), 0xCFFC982D);\nassert_eq!(\n quadratic_mul(u32::to_le_bytes(0x9e3779b9), u32::to_le_bytes(0x7f4a7c15)),\n u32::to_le_bytes(0xCFFC982D)\n);\n```",
+ "docs": "Shifts self right by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean\nindicating whether the shift value was larger than or equal to the\nnumber of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then\nused to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x10u32.overflowing_shr(4), (0x1, false));\nassert_eq!(0x10u32.overflowing_shr(132), (0x1, true));\n```",
"id": 11378,
"inner": {
"function": {
@@ -111764,19 +110429,7 @@
[
"rhs",
{
- "primitive": "u128"
- }
- ],
- [
- "carry",
- {
- "primitive": "u128"
- }
- ],
- [
- "add",
- {
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
@@ -111784,28 +110437,25 @@
"output": {
"tuple": [
{
- "primitive": "u128"
+ "primitive": "u32"
},
{
- "primitive": "u128"
+ "primitive": "bool"
}
]
}
}
}
},
- "links": {
- "`Self::carrying_mul`": 11376,
- "`Self::widening_mul`": 11377
- },
- "name": "carrying_mul_add",
+ "links": {},
+ "name": "overflowing_shr",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -111815,23 +110465,20 @@
"11379": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the divisor when `self` is divided by `rhs`.\n\nReturns a tuple of the divisor along with a boolean indicating\nwhether an arithmetic overflow would occur. Note that for unsigned\nintegers overflow never occurs, so the second value is always\n`false`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u128.overflowing_div(2), (2, false));\n```",
+ "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\nReturns a tuple of the exponentiation along with a bool indicating\nwhether an overflow happened.\n\n# Examples\n\n```\nassert_eq!(3u32.overflowing_pow(5), (243, false));\nassert_eq!(3u8.overflowing_pow(6), (217, true));\n```",
"id": 11379,
"inner": {
"function": {
@@ -111855,9 +110502,9 @@
}
],
[
- "rhs",
+ "exp",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
@@ -111865,7 +110512,7 @@
"output": {
"tuple": [
{
- "primitive": "u128"
+ "primitive": "u32"
},
{
"primitive": "bool"
@@ -111876,14 +110523,14 @@
}
},
"links": {},
- "name": "overflowing_div",
+ "name": "overflowing_pow",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -111978,11 +110625,11 @@
"name": "or_insert_with",
"span": {
"begin": [
- 2375,
+ 2370,
5
],
"end": [
- 2380,
+ 2375,
6
],
"filename": "std/src/collections/hash/map.rs"
@@ -111990,6 +110637,136 @@
"visibility": "public"
},
"11380": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\n# Examples\n\n```\nassert_eq!(2u32.pow(5), 32);\n```",
+ "id": 11380,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "exp",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u32"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "pow",
+ "span": {
+ "begin": [
+ 1134,
+ 5
+ ],
+ "end": [
+ 1155,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11381": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the square root of the number, rounded down.\n\n# Examples\n\n```\nassert_eq!(10u32.isqrt(), 3);\n```",
+ "id": 11381,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u32"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "isqrt",
+ "span": {
+ "begin": [
+ 1134,
+ 5
+ ],
+ "end": [
+ 1155,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11382": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
@@ -112008,8 +110785,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of Euclidean division `self.div_euclid(rhs)`.\n\nReturns a tuple of the divisor along with a boolean indicating\nwhether an arithmetic overflow would occur. Note that for unsigned\nintegers overflow never occurs, so the second value is always\n`false`.\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self.overflowing_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u128.overflowing_div_euclid(2), (2, false));\n```",
- "id": 11380,
+ "docs": "Performs Euclidean division.\n\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7u32.div_euclid(4), 1); // or any other integer type\n```",
+ "id": 11382,
"inner": {
"function": {
"generics": {
@@ -112034,119 +110811,37 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u128"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "overflowing_div_euclid",
+ "name": "div_euclid",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11381": {
+ "11383": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[doc(alias = \"modulo\", alias = \"mod\")]"
},
- {
- "other": "#[attr = TrackCaller]"
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Calculates the remainder when `self` is divided by `rhs`.\n\nReturns a tuple of the remainder after dividing along with a boolean\nindicating whether an arithmetic overflow would occur. Note that for\nunsigned integers overflow never occurs, so the second value is\nalways `false`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u128.overflowing_rem(2), (1, false));\n```",
- "id": 11381,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "u128"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "u128"
- },
- {
- "primitive": "bool"
- }
- ]
- }
- }
- }
- },
- "links": {},
- "name": "overflowing_rem",
- "span": {
- "begin": [
- 1174,
- 5
- ],
- "end": [
- 1194,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "11382": {
- "attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
@@ -112164,8 +110859,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the remainder `self.rem_euclid(rhs)` as if by Euclidean division.\n\nReturns a tuple of the modulo after dividing along with a boolean\nindicating whether an arithmetic overflow would occur. Note that for\nunsigned integers overflow never occurs, so the second value is\nalways `false`.\nSince, for the positive integers, all common\ndefinitions of division are equal, this operation\nis exactly equal to `self.overflowing_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u128.overflowing_rem_euclid(2), (1, false));\n```",
- "id": 11382,
+ "docs": "Calculates the least remainder of `self (mod rhs)`.\n\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self % rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7u32.rem_euclid(4), 3); // or any other integer type\n```",
+ "id": 11383,
"inner": {
"function": {
"generics": {
@@ -112190,125 +110885,49 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u128"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "overflowing_rem_euclid",
+ "name": "rem_euclid",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11383": {
+ "11384": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Negates self in an overflowing fashion.\n\nReturns `!self + 1` using wrapping operations to return the value\nthat represents the negation of this unsigned value. Note that for\npositive unsigned values overflow always occurs, but negating 0 does\nnot overflow.\n\n# Examples\n\n```\nassert_eq!(0u128.overflowing_neg(), (0, false));\nassert_eq!(2u128.overflowing_neg(), (-2i32 as u128, true));\n```",
- "id": 11383,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "u128"
- },
- {
- "primitive": "bool"
- }
- ]
- }
- }
- }
- },
- "links": {},
- "name": "overflowing_neg",
- "span": {
- "begin": [
- 1174,
- 5
- ],
- "end": [
- 1194,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "11384": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts self left by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean\nindicating whether the shift value was larger than or equal to the\nnumber of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then\nused to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x1u128.overflowing_shl(4), (0x10, false));\nassert_eq!(0x1u128.overflowing_shl(132), (0x10, true));\nassert_eq!(0x10u128.overflowing_shl(127), (0, false));\n```",
+ "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards negative infinity.\n\nThis is the same as performing `self / rhs` for all unsigned integers.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(7_u32.div_floor(4), 1);\n```",
"id": 11384,
"inner": {
"function": {
@@ -112340,27 +110959,20 @@
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u128"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "overflowing_shl",
+ "name": "div_floor",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -112370,20 +110982,23 @@
"11385": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts self right by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean\nindicating whether the shift value was larger than or equal to the\nnumber of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then\nused to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x10u128.overflowing_shr(4), (0x1, false));\nassert_eq!(0x10u128.overflowing_shr(132), (0x1, true));\n```",
+ "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards positive infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7_u32.div_ceil(4), 2);\n```",
"id": 11385,
"inner": {
"function": {
@@ -112415,27 +111030,20 @@
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u128"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "overflowing_shr",
+ "name": "div_ceil",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -112445,10 +111053,10 @@
"11386": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
},
{
"must_use": {
@@ -112458,7 +111066,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\nReturns a tuple of the exponentiation along with a bool indicating\nwhether an overflow happened.\n\n# Examples\n\n```\nassert_eq!(3u128.overflowing_pow(5), (243, false));\nassert_eq!(3u8.overflowing_pow(6), (217, true));\n```",
+ "docs": "Calculates the smallest value greater than or equal to `self` that\nis a multiple of `rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nOn overflow, this function will panic if overflow checks are enabled (default in debug\nmode) and wrap if overflow checks are disabled (default in release mode).\n\n# Examples\n\n```\nassert_eq!(16_u32.next_multiple_of(8), 16);\nassert_eq!(23_u32.next_multiple_of(8), 24);\n```",
"id": 11386,
"inner": {
"function": {
@@ -112482,7 +111090,7 @@
}
],
[
- "exp",
+ "rhs",
{
"primitive": "u32"
}
@@ -112490,27 +111098,20 @@
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "u128"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "overflowing_pow",
+ "name": "next_multiple_of",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -112520,10 +111121,10 @@
"11387": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
},
{
"must_use": {
@@ -112533,7 +111134,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\n# Examples\n\n```\nassert_eq!(2u128.pow(5), 32);\n```",
+ "docs": "Calculates the smallest value greater than or equal to `self` that\nis a multiple of `rhs`. Returns `None` if `rhs` is zero or the\noperation would result in overflow.\n\n# Examples\n\n```\nassert_eq!(16_u32.checked_next_multiple_of(8), Some(16));\nassert_eq!(23_u32.checked_next_multiple_of(8), Some(24));\nassert_eq!(1_u32.checked_next_multiple_of(0), None);\nassert_eq!(u32::MAX.checked_next_multiple_of(2), None);\n```",
"id": 11387,
"inner": {
"function": {
@@ -112557,7 +111158,7 @@
}
],
[
- "exp",
+ "rhs",
{
"primitive": "u32"
}
@@ -112565,20 +111166,35 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "pow",
+ "name": "checked_next_multiple_of",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -112588,20 +111204,20 @@
"11388": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unsigned_is_multiple_of\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unsigned_is_multiple_of\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the square root of the number, rounded down.\n\n# Examples\n\n```\nassert_eq!(10u128.isqrt(), 3);\n```",
+ "docs": "Returns `true` if `self` is an integer multiple of `rhs`, and false otherwise.\n\nThis function is equivalent to `self % rhs == 0`, except that it will not panic\nfor `rhs == 0`. Instead, `0.is_multiple_of(0) == true`, and for any non-zero `n`,\n`n.is_multiple_of(0) == false`.\n\n# Examples\n\n```\nassert!(6_u32.is_multiple_of(2));\nassert!(!5_u32.is_multiple_of(2));\n\nassert!(0_u32.is_multiple_of(0));\nassert!(!6_u32.is_multiple_of(0));\n```",
"id": 11388,
"inner": {
"function": {
@@ -112623,24 +111239,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "isqrt",
+ "name": "is_multiple_of",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -112650,23 +111272,20 @@
"11389": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_is_power_of_two\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Performs Euclidean division.\n\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7u128.div_euclid(4), 1); // or any other integer type\n```",
+ "docs": "Returns `true` if and only if `self == 2^k` for some unsigned integer `k`.\n\n# Examples\n\n```\nassert!(16u32.is_power_of_two());\nassert!(!10u32.is_power_of_two());\n```",
"id": 11389,
"inner": {
"function": {
@@ -112688,30 +111307,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u128"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "div_euclid",
+ "name": "is_power_of_two",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -112816,11 +111429,11 @@
"name": "or_insert_with_key",
"span": {
"begin": [
- 2402,
+ 2397,
5
],
"end": [
- 2410,
+ 2405,
6
],
"filename": "std/src/collections/hash/map.rs"
@@ -112830,26 +111443,20 @@
"11390": {
"attrs": [
{
- "other": "#[doc(alias = \"modulo\", alias = \"mod\")]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the least remainder of `self (mod rhs)`.\n\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self % rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7u128.rem_euclid(4), 3); // or any other integer type\n```",
+ "docs": "Returns the smallest power of two greater than or equal to `self`.\n\nWhen return value overflows (i.e., `self > (1 << (N-1))` for type\n`uN`), it panics in debug mode and the return value is wrapped to 0 in\nrelease mode (the only situation in which this method can return 0).\n\n# Examples\n\n```\nassert_eq!(2u32.next_power_of_two(), 2);\nassert_eq!(3u32.next_power_of_two(), 4);\nassert_eq!(0u32.next_power_of_two(), 1);\n```",
"id": 11390,
"inner": {
"function": {
@@ -112871,30 +111478,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u128"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "rem_euclid",
+ "name": "next_power_of_two",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -112904,20 +111505,20 @@
"11391": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards negative infinity.\n\nThis is the same as performing `self / rhs` for all unsigned integers.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(7_u128.div_floor(4), 1);\n```",
+ "docs": "Returns the smallest power of two greater than or equal to `self`. If\nthe next power of two is greater than the type's maximum value,\n`None` is returned, otherwise the power of two is wrapped in `Some`.\n\n# Examples\n\n```\nassert_eq!(2u32.checked_next_power_of_two(), Some(2));\nassert_eq!(3u32.checked_next_power_of_two(), Some(4));\nassert_eq!(u32::MAX.checked_next_power_of_two(), None);\n```",
"id": 11391,
"inner": {
"function": {
@@ -112939,30 +111540,39 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u128"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "div_floor",
+ "name": "checked_next_power_of_two",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -112972,23 +111582,17 @@
"11392": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"needs decision on wrapping behavior\"),\nissue: 32463, is_soft: false}, feature: \"wrapping_next_power_of_two\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards positive infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7_u128.div_ceil(4), 2);\n```",
+ "docs": "Returns the smallest power of two greater than or equal to `n`. If\nthe next power of two is greater than the type's maximum value,\nthe return value is wrapped to `0`.\n\n# Examples\n\n```\n#![feature(wrapping_next_power_of_two)]\n\nassert_eq!(2u32.wrapping_next_power_of_two(), 2);\nassert_eq!(3u32.wrapping_next_power_of_two(), 4);\nassert_eq!(u32::MAX.wrapping_next_power_of_two(), 0);\n```",
"id": 11392,
"inner": {
"function": {
@@ -113010,30 +111614,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u128"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "div_ceil",
+ "name": "wrapping_next_power_of_two",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -113043,10 +111641,10 @@
"11393": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
@@ -113056,7 +111654,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the smallest value greater than or equal to `self` that\nis a multiple of `rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nOn overflow, this function will panic if overflow checks are enabled (default in debug\nmode) and wrap if overflow checks are disabled (default in release mode).\n\n# Examples\n\n```\nassert_eq!(16_u128.next_multiple_of(8), 16);\nassert_eq!(23_u128.next_multiple_of(8), 24);\n```",
+ "docs": "Returns the memory representation of this integer as a byte array in\nbig-endian (network) byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x12345678u32.to_be_bytes();\nassert_eq!(bytes, [0x12, 0x34, 0x56, 0x78]);\n```",
"id": 11393,
"inner": {
"function": {
@@ -113078,30 +111676,29 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u128"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "array": {
+ "len": "4",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
}
}
},
"links": {},
- "name": "next_multiple_of",
+ "name": "to_be_bytes",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -113111,10 +111708,10 @@
"11394": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
@@ -113124,7 +111721,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the smallest value greater than or equal to `self` that\nis a multiple of `rhs`. Returns `None` if `rhs` is zero or the\noperation would result in overflow.\n\n# Examples\n\n```\nassert_eq!(16_u128.checked_next_multiple_of(8), Some(16));\nassert_eq!(23_u128.checked_next_multiple_of(8), Some(24));\nassert_eq!(1_u128.checked_next_multiple_of(0), None);\nassert_eq!(u128::MAX.checked_next_multiple_of(2), None);\n```",
+ "docs": "Returns the memory representation of this integer as a byte array in\nlittle-endian byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x12345678u32.to_le_bytes();\nassert_eq!(bytes, [0x78, 0x56, 0x34, 0x12]);\n```",
"id": 11394,
"inner": {
"function": {
@@ -113146,45 +111743,29 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u128"
- }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u128"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
+ "array": {
+ "len": "4",
+ "type": {
+ "primitive": "u8"
+ }
}
}
}
}
},
"links": {},
- "name": "checked_next_multiple_of",
+ "name": "to_le_bytes",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -113194,20 +111775,20 @@
"11395": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unsigned_is_multiple_of\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unsigned_is_multiple_of\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `true` if `self` is an integer multiple of `rhs`, and false otherwise.\n\nThis function is equivalent to `self % rhs == 0`, except that it will not panic\nfor `rhs == 0`. Instead, `0.is_multiple_of(0) == true`, and for any non-zero `n`,\n`n.is_multiple_of(0) == false`.\n\n# Examples\n\n```\nassert!(6_u128.is_multiple_of(2));\nassert!(!5_u128.is_multiple_of(2));\n\nassert!(0_u128.is_multiple_of(0));\nassert!(!6_u128.is_multiple_of(0));\n```",
+ "docs": "Returns the memory representation of this integer as a byte array in\nnative byte order.\n\nAs the target platform's native endianness is used, portable code\nshould use [`to_be_bytes`] or [`to_le_bytes`], as appropriate,\ninstead.\n\n\n\n[`to_be_bytes`]: Self::to_be_bytes\n[`to_le_bytes`]: Self::to_le_bytes\n\n# Examples\n\n```\nlet bytes = 0x12345678u32.to_ne_bytes();\nassert_eq!(\n bytes,\n if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78]\n } else {\n [0x78, 0x56, 0x34, 0x12]\n }\n);\n```",
"id": 11395,
"inner": {
"function": {
@@ -113229,30 +111810,32 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u128"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "array": {
+ "len": "4",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
}
}
},
- "links": {},
- "name": "is_multiple_of",
+ "links": {
+ "Self::to_be_bytes": 11393,
+ "Self::to_le_bytes": 11394
+ },
+ "name": "to_ne_bytes",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -113262,10 +111845,10 @@
"11396": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_is_power_of_two\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
@@ -113275,7 +111858,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `true` if and only if `self == 2^k` for some unsigned integer `k`.\n\n# Examples\n\n```\nassert!(16u128.is_power_of_two());\nassert!(!10u128.is_power_of_two());\n```",
+ "docs": "Creates a native endian integer value from its representation\nas a byte array in big endian.\n\n\n\n# Examples\n\n```\nlet value = u32::from_be_bytes([0x12, 0x34, 0x56, 0x78]);\nassert_eq!(value, 0x12345678);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_be_u32(input: &mut &[u8]) -> u32 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n u32::from_be_bytes(int_bytes.try_into().unwrap())\n}\n```",
"id": 11396,
"inner": {
"function": {
@@ -113293,28 +111876,33 @@
"sig": {
"inputs": [
[
- "self",
+ "bytes",
{
- "generic": "Self"
+ "array": {
+ "len": "4",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "is_power_of_two",
+ "name": "from_be_bytes",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -113324,20 +111912,20 @@
"11397": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the smallest power of two greater than or equal to `self`.\n\nWhen return value overflows (i.e., `self > (1 << (N-1))` for type\n`uN`), it panics in debug mode and the return value is wrapped to 0 in\nrelease mode (the only situation in which this method can return 0).\n\n# Examples\n\n```\nassert_eq!(2u128.next_power_of_two(), 2);\nassert_eq!(3u128.next_power_of_two(), 4);\nassert_eq!(0u128.next_power_of_two(), 1);\n```",
+ "docs": "Creates a native endian integer value from its representation\nas a byte array in little endian.\n\n\n\n# Examples\n\n```\nlet value = u32::from_le_bytes([0x78, 0x56, 0x34, 0x12]);\nassert_eq!(value, 0x12345678);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_le_u32(input: &mut &[u8]) -> u32 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n u32::from_le_bytes(int_bytes.try_into().unwrap())\n}\n```",
"id": 11397,
"inner": {
"function": {
@@ -113355,28 +111943,33 @@
"sig": {
"inputs": [
[
- "self",
+ "bytes",
{
- "generic": "Self"
+ "array": {
+ "len": "4",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "next_power_of_two",
+ "name": "from_le_bytes",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -113386,20 +111979,20 @@
"11398": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the smallest power of two greater than or equal to `self`. If\nthe next power of two is greater than the type's maximum value,\n`None` is returned, otherwise the power of two is wrapped in `Some`.\n\n# Examples\n\n```\nassert_eq!(2u128.checked_next_power_of_two(), Some(2));\nassert_eq!(3u128.checked_next_power_of_two(), Some(4));\nassert_eq!(u128::MAX.checked_next_power_of_two(), None);\n```",
+ "docs": "Creates a native endian integer value from its memory representation\nas a byte array in native endianness.\n\nAs the target platform's native endianness is used, portable code\nlikely wants to use [`from_be_bytes`] or [`from_le_bytes`], as\nappropriate instead.\n\n[`from_be_bytes`]: Self::from_be_bytes\n[`from_le_bytes`]: Self::from_le_bytes\n\n\n\n# Examples\n\n```\nlet value = u32::from_ne_bytes(if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78]\n} else {\n [0x78, 0x56, 0x34, 0x12]\n});\nassert_eq!(value, 0x12345678);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_ne_u32(input: &mut &[u8]) -> u32 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n u32::from_ne_bytes(int_bytes.try_into().unwrap())\n}\n```",
"id": 11398,
"inner": {
"function": {
@@ -113417,43 +112010,36 @@
"sig": {
"inputs": [
[
- "self",
+ "bytes",
{
- "generic": "Self"
+ "array": {
+ "len": "4",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u128"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u32"
}
}
}
},
- "links": {},
- "name": "checked_next_power_of_two",
+ "links": {
+ "Self::from_be_bytes": 11396,
+ "Self::from_le_bytes": 11397
+ },
+ "name": "from_ne_bytes",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -113463,17 +112049,21 @@
"11399": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"needs decision on wrapping behavior\"),\nissue: 32463, is_soft: false}, feature: \"wrapping_next_power_of_two\"}}]"
+ "other": "#[rustc_diagnostic_item = \"u32_legacy_fn_min_value\"]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
}
],
"crate_id": 1,
- "deprecation": null,
- "docs": "Returns the smallest power of two greater than or equal to `n`. If\nthe next power of two is greater than the type's maximum value,\nthe return value is wrapped to `0`.\n\n# Examples\n\n```\n#![feature(wrapping_next_power_of_two)]\n\nassert_eq!(2u128.wrapping_next_power_of_two(), 2);\nassert_eq!(3u128.wrapping_next_power_of_two(), 4);\nassert_eq!(u128::MAX.wrapping_next_power_of_two(), 0);\n```",
+ "deprecation": {
+ "note": "replaced by the `MIN` associated constant on this type",
+ "since": "TBD"
+ },
+ "docs": "New code should prefer to use\n[`u32::MIN`] instead.\n\nReturns the smallest value that can be represented by this integer type.",
"id": 11399,
"inner": {
"function": {
@@ -113489,30 +112079,25 @@
"is_unsafe": false
},
"sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
+ "inputs": [],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
},
- "links": {},
- "name": "wrapping_next_power_of_two",
+ "links": {
+ "`u32::MIN`": 11271
+ },
+ "name": "min_value",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -113536,8 +112121,8 @@
"use": {
"id": 115,
"is_glob": false,
- "name": "Eq",
- "source": "core::prelude::v1::Eq"
+ "name": "Hash",
+ "source": "core::prelude::v1::Hash"
}
},
"links": {},
@@ -113545,11 +112130,11 @@
"span": {
"begin": [
52,
- 59
+ 63
],
"end": [
52,
- 61
+ 67
],
"filename": "std/src/prelude/v1.rs"
},
@@ -113613,11 +112198,11 @@
"name": "key",
"span": {
"begin": [
- 2424,
+ 2419,
5
],
"end": [
- 2429,
+ 2424,
6
],
"filename": "std/src/collections/hash/map.rs"
@@ -113627,20 +112212,21 @@
"11400": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[rustc_diagnostic_item = \"u32_legacy_fn_max_value\"]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
}
],
"crate_id": 1,
- "deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nbig-endian (network) byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x12345678901234567890123456789012u128.to_be_bytes();\nassert_eq!(bytes, [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]);\n```",
+ "deprecation": {
+ "note": "replaced by the `MAX` associated constant on this type",
+ "since": "TBD"
+ },
+ "docs": "New code should prefer to use\n[`u32::MAX`] instead.\n\nReturns the largest value that can be represented by this integer type.",
"id": 11400,
"inner": {
"function": {
@@ -113656,35 +112242,25 @@
"is_unsafe": false
},
"sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
+ "inputs": [],
"is_c_variadic": false,
"output": {
- "array": {
- "len": "16",
- "type": {
- "primitive": "u8"
- }
- }
+ "primitive": "u32"
}
}
}
},
- "links": {},
- "name": "to_be_bytes",
+ "links": {
+ "`u32::MAX`": 6042
+ },
+ "name": "max_value",
"span": {
"begin": [
- 1174,
+ 1134,
5
],
"end": [
- 1194,
+ 1155,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -113694,10 +112270,16 @@
"11401": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ "other": "#[doc(alias = \"average_floor\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[doc(alias = \"average\")]"
+ },
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"num_midpoint\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"num_midpoint\"}}]"
},
{
"must_use": {
@@ -113707,471 +112289,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nlittle-endian byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x12345678901234567890123456789012u128.to_le_bytes();\nassert_eq!(bytes, [0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]);\n```",
+ "docs": "Calculates the midpoint (average) between `self` and `rhs`.\n\n`midpoint(a, b)` is `(a + b) / 2` as if it were performed in a\nsufficiently-large unsigned integral type. This implies that the result is\nalways rounded towards zero and that no overflow will ever occur.\n\n# Examples\n\n```\nassert_eq!(0u32.midpoint(4), 2);\nassert_eq!(1u32.midpoint(4), 2);\n```",
"id": 11401,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "array": {
- "len": "16",
- "type": {
- "primitive": "u8"
- }
- }
- }
- }
- }
- },
- "links": {},
- "name": "to_le_bytes",
- "span": {
- "begin": [
- 1174,
- 5
- ],
- "end": [
- 1194,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "11402": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nnative byte order.\n\nAs the target platform's native endianness is used, portable code\nshould use [`to_be_bytes`] or [`to_le_bytes`], as appropriate,\ninstead.\n\n\n\n[`to_be_bytes`]: Self::to_be_bytes\n[`to_le_bytes`]: Self::to_le_bytes\n\n# Examples\n\n```\nlet bytes = 0x12345678901234567890123456789012u128.to_ne_bytes();\nassert_eq!(\n bytes,\n if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]\n } else {\n [0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]\n }\n);\n```",
- "id": 11402,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "array": {
- "len": "16",
- "type": {
- "primitive": "u8"
- }
- }
- }
- }
- }
- },
- "links": {
- "Self::to_be_bytes": 11400,
- "Self::to_le_bytes": 11401
- },
- "name": "to_ne_bytes",
- "span": {
- "begin": [
- 1174,
- 5
- ],
- "end": [
- 1194,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "11403": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
- },
- {
- "must_use": {
- "reason": null
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Creates a native endian integer value from its representation\nas a byte array in big endian.\n\n\n\n# Examples\n\n```\nlet value = u128::from_be_bytes([0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]);\nassert_eq!(value, 0x12345678901234567890123456789012);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_be_u128(input: &mut &[u8]) -> u128 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n u128::from_be_bytes(int_bytes.try_into().unwrap())\n}\n```",
- "id": 11403,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "bytes",
- {
- "array": {
- "len": "16",
- "type": {
- "primitive": "u8"
- }
- }
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "u128"
- }
- }
- }
- },
- "links": {},
- "name": "from_be_bytes",
- "span": {
- "begin": [
- 1174,
- 5
- ],
- "end": [
- 1194,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "11404": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
- },
- {
- "must_use": {
- "reason": null
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Creates a native endian integer value from its representation\nas a byte array in little endian.\n\n\n\n# Examples\n\n```\nlet value = u128::from_le_bytes([0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]);\nassert_eq!(value, 0x12345678901234567890123456789012);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_le_u128(input: &mut &[u8]) -> u128 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n u128::from_le_bytes(int_bytes.try_into().unwrap())\n}\n```",
- "id": 11404,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "bytes",
- {
- "array": {
- "len": "16",
- "type": {
- "primitive": "u8"
- }
- }
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "u128"
- }
- }
- }
- },
- "links": {},
- "name": "from_le_bytes",
- "span": {
- "begin": [
- 1174,
- 5
- ],
- "end": [
- 1194,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "11405": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
- },
- {
- "must_use": {
- "reason": null
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Creates a native endian integer value from its memory representation\nas a byte array in native endianness.\n\nAs the target platform's native endianness is used, portable code\nlikely wants to use [`from_be_bytes`] or [`from_le_bytes`], as\nappropriate instead.\n\n[`from_be_bytes`]: Self::from_be_bytes\n[`from_le_bytes`]: Self::from_le_bytes\n\n\n\n# Examples\n\n```\nlet value = u128::from_ne_bytes(if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]\n} else {\n [0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]\n});\nassert_eq!(value, 0x12345678901234567890123456789012);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_ne_u128(input: &mut &[u8]) -> u128 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n u128::from_ne_bytes(int_bytes.try_into().unwrap())\n}\n```",
- "id": 11405,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "bytes",
- {
- "array": {
- "len": "16",
- "type": {
- "primitive": "u8"
- }
- }
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "u128"
- }
- }
- }
- },
- "links": {
- "Self::from_be_bytes": 11403,
- "Self::from_le_bytes": 11404
- },
- "name": "from_ne_bytes",
- "span": {
- "begin": [
- 1174,
- 5
- ],
- "end": [
- 1194,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "11406": {
- "attrs": [
- {
- "other": "#[rustc_diagnostic_item = \"u128_legacy_fn_min_value\"]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- }
- ],
- "crate_id": 1,
- "deprecation": {
- "note": "replaced by the `MIN` associated constant on this type",
- "since": "TBD"
- },
- "docs": "New code should prefer to use\n[`u128::MIN`] instead.\n\nReturns the smallest value that can be represented by this integer type.",
- "id": 11406,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [],
- "is_c_variadic": false,
- "output": {
- "primitive": "u128"
- }
- }
- }
- },
- "links": {
- "`u128::MIN`": 11283
- },
- "name": "min_value",
- "span": {
- "begin": [
- 1174,
- 5
- ],
- "end": [
- 1194,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "11407": {
- "attrs": [
- {
- "other": "#[rustc_diagnostic_item = \"u128_legacy_fn_max_value\"]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- }
- ],
- "crate_id": 1,
- "deprecation": {
- "note": "replaced by the `MAX` associated constant on this type",
- "since": "TBD"
- },
- "docs": "New code should prefer to use\n[`u128::MAX`] instead.\n\nReturns the largest value that can be represented by this integer type.",
- "id": 11407,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [],
- "is_c_variadic": false,
- "output": {
- "primitive": "u128"
- }
- }
- }
- },
- "links": {
- "`u128::MAX`": 11284
- },
- "name": "max_value",
- "span": {
- "begin": [
- 1174,
- 5
- ],
- "end": [
- 1194,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "11408": {
- "attrs": [
- {
- "other": "#[doc(alias = \"average_floor\")]"
- },
- {
- "other": "#[doc(alias = \"average\")]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"num_midpoint\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"num_midpoint\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Calculates the midpoint (average) between `self` and `rhs`.\n\n`midpoint(a, b)` is `(a + b) / 2` as if it were performed in a\nsufficiently-large unsigned integral type. This implies that the result is\nalways rounded towards zero and that no overflow will ever occur.\n\n# Examples\n\n```\nassert_eq!(0u128.midpoint(4), 2);\nassert_eq!(1u128.midpoint(4), 2);\n```",
- "id": 11408,
"inner": {
"function": {
"generics": {
@@ -114196,13 +112315,13 @@
[
"rhs",
{
- "primitive": "u128"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
}
@@ -114211,28 +112330,28 @@
"name": "midpoint",
"span": {
"begin": [
- 1195,
+ 1156,
5
],
"end": [
- 1195,
- 38
+ 1156,
+ 42
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11409": {
+ "11402": {
"attrs": [],
"crate_id": 1,
"deprecation": null,
"docs": null,
- "id": 11409,
+ "id": 11402,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
- "primitive": "u128"
+ "primitive": "u32"
},
"generics": {
"params": [],
@@ -114242,11 +112361,24 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 11271,
+ 6042,
+ 11272,
+ 11273,
+ 11274,
+ 11276,
+ 11277,
+ 11278,
+ 11279,
+ 11280,
+ 11281,
+ 11282,
11283,
11284,
11285,
11286,
11287,
+ 11288,
11289,
11290,
11291,
@@ -114256,31 +112388,32 @@
11295,
11296,
11297,
- 11298,
11299,
11300,
11301,
11302,
11303,
- 11304,
11305,
11306,
11307,
11308,
+ 11309,
11310,
- 11311,
11312,
11313,
11314,
+ 11315,
11316,
11317,
11318,
11319,
11320,
11321,
+ 11322,
11323,
11324,
11325,
+ 11275,
11326,
11327,
11328,
@@ -114292,7 +112425,6 @@
11334,
11335,
11336,
- 11288,
11337,
11338,
11339,
@@ -114309,36 +112441,36 @@
11350,
11351,
11352,
+ 11298,
11353,
+ 11304,
11354,
+ 11311,
11355,
11356,
11357,
11358,
11359,
- 11309,
11360,
- 11315,
11361,
- 11322,
11362,
11363,
+ 10628,
11364,
11365,
+ 10632,
11366,
11367,
- 11368,
11369,
- 11370,
- 10679,
11371,
+ 11368,
+ 11370,
11372,
- 10683,
11373,
11374,
11375,
- 11377,
11376,
+ 11377,
11378,
11379,
11380,
@@ -114362,14 +112494,7 @@
11398,
11399,
11400,
- 11401,
- 11402,
- 11403,
- 11404,
- 11405,
- 11406,
- 11407,
- 11408
+ 11401
],
"provided_trait_methods": [],
"trait": null
@@ -114379,129 +112504,18 @@
"name": null,
"span": {
"begin": [
- 1173,
+ 1133,
1
],
"end": [
- 1173,
- 10
+ 1133,
+ 9
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "default"
},
- "1141": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 26, patch: 0})}, feature: \"entry_and_modify\"}}]"
- },
- {
- "other": "#[attr = Inline(Hint)]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": "Provides in-place mutable access to an occupied entry before any\npotential inserts into the map.\n\n# Examples\n\n```\nuse std::collections::HashMap;\n\nlet mut map: HashMap<&str, u32> = HashMap::new();\n\nmap.entry(\"poneyland\")\n .and_modify(|e| { *e += 1 })\n .or_insert(42);\nassert_eq!(map[\"poneyland\"], 42);\n\nmap.entry(\"poneyland\")\n .and_modify(|e| { *e += 1 })\n .or_insert(42);\nassert_eq!(map[\"poneyland\"], 43);\n```",
- "id": 1141,
- "inner": {
- "function": {
- "generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "F"
- }
- ],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": {
- "parenthesized": {
- "inputs": [
- {
- "borrowed_ref": {
- "is_mutable": true,
- "lifetime": null,
- "type": {
- "generic": "V"
- }
- }
- }
- ],
- "output": null
- }
- },
- "id": 15,
- "path": "FnOnce"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "F"
- }
- }
- }
- ]
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "f",
- {
- "generic": "F"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "generic": "Self"
- }
- }
- }
- },
- "links": {},
- "name": "and_modify",
- "span": {
- "begin": [
- 2453,
- 5
- ],
- "end": [
- 2464,
- 6
- ],
- "filename": "std/src/collections/hash/map.rs"
- },
- "visibility": "public"
- },
- "11410": {
+ "11403": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 82, patch: 0})}, feature: \"const_int_from_str\", promotable: false}}]"
@@ -114512,8 +112526,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from a string slice with digits in a given base.\n\nThe string is expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\nassert_eq!(u128::from_str_radix(\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\nassert!(u128::from_str_radix(\"1 \", 10).is_err());\n```",
- "id": 11410,
+ "docs": "Parses an integer from a string slice with digits in a given base.\n\nThe string is expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# See also\nIf the string to be parsed is in base 10 (decimal),\n[`from_str`] or [`str::parse`] can also be used.\n\n[`from_str`]: #method.from_str\n[`str::parse`]: primitive.str.html#method.parse\n\n# Examples\n\n```\nassert_eq!(u32::from_str_radix(\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\nassert!(u32::from_str_radix(\"1 \", 10).is_err());\n```",
+ "id": 11403,
"inner": {
"function": {
"generics": {
@@ -114556,14 +112570,14 @@
"args": [
{
"type": {
- "primitive": "u128"
+ "primitive": "u32"
}
},
{
"type": {
"resolved_path": {
"args": null,
- "id": 4784,
+ "id": 4786,
"path": "ParseIntError"
}
}
@@ -114583,18 +112597,18 @@
"name": "from_str_radix",
"span": {
"begin": [
- 1631,
+ 1667,
1
],
"end": [
- 1631,
+ 1667,
58
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11411": {
+ "11404": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
@@ -114602,8 +112616,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from an ASCII-byte slice with decimal digits.\n\nThe characters are expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(u128::from_ascii(b\"+10\"), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(u128::from_ascii(b\"1 \").is_err());\n```",
- "id": 11411,
+ "docs": "Parses an integer from an ASCII-byte slice with decimal digits.\n\nThe characters are expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(u32::from_ascii(b\"+10\"), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(u32::from_ascii(b\"1 \").is_err());\n```",
+ "id": 11404,
"inner": {
"function": {
"generics": {
@@ -114642,14 +112656,14 @@
"args": [
{
"type": {
- "primitive": "u128"
+ "primitive": "u32"
}
},
{
"type": {
"resolved_path": {
"args": null,
- "id": 4784,
+ "id": 4786,
"path": "ParseIntError"
}
}
@@ -114669,18 +112683,18 @@
"name": "from_ascii",
"span": {
"begin": [
- 1631,
+ 1667,
1
],
"end": [
- 1631,
+ 1667,
58
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11412": {
+ "11405": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
@@ -114688,8 +112702,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from an ASCII-byte slice with digits in a given base.\n\nThe characters are expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(u128::from_ascii_radix(b\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(u128::from_ascii_radix(b\"1 \", 10).is_err());\n```",
- "id": 11412,
+ "docs": "Parses an integer from an ASCII-byte slice with digits in a given base.\n\nThe characters are expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(u32::from_ascii_radix(b\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(u32::from_ascii_radix(b\"1 \", 10).is_err());\n```",
+ "id": 11405,
"inner": {
"function": {
"generics": {
@@ -114734,14 +112748,14 @@
"args": [
{
"type": {
- "primitive": "u128"
+ "primitive": "u32"
}
},
{
"type": {
"resolved_path": {
"args": null,
- "id": 4784,
+ "id": 4786,
"path": "ParseIntError"
}
}
@@ -114761,28 +112775,28 @@
"name": "from_ascii_radix",
"span": {
"begin": [
- 1631,
+ 1667,
1
],
"end": [
- 1631,
+ 1667,
58
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11413": {
+ "11406": {
"attrs": [],
"crate_id": 1,
"deprecation": null,
"docs": null,
- "id": 11413,
+ "id": 11406,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
- "primitive": "u128"
+ "primitive": "u32"
},
"generics": {
"params": [],
@@ -114792,9 +112806,9 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 11410,
- 11411,
- 11412
+ 11403,
+ 11404,
+ 11405
],
"provided_trait_methods": [],
"trait": null
@@ -114804,18 +112818,18 @@
"name": null,
"span": {
"begin": [
- 1631,
+ 1667,
1
],
"end": [
- 1631,
+ 1667,
58
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "default"
},
- "11414": {
+ "11407": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 138215, is_soft: false}, feature: \"int_format_into\"}}]"
@@ -114823,8 +112837,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Allows users to write an integer (in signed decimal format) into a variable `buf` of\ntype [`NumBuffer`] that is passed by the caller by mutable reference.\n\n# Examples\n\n```\n#![feature(int_format_into)]\nuse core::fmt::NumBuffer;\n\nlet n = 0u128;\nlet mut buf = NumBuffer::new();\nassert_eq!(n.format_into(&mut buf), \"0\");\n\nlet n1 = 32u128;\nlet mut buf1 = NumBuffer::new();\nassert_eq!(n1.format_into(&mut buf1), \"32\");\n\nlet n2 = u128::MAX;\nlet mut buf2 = NumBuffer::new();\nassert_eq!(n2.format_into(&mut buf2), u128::MAX.to_string());\n```",
- "id": 11414,
+ "docs": "Allows users to write an integer (in signed decimal format) into a variable `buf` of\ntype [`NumBuffer`] that is passed by the caller by mutable reference.\n\n# Examples\n\n```\n#![feature(int_format_into)]\nuse core::fmt::NumBuffer;\n\nlet n = 0u32;\nlet mut buf = NumBuffer::new();\nassert_eq!(n.format_into(&mut buf), \"0\");\n\nlet n1 = 32u32;\nassert_eq!(n1.format_into(&mut buf), \"32\");\n\nlet n2 = u32 :: MAX;\nassert_eq!(n2.format_into(&mut buf), u32 :: MAX.to_string());\n```",
+ "id": 11407,
"inner": {
"function": {
"generics": {
@@ -114859,14 +112873,14 @@
"args": [
{
"type": {
- "primitive": "u128"
+ "primitive": "u32"
}
}
],
"constraints": []
}
},
- "id": 10162,
+ "id": 10387,
"path": "NumBuffer"
}
}
@@ -114888,33 +112902,33 @@
}
},
"links": {
- "`NumBuffer`": 10162
+ "`NumBuffer`": 10387
},
"name": "format_into",
"span": {
"begin": [
- 724,
+ 599,
5
],
"end": [
- 724,
- 64
+ 599,
+ 95
],
"filename": "checkouts/rust/library/core/src/fmt/num.rs"
},
"visibility": "public"
},
- "11415": {
+ "11408": {
"attrs": [],
"crate_id": 1,
"deprecation": null,
"docs": null,
- "id": 11415,
+ "id": 11408,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
- "primitive": "u128"
+ "primitive": "u32"
},
"generics": {
"params": [],
@@ -114924,7 +112938,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 11414
+ 11407
],
"provided_trait_methods": [],
"trait": null
@@ -114934,89 +112948,162 @@
"name": null,
"span": {
"begin": [
- 602,
- 1
+ 599,
+ 5
],
"end": [
- 602,
- 10
+ 599,
+ 95
],
"filename": "checkouts/rust/library/core/src/fmt/num.rs"
},
"visibility": "default"
},
- "11416": {
+ "11409": {
"attrs": [
{
- "other": "#[rustc_doc_primitive = \"isize\"]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
}
],
- "crate_id": 0,
+ "crate_id": 1,
"deprecation": null,
- "docs": "The pointer-sized signed integer type.\n\nThe size of this primitive is how many bytes it takes to reference any\nlocation in memory. For example, on a 32 bit target, this is 4 bytes\nand on a 64 bit target, this is 8 bytes.",
- "id": 11416,
+ "docs": "The smallest value that can be represented by this integer type.\n\n# Examples\n\n```\nassert_eq!(u64::MIN, 0);\n```",
+ "id": 11409,
"inner": {
- "primitive": {
- "impls": [
- 11552,
- 11556,
- 11558
- ],
- "name": "isize"
+ "assoc_const": {
+ "type": {
+ "primitive": "u64"
+ },
+ "value": "0"
}
},
"links": {},
- "name": "isize",
+ "name": "MIN",
"span": {
"begin": [
- 1488,
- 1
+ 1160,
+ 5
],
"end": [
- 1488,
- 18
+ 1181,
+ 6
],
- "filename": "std/src/../../core/src/primitive_docs.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11417": {
+ "1141": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 26, patch: 0})}, feature: \"entry_and_modify\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "The smallest value that can be represented by this integer type\n(−263 on 64-bit targets).\n\n# Examples\n\n```\nassert_eq!(isize::MIN, -9223372036854775808);\n```",
- "id": 11417,
+ "docs": "Provides in-place mutable access to an occupied entry before any\npotential inserts into the map.\n\n# Examples\n\n```\nuse std::collections::HashMap;\n\nlet mut map: HashMap<&str, u32> = HashMap::new();\n\nmap.entry(\"poneyland\")\n .and_modify(|e| { *e += 1 })\n .or_insert(42);\nassert_eq!(map[\"poneyland\"], 42);\n\nmap.entry(\"poneyland\")\n .and_modify(|e| { *e += 1 })\n .or_insert(42);\nassert_eq!(map[\"poneyland\"], 43);\n```",
+ "id": 1141,
"inner": {
- "assoc_const": {
- "type": {
- "primitive": "isize"
+ "function": {
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "F"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": {
+ "parenthesized": {
+ "inputs": [
+ {
+ "borrowed_ref": {
+ "is_mutable": true,
+ "lifetime": null,
+ "type": {
+ "generic": "V"
+ }
+ }
+ }
+ ],
+ "output": null
+ }
+ },
+ "id": 15,
+ "path": "FnOnce"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "F"
+ }
+ }
+ }
+ ]
},
- "value": "_"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "f",
+ {
+ "generic": "F"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "generic": "Self"
+ }
+ }
}
},
"links": {},
- "name": "MIN",
+ "name": "and_modify",
"span": {
"begin": [
- 420,
+ 2448,
5
],
"end": [
- 439,
+ 2459,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/collections/hash/map.rs"
},
"visibility": "public"
},
- "11418": {
+ "11410": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
@@ -115024,12 +113111,12 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "The largest value that can be represented by this integer type\n(263 − 1 on 64-bit targets).\n\n# Examples\n\n```\nassert_eq!(isize::MAX, 9223372036854775807);\n```",
- "id": 11418,
+ "docs": "The largest value that can be represented by this integer type\n(264 − 1).\n\n# Examples\n\n```\nassert_eq!(u64::MAX, 18446744073709551615);\n```",
+ "id": 11410,
"inner": {
"assoc_const": {
"type": {
- "primitive": "isize"
+ "primitive": "u64"
},
"value": "_"
}
@@ -115038,18 +113125,18 @@
"name": "MAX",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11419": {
+ "11411": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 53, patch: 0})}, feature: \"int_bits_const\"}}]"
@@ -115057,44 +113144,55 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "The size of this integer type in bits.\n\n# Examples\n\n```\nassert_eq!(isize::BITS, 64);\n```",
- "id": 11419,
+ "docs": "The size of this integer type in bits.\n\n# Examples\n\n```\nassert_eq!(u64::BITS, 64);\n```",
+ "id": 11411,
"inner": {
"assoc_const": {
"type": {
"primitive": "u32"
},
- "value": "usize::BITS"
+ "value": "_"
}
},
"links": {},
"name": "BITS",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "1142": {
+ "11412": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 83, patch: 0})}, feature: \"entry_insert\"}}]"
+ "other": "#[doc(alias = \"popcount\")]"
},
{
- "other": "#[attr = Inline(Hint)]"
+ "other": "#[doc(alias = \"popcnt\")]"
+ },
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
- "crate_id": 0,
+ "crate_id": 1,
"deprecation": null,
- "docs": "Sets the value of the entry, and returns an `OccupiedEntry`.\n\n# Examples\n\n```\nuse std::collections::HashMap;\n\nlet mut map: HashMap<&str, String> = HashMap::new();\nlet entry = map.entry(\"poneyland\").insert_entry(\"hoho\".to_string());\n\nassert_eq!(entry.key(), &\"poneyland\");\n```",
- "id": 1142,
+ "docs": "Returns the number of ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 0b01001100u64;\nassert_eq!(n.count_ones(), 3);\n\nlet max = u64::MAX;\nassert_eq!(max.count_ones(), 64);\n\nlet zero = 0u64;\nassert_eq!(zero.count_ones(), 0);\n```",
+ "id": 11412,
"inner": {
"function": {
"generics": {
@@ -115105,7 +113203,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -115115,69 +113213,34 @@
{
"generic": "Self"
}
- ],
- [
- "value",
- {
- "generic": "V"
- }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 1132,
- "path": "OccupiedEntry"
- }
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "insert_entry",
+ "name": "count_ones",
"span": {
"begin": [
- 2480,
+ 1160,
5
],
"end": [
- 2488,
+ 1181,
6
],
- "filename": "std/src/collections/hash/map.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11420": {
+ "11413": {
"attrs": [
{
- "other": "#[doc(alias = \"popcount\")]"
- },
- {
- "other": "#[doc(alias = \"popcnt\")]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -115190,8 +113253,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 0b100_0000isize;\n\nassert_eq!(n.count_ones(), 1);\n```\n",
- "id": 11420,
+ "docs": "Returns the number of zeros in the binary representation of `self`.\n\n# Examples\n\n```\nlet zero = 0u64;\nassert_eq!(zero.count_zeros(), 64);\n\nlet max = u64::MAX;\nassert_eq!(max.count_zeros(), 0);\n```",
+ "id": 11413,
"inner": {
"function": {
"generics": {
@@ -115222,38 +113285,41 @@
}
},
"links": {},
- "name": "count_ones",
+ "name": "count_zeros",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11421": {
+ "11414": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of zeros in the binary representation of `self`.\n\n# Examples\n\n```\nassert_eq!(isize::MAX.count_zeros(), 1);\n```",
- "id": 11421,
+ "docs": "Returns the base 2 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is zero.\n\n# Examples\n\n```\nassert_eq!(2u64.ilog2(), 1);\n```",
+ "id": 11414,
"inner": {
"function": {
"generics": {
@@ -115284,41 +113350,38 @@
}
},
"links": {},
- "name": "count_zeros",
+ "name": "ilog2",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11422": {
+ "11415": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 2 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero.\n\n# Examples\n\n```\nassert_eq!(2isize.ilog2(), 1);\n```",
- "id": 11422,
+ "docs": "Returns the number of leading zeros in the binary representation of `self`.\n\nDepending on what you're doing with the value, you might also be interested in the\n[`ilog2`] function which returns a consistent number, even if the type widens.\n\n# Examples\n\n```\nlet n = u64::MAX >> 2;\nassert_eq!(n.leading_zeros(), 2);\n\nlet zero = 0u64;\nassert_eq!(zero.leading_zeros(), 64);\n\nlet max = u64::MAX;\nassert_eq!(max.leading_zeros(), 0);\n```\n[`ilog2`]: u64::ilog2",
+ "id": 11415,
"inner": {
"function": {
"generics": {
@@ -115348,25 +113411,27 @@
}
}
},
- "links": {},
- "name": "ilog2",
+ "links": {
+ "u64::ilog2": 11414
+ },
+ "name": "leading_zeros",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11423": {
+ "11416": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -115379,8 +113444,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of leading zeros in the binary representation of `self`.\n\nDepending on what you're doing with the value, you might also be interested in the\n[`ilog2`] function which returns a consistent number, even if the type widens.\n\n# Examples\n\n```\nlet n = -1isize;\n\nassert_eq!(n.leading_zeros(), 0);\n```\n[`ilog2`]: isize::ilog2",
- "id": 11423,
+ "docs": "Returns the number of trailing zeros in the binary representation\nof `self`.\n\n# Examples\n\n```\nlet n = 0b0101000u64;\nassert_eq!(n.trailing_zeros(), 3);\n\nlet zero = 0u64;\nassert_eq!(zero.trailing_zeros(), 64);\n\nlet max = u64::MAX;\nassert_eq!(max.trailing_zeros(), 0);\n```",
+ "id": 11416,
"inner": {
"function": {
"generics": {
@@ -115410,30 +113475,28 @@
}
}
},
- "links": {
- "isize::ilog2": 11422
- },
- "name": "leading_zeros",
+ "links": {},
+ "name": "trailing_zeros",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11424": {
+ "11417": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
},
{
"must_use": {
@@ -115443,8 +113506,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of trailing zeros in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = -4isize;\n\nassert_eq!(n.trailing_zeros(), 2);\n```",
- "id": 11424,
+ "docs": "Returns the number of leading ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = !(u64::MAX >> 2);\nassert_eq!(n.leading_ones(), 2);\n\nlet zero = 0u64;\nassert_eq!(zero.leading_ones(), 0);\n\nlet max = u64::MAX;\nassert_eq!(max.leading_ones(), 64);\n```",
+ "id": 11417,
"inner": {
"function": {
"generics": {
@@ -115475,21 +113538,21 @@
}
},
"links": {},
- "name": "trailing_zeros",
+ "name": "leading_ones",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11425": {
+ "11418": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
@@ -115505,8 +113568,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of leading ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = -1isize;\n\nassert_eq!(n.leading_ones(), 64);\n```",
- "id": 11425,
+ "docs": "Returns the number of trailing ones in the binary representation\nof `self`.\n\n# Examples\n\n```\nlet n = 0b1010111u64;\nassert_eq!(n.trailing_ones(), 3);\n\nlet zero = 0u64;\nassert_eq!(zero.trailing_ones(), 0);\n\nlet max = u64::MAX;\nassert_eq!(max.trailing_ones(), 64);\n```",
+ "id": 11418,
"inner": {
"function": {
"generics": {
@@ -115537,27 +113600,24 @@
}
},
"links": {},
- "name": "leading_ones",
+ "name": "trailing_ones",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11426": {
+ "11419": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 142326, is_soft: false}, feature: \"uint_bit_width\"}}]"
},
{
"must_use": {
@@ -115567,8 +113627,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of trailing ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 3isize;\n\nassert_eq!(n.trailing_ones(), 2);\n```",
- "id": 11426,
+ "docs": "Returns the minimum number of bits required to represent `self`.\n\nThis method returns zero if `self` is zero.\n\n# Examples\n\n```\n#![feature(uint_bit_width)]\n\nassert_eq!(0_u64.bit_width(), 0);\nassert_eq!(0b111_u64.bit_width(), 3);\nassert_eq!(0b1110_u64.bit_width(), 4);\nassert_eq!(u64::MAX.bit_width(), 64);\n```",
+ "id": 11419,
"inner": {
"function": {
"generics": {
@@ -115599,21 +113659,107 @@
}
},
"links": {},
- "name": "trailing_ones",
+ "name": "bit_width",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11427": {
+ "1142": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 83, patch: 0})}, feature: \"entry_insert\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": "Sets the value of the entry, and returns an `OccupiedEntry`.\n\n# Examples\n\n```\nuse std::collections::HashMap;\n\nlet mut map: HashMap<&str, String> = HashMap::new();\nlet entry = map.entry(\"poneyland\").insert_entry(\"hoho\".to_string());\n\nassert_eq!(entry.key(), &\"poneyland\");\n```",
+ "id": 1142,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "value",
+ {
+ "generic": "V"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 1132,
+ "path": "OccupiedEntry"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "insert_entry",
+ "span": {
+ "begin": [
+ 2475,
+ 5
+ ],
+ "end": [
+ 2483,
+ 6
+ ],
+ "filename": "std/src/collections/hash/map.rs"
+ },
+ "visibility": "public"
+ },
+ "11420": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
@@ -115626,8 +113772,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `self` with only the most significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: isize = 0b_01100100;\n\nassert_eq!(n.isolate_highest_one(), 0b_01000000);\nassert_eq!(0_isize.isolate_highest_one(), 0);\n```",
- "id": 11427,
+ "docs": "Returns `self` with only the most significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: u64 = 0b_01100100;\n\nassert_eq!(n.isolate_highest_one(), 0b_01000000);\nassert_eq!(0_u64.isolate_highest_one(), 0);\n```",
+ "id": 11420,
"inner": {
"function": {
"generics": {
@@ -115652,7 +113798,7 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
@@ -115661,18 +113807,18 @@
"name": "isolate_highest_one",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11428": {
+ "11421": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
@@ -115685,8 +113831,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `self` with only the least significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: isize = 0b_01100100;\n\nassert_eq!(n.isolate_lowest_one(), 0b_00000100);\nassert_eq!(0_isize.isolate_lowest_one(), 0);\n```",
- "id": 11428,
+ "docs": "Returns `self` with only the least significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: u64 = 0b_01100100;\n\nassert_eq!(n.isolate_lowest_one(), 0b_00000100);\nassert_eq!(0_u64.isolate_lowest_one(), 0);\n```",
+ "id": 11421,
"inner": {
"function": {
"generics": {
@@ -115711,7 +113857,7 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
@@ -115720,18 +113866,18 @@
"name": "isolate_lowest_one",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11429": {
+ "11422": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
@@ -115744,8 +113890,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the index of the highest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_isize.highest_one(), None);\nassert_eq!(0x1_isize.highest_one(), Some(0));\nassert_eq!(0x10_isize.highest_one(), Some(4));\nassert_eq!(0x1f_isize.highest_one(), Some(4));\n```",
- "id": 11429,
+ "docs": "Returns the index of the highest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_u64.highest_one(), None);\nassert_eq!(0x1_u64.highest_one(), Some(0));\nassert_eq!(0x10_u64.highest_one(), Some(4));\nassert_eq!(0x1f_u64.highest_one(), Some(4));\n```",
+ "id": 11422,
"inner": {
"function": {
"generics": {
@@ -115794,116 +113940,18 @@
"name": "highest_one",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "1143": {
- "attrs": [],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 1143,
- "inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 776,
- "path": "Entry"
- }
- },
- "generics": {
- "params": [
- {
- "kind": {
- "lifetime": {
- "outlives": []
- }
- },
- "name": "'a"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "K"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "V"
- }
- ],
- "where_predicates": []
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 1137,
- 1138,
- 1139,
- 1140,
- 1141,
- 1142
- ],
- "provided_trait_methods": [],
- "trait": null
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 2332,
- 1
- ],
- "end": [
- 2489,
- 2
- ],
- "filename": "std/src/collections/hash/map.rs"
- },
- "visibility": "default"
- },
- "11430": {
+ "11423": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
@@ -115916,8 +113964,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the index of the lowest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_isize.lowest_one(), None);\nassert_eq!(0x1_isize.lowest_one(), Some(0));\nassert_eq!(0x10_isize.lowest_one(), Some(4));\nassert_eq!(0x1f_isize.lowest_one(), Some(0));\n```",
- "id": 11430,
+ "docs": "Returns the index of the lowest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_u64.lowest_one(), None);\nassert_eq!(0x1_u64.lowest_one(), Some(0));\nassert_eq!(0x10_u64.lowest_one(), Some(4));\nassert_eq!(0x1f_u64.lowest_one(), Some(0));\n```",
+ "id": 11423,
"inner": {
"function": {
"generics": {
@@ -115966,18 +114014,18 @@
"name": "lowest_one",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11431": {
+ "11424": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\", promotable: false}}]"
@@ -115993,8 +114041,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the bit pattern of `self` reinterpreted as an unsigned integer of the same size.\n\nThis produces the same result as an `as` cast, but ensures that the bit-width remains\nthe same.\n\n# Examples\n\n```\nlet n = -1isize;\n\nassert_eq!(n.cast_unsigned(), usize::MAX);\n```",
- "id": 11431,
+ "docs": "Returns the bit pattern of `self` reinterpreted as a signed integer of the same size.\n\nThis produces the same result as an `as` cast, but ensures that the bit-width remains\nthe same.\n\n# Examples\n\n```\nlet n = u64::MAX;\n\nassert_eq!(n.cast_signed(), -1i64);\n```",
+ "id": 11424,
"inner": {
"function": {
"generics": {
@@ -116019,30 +114067,30 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "i64"
}
}
}
},
"links": {},
- "name": "cast_unsigned",
+ "name": "cast_signed",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11432": {
+ "11425": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -116055,8 +114103,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts the bits to the left by a specified amount, `n`,\nwrapping the truncated bits to the end of the resulting integer.\n\nPlease note this isn't the same operation as the `<<` shifting operator!\n\n# Examples\n\n```\nlet n = 0xaa00000000006e1isize;\nlet m = 0x6e10aa;\n\nassert_eq!(n.rotate_left(12), m);\n```",
- "id": 11432,
+ "docs": "Shifts the bits to the left by a specified amount, `n`,\nwrapping the truncated bits to the end of the resulting integer.\n\nPlease note this isn't the same operation as the `<<` shifting operator!\n\n# Examples\n\n```\nlet n = 0xaa00000000006e1u64;\nlet m = 0x6e10aa;\n\nassert_eq!(n.rotate_left(12), m);\n```",
+ "id": 11425,
"inner": {
"function": {
"generics": {
@@ -116087,7 +114135,7 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
@@ -116096,21 +114144,21 @@
"name": "rotate_left",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11433": {
+ "11426": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -116123,8 +114171,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts the bits to the right by a specified amount, `n`,\nwrapping the truncated bits to the beginning of the resulting\ninteger.\n\nPlease note this isn't the same operation as the `>>` shifting operator!\n\n# Examples\n\n```\nlet n = 0x6e10aaisize;\nlet m = 0xaa00000000006e1;\n\nassert_eq!(n.rotate_right(12), m);\n```",
- "id": 11433,
+ "docs": "Shifts the bits to the right by a specified amount, `n`,\nwrapping the truncated bits to the beginning of the resulting\ninteger.\n\nPlease note this isn't the same operation as the `>>` shifting operator!\n\n# Examples\n\n```\nlet n = 0x6e10aau64;\nlet m = 0xaa00000000006e1;\n\nassert_eq!(n.rotate_right(12), m);\n```",
+ "id": 11426,
"inner": {
"function": {
"generics": {
@@ -116155,7 +114203,7 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
@@ -116164,24 +114212,24 @@
"name": "rotate_right",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11434": {
+ "11427": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 145686, is_soft: false}, feature: \"funnel_shifts\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145686, is_soft: false}, feature: \"funnel_shifts\"}}]"
},
{
"must_use": {
@@ -116191,8 +114239,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Reverses the byte order of the integer.\n\n# Examples\n\n```\nlet n = 0x1234567890123456isize;\n\nlet m = n.swap_bytes();\n\nassert_eq!(m, 0x5634129078563412);\n```",
- "id": 11434,
+ "docs": "Performs a left funnel shift (concatenates `self` with `rhs`, with `self`\nmaking up the most significant half, then shifts the combined value left\nby `n`, and most significant half is extracted to produce the result).\n\nPlease note this isn't the same operation as the `<<` shifting operator or\n[`rotate_left`](Self::rotate_left), although `a.funnel_shl(a, n)` is *equivalent*\nto `a.rotate_left(n)`.\n\n# Panics\n\nIf `n` is greater than or equal to the number of bits in `self`\n\n# Examples\n\nBasic usage:\n\n```\n#![feature(funnel_shifts)]\nlet a = 0xaa00000000006e1u64;\nlet b = 0x2fe78e45983acd98u64;\nlet m = 0x6e12fe;\n\nassert_eq!(a.funnel_shl(b, 12), m);\n```",
+ "id": 11427,
"inner": {
"function": {
"generics": {
@@ -116213,37 +114261,51 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u64"
+ }
+ ],
+ [
+ "n",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
},
- "links": {},
- "name": "swap_bytes",
+ "links": {
+ "Self::rotate_left": 11425
+ },
+ "name": "funnel_shl",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11435": {
+ "11428": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 145686, is_soft: false}, feature: \"funnel_shifts\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145686, is_soft: false}, feature: \"funnel_shifts\"}}]"
},
{
"must_use": {
@@ -116253,8 +114315,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\n second least-significant bit becomes second most-significant bit, etc.\n\n# Examples\n\n```\nlet n = 0x1234567890123456isize;\nlet m = n.reverse_bits();\n\nassert_eq!(m, 0x6a2c48091e6a2c48);\nassert_eq!(0, 0isize.reverse_bits());\n```",
- "id": 11435,
+ "docs": "Performs a right funnel shift (concatenates `self` and `rhs`, with `self`\nmaking up the most significant half, then shifts the combined value right\nby `n`, and least significant half is extracted to produce the result).\n\nPlease note this isn't the same operation as the `>>` shifting operator or\n[`rotate_right`](Self::rotate_right), although `a.funnel_shr(a, n)` is *equivalent*\nto `a.rotate_right(n)`.\n\n# Panics\n\nIf `n` is greater than or equal to the number of bits in `self`\n\n# Examples\n\nBasic usage:\n\n```\n#![feature(funnel_shifts)]\nlet a = 0xaa00000000006e1u64;\nlet b = 0x2fe78e45983acd98u64;\nlet m = 0x6e12fe78e45983ac;\n\nassert_eq!(a.funnel_shr(b, 12), m);\n```",
+ "id": 11428,
"inner": {
"function": {
"generics": {
@@ -116275,48 +114337,62 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u64"
+ }
+ ],
+ [
+ "n",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
},
- "links": {},
- "name": "reverse_bits",
+ "links": {
+ "Self::rotate_right": 11426
+ },
+ "name": "funnel_shr",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11436": {
+ "11429": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts an integer from big endian to the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Aisize;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(isize::from_be(n), n)\n} else {\n assert_eq!(isize::from_be(n), n.swap_bytes())\n}\n```",
- "id": 11436,
+ "docs": "Reverses the byte order of the integer.\n\n# Examples\n\n```\nlet n = 0x1234567890123456u64;\nlet m = n.swap_bytes();\n\nassert_eq!(m, 0x5634129078563412);\n```",
+ "id": 11429,
"inner": {
"function": {
"generics": {
@@ -116333,38 +114409,198 @@
"sig": {
"inputs": [
[
- "x",
+ "self",
{
- "primitive": "isize"
+ "generic": "Self"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "from_be",
+ "name": "swap_bytes",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11437": {
+ "1143": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1143,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 776,
+ "path": "Entry"
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "lifetime": {
+ "outlives": []
+ }
+ },
+ "name": "'a"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "K"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "V"
+ }
+ ],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 1137,
+ 1138,
+ 1139,
+ 1140,
+ 1141,
+ 1142
+ ],
+ "provided_trait_methods": [],
+ "trait": null
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 2327,
+ 1
+ ],
+ "end": [
+ 2484,
+ 2
+ ],
+ "filename": "std/src/collections/hash/map.rs"
+ },
+ "visibility": "default"
+ },
+ "11430": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\n second least-significant bit becomes second most-significant bit, etc.\n\n# Examples\n\n```\nlet n = 0x1234567890123456u64;\nlet m = n.reverse_bits();\n\nassert_eq!(m, 0x6a2c48091e6a2c48);\nassert_eq!(0, 0u64.reverse_bits());\n```",
+ "id": 11430,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u64"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "reverse_bits",
+ "span": {
+ "begin": [
+ 1160,
+ 5
+ ],
+ "end": [
+ 1181,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11431": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -116377,8 +114613,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts an integer from little endian to the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Aisize;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(isize::from_le(n), n)\n} else {\n assert_eq!(isize::from_le(n), n.swap_bytes())\n}\n```",
- "id": 11437,
+ "docs": "Converts an integer from big endian to the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au64;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(u64::from_be(n), n)\n} else {\n assert_eq!(u64::from_be(n), n.swap_bytes())\n}\n```",
+ "id": 11431,
"inner": {
"function": {
"generics": {
@@ -116397,50 +114633,50 @@
[
"x",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "from_le",
+ "name": "from_be",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11438": {
+ "11432": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts `self` to big endian from the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Aisize;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(n.to_be(), n)\n} else {\n assert_eq!(n.to_be(), n.swap_bytes())\n}\n```",
- "id": 11438,
+ "docs": "Converts an integer from little endian to the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au64;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(u64::from_le(n), n)\n} else {\n assert_eq!(u64::from_le(n), n.swap_bytes())\n}\n```",
+ "id": 11432,
"inner": {
"function": {
"generics": {
@@ -116457,38 +114693,38 @@
"sig": {
"inputs": [
[
- "self",
+ "x",
{
- "generic": "Self"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "to_be",
+ "name": "from_le",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11439": {
+ "11433": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -116501,8 +114737,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts `self` to little endian from the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Aisize;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(n.to_le(), n)\n} else {\n assert_eq!(n.to_le(), n.swap_bytes())\n}\n```",
- "id": 11439,
+ "docs": "Converts `self` to big endian from the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au64;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(n.to_be(), n)\n} else {\n assert_eq!(n.to_be(), n.swap_bytes())\n}\n```",
+ "id": 11433,
"inner": {
"function": {
"generics": {
@@ -116527,39 +114763,44 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "to_le",
+ "name": "to_be",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "1144": {
+ "11434": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 28, patch: 0})}, feature: \"entry_or_default\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
{
- "other": "#[attr = Inline(Hint)]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
- "crate_id": 0,
+ "crate_id": 1,
"deprecation": null,
- "docs": "Ensures a value is in the entry by inserting the default value if empty,\nand returns a mutable reference to the value in the entry.\n\n# Examples\n\n```\n# fn main() {\nuse std::collections::HashMap;\n\nlet mut map: HashMap<&str, Option> = HashMap::new();\nmap.entry(\"poneyland\").or_default();\n\nassert_eq!(map[\"poneyland\"], None);\n# }\n```",
- "id": 1144,
+ "docs": "Converts `self` to little endian from the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au64;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(n.to_le(), n)\n} else {\n assert_eq!(n.to_le(), n.swap_bytes())\n}\n```",
+ "id": 11434,
"inner": {
"function": {
"generics": {
@@ -116570,7 +114811,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -116584,33 +114825,27 @@
],
"is_c_variadic": false,
"output": {
- "borrowed_ref": {
- "is_mutable": true,
- "lifetime": "'a",
- "type": {
- "generic": "V"
- }
- }
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "or_default",
+ "name": "to_le",
"span": {
"begin": [
- 2509,
+ 1160,
5
],
"end": [
- 2514,
+ 1181,
6
],
- "filename": "std/src/collections/hash/map.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11440": {
+ "11435": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
@@ -116626,8 +114861,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer addition. Computes `self + rhs`, returning `None`\nif overflow occurred.\n\n# Examples\n\n```\nassert_eq!((isize::MAX - 2).checked_add(1), Some(isize::MAX - 1));\nassert_eq!((isize::MAX - 2).checked_add(3), None);\n```",
- "id": 11440,
+ "docs": "Checked integer addition. Computes `self + rhs`, returning `None`\nif overflow occurred.\n\n# Examples\n\n```\nassert_eq!((u64::MAX - 2).checked_add(1), Some(u64::MAX - 1));\nassert_eq!((u64::MAX - 2).checked_add(3), None);\n```",
+ "id": 11435,
"inner": {
"function": {
"generics": {
@@ -116652,7 +114887,7 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
@@ -116664,7 +114899,7 @@
"args": [
{
"type": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
],
@@ -116682,24 +114917,24 @@
"name": "checked_add",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11441": {
+ "11436": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -116712,8 +114947,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer addition. Computes `self + rhs`, panicking\nif overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((isize::MAX - 2).strict_add(1), isize::MAX - 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (isize::MAX - 2).strict_add(3);\n```",
- "id": 11441,
+ "docs": "Strict integer addition. Computes `self + rhs`, panicking\nif overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((u64::MAX - 2).strict_add(1), u64::MAX - 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (u64::MAX - 2).strict_add(3);\n```",
+ "id": 11436,
"inner": {
"function": {
"generics": {
@@ -116738,13 +114973,13 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
@@ -116753,21 +114988,21 @@
"name": "strict_add",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11442": {
+ "11437": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -116780,8 +115015,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) addition. Computes `self + rhs`, wrapping around at the\nboundary of the type.\n\n# Examples\n\n```\nassert_eq!(100isize.wrapping_add(27), 127);\nassert_eq!(isize::MAX.wrapping_add(2), isize::MIN + 1);\n```",
- "id": 11442,
+ "docs": "Wrapping (modular) addition. Computes `self + rhs`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(200u64.wrapping_add(55), 255);\nassert_eq!(200u64.wrapping_add(u64::MAX), 199);\n```",
+ "id": 11437,
"inner": {
"function": {
"generics": {
@@ -116806,13 +115041,13 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
@@ -116821,18 +115056,18 @@
"name": "wrapping_add",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11443": {
+ "11438": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
@@ -116851,8 +115086,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer addition. Computes `self + rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_add(y)` is semantically equivalent to calling\n`x.`[`checked_add`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_add`].\n\n# Safety\n\nThis results in undefined behavior when\n`self + rhs > isize::MAX` or `self + rhs < isize::MIN`,\ni.e. when [`checked_add`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_add`]: isize::checked_add\n[`wrapping_add`]: isize::wrapping_add",
- "id": 11443,
+ "docs": "Unchecked integer addition. Computes `self + rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_add(y)` is semantically equivalent to calling\n`x.`[`checked_add`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_add`].\n\n# Safety\n\nThis results in undefined behavior when\n`self + rhs > u64::MAX` or `self + rhs < u64::MIN`,\ni.e. when [`checked_add`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_add`]: u64::checked_add\n[`wrapping_add`]: u64::wrapping_add",
+ "id": 11438,
"inner": {
"function": {
"generics": {
@@ -116877,36 +115112,36 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
},
"links": {
- "isize::checked_add": 11440,
- "isize::wrapping_add": 11442
+ "u64::checked_add": 11435,
+ "u64::wrapping_add": 11437
},
"name": "unchecked_add",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11444": {
+ "11439": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
@@ -116922,8 +115157,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked addition with an unsigned integer. Computes `self + rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1isize.checked_add_unsigned(2), Some(3));\nassert_eq!((isize::MAX - 2).checked_add_unsigned(3), None);\n```",
- "id": 11444,
+ "docs": "Checked addition with a signed integer. Computes `self + rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1u64.checked_add_signed(2), Some(3));\nassert_eq!(1u64.checked_add_signed(-2), None);\nassert_eq!((u64::MAX - 2).checked_add_signed(3), None);\n```",
+ "id": 11439,
"inner": {
"function": {
"generics": {
@@ -116948,7 +115183,7 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "i64"
}
]
],
@@ -116960,7 +115195,7 @@
"args": [
{
"type": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
],
@@ -116975,27 +115210,90 @@
}
},
"links": {},
- "name": "checked_add_unsigned",
+ "name": "checked_add_signed",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11445": {
+ "1144": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 28, patch: 0})}, feature: \"entry_or_default\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": "Ensures a value is in the entry by inserting the default value if empty,\nand returns a mutable reference to the value in the entry.\n\n# Examples\n\n```\n# fn main() {\nuse std::collections::HashMap;\n\nlet mut map: HashMap<&str, Option> = HashMap::new();\nmap.entry(\"poneyland\").or_default();\n\nassert_eq!(map[\"poneyland\"], None);\n# }\n```",
+ "id": 1144,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "borrowed_ref": {
+ "is_mutable": true,
+ "lifetime": "'a",
+ "type": {
+ "generic": "V"
+ }
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "or_default",
+ "span": {
+ "begin": [
+ 2504,
+ 5
+ ],
+ "end": [
+ 2509,
+ 6
+ ],
+ "filename": "std/src/collections/hash/map.rs"
+ },
+ "visibility": "public"
+ },
+ "11440": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -117008,8 +115306,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict addition with an unsigned integer. Computes `self + rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1isize.strict_add_unsigned(2), 3);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (isize::MAX - 2).strict_add_unsigned(3);\n```",
- "id": 11445,
+ "docs": "Strict addition with a signed integer. Computes `self + rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1u64.strict_add_signed(2), 3);\n```\n\nThe following panic because of overflow:\n\n```should_panic\nlet _ = 1u64.strict_add_signed(-2);\n```\n\n```should_panic\nlet _ = (u64::MAX - 2).strict_add_signed(3);\n```",
+ "id": 11440,
"inner": {
"function": {
"generics": {
@@ -117034,33 +115332,33 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "strict_add_unsigned",
+ "name": "strict_add_signed",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11446": {
+ "11441": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
@@ -117076,8 +115374,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer subtraction. Computes `self - rhs`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!((isize::MIN + 2).checked_sub(1), Some(isize::MIN + 1));\nassert_eq!((isize::MIN + 2).checked_sub(3), None);\n```",
- "id": 11446,
+ "docs": "Checked integer subtraction. Computes `self - rhs`, returning\n`None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1u64.checked_sub(1), Some(0));\nassert_eq!(0u64.checked_sub(1), None);\n```",
+ "id": 11441,
"inner": {
"function": {
"generics": {
@@ -117102,7 +115400,7 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
@@ -117114,7 +115412,7 @@
"args": [
{
"type": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
],
@@ -117132,24 +115430,24 @@
"name": "checked_sub",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11447": {
+ "11442": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -117162,8 +115460,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer subtraction. Computes `self - rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((isize::MIN + 2).strict_sub(1), isize::MIN + 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (isize::MIN + 2).strict_sub(3);\n```",
- "id": 11447,
+ "docs": "Strict integer subtraction. Computes `self - rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1u64.strict_sub(1), 0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0u64.strict_sub(1);\n```",
+ "id": 11442,
"inner": {
"function": {
"generics": {
@@ -117188,13 +115486,13 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
@@ -117203,21 +115501,21 @@
"name": "strict_sub",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11448": {
+ "11443": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -117230,8 +115528,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) subtraction. Computes `self - rhs`, wrapping around at the\nboundary of the type.\n\n# Examples\n\n```\nassert_eq!(0isize.wrapping_sub(127), -127);\nassert_eq!((-2isize).wrapping_sub(isize::MAX), isize::MAX);\n```",
- "id": 11448,
+ "docs": "Wrapping (modular) subtraction. Computes `self - rhs`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(100u64.wrapping_sub(100), 0);\nassert_eq!(100u64.wrapping_sub(u64::MAX), 101);\n```",
+ "id": 11443,
"inner": {
"function": {
"generics": {
@@ -117256,13 +115554,13 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
@@ -117271,18 +115569,18 @@
"name": "wrapping_sub",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11449": {
+ "11444": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
@@ -117301,8 +115599,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer subtraction. Computes `self - rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_sub(y)` is semantically equivalent to calling\n`x.`[`checked_sub`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_sub`].\n\n# Safety\n\nThis results in undefined behavior when\n`self - rhs > isize::MAX` or `self - rhs < isize::MIN`,\ni.e. when [`checked_sub`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_sub`]: isize::checked_sub\n[`wrapping_sub`]: isize::wrapping_sub",
- "id": 11449,
+ "docs": "Unchecked integer subtraction. Computes `self - rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_sub(y)` is semantically equivalent to calling\n`x.`[`checked_sub`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_sub`].\n\nIf you find yourself writing code like this:\n\n```\n# let foo = 30_u32;\n# let bar = 20;\nif foo >= bar {\n // SAFETY: just checked it will not overflow\n let diff = unsafe { foo.unchecked_sub(bar) };\n // ... use diff ...\n}\n```\n\nConsider changing it to\n\n```\n# let foo = 30_u32;\n# let bar = 20;\nif let Some(diff) = foo.checked_sub(bar) {\n // ... use diff ...\n}\n```\n\nAs that does exactly the same thing -- including telling the optimizer\nthat the subtraction cannot overflow -- but avoids needing `unsafe`.\n\n# Safety\n\nThis results in undefined behavior when\n`self - rhs > u64::MAX` or `self - rhs < u64::MIN`,\ni.e. when [`checked_sub`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_sub`]: u64::checked_sub\n[`wrapping_sub`]: u64::wrapping_sub",
+ "id": 11444,
"inner": {
"function": {
"generics": {
@@ -117327,147 +115625,42 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
},
"links": {
- "isize::checked_sub": 11446,
- "isize::wrapping_sub": 11448
+ "u64::checked_sub": 11441,
+ "u64::wrapping_sub": 11443
},
"name": "unchecked_sub",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "1145": {
- "attrs": [],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 1145,
- "inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 776,
- "path": "Entry"
- }
- },
- "generics": {
- "params": [
- {
- "kind": {
- "lifetime": {
- "outlives": []
- }
- },
- "name": "'a"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "K"
- },
- {
- "kind": {
- "type": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 109,
- "path": "Default"
- }
- }
- }
- ],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "V"
- }
- ],
- "where_predicates": []
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 1144
- ],
- "provided_trait_methods": [],
- "trait": null
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 2491,
- 1
- ],
- "end": [
- 2515,
- 2
- ],
- "filename": "std/src/collections/hash/map.rs"
- },
- "visibility": "default"
- },
- "11450": {
+ "11445": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
},
{
"must_use": {
@@ -117477,8 +115670,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked subtraction with an unsigned integer. Computes `self - rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1isize.checked_sub_unsigned(2), Some(-1));\nassert_eq!((isize::MIN + 2).checked_sub_unsigned(3), None);\n```",
- "id": 11450,
+ "docs": "Checked subtraction with a signed integer. Computes `self - rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1u64.checked_sub_signed(2), None);\nassert_eq!(1u64.checked_sub_signed(-2), Some(3));\nassert_eq!((u64::MAX - 2).checked_sub_signed(-4), None);\n```",
+ "id": 11445,
"inner": {
"function": {
"generics": {
@@ -117503,7 +115696,7 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "i64"
}
]
],
@@ -117515,7 +115708,7 @@
"args": [
{
"type": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
],
@@ -117530,27 +115723,27 @@
}
},
"links": {},
- "name": "checked_sub_unsigned",
+ "name": "checked_sub_signed",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11451": {
+ "11446": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -117563,8 +115756,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict subtraction with an unsigned integer. Computes `self - rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1isize.strict_sub_unsigned(2), -1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (isize::MIN + 2).strict_sub_unsigned(3);\n```",
- "id": 11451,
+ "docs": "Strict subtraction with a signed integer. Computes `self - rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(3u64.strict_sub_signed(2), 1);\n```\n\nThe following panic because of overflow:\n\n```should_panic\nlet _ = 1u64.strict_sub_signed(2);\n```\n\n```should_panic\nlet _ = (u64::MAX).strict_sub_signed(-1);\n```",
+ "id": 11446,
"inner": {
"function": {
"generics": {
@@ -117589,50 +115782,45 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "strict_sub_unsigned",
+ "name": "strict_sub_signed",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11452": {
+ "11447": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_signed_diff\", promotable: false}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_signed_diff\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer multiplication. Computes `self * rhs`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(isize::MAX.checked_mul(1), Some(isize::MAX));\nassert_eq!(isize::MAX.checked_mul(2), None);\n```",
- "id": 11452,
+ "docs": "Checked integer subtraction. Computes `self - rhs` and checks if the result fits into an [`i64`], returning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(10u64.checked_signed_diff(2), Some(8));\nassert_eq!(2u64.checked_signed_diff(10), Some(-8));\nassert_eq!(u64::MAX.checked_signed_diff(i64::MAX as u64), None);\nassert_eq!((i64::MAX as u64).checked_signed_diff(u64::MAX), Some(i64::MIN));\nassert_eq!((i64::MAX as u64 + 1).checked_signed_diff(0), None);\nassert_eq!(u64::MAX.checked_signed_diff(u64::MAX), Some(0));\n```",
+ "id": 11447,
"inner": {
"function": {
"generics": {
@@ -117657,7 +115845,7 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
@@ -117669,7 +115857,7 @@
"args": [
{
"type": {
- "primitive": "isize"
+ "primitive": "i64"
}
}
],
@@ -117683,42 +115871,41 @@
}
}
},
- "links": {},
- "name": "checked_mul",
+ "links": {
+ "`i64`": 4824
+ },
+ "name": "checked_signed_diff",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11453": {
+ "11448": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer multiplication. Computes `self * rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(isize::MAX.strict_mul(1), isize::MAX);\n```\n\nThe following panics because of overflow:\n\n``` should_panic\nlet _ = isize::MAX.strict_mul(2);\n```",
- "id": 11453,
+ "docs": "Checked integer multiplication. Computes `self * rhs`, returning\n`None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(5u64.checked_mul(1), Some(5));\nassert_eq!(u64::MAX.checked_mul(2), None);\n```",
+ "id": 11448,
"inner": {
"function": {
"generics": {
@@ -117743,36 +115930,227 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u64"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "strict_mul",
+ "name": "checked_mul",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11454": {
+ "11449": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Strict integer multiplication. Computes `self * rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(5u64.strict_mul(1), 5);\n```\n\nThe following panics because of overflow:\n\n``` should_panic\nlet _ = u64::MAX.strict_mul(2);\n```",
+ "id": 11449,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u64"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u64"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "strict_mul",
+ "span": {
+ "begin": [
+ 1160,
+ 5
+ ],
+ "end": [
+ 1181,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1145": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1145,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 776,
+ "path": "Entry"
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "lifetime": {
+ "outlives": []
+ }
+ },
+ "name": "'a"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "K"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 107,
+ "path": "Default"
+ }
+ }
+ }
+ ],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "V"
+ }
+ ],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 1144
+ ],
+ "provided_trait_methods": [],
+ "trait": null
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 2486,
+ 1
+ ],
+ "end": [
+ 2510,
+ 2
+ ],
+ "filename": "std/src/collections/hash/map.rs"
+ },
+ "visibility": "default"
+ },
+ "11450": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -117785,8 +116163,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) multiplication. Computes `self * rhs`, wrapping around at\nthe boundary of the type.\n\n# Examples\n\n```\nassert_eq!(10isize.wrapping_mul(12), 120);\nassert_eq!(11i8.wrapping_mul(12), -124);\n```",
- "id": 11454,
+ "docs": "Wrapping (modular) multiplication. Computes `self *\nrhs`, wrapping around at the boundary of the type.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u8` is used.\n\n```\nassert_eq!(10u8.wrapping_mul(12), 120);\nassert_eq!(25u8.wrapping_mul(12), 44);\n```",
+ "id": 11450,
"inner": {
"function": {
"generics": {
@@ -117811,13 +116189,13 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
@@ -117826,18 +116204,18 @@
"name": "wrapping_mul",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11455": {
+ "11451": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
@@ -117856,8 +116234,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer multiplication. Computes `self * rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_mul(y)` is semantically equivalent to calling\n`x.`[`checked_mul`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_mul`].\n\n# Safety\n\nThis results in undefined behavior when\n`self * rhs > isize::MAX` or `self * rhs < isize::MIN`,\ni.e. when [`checked_mul`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_mul`]: isize::checked_mul\n[`wrapping_mul`]: isize::wrapping_mul",
- "id": 11455,
+ "docs": "Unchecked integer multiplication. Computes `self * rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_mul(y)` is semantically equivalent to calling\n`x.`[`checked_mul`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_mul`].\n\n# Safety\n\nThis results in undefined behavior when\n`self * rhs > u64::MAX` or `self * rhs < u64::MIN`,\ni.e. when [`checked_mul`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_mul`]: u64::checked_mul\n[`wrapping_mul`]: u64::wrapping_mul",
+ "id": 11451,
"inner": {
"function": {
"generics": {
@@ -117882,36 +116260,36 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
},
"links": {
- "isize::checked_mul": 11452,
- "isize::wrapping_mul": 11454
+ "u64::checked_mul": 11448,
+ "u64::wrapping_mul": 11450
},
"name": "unchecked_mul",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11456": {
+ "11452": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
@@ -117927,8 +116305,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division. Computes `self / rhs`, returning `None` if `rhs == 0`\nor the division results in overflow.\n\n# Examples\n\n```\nassert_eq!((isize::MIN + 1).checked_div(-1), Some(9223372036854775807));\nassert_eq!(isize::MIN.checked_div(-1), None);\nassert_eq!((1isize).checked_div(0), None);\n```",
- "id": 11456,
+ "docs": "Checked integer division. Computes `self / rhs`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(128u64.checked_div(2), Some(64));\nassert_eq!(1u64.checked_div(0), None);\n```",
+ "id": 11452,
"inner": {
"function": {
"generics": {
@@ -117953,7 +116331,7 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
@@ -117965,7 +116343,7 @@
"args": [
{
"type": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
],
@@ -117983,24 +116361,24 @@
"name": "checked_div",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11457": {
+ "11453": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -118013,8 +116391,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer division. Computes `self / rhs`, panicking\nif overflow occurred.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type.\n\n# Examples\n\n```\nassert_eq!((isize::MIN + 1).strict_div(-1), 9223372036854775807);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = isize::MIN.strict_div(-1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1isize).strict_div(0);\n```",
- "id": 11457,
+ "docs": "Strict integer division. Computes `self / rhs`.\n\nStrict division on unsigned types is just normal division. There's no\nway overflow could ever happen. This function exists so that all\noperations are accounted for in the strict operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u64.strict_div(10), 10);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1u64).strict_div(0);\n```",
+ "id": 11453,
"inner": {
"function": {
"generics": {
@@ -118039,13 +116417,13 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
@@ -118054,18 +116432,18 @@
"name": "strict_div",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11458": {
+ "11454": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
@@ -118081,8 +116459,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked Euclidean division. Computes `self.div_euclid(rhs)`,\nreturning `None` if `rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!((isize::MIN + 1).checked_div_euclid(-1), Some(9223372036854775807));\nassert_eq!(isize::MIN.checked_div_euclid(-1), None);\nassert_eq!((1isize).checked_div_euclid(0), None);\n```",
- "id": 11458,
+ "docs": "Checked Euclidean division. Computes `self.div_euclid(rhs)`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(128u64.checked_div_euclid(2), Some(64));\nassert_eq!(1u64.checked_div_euclid(0), None);\n```",
+ "id": 11454,
"inner": {
"function": {
"generics": {
@@ -118107,7 +116485,7 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
@@ -118119,7 +116497,7 @@
"args": [
{
"type": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
],
@@ -118137,24 +116515,24 @@
"name": "checked_div_euclid",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11459": {
+ "11455": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -118167,8 +116545,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict Euclidean division. Computes `self.div_euclid(rhs)`, panicking\nif overflow occurred.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type.\n\n# Examples\n\n```\nassert_eq!((isize::MIN + 1).strict_div_euclid(-1), 9223372036854775807);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = isize::MIN.strict_div_euclid(-1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1isize).strict_div_euclid(0);\n```",
- "id": 11459,
+ "docs": "Strict Euclidean division. Computes `self.div_euclid(rhs)`.\n\nStrict division on unsigned types is just normal division. There's no\nway overflow could ever happen. This function exists so that all\noperations are accounted for in the strict operations. Since, for the\npositive integers, all common definitions of division are equal, this\nis exactly equal to `self.strict_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u64.strict_div_euclid(10), 10);\n```\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1u64).strict_div_euclid(0);\n```",
+ "id": 11455,
"inner": {
"function": {
"generics": {
@@ -118193,13 +116571,13 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
@@ -118208,11 +116586,306 @@
"name": "strict_div_euclid",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11456": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Checked integer division without remainder. Computes `self / rhs`,\nreturning `None` if `rhs == 0` or if `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64u64.checked_exact_div(2), Some(32));\nassert_eq!(64u64.checked_exact_div(32), Some(2));\nassert_eq!(64u64.checked_exact_div(0), None);\nassert_eq!(65u64.checked_exact_div(2), None);\n```",
+ "id": 11456,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u64"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u64"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "checked_exact_div",
+ "span": {
+ "begin": [
+ 1160,
+ 5
+ ],
+ "end": [
+ 1181,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11457": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Checked integer division without remainder. Computes `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs == 0` or `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64u64.exact_div(2), 32);\nassert_eq!(64u64.exact_div(32), 2);\n```\n\n```should_panic\n#![feature(exact_div)]\nlet _ = 65u64.exact_div(2);\n```",
+ "id": 11457,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u64"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u64"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "exact_div",
+ "span": {
+ "begin": [
+ 1160,
+ 5
+ ],
+ "end": [
+ 1181,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11458": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Unchecked integer division without remainder. Computes `self / rhs`.\n\n# Safety\n\nThis results in undefined behavior when `rhs == 0` or `self % rhs != 0`,\ni.e. when [`checked_exact_div`](Self::checked_exact_div) would return `None`.",
+ "id": 11458,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": true
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u64"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u64"
+ }
+ }
+ }
+ },
+ "links": {
+ "Self::checked_exact_div": 11456
+ },
+ "name": "unchecked_exact_div",
+ "span": {
+ "begin": [
+ 1160,
+ 5
+ ],
+ "end": [
+ 1181,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11459": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Checked integer remainder. Computes `self % rhs`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(5u64.checked_rem(2), Some(1));\nassert_eq!(5u64.checked_rem(0), None);\n```",
+ "id": 11459,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u64"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u64"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "checked_rem",
+ "span": {
+ "begin": [
+ 1160,
+ 5
+ ],
+ "end": [
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -118350,17 +117023,23 @@
"11460": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division without remainder. Computes `self / rhs`,\nreturning `None` if `rhs == 0`, the division results in overflow,\nor `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!((isize::MIN + 1).checked_exact_div(-1), Some(9223372036854775807));\nassert_eq!((-5isize).checked_exact_div(2), None);\nassert_eq!(isize::MIN.checked_exact_div(-1), None);\nassert_eq!((1isize).checked_exact_div(0), None);\n```",
+ "docs": "Strict integer remainder. Computes `self % rhs`.\n\nStrict remainder calculation on unsigned types is just the regular\nremainder calculation. There's no way overflow could ever happen.\nThis function exists so that all operations are accounted for in the\nstrict operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u64.strict_rem(10), 0);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5u64.strict_rem(0);\n```",
"id": 11460,
"inner": {
"function": {
@@ -118386,41 +117065,26 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "isize"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "checked_exact_div",
+ "name": "strict_rem",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -118430,7 +117094,10 @@
"11461": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -118440,7 +117107,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division without remainder. Computes `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs == 0`, the division results in overflow,\nor `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64isize.exact_div(2), 32);\nassert_eq!(64isize.exact_div(32), 2);\nassert_eq!((isize::MIN + 1).exact_div(-1), 9223372036854775807);\n```\n\n```should_panic\n#![feature(exact_div)]\nlet _ = 65isize.exact_div(2);\n```\n```should_panic\n#![feature(exact_div)]\nlet _ = isize::MIN.exact_div(-1);\n```",
+ "docs": "Checked Euclidean modulo. Computes `self.rem_euclid(rhs)`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(5u64.checked_rem_euclid(2), Some(1));\nassert_eq!(5u64.checked_rem_euclid(0), None);\n```",
"id": 11461,
"inner": {
"function": {
@@ -118466,26 +117133,41 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u64"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "exact_div",
+ "name": "checked_rem_euclid",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -118495,17 +117177,23 @@
"11462": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer division without remainder. Computes `self / rhs`.\n\n# Safety\n\nThis results in undefined behavior when `rhs == 0`, `self % rhs != 0`, or\n`self == isize::MIN && rhs == -1`,\ni.e. when [`checked_exact_div`](Self::checked_exact_div) would return `None`.",
+ "docs": "Strict Euclidean modulo. Computes `self.rem_euclid(rhs)`.\n\nStrict modulo calculation on unsigned types is just the regular\nremainder calculation. There's no way overflow could ever happen.\nThis function exists so that all operations are accounted for in the\nstrict operations. Since, for the positive integers, all common\ndefinitions of division are equal, this is exactly equal to\n`self.strict_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u64.strict_rem_euclid(10), 0);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5u64.strict_rem_euclid(0);\n```",
"id": 11462,
"inner": {
"function": {
@@ -118518,7 +117206,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -118531,28 +117219,26 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
},
- "links": {
- "Self::checked_exact_div": 11460
- },
- "name": "unchecked_exact_div",
+ "links": {},
+ "name": "strict_rem_euclid",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -118562,20 +117248,15 @@
"11463": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 135758, is_soft: false}, feature: \"disjoint_bitor\",\npromotable: false}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 135758, is_soft: false}, feature: \"disjoint_bitor\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer remainder. Computes `self % rhs`, returning `None` if\n`rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!(5isize.checked_rem(2), Some(1));\nassert_eq!(5isize.checked_rem(0), None);\nassert_eq!(isize::MIN.checked_rem(-1), None);\n```",
+ "docs": "Same value as `self | other`, but UB if any bit position is set in both inputs.\n\nThis is a situational micro-optimization for places where you'd rather\nuse addition on some platforms and bitwise or on other platforms, based\non exactly which instructions combine better with whatever else you're\ndoing. Note that there's no reason to bother using this for places\nwhere it's clear from the operations involved that they can't overlap.\nFor example, if you're combining `u16`s into a `u32` with\n`((a as u32) << 16) | (b as u32)`, that's fine, as the backend will\nknow those sides of the `|` are disjoint without needing help.\n\n# Examples\n\n```\n#![feature(disjoint_bitor)]\n\n// SAFETY: `1` and `4` have no bits in common.\nunsafe {\n assert_eq!(1_u64.unchecked_disjoint_bitor(4), 5);\n}\n```\n\n# Safety\n\nRequires that `(self & other) == 0`, otherwise it's immediate UB.\n\nEquivalently, requires that `(self | other) == (self + other)`.",
"id": 11463,
"inner": {
"function": {
@@ -118588,7 +117269,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -118599,43 +117280,28 @@
}
],
[
- "rhs",
+ "other",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "isize"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "checked_rem",
+ "name": "unchecked_disjoint_bitor",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -118645,10 +117311,10 @@
"11464": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
@@ -118661,7 +117327,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer remainder. Computes `self % rhs`, panicking if\nthe division results in overflow.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is `x % y` for `MIN / -1` on a\nsigned type (where `MIN` is the negative minimal value), which is invalid due to implementation artifacts.\n\n# Examples\n\n```\nassert_eq!(5isize.strict_rem(2), 1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5isize.strict_rem(0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = isize::MIN.strict_rem(-1);\n```",
+ "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nThis method might not be optimized owing to implementation details;\n`ilog2` can produce results more efficiently for base 2, and `ilog10`\ncan produce results more efficiently for base 10.\n\n# Panics\n\nThis function will panic if `self` is zero, or if `base` is less than 2.\n\n# Examples\n\n```\nassert_eq!(5u64.ilog(5), 1);\n```",
"id": 11464,
"inner": {
"function": {
@@ -118685,28 +117351,28 @@
}
],
[
- "rhs",
+ "base",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "strict_rem",
+ "name": "ilog",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -118716,20 +117382,23 @@
"11465": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked Euclidean remainder. Computes `self.rem_euclid(rhs)`, returning `None`\nif `rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!(5isize.checked_rem_euclid(2), Some(1));\nassert_eq!(5isize.checked_rem_euclid(0), None);\nassert_eq!(isize::MIN.checked_rem_euclid(-1), None);\n```",
+ "docs": "Returns the base 10 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is zero.\n\n# Example\n\n```\nassert_eq!(10u64.ilog10(), 1);\n```",
"id": 11465,
"inner": {
"function": {
@@ -118751,45 +117420,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "isize"
- }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "isize"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "checked_rem_euclid",
+ "name": "ilog10",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -118799,23 +117447,20 @@
"11466": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict Euclidean remainder. Computes `self.rem_euclid(rhs)`, panicking if\nthe division results in overflow.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is `x % y` for `MIN / -1` on a\nsigned type (where `MIN` is the negative minimal value), which is invalid due to implementation artifacts.\n\n# Examples\n\n```\nassert_eq!(5isize.strict_rem_euclid(2), 1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5isize.strict_rem_euclid(0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = isize::MIN.strict_rem_euclid(-1);\n```",
+ "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nReturns `None` if the number is zero, or if the base is not at least 2.\n\nThis method might not be optimized owing to implementation details;\n`checked_ilog2` can produce results more efficiently for base 2, and\n`checked_ilog10` can produce results more efficiently for base 10.\n\n# Examples\n\n```\nassert_eq!(5u64.checked_ilog(5), Some(1));\n```",
"id": 11466,
"inner": {
"function": {
@@ -118839,28 +117484,43 @@
}
],
[
- "rhs",
+ "base",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "strict_rem_euclid",
+ "name": "checked_ilog",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -118870,10 +117530,10 @@
"11467": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
@@ -118883,7 +117543,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked negation. Computes `-self`, returning `None` if `self == MIN`.\n\n# Examples\n\n```\nassert_eq!(5isize.checked_neg(), Some(-5));\nassert_eq!(isize::MIN.checked_neg(), None);\n```",
+ "docs": "Returns the base 2 logarithm of the number, rounded down.\n\nReturns `None` if the number is zero.\n\n# Examples\n\n```\nassert_eq!(2u64.checked_ilog2(), Some(1));\n```",
"id": 11467,
"inner": {
"function": {
@@ -118915,7 +117575,7 @@
"args": [
{
"type": {
- "primitive": "isize"
+ "primitive": "u32"
}
}
],
@@ -118930,14 +117590,14 @@
}
},
"links": {},
- "name": "checked_neg",
+ "name": "checked_ilog2",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -118947,20 +117607,20 @@
"11468": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_neg\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked negation. Computes `-self`, assuming overflow cannot occur.\n\n# Safety\n\nThis results in undefined behavior when\n`self == isize::MIN`,\ni.e. when [`checked_neg`] would return `None`.\n\n[`checked_neg`]: isize::checked_neg",
+ "docs": "Returns the base 10 logarithm of the number, rounded down.\n\nReturns `None` if the number is zero.\n\n# Examples\n\n```\nassert_eq!(10u64.checked_ilog10(), Some(1));\n```",
"id": 11468,
"inner": {
"function": {
@@ -118973,7 +117633,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -118986,22 +117646,35 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
- "links": {
- "isize::checked_neg": 11467
- },
- "name": "unchecked_neg",
+ "links": {},
+ "name": "checked_ilog10",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -119011,23 +117684,20 @@
"11469": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict negation. Computes `-self`, panicking if `self == MIN`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(5isize.strict_neg(), -5);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = isize::MIN.strict_neg();\n",
+ "docs": "Checked negation. Computes `-self`, returning `None` unless `self ==\n0`.\n\nNote that negating any positive integer will overflow.\n\n# Examples\n\n```\nassert_eq!(0u64.checked_neg(), Some(0));\nassert_eq!(1u64.checked_neg(), None);\n```",
"id": 11469,
"inner": {
"function": {
@@ -119053,20 +117723,35 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u64"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "strict_neg",
+ "name": "checked_neg",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -119204,20 +117889,23 @@
"11470": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked shift left. Computes `self << rhs`, returning `None` if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x1isize.checked_shl(4), Some(0x10));\nassert_eq!(0x1isize.checked_shl(129), None);\nassert_eq!(0x10isize.checked_shl(63), Some(0));\n```",
+ "docs": "Strict negation. Computes `-self`, panicking unless `self ==\n0`.\n\nNote that negating any positive integer will overflow.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0u64.strict_neg(), 0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 1u64.strict_neg();\n```",
"id": 11470,
"inner": {
"function": {
@@ -119239,45 +117927,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "u32"
- }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "isize"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "checked_shl",
+ "name": "strict_neg",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -119287,23 +117954,20 @@
"11471": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict shift left. Computes `self << rhs`, panicking if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x1isize.strict_shl(4), 0x10);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x1isize.strict_shl(129);\n```",
+ "docs": "Checked shift left. Computes `self << rhs`, returning `None`\nif `rhs` is larger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x1u64.checked_shl(4), Some(0x10));\nassert_eq!(0x10u64.checked_shl(129), None);\nassert_eq!(0x10u64.checked_shl(63), Some(0));\n```",
"id": 11471,
"inner": {
"function": {
@@ -119335,20 +117999,35 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u64"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "strict_shl",
+ "name": "checked_shl",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -119358,7 +118037,10 @@
"11472": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -119371,7 +118053,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked shift left. Computes `self << rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shl`] would return `None`.\n\n[`checked_shl`]: isize::checked_shl",
+ "docs": "Strict shift left. Computes `self << rhs`, panicking if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x1u64.strict_shl(4), 0x10);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10u64.strict_shl(129);\n```",
"id": 11472,
"inner": {
"function": {
@@ -119384,7 +118066,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -119403,22 +118085,20 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
},
- "links": {
- "isize::checked_shl": 11470
- },
- "name": "unchecked_shl",
+ "links": {},
+ "name": "strict_shl",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -119428,20 +118108,20 @@
"11473": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x1isize.unbounded_shl(4), 0x10);\nassert_eq!(0x1isize.unbounded_shl(129), 0);\n```",
+ "docs": "Unchecked shift left. Computes `self << rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shl`] would return `None`.\n\n[`checked_shl`]: u64::checked_shl",
"id": 11473,
"inner": {
"function": {
@@ -119454,7 +118134,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -119473,20 +118153,22 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
},
- "links": {},
- "name": "unbounded_shl",
+ "links": {
+ "u64::checked_shl": 11471
+ },
+ "name": "unchecked_shl",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -119496,10 +118178,10 @@
"11474": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
},
{
"must_use": {
@@ -119509,7 +118191,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked shift right. Computes `self >> rhs`, returning `None` if `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x10isize.checked_shr(4), Some(0x1));\nassert_eq!(0x10isize.checked_shr(128), None);\n```",
+ "docs": "Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x1u64.unbounded_shl(4), 0x10);\nassert_eq!(0x1u64.unbounded_shl(129), 0);\n```",
"id": 11474,
"inner": {
"function": {
@@ -119541,35 +118223,20 @@
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "isize"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "checked_shr",
+ "name": "unbounded_shl",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -119579,23 +118246,17 @@
"11475": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict shift right. Computes `self >> rhs`, panicking `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x10isize.strict_shr(4), 0x1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10isize.strict_shr(128);\n```",
+ "docs": "Exact shift left. Computes `self << rhs` as long as it can be reversed losslessly.\n\nReturns `None` if any non-zero bits would be shifted out or if `rhs` >=\n`u64::BITS`.\nOtherwise, returns `Some(self << rhs)`.\n\n# Examples\n\n```\n#![feature(exact_bitshifts)]\n\nassert_eq!(0x1u64.exact_shl(4), Some(0x10));\nassert_eq!(0x1u64.exact_shl(129), None);\n```",
"id": 11475,
"inner": {
"function": {
@@ -119627,20 +118288,35 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u64"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "strict_shr",
+ "name": "exact_shl",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -119650,20 +118326,17 @@
"11476": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked shift right. Computes `self >> rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shr`] would return `None`.\n\n[`checked_shr`]: isize::checked_shr",
+ "docs": "Unchecked exact shift left. Computes `self << rhs`, assuming the operation can be\nlosslessly reversed `rhs` cannot be larger than\n`u64::BITS`.\n\n# Safety\n\nThis results in undefined behavior when `rhs > self.leading_zeros() || rhs >=\nu64::BITS`\ni.e. when\n[`u64::exact_shl`]\nwould return `None`.",
"id": 11476,
"inner": {
"function": {
@@ -119695,22 +118368,22 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
},
"links": {
- "isize::checked_shr": 11474
+ "`u64::exact_shl`": 11475
},
- "name": "unchecked_shr",
+ "name": "unchecked_exact_shl",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -119720,10 +118393,10 @@
"11477": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -119733,7 +118406,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, which yields `0` for a positive number,\nand `-1` for a negative number.\n\n# Examples\n\n```\nassert_eq!(0x10isize.unbounded_shr(4), 0x1);\nassert_eq!(0x10isize.unbounded_shr(129), 0);\nassert_eq!(isize::MIN.unbounded_shr(129), -1);\n```",
+ "docs": "Checked shift right. Computes `self >> rhs`, returning `None`\nif `rhs` is larger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x10u64.checked_shr(4), Some(0x1));\nassert_eq!(0x10u64.checked_shr(129), None);\n```",
"id": 11477,
"inner": {
"function": {
@@ -119765,20 +118438,35 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u64"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "unbounded_shr",
+ "name": "checked_shr",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -119788,20 +118476,23 @@
"11478": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked absolute value. Computes `self.abs()`, returning `None` if\n`self == MIN`.\n\n# Examples\n\n```\nassert_eq!((-5isize).checked_abs(), Some(5));\nassert_eq!(isize::MIN.checked_abs(), None);\n```",
+ "docs": "Strict shift right. Computes `self >> rhs`, panicking `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x10u64.strict_shr(4), 0x1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10u64.strict_shr(129);\n```",
"id": 11478,
"inner": {
"function": {
@@ -119823,39 +118514,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "isize"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "checked_abs",
+ "name": "strict_shr",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -119865,10 +118547,7 @@
"11479": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
},
{
"must_use": {
@@ -119881,7 +118560,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict absolute value. Computes `self.abs()`, panicking if\n`self == MIN`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((-5isize).strict_abs(), 5);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = isize::MIN.strict_abs();\n```",
+ "docs": "Unchecked shift right. Computes `self >> rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shr`] would return `None`.\n\n[`checked_shr`]: u64::checked_shr",
"id": 11479,
"inner": {
"function": {
@@ -119894,7 +118573,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -119903,24 +118582,32 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
},
- "links": {},
- "name": "strict_abs",
+ "links": {
+ "u64::checked_shr": 11477
+ },
+ "name": "unchecked_shr",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -120003,7 +118690,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -120024,7 +118711,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -120037,10 +118724,10 @@
"11480": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
},
{
"must_use": {
@@ -120050,7 +118737,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked exponentiation. Computes `self.pow(exp)`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(8isize.checked_pow(2), Some(64));\nassert_eq!(isize::MAX.checked_pow(2), None);\n```",
+ "docs": "Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x10u64.unbounded_shr(4), 0x1);\nassert_eq!(0x10u64.unbounded_shr(129), 0);\n```",
"id": 11480,
"inner": {
"function": {
@@ -120074,7 +118761,7 @@
}
],
[
- "exp",
+ "rhs",
{
"primitive": "u32"
}
@@ -120082,35 +118769,20 @@
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "isize"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "checked_pow",
+ "name": "unbounded_shr",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -120120,23 +118792,17 @@
"11481": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict exponentiation. Computes `self.pow(exp)`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(8isize.strict_pow(2), 64);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = isize::MAX.strict_pow(2);\n```",
+ "docs": "Exact shift right. Computes `self >> rhs` as long as it can be reversed losslessly.\n\nReturns `None` if any non-zero bits would be shifted out or if `rhs` >=\n`u64::BITS`.\nOtherwise, returns `Some(self >> rhs)`.\n\n# Examples\n\n```\n#![feature(exact_bitshifts)]\n\nassert_eq!(0x10u64.exact_shr(4), Some(0x1));\nassert_eq!(0x10u64.exact_shr(5), None);\n```",
"id": 11481,
"inner": {
"function": {
@@ -120160,7 +118826,7 @@
}
],
[
- "exp",
+ "rhs",
{
"primitive": "u32"
}
@@ -120168,20 +118834,35 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u64"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "strict_pow",
+ "name": "exact_shr",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -120191,10 +118872,7 @@
"11482": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
@@ -120204,7 +118882,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the square root of the number, rounded down.\n\nReturns `None` if `self` is negative.\n\n# Examples\n\n```\nassert_eq!(10isize.checked_isqrt(), Some(3));\n```",
+ "docs": "Unchecked exact shift right. Computes `self >> rhs`, assuming the operation can be\nlosslessly reversed and `rhs` cannot be larger than\n`u64::BITS`.\n\n# Safety\n\nThis results in undefined behavior when `rhs > self.trailing_zeros() || rhs >=\nu64::BITS`\ni.e. when\n[`u64::exact_shr`]\nwould return `None`.",
"id": 11482,
"inner": {
"function": {
@@ -120217,7 +118895,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -120226,39 +118904,32 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "isize"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u64"
}
}
}
},
- "links": {},
- "name": "checked_isqrt",
+ "links": {
+ "`u64::exact_shr`": 11481
+ },
+ "name": "unchecked_exact_shr",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -120268,10 +118939,10 @@
"11483": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
@@ -120281,7 +118952,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer addition. Computes `self + rhs`, saturating at the numeric\nbounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100isize.saturating_add(1), 101);\nassert_eq!(isize::MAX.saturating_add(100), isize::MAX);\nassert_eq!(isize::MIN.saturating_add(-1), isize::MIN);\n```",
+ "docs": "Checked exponentiation. Computes `self.pow(exp)`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(2u64.checked_pow(5), Some(32));\nassert_eq!(u64::MAX.checked_pow(2), None);\n```",
"id": 11483,
"inner": {
"function": {
@@ -120305,28 +118976,43 @@
}
],
[
- "rhs",
+ "exp",
{
- "primitive": "isize"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u64"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "saturating_add",
+ "name": "checked_pow",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -120336,20 +119022,23 @@
"11484": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating addition with an unsigned integer. Computes `self + rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1isize.saturating_add_unsigned(2), 3);\nassert_eq!(isize::MAX.saturating_add_unsigned(100), isize::MAX);\n```",
+ "docs": "Strict exponentiation. Computes `self.pow(exp)`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(2u64.strict_pow(5), 32);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = u64::MAX.strict_pow(2);\n```",
"id": 11484,
"inner": {
"function": {
@@ -120373,28 +119062,28 @@
}
],
[
- "rhs",
+ "exp",
{
- "primitive": "usize"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "saturating_add_unsigned",
+ "name": "strict_pow",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -120417,7 +119106,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer subtraction. Computes `self - rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100isize.saturating_sub(127), -27);\nassert_eq!(isize::MIN.saturating_sub(100), isize::MIN);\nassert_eq!(isize::MAX.saturating_sub(-1), isize::MAX);\n```",
+ "docs": "Saturating integer addition. Computes `self + rhs`, saturating at\nthe numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100u64.saturating_add(1), 101);\nassert_eq!(u64::MAX.saturating_add(127), u64::MAX);\n```",
"id": 11485,
"inner": {
"function": {
@@ -120443,26 +119132,26 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "saturating_sub",
+ "name": "saturating_add",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -120485,7 +119174,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating subtraction with an unsigned integer. Computes `self - rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100isize.saturating_sub_unsigned(127), -27);\nassert_eq!(isize::MIN.saturating_sub_unsigned(100), isize::MIN);\n```",
+ "docs": "Saturating addition with a signed integer. Computes `self + rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1u64.saturating_add_signed(2), 3);\nassert_eq!(1u64.saturating_add_signed(-2), 0);\nassert_eq!((u64::MAX - 2).saturating_add_signed(4), u64::MAX);\n```",
"id": 11486,
"inner": {
"function": {
@@ -120511,26 +119200,26 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "saturating_sub_unsigned",
+ "name": "saturating_add_signed",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -120543,7 +119232,7 @@
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 45, patch: 0})}, feature: \"saturating_neg\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -120553,7 +119242,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer negation. Computes `-self`, returning `MAX` if `self == MIN`\ninstead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100isize.saturating_neg(), -100);\nassert_eq!((-100isize).saturating_neg(), 100);\nassert_eq!(isize::MIN.saturating_neg(), isize::MAX);\nassert_eq!(isize::MAX.saturating_neg(), isize::MIN + 1);\n```",
+ "docs": "Saturating integer subtraction. Computes `self - rhs`, saturating\nat the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100u64.saturating_sub(27), 73);\nassert_eq!(13u64.saturating_sub(127), 0);\n```",
"id": 11487,
"inner": {
"function": {
@@ -120575,99 +119264,43 @@
{
"generic": "Self"
}
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "isize"
- }
- }
- }
- },
- "links": {},
- "name": "saturating_neg",
- "span": {
- "begin": [
- 420,
- 5
- ],
- "end": [
- 439,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "11488": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 45, patch: 0})}, feature: \"saturating_neg\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Saturating absolute value. Computes `self.abs()`, returning `MAX` if `self ==\nMIN` instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100isize.saturating_abs(), 100);\nassert_eq!((-100isize).saturating_abs(), 100);\nassert_eq!(isize::MIN.saturating_abs(), isize::MAX);\nassert_eq!((isize::MIN + 1).saturating_abs(), isize::MAX);\n```",
- "id": 11488,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
+ ],
[
- "self",
+ "rhs",
{
- "generic": "Self"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "saturating_abs",
+ "name": "saturating_sub",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11489": {
+ "11488": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
},
{
"must_use": {
@@ -120677,8 +119310,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer multiplication. Computes `self * rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(10isize.saturating_mul(12), 120);\nassert_eq!(isize::MAX.saturating_mul(10), isize::MAX);\nassert_eq!(isize::MIN.saturating_mul(10), isize::MIN);\n```",
- "id": 11489,
+ "docs": "Saturating integer subtraction. Computes `self` - `rhs`, saturating at\nthe numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1u64.saturating_sub_signed(2), 0);\nassert_eq!(1u64.saturating_sub_signed(-2), 3);\nassert_eq!((u64::MAX - 2).saturating_sub_signed(-4), u64::MAX);\n```",
+ "id": 11488,
"inner": {
"function": {
"generics": {
@@ -120703,13 +119336,81 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "saturating_sub_signed",
+ "span": {
+ "begin": [
+ 1160,
+ 5
+ ],
+ "end": [
+ 1181,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11489": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Saturating integer multiplication. Computes `self * rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(2u64.saturating_mul(10), 20);\nassert_eq!((u64::MAX).saturating_mul(10), u64::MAX);\n```",
+ "id": 11489,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u64"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u64"
}
}
}
@@ -120718,11 +119419,11 @@
"name": "saturating_mul",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -120848,11 +119549,14 @@
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer division. Computes `self / rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5isize.saturating_div(2), 2);\nassert_eq!(isize::MAX.saturating_div(-1), isize::MIN + 1);\nassert_eq!(isize::MIN.saturating_div(-1), isize::MAX);\n\n```",
+ "docs": "Saturating integer division. Computes `self / rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u64.saturating_div(2), 2);\n\n```",
"id": 11490,
"inner": {
"function": {
@@ -120878,13 +119582,13 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
@@ -120893,11 +119597,11 @@
"name": "saturating_div",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -120920,7 +119624,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer exponentiation. Computes `self.pow(exp)`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!((-4isize).saturating_pow(3), -64);\nassert_eq!(isize::MIN.saturating_pow(2), isize::MAX);\nassert_eq!(isize::MIN.saturating_pow(3), isize::MIN);\n```",
+ "docs": "Saturating integer exponentiation. Computes `self.pow(exp)`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(4u64.saturating_pow(3), 64);\nassert_eq!(u64::MAX.saturating_pow(2), u64::MAX);\n```",
"id": 11491,
"inner": {
"function": {
@@ -120952,7 +119656,7 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
@@ -120961,11 +119665,11 @@
"name": "saturating_pow",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -120988,7 +119692,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) addition with an unsigned integer. Computes\n`self + rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(100isize.wrapping_add_unsigned(27), 127);\nassert_eq!(isize::MAX.wrapping_add_unsigned(2), isize::MIN + 1);\n```",
+ "docs": "Wrapping (modular) addition with a signed integer. Computes\n`self + rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(1u64.wrapping_add_signed(2), 3);\nassert_eq!(1u64.wrapping_add_signed(-2), u64::MAX);\nassert_eq!((u64::MAX - 2).wrapping_add_signed(4), 1);\n```",
"id": 11492,
"inner": {
"function": {
@@ -121014,26 +119718,26 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "wrapping_add_unsigned",
+ "name": "wrapping_add_signed",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -121043,10 +119747,10 @@
"11493": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
},
{
"must_use": {
@@ -121056,7 +119760,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) subtraction with an unsigned integer. Computes\n`self - rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(0isize.wrapping_sub_unsigned(127), -127);\nassert_eq!((-2isize).wrapping_sub_unsigned(usize::MAX), -1);\n```",
+ "docs": "Wrapping (modular) subtraction with a signed integer. Computes\n`self - rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(1u64.wrapping_sub_signed(2), u64::MAX);\nassert_eq!(1u64.wrapping_sub_signed(-2), 3);\nassert_eq!((u64::MAX - 2).wrapping_sub_signed(-4), 1);\n```",
"id": 11493,
"inner": {
"function": {
@@ -121082,26 +119786,26 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "wrapping_sub_unsigned",
+ "name": "wrapping_sub_signed",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -121120,11 +119824,14 @@
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) division. Computes `self / rhs`, wrapping around at the\nboundary of the type.\n\nThe only case where such wrapping can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type. In such a case, this function returns `MIN` itself.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100isize.wrapping_div(10), 10);\nassert_eq!((-128i8).wrapping_div(-1), -128);\n```",
+ "docs": "Wrapping (modular) division. Computes `self / rhs`.\n\nWrapped division on unsigned types is just normal division. There's\nno way wrapping could ever happen. This function exists so that all\noperations are accounted for in the wrapping operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u64.wrapping_div(10), 10);\n```",
"id": 11494,
"inner": {
"function": {
@@ -121150,13 +119857,13 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
@@ -121165,11 +119872,11 @@
"name": "wrapping_div",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -121188,11 +119895,14 @@
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping Euclidean division. Computes `self.div_euclid(rhs)`,\nwrapping around at the boundary of the type.\n\nWrapping will only occur in `MIN / -1` on a signed type (where `MIN` is the negative minimal value\nfor the type). This is equivalent to `-MIN`, a positive value that is too large to represent in the\ntype. In this case, this method returns `MIN` itself.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100isize.wrapping_div_euclid(10), 10);\nassert_eq!((-128i8).wrapping_div_euclid(-1), -128);\n```",
+ "docs": "Wrapping Euclidean division. Computes `self.div_euclid(rhs)`.\n\nWrapped division on unsigned types is just normal division. There's\nno way wrapping could ever happen. This function exists so that all\noperations are accounted for in the wrapping operations. Since, for\nthe positive integers, all common definitions of division are equal,\nthis is exactly equal to `self.wrapping_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u64.wrapping_div_euclid(10), 10);\n```",
"id": 11495,
"inner": {
"function": {
@@ -121218,13 +119928,13 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
@@ -121233,11 +119943,11 @@
"name": "wrapping_div_euclid",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -121256,11 +119966,14 @@
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) remainder. Computes `self % rhs`, wrapping around at the\nboundary of the type.\n\nSuch wrap-around never actually occurs mathematically; implementation artifacts make `x % y`\ninvalid for `MIN / -1` on a signed type (where `MIN` is the negative minimal value). In such a case,\nthis function returns `0`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100isize.wrapping_rem(10), 0);\nassert_eq!((-128i8).wrapping_rem(-1), 0);\n```",
+ "docs": "Wrapping (modular) remainder. Computes `self % rhs`.\n\nWrapped remainder calculation on unsigned types is just the regular\nremainder calculation. There's no way wrapping could ever happen.\nThis function exists so that all operations are accounted for in the\nwrapping operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u64.wrapping_rem(10), 0);\n```",
"id": 11496,
"inner": {
"function": {
@@ -121286,13 +119999,13 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
@@ -121301,11 +120014,11 @@
"name": "wrapping_rem",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -121324,11 +120037,14 @@
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping Euclidean remainder. Computes `self.rem_euclid(rhs)`, wrapping around\nat the boundary of the type.\n\nWrapping will only occur in `MIN % -1` on a signed type (where `MIN` is the negative minimal value\nfor the type). In this case, this method returns 0.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100isize.wrapping_rem_euclid(10), 0);\nassert_eq!((-128i8).wrapping_rem_euclid(-1), 0);\n```",
+ "docs": "Wrapping Euclidean modulo. Computes `self.rem_euclid(rhs)`.\n\nWrapped modulo calculation on unsigned types is just the regular\nremainder calculation. There's no way wrapping could ever happen.\nThis function exists so that all operations are accounted for in the\nwrapping operations. Since, for the positive integers, all common\ndefinitions of division are equal, this is exactly equal to\n`self.wrapping_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u64.wrapping_rem_euclid(10), 0);\n```",
"id": 11497,
"inner": {
"function": {
@@ -121354,13 +120070,13 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
@@ -121369,11 +120085,11 @@
"name": "wrapping_rem_euclid",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -121383,7 +120099,7 @@
"11498": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
@@ -121396,7 +120112,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) negation. Computes `-self`, wrapping around at the boundary\nof the type.\n\nThe only case where such wrapping can occur is when one negates `MIN` on a signed type (where `MIN`\nis the negative minimal value for the type); this is a positive value that is too large to represent\nin the type. In such a case, this function returns `MIN` itself.\n\n# Examples\n\n```\nassert_eq!(100isize.wrapping_neg(), -100);\nassert_eq!((-100isize).wrapping_neg(), 100);\nassert_eq!(isize::MIN.wrapping_neg(), isize::MIN);\n```",
+ "docs": "Wrapping (modular) negation. Computes `-self`,\nwrapping around at the boundary of the type.\n\nSince unsigned types do not have negative equivalents\nall applications of this function will wrap (except for `-0`).\nFor values smaller than the corresponding signed type's maximum\nthe result is the same as casting the corresponding signed value.\nAny larger values are equivalent to `MAX + 1 - (val - MAX - 1)` where\n`MAX` is the corresponding signed type's maximum.\n\n# Examples\n\n```\nassert_eq!(0_u64.wrapping_neg(), 0);\nassert_eq!(u64::MAX.wrapping_neg(), 1);\nassert_eq!(13_u64.wrapping_neg(), (!13) + 1);\nassert_eq!(42_u64.wrapping_neg(), !(42 - 1));\n```",
"id": 11498,
"inner": {
"function": {
@@ -121422,7 +120138,7 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
@@ -121431,11 +120147,11 @@
"name": "wrapping_neg",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -121445,7 +120161,7 @@
"11499": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
@@ -121458,7 +120174,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Panic-free bitwise shift-left; yields `self << mask(rhs)`, where `mask` removes\nany high-order bits of `rhs` that would cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-left; the RHS of a wrapping shift-left is restricted to\nthe range of the type, rather than the bits shifted out of the LHS being returned to the other end.\nThe primitive integer types all implement a [`rotate_left`](Self::rotate_left) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!((-1isize).wrapping_shl(7), -128);\nassert_eq!((-1isize).wrapping_shl(128), -1);\n```",
+ "docs": "Panic-free bitwise shift-left; yields `self << mask(rhs)`,\nwhere `mask` removes any high-order bits of `rhs` that\nwould cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-left; the\nRHS of a wrapping shift-left is restricted to the range\nof the type, rather than the bits shifted out of the LHS\nbeing returned to the other end. The primitive integer\ntypes all implement a [`rotate_left`](Self::rotate_left) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!(1u64.wrapping_shl(7), 128);\nassert_eq!(1u64.wrapping_shl(128), 1);\n```",
"id": 11499,
"inner": {
"function": {
@@ -121490,22 +120206,22 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
},
"links": {
- "Self::rotate_left": 11432
+ "Self::rotate_left": 11425
},
"name": "wrapping_shl",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -121587,7 +120303,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -121600,7 +120316,7 @@
"11500": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
@@ -121613,7 +120329,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Panic-free bitwise shift-right; yields `self >> mask(rhs)`, where `mask`\nremoves any high-order bits of `rhs` that would cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-right; the RHS of a wrapping shift-right is restricted\nto the range of the type, rather than the bits shifted out of the LHS being returned to the other\nend. The primitive integer types all implement a [`rotate_right`](Self::rotate_right) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!((-128isize).wrapping_shr(7), -1);\nassert_eq!((-128i16).wrapping_shr(64), -128);\n```",
+ "docs": "Panic-free bitwise shift-right; yields `self >> mask(rhs)`,\nwhere `mask` removes any high-order bits of `rhs` that\nwould cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-right; the\nRHS of a wrapping shift-right is restricted to the range\nof the type, rather than the bits shifted out of the LHS\nbeing returned to the other end. The primitive integer\ntypes all implement a [`rotate_right`](Self::rotate_right) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!(128u64.wrapping_shr(7), 1);\nassert_eq!(128u64.wrapping_shr(128), 128);\n```",
"id": 11500,
"inner": {
"function": {
@@ -121645,22 +120361,22 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
},
"links": {
- "Self::rotate_right": 11433
+ "Self::rotate_right": 11426
},
"name": "wrapping_shr",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -121670,10 +120386,10 @@
"11501": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
@@ -121683,7 +120399,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) absolute value. Computes `self.abs()`, wrapping around at\nthe boundary of the type.\n\nThe only case where such wrapping can occur is when one takes the absolute value of the negative\nminimal value for the type; this is a positive value that is too large to represent in the type. In\nsuch a case, this function returns `MIN` itself.\n\n# Examples\n\n```\nassert_eq!(100isize.wrapping_abs(), 100);\nassert_eq!((-100isize).wrapping_abs(), 100);\nassert_eq!(isize::MIN.wrapping_abs(), isize::MIN);\nassert_eq!((-128i8).wrapping_abs() as u8, 128);\n```",
+ "docs": "Wrapping (modular) exponentiation. Computes `self.pow(exp)`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(3u64.wrapping_pow(5), 243);\nassert_eq!(3u8.wrapping_pow(6), 217);\n```",
"id": 11501,
"inner": {
"function": {
@@ -121705,24 +120421,30 @@
{
"generic": "Self"
}
+ ],
+ [
+ "exp",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "wrapping_abs",
+ "name": "wrapping_pow",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -121732,10 +120454,10 @@
"11502": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 51, patch: 0})}, feature: \"unsigned_abs\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 51, patch: 0})}, feature: \"unsigned_abs\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -121745,7 +120467,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Computes the absolute value of `self` without any wrapping\nor panicking.\n\n\n# Examples\n\n```\nassert_eq!(100isize.unsigned_abs(), 100usize);\nassert_eq!((-100isize).unsigned_abs(), 100usize);\nassert_eq!((-128i8).unsigned_abs(), 128u8);\n```",
+ "docs": "Calculates `self` + `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5u64.overflowing_add(2), (7, false));\nassert_eq!(u64::MAX.overflowing_add(1), (0, true));\n```",
"id": 11502,
"inner": {
"function": {
@@ -121767,24 +120489,37 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u64"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "tuple": [
+ {
+ "primitive": "u64"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "unsigned_abs",
+ "name": "overflowing_add",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -121794,10 +120529,10 @@
"11503": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -121807,7 +120542,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) exponentiation. Computes `self.pow(exp)`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(3isize.wrapping_pow(4), 81);\nassert_eq!(3i8.wrapping_pow(5), -13);\nassert_eq!(3i8.wrapping_pow(6), -39);\n```",
+ "docs": "Calculates `self` + `rhs` with a signed `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1u64.overflowing_add_signed(2), (3, false));\nassert_eq!(1u64.overflowing_add_signed(-2), (u64::MAX, true));\nassert_eq!((u64::MAX - 2).overflowing_add_signed(4), (1, true));\n```",
"id": 11503,
"inner": {
"function": {
@@ -121831,28 +120566,35 @@
}
],
[
- "exp",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "i64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "tuple": [
+ {
+ "primitive": "u64"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "wrapping_pow",
+ "name": "overflowing_add_signed",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -121862,7 +120604,7 @@
"11504": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
@@ -121875,7 +120617,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would have\noccurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5isize.overflowing_add(2), (7, false));\nassert_eq!(isize::MAX.overflowing_add(1), (isize::MIN, true));\n```",
+ "docs": "Calculates `self` - `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5u64.overflowing_sub(2), (3, false));\nassert_eq!(0u64.overflowing_sub(1), (u64::MAX, true));\n```",
"id": 11504,
"inner": {
"function": {
@@ -121901,7 +120643,7 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
@@ -121909,7 +120651,7 @@
"output": {
"tuple": [
{
- "primitive": "isize"
+ "primitive": "u64"
},
{
"primitive": "bool"
@@ -121920,14 +120662,14 @@
}
},
"links": {},
- "name": "overflowing_add",
+ "name": "overflowing_sub",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -121937,10 +120679,10 @@
"11505": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
},
{
"must_use": {
@@ -121950,7 +120692,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs` + `carry` and returns a tuple containing\nthe sum and the output carry.\n\nPerforms \"ternary addition\" of two integer operands and a carry-in\nbit, and returns an output integer and a carry-out bit. This allows\nchaining together multiple additions to create a wider addition, and\ncan be useful for bignum addition.\n\nThis can be thought of as a 64-bit \"full adder\", in the electronics sense.\n\nIf the input carry is false, this method is equivalent to\n[`overflowing_add`](Self::overflowing_add), and the output carry is\nequal to the overflow flag. Note that although carry and overflow\nflags are similar for unsigned integers, they are different for\nsigned integers.\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n\n// 3 MAX (a = 3 × 2^64 + 2^64 - 1)\n// + 5 7 (b = 5 × 2^64 + 7)\n// ---------\n// 9 6 (sum = 9 × 2^64 + 6)\n\nlet (a1, a0): (usize, usize) = (3, usize::MAX);\nlet (b1, b0): (usize, usize) = (5, 7);\nlet carry0 = false;\n\nlet (sum0, carry1) = a0.carrying_add(b0, carry0);\nassert_eq!(carry1, true);\nlet (sum1, carry2) = a1.carrying_add(b1, carry1);\nassert_eq!(carry2, false);\n\nassert_eq!((sum1, sum0), (9, 6));\n```",
+ "docs": "Calculates `self` - `rhs` with a signed `rhs`\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1u64.overflowing_sub_signed(2), (u64::MAX, true));\nassert_eq!(1u64.overflowing_sub_signed(-2), (3, false));\nassert_eq!((u64::MAX - 2).overflowing_sub_signed(-4), (1, true));\n```",
"id": 11505,
"inner": {
"function": {
@@ -121976,13 +120718,7 @@
[
"rhs",
{
- "primitive": "usize"
- }
- ],
- [
- "carry",
- {
- "primitive": "bool"
+ "primitive": "i64"
}
]
],
@@ -121990,7 +120726,7 @@
"output": {
"tuple": [
{
- "primitive": "usize"
+ "primitive": "u64"
},
{
"primitive": "bool"
@@ -122000,17 +120736,15 @@
}
}
},
- "links": {
- "Self::overflowing_add": 11646
- },
- "name": "carrying_add",
+ "links": {},
+ "name": "overflowing_sub_signed",
"span": {
"begin": [
- 1248,
+ 1160,
5
],
"end": [
- 1266,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -122020,7 +120754,10 @@
"11506": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\"}}]"
},
{
"must_use": {
@@ -122030,7 +120767,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs` + `carry` and checks for overflow.\n\nPerforms \"ternary addition\" of two integer operands and a carry-in\nbit, and returns a tuple of the sum along with a boolean indicating\nwhether an arithmetic overflow would occur. On overflow, the wrapped\nvalue is returned.\n\nThis allows chaining together multiple additions to create a wider\naddition, and can be useful for bignum addition. This method should\nonly be used for the most significant word; for the less significant\nwords the unsigned method\n[`usize::carrying_add`]\nshould be used.\n\nThe output boolean returned by this method is *not* a carry flag,\nand should *not* be added to a more significant word.\n\nIf the input carry is false, this method is equivalent to\n[`overflowing_add`](Self::overflowing_add).\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n// Only the most significant word is signed.\n//\n// 10 MAX (a = 10 × 2^64 + 2^64 - 1)\n// + -5 9 (b = -5 × 2^64 + 9)\n// ---------\n// 6 8 (sum = 6 × 2^64 + 8)\n\nlet (a1, a0): (isize, usize) = (10, usize::MAX);\nlet (b1, b0): (isize, usize) = (-5, 9);\nlet carry0 = false;\n\n// usize::carrying_add for the less significant words\nlet (sum0, carry1) = a0.carrying_add(b0, carry0);\nassert_eq!(carry1, true);\n\n// isize::carrying_add for the most significant word\nlet (sum1, overflow) = a1.carrying_add(b1, carry1);\nassert_eq!(overflow, false);\n\nassert_eq!((sum1, sum0), (6, 8));\n```",
+ "docs": "Computes the absolute difference between `self` and `other`.\n\n# Examples\n\n```\nassert_eq!(100u64.abs_diff(80), 20u64);\nassert_eq!(100u64.abs_diff(110), 10u64);\n```",
"id": 11506,
"inner": {
"function": {
@@ -122054,44 +120791,28 @@
}
],
[
- "rhs",
- {
- "primitive": "isize"
- }
- ],
- [
- "carry",
+ "other",
{
- "primitive": "bool"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "isize"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u64"
}
}
}
},
- "links": {
- "Self::overflowing_add": 11504,
- "`usize::carrying_add`": 11505
- },
- "name": "carrying_add",
+ "links": {},
+ "name": "abs_diff",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -122101,10 +120822,10 @@
"11507": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_bigint_helpers\"}}]"
},
{
"must_use": {
@@ -122114,7 +120835,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs` with an unsigned `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1isize.overflowing_add_unsigned(2), (3, false));\nassert_eq!((isize::MIN).overflowing_add_unsigned(usize::MAX), (isize::MAX, false));\nassert_eq!((isize::MAX - 2).overflowing_add_unsigned(3), (isize::MIN, true));\n```",
+ "docs": "Calculates the \"full multiplication\" `self * rhs + carry`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you also need to add a value, then use [`Self::carrying_mul_add`].\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u32` is used.\n\n```\nassert_eq!(5u32.carrying_mul(2, 0), (10, 0));\nassert_eq!(5u32.carrying_mul(2, 10), (20, 0));\nassert_eq!(1_000_000_000u32.carrying_mul(10, 0), (1410065408, 2));\nassert_eq!(1_000_000_000u32.carrying_mul(10, 10), (1410065418, 2));\nassert_eq!(u64::MAX.carrying_mul(u64::MAX, u64::MAX), (0, u64::MAX));\n```\n\nThis is the core operation needed for scalar multiplication when\nimplementing it for wider-than-native types.\n\n```\n#![feature(bigint_helper_methods)]\nfn scalar_mul_eq(little_endian_digits: &mut Vec, multiplicand: u16) {\n let mut carry = 0;\n for d in little_endian_digits.iter_mut() {\n (*d, carry) = d.carrying_mul(multiplicand, carry);\n }\n if carry != 0 {\n little_endian_digits.push(carry);\n }\n}\n\nlet mut v = vec![10, 20];\nscalar_mul_eq(&mut v, 3);\nassert_eq!(v, [30, 60]);\n\nassert_eq!(0x87654321_u64 * 0xFEED, 0x86D3D159E38D);\nlet mut v = vec![0x4321, 0x8765];\nscalar_mul_eq(&mut v, 0xFEED);\nassert_eq!(v, [0xE38D, 0xD159, 0x86D3]);\n```\n\nIf `carry` is zero, this is similar to [`overflowing_mul`](Self::overflowing_mul),\nexcept that it gives the value of the overflow instead of just whether one happened:\n\n```\n#![feature(bigint_helper_methods)]\nlet r = u8::carrying_mul(7, 13, 0);\nassert_eq!((r.0, r.1 != 0), u8::overflowing_mul(7, 13));\nlet r = u8::carrying_mul(13, 42, 0);\nassert_eq!((r.0, r.1 != 0), u8::overflowing_mul(13, 42));\n```\n\nThe value of the first field in the returned tuple matches what you'd get\nby combining the [`wrapping_mul`](Self::wrapping_mul) and\n[`wrapping_add`](Self::wrapping_add) methods:\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(\n 789_u16.carrying_mul(456, 123).0,\n 789_u16.wrapping_mul(456).wrapping_add(123),\n);\n```",
"id": 11507,
"inner": {
"function": {
@@ -122140,7 +120861,13 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u64"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "u64"
}
]
],
@@ -122148,25 +120875,30 @@
"output": {
"tuple": [
{
- "primitive": "isize"
+ "primitive": "u64"
},
{
- "primitive": "bool"
+ "primitive": "u64"
}
]
}
}
}
},
- "links": {},
- "name": "overflowing_add_unsigned",
+ "links": {
+ "Self::overflowing_mul": 11508,
+ "Self::wrapping_add": 11437,
+ "Self::wrapping_mul": 11450,
+ "`Self::carrying_mul_add`": 11509
+ },
+ "name": "carrying_mul",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -122176,7 +120908,7 @@
"11508": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
@@ -122189,7 +120921,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` - `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating whether an arithmetic overflow\nwould occur. If an overflow would have occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5isize.overflowing_sub(2), (3, false));\nassert_eq!(isize::MIN.overflowing_sub(1), (isize::MAX, true));\n```",
+ "docs": "Calculates the multiplication of `self` and `rhs`.\n\nReturns a tuple of the multiplication along with a boolean\nindicating whether an arithmetic overflow would occur. If an\noverflow would have occurred then the wrapped value is returned.\n\nIf you want the *value* of the overflow, rather than just *whether*\nan overflow occurred, see [`Self::carrying_mul`].\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u32` is used.\n\n```\nassert_eq!(5u32.overflowing_mul(2), (10, false));\nassert_eq!(1_000_000_000u32.overflowing_mul(10), (1410065408, true));\n```",
"id": 11508,
"inner": {
"function": {
@@ -122215,7 +120947,7 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
@@ -122223,7 +120955,7 @@
"output": {
"tuple": [
{
- "primitive": "isize"
+ "primitive": "u64"
},
{
"primitive": "bool"
@@ -122233,15 +120965,17 @@
}
}
},
- "links": {},
- "name": "overflowing_sub",
+ "links": {
+ "`Self::carrying_mul`": 11507
+ },
+ "name": "overflowing_mul",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -122254,7 +120988,7 @@
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_bigint_helpers\"}}]"
},
{
"must_use": {
@@ -122264,7 +120998,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` − `rhs` − `borrow` and returns a tuple\ncontaining the difference and the output borrow.\n\nPerforms \"ternary subtraction\" by subtracting both an integer\noperand and a borrow-in bit from `self`, and returns an output\ninteger and a borrow-out bit. This allows chaining together multiple\nsubtractions to create a wider subtraction, and can be useful for\nbignum subtraction.\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n\n// 9 6 (a = 9 × 2^64 + 6)\n// - 5 7 (b = 5 × 2^64 + 7)\n// ---------\n// 3 MAX (diff = 3 × 2^64 + 2^64 - 1)\n\nlet (a1, a0): (usize, usize) = (9, 6);\nlet (b1, b0): (usize, usize) = (5, 7);\nlet borrow0 = false;\n\nlet (diff0, borrow1) = a0.borrowing_sub(b0, borrow0);\nassert_eq!(borrow1, true);\nlet (diff1, borrow2) = a1.borrowing_sub(b1, borrow1);\nassert_eq!(borrow2, false);\n\nassert_eq!((diff1, diff0), (3, usize::MAX));\n```",
+ "docs": "Calculates the \"full multiplication\" `self * rhs + carry1 + carry2`.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nThis cannot overflow, as the double-width result has exactly enough\nspace for the largest possible result. This is equivalent to how, in\ndecimal, 9 × 9 + 9 + 9 = 81 + 18 = 99 = 9×10⁰ + 9×10¹ = 10² - 1.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need the `add` part, then you can use [`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared between integer types,\nwhich explains why `u32` is used here.\n\n```\nassert_eq!(5u32.carrying_mul_add(2, 0, 0), (10, 0));\nassert_eq!(5u32.carrying_mul_add(2, 10, 10), (30, 0));\nassert_eq!(1_000_000_000u32.carrying_mul_add(10, 0, 0), (1410065408, 2));\nassert_eq!(1_000_000_000u32.carrying_mul_add(10, 10, 10), (1410065428, 2));\nassert_eq!(u64::MAX.carrying_mul_add(u64::MAX, u64::MAX, u64::MAX), (u64::MAX, u64::MAX));\n```\n\nThis is the core per-digit operation for \"grade school\" O(n²) multiplication.\n\nPlease note that this example is shared between integer types,\nusing `u8` for simplicity of the demonstration.\n\n```\nfn quadratic_mul(a: [u8; N], b: [u8; N]) -> [u8; N] {\n let mut out = [0; N];\n for j in 0..N {\n let mut carry = 0;\n for i in 0..(N - j) {\n (out[j + i], carry) = u8::carrying_mul_add(a[i], b[j], out[j + i], carry);\n }\n }\n out\n}\n\n// -1 * -1 == 1\nassert_eq!(quadratic_mul([0xFF; 3], [0xFF; 3]), [1, 0, 0]);\n\nassert_eq!(u32::wrapping_mul(0x9e3779b9, 0x7f4a7c15), 0xcffc982d);\nassert_eq!(\n quadratic_mul(u32::to_le_bytes(0x9e3779b9), u32::to_le_bytes(0x7f4a7c15)),\n u32::to_le_bytes(0xcffc982d)\n);\n```",
"id": 11509,
"inner": {
"function": {
@@ -122290,13 +121024,19 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u64"
}
],
[
- "borrow",
+ "carry",
{
- "primitive": "bool"
+ "primitive": "u64"
+ }
+ ],
+ [
+ "add",
+ {
+ "primitive": "u64"
}
]
],
@@ -122304,25 +121044,27 @@
"output": {
"tuple": [
{
- "primitive": "usize"
+ "primitive": "u64"
},
{
- "primitive": "bool"
+ "primitive": "u64"
}
]
}
}
}
},
- "links": {},
- "name": "borrowing_sub",
+ "links": {
+ "`Self::carrying_mul`": 11507
+ },
+ "name": "carrying_mul_add",
"span": {
"begin": [
- 1248,
+ 1160,
5
],
"end": [
- 1266,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -122405,7 +121147,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -122426,7 +121168,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -122447,7 +121189,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -122459,6 +121201,9 @@
},
"11510": {
"attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ },
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
},
@@ -122470,7 +121215,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` − `rhs` − `borrow` and checks for\noverflow.\n\nPerforms \"ternary subtraction\" by subtracting both an integer\noperand and a borrow-in bit from `self`, and returns a tuple of the\ndifference along with a boolean indicating whether an arithmetic\noverflow would occur. On overflow, the wrapped value is returned.\n\nThis allows chaining together multiple subtractions to create a\nwider subtraction, and can be useful for bignum subtraction. This\nmethod should only be used for the most significant word; for the\nless significant words the unsigned method\n[`usize::borrowing_sub`]\nshould be used.\n\nThe output boolean returned by this method is *not* a borrow flag,\nand should *not* be subtracted from a more significant word.\n\nIf the input borrow is false, this method is equivalent to\n[`overflowing_sub`](Self::overflowing_sub).\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n// Only the most significant word is signed.\n//\n// 6 8 (a = 6 × 2^64 + 8)\n// - -5 9 (b = -5 × 2^64 + 9)\n// ---------\n// 10 MAX (diff = 10 × 2^64 + 2^64 - 1)\n\nlet (a1, a0): (isize, usize) = (6, 8);\nlet (b1, b0): (isize, usize) = (-5, 9);\nlet borrow0 = false;\n\n// usize::borrowing_sub for the less significant words\nlet (diff0, borrow1) = a0.borrowing_sub(b0, borrow0);\nassert_eq!(borrow1, true);\n\n// isize::borrowing_sub for the most significant word\nlet (diff1, overflow) = a1.borrowing_sub(b1, borrow1);\nassert_eq!(overflow, false);\n\nassert_eq!((diff1, diff0), (10, usize::MAX));\n```",
+ "docs": "Calculates the complete double-width product `self * rhs`.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order. As such,\n`a.widening_mul(b).0` produces the same result as `a.wrapping_mul(b)`.\n\nIf you also need to add a value and carry to the wide result, then you want\n[`Self::carrying_mul_add`] instead.\n\nIf you also need to add a carry to the wide result, then you want\n[`Self::carrying_mul`] instead.\n\nIf you just want to know *whether* the multiplication overflowed, then you\nwant [`Self::overflowing_mul`] instead.\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5_u64.widening_mul(7), (35, 0));\nassert_eq!(u64::MAX.widening_mul(u64::MAX), (1, u64::MAX - 1));\n```\n\nCompared to other `*_mul` methods:\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(u64::widening_mul(1 << 63, 6), (0, 3));\nassert_eq!(u64::overflowing_mul(1 << 63, 6), (0, true));\nassert_eq!(u64::wrapping_mul(1 << 63, 6), 0);\nassert_eq!(u64::checked_mul(1 << 63, 6), None);\n```\n\nPlease note that this example is shared among integer types, which is why `u32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5u32.widening_mul(2), (10, 0));\nassert_eq!(1_000_000_000u32.widening_mul(10), (1410065408, 2));\n```",
"id": 11510,
"inner": {
"function": {
@@ -122496,13 +121241,7 @@
[
"rhs",
{
- "primitive": "isize"
- }
- ],
- [
- "borrow",
- {
- "primitive": "bool"
+ "primitive": "u64"
}
]
],
@@ -122510,10 +121249,10 @@
"output": {
"tuple": [
{
- "primitive": "isize"
+ "primitive": "u64"
},
{
- "primitive": "bool"
+ "primitive": "u64"
}
]
}
@@ -122521,17 +121260,18 @@
}
},
"links": {
- "Self::overflowing_sub": 11508,
- "`usize::borrowing_sub`": 11509
+ "`Self::carrying_mul_add`": 11509,
+ "`Self::carrying_mul`": 11507,
+ "`Self::overflowing_mul`": 11508
},
- "name": "borrowing_sub",
+ "name": "widening_mul",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -122541,20 +121281,23 @@
"11511": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` - `rhs` with an unsigned `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1isize.overflowing_sub_unsigned(2), (-1, false));\nassert_eq!((isize::MAX).overflowing_sub_unsigned(usize::MAX), (isize::MIN, false));\nassert_eq!((isize::MIN + 2).overflowing_sub_unsigned(3), (isize::MAX, true));\n```",
+ "docs": "Calculates the divisor when `self` is divided by `rhs`.\n\nReturns a tuple of the divisor along with a boolean indicating\nwhether an arithmetic overflow would occur. Note that for unsigned\nintegers overflow never occurs, so the second value is always\n`false`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u64.overflowing_div(2), (2, false));\n```",
"id": 11511,
"inner": {
"function": {
@@ -122580,7 +121323,7 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u64"
}
]
],
@@ -122588,7 +121331,7 @@
"output": {
"tuple": [
{
- "primitive": "isize"
+ "primitive": "u64"
},
{
"primitive": "bool"
@@ -122599,14 +121342,14 @@
}
},
"links": {},
- "name": "overflowing_sub_unsigned",
+ "name": "overflowing_div",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -122616,20 +121359,23 @@
"11512": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the multiplication of `self` and `rhs`.\n\nReturns a tuple of the multiplication along with a boolean indicating whether an arithmetic overflow\nwould occur. If an overflow would have occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5isize.overflowing_mul(2), (10, false));\nassert_eq!(1_000_000_000i32.overflowing_mul(10), (1410065408, true));\n```",
+ "docs": "Calculates the quotient of Euclidean division `self.div_euclid(rhs)`.\n\nReturns a tuple of the divisor along with a boolean indicating\nwhether an arithmetic overflow would occur. Note that for unsigned\nintegers overflow never occurs, so the second value is always\n`false`.\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self.overflowing_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u64.overflowing_div_euclid(2), (2, false));\n```",
"id": 11512,
"inner": {
"function": {
@@ -122655,7 +121401,7 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
@@ -122663,7 +121409,7 @@
"output": {
"tuple": [
{
- "primitive": "isize"
+ "primitive": "u64"
},
{
"primitive": "bool"
@@ -122674,14 +121420,14 @@
}
},
"links": {},
- "name": "overflowing_mul",
+ "name": "overflowing_div_euclid",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -122691,20 +121437,23 @@
"11513": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the \"full multiplication\" `self * rhs + carry`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need the `carry`, then you can use [`Self::widening_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.carrying_mul(-2, 0), (4294967286, -1));\nassert_eq!(5i32.carrying_mul(-2, 10), (0, 0));\nassert_eq!(1_000_000_000i32.carrying_mul(-10, 0), (2884901888, -3));\nassert_eq!(1_000_000_000i32.carrying_mul(-10, 10), (2884901898, -3));\nassert_eq!(isize::MAX.carrying_mul(isize::MAX, isize::MAX), (isize::MAX.unsigned_abs() + 1, isize::MAX / 2));\n```",
+ "docs": "Calculates the remainder when `self` is divided by `rhs`.\n\nReturns a tuple of the remainder after dividing along with a boolean\nindicating whether an arithmetic overflow would occur. Note that for\nunsigned integers overflow never occurs, so the second value is\nalways `false`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u64.overflowing_rem(2), (1, false));\n```",
"id": 11513,
"inner": {
"function": {
@@ -122730,13 +121479,7 @@
[
"rhs",
{
- "primitive": "isize"
- }
- ],
- [
- "carry",
- {
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
@@ -122744,27 +121487,25 @@
"output": {
"tuple": [
{
- "primitive": "usize"
+ "primitive": "u64"
},
{
- "primitive": "isize"
+ "primitive": "bool"
}
]
}
}
}
},
- "links": {
- "`Self::widening_mul`": 11514
- },
- "name": "carrying_mul",
+ "links": {},
+ "name": "overflowing_rem",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -122774,20 +121515,23 @@
"11514": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the complete product `self * rhs` without the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nIf you also need to add a carry to the wide result, then you want\n[`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.widening_mul(-2), (4294967286, -1));\nassert_eq!(1_000_000_000i32.widening_mul(-10), (2884901888, -3));\n```",
+ "docs": "Calculates the remainder `self.rem_euclid(rhs)` as if by Euclidean division.\n\nReturns a tuple of the modulo after dividing along with a boolean\nindicating whether an arithmetic overflow would occur. Note that for\nunsigned integers overflow never occurs, so the second value is\nalways `false`.\nSince, for the positive integers, all common\ndefinitions of division are equal, this operation\nis exactly equal to `self.overflowing_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u64.overflowing_rem_euclid(2), (1, false));\n```",
"id": 11514,
"inner": {
"function": {
@@ -122813,7 +121557,7 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
@@ -122821,27 +121565,25 @@
"output": {
"tuple": [
{
- "primitive": "usize"
+ "primitive": "u64"
},
{
- "primitive": "isize"
+ "primitive": "bool"
}
]
}
}
}
},
- "links": {
- "`Self::carrying_mul`": 11513
- },
- "name": "widening_mul",
+ "links": {},
+ "name": "overflowing_rem_euclid",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -122851,10 +121593,10 @@
"11515": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -122864,7 +121606,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the \"full multiplication\" `self * rhs + carry1 + carry2`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need either `carry`, then you can use [`Self::widening_mul`] instead,\nand if you only need one `carry`, then you can use [`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.carrying_mul_add(-2, 0, 0), (4294967286, -1));\nassert_eq!(5i32.carrying_mul_add(-2, 10, 10), (10, 0));\nassert_eq!(1_000_000_000i32.carrying_mul_add(-10, 0, 0), (2884901888, -3));\nassert_eq!(1_000_000_000i32.carrying_mul_add(-10, 10, 10), (2884901908, -3));\nassert_eq!(isize::MAX.carrying_mul_add(isize::MAX, isize::MAX, isize::MAX), (usize::MAX, isize::MAX / 2));\n```",
+ "docs": "Negates self in an overflowing fashion.\n\nReturns `!self + 1` using wrapping operations to return the value\nthat represents the negation of this unsigned value. Note that for\npositive unsigned values overflow always occurs, but negating 0 does\nnot overflow.\n\n# Examples\n\n```\nassert_eq!(0u64.overflowing_neg(), (0, false));\nassert_eq!(2u64.overflowing_neg(), (-2i32 as u64, true));\n```",
"id": 11515,
"inner": {
"function": {
@@ -122886,52 +121628,31 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "isize"
- }
- ],
- [
- "carry",
- {
- "primitive": "isize"
- }
- ],
- [
- "add",
- {
- "primitive": "isize"
- }
]
],
"is_c_variadic": false,
"output": {
"tuple": [
{
- "primitive": "usize"
+ "primitive": "u64"
},
{
- "primitive": "isize"
+ "primitive": "bool"
}
]
}
}
}
},
- "links": {
- "`Self::carrying_mul`": 11513,
- "`Self::widening_mul`": 11514
- },
- "name": "carrying_mul_add",
+ "links": {},
+ "name": "overflowing_neg",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -122941,7 +121662,7 @@
"11516": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
@@ -122954,7 +121675,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the divisor when `self` is divided by `rhs`.\n\nReturns a tuple of the divisor along with a boolean indicating whether an arithmetic overflow would\noccur. If an overflow would occur then self is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5isize.overflowing_div(2), (2, false));\nassert_eq!(isize::MIN.overflowing_div(-1), (isize::MIN, true));\n```",
+ "docs": "Shifts self left by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean\nindicating whether the shift value was larger than or equal to the\nnumber of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then\nused to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x1u64.overflowing_shl(4), (0x10, false));\nassert_eq!(0x1u64.overflowing_shl(132), (0x10, true));\nassert_eq!(0x10u64.overflowing_shl(63), (0, false));\n```",
"id": 11516,
"inner": {
"function": {
@@ -122980,7 +121701,7 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u32"
}
]
],
@@ -122988,7 +121709,7 @@
"output": {
"tuple": [
{
- "primitive": "isize"
+ "primitive": "u64"
},
{
"primitive": "bool"
@@ -122999,14 +121720,14 @@
}
},
"links": {},
- "name": "overflowing_div",
+ "name": "overflowing_shl",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -123016,10 +121737,10 @@
"11517": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -123029,7 +121750,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of Euclidean division `self.div_euclid(rhs)`.\n\nReturns a tuple of the divisor along with a boolean indicating whether an arithmetic overflow would\noccur. If an overflow would occur then `self` is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5isize.overflowing_div_euclid(2), (2, false));\nassert_eq!(isize::MIN.overflowing_div_euclid(-1), (isize::MIN, true));\n```",
+ "docs": "Shifts self right by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean\nindicating whether the shift value was larger than or equal to the\nnumber of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then\nused to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x10u64.overflowing_shr(4), (0x1, false));\nassert_eq!(0x10u64.overflowing_shr(132), (0x1, true));\n```",
"id": 11517,
"inner": {
"function": {
@@ -123055,7 +121776,7 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u32"
}
]
],
@@ -123063,7 +121784,7 @@
"output": {
"tuple": [
{
- "primitive": "isize"
+ "primitive": "u64"
},
{
"primitive": "bool"
@@ -123074,14 +121795,14 @@
}
},
"links": {},
- "name": "overflowing_div_euclid",
+ "name": "overflowing_shr",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -123091,10 +121812,10 @@
"11518": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
@@ -123104,7 +121825,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the remainder when `self` is divided by `rhs`.\n\nReturns a tuple of the remainder after dividing along with a boolean indicating whether an\narithmetic overflow would occur. If an overflow would occur then 0 is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5isize.overflowing_rem(2), (1, false));\nassert_eq!(isize::MIN.overflowing_rem(-1), (0, true));\n```",
+ "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\nReturns a tuple of the exponentiation along with a bool indicating\nwhether an overflow happened.\n\n# Examples\n\n```\nassert_eq!(3u64.overflowing_pow(5), (243, false));\nassert_eq!(3u8.overflowing_pow(6), (217, true));\n```",
"id": 11518,
"inner": {
"function": {
@@ -123128,9 +121849,9 @@
}
],
[
- "rhs",
+ "exp",
{
- "primitive": "isize"
+ "primitive": "u32"
}
]
],
@@ -123138,7 +121859,7 @@
"output": {
"tuple": [
{
- "primitive": "isize"
+ "primitive": "u64"
},
{
"primitive": "bool"
@@ -123149,14 +121870,14 @@
}
},
"links": {},
- "name": "overflowing_rem",
+ "name": "overflowing_pow",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -123166,23 +121887,20 @@
"11519": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Overflowing Euclidean remainder. Calculates `self.rem_euclid(rhs)`.\n\nReturns a tuple of the remainder after dividing along with a boolean indicating whether an\narithmetic overflow would occur. If an overflow would occur then 0 is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5isize.overflowing_rem_euclid(2), (1, false));\nassert_eq!(isize::MIN.overflowing_rem_euclid(-1), (0, true));\n```",
+ "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\n# Examples\n\n```\nassert_eq!(2u64.pow(5), 32);\n```",
"id": 11519,
"inner": {
"function": {
@@ -123206,35 +121924,28 @@
}
],
[
- "rhs",
+ "exp",
{
- "primitive": "isize"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "isize"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "overflowing_rem_euclid",
+ "name": "pow",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -123319,7 +122030,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -123335,7 +122046,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -123344,12 +122055,12 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -123358,10 +122069,10 @@
"11520": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
},
{
"must_use": {
@@ -123371,7 +122082,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Negates self, overflowing if this is equal to the minimum value.\n\nReturns a tuple of the negated version of self along with a boolean indicating whether an overflow\nhappened. If `self` is the minimum value (e.g., `i32::MIN` for values of type `i32`), then the\nminimum value will be returned again and `true` will be returned for an overflow happening.\n\n# Examples\n\n```\nassert_eq!(2isize.overflowing_neg(), (-2, false));\nassert_eq!(isize::MIN.overflowing_neg(), (isize::MIN, true));\n```",
+ "docs": "Returns the square root of the number, rounded down.\n\n# Examples\n\n```\nassert_eq!(10u64.isqrt(), 3);\n```",
"id": 11520,
"inner": {
"function": {
@@ -123397,27 +122108,20 @@
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "isize"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "overflowing_neg",
+ "name": "isqrt",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -123427,20 +122131,23 @@
"11521": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts self left by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean indicating whether the shift\nvalue was larger than or equal to the number of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then used to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x1isize.overflowing_shl(4), (0x10, false));\nassert_eq!(0x1i32.overflowing_shl(36), (0x10, true));\nassert_eq!(0x10isize.overflowing_shl(63), (0, false));\n```",
+ "docs": "Performs Euclidean division.\n\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7u64.div_euclid(4), 1); // or any other integer type\n```",
"id": 11521,
"inner": {
"function": {
@@ -123466,33 +122173,26 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "isize"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "overflowing_shl",
+ "name": "div_euclid",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -123502,20 +122202,26 @@
"11522": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[doc(alias = \"modulo\", alias = \"mod\")]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts self right by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean indicating whether the shift\nvalue was larger than or equal to the number of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then used to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x10isize.overflowing_shr(4), (0x1, false));\nassert_eq!(0x10i32.overflowing_shr(36), (0x1, true));\n```",
+ "docs": "Calculates the least remainder of `self (mod rhs)`.\n\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self % rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7u64.rem_euclid(4), 3); // or any other integer type\n```",
"id": 11522,
"inner": {
"function": {
@@ -123541,125 +122247,120 @@
[
"rhs",
{
- "primitive": "u32"
+ "primitive": "u64"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u64"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "rem_euclid",
+ "span": {
+ "begin": [
+ 1160,
+ 5
+ ],
+ "end": [
+ 1181,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11523": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards negative infinity.\n\nThis is the same as performing `self / rhs` for all unsigned integers.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(7_u64.div_floor(4), 1);\n```",
+ "id": 11523,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "isize"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "overflowing_shr",
+ "name": "div_floor",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11523": {
+ "11524": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Computes the absolute value of `self`.\n\nReturns a tuple of the absolute version of self along with a boolean indicating whether an overflow\nhappened. If self is the minimum value\n(e.g., isize::MIN for values of type isize),\nthen the minimum value will be returned again and true will be returned\nfor an overflow happening.\n\n# Examples\n\n```\nassert_eq!(10isize.overflowing_abs(), (10, false));\nassert_eq!((-10isize).overflowing_abs(), (10, false));\nassert_eq!((isize::MIN).overflowing_abs(), (isize::MIN, true));\n```",
- "id": 11523,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "tuple": [
- {
- "primitive": "isize"
- },
- {
- "primitive": "bool"
- }
- ]
- }
- }
- }
- },
- "links": {},
- "name": "overflowing_abs",
- "span": {
- "begin": [
- 420,
- 5
- ],
- "end": [
- 439,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "11524": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\nReturns a tuple of the exponentiation along with a bool indicating\nwhether an overflow happened.\n\n# Examples\n\n```\nassert_eq!(3isize.overflowing_pow(4), (81, false));\nassert_eq!(3i8.overflowing_pow(5), (-13, true));\n```",
+ "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards positive infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7_u64.div_ceil(4), 2);\n```",
"id": 11524,
"inner": {
"function": {
@@ -123683,35 +122384,28 @@
}
],
[
- "exp",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "isize"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "overflowing_pow",
+ "name": "div_ceil",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -123721,10 +122415,10 @@
"11525": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
},
{
"must_use": {
@@ -123734,7 +122428,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\n# Examples\n\n```\nlet x: isize = 2; // or any other integer type\n\nassert_eq!(x.pow(5), 32);\n```",
+ "docs": "Calculates the smallest value greater than or equal to `self` that\nis a multiple of `rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nOn overflow, this function will panic if overflow checks are enabled (default in debug\nmode) and wrap if overflow checks are disabled (default in release mode).\n\n# Examples\n\n```\nassert_eq!(16_u64.next_multiple_of(8), 16);\nassert_eq!(23_u64.next_multiple_of(8), 24);\n```",
"id": 11525,
"inner": {
"function": {
@@ -123758,28 +122452,28 @@
}
],
[
- "exp",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "pow",
+ "name": "next_multiple_of",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -123789,23 +122483,20 @@
"11526": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the square root of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is negative.\n\n# Examples\n\n```\nassert_eq!(10isize.isqrt(), 3);\n```",
+ "docs": "Calculates the smallest value greater than or equal to `self` that\nis a multiple of `rhs`. Returns `None` if `rhs` is zero or the\noperation would result in overflow.\n\n# Examples\n\n```\nassert_eq!(16_u64.checked_next_multiple_of(8), Some(16));\nassert_eq!(23_u64.checked_next_multiple_of(8), Some(24));\nassert_eq!(1_u64.checked_next_multiple_of(0), None);\nassert_eq!(u64::MAX.checked_next_multiple_of(2), None);\n```",
"id": 11526,
"inner": {
"function": {
@@ -123827,24 +122518,45 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u64"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u64"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "isqrt",
+ "name": "checked_next_multiple_of",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -123854,23 +122566,20 @@
"11527": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unsigned_is_multiple_of\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unsigned_is_multiple_of\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of Euclidean division of `self` by `rhs`.\n\nThis computes the integer `q` such that `self = q * rhs + r`, with\n`r = self.rem_euclid(rhs)` and `0 <= r < abs(rhs)`.\n\nIn other words, the result is `self / rhs` rounded to the integer `q`\nsuch that `self >= q * rhs`.\nIf `self > 0`, this is equal to rounding towards zero (the default in Rust);\nif `self < 0`, this is equal to rounding away from zero (towards +/- infinity).\nIf `rhs > 0`, this is equal to rounding towards -infinity;\nif `rhs < 0`, this is equal to rounding towards +infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\nlet a: isize = 7; // or any other integer type\nlet b = 4;\n\nassert_eq!(a.div_euclid(b), 1); // 7 >= 4 * 1\nassert_eq!(a.div_euclid(-b), -1); // 7 >= -4 * -1\nassert_eq!((-a).div_euclid(b), -2); // -7 >= 4 * -2\nassert_eq!((-a).div_euclid(-b), 2); // -7 >= -4 * 2\n```",
+ "docs": "Returns `true` if `self` is an integer multiple of `rhs`, and false otherwise.\n\nThis function is equivalent to `self % rhs == 0`, except that it will not panic\nfor `rhs == 0`. Instead, `0.is_multiple_of(0) == true`, and for any non-zero `n`,\n`n.is_multiple_of(0) == false`.\n\n# Examples\n\n```\nassert!(6_u64.is_multiple_of(2));\nassert!(!5_u64.is_multiple_of(2));\n\nassert!(0_u64.is_multiple_of(0));\nassert!(!6_u64.is_multiple_of(0));\n```",
"id": 11527,
"inner": {
"function": {
@@ -123896,26 +122605,26 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "div_euclid",
+ "name": "is_multiple_of",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -123925,26 +122634,20 @@
"11528": {
"attrs": [
{
- "other": "#[doc(alias = \"modulo\", alias = \"mod\")]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_is_power_of_two\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the least nonnegative remainder of `self (mod rhs)`.\n\nThis is done as if by the Euclidean division algorithm -- given\n`r = self.rem_euclid(rhs)`, the result satisfies\n`self = rhs * self.div_euclid(rhs) + r` and `0 <= r < abs(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN` and\n`rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\nlet a: isize = 7; // or any other integer type\nlet b = 4;\n\nassert_eq!(a.rem_euclid(b), 3);\nassert_eq!((-a).rem_euclid(b), 1);\nassert_eq!(a.rem_euclid(-b), 3);\nassert_eq!((-a).rem_euclid(-b), 1);\n```\n\nThis will panic:\n```should_panic\nlet _ = isize::MIN.rem_euclid(-1);\n```",
+ "docs": "Returns `true` if and only if `self == 2^k` for some unsigned integer `k`.\n\n# Examples\n\n```\nassert!(16u64.is_power_of_two());\nassert!(!10u64.is_power_of_two());\n```",
"id": 11528,
"inner": {
"function": {
@@ -123966,30 +122669,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "isize"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "bool"
}
}
}
},
"links": {},
- "name": "rem_euclid",
+ "name": "is_power_of_two",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -123999,20 +122696,20 @@
"11529": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards negative infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nlet a: isize = 8;\nlet b = 3;\n\nassert_eq!(a.div_floor(b), 2);\nassert_eq!(a.div_floor(-b), -3);\nassert_eq!((-a).div_floor(b), -3);\nassert_eq!((-a).div_floor(-b), 2);\n```",
+ "docs": "Returns the smallest power of two greater than or equal to `self`.\n\nWhen return value overflows (i.e., `self > (1 << (N-1))` for type\n`uN`), it panics in debug mode and the return value is wrapped to 0 in\nrelease mode (the only situation in which this method can return 0).\n\n# Examples\n\n```\nassert_eq!(2u64.next_power_of_two(), 2);\nassert_eq!(3u64.next_power_of_two(), 4);\nassert_eq!(0u64.next_power_of_two(), 1);\n```",
"id": 11529,
"inner": {
"function": {
@@ -124034,30 +122731,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "isize"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "div_floor",
+ "name": "next_power_of_two",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -124142,7 +122833,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -124158,7 +122849,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -124167,12 +122858,12 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -124181,20 +122872,20 @@
"11530": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards positive infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nlet a: isize = 8;\nlet b = 3;\n\nassert_eq!(a.div_ceil(b), 3);\nassert_eq!(a.div_ceil(-b), -2);\nassert_eq!((-a).div_ceil(b), -2);\nassert_eq!((-a).div_ceil(-b), 3);\n```",
+ "docs": "Returns the smallest power of two greater than or equal to `self`. If\nthe next power of two is greater than the type's maximum value,\n`None` is returned, otherwise the power of two is wrapped in `Some`.\n\n# Examples\n\n```\nassert_eq!(2u64.checked_next_power_of_two(), Some(2));\nassert_eq!(3u64.checked_next_power_of_two(), Some(4));\nassert_eq!(u64::MAX.checked_next_power_of_two(), None);\n```",
"id": 11530,
"inner": {
"function": {
@@ -124216,30 +122907,39 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "isize"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u64"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "div_ceil",
+ "name": "checked_next_power_of_two",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -124249,7 +122949,7 @@
"11531": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"needs decision on wrapping behavior\"),\nissue: 32463, is_soft: false}, feature: \"wrapping_next_power_of_two\"}}]"
},
{
"must_use": {
@@ -124259,7 +122959,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "If `rhs` is positive, calculates the smallest value greater than or\nequal to `self` that is a multiple of `rhs`. If `rhs` is negative,\ncalculates the largest value less than or equal to `self` that is a\nmultiple of `rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nOn overflow, this function will panic if overflow checks are enabled (default in debug\nmode) and wrap if overflow checks are disabled (default in release mode).\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(16_isize.next_multiple_of(8), 16);\nassert_eq!(23_isize.next_multiple_of(8), 24);\nassert_eq!(16_isize.next_multiple_of(-8), 16);\nassert_eq!(23_isize.next_multiple_of(-8), 16);\nassert_eq!((-16_isize).next_multiple_of(8), -16);\nassert_eq!((-23_isize).next_multiple_of(8), -16);\nassert_eq!((-16_isize).next_multiple_of(-8), -16);\nassert_eq!((-23_isize).next_multiple_of(-8), -24);\n```",
+ "docs": "Returns the smallest power of two greater than or equal to `n`. If\nthe next power of two is greater than the type's maximum value,\nthe return value is wrapped to `0`.\n\n# Examples\n\n```\n#![feature(wrapping_next_power_of_two)]\n\nassert_eq!(2u64.wrapping_next_power_of_two(), 2);\nassert_eq!(3u64.wrapping_next_power_of_two(), 4);\nassert_eq!(u64::MAX.wrapping_next_power_of_two(), 0);\n```",
"id": 11531,
"inner": {
"function": {
@@ -124281,30 +122981,24 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "isize"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "next_multiple_of",
+ "name": "wrapping_next_power_of_two",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -124314,7 +123008,10 @@
"11532": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
@@ -124324,7 +123021,7 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "If `rhs` is positive, calculates the smallest value greater than or\nequal to `self` that is a multiple of `rhs`. If `rhs` is negative,\ncalculates the largest value less than or equal to `self` that is a\nmultiple of `rhs`. Returns `None` if `rhs` is zero or the operation\nwould result in overflow.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(16_isize.checked_next_multiple_of(8), Some(16));\nassert_eq!(23_isize.checked_next_multiple_of(8), Some(24));\nassert_eq!(16_isize.checked_next_multiple_of(-8), Some(16));\nassert_eq!(23_isize.checked_next_multiple_of(-8), Some(16));\nassert_eq!((-16_isize).checked_next_multiple_of(8), Some(-16));\nassert_eq!((-23_isize).checked_next_multiple_of(8), Some(-16));\nassert_eq!((-16_isize).checked_next_multiple_of(-8), Some(-16));\nassert_eq!((-23_isize).checked_next_multiple_of(-8), Some(-24));\nassert_eq!(1_isize.checked_next_multiple_of(0), None);\nassert_eq!(isize::MAX.checked_next_multiple_of(2), None);\n```",
+ "docs": "Returns the memory representation of this integer as a byte array in\nbig-endian (network) byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x1234567890123456u64.to_be_bytes();\nassert_eq!(bytes, [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]);\n```",
"id": 11532,
"inner": {
"function": {
@@ -124346,45 +123043,29 @@
{
"generic": "Self"
}
- ],
- [
- "rhs",
- {
- "primitive": "isize"
- }
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "isize"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
+ "array": {
+ "len": "8",
+ "type": {
+ "primitive": "u8"
+ }
}
}
}
}
},
"links": {},
- "name": "checked_next_multiple_of",
+ "name": "to_be_bytes",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -124394,23 +123075,20 @@
"11533": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nThis method might not be optimized owing to implementation details;\n`ilog2` can produce results more efficiently for base 2, and `ilog10`\ncan produce results more efficiently for base 10.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero,\nor if `base` is less than 2.\n\n# Examples\n\n```\nassert_eq!(5isize.ilog(5), 1);\n```",
+ "docs": "Returns the memory representation of this integer as a byte array in\nlittle-endian byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x1234567890123456u64.to_le_bytes();\nassert_eq!(bytes, [0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]);\n```",
"id": 11533,
"inner": {
"function": {
@@ -124432,30 +123110,29 @@
{
"generic": "Self"
}
- ],
- [
- "base",
- {
- "primitive": "isize"
- }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "array": {
+ "len": "8",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
}
}
},
"links": {},
- "name": "ilog",
+ "name": "to_le_bytes",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -124465,23 +123142,20 @@
"11534": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 10 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero.\n\n# Example\n\n```\nassert_eq!(10isize.ilog10(), 1);\n```",
+ "docs": "Returns the memory representation of this integer as a byte array in\nnative byte order.\n\nAs the target platform's native endianness is used, portable code\nshould use [`to_be_bytes`] or [`to_le_bytes`], as appropriate,\ninstead.\n\n\n\n[`to_be_bytes`]: Self::to_be_bytes\n[`to_le_bytes`]: Self::to_le_bytes\n\n# Examples\n\n```\nlet bytes = 0x1234567890123456u64.to_ne_bytes();\nassert_eq!(\n bytes,\n if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]\n } else {\n [0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]\n }\n);\n```",
"id": 11534,
"inner": {
"function": {
@@ -124507,20 +123181,28 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "array": {
+ "len": "8",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
}
}
},
- "links": {},
- "name": "ilog10",
+ "links": {
+ "Self::to_be_bytes": 11532,
+ "Self::to_le_bytes": 11533
+ },
+ "name": "to_ne_bytes",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -124530,20 +123212,20 @@
"11535": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nReturns `None` if the number is negative or zero, or if the base is not at least 2.\n\nThis method might not be optimized owing to implementation details;\n`checked_ilog2` can produce results more efficiently for base 2, and\n`checked_ilog10` can produce results more efficiently for base 10.\n\n# Examples\n\n```\nassert_eq!(5isize.checked_ilog(5), Some(1));\n```",
+ "docs": "Creates a native endian integer value from its representation\nas a byte array in big endian.\n\n\n\n# Examples\n\n```\nlet value = u64::from_be_bytes([0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]);\nassert_eq!(value, 0x1234567890123456);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_be_u64(input: &mut &[u8]) -> u64 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n u64::from_be_bytes(int_bytes.try_into().unwrap())\n}\n```",
"id": 11535,
"inner": {
"function": {
@@ -124561,49 +123243,33 @@
"sig": {
"inputs": [
[
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "base",
+ "bytes",
{
- "primitive": "isize"
+ "array": {
+ "len": "8",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "checked_ilog",
+ "name": "from_be_bytes",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -124613,20 +123279,20 @@
"11536": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 2 logarithm of the number, rounded down.\n\nReturns `None` if the number is negative or zero.\n\n# Examples\n\n```\nassert_eq!(2isize.checked_ilog2(), Some(1));\n```",
+ "docs": "Creates a native endian integer value from its representation\nas a byte array in little endian.\n\n\n\n# Examples\n\n```\nlet value = u64::from_le_bytes([0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]);\nassert_eq!(value, 0x1234567890123456);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_le_u64(input: &mut &[u8]) -> u64 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n u64::from_le_bytes(int_bytes.try_into().unwrap())\n}\n```",
"id": 11536,
"inner": {
"function": {
@@ -124644,43 +123310,33 @@
"sig": {
"inputs": [
[
- "self",
+ "bytes",
{
- "generic": "Self"
+ "array": {
+ "len": "8",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "checked_ilog2",
+ "name": "from_le_bytes",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -124690,20 +123346,20 @@
"11537": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
},
{
"must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
+ "reason": null
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 10 logarithm of the number, rounded down.\n\nReturns `None` if the number is negative or zero.\n\n# Example\n\n```\nassert_eq!(10isize.checked_ilog10(), Some(1));\n```",
+ "docs": "Creates a native endian integer value from its memory representation\nas a byte array in native endianness.\n\nAs the target platform's native endianness is used, portable code\nlikely wants to use [`from_be_bytes`] or [`from_le_bytes`], as\nappropriate instead.\n\n[`from_be_bytes`]: Self::from_be_bytes\n[`from_le_bytes`]: Self::from_le_bytes\n\n\n\n# Examples\n\n```\nlet value = u64::from_ne_bytes(if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]\n} else {\n [0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]\n});\nassert_eq!(value, 0x1234567890123456);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_ne_u64(input: &mut &[u8]) -> u64 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n u64::from_ne_bytes(int_bytes.try_into().unwrap())\n}\n```",
"id": 11537,
"inner": {
"function": {
@@ -124721,43 +123377,36 @@
"sig": {
"inputs": [
[
- "self",
+ "bytes",
{
- "generic": "Self"
+ "array": {
+ "len": "8",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "u64"
}
}
}
},
- "links": {},
- "name": "checked_ilog10",
+ "links": {
+ "Self::from_be_bytes": 11535,
+ "Self::from_le_bytes": 11536
+ },
+ "name": "from_ne_bytes",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -124767,20 +123416,21 @@
"11538": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ "other": "#[rustc_diagnostic_item = \"u64_legacy_fn_min_value\"]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
}
],
"crate_id": 1,
- "deprecation": null,
- "docs": "Computes the absolute value of `self`.\n\n# Overflow behavior\n\nThe absolute value of\n`isize::MIN`\ncannot be represented as an\n`isize`,\nand attempting to calculate it will cause an overflow. This means\nthat code in debug mode will trigger a panic on this case and\noptimized code will return\n`isize::MIN`\nwithout a panic. If you do not want this behavior, consider\nusing [`unsigned_abs`](Self::unsigned_abs) instead.\n\n# Examples\n\n```\nassert_eq!(10isize.abs(), 10);\nassert_eq!((-10isize).abs(), 10);\n```",
+ "deprecation": {
+ "note": "replaced by the `MIN` associated constant on this type",
+ "since": "TBD"
+ },
+ "docs": "New code should prefer to use\n[`u64::MIN`] instead.\n\nReturns the smallest value that can be represented by this integer type.",
"id": 11538,
"inner": {
"function": {
@@ -124796,32 +123446,25 @@
"is_unsafe": false
},
"sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
+ "inputs": [],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
},
"links": {
- "Self::unsigned_abs": 11502
+ "`u64::MIN`": 11409
},
- "name": "abs",
+ "name": "min_value",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -124831,20 +123474,21 @@
"11539": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\", promotable: false}}]"
+ "other": "#[rustc_diagnostic_item = \"u64_legacy_fn_max_value\"]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
}
],
"crate_id": 1,
- "deprecation": null,
- "docs": "Computes the absolute difference between `self` and `other`.\n\nThis function always returns the correct answer without overflow or\npanics by returning an unsigned integer.\n\n# Examples\n\n```\nassert_eq!(100isize.abs_diff(80), 20usize);\nassert_eq!(100isize.abs_diff(110), 10usize);\nassert_eq!((-100isize).abs_diff(80), 180usize);\nassert_eq!((-100isize).abs_diff(-120), 20usize);\nassert_eq!(isize::MIN.abs_diff(isize::MAX), usize::MAX);\n```",
+ "deprecation": {
+ "note": "replaced by the `MAX` associated constant on this type",
+ "since": "TBD"
+ },
+ "docs": "New code should prefer to use\n[`u64::MAX`] instead.\n\nReturns the largest value that can be represented by this integer type.",
"id": 11539,
"inner": {
"function": {
@@ -124860,36 +123504,25 @@
"is_unsafe": false
},
"sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ],
- [
- "other",
- {
- "primitive": "isize"
- }
- ]
- ],
+ "inputs": [],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u64"
}
}
}
},
- "links": {},
- "name": "abs_diff",
+ "links": {
+ "`u64::MAX`": 11410
+ },
+ "name": "max_value",
"span": {
"begin": [
- 420,
+ 1160,
5
],
"end": [
- 439,
+ 1181,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
@@ -124995,7 +123628,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -125020,11 +123653,11 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -125032,823 +123665,18 @@
"visibility": "default"
},
"11540": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_int_sign\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Returns a number representing sign of `self`.\n\n - `0` if the number is zero\n - `1` if the number is positive\n - `-1` if the number is negative\n\n# Examples\n\n```\nassert_eq!(10isize.signum(), 1);\nassert_eq!(0isize.signum(), 0);\nassert_eq!((-10isize).signum(), -1);\n```",
- "id": 11540,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "isize"
- }
- }
- }
- },
- "links": {},
- "name": "signum",
- "span": {
- "begin": [
- 420,
- 5
- ],
- "end": [
- 439,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "11541": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- },
- {
- "must_use": {
- "reason": null
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Returns `true` if `self` is positive and `false` if the number is zero or\nnegative.\n\n# Examples\n\n```\nassert!(10isize.is_positive());\nassert!(!(-10isize).is_positive());\n```",
- "id": 11541,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "bool"
- }
- }
- }
- },
- "links": {},
- "name": "is_positive",
- "span": {
- "begin": [
- 420,
- 5
- ],
- "end": [
- 439,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "11542": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- },
- {
- "must_use": {
- "reason": null
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Returns `true` if `self` is negative and `false` if the number is zero or\npositive.\n\n# Examples\n\n```\nassert!((-10isize).is_negative());\nassert!(!10isize.is_negative());\n```",
- "id": 11542,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "bool"
- }
- }
- }
- },
- "links": {},
- "name": "is_negative",
- "span": {
- "begin": [
- 420,
- 5
- ],
- "end": [
- 439,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "11543": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nbig-endian (network) byte order.\n\n\n**Note**: This function returns an array of length 2, 4 or 8 bytes\ndepending on the target pointer size.\n\n# Examples\n\n```\nlet bytes = 0x1234567890123456isize.to_be_bytes();\nassert_eq!(bytes, [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]);\n```",
- "id": 11543,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "array": {
- "len": "8",
- "type": {
- "primitive": "u8"
- }
- }
- }
- }
- }
- },
- "links": {},
- "name": "to_be_bytes",
- "span": {
- "begin": [
- 420,
- 5
- ],
- "end": [
- 439,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "11544": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nlittle-endian byte order.\n\n\n**Note**: This function returns an array of length 2, 4 or 8 bytes\ndepending on the target pointer size.\n\n# Examples\n\n```\nlet bytes = 0x1234567890123456isize.to_le_bytes();\nassert_eq!(bytes, [0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]);\n```",
- "id": 11544,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "array": {
- "len": "8",
- "type": {
- "primitive": "u8"
- }
- }
- }
- }
- }
- },
- "links": {},
- "name": "to_le_bytes",
- "span": {
- "begin": [
- 420,
- 5
- ],
- "end": [
- 439,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "11545": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nnative byte order.\n\nAs the target platform's native endianness is used, portable code\nshould use [`to_be_bytes`] or [`to_le_bytes`], as appropriate,\ninstead.\n\n\n**Note**: This function returns an array of length 2, 4 or 8 bytes\ndepending on the target pointer size.\n\n[`to_be_bytes`]: Self::to_be_bytes\n[`to_le_bytes`]: Self::to_le_bytes\n\n# Examples\n\n```\nlet bytes = 0x1234567890123456isize.to_ne_bytes();\nassert_eq!(\n bytes,\n if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]\n } else {\n [0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]\n }\n);\n```",
- "id": 11545,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "array": {
- "len": "8",
- "type": {
- "primitive": "u8"
- }
- }
- }
- }
- }
- },
- "links": {
- "Self::to_be_bytes": 11543,
- "Self::to_le_bytes": 11544
- },
- "name": "to_ne_bytes",
- "span": {
- "begin": [
- 420,
- 5
- ],
- "end": [
- 439,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "11546": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
- },
- {
- "must_use": {
- "reason": null
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Creates an integer value from its representation as a byte array in\nbig endian.\n\n\n**Note**: This function takes an array of length 2, 4 or 8 bytes\ndepending on the target pointer size.\n\n# Examples\n\n```\nlet value = isize::from_be_bytes([0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]);\nassert_eq!(value, 0x1234567890123456);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_be_isize(input: &mut &[u8]) -> isize {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n isize::from_be_bytes(int_bytes.try_into().unwrap())\n}\n```",
- "id": 11546,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "bytes",
- {
- "array": {
- "len": "8",
- "type": {
- "primitive": "u8"
- }
- }
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "isize"
- }
- }
- }
- },
- "links": {},
- "name": "from_be_bytes",
- "span": {
- "begin": [
- 420,
- 5
- ],
- "end": [
- 439,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "11547": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
- },
- {
- "must_use": {
- "reason": null
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Creates an integer value from its representation as a byte array in\nlittle endian.\n\n\n**Note**: This function takes an array of length 2, 4 or 8 bytes\ndepending on the target pointer size.\n\n# Examples\n\n```\nlet value = isize::from_le_bytes([0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]);\nassert_eq!(value, 0x1234567890123456);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_le_isize(input: &mut &[u8]) -> isize {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n isize::from_le_bytes(int_bytes.try_into().unwrap())\n}\n```",
- "id": 11547,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "bytes",
- {
- "array": {
- "len": "8",
- "type": {
- "primitive": "u8"
- }
- }
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "isize"
- }
- }
- }
- },
- "links": {},
- "name": "from_le_bytes",
- "span": {
- "begin": [
- 420,
- 5
- ],
- "end": [
- 439,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "11548": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
- },
- {
- "must_use": {
- "reason": null
- }
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "Creates an integer value from its memory representation as a byte\narray in native endianness.\n\nAs the target platform's native endianness is used, portable code\nlikely wants to use [`from_be_bytes`] or [`from_le_bytes`], as\nappropriate instead.\n\n[`from_be_bytes`]: Self::from_be_bytes\n[`from_le_bytes`]: Self::from_le_bytes\n\n\n**Note**: This function takes an array of length 2, 4 or 8 bytes\ndepending on the target pointer size.\n\n# Examples\n\n```\nlet value = isize::from_ne_bytes(if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]\n} else {\n [0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]\n});\nassert_eq!(value, 0x1234567890123456);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_ne_isize(input: &mut &[u8]) -> isize {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n isize::from_ne_bytes(int_bytes.try_into().unwrap())\n}\n```",
- "id": 11548,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "bytes",
- {
- "array": {
- "len": "8",
- "type": {
- "primitive": "u8"
- }
- }
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "isize"
- }
- }
- }
- },
- "links": {
- "Self::from_be_bytes": 11546,
- "Self::from_le_bytes": 11547
- },
- "name": "from_ne_bytes",
- "span": {
- "begin": [
- 420,
- 5
- ],
- "end": [
- 439,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "11549": {
- "attrs": [
- {
- "other": "#[rustc_diagnostic_item = \"isize_legacy_fn_min_value\"]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_min_value\", promotable: true}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- }
- ],
- "crate_id": 1,
- "deprecation": {
- "note": "replaced by the `MIN` associated constant on this type",
- "since": "TBD"
- },
- "docs": "New code should prefer to use\n[`isize::MIN`] instead.\n\nReturns the smallest value that can be represented by this integer type.",
- "id": 11549,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [],
- "is_c_variadic": false,
- "output": {
- "primitive": "isize"
- }
- }
- }
- },
- "links": {
- "`isize::MIN`": 11417
- },
- "name": "min_value",
- "span": {
- "begin": [
- 420,
- 5
- ],
- "end": [
- 439,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "1155": {
- "attrs": [],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 1155,
- "inner": {
- "impl": {
- "blanket_impl": {
- "generic": "T"
- },
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 776,
- "path": "Entry"
- }
- },
- "generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "T"
- }
- ],
- "where_predicates": []
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 329
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "generic": "T"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 37,
- "path": "From"
- }
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 791,
- 1
- ],
- "end": [
- 791,
- 28
- ],
- "filename": "checkouts/rust/library/core/src/convert/mod.rs"
- },
- "visibility": "default"
- },
- "11550": {
- "attrs": [
- {
- "other": "#[rustc_diagnostic_item = \"isize_legacy_fn_max_value\"]"
- },
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- }
- ],
- "crate_id": 1,
- "deprecation": {
- "note": "replaced by the `MAX` associated constant on this type",
- "since": "TBD"
- },
- "docs": "New code should prefer to use\n[`isize::MAX`] instead.\n\nReturns the largest value that can be represented by this integer type.",
- "id": 11550,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": true,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [],
- "is_c_variadic": false,
- "output": {
- "primitive": "isize"
- }
- }
- }
- },
- "links": {
- "`isize::MAX`": 11418
- },
- "name": "max_value",
- "span": {
- "begin": [
- 420,
- 5
- ],
- "end": [
- 439,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "11551": {
"attrs": [
{
"other": "#[doc(alias = \"average_floor\")]"
},
- {
- "other": "#[doc(alias = \"average_ceil\")]"
- },
{
"other": "#[doc(alias = \"average\")]"
},
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"num_midpoint_signed\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"num_midpoint\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"num_midpoint_signed\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"num_midpoint\"}}]"
},
{
"must_use": {
@@ -125858,8 +123686,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the midpoint (average) between `self` and `rhs`.\n\n`midpoint(a, b)` is `(a + b) / 2` as if it were performed in a\nsufficiently-large signed integral type. This implies that the result is\nalways rounded towards zero and that no overflow will ever occur.\n\n# Examples\n\n```\nassert_eq!(0isize.midpoint(4), 2);\nassert_eq!((-1isize).midpoint(2), 0);\nassert_eq!((-7isize).midpoint(0), -3);\nassert_eq!(0isize.midpoint(-7), -3);\nassert_eq!(0isize.midpoint(7), 3);\n```",
- "id": 11551,
+ "docs": "Calculates the midpoint (average) between `self` and `rhs`.\n\n`midpoint(a, b)` is `(a + b) / 2` as if it were performed in a\nsufficiently-large unsigned integral type. This implies that the result is\nalways rounded towards zero and that no overflow will ever occur.\n\n# Examples\n\n```\nassert_eq!(0u64.midpoint(4), 2);\nassert_eq!(1u64.midpoint(4), 2);\n```",
+ "id": 11540,
"inner": {
"function": {
"generics": {
@@ -125884,13 +123712,13 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u64"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
}
@@ -125899,28 +123727,28 @@
"name": "midpoint",
"span": {
"begin": [
- 440,
+ 1182,
5
],
"end": [
- 440,
- 37
+ 1182,
+ 43
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11552": {
+ "11541": {
"attrs": [],
"crate_id": 1,
"deprecation": null,
"docs": null,
- "id": 11552,
+ "id": 11541,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
- "primitive": "isize"
+ "primitive": "u64"
},
"generics": {
"params": [],
@@ -125930,11 +123758,19 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 11409,
+ 11410,
+ 11411,
+ 11412,
+ 11413,
+ 11415,
+ 11416,
11417,
11418,
11419,
11420,
11421,
+ 11422,
11423,
11424,
11425,
@@ -125949,21 +123785,21 @@
11434,
11435,
11436,
- 11437,
11438,
11439,
11440,
11441,
- 11443,
+ 11442,
11444,
11445,
11446,
11447,
+ 11448,
11449,
- 11450,
11451,
11452,
11453,
+ 11454,
11455,
11456,
11457,
@@ -125974,6 +123810,7 @@
11462,
11463,
11464,
+ 11414,
11465,
11466,
11467,
@@ -126001,11 +123838,11 @@
11489,
11490,
11491,
- 11442,
+ 11437,
11492,
- 11448,
+ 11443,
11493,
- 11454,
+ 11450,
11494,
11495,
11496,
@@ -126015,16 +123852,20 @@
11500,
11501,
11502,
+ 10774,
11503,
11504,
+ 10778,
+ 11505,
11506,
- 11507,
11508,
11510,
+ 11507,
+ 11509,
11511,
11512,
- 11514,
11513,
+ 11514,
11515,
11516,
11517,
@@ -126044,25 +123885,13 @@
11531,
11532,
11533,
- 11422,
11534,
11535,
11536,
11537,
11538,
11539,
- 11540,
- 11541,
- 11542,
- 11543,
- 11544,
- 11545,
- 11546,
- 11547,
- 11548,
- 11549,
- 11550,
- 11551
+ 11540
],
"provided_trait_methods": [],
"trait": null
@@ -126072,18 +123901,18 @@
"name": null,
"span": {
"begin": [
- 419,
+ 1159,
1
],
"end": [
- 419,
- 11
+ 1159,
+ 9
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "default"
},
- "11553": {
+ "11542": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 82, patch: 0})}, feature: \"const_int_from_str\", promotable: false}}]"
@@ -126094,8 +123923,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from a string slice with digits in a given base.\n\nThe string is expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\nassert_eq!(isize::from_str_radix(\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\nassert!(isize::from_str_radix(\"1 \", 10).is_err());\n```",
- "id": 11553,
+ "docs": "Parses an integer from a string slice with digits in a given base.\n\nThe string is expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# See also\nIf the string to be parsed is in base 10 (decimal),\n[`from_str`] or [`str::parse`] can also be used.\n\n[`from_str`]: #method.from_str\n[`str::parse`]: primitive.str.html#method.parse\n\n# Examples\n\n```\nassert_eq!(u64::from_str_radix(\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\nassert!(u64::from_str_radix(\"1 \", 10).is_err());\n```",
+ "id": 11542,
"inner": {
"function": {
"generics": {
@@ -126138,14 +123967,14 @@
"args": [
{
"type": {
- "primitive": "isize"
+ "primitive": "u64"
}
},
{
"type": {
"resolved_path": {
"args": null,
- "id": 4784,
+ "id": 4786,
"path": "ParseIntError"
}
}
@@ -126165,18 +123994,18 @@
"name": "from_str_radix",
"span": {
"begin": [
- 1630,
+ 1667,
1
],
"end": [
- 1630,
- 56
+ 1667,
+ 58
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11554": {
+ "11543": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
@@ -126184,8 +124013,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from an ASCII-byte slice with decimal digits.\n\nThe characters are expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(isize::from_ascii(b\"+10\"), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(isize::from_ascii(b\"1 \").is_err());\n```",
- "id": 11554,
+ "docs": "Parses an integer from an ASCII-byte slice with decimal digits.\n\nThe characters are expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(u64::from_ascii(b\"+10\"), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(u64::from_ascii(b\"1 \").is_err());\n```",
+ "id": 11543,
"inner": {
"function": {
"generics": {
@@ -126224,14 +124053,14 @@
"args": [
{
"type": {
- "primitive": "isize"
+ "primitive": "u64"
}
},
{
"type": {
"resolved_path": {
"args": null,
- "id": 4784,
+ "id": 4786,
"path": "ParseIntError"
}
}
@@ -126251,18 +124080,18 @@
"name": "from_ascii",
"span": {
"begin": [
- 1630,
+ 1667,
1
],
"end": [
- 1630,
- 56
+ 1667,
+ 58
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11555": {
+ "11544": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
@@ -126270,8 +124099,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from an ASCII-byte slice with digits in a given base.\n\nThe characters are expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(isize::from_ascii_radix(b\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(isize::from_ascii_radix(b\"1 \", 10).is_err());\n```",
- "id": 11555,
+ "docs": "Parses an integer from an ASCII-byte slice with digits in a given base.\n\nThe characters are expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(u64::from_ascii_radix(b\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(u64::from_ascii_radix(b\"1 \", 10).is_err());\n```",
+ "id": 11544,
"inner": {
"function": {
"generics": {
@@ -126316,14 +124145,14 @@
"args": [
{
"type": {
- "primitive": "isize"
+ "primitive": "u64"
}
},
{
"type": {
"resolved_path": {
"args": null,
- "id": 4784,
+ "id": 4786,
"path": "ParseIntError"
}
}
@@ -126343,28 +124172,28 @@
"name": "from_ascii_radix",
"span": {
"begin": [
- 1630,
+ 1667,
1
],
"end": [
- 1630,
- 56
+ 1667,
+ 58
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11556": {
+ "11545": {
"attrs": [],
"crate_id": 1,
"deprecation": null,
"docs": null,
- "id": 11556,
+ "id": 11545,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
- "primitive": "isize"
+ "primitive": "u64"
},
"generics": {
"params": [],
@@ -126374,9 +124203,9 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 11553,
- 11554,
- 11555
+ 11542,
+ 11543,
+ 11544
],
"provided_trait_methods": [],
"trait": null
@@ -126386,18 +124215,18 @@
"name": null,
"span": {
"begin": [
- 1630,
+ 1667,
1
],
"end": [
- 1630,
- 56
+ 1667,
+ 58
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "default"
},
- "11557": {
+ "11546": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 138215, is_soft: false}, feature: \"int_format_into\"}}]"
@@ -126405,8 +124234,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Allows users to write an integer (in signed decimal format) into a variable `buf` of\ntype [`NumBuffer`] that is passed by the caller by mutable reference.\n\n# Examples\n\n```\n#![feature(int_format_into)]\nuse core::fmt::NumBuffer;\n\nlet n = 0isize;\nlet mut buf = NumBuffer::new();\nassert_eq!(n.format_into(&mut buf), \"0\");\n\nlet n1 = 32isize;\nassert_eq!(n1.format_into(&mut buf), \"32\");\n\nlet n2 = isize :: MAX;\nassert_eq!(n2.format_into(&mut buf), isize :: MAX.to_string());\n```",
- "id": 11557,
+ "docs": "Allows users to write an integer (in signed decimal format) into a variable `buf` of\ntype [`NumBuffer`] that is passed by the caller by mutable reference.\n\n# Examples\n\n```\n#![feature(int_format_into)]\nuse core::fmt::NumBuffer;\n\nlet n = 0u64;\nlet mut buf = NumBuffer::new();\nassert_eq!(n.format_into(&mut buf), \"0\");\n\nlet n1 = 32u64;\nassert_eq!(n1.format_into(&mut buf), \"32\");\n\nlet n2 = u64 :: MAX;\nassert_eq!(n2.format_into(&mut buf), u64 :: MAX.to_string());\n```",
+ "id": 11546,
"inner": {
"function": {
"generics": {
@@ -126441,14 +124270,14 @@
"args": [
{
"type": {
- "primitive": "isize"
+ "primitive": "u64"
}
}
],
"constraints": []
}
},
- "id": 10162,
+ "id": 10387,
"path": "NumBuffer"
}
}
@@ -126470,33 +124299,33 @@
}
},
"links": {
- "`NumBuffer`": 10162
+ "`NumBuffer`": 10387
},
"name": "format_into",
"span": {
"begin": [
- 562,
+ 599,
5
],
"end": [
- 562,
+ 599,
95
],
"filename": "checkouts/rust/library/core/src/fmt/num.rs"
},
"visibility": "public"
},
- "11558": {
+ "11547": {
"attrs": [],
"crate_id": 1,
"deprecation": null,
"docs": null,
- "id": 11558,
+ "id": 11547,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
- "primitive": "isize"
+ "primitive": "u64"
},
"generics": {
"params": [],
@@ -126506,7 +124335,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 11557
+ 11546
],
"provided_trait_methods": [],
"trait": null
@@ -126516,18 +124345,18 @@
"name": null,
"span": {
"begin": [
- 562,
+ 599,
5
],
"end": [
- 562,
+ 599,
95
],
"filename": "checkouts/rust/library/core/src/fmt/num.rs"
},
"visibility": "default"
},
- "11559": {
+ "11548": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
@@ -126535,12 +124364,12 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "The smallest value that can be represented by this integer type.\n\n# Examples\n\n```\nassert_eq!(usize::MIN, 0);\n```",
- "id": 11559,
+ "docs": "The smallest value that can be represented by this integer type.\n\n# Examples\n\n```\nassert_eq!(u128::MIN, 0);\n```",
+ "id": 11548,
"inner": {
"assoc_const": {
"type": {
- "primitive": "usize"
+ "primitive": "u128"
},
"value": "0"
}
@@ -126549,23 +124378,56 @@
"name": "MIN",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "1156": {
+ "11549": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "The largest value that can be represented by this integer type\n(2128 − 1).\n\n# Examples\n\n```\nassert_eq!(u128::MAX, 340282366920938463463374607431768211455);\n```",
+ "id": 11549,
+ "inner": {
+ "assoc_const": {
+ "type": {
+ "primitive": "u128"
+ },
+ "value": "_"
+ }
+ },
+ "links": {},
+ "name": "MAX",
+ "span": {
+ "begin": [
+ 1186,
+ 5
+ ],
+ "end": [
+ 1209,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1155": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1156,
+ "id": 1155,
"inner": {
"impl": {
"blanket_impl": {
@@ -126608,59 +124470,15 @@
}
},
"name": "T"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "U"
}
],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "generic": "T"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 199,
- "path": "TryFrom"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "U"
- }
- }
- }
- ]
+ "where_predicates": []
},
"is_negative": false,
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -126669,15 +124487,15 @@
"args": [
{
"type": {
- "generic": "U"
+ "generic": "T"
}
}
],
"constraints": []
}
},
- "id": 200,
- "path": "TryInto"
+ "id": 37,
+ "path": "From"
}
}
},
@@ -126685,51 +124503,18 @@
"name": null,
"span": {
"begin": [
- 817,
+ 785,
1
],
"end": [
- 819,
- 27
+ 785,
+ 28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "11560": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
- }
- ],
- "crate_id": 1,
- "deprecation": null,
- "docs": "The largest value that can be represented by this integer type\n(264 − 1 on 64-bit targets).\n\n# Examples\n\n```\nassert_eq!(usize::MAX, 18446744073709551615);\n```",
- "id": 11560,
- "inner": {
- "assoc_const": {
- "type": {
- "primitive": "usize"
- },
- "value": "_"
- }
- },
- "links": {},
- "name": "MAX",
- "span": {
- "begin": [
- 1248,
- 5
- ],
- "end": [
- 1266,
- 6
- ],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
- },
- "visibility": "public"
- },
- "11561": {
+ "11550": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 53, patch: 0})}, feature: \"int_bits_const\"}}]"
@@ -126737,8 +124522,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "The size of this integer type in bits.\n\n# Examples\n\n```\nassert_eq!(usize::BITS, 64);\n```",
- "id": 11561,
+ "docs": "The size of this integer type in bits.\n\n# Examples\n\n```\nassert_eq!(u128::BITS, 128);\n```",
+ "id": 11550,
"inner": {
"assoc_const": {
"type": {
@@ -126751,18 +124536,18 @@
"name": "BITS",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11562": {
+ "11551": {
"attrs": [
{
"other": "#[doc(alias = \"popcount\")]"
@@ -126784,8 +124569,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 0b01001100usize;\nassert_eq!(n.count_ones(), 3);\n\nlet max = usize::MAX;\nassert_eq!(max.count_ones(), 64);\n\nlet zero = 0usize;\nassert_eq!(zero.count_ones(), 0);\n```",
- "id": 11562,
+ "docs": "Returns the number of ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 0b01001100u128;\nassert_eq!(n.count_ones(), 3);\n\nlet max = u128::MAX;\nassert_eq!(max.count_ones(), 128);\n\nlet zero = 0u128;\nassert_eq!(zero.count_ones(), 0);\n```",
+ "id": 11551,
"inner": {
"function": {
"generics": {
@@ -126819,18 +124604,18 @@
"name": "count_ones",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11563": {
+ "11552": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
@@ -126846,8 +124631,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of zeros in the binary representation of `self`.\n\n# Examples\n\n```\nlet zero = 0usize;\nassert_eq!(zero.count_zeros(), 64);\n\nlet max = usize::MAX;\nassert_eq!(max.count_zeros(), 0);\n```",
- "id": 11563,
+ "docs": "Returns the number of zeros in the binary representation of `self`.\n\n# Examples\n\n```\nlet zero = 0u128;\nassert_eq!(zero.count_zeros(), 128);\n\nlet max = u128::MAX;\nassert_eq!(max.count_zeros(), 0);\n```",
+ "id": 11552,
"inner": {
"function": {
"generics": {
@@ -126881,18 +124666,18 @@
"name": "count_zeros",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11564": {
+ "11553": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
@@ -126911,8 +124696,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 2 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is zero.\n\n# Examples\n\n```\nassert_eq!(2usize.ilog2(), 1);\n```",
- "id": 11564,
+ "docs": "Returns the base 2 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is zero.\n\n# Examples\n\n```\nassert_eq!(2u128.ilog2(), 1);\n```",
+ "id": 11553,
"inner": {
"function": {
"generics": {
@@ -126946,18 +124731,18 @@
"name": "ilog2",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11565": {
+ "11554": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
@@ -126973,8 +124758,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of leading zeros in the binary representation of `self`.\n\nDepending on what you're doing with the value, you might also be interested in the\n[`ilog2`] function which returns a consistent number, even if the type widens.\n\n# Examples\n\n```\nlet n = usize::MAX >> 2;\nassert_eq!(n.leading_zeros(), 2);\n\nlet zero = 0usize;\nassert_eq!(zero.leading_zeros(), 64);\n\nlet max = usize::MAX;\nassert_eq!(max.leading_zeros(), 0);\n```\n[`ilog2`]: usize::ilog2",
- "id": 11565,
+ "docs": "Returns the number of leading zeros in the binary representation of `self`.\n\nDepending on what you're doing with the value, you might also be interested in the\n[`ilog2`] function which returns a consistent number, even if the type widens.\n\n# Examples\n\n```\nlet n = u128::MAX >> 2;\nassert_eq!(n.leading_zeros(), 2);\n\nlet zero = 0u128;\nassert_eq!(zero.leading_zeros(), 128);\n\nlet max = u128::MAX;\nassert_eq!(max.leading_zeros(), 0);\n```\n[`ilog2`]: u128::ilog2",
+ "id": 11554,
"inner": {
"function": {
"generics": {
@@ -127005,23 +124790,23 @@
}
},
"links": {
- "usize::ilog2": 11564
+ "u128::ilog2": 11553
},
"name": "leading_zeros",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11566": {
+ "11555": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
@@ -127037,8 +124822,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of trailing zeros in the binary representation\nof `self`.\n\n# Examples\n\n```\nlet n = 0b0101000usize;\nassert_eq!(n.trailing_zeros(), 3);\n\nlet zero = 0usize;\nassert_eq!(zero.trailing_zeros(), 64);\n\nlet max = usize::MAX;\nassert_eq!(max.trailing_zeros(), 0);\n```",
- "id": 11566,
+ "docs": "Returns the number of trailing zeros in the binary representation\nof `self`.\n\n# Examples\n\n```\nlet n = 0b0101000u128;\nassert_eq!(n.trailing_zeros(), 3);\n\nlet zero = 0u128;\nassert_eq!(zero.trailing_zeros(), 128);\n\nlet max = u128::MAX;\nassert_eq!(max.trailing_zeros(), 0);\n```",
+ "id": 11555,
"inner": {
"function": {
"generics": {
@@ -127072,18 +124857,18 @@
"name": "trailing_zeros",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11567": {
+ "11556": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
@@ -127099,8 +124884,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of leading ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = !(usize::MAX >> 2);\nassert_eq!(n.leading_ones(), 2);\n\nlet zero = 0usize;\nassert_eq!(zero.leading_ones(), 0);\n\nlet max = usize::MAX;\nassert_eq!(max.leading_ones(), 64);\n```",
- "id": 11567,
+ "docs": "Returns the number of leading ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = !(u128::MAX >> 2);\nassert_eq!(n.leading_ones(), 2);\n\nlet zero = 0u128;\nassert_eq!(zero.leading_ones(), 0);\n\nlet max = u128::MAX;\nassert_eq!(max.leading_ones(), 128);\n```",
+ "id": 11556,
"inner": {
"function": {
"generics": {
@@ -127134,18 +124919,18 @@
"name": "leading_ones",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11568": {
+ "11557": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
@@ -127161,8 +124946,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the number of trailing ones in the binary representation\nof `self`.\n\n# Examples\n\n```\nlet n = 0b1010111usize;\nassert_eq!(n.trailing_ones(), 3);\n\nlet zero = 0usize;\nassert_eq!(zero.trailing_ones(), 0);\n\nlet max = usize::MAX;\nassert_eq!(max.trailing_ones(), 64);\n```",
- "id": 11568,
+ "docs": "Returns the number of trailing ones in the binary representation\nof `self`.\n\n# Examples\n\n```\nlet n = 0b1010111u128;\nassert_eq!(n.trailing_ones(), 3);\n\nlet zero = 0u128;\nassert_eq!(zero.trailing_ones(), 0);\n\nlet max = u128::MAX;\nassert_eq!(max.trailing_ones(), 128);\n```",
+ "id": 11557,
"inner": {
"function": {
"generics": {
@@ -127196,18 +124981,18 @@
"name": "trailing_ones",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11569": {
+ "11558": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 142326, is_soft: false}, feature: \"uint_bit_width\"}}]"
@@ -127220,8 +125005,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the minimum number of bits required to represent `self`.\n\nThis method returns zero if `self` is zero.\n\n# Examples\n\n```\n#![feature(uint_bit_width)]\n\nassert_eq!(0_usize.bit_width(), 0);\nassert_eq!(0b111_usize.bit_width(), 3);\nassert_eq!(0b1110_usize.bit_width(), 4);\nassert_eq!(usize::MAX.bit_width(), 64);\n```",
- "id": 11569,
+ "docs": "Returns the minimum number of bits required to represent `self`.\n\nThis method returns zero if `self` is zero.\n\n# Examples\n\n```\n#![feature(uint_bit_width)]\n\nassert_eq!(0_u128.bit_width(), 0);\nassert_eq!(0b111_u128.bit_width(), 3);\nassert_eq!(0b1110_u128.bit_width(), 4);\nassert_eq!(u128::MAX.bit_width(), 128);\n```",
+ "id": 11558,
"inner": {
"function": {
"generics": {
@@ -127255,23 +125040,82 @@
"name": "bit_width",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "1157": {
+ "11559": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns `self` with only the most significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: u128 = 0b_01100100;\n\nassert_eq!(n.isolate_highest_one(), 0b_01000000);\nassert_eq!(0_u128.isolate_highest_one(), 0);\n```",
+ "id": 11559,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u128"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "isolate_highest_one",
+ "span": {
+ "begin": [
+ 1186,
+ 5
+ ],
+ "end": [
+ 1209,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1156": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1157,
+ "id": 1156,
"inner": {
"impl": {
"blanket_impl": {
@@ -127347,8 +125191,8 @@
"constraints": []
}
},
- "id": 39,
- "path": "Into"
+ "id": 197,
+ "path": "TryFrom"
}
}
}
@@ -127365,8 +125209,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -127382,8 +125226,8 @@
"constraints": []
}
},
- "id": 199,
- "path": "TryFrom"
+ "id": 198,
+ "path": "TryInto"
}
}
},
@@ -127391,18 +125235,18 @@
"name": null,
"span": {
"begin": [
- 833,
+ 811,
1
],
"end": [
- 835,
- 24
+ 813,
+ 27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "11570": {
+ "11560": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
@@ -127415,8 +125259,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `self` with only the most significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: usize = 0b_01100100;\n\nassert_eq!(n.isolate_highest_one(), 0b_01000000);\nassert_eq!(0_usize.isolate_highest_one(), 0);\n```",
- "id": 11570,
+ "docs": "Returns `self` with only the least significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: u128 = 0b_01100100;\n\nassert_eq!(n.isolate_lowest_one(), 0b_00000100);\nassert_eq!(0_u128.isolate_lowest_one(), 0);\n```",
+ "id": 11560,
"inner": {
"function": {
"generics": {
@@ -127441,30 +125285,30 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
"links": {},
- "name": "isolate_highest_one",
+ "name": "isolate_lowest_one",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11571": {
+ "11561": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
},
{
"must_use": {
@@ -127474,8 +125318,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `self` with only the least significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: usize = 0b_01100100;\n\nassert_eq!(n.isolate_lowest_one(), 0b_00000100);\nassert_eq!(0_usize.isolate_lowest_one(), 0);\n```",
- "id": 11571,
+ "docs": "Returns the index of the highest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_u128.highest_one(), None);\nassert_eq!(0x1_u128.highest_one(), Some(0));\nassert_eq!(0x10_u128.highest_one(), Some(4));\nassert_eq!(0x1f_u128.highest_one(), Some(4));\n```",
+ "id": 11561,
"inner": {
"function": {
"generics": {
@@ -127500,27 +125344,42 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "isolate_lowest_one",
+ "name": "highest_one",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11572": {
+ "11562": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
@@ -127533,8 +125392,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the index of the highest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_usize.highest_one(), None);\nassert_eq!(0x1_usize.highest_one(), Some(0));\nassert_eq!(0x10_usize.highest_one(), Some(4));\nassert_eq!(0x1f_usize.highest_one(), Some(4));\n```",
- "id": 11572,
+ "docs": "Returns the index of the lowest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_u128.lowest_one(), None);\nassert_eq!(0x1_u128.lowest_one(), Some(0));\nassert_eq!(0x10_u128.lowest_one(), Some(4));\nassert_eq!(0x1f_u128.lowest_one(), Some(0));\n```",
+ "id": 11562,
"inner": {
"function": {
"generics": {
@@ -127580,24 +125439,27 @@
}
},
"links": {},
- "name": "highest_one",
+ "name": "lowest_one",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11573": {
+ "11563": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\"}}]"
},
{
"must_use": {
@@ -127607,8 +125469,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the index of the lowest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_usize.lowest_one(), None);\nassert_eq!(0x1_usize.lowest_one(), Some(0));\nassert_eq!(0x10_usize.lowest_one(), Some(4));\nassert_eq!(0x1f_usize.lowest_one(), Some(0));\n```",
- "id": 11573,
+ "docs": "Returns the bit pattern of `self` reinterpreted as a signed integer of the same size.\n\nThis produces the same result as an `as` cast, but ensures that the bit-width remains\nthe same.\n\n# Examples\n\n```\nlet n = u128::MAX;\n\nassert_eq!(n.cast_signed(), -1i128);\n```",
+ "id": 11563,
"inner": {
"function": {
"generics": {
@@ -127633,48 +125495,33 @@
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "primitive": "u32"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "i128"
}
}
}
},
"links": {},
- "name": "lowest_one",
+ "name": "cast_signed",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11574": {
+ "11564": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -127684,8 +125531,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the bit pattern of `self` reinterpreted as a signed integer of the same size.\n\nThis produces the same result as an `as` cast, but ensures that the bit-width remains\nthe same.\n\n# Examples\n\n```\nlet n = usize::MAX;\n\nassert_eq!(n.cast_signed(), -1isize);\n```",
- "id": 11574,
+ "docs": "Shifts the bits to the left by a specified amount, `n`,\nwrapping the truncated bits to the end of the resulting integer.\n\nPlease note this isn't the same operation as the `<<` shifting operator!\n\n# Examples\n\n```\nlet n = 0x13f40000000000000000000000004f76u128;\nlet m = 0x4f7613f4;\n\nassert_eq!(n.rotate_left(16), m);\n```",
+ "id": 11564,
"inner": {
"function": {
"generics": {
@@ -127706,31 +125553,37 @@
{
"generic": "Self"
}
+ ],
+ [
+ "n",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "isize"
+ "primitive": "u128"
}
}
}
},
"links": {},
- "name": "cast_signed",
+ "name": "rotate_left",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11575": {
+ "11565": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
@@ -127746,8 +125599,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts the bits to the left by a specified amount, `n`,\nwrapping the truncated bits to the end of the resulting integer.\n\nPlease note this isn't the same operation as the `<<` shifting operator!\n\n# Examples\n\n```\nlet n = 0xaa00000000006e1usize;\nlet m = 0x6e10aa;\n\nassert_eq!(n.rotate_left(12), m);\n```",
- "id": 11575,
+ "docs": "Shifts the bits to the right by a specified amount, `n`,\nwrapping the truncated bits to the beginning of the resulting\ninteger.\n\nPlease note this isn't the same operation as the `>>` shifting operator!\n\n# Examples\n\n```\nlet n = 0x4f7613f4u128;\nlet m = 0x13f40000000000000000000000004f76;\n\nassert_eq!(n.rotate_right(16), m);\n```",
+ "id": 11565,
"inner": {
"function": {
"generics": {
@@ -127778,33 +125631,33 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
"links": {},
- "name": "rotate_left",
+ "name": "rotate_right",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11576": {
+ "11566": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 145686, is_soft: false}, feature: \"funnel_shifts\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145686, is_soft: false}, feature: \"funnel_shifts\"}}]"
},
{
"must_use": {
@@ -127814,8 +125667,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts the bits to the right by a specified amount, `n`,\nwrapping the truncated bits to the beginning of the resulting\ninteger.\n\nPlease note this isn't the same operation as the `>>` shifting operator!\n\n# Examples\n\n```\nlet n = 0x6e10aausize;\nlet m = 0xaa00000000006e1;\n\nassert_eq!(n.rotate_right(12), m);\n```",
- "id": 11576,
+ "docs": "Performs a left funnel shift (concatenates `self` with `rhs`, with `self`\nmaking up the most significant half, then shifts the combined value left\nby `n`, and most significant half is extracted to produce the result).\n\nPlease note this isn't the same operation as the `<<` shifting operator or\n[`rotate_left`](Self::rotate_left), although `a.funnel_shl(a, n)` is *equivalent*\nto `a.rotate_left(n)`.\n\n# Panics\n\nIf `n` is greater than or equal to the number of bits in `self`\n\n# Examples\n\nBasic usage:\n\n```\n#![feature(funnel_shifts)]\nlet a = 0x13f40000000000000000000000004f76u128;\nlet b = 0x2fe78e45983acd98039000008736273u128;\nlet m = 0x4f7602fe;\n\nassert_eq!(a.funnel_shl(b, 16), m);\n```",
+ "id": 11566,
"inner": {
"function": {
"generics": {
@@ -127837,6 +125690,12 @@
"generic": "Self"
}
],
+ [
+ "rhs",
+ {
+ "primitive": "u128"
+ }
+ ],
[
"n",
{
@@ -127846,33 +125705,35 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
- "links": {},
- "name": "rotate_right",
+ "links": {
+ "Self::rotate_left": 11564
+ },
+ "name": "funnel_shl",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11577": {
+ "11567": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 145686, is_soft: false}, feature: \"funnel_shifts\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145686, is_soft: false}, feature: \"funnel_shifts\"}}]"
},
{
"must_use": {
@@ -127882,8 +125743,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Reverses the byte order of the integer.\n\n# Examples\n\n```\nlet n = 0x1234567890123456usize;\nlet m = n.swap_bytes();\n\nassert_eq!(m, 0x5634129078563412);\n```",
- "id": 11577,
+ "docs": "Performs a right funnel shift (concatenates `self` and `rhs`, with `self`\nmaking up the most significant half, then shifts the combined value right\nby `n`, and least significant half is extracted to produce the result).\n\nPlease note this isn't the same operation as the `>>` shifting operator or\n[`rotate_right`](Self::rotate_right), although `a.funnel_shr(a, n)` is *equivalent*\nto `a.rotate_right(n)`.\n\n# Panics\n\nIf `n` is greater than or equal to the number of bits in `self`\n\n# Examples\n\nBasic usage:\n\n```\n#![feature(funnel_shifts)]\nlet a = 0x13f40000000000000000000000004f76u128;\nlet b = 0x2fe78e45983acd98039000008736273u128;\nlet m = 0x4f7602fe78e45983acd9803900000873;\n\nassert_eq!(a.funnel_shr(b, 16), m);\n```",
+ "id": 11567,
"inner": {
"function": {
"generics": {
@@ -127904,37 +125765,51 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u128"
+ }
+ ],
+ [
+ "n",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
- "links": {},
- "name": "swap_bytes",
+ "links": {
+ "Self::rotate_right": 11565
+ },
+ "name": "funnel_shr",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11578": {
+ "11568": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -127944,8 +125819,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\n second least-significant bit becomes second most-significant bit, etc.\n\n# Examples\n\n```\nlet n = 0x1234567890123456usize;\nlet m = n.reverse_bits();\n\nassert_eq!(m, 0x6a2c48091e6a2c48);\nassert_eq!(0, 0usize.reverse_bits());\n```",
- "id": 11578,
+ "docs": "Reverses the byte order of the integer.\n\n# Examples\n\n```\nlet n = 0x12345678901234567890123456789012u128;\nlet m = n.swap_bytes();\n\nassert_eq!(m, 0x12907856341290785634129078563412);\n```",
+ "id": 11568,
"inner": {
"function": {
"generics": {
@@ -127970,44 +125845,44 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
"links": {},
- "name": "reverse_bits",
+ "name": "swap_bytes",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11579": {
+ "11569": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\"}}]"
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts an integer from big endian to the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Ausize;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(usize::from_be(n), n)\n} else {\n assert_eq!(usize::from_be(n), n.swap_bytes())\n}\n```",
- "id": 11579,
+ "docs": "Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\n second least-significant bit becomes second most-significant bit, etc.\n\n# Examples\n\n```\nlet n = 0x12345678901234567890123456789012u128;\nlet m = n.reverse_bits();\n\nassert_eq!(m, 0x48091e6a2c48091e6a2c48091e6a2c48);\nassert_eq!(0, 0u128.reverse_bits());\n```",
+ "id": 11569,
"inner": {
"function": {
"generics": {
@@ -128024,40 +125899,40 @@
"sig": {
"inputs": [
[
- "x",
+ "self",
{
- "primitive": "usize"
+ "generic": "Self"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
"links": {},
- "name": "from_be",
+ "name": "reverse_bits",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "1158": {
+ "1157": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1158,
+ "id": 1157,
"inner": {
"impl": {
"blanket_impl": {
@@ -128100,30 +125975,48 @@
}
},
"name": "T"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "U"
}
],
"where_predicates": [
{
"bound_predicate": {
"bounds": [
- {
- "outlives": "'static"
- },
{
"trait_bound": {
"generic_params": [],
- "modifier": "maybe",
+ "modifier": "none",
"trait": {
- "args": null,
- "id": 3,
- "path": "Sized"
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "T"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 39,
+ "path": "Into"
}
}
}
],
"generic_params": [],
"type": {
- "generic": "T"
+ "generic": "U"
}
}
}
@@ -128133,13 +126026,25 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
- "args": null,
- "id": 341,
- "path": "Any"
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "U"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 197,
+ "path": "TryFrom"
}
}
},
@@ -128147,18 +126052,18 @@
"name": null,
"span": {
"begin": [
- 138,
+ 827,
1
],
"end": [
- 138,
- 36
+ 829,
+ 24
],
- "filename": "checkouts/rust/library/core/src/any.rs"
+ "filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "11580": {
+ "11570": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
@@ -128174,8 +126079,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts an integer from little endian to the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Ausize;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(usize::from_le(n), n)\n} else {\n assert_eq!(usize::from_le(n), n.swap_bytes())\n}\n```",
- "id": 11580,
+ "docs": "Converts an integer from big endian to the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au128;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(u128::from_be(n), n)\n} else {\n assert_eq!(u128::from_be(n), n.swap_bytes())\n}\n```",
+ "id": 11570,
"inner": {
"function": {
"generics": {
@@ -128194,13 +126099,75 @@
[
"x",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "from_be",
+ "span": {
+ "begin": [
+ 1186,
+ 5
+ ],
+ "end": [
+ 1209,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11571": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": null
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Converts an integer from little endian to the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au128;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(u128::from_le(n), n)\n} else {\n assert_eq!(u128::from_le(n), n.swap_bytes())\n}\n```",
+ "id": 11571,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "x",
+ {
+ "primitive": "u128"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u128"
}
}
}
@@ -128209,18 +126176,18 @@
"name": "from_le",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11581": {
+ "11572": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
@@ -128236,8 +126203,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts `self` to big endian from the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Ausize;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(n.to_be(), n)\n} else {\n assert_eq!(n.to_be(), n.swap_bytes())\n}\n```",
- "id": 11581,
+ "docs": "Converts `self` to big endian from the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au128;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(n.to_be(), n)\n} else {\n assert_eq!(n.to_be(), n.swap_bytes())\n}\n```",
+ "id": 11572,
"inner": {
"function": {
"generics": {
@@ -128262,7 +126229,7 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
@@ -128271,18 +126238,18 @@
"name": "to_be",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11582": {
+ "11573": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
@@ -128298,8 +126265,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Converts `self` to little endian from the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Ausize;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(n.to_le(), n)\n} else {\n assert_eq!(n.to_le(), n.swap_bytes())\n}\n```",
- "id": 11582,
+ "docs": "Converts `self` to little endian from the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Au128;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(n.to_le(), n)\n} else {\n assert_eq!(n.to_le(), n.swap_bytes())\n}\n```",
+ "id": 11573,
"inner": {
"function": {
"generics": {
@@ -128324,7 +126291,7 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
@@ -128333,18 +126300,18 @@
"name": "to_le",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11583": {
+ "11574": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
@@ -128360,8 +126327,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer addition. Computes `self + rhs`, returning `None`\nif overflow occurred.\n\n# Examples\n\n```\nassert_eq!((usize::MAX - 2).checked_add(1), Some(usize::MAX - 1));\nassert_eq!((usize::MAX - 2).checked_add(3), None);\n```",
- "id": 11583,
+ "docs": "Checked integer addition. Computes `self + rhs`, returning `None`\nif overflow occurred.\n\n# Examples\n\n```\nassert_eq!((u128::MAX - 2).checked_add(1), Some(u128::MAX - 1));\nassert_eq!((u128::MAX - 2).checked_add(3), None);\n```",
+ "id": 11574,
"inner": {
"function": {
"generics": {
@@ -128386,7 +126353,7 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
@@ -128398,7 +126365,7 @@
"args": [
{
"type": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
],
@@ -128416,24 +126383,24 @@
"name": "checked_add",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11584": {
+ "11575": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -128446,8 +126413,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer addition. Computes `self + rhs`, panicking\nif overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((usize::MAX - 2).strict_add(1), usize::MAX - 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (usize::MAX - 2).strict_add(3);\n```",
- "id": 11584,
+ "docs": "Strict integer addition. Computes `self + rhs`, panicking\nif overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((u128::MAX - 2).strict_add(1), u128::MAX - 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (u128::MAX - 2).strict_add(3);\n```",
+ "id": 11575,
"inner": {
"function": {
"generics": {
@@ -128472,13 +126439,13 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
@@ -128487,18 +126454,18 @@
"name": "strict_add",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11585": {
+ "11576": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
@@ -128514,8 +126481,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) addition. Computes `self + rhs`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(200usize.wrapping_add(55), 255);\nassert_eq!(200usize.wrapping_add(usize::MAX), 199);\n```",
- "id": 11585,
+ "docs": "Wrapping (modular) addition. Computes `self + rhs`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(200u128.wrapping_add(55), 255);\nassert_eq!(200u128.wrapping_add(u128::MAX), 199);\n```",
+ "id": 11576,
"inner": {
"function": {
"generics": {
@@ -128540,13 +126507,13 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
@@ -128555,18 +126522,18 @@
"name": "wrapping_add",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11586": {
+ "11577": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
@@ -128585,8 +126552,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer addition. Computes `self + rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_add(y)` is semantically equivalent to calling\n`x.`[`checked_add`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_add`].\n\n# Safety\n\nThis results in undefined behavior when\n`self + rhs > usize::MAX` or `self + rhs < usize::MIN`,\ni.e. when [`checked_add`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_add`]: usize::checked_add\n[`wrapping_add`]: usize::wrapping_add",
- "id": 11586,
+ "docs": "Unchecked integer addition. Computes `self + rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_add(y)` is semantically equivalent to calling\n`x.`[`checked_add`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_add`].\n\n# Safety\n\nThis results in undefined behavior when\n`self + rhs > u128::MAX` or `self + rhs < u128::MIN`,\ni.e. when [`checked_add`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_add`]: u128::checked_add\n[`wrapping_add`]: u128::wrapping_add",
+ "id": 11577,
"inner": {
"function": {
"generics": {
@@ -128611,36 +126578,36 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
"links": {
- "usize::checked_add": 11583,
- "usize::wrapping_add": 11585
+ "u128::checked_add": 11574,
+ "u128::wrapping_add": 11576
},
"name": "unchecked_add",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11587": {
+ "11578": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
@@ -128656,8 +126623,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked addition with a signed integer. Computes `self + rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1usize.checked_add_signed(2), Some(3));\nassert_eq!(1usize.checked_add_signed(-2), None);\nassert_eq!((usize::MAX - 2).checked_add_signed(3), None);\n```",
- "id": 11587,
+ "docs": "Checked addition with a signed integer. Computes `self + rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1u128.checked_add_signed(2), Some(3));\nassert_eq!(1u128.checked_add_signed(-2), None);\nassert_eq!((u128::MAX - 2).checked_add_signed(3), None);\n```",
+ "id": 11578,
"inner": {
"function": {
"generics": {
@@ -128682,7 +126649,7 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "i128"
}
]
],
@@ -128694,7 +126661,7 @@
"args": [
{
"type": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
],
@@ -128712,24 +126679,24 @@
"name": "checked_add_signed",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11588": {
+ "11579": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -128742,8 +126709,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict addition with a signed integer. Computes `self + rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1usize.strict_add_signed(2), 3);\n```\n\nThe following panic because of overflow:\n\n```should_panic\nlet _ = 1usize.strict_add_signed(-2);\n```\n\n```should_panic\nlet _ = (usize::MAX - 2).strict_add_signed(3);\n```",
- "id": 11588,
+ "docs": "Strict addition with a signed integer. Computes `self + rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1u128.strict_add_signed(2), 3);\n```\n\nThe following panic because of overflow:\n\n```should_panic\nlet _ = 1u128.strict_add_signed(-2);\n```\n\n```should_panic\nlet _ = (u128::MAX - 2).strict_add_signed(3);\n```",
+ "id": 11579,
"inner": {
"function": {
"generics": {
@@ -128768,13 +126735,13 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
@@ -128783,18 +126750,124 @@
"name": "strict_add_signed",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11589": {
+ "1158": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1158,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 776,
+ "path": "Entry"
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "outlives": "'static"
+ },
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "maybe",
+ "trait": {
+ "args": null,
+ "id": 3,
+ "path": "Sized"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "T"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 336
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 339,
+ "path": "Any"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 138,
+ 1
+ ],
+ "end": [
+ 138,
+ 36
+ ],
+ "filename": "checkouts/rust/library/core/src/any.rs"
+ },
+ "visibility": "default"
+ },
+ "11580": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
@@ -128810,8 +126883,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer subtraction. Computes `self - rhs`, returning\n`None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1usize.checked_sub(1), Some(0));\nassert_eq!(0usize.checked_sub(1), None);\n```",
- "id": 11589,
+ "docs": "Checked integer subtraction. Computes `self - rhs`, returning\n`None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1u128.checked_sub(1), Some(0));\nassert_eq!(0u128.checked_sub(1), None);\n```",
+ "id": 11580,
"inner": {
"function": {
"generics": {
@@ -128836,7 +126909,7 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
@@ -128848,7 +126921,7 @@
"args": [
{
"type": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
],
@@ -128866,109 +126939,24 @@
"name": "checked_sub",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "1159": {
- "attrs": [],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 1159,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
- }
- ],
- [
- "f",
- {
- "borrowed_ref": {
- "is_mutable": true,
- "lifetime": null,
- "type": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'_"
- }
- ],
- "constraints": []
- }
- },
- "id": 343,
- "path": "fmt::Formatter"
- }
- }
- }
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "resolved_path": {
- "args": null,
- "id": 344,
- "path": "fmt::Result"
- }
- }
- }
- }
- },
- "links": {},
- "name": "fmt",
- "span": {
- "begin": [
- 1803,
- 5
- ],
- "end": [
- 1808,
- 6
- ],
- "filename": "std/src/collections/hash/map.rs"
- },
- "visibility": "default"
- },
- "11590": {
+ "11581": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -128981,8 +126969,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer subtraction. Computes `self - rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1usize.strict_sub(1), 0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0usize.strict_sub(1);\n```",
- "id": 11590,
+ "docs": "Strict integer subtraction. Computes `self - rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1u128.strict_sub(1), 0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0u128.strict_sub(1);\n```",
+ "id": 11581,
"inner": {
"function": {
"generics": {
@@ -129007,13 +126995,13 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
@@ -129022,18 +127010,18 @@
"name": "strict_sub",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11591": {
+ "11582": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
@@ -129049,8 +127037,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) subtraction. Computes `self - rhs`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(100usize.wrapping_sub(100), 0);\nassert_eq!(100usize.wrapping_sub(usize::MAX), 101);\n```",
- "id": 11591,
+ "docs": "Wrapping (modular) subtraction. Computes `self - rhs`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(100u128.wrapping_sub(100), 0);\nassert_eq!(100u128.wrapping_sub(u128::MAX), 101);\n```",
+ "id": 11582,
"inner": {
"function": {
"generics": {
@@ -129075,13 +127063,13 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
@@ -129090,18 +127078,18 @@
"name": "wrapping_sub",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11592": {
+ "11583": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
@@ -129120,8 +127108,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked integer subtraction. Computes `self - rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_sub(y)` is semantically equivalent to calling\n`x.`[`checked_sub`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_sub`].\n\nIf you find yourself writing code like this:\n\n```\n# let foo = 30_u32;\n# let bar = 20;\nif foo >= bar {\n // SAFETY: just checked it will not overflow\n let diff = unsafe { foo.unchecked_sub(bar) };\n // ... use diff ...\n}\n```\n\nConsider changing it to\n\n```\n# let foo = 30_u32;\n# let bar = 20;\nif let Some(diff) = foo.checked_sub(bar) {\n // ... use diff ...\n}\n```\n\nAs that does exactly the same thing -- including telling the optimizer\nthat the subtraction cannot overflow -- but avoids needing `unsafe`.\n\n# Safety\n\nThis results in undefined behavior when\n`self - rhs > usize::MAX` or `self - rhs < usize::MIN`,\ni.e. when [`checked_sub`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_sub`]: usize::checked_sub\n[`wrapping_sub`]: usize::wrapping_sub",
- "id": 11592,
+ "docs": "Unchecked integer subtraction. Computes `self - rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_sub(y)` is semantically equivalent to calling\n`x.`[`checked_sub`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_sub`].\n\nIf you find yourself writing code like this:\n\n```\n# let foo = 30_u32;\n# let bar = 20;\nif foo >= bar {\n // SAFETY: just checked it will not overflow\n let diff = unsafe { foo.unchecked_sub(bar) };\n // ... use diff ...\n}\n```\n\nConsider changing it to\n\n```\n# let foo = 30_u32;\n# let bar = 20;\nif let Some(diff) = foo.checked_sub(bar) {\n // ... use diff ...\n}\n```\n\nAs that does exactly the same thing -- including telling the optimizer\nthat the subtraction cannot overflow -- but avoids needing `unsafe`.\n\n# Safety\n\nThis results in undefined behavior when\n`self - rhs > u128::MAX` or `self - rhs < u128::MIN`,\ni.e. when [`checked_sub`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_sub`]: u128::checked_sub\n[`wrapping_sub`]: u128::wrapping_sub",
+ "id": 11583,
"inner": {
"function": {
"generics": {
@@ -129146,36 +127134,36 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
"links": {
- "usize::checked_sub": 11589,
- "usize::wrapping_sub": 11591
+ "u128::checked_sub": 11580,
+ "u128::wrapping_sub": 11582
},
"name": "unchecked_sub",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11593": {
+ "11584": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
@@ -129191,8 +127179,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked subtraction with a signed integer. Computes `self - rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1usize.checked_sub_signed(2), None);\nassert_eq!(1usize.checked_sub_signed(-2), Some(3));\nassert_eq!((usize::MAX - 2).checked_sub_signed(-4), None);\n```",
- "id": 11593,
+ "docs": "Checked subtraction with a signed integer. Computes `self - rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1u128.checked_sub_signed(2), None);\nassert_eq!(1u128.checked_sub_signed(-2), Some(3));\nassert_eq!((u128::MAX - 2).checked_sub_signed(-4), None);\n```",
+ "id": 11584,
"inner": {
"function": {
"generics": {
@@ -129217,7 +127205,7 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "i128"
}
]
],
@@ -129229,7 +127217,7 @@
"args": [
{
"type": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
],
@@ -129247,24 +127235,24 @@
"name": "checked_sub_signed",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11594": {
+ "11585": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -129277,8 +127265,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict subtraction with a signed integer. Computes `self - rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(3usize.strict_sub_signed(2), 1);\n```\n\nThe following panic because of overflow:\n\n```should_panic\nlet _ = 1usize.strict_sub_signed(2);\n```\n\n```should_panic\nlet _ = (usize::MAX).strict_sub_signed(-1);\n```",
- "id": 11594,
+ "docs": "Strict subtraction with a signed integer. Computes `self - rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(3u128.strict_sub_signed(2), 1);\n```\n\nThe following panic because of overflow:\n\n```should_panic\nlet _ = 1u128.strict_sub_signed(2);\n```\n\n```should_panic\nlet _ = (u128::MAX).strict_sub_signed(-1);\n```",
+ "id": 11585,
"inner": {
"function": {
"generics": {
@@ -129303,13 +127291,13 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
@@ -129318,30 +127306,30 @@
"name": "strict_sub_signed",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11595": {
+ "11586": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"unsigned_signed_diff\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_signed_diff\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"unsigned_signed_diff\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_signed_diff\"}}]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer subtraction. Computes `self - rhs` and checks if the result fits into an [`isize`], returning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(10usize.checked_signed_diff(2), Some(8));\nassert_eq!(2usize.checked_signed_diff(10), Some(-8));\nassert_eq!(usize::MAX.checked_signed_diff(isize::MAX as usize), None);\nassert_eq!((isize::MAX as usize).checked_signed_diff(usize::MAX), Some(isize::MIN));\nassert_eq!((isize::MAX as usize + 1).checked_signed_diff(0), None);\nassert_eq!(usize::MAX.checked_signed_diff(usize::MAX), Some(0));\n```",
- "id": 11595,
+ "docs": "Checked integer subtraction. Computes `self - rhs` and checks if the result fits into an [`i128`], returning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(10u128.checked_signed_diff(2), Some(8));\nassert_eq!(2u128.checked_signed_diff(10), Some(-8));\nassert_eq!(u128::MAX.checked_signed_diff(i128::MAX as u128), None);\nassert_eq!((i128::MAX as u128).checked_signed_diff(u128::MAX), Some(i128::MIN));\nassert_eq!((i128::MAX as u128 + 1).checked_signed_diff(0), None);\nassert_eq!(u128::MAX.checked_signed_diff(u128::MAX), Some(0));\n```",
+ "id": 11586,
"inner": {
"function": {
"generics": {
@@ -129366,7 +127354,7 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
@@ -129378,7 +127366,7 @@
"args": [
{
"type": {
- "primitive": "isize"
+ "primitive": "i128"
}
}
],
@@ -129393,23 +127381,23 @@
}
},
"links": {
- "`isize`": 11416
+ "`i128`": 4828
},
"name": "checked_signed_diff",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11596": {
+ "11587": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
@@ -129425,8 +127413,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer multiplication. Computes `self * rhs`, returning\n`None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(5usize.checked_mul(1), Some(5));\nassert_eq!(usize::MAX.checked_mul(2), None);\n```",
- "id": 11596,
+ "docs": "Checked integer multiplication. Computes `self * rhs`, returning\n`None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(5u128.checked_mul(1), Some(5));\nassert_eq!(u128::MAX.checked_mul(2), None);\n```",
+ "id": 11587,
"inner": {
"function": {
"generics": {
@@ -129451,7 +127439,7 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
@@ -129463,7 +127451,7 @@
"args": [
{
"type": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
],
@@ -129481,24 +127469,24 @@
"name": "checked_mul",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11597": {
+ "11588": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -129511,8 +127499,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer multiplication. Computes `self * rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(5usize.strict_mul(1), 5);\n```\n\nThe following panics because of overflow:\n\n``` should_panic\nlet _ = usize::MAX.strict_mul(2);\n```",
- "id": 11597,
+ "docs": "Strict integer multiplication. Computes `self * rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(5u128.strict_mul(1), 5);\n```\n\nThe following panics because of overflow:\n\n``` should_panic\nlet _ = u128::MAX.strict_mul(2);\n```",
+ "id": 11588,
"inner": {
"function": {
"generics": {
@@ -129537,13 +127525,13 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
@@ -129552,18 +127540,18 @@
"name": "strict_mul",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11598": {
+ "11589": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
@@ -129580,7 +127568,7 @@
"crate_id": 1,
"deprecation": null,
"docs": "Wrapping (modular) multiplication. Computes `self *\nrhs`, wrapping around at the boundary of the type.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u8` is used.\n\n```\nassert_eq!(10u8.wrapping_mul(12), 120);\nassert_eq!(25u8.wrapping_mul(12), 44);\n```",
- "id": 11598,
+ "id": 11589,
"inner": {
"function": {
"generics": {
@@ -129605,13 +127593,13 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
@@ -129620,38 +127608,23 @@
"name": "wrapping_mul",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11599": {
- "attrs": [
- {
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
- },
- {
- "other": "#[attr = TrackCaller]"
- }
- ],
- "crate_id": 1,
+ "1159": {
+ "attrs": [],
+ "crate_id": 0,
"deprecation": null,
- "docs": "Unchecked integer multiplication. Computes `self * rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_mul(y)` is semantically equivalent to calling\n`x.`[`checked_mul`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_mul`].\n\n# Safety\n\nThis results in undefined behavior when\n`self * rhs > usize::MAX` or `self * rhs < usize::MIN`,\ni.e. when [`checked_mul`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_mul`]: usize::checked_mul\n[`wrapping_mul`]: usize::wrapping_mul",
- "id": 11599,
+ "docs": null,
+ "id": 1159,
"inner": {
"function": {
"generics": {
@@ -129662,203 +127635,150 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
- "is_unsafe": true
+ "is_const": false,
+ "is_unsafe": false
},
"sig": {
"inputs": [
[
"self",
{
- "generic": "Self"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
}
],
[
- "rhs",
+ "f",
{
- "primitive": "usize"
- }
- ]
- ],
- "is_c_variadic": false,
+ "borrowed_ref": {
+ "is_mutable": true,
+ "lifetime": null,
+ "type": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'_"
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 341,
+ "path": "fmt::Formatter"
+ }
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "resolved_path": {
+ "args": null,
+ "id": 342,
+ "path": "fmt::Result"
+ }
}
}
}
},
- "links": {
- "usize::checked_mul": 11596,
- "usize::wrapping_mul": 11598
- },
- "name": "unchecked_mul",
+ "links": {},
+ "name": "fmt",
"span": {
"begin": [
- 1248,
+ 1803,
5
],
"end": [
- 1266,
+ 1808,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/collections/hash/map.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
- "116": {
+ "11590": {
"attrs": [
{
- "other": "#[doc(no_inline)]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"builtin_macro_prelude\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 116,
- "inner": {
- "use": {
- "id": 117,
- "is_glob": false,
- "name": "Hash",
- "source": "core::prelude::v1::Hash"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 52,
- 63
- ],
- "end": [
- 52,
- 67
- ],
- "filename": "std/src/prelude/v1.rs"
- },
- "visibility": "public"
- },
- "1160": {
- "attrs": [
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ },
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 12, patch: 0})}, feature: \"debug_hash_map\"}}]"
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
- "crate_id": 0,
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 1160,
+ "docs": "Unchecked integer multiplication. Computes `self * rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_mul(y)` is semantically equivalent to calling\n`x.`[`checked_mul`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_mul`].\n\n# Safety\n\nThis results in undefined behavior when\n`self * rhs > u128::MAX` or `self * rhs < u128::MIN`,\ni.e. when [`checked_mul`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_mul`]: u128::checked_mul\n[`wrapping_mul`]: u128::wrapping_mul",
+ "id": 11590,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'_"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 776,
- "path": "Entry"
- }
- },
+ "function": {
"generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 346,
- "path": "Debug"
- }
- }
- }
- ],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "K"
- },
- {
- "kind": {
- "type": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 346,
- "path": "Debug"
- }
- }
- }
- ],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "V"
- }
- ],
+ "params": [],
"where_predicates": []
},
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 1159
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": null,
- "id": 346,
- "path": "Debug"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": true
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u128"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u128"
+ }
}
}
},
- "links": {},
- "name": null,
+ "links": {
+ "u128::checked_mul": 11587,
+ "u128::wrapping_mul": 11589
+ },
+ "name": "unchecked_mul",
"span": {
"begin": [
- 1802,
- 1
+ 1186,
+ 5
],
"end": [
- 1809,
- 2
+ 1209,
+ 6
],
- "filename": "std/src/collections/hash/map.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "11600": {
+ "11591": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
@@ -129874,8 +127794,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division. Computes `self / rhs`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(128usize.checked_div(2), Some(64));\nassert_eq!(1usize.checked_div(0), None);\n```",
- "id": 11600,
+ "docs": "Checked integer division. Computes `self / rhs`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(128u128.checked_div(2), Some(64));\nassert_eq!(1u128.checked_div(0), None);\n```",
+ "id": 11591,
"inner": {
"function": {
"generics": {
@@ -129900,7 +127820,7 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
@@ -129912,7 +127832,7 @@
"args": [
{
"type": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
],
@@ -129930,24 +127850,24 @@
"name": "checked_div",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11601": {
+ "11592": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -129960,8 +127880,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer division. Computes `self / rhs`.\n\nStrict division on unsigned types is just normal division. There's no\nway overflow could ever happen. This function exists so that all\noperations are accounted for in the strict operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100usize.strict_div(10), 10);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1usize).strict_div(0);\n```",
- "id": 11601,
+ "docs": "Strict integer division. Computes `self / rhs`.\n\nStrict division on unsigned types is just normal division. There's no\nway overflow could ever happen. This function exists so that all\noperations are accounted for in the strict operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u128.strict_div(10), 10);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1u128).strict_div(0);\n```",
+ "id": 11592,
"inner": {
"function": {
"generics": {
@@ -129986,13 +127906,13 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
@@ -130001,18 +127921,18 @@
"name": "strict_div",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11602": {
+ "11593": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
@@ -130028,8 +127948,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked Euclidean division. Computes `self.div_euclid(rhs)`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(128usize.checked_div_euclid(2), Some(64));\nassert_eq!(1usize.checked_div_euclid(0), None);\n```",
- "id": 11602,
+ "docs": "Checked Euclidean division. Computes `self.div_euclid(rhs)`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(128u128.checked_div_euclid(2), Some(64));\nassert_eq!(1u128.checked_div_euclid(0), None);\n```",
+ "id": 11593,
"inner": {
"function": {
"generics": {
@@ -130054,7 +127974,7 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
@@ -130066,7 +127986,7 @@
"args": [
{
"type": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
],
@@ -130084,24 +128004,24 @@
"name": "checked_div_euclid",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11603": {
+ "11594": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -130114,8 +128034,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict Euclidean division. Computes `self.div_euclid(rhs)`.\n\nStrict division on unsigned types is just normal division. There's no\nway overflow could ever happen. This function exists so that all\noperations are accounted for in the strict operations. Since, for the\npositive integers, all common definitions of division are equal, this\nis exactly equal to `self.strict_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100usize.strict_div_euclid(10), 10);\n```\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1usize).strict_div_euclid(0);\n```",
- "id": 11603,
+ "docs": "Strict Euclidean division. Computes `self.div_euclid(rhs)`.\n\nStrict division on unsigned types is just normal division. There's no\nway overflow could ever happen. This function exists so that all\noperations are accounted for in the strict operations. Since, for the\npositive integers, all common definitions of division are equal, this\nis exactly equal to `self.strict_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u128.strict_div_euclid(10), 10);\n```\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1u128).strict_div_euclid(0);\n```",
+ "id": 11594,
"inner": {
"function": {
"generics": {
@@ -130140,13 +128060,13 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
@@ -130155,18 +128075,18 @@
"name": "strict_div_euclid",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11604": {
+ "11595": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
@@ -130179,8 +128099,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division without remainder. Computes `self / rhs`,\nreturning `None` if `rhs == 0` or if `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64usize.checked_exact_div(2), Some(32));\nassert_eq!(64usize.checked_exact_div(32), Some(2));\nassert_eq!(64usize.checked_exact_div(0), None);\nassert_eq!(65usize.checked_exact_div(2), None);\n```",
- "id": 11604,
+ "docs": "Checked integer division without remainder. Computes `self / rhs`,\nreturning `None` if `rhs == 0` or if `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64u128.checked_exact_div(2), Some(32));\nassert_eq!(64u128.checked_exact_div(32), Some(2));\nassert_eq!(64u128.checked_exact_div(0), None);\nassert_eq!(65u128.checked_exact_div(2), None);\n```",
+ "id": 11595,
"inner": {
"function": {
"generics": {
@@ -130205,7 +128125,7 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
@@ -130217,7 +128137,7 @@
"args": [
{
"type": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
],
@@ -130235,18 +128155,18 @@
"name": "checked_exact_div",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11605": {
+ "11596": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
@@ -130259,8 +128179,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer division without remainder. Computes `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs == 0` or `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64usize.exact_div(2), 32);\nassert_eq!(64usize.exact_div(32), 2);\n```\n\n```should_panic\n#![feature(exact_div)]\nlet _ = 65usize.exact_div(2);\n```",
- "id": 11605,
+ "docs": "Checked integer division without remainder. Computes `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs == 0` or `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64u128.exact_div(2), 32);\nassert_eq!(64u128.exact_div(32), 2);\n```\n\n```should_panic\n#![feature(exact_div)]\nlet _ = 65u128.exact_div(2);\n```",
+ "id": 11596,
"inner": {
"function": {
"generics": {
@@ -130285,13 +128205,13 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
@@ -130300,18 +128220,18 @@
"name": "exact_div",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11606": {
+ "11597": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
@@ -130325,7 +128245,7 @@
"crate_id": 1,
"deprecation": null,
"docs": "Unchecked integer division without remainder. Computes `self / rhs`.\n\n# Safety\n\nThis results in undefined behavior when `rhs == 0` or `self % rhs != 0`,\ni.e. when [`checked_exact_div`](Self::checked_exact_div) would return `None`.",
- "id": 11606,
+ "id": 11597,
"inner": {
"function": {
"generics": {
@@ -130350,35 +128270,35 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
"links": {
- "Self::checked_exact_div": 11604
+ "Self::checked_exact_div": 11595
},
"name": "unchecked_exact_div",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11607": {
+ "11598": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
@@ -130394,8 +128314,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked integer remainder. Computes `self % rhs`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(5usize.checked_rem(2), Some(1));\nassert_eq!(5usize.checked_rem(0), None);\n```",
- "id": 11607,
+ "docs": "Checked integer remainder. Computes `self % rhs`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(5u128.checked_rem(2), Some(1));\nassert_eq!(5u128.checked_rem(0), None);\n```",
+ "id": 11598,
"inner": {
"function": {
"generics": {
@@ -130420,7 +128340,7 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
@@ -130432,7 +128352,7 @@
"args": [
{
"type": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
],
@@ -130450,24 +128370,24 @@
"name": "checked_rem",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11608": {
+ "11599": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -130480,8 +128400,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict integer remainder. Computes `self % rhs`.\n\nStrict remainder calculation on unsigned types is just the regular\nremainder calculation. There's no way overflow could ever happen.\nThis function exists so that all operations are accounted for in the\nstrict operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100usize.strict_rem(10), 0);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5usize.strict_rem(0);\n```",
- "id": 11608,
+ "docs": "Strict integer remainder. Computes `self % rhs`.\n\nStrict remainder calculation on unsigned types is just the regular\nremainder calculation. There's no way overflow could ever happen.\nThis function exists so that all operations are accounted for in the\nstrict operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u128.strict_rem(10), 0);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5u128.strict_rem(0);\n```",
+ "id": 11599,
"inner": {
"function": {
"generics": {
@@ -130506,13 +128426,13 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
@@ -130521,18 +128441,171 @@
"name": "strict_rem",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11609": {
+ "116": {
+ "attrs": [
+ {
+ "other": "#[doc(no_inline)]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"builtin_macro_prelude\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 116,
+ "inner": {
+ "use": {
+ "id": 117,
+ "is_glob": false,
+ "name": "Ord",
+ "source": "core::prelude::v1::Ord"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 52,
+ 69
+ ],
+ "end": [
+ 52,
+ 72
+ ],
+ "filename": "std/src/prelude/v1.rs"
+ },
+ "visibility": "public"
+ },
+ "1160": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 12, patch: 0})}, feature: \"debug_hash_map\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1160,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'_"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 776,
+ "path": "Entry"
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 344,
+ "path": "Debug"
+ }
+ }
+ }
+ ],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "K"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 344,
+ "path": "Debug"
+ }
+ }
+ }
+ ],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "V"
+ }
+ ],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 1159
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 344,
+ "path": "Debug"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 1802,
+ 1
+ ],
+ "end": [
+ 1809,
+ 2
+ ],
+ "filename": "std/src/collections/hash/map.rs"
+ },
+ "visibility": "default"
+ },
+ "11600": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
@@ -130548,8 +128621,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked Euclidean modulo. Computes `self.rem_euclid(rhs)`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(5usize.checked_rem_euclid(2), Some(1));\nassert_eq!(5usize.checked_rem_euclid(0), None);\n```",
- "id": 11609,
+ "docs": "Checked Euclidean modulo. Computes `self.rem_euclid(rhs)`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(5u128.checked_rem_euclid(2), Some(1));\nassert_eq!(5u128.checked_rem_euclid(0), None);\n```",
+ "id": 11600,
"inner": {
"function": {
"generics": {
@@ -130574,7 +128647,7 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
@@ -130586,7 +128659,7 @@
"args": [
{
"type": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
],
@@ -130604,24 +128677,24 @@
"name": "checked_rem_euclid",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11610": {
+ "11601": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -130634,8 +128707,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict Euclidean modulo. Computes `self.rem_euclid(rhs)`.\n\nStrict modulo calculation on unsigned types is just the regular\nremainder calculation. There's no way overflow could ever happen.\nThis function exists so that all operations are accounted for in the\nstrict operations. Since, for the positive integers, all common\ndefinitions of division are equal, this is exactly equal to\n`self.strict_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100usize.strict_rem_euclid(10), 0);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5usize.strict_rem_euclid(0);\n```",
- "id": 11610,
+ "docs": "Strict Euclidean modulo. Computes `self.rem_euclid(rhs)`.\n\nStrict modulo calculation on unsigned types is just the regular\nremainder calculation. There's no way overflow could ever happen.\nThis function exists so that all operations are accounted for in the\nstrict operations. Since, for the positive integers, all common\ndefinitions of division are equal, this is exactly equal to\n`self.strict_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u128.strict_rem_euclid(10), 0);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5u128.strict_rem_euclid(0);\n```",
+ "id": 11601,
"inner": {
"function": {
"generics": {
@@ -130660,13 +128733,13 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
@@ -130675,18 +128748,18 @@
"name": "strict_rem_euclid",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11611": {
+ "11602": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 135758, is_soft: false}, feature: \"disjoint_bitor\",\npromotable: false}}]"
@@ -130697,8 +128770,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Same value as `self | other`, but UB if any bit position is set in both inputs.\n\nThis is a situational micro-optimization for places where you'd rather\nuse addition on some platforms and bitwise or on other platforms, based\non exactly which instructions combine better with whatever else you're\ndoing. Note that there's no reason to bother using this for places\nwhere it's clear from the operations involved that they can't overlap.\nFor example, if you're combining `u16`s into a `u32` with\n`((a as u32) << 16) | (b as u32)`, that's fine, as the backend will\nknow those sides of the `|` are disjoint without needing help.\n\n# Examples\n\n```\n#![feature(disjoint_bitor)]\n\n// SAFETY: `1` and `4` have no bits in common.\nunsafe {\n assert_eq!(1_usize.unchecked_disjoint_bitor(4), 5);\n}\n```\n\n# Safety\n\nRequires that `(self & other) == 0`, otherwise it's immediate UB.\n\nEquivalently, requires that `(self | other) == (self + other)`.",
- "id": 11611,
+ "docs": "Same value as `self | other`, but UB if any bit position is set in both inputs.\n\nThis is a situational micro-optimization for places where you'd rather\nuse addition on some platforms and bitwise or on other platforms, based\non exactly which instructions combine better with whatever else you're\ndoing. Note that there's no reason to bother using this for places\nwhere it's clear from the operations involved that they can't overlap.\nFor example, if you're combining `u16`s into a `u32` with\n`((a as u32) << 16) | (b as u32)`, that's fine, as the backend will\nknow those sides of the `|` are disjoint without needing help.\n\n# Examples\n\n```\n#![feature(disjoint_bitor)]\n\n// SAFETY: `1` and `4` have no bits in common.\nunsafe {\n assert_eq!(1_u128.unchecked_disjoint_bitor(4), 5);\n}\n```\n\n# Safety\n\nRequires that `(self & other) == 0`, otherwise it's immediate UB.\n\nEquivalently, requires that `(self | other) == (self + other)`.",
+ "id": 11602,
"inner": {
"function": {
"generics": {
@@ -130723,13 +128796,13 @@
[
"other",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
@@ -130738,18 +128811,18 @@
"name": "unchecked_disjoint_bitor",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11612": {
+ "11603": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
@@ -130768,8 +128841,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nThis method might not be optimized owing to implementation details;\n`ilog2` can produce results more efficiently for base 2, and `ilog10`\ncan produce results more efficiently for base 10.\n\n# Panics\n\nThis function will panic if `self` is zero, or if `base` is less than 2.\n\n# Examples\n\n```\nassert_eq!(5usize.ilog(5), 1);\n```",
- "id": 11612,
+ "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nThis method might not be optimized owing to implementation details;\n`ilog2` can produce results more efficiently for base 2, and `ilog10`\ncan produce results more efficiently for base 10.\n\n# Panics\n\nThis function will panic if `self` is zero, or if `base` is less than 2.\n\n# Examples\n\n```\nassert_eq!(5u128.ilog(5), 1);\n```",
+ "id": 11603,
"inner": {
"function": {
"generics": {
@@ -130794,7 +128867,7 @@
[
"base",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
@@ -130809,18 +128882,18 @@
"name": "ilog",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11613": {
+ "11604": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
@@ -130839,8 +128912,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 10 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is zero.\n\n# Example\n\n```\nassert_eq!(10usize.ilog10(), 1);\n```",
- "id": 11613,
+ "docs": "Returns the base 10 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is zero.\n\n# Example\n\n```\nassert_eq!(10u128.ilog10(), 1);\n```",
+ "id": 11604,
"inner": {
"function": {
"generics": {
@@ -130874,18 +128947,18 @@
"name": "ilog10",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11614": {
+ "11605": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
@@ -130901,8 +128974,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nReturns `None` if the number is zero, or if the base is not at least 2.\n\nThis method might not be optimized owing to implementation details;\n`checked_ilog2` can produce results more efficiently for base 2, and\n`checked_ilog10` can produce results more efficiently for base 10.\n\n# Examples\n\n```\nassert_eq!(5usize.checked_ilog(5), Some(1));\n```",
- "id": 11614,
+ "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nReturns `None` if the number is zero, or if the base is not at least 2.\n\nThis method might not be optimized owing to implementation details;\n`checked_ilog2` can produce results more efficiently for base 2, and\n`checked_ilog10` can produce results more efficiently for base 10.\n\n# Examples\n\n```\nassert_eq!(5u128.checked_ilog(5), Some(1));\n```",
+ "id": 11605,
"inner": {
"function": {
"generics": {
@@ -130927,7 +129000,7 @@
[
"base",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
@@ -130957,18 +129030,18 @@
"name": "checked_ilog",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11615": {
+ "11606": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
@@ -130984,8 +129057,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 2 logarithm of the number, rounded down.\n\nReturns `None` if the number is zero.\n\n# Examples\n\n```\nassert_eq!(2usize.checked_ilog2(), Some(1));\n```",
- "id": 11615,
+ "docs": "Returns the base 2 logarithm of the number, rounded down.\n\nReturns `None` if the number is zero.\n\n# Examples\n\n```\nassert_eq!(2u128.checked_ilog2(), Some(1));\n```",
+ "id": 11606,
"inner": {
"function": {
"generics": {
@@ -131034,18 +129107,18 @@
"name": "checked_ilog2",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11616": {
+ "11607": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
@@ -131061,8 +129134,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the base 10 logarithm of the number, rounded down.\n\nReturns `None` if the number is zero.\n\n# Examples\n\n```\nassert_eq!(10usize.checked_ilog10(), Some(1));\n```",
- "id": 11616,
+ "docs": "Returns the base 10 logarithm of the number, rounded down.\n\nReturns `None` if the number is zero.\n\n# Examples\n\n```\nassert_eq!(10u128.checked_ilog10(), Some(1));\n```",
+ "id": 11607,
"inner": {
"function": {
"generics": {
@@ -131111,18 +129184,18 @@
"name": "checked_ilog10",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11617": {
+ "11608": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
@@ -131138,8 +129211,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked negation. Computes `-self`, returning `None` unless `self ==\n0`.\n\nNote that negating any positive integer will overflow.\n\n# Examples\n\n```\nassert_eq!(0usize.checked_neg(), Some(0));\nassert_eq!(1usize.checked_neg(), None);\n```",
- "id": 11617,
+ "docs": "Checked negation. Computes `-self`, returning `None` unless `self ==\n0`.\n\nNote that negating any positive integer will overflow.\n\n# Examples\n\n```\nassert_eq!(0u128.checked_neg(), Some(0));\nassert_eq!(1u128.checked_neg(), None);\n```",
+ "id": 11608,
"inner": {
"function": {
"generics": {
@@ -131170,7 +129243,7 @@
"args": [
{
"type": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
],
@@ -131188,24 +129261,24 @@
"name": "checked_neg",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11618": {
+ "11609": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -131218,8 +129291,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict negation. Computes `-self`, panicking unless `self ==\n0`.\n\nNote that negating any positive integer will overflow.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0usize.strict_neg(), 0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 1usize.strict_neg();\n",
- "id": 11618,
+ "docs": "Strict negation. Computes `-self`, panicking unless `self ==\n0`.\n\nNote that negating any positive integer will overflow.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0u128.strict_neg(), 0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 1u128.strict_neg();\n```",
+ "id": 11609,
"inner": {
"function": {
"generics": {
@@ -131244,7 +129317,7 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
@@ -131253,18 +129326,18 @@
"name": "strict_neg",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11619": {
+ "11610": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
@@ -131280,8 +129353,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked shift left. Computes `self << rhs`, returning `None`\nif `rhs` is larger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x1usize.checked_shl(4), Some(0x10));\nassert_eq!(0x10usize.checked_shl(129), None);\nassert_eq!(0x10usize.checked_shl(63), Some(0));\n```",
- "id": 11619,
+ "docs": "Checked shift left. Computes `self << rhs`, returning `None`\nif `rhs` is larger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x1u128.checked_shl(4), Some(0x10));\nassert_eq!(0x10u128.checked_shl(129), None);\nassert_eq!(0x10u128.checked_shl(127), Some(0));\n```",
+ "id": 11610,
"inner": {
"function": {
"generics": {
@@ -131318,7 +129391,7 @@
"args": [
{
"type": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
],
@@ -131336,30 +129409,38 @@
"name": "checked_shl",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "1162": {
+ "11611": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 10, patch: 0})}, feature: \"map_entry_keys\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Inline(Hint)]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
- "crate_id": 0,
+ "crate_id": 1,
"deprecation": null,
- "docs": "Gets a reference to the key in the entry.\n\n# Examples\n\n```\nuse std::collections::HashMap;\n\nlet mut map: HashMap<&str, u32> = HashMap::new();\nmap.entry(\"poneyland\").or_insert(12);\nassert_eq!(map.entry(\"poneyland\").key(), &\"poneyland\");\n```",
- "id": 1162,
+ "docs": "Strict shift left. Computes `self << rhs`, panicking if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x1u128.strict_shl(4), 0x10);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10u128.strict_shl(129);\n```",
+ "id": 11611,
"inner": {
"function": {
"generics": {
@@ -131370,7 +129451,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -131378,51 +129459,42 @@
[
"self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "K"
- }
- }
+ "primitive": "u128"
}
}
}
},
"links": {},
- "name": "key",
+ "name": "strict_shl",
"span": {
"begin": [
- 2531,
+ 1186,
5
],
"end": [
- 2533,
+ 1209,
6
],
- "filename": "std/src/collections/hash/map.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11620": {
+ "11612": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
},
{
"must_use": {
@@ -131435,8 +129507,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict shift left. Computes `self << rhs`, panicking if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x1usize.strict_shl(4), 0x10);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10usize.strict_shl(129);\n```",
- "id": 11620,
+ "docs": "Unchecked shift left. Computes `self << rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shl`] would return `None`.\n\n[`checked_shl`]: u128::checked_shl",
+ "id": 11612,
"inner": {
"function": {
"generics": {
@@ -131448,7 +129520,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -131467,44 +129539,46 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
- "links": {},
- "name": "strict_shl",
+ "links": {
+ "u128::checked_shl": 11610
+ },
+ "name": "unchecked_shl",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11621": {
+ "11613": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked shift left. Computes `self << rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shl`] would return `None`.\n\n[`checked_shl`]: usize::checked_shl",
- "id": 11621,
+ "docs": "Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x1u128.unbounded_shl(4), 0x10);\nassert_eq!(0x1u128.unbounded_shl(129), 0);\n```",
+ "id": 11613,
"inner": {
"function": {
"generics": {
@@ -131516,7 +129590,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": true
+ "is_unsafe": false
},
"sig": {
"inputs": [
@@ -131535,35 +129609,30 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
- "links": {
- "usize::checked_shl": 11619
- },
- "name": "unchecked_shl",
+ "links": {},
+ "name": "unbounded_shl",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11622": {
+ "11614": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
@@ -131573,8 +129642,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x1usize.unbounded_shl(4), 0x10);\nassert_eq!(0x1usize.unbounded_shl(129), 0);\n```",
- "id": 11622,
+ "docs": "Exact shift left. Computes `self << rhs` as long as it can be reversed losslessly.\n\nReturns `None` if any non-zero bits would be shifted out or if `rhs` >=\n`u128::BITS`.\nOtherwise, returns `Some(self << rhs)`.\n\n# Examples\n\n```\n#![feature(exact_bitshifts)]\n\nassert_eq!(0x1u128.exact_shl(4), Some(0x10));\nassert_eq!(0x1u128.exact_shl(129), None);\n```",
+ "id": 11614,
"inner": {
"function": {
"generics": {
@@ -131605,27 +129674,109 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u128"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "unbounded_shl",
+ "name": "exact_shl",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11623": {
+ "11615": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Unchecked exact shift left. Computes `self << rhs`, assuming the operation can be\nlosslessly reversed `rhs` cannot be larger than\n`u128::BITS`.\n\n# Safety\n\nThis results in undefined behavior when `rhs > self.leading_zeros() || rhs >=\nu128::BITS`\ni.e. when\n[`u128::exact_shl`]\nwould return `None`.",
+ "id": 11615,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": true
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u128"
+ }
+ }
+ }
+ },
+ "links": {
+ "`u128::exact_shl`": 11614
+ },
+ "name": "unchecked_exact_shl",
+ "span": {
+ "begin": [
+ 1186,
+ 5
+ ],
+ "end": [
+ 1209,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11616": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
@@ -131641,8 +129792,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked shift right. Computes `self >> rhs`, returning `None`\nif `rhs` is larger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x10usize.checked_shr(4), Some(0x1));\nassert_eq!(0x10usize.checked_shr(129), None);\n```",
- "id": 11623,
+ "docs": "Checked shift right. Computes `self >> rhs`, returning `None`\nif `rhs` is larger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x10u128.checked_shr(4), Some(0x1));\nassert_eq!(0x10u128.checked_shr(129), None);\n```",
+ "id": 11616,
"inner": {
"function": {
"generics": {
@@ -131679,7 +129830,7 @@
"args": [
{
"type": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
],
@@ -131697,24 +129848,24 @@
"name": "checked_shr",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11624": {
+ "11617": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
"must_use": {
@@ -131727,8 +129878,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict shift right. Computes `self >> rhs`, panicking `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x10usize.strict_shr(4), 0x1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10usize.strict_shr(129);\n```",
- "id": 11624,
+ "docs": "Strict shift right. Computes `self >> rhs`, panicking `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x10u128.strict_shr(4), 0x1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10u128.strict_shr(129);\n```",
+ "id": 11617,
"inner": {
"function": {
"generics": {
@@ -131759,7 +129910,7 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
@@ -131768,18 +129919,18 @@
"name": "strict_shr",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11625": {
+ "11618": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
@@ -131795,8 +129946,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unchecked shift right. Computes `self >> rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shr`] would return `None`.\n\n[`checked_shr`]: usize::checked_shr",
- "id": 11625,
+ "docs": "Unchecked shift right. Computes `self >> rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shr`] would return `None`.\n\n[`checked_shr`]: u128::checked_shr",
+ "id": 11618,
"inner": {
"function": {
"generics": {
@@ -131827,29 +129978,29 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
"links": {
- "usize::checked_shr": 11623
+ "u128::checked_shr": 11616
},
"name": "unchecked_shr",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11626": {
+ "11619": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
@@ -131865,8 +130016,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x10usize.unbounded_shr(4), 0x1);\nassert_eq!(0x10usize.unbounded_shr(129), 0);\n```",
- "id": 11626,
+ "docs": "Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x10u128.unbounded_shr(4), 0x1);\nassert_eq!(0x10u128.unbounded_shr(129), 0);\n```",
+ "id": 11619,
"inner": {
"function": {
"generics": {
@@ -131897,7 +130048,7 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
@@ -131906,24 +130057,90 @@
"name": "unbounded_shr",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11627": {
+ "1162": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 10, patch: 0})}, feature: \"map_entry_keys\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Inline(Hint)]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": "Gets a reference to the key in the entry.\n\n# Examples\n\n```\nuse std::collections::HashMap;\n\nlet mut map: HashMap<&str, u32> = HashMap::new();\nmap.entry(\"poneyland\").or_insert(12);\nassert_eq!(map.entry(\"poneyland\").key(), &\"poneyland\");\n```",
+ "id": 1162,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "K"
+ }
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "key",
+ "span": {
+ "begin": [
+ 2526,
+ 5
+ ],
+ "end": [
+ 2528,
+ 6
+ ],
+ "filename": "std/src/collections/hash/map.rs"
+ },
+ "visibility": "public"
+ },
+ "11620": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
@@ -131933,8 +130150,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Checked exponentiation. Computes `self.pow(exp)`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(2usize.checked_pow(5), Some(32));\nassert_eq!(usize::MAX.checked_pow(2), None);\n```",
- "id": 11627,
+ "docs": "Exact shift right. Computes `self >> rhs` as long as it can be reversed losslessly.\n\nReturns `None` if any non-zero bits would be shifted out or if `rhs` >=\n`u128::BITS`.\nOtherwise, returns `Some(self >> rhs)`.\n\n# Examples\n\n```\n#![feature(exact_bitshifts)]\n\nassert_eq!(0x10u128.exact_shr(4), Some(0x1));\nassert_eq!(0x10u128.exact_shr(5), None);\n```",
+ "id": 11620,
"inner": {
"function": {
"generics": {
@@ -131957,7 +130174,7 @@
}
],
[
- "exp",
+ "rhs",
{
"primitive": "u32"
}
@@ -131971,7 +130188,7 @@
"args": [
{
"type": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
],
@@ -131986,41 +130203,35 @@
}
},
"links": {},
- "name": "checked_pow",
+ "name": "exact_shr",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11628": {
+ "11621": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Current},\nfeature: \"strict_overflow_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Strict exponentiation. Computes `self.pow(exp)`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(2usize.strict_pow(5), 32);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = usize::MAX.strict_pow(2);\n```",
- "id": 11628,
+ "docs": "Unchecked exact shift right. Computes `self >> rhs`, assuming the operation can be\nlosslessly reversed and `rhs` cannot be larger than\n`u128::BITS`.\n\n# Safety\n\nThis results in undefined behavior when `rhs > self.trailing_zeros() || rhs >=\nu128::BITS`\ni.e. when\n[`u128::exact_shr`]\nwould return `None`.",
+ "id": 11621,
"inner": {
"function": {
"generics": {
@@ -132032,7 +130243,7 @@
"abi": "Rust",
"is_async": false,
"is_const": true,
- "is_unsafe": false
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -132043,7 +130254,7 @@
}
],
[
- "exp",
+ "rhs",
{
"primitive": "u32"
}
@@ -132051,33 +130262,35 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
- "links": {},
- "name": "strict_pow",
+ "links": {
+ "`u128::exact_shr`": 11620
+ },
+ "name": "unchecked_exact_shr",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11629": {
+ "11622": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
@@ -132087,8 +130300,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer addition. Computes `self + rhs`, saturating at\nthe numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100usize.saturating_add(1), 101);\nassert_eq!(usize::MAX.saturating_add(127), usize::MAX);\n```",
- "id": 11629,
+ "docs": "Checked exponentiation. Computes `self.pow(exp)`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(2u128.checked_pow(5), Some(32));\nassert_eq!(u128::MAX.checked_pow(2), None);\n```",
+ "id": 11622,
"inner": {
"function": {
"generics": {
@@ -132111,47 +130324,70 @@
}
],
[
- "rhs",
+ "exp",
{
- "primitive": "usize"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u128"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
}
}
}
},
"links": {},
- "name": "saturating_add",
+ "name": "checked_pow",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "1163": {
+ "11623": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 12, patch: 0})}, feature: \"map_entry_recover_keys2\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Inline(Hint)]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
- "crate_id": 0,
+ "crate_id": 1,
"deprecation": null,
- "docs": "Take the ownership of the key and value from the map.\n\n# Examples\n\n```\nuse std::collections::HashMap;\nuse std::collections::hash_map::Entry;\n\nlet mut map: HashMap<&str, u32> = HashMap::new();\nmap.entry(\"poneyland\").or_insert(12);\n\nif let Entry::Occupied(o) = map.entry(\"poneyland\") {\n // We delete the entry from the map.\n o.remove_entry();\n}\n\nassert_eq!(map.contains_key(\"poneyland\"), false);\n```",
- "id": 1163,
+ "docs": "Strict exponentiation. Computes `self.pow(exp)`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(2u128.strict_pow(5), 32);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = u128::MAX.strict_pow(2);\n```",
+ "id": 11623,
"inner": {
"function": {
"generics": {
@@ -132162,7 +130398,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -132172,44 +130408,43 @@
{
"generic": "Self"
}
+ ],
+ [
+ "exp",
+ {
+ "primitive": "u32"
+ }
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "generic": "K"
- },
- {
- "generic": "V"
- }
- ]
+ "primitive": "u128"
}
}
}
},
"links": {},
- "name": "remove_entry",
+ "name": "strict_pow",
"span": {
"begin": [
- 2555,
+ 1186,
5
],
"end": [
- 2557,
+ 1209,
6
],
- "filename": "std/src/collections/hash/map.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11630": {
+ "11624": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -132219,8 +130454,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating addition with a signed integer. Computes `self + rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1usize.saturating_add_signed(2), 3);\nassert_eq!(1usize.saturating_add_signed(-2), 0);\nassert_eq!((usize::MAX - 2).saturating_add_signed(4), usize::MAX);\n```",
- "id": 11630,
+ "docs": "Saturating integer addition. Computes `self + rhs`, saturating at\nthe numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100u128.saturating_add(1), 101);\nassert_eq!(u128::MAX.saturating_add(127), u128::MAX);\n```",
+ "id": 11624,
"inner": {
"function": {
"generics": {
@@ -132245,39 +130480,39 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
"links": {},
- "name": "saturating_add_signed",
+ "name": "saturating_add",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11631": {
+ "11625": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -132287,8 +130522,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer subtraction. Computes `self - rhs`, saturating\nat the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100usize.saturating_sub(27), 73);\nassert_eq!(13usize.saturating_sub(127), 0);\n```",
- "id": 11631,
+ "docs": "Saturating addition with a signed integer. Computes `self + rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1u128.saturating_add_signed(2), 3);\nassert_eq!(1u128.saturating_add_signed(-2), 0);\nassert_eq!((u128::MAX - 2).saturating_add_signed(4), u128::MAX);\n```",
+ "id": 11625,
"inner": {
"function": {
"generics": {
@@ -132313,39 +130548,39 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
"links": {},
- "name": "saturating_sub",
+ "name": "saturating_add_signed",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11632": {
+ "11626": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
"must_use": {
@@ -132355,8 +130590,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer subtraction. Computes `self` - `rhs`, saturating at\nthe numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1usize.saturating_sub_signed(2), 0);\nassert_eq!(1usize.saturating_sub_signed(-2), 3);\nassert_eq!((usize::MAX - 2).saturating_sub_signed(-4), usize::MAX);\n```",
- "id": 11632,
+ "docs": "Saturating integer subtraction. Computes `self - rhs`, saturating\nat the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100u128.saturating_sub(27), 73);\nassert_eq!(13u128.saturating_sub(127), 0);\n```",
+ "id": 11626,
"inner": {
"function": {
"generics": {
@@ -132381,39 +130616,39 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
"links": {},
- "name": "saturating_sub_signed",
+ "name": "saturating_sub",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11633": {
+ "11627": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
},
{
"must_use": {
@@ -132423,8 +130658,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer multiplication. Computes `self * rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(2usize.saturating_mul(10), 20);\nassert_eq!((usize::MAX).saturating_mul(10), usize::MAX);\n```",
- "id": 11633,
+ "docs": "Saturating integer subtraction. Computes `self` - `rhs`, saturating at\nthe numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1u128.saturating_sub_signed(2), 0);\nassert_eq!(1u128.saturating_sub_signed(-2), 3);\nassert_eq!((u128::MAX - 2).saturating_sub_signed(-4), u128::MAX);\n```",
+ "id": 11627,
"inner": {
"function": {
"generics": {
@@ -132449,53 +130684,50 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
"links": {},
- "name": "saturating_mul",
+ "name": "saturating_sub_signed",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11634": {
+ "11628": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer division. Computes `self / rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5usize.saturating_div(2), 2);\n\n```",
- "id": 11634,
+ "docs": "Saturating integer multiplication. Computes `self * rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(2u128.saturating_mul(10), 20);\nassert_eq!((u128::MAX).saturating_mul(10), u128::MAX);\n```",
+ "id": 11628,
"inner": {
"function": {
"generics": {
@@ -132520,50 +130752,53 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
"links": {},
- "name": "saturating_div",
+ "name": "saturating_mul",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11635": {
+ "11629": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Saturating integer exponentiation. Computes `self.pow(exp)`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(4usize.saturating_pow(3), 64);\nassert_eq!(usize::MAX.saturating_pow(2), usize::MAX);\n```",
- "id": 11635,
+ "docs": "Saturating integer division. Computes `self / rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u128.saturating_div(2), 2);\n\n```",
+ "id": 11629,
"inner": {
"function": {
"generics": {
@@ -132586,41 +130821,105 @@
}
],
[
- "exp",
+ "rhs",
{
- "primitive": "u32"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
"links": {},
- "name": "saturating_pow",
+ "name": "saturating_div",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11636": {
+ "1163": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 12, patch: 0})}, feature: \"map_entry_recover_keys2\"}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Inline(Hint)]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": "Take the ownership of the key and value from the map.\n\n# Examples\n\n```\nuse std::collections::HashMap;\nuse std::collections::hash_map::Entry;\n\nlet mut map: HashMap<&str, u32> = HashMap::new();\nmap.entry(\"poneyland\").or_insert(12);\n\nif let Entry::Occupied(o) = map.entry(\"poneyland\") {\n // We delete the entry from the map.\n o.remove_entry();\n}\n\nassert_eq!(map.contains_key(\"poneyland\"), false);\n```",
+ "id": 1163,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "generic": "K"
+ },
+ {
+ "generic": "V"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "remove_entry",
+ "span": {
+ "begin": [
+ 2550,
+ 5
+ ],
+ "end": [
+ 2552,
+ 6
+ ],
+ "filename": "std/src/collections/hash/map.rs"
+ },
+ "visibility": "public"
+ },
+ "11630": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
@@ -132630,8 +130929,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) addition with a signed integer. Computes\n`self + rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(1usize.wrapping_add_signed(2), 3);\nassert_eq!(1usize.wrapping_add_signed(-2), usize::MAX);\nassert_eq!((usize::MAX - 2).wrapping_add_signed(4), 1);\n```",
- "id": 11636,
+ "docs": "Saturating integer exponentiation. Computes `self.pow(exp)`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(4u128.saturating_pow(3), 64);\nassert_eq!(u128::MAX.saturating_pow(2), u128::MAX);\n```",
+ "id": 11630,
"inner": {
"function": {
"generics": {
@@ -132654,41 +130953,41 @@
}
],
[
- "rhs",
+ "exp",
{
- "primitive": "isize"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
"links": {},
- "name": "wrapping_add_signed",
+ "name": "saturating_pow",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11637": {
+ "11631": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -132698,8 +130997,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) subtraction with a signed integer. Computes\n`self - rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(1usize.wrapping_sub_signed(2), usize::MAX);\nassert_eq!(1usize.wrapping_sub_signed(-2), 3);\nassert_eq!((usize::MAX - 2).wrapping_sub_signed(-4), 1);\n```",
- "id": 11637,
+ "docs": "Wrapping (modular) addition with a signed integer. Computes\n`self + rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(1u128.wrapping_add_signed(2), 3);\nassert_eq!(1u128.wrapping_add_signed(-2), u128::MAX);\nassert_eq!((u128::MAX - 2).wrapping_add_signed(4), 1);\n```",
+ "id": 11631,
"inner": {
"function": {
"generics": {
@@ -132724,53 +131023,50 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
"links": {},
- "name": "wrapping_sub_signed",
+ "name": "wrapping_add_signed",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11638": {
+ "11632": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
},
{
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
- },
- {
- "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) division. Computes `self / rhs`.\n\nWrapped division on unsigned types is just normal division. There's\nno way wrapping could ever happen. This function exists so that all\noperations are accounted for in the wrapping operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100usize.wrapping_div(10), 10);\n```",
- "id": 11638,
+ "docs": "Wrapping (modular) subtraction with a signed integer. Computes\n`self - rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(1u128.wrapping_sub_signed(2), u128::MAX);\nassert_eq!(1u128.wrapping_sub_signed(-2), 3);\nassert_eq!((u128::MAX - 2).wrapping_sub_signed(-4), 1);\n```",
+ "id": 11632,
"inner": {
"function": {
"generics": {
@@ -132795,39 +131091,39 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
"links": {},
- "name": "wrapping_div",
+ "name": "wrapping_sub_signed",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11639": {
+ "11633": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
},
{
"must_use": {
@@ -132840,8 +131136,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping Euclidean division. Computes `self.div_euclid(rhs)`.\n\nWrapped division on unsigned types is just normal division. There's\nno way wrapping could ever happen. This function exists so that all\noperations are accounted for in the wrapping operations. Since, for\nthe positive integers, all common definitions of division are equal,\nthis is exactly equal to `self.wrapping_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100usize.wrapping_div_euclid(10), 10);\n```",
- "id": 11639,
+ "docs": "Wrapping (modular) division. Computes `self / rhs`.\n\nWrapped division on unsigned types is just normal division. There's\nno way wrapping could ever happen. This function exists so that all\noperations are accounted for in the wrapping operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u128.wrapping_div(10), 10);\n```",
+ "id": 11633,
"inner": {
"function": {
"generics": {
@@ -132866,45 +131162,53 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
"links": {},
- "name": "wrapping_div_euclid",
+ "name": "wrapping_div",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "1164": {
+ "11634": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Inline(Hint)]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
- "crate_id": 0,
+ "crate_id": 1,
"deprecation": null,
- "docs": "Gets a reference to the value in the entry.\n\n# Examples\n\n```\nuse std::collections::HashMap;\nuse std::collections::hash_map::Entry;\n\nlet mut map: HashMap<&str, u32> = HashMap::new();\nmap.entry(\"poneyland\").or_insert(12);\n\nif let Entry::Occupied(o) = map.entry(\"poneyland\") {\n assert_eq!(o.get(), &12);\n}\n```",
- "id": 1164,
+ "docs": "Wrapping Euclidean division. Computes `self.div_euclid(rhs)`.\n\nWrapped division on unsigned types is just normal division. There's\nno way wrapping could ever happen. This function exists so that all\noperations are accounted for in the wrapping operations. Since, for\nthe positive integers, all common definitions of division are equal,\nthis is exactly equal to `self.wrapping_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u128.wrapping_div_euclid(10), 10);\n```",
+ "id": 11634,
"inner": {
"function": {
"generics": {
@@ -132915,7 +131219,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -132923,45 +131227,39 @@
[
"self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "V"
- }
- }
+ "primitive": "u128"
}
}
}
},
"links": {},
- "name": "get",
+ "name": "wrapping_div_euclid",
"span": {
"begin": [
- 2576,
+ 1186,
5
],
"end": [
- 2578,
+ 1209,
6
],
- "filename": "std/src/collections/hash/map.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11640": {
+ "11635": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
@@ -132980,8 +131278,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) remainder. Computes `self % rhs`.\n\nWrapped remainder calculation on unsigned types is just the regular\nremainder calculation. There's no way wrapping could ever happen.\nThis function exists so that all operations are accounted for in the\nwrapping operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100usize.wrapping_rem(10), 0);\n```",
- "id": 11640,
+ "docs": "Wrapping (modular) remainder. Computes `self % rhs`.\n\nWrapped remainder calculation on unsigned types is just the regular\nremainder calculation. There's no way wrapping could ever happen.\nThis function exists so that all operations are accounted for in the\nwrapping operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u128.wrapping_rem(10), 0);\n```",
+ "id": 11635,
"inner": {
"function": {
"generics": {
@@ -133006,13 +131304,13 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
@@ -133021,18 +131319,18 @@
"name": "wrapping_rem",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11641": {
+ "11636": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
@@ -133051,8 +131349,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping Euclidean modulo. Computes `self.rem_euclid(rhs)`.\n\nWrapped modulo calculation on unsigned types is just the regular\nremainder calculation. There's no way wrapping could ever happen.\nThis function exists so that all operations are accounted for in the\nwrapping operations. Since, for the positive integers, all common\ndefinitions of division are equal, this is exactly equal to\n`self.wrapping_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100usize.wrapping_rem_euclid(10), 0);\n```",
- "id": 11641,
+ "docs": "Wrapping Euclidean modulo. Computes `self.rem_euclid(rhs)`.\n\nWrapped modulo calculation on unsigned types is just the regular\nremainder calculation. There's no way wrapping could ever happen.\nThis function exists so that all operations are accounted for in the\nwrapping operations. Since, for the positive integers, all common\ndefinitions of division are equal, this is exactly equal to\n`self.wrapping_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100u128.wrapping_rem_euclid(10), 0);\n```",
+ "id": 11636,
"inner": {
"function": {
"generics": {
@@ -133077,13 +131375,13 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
@@ -133092,18 +131390,18 @@
"name": "wrapping_rem_euclid",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11642": {
+ "11637": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
@@ -133119,8 +131417,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Wrapping (modular) negation. Computes `-self`,\nwrapping around at the boundary of the type.\n\nSince unsigned types do not have negative equivalents\nall applications of this function will wrap (except for `-0`).\nFor values smaller than the corresponding signed type's maximum\nthe result is the same as casting the corresponding signed value.\nAny larger values are equivalent to `MAX + 1 - (val - MAX - 1)` where\n`MAX` is the corresponding signed type's maximum.\n\n# Examples\n\n```\nassert_eq!(0_usize.wrapping_neg(), 0);\nassert_eq!(usize::MAX.wrapping_neg(), 1);\nassert_eq!(13_usize.wrapping_neg(), (!13) + 1);\nassert_eq!(42_usize.wrapping_neg(), !(42 - 1));\n```",
- "id": 11642,
+ "docs": "Wrapping (modular) negation. Computes `-self`,\nwrapping around at the boundary of the type.\n\nSince unsigned types do not have negative equivalents\nall applications of this function will wrap (except for `-0`).\nFor values smaller than the corresponding signed type's maximum\nthe result is the same as casting the corresponding signed value.\nAny larger values are equivalent to `MAX + 1 - (val - MAX - 1)` where\n`MAX` is the corresponding signed type's maximum.\n\n# Examples\n\n```\nassert_eq!(0_u128.wrapping_neg(), 0);\nassert_eq!(u128::MAX.wrapping_neg(), 1);\nassert_eq!(13_u128.wrapping_neg(), (!13) + 1);\nassert_eq!(42_u128.wrapping_neg(), !(42 - 1));\n```",
+ "id": 11637,
"inner": {
"function": {
"generics": {
@@ -133145,7 +131443,7 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
@@ -133154,18 +131452,18 @@
"name": "wrapping_neg",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11643": {
+ "11638": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
@@ -133181,8 +131479,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Panic-free bitwise shift-left; yields `self << mask(rhs)`,\nwhere `mask` removes any high-order bits of `rhs` that\nwould cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-left; the\nRHS of a wrapping shift-left is restricted to the range\nof the type, rather than the bits shifted out of the LHS\nbeing returned to the other end. The primitive integer\ntypes all implement a [`rotate_left`](Self::rotate_left) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!(1usize.wrapping_shl(7), 128);\nassert_eq!(1usize.wrapping_shl(128), 1);\n```",
- "id": 11643,
+ "docs": "Panic-free bitwise shift-left; yields `self << mask(rhs)`,\nwhere `mask` removes any high-order bits of `rhs` that\nwould cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-left; the\nRHS of a wrapping shift-left is restricted to the range\nof the type, rather than the bits shifted out of the LHS\nbeing returned to the other end. The primitive integer\ntypes all implement a [`rotate_left`](Self::rotate_left) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!(1u128.wrapping_shl(7), 128);\nassert_eq!(1u128.wrapping_shl(128), 1);\n```",
+ "id": 11638,
"inner": {
"function": {
"generics": {
@@ -133213,29 +131511,29 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
"links": {
- "Self::rotate_left": 11575
+ "Self::rotate_left": 11564
},
"name": "wrapping_shl",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11644": {
+ "11639": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
@@ -133251,8 +131549,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Panic-free bitwise shift-right; yields `self >> mask(rhs)`,\nwhere `mask` removes any high-order bits of `rhs` that\nwould cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-right; the\nRHS of a wrapping shift-right is restricted to the range\nof the type, rather than the bits shifted out of the LHS\nbeing returned to the other end. The primitive integer\ntypes all implement a [`rotate_right`](Self::rotate_right) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!(128usize.wrapping_shr(7), 1);\nassert_eq!(128usize.wrapping_shr(128), 128);\n```",
- "id": 11644,
+ "docs": "Panic-free bitwise shift-right; yields `self >> mask(rhs)`,\nwhere `mask` removes any high-order bits of `rhs` that\nwould cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-right; the\nRHS of a wrapping shift-right is restricted to the range\nof the type, rather than the bits shifted out of the LHS\nbeing returned to the other end. The primitive integer\ntypes all implement a [`rotate_right`](Self::rotate_right) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!(128u128.wrapping_shr(7), 1);\nassert_eq!(128u128.wrapping_shr(128), 128);\n```",
+ "id": 11639,
"inner": {
"function": {
"generics": {
@@ -133283,46 +131581,41 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
"links": {
- "Self::rotate_right": 11576
+ "Self::rotate_right": 11565
},
"name": "wrapping_shr",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11645": {
+ "1164": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Inline(Hint)]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Wrapping (modular) exponentiation. Computes `self.pow(exp)`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(3usize.wrapping_pow(5), 243);\nassert_eq!(3u8.wrapping_pow(6), 217);\n```",
- "id": 11645,
+ "docs": "Gets a reference to the value in the entry.\n\n# Examples\n\n```\nuse std::collections::HashMap;\nuse std::collections::hash_map::Entry;\n\nlet mut map: HashMap<&str, u32> = HashMap::new();\nmap.entry(\"poneyland\").or_insert(12);\n\nif let Entry::Occupied(o) = map.entry(\"poneyland\") {\n assert_eq!(o.get(), &12);\n}\n```",
+ "id": 1164,
"inner": {
"function": {
"generics": {
@@ -133333,7 +131626,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -133341,45 +131634,51 @@
[
"self",
{
- "generic": "Self"
- }
- ],
- [
- "exp",
- {
- "primitive": "u32"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "V"
+ }
+ }
}
}
}
},
"links": {},
- "name": "wrapping_pow",
+ "name": "get",
"span": {
"begin": [
- 1248,
+ 2571,
5
],
"end": [
- 1266,
+ 2573,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/collections/hash/map.rs"
},
"visibility": "public"
},
- "11646": {
+ "11640": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
},
{
"must_use": {
@@ -133389,8 +131688,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5usize.overflowing_add(2), (7, false));\nassert_eq!(usize::MAX.overflowing_add(1), (0, true));\n```",
- "id": 11646,
+ "docs": "Wrapping (modular) exponentiation. Computes `self.pow(exp)`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(3u128.wrapping_pow(5), 243);\nassert_eq!(3u8.wrapping_pow(6), 217);\n```",
+ "id": 11640,
"inner": {
"function": {
"generics": {
@@ -133413,48 +131712,41 @@
}
],
[
- "rhs",
+ "exp",
{
- "primitive": "usize"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "usize"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u128"
}
}
}
},
"links": {},
- "name": "overflowing_add",
+ "name": "wrapping_pow",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11647": {
+ "11641": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -133464,8 +131756,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` + `rhs` with a signed `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1usize.overflowing_add_signed(2), (3, false));\nassert_eq!(1usize.overflowing_add_signed(-2), (usize::MAX, true));\nassert_eq!((usize::MAX - 2).overflowing_add_signed(4), (1, true));\n```",
- "id": 11647,
+ "docs": "Calculates `self` + `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5u128.overflowing_add(2), (7, false));\nassert_eq!(u128::MAX.overflowing_add(1), (0, true));\n```",
+ "id": 11641,
"inner": {
"function": {
"generics": {
@@ -133490,7 +131782,7 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u128"
}
]
],
@@ -133498,7 +131790,7 @@
"output": {
"tuple": [
{
- "primitive": "usize"
+ "primitive": "u128"
},
{
"primitive": "bool"
@@ -133509,27 +131801,27 @@
}
},
"links": {},
- "name": "overflowing_add_signed",
+ "name": "overflowing_add",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11648": {
+ "11642": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
},
{
"must_use": {
@@ -133539,8 +131831,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` - `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5usize.overflowing_sub(2), (3, false));\nassert_eq!(0usize.overflowing_sub(1), (usize::MAX, true));\n```",
- "id": 11648,
+ "docs": "Calculates `self` + `rhs` with a signed `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1u128.overflowing_add_signed(2), (3, false));\nassert_eq!(1u128.overflowing_add_signed(-2), (u128::MAX, true));\nassert_eq!((u128::MAX - 2).overflowing_add_signed(4), (1, true));\n```",
+ "id": 11642,
"inner": {
"function": {
"generics": {
@@ -133565,7 +131857,7 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "i128"
}
]
],
@@ -133573,7 +131865,7 @@
"output": {
"tuple": [
{
- "primitive": "usize"
+ "primitive": "u128"
},
{
"primitive": "bool"
@@ -133584,27 +131876,27 @@
}
},
"links": {},
- "name": "overflowing_sub",
+ "name": "overflowing_add_signed",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11649": {
+ "11643": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -133614,8 +131906,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates `self` - `rhs` with a signed `rhs`\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1usize.overflowing_sub_signed(2), (usize::MAX, true));\nassert_eq!(1usize.overflowing_sub_signed(-2), (3, false));\nassert_eq!((usize::MAX - 2).overflowing_sub_signed(-4), (1, true));\n```",
- "id": 11649,
+ "docs": "Calculates `self` - `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5u128.overflowing_sub(2), (3, false));\nassert_eq!(0u128.overflowing_sub(1), (u128::MAX, true));\n```",
+ "id": 11643,
"inner": {
"function": {
"generics": {
@@ -133640,7 +131932,7 @@
[
"rhs",
{
- "primitive": "isize"
+ "primitive": "u128"
}
]
],
@@ -133648,7 +131940,7 @@
"output": {
"tuple": [
{
- "primitive": "usize"
+ "primitive": "u128"
},
{
"primitive": "bool"
@@ -133659,92 +131951,27 @@
}
},
"links": {},
- "name": "overflowing_sub_signed",
+ "name": "overflowing_sub",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "1165": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- },
- {
- "other": "#[attr = Inline(Hint)]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": "Converts the `OccupiedEntry` into a mutable reference to the value in the entry\nwith a lifetime bound to the map itself.\n\nIf you need multiple references to the `OccupiedEntry`, see [`get_mut`].\n\n[`get_mut`]: Self::get_mut\n\n# Examples\n\n```\nuse std::collections::HashMap;\nuse std::collections::hash_map::Entry;\n\nlet mut map: HashMap<&str, u32> = HashMap::new();\nmap.entry(\"poneyland\").or_insert(12);\n\nassert_eq!(map[\"poneyland\"], 12);\nif let Entry::Occupied(o) = map.entry(\"poneyland\") {\n *o.into_mut() += 10;\n}\n\nassert_eq!(map[\"poneyland\"], 22);\n```",
- "id": 1165,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "generic": "Self"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "borrowed_ref": {
- "is_mutable": true,
- "lifetime": "'a",
- "type": {
- "generic": "V"
- }
- }
- }
- }
- }
- },
- "links": {
- "Self::get_mut": 1166
- },
- "name": "into_mut",
- "span": {
- "begin": [
- 2638,
- 5
- ],
- "end": [
- 2640,
- 6
- ],
- "filename": "std/src/collections/hash/map.rs"
- },
- "visibility": "public"
- },
- "11650": {
+ "11644": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
},
{
"must_use": {
@@ -133754,8 +131981,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Computes the absolute difference between `self` and `other`.\n\n# Examples\n\n```\nassert_eq!(100usize.abs_diff(80), 20usize);\nassert_eq!(100usize.abs_diff(110), 10usize);\n```",
- "id": 11650,
+ "docs": "Calculates `self` - `rhs` with a signed `rhs`\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1u128.overflowing_sub_signed(2), (u128::MAX, true));\nassert_eq!(1u128.overflowing_sub_signed(-2), (3, false));\nassert_eq!((u128::MAX - 2).overflowing_sub_signed(-4), (1, true));\n```",
+ "id": 11644,
"inner": {
"function": {
"generics": {
@@ -133778,41 +132005,48 @@
}
],
[
- "other",
+ "rhs",
{
- "primitive": "usize"
+ "primitive": "i128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "tuple": [
+ {
+ "primitive": "u128"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
"links": {},
- "name": "abs_diff",
+ "name": "overflowing_sub_signed",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11651": {
+ "11645": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\"}}]"
},
{
"must_use": {
@@ -133822,8 +132056,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the multiplication of `self` and `rhs`.\n\nReturns a tuple of the multiplication along with a boolean\nindicating whether an arithmetic overflow would occur. If an\noverflow would have occurred then the wrapped value is returned.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why why `u32`\nis used.\n\n```\nassert_eq!(5u32.overflowing_mul(2), (10, false));\nassert_eq!(1_000_000_000u32.overflowing_mul(10), (1410065408, true));\n```",
- "id": 11651,
+ "docs": "Computes the absolute difference between `self` and `other`.\n\n# Examples\n\n```\nassert_eq!(100u128.abs_diff(80), 20u128);\nassert_eq!(100u128.abs_diff(110), 10u128);\n```",
+ "id": 11645,
"inner": {
"function": {
"generics": {
@@ -133846,48 +132080,41 @@
}
],
[
- "rhs",
+ "other",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "tuple": [
- {
- "primitive": "usize"
- },
- {
- "primitive": "bool"
- }
- ]
+ "primitive": "u128"
}
}
}
},
"links": {},
- "name": "overflowing_mul",
+ "name": "abs_diff",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11652": {
+ "11646": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_bigint_helpers\"}}]"
},
{
"must_use": {
@@ -133897,8 +132124,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the \"full multiplication\" `self * rhs + carry`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need the `carry`, then you can use [`Self::widening_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5u32.carrying_mul(2, 0), (10, 0));\nassert_eq!(5u32.carrying_mul(2, 10), (20, 0));\nassert_eq!(1_000_000_000u32.carrying_mul(10, 0), (1410065408, 2));\nassert_eq!(1_000_000_000u32.carrying_mul(10, 10), (1410065418, 2));\nassert_eq!(usize::MAX.carrying_mul(usize::MAX, usize::MAX), (0, usize::MAX));\n```\n\nThis is the core operation needed for scalar multiplication when\nimplementing it for wider-than-native types.\n\n```\n#![feature(bigint_helper_methods)]\nfn scalar_mul_eq(little_endian_digits: &mut Vec, multiplicand: u16) {\n let mut carry = 0;\n for d in little_endian_digits.iter_mut() {\n (*d, carry) = d.carrying_mul(multiplicand, carry);\n }\n if carry != 0 {\n little_endian_digits.push(carry);\n }\n}\n\nlet mut v = vec![10, 20];\nscalar_mul_eq(&mut v, 3);\nassert_eq!(v, [30, 60]);\n\nassert_eq!(0x87654321_u64 * 0xFEED, 0x86D3D159E38D);\nlet mut v = vec![0x4321, 0x8765];\nscalar_mul_eq(&mut v, 0xFEED);\nassert_eq!(v, [0xE38D, 0xD159, 0x86D3]);\n```\n\nIf `carry` is zero, this is similar to [`overflowing_mul`](Self::overflowing_mul),\nexcept that it gives the value of the overflow instead of just whether one happened:\n\n```\n#![feature(bigint_helper_methods)]\nlet r = u8::carrying_mul(7, 13, 0);\nassert_eq!((r.0, r.1 != 0), u8::overflowing_mul(7, 13));\nlet r = u8::carrying_mul(13, 42, 0);\nassert_eq!((r.0, r.1 != 0), u8::overflowing_mul(13, 42));\n```\n\nThe value of the first field in the returned tuple matches what you'd get\nby combining the [`wrapping_mul`](Self::wrapping_mul) and\n[`wrapping_add`](Self::wrapping_add) methods:\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(\n 789_u16.carrying_mul(456, 123).0,\n 789_u16.wrapping_mul(456).wrapping_add(123),\n);\n```",
- "id": 11652,
+ "docs": "Calculates the \"full multiplication\" `self * rhs + carry`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you also need to add a value, then use [`Self::carrying_mul_add`].\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u32` is used.\n\n```\nassert_eq!(5u32.carrying_mul(2, 0), (10, 0));\nassert_eq!(5u32.carrying_mul(2, 10), (20, 0));\nassert_eq!(1_000_000_000u32.carrying_mul(10, 0), (1410065408, 2));\nassert_eq!(1_000_000_000u32.carrying_mul(10, 10), (1410065418, 2));\nassert_eq!(u128::MAX.carrying_mul(u128::MAX, u128::MAX), (0, u128::MAX));\n```\n\nThis is the core operation needed for scalar multiplication when\nimplementing it for wider-than-native types.\n\n```\n#![feature(bigint_helper_methods)]\nfn scalar_mul_eq(little_endian_digits: &mut Vec, multiplicand: u16) {\n let mut carry = 0;\n for d in little_endian_digits.iter_mut() {\n (*d, carry) = d.carrying_mul(multiplicand, carry);\n }\n if carry != 0 {\n little_endian_digits.push(carry);\n }\n}\n\nlet mut v = vec![10, 20];\nscalar_mul_eq(&mut v, 3);\nassert_eq!(v, [30, 60]);\n\nassert_eq!(0x87654321_u64 * 0xFEED, 0x86D3D159E38D);\nlet mut v = vec![0x4321, 0x8765];\nscalar_mul_eq(&mut v, 0xFEED);\nassert_eq!(v, [0xE38D, 0xD159, 0x86D3]);\n```\n\nIf `carry` is zero, this is similar to [`overflowing_mul`](Self::overflowing_mul),\nexcept that it gives the value of the overflow instead of just whether one happened:\n\n```\n#![feature(bigint_helper_methods)]\nlet r = u8::carrying_mul(7, 13, 0);\nassert_eq!((r.0, r.1 != 0), u8::overflowing_mul(7, 13));\nlet r = u8::carrying_mul(13, 42, 0);\nassert_eq!((r.0, r.1 != 0), u8::overflowing_mul(13, 42));\n```\n\nThe value of the first field in the returned tuple matches what you'd get\nby combining the [`wrapping_mul`](Self::wrapping_mul) and\n[`wrapping_add`](Self::wrapping_add) methods:\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(\n 789_u16.carrying_mul(456, 123).0,\n 789_u16.wrapping_mul(456).wrapping_add(123),\n);\n```",
+ "id": 11646,
"inner": {
"function": {
"generics": {
@@ -133923,13 +132150,13 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
],
[
"carry",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
@@ -133937,10 +132164,10 @@
"output": {
"tuple": [
{
- "primitive": "usize"
+ "primitive": "u128"
},
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
}
@@ -133948,32 +132175,32 @@
}
},
"links": {
- "Self::overflowing_mul": 11651,
- "Self::wrapping_add": 11585,
- "Self::wrapping_mul": 11598,
- "`Self::widening_mul`": 11653
+ "Self::overflowing_mul": 11647,
+ "Self::wrapping_add": 11576,
+ "Self::wrapping_mul": 11589,
+ "`Self::carrying_mul_add`": 11648
},
"name": "carrying_mul",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11653": {
+ "11647": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
},
{
"must_use": {
@@ -133983,8 +132210,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the complete product `self * rhs` without the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nIf you also need to add a carry to the wide result, then you want\n[`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5u32.widening_mul(2), (10, 0));\nassert_eq!(1_000_000_000u32.widening_mul(10), (1410065408, 2));\n```",
- "id": 11653,
+ "docs": "Calculates the multiplication of `self` and `rhs`.\n\nReturns a tuple of the multiplication along with a boolean\nindicating whether an arithmetic overflow would occur. If an\noverflow would have occurred then the wrapped value is returned.\n\nIf you want the *value* of the overflow, rather than just *whether*\nan overflow occurred, see [`Self::carrying_mul`].\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u32` is used.\n\n```\nassert_eq!(5u32.overflowing_mul(2), (10, false));\nassert_eq!(1_000_000_000u32.overflowing_mul(10), (1410065408, true));\n```",
+ "id": 11647,
"inner": {
"function": {
"generics": {
@@ -134009,7 +132236,7 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
@@ -134017,10 +132244,10 @@
"output": {
"tuple": [
{
- "primitive": "usize"
+ "primitive": "u128"
},
{
- "primitive": "usize"
+ "primitive": "bool"
}
]
}
@@ -134028,29 +132255,29 @@
}
},
"links": {
- "`Self::carrying_mul`": 11652
+ "`Self::carrying_mul`": 11646
},
- "name": "widening_mul",
+ "name": "overflowing_mul",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11654": {
+ "11648": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_bigint_helpers\"}}]"
},
{
"must_use": {
@@ -134060,8 +132287,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the \"full multiplication\" `self * rhs + carry1 + carry2`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need either `carry`, then you can use [`Self::widening_mul`] instead,\nand if you only need one `carry`, then you can use [`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared between integer types,\nwhich explains why `u32` is used here.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5u32.carrying_mul_add(2, 0, 0), (10, 0));\nassert_eq!(5u32.carrying_mul_add(2, 10, 10), (30, 0));\nassert_eq!(1_000_000_000u32.carrying_mul_add(10, 0, 0), (1410065408, 2));\nassert_eq!(1_000_000_000u32.carrying_mul_add(10, 10, 10), (1410065428, 2));\nassert_eq!(usize::MAX.carrying_mul_add(usize::MAX, usize::MAX, usize::MAX), (usize::MAX, usize::MAX));\n```\n\nThis is the core per-digit operation for \"grade school\" O(n²) multiplication.\n\nPlease note that this example is shared between integer types,\nusing `u8` for simplicity of the demonstration.\n\n```\n#![feature(bigint_helper_methods)]\n\nfn quadratic_mul(a: [u8; N], b: [u8; N]) -> [u8; N] {\n let mut out = [0; N];\n for j in 0..N {\n let mut carry = 0;\n for i in 0..(N - j) {\n (out[j + i], carry) = u8::carrying_mul_add(a[i], b[j], out[j + i], carry);\n }\n }\n out\n}\n\n// -1 * -1 == 1\nassert_eq!(quadratic_mul([0xFF; 3], [0xFF; 3]), [1, 0, 0]);\n\nassert_eq!(u32::wrapping_mul(0x9e3779b9, 0x7f4a7c15), 0xCFFC982D);\nassert_eq!(\n quadratic_mul(u32::to_le_bytes(0x9e3779b9), u32::to_le_bytes(0x7f4a7c15)),\n u32::to_le_bytes(0xCFFC982D)\n);\n```",
- "id": 11654,
+ "docs": "Calculates the \"full multiplication\" `self * rhs + carry1 + carry2`.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nThis cannot overflow, as the double-width result has exactly enough\nspace for the largest possible result. This is equivalent to how, in\ndecimal, 9 × 9 + 9 + 9 = 81 + 18 = 99 = 9×10⁰ + 9×10¹ = 10² - 1.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need the `add` part, then you can use [`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared between integer types,\nwhich explains why `u32` is used here.\n\n```\nassert_eq!(5u32.carrying_mul_add(2, 0, 0), (10, 0));\nassert_eq!(5u32.carrying_mul_add(2, 10, 10), (30, 0));\nassert_eq!(1_000_000_000u32.carrying_mul_add(10, 0, 0), (1410065408, 2));\nassert_eq!(1_000_000_000u32.carrying_mul_add(10, 10, 10), (1410065428, 2));\nassert_eq!(u128::MAX.carrying_mul_add(u128::MAX, u128::MAX, u128::MAX), (u128::MAX, u128::MAX));\n```\n\nThis is the core per-digit operation for \"grade school\" O(n²) multiplication.\n\nPlease note that this example is shared between integer types,\nusing `u8` for simplicity of the demonstration.\n\n```\nfn quadratic_mul(a: [u8; N], b: [u8; N]) -> [u8; N] {\n let mut out = [0; N];\n for j in 0..N {\n let mut carry = 0;\n for i in 0..(N - j) {\n (out[j + i], carry) = u8::carrying_mul_add(a[i], b[j], out[j + i], carry);\n }\n }\n out\n}\n\n// -1 * -1 == 1\nassert_eq!(quadratic_mul([0xFF; 3], [0xFF; 3]), [1, 0, 0]);\n\nassert_eq!(u32::wrapping_mul(0x9e3779b9, 0x7f4a7c15), 0xcffc982d);\nassert_eq!(\n quadratic_mul(u32::to_le_bytes(0x9e3779b9), u32::to_le_bytes(0x7f4a7c15)),\n u32::to_le_bytes(0xcffc982d)\n);\n```",
+ "id": 11648,
"inner": {
"function": {
"generics": {
@@ -134086,19 +132313,19 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
],
[
"carry",
{
- "primitive": "usize"
+ "primitive": "u128"
}
],
[
"add",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
@@ -134106,10 +132333,10 @@
"output": {
"tuple": [
{
- "primitive": "usize"
+ "primitive": "u128"
},
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
}
@@ -134117,24 +132344,167 @@
}
},
"links": {
- "`Self::carrying_mul`": 11652,
- "`Self::widening_mul`": 11653
+ "`Self::carrying_mul`": 11646
},
"name": "carrying_mul_add",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11655": {
+ "11649": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates the complete double-width product `self * rhs`.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order. As such,\n`a.widening_mul(b).0` produces the same result as `a.wrapping_mul(b)`.\n\nIf you also need to add a value and carry to the wide result, then you want\n[`Self::carrying_mul_add`] instead.\n\nIf you also need to add a carry to the wide result, then you want\n[`Self::carrying_mul`] instead.\n\nIf you just want to know *whether* the multiplication overflowed, then you\nwant [`Self::overflowing_mul`] instead.\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5_u128.widening_mul(7), (35, 0));\nassert_eq!(u128::MAX.widening_mul(u128::MAX), (1, u128::MAX - 1));\n```\n\nCompared to other `*_mul` methods:\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(u128::widening_mul(1 << 127, 6), (0, 3));\nassert_eq!(u128::overflowing_mul(1 << 127, 6), (0, true));\nassert_eq!(u128::wrapping_mul(1 << 127, 6), 0);\nassert_eq!(u128::checked_mul(1 << 127, 6), None);\n```\n\nPlease note that this example is shared among integer types, which is why `u32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5u32.widening_mul(2), (10, 0));\nassert_eq!(1_000_000_000u32.widening_mul(10), (1410065408, 2));\n```",
+ "id": 11649,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u128"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "u128"
+ },
+ {
+ "primitive": "u128"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {
+ "`Self::carrying_mul_add`": 11648,
+ "`Self::carrying_mul`": 11646,
+ "`Self::overflowing_mul`": 11647
+ },
+ "name": "widening_mul",
+ "span": {
+ "begin": [
+ 1186,
+ 5
+ ],
+ "end": [
+ 1209,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1165": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": "Converts the `OccupiedEntry` into a mutable reference to the value in the entry\nwith a lifetime bound to the map itself.\n\nIf you need multiple references to the `OccupiedEntry`, see [`get_mut`].\n\n[`get_mut`]: Self::get_mut\n\n# Examples\n\n```\nuse std::collections::HashMap;\nuse std::collections::hash_map::Entry;\n\nlet mut map: HashMap<&str, u32> = HashMap::new();\nmap.entry(\"poneyland\").or_insert(12);\n\nassert_eq!(map[\"poneyland\"], 12);\nif let Entry::Occupied(o) = map.entry(\"poneyland\") {\n *o.into_mut() += 10;\n}\n\nassert_eq!(map[\"poneyland\"], 22);\n```",
+ "id": 1165,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "borrowed_ref": {
+ "is_mutable": true,
+ "lifetime": "'a",
+ "type": {
+ "generic": "V"
+ }
+ }
+ }
+ }
+ }
+ },
+ "links": {
+ "Self::get_mut": 1166
+ },
+ "name": "into_mut",
+ "span": {
+ "begin": [
+ 2633,
+ 5
+ ],
+ "end": [
+ 2635,
+ 6
+ ],
+ "filename": "std/src/collections/hash/map.rs"
+ },
+ "visibility": "public"
+ },
+ "11650": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
@@ -134153,8 +132523,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the divisor when `self` is divided by `rhs`.\n\nReturns a tuple of the divisor along with a boolean indicating\nwhether an arithmetic overflow would occur. Note that for unsigned\nintegers overflow never occurs, so the second value is always\n`false`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5usize.overflowing_div(2), (2, false));\n```",
- "id": 11655,
+ "docs": "Calculates the divisor when `self` is divided by `rhs`.\n\nReturns a tuple of the divisor along with a boolean indicating\nwhether an arithmetic overflow would occur. Note that for unsigned\nintegers overflow never occurs, so the second value is always\n`false`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u128.overflowing_div(2), (2, false));\n```",
+ "id": 11650,
"inner": {
"function": {
"generics": {
@@ -134179,7 +132549,7 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
@@ -134187,7 +132557,7 @@
"output": {
"tuple": [
{
- "primitive": "usize"
+ "primitive": "u128"
},
{
"primitive": "bool"
@@ -134201,18 +132571,18 @@
"name": "overflowing_div",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11656": {
+ "11651": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
@@ -134231,8 +132601,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of Euclidean division `self.div_euclid(rhs)`.\n\nReturns a tuple of the divisor along with a boolean indicating\nwhether an arithmetic overflow would occur. Note that for unsigned\nintegers overflow never occurs, so the second value is always\n`false`.\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self.overflowing_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5usize.overflowing_div_euclid(2), (2, false));\n```",
- "id": 11656,
+ "docs": "Calculates the quotient of Euclidean division `self.div_euclid(rhs)`.\n\nReturns a tuple of the divisor along with a boolean indicating\nwhether an arithmetic overflow would occur. Note that for unsigned\nintegers overflow never occurs, so the second value is always\n`false`.\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self.overflowing_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u128.overflowing_div_euclid(2), (2, false));\n```",
+ "id": 11651,
"inner": {
"function": {
"generics": {
@@ -134257,7 +132627,7 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
@@ -134265,7 +132635,7 @@
"output": {
"tuple": [
{
- "primitive": "usize"
+ "primitive": "u128"
},
{
"primitive": "bool"
@@ -134279,18 +132649,18 @@
"name": "overflowing_div_euclid",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11657": {
+ "11652": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
@@ -134309,8 +132679,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the remainder when `self` is divided by `rhs`.\n\nReturns a tuple of the remainder after dividing along with a boolean\nindicating whether an arithmetic overflow would occur. Note that for\nunsigned integers overflow never occurs, so the second value is\nalways `false`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5usize.overflowing_rem(2), (1, false));\n```",
- "id": 11657,
+ "docs": "Calculates the remainder when `self` is divided by `rhs`.\n\nReturns a tuple of the remainder after dividing along with a boolean\nindicating whether an arithmetic overflow would occur. Note that for\nunsigned integers overflow never occurs, so the second value is\nalways `false`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u128.overflowing_rem(2), (1, false));\n```",
+ "id": 11652,
"inner": {
"function": {
"generics": {
@@ -134335,7 +132705,7 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
@@ -134343,7 +132713,7 @@
"output": {
"tuple": [
{
- "primitive": "usize"
+ "primitive": "u128"
},
{
"primitive": "bool"
@@ -134357,18 +132727,18 @@
"name": "overflowing_rem",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11658": {
+ "11653": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
@@ -134387,8 +132757,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the remainder `self.rem_euclid(rhs)` as if by Euclidean division.\n\nReturns a tuple of the modulo after dividing along with a boolean\nindicating whether an arithmetic overflow would occur. Note that for\nunsigned integers overflow never occurs, so the second value is\nalways `false`.\nSince, for the positive integers, all common\ndefinitions of division are equal, this operation\nis exactly equal to `self.overflowing_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5usize.overflowing_rem_euclid(2), (1, false));\n```",
- "id": 11658,
+ "docs": "Calculates the remainder `self.rem_euclid(rhs)` as if by Euclidean division.\n\nReturns a tuple of the modulo after dividing along with a boolean\nindicating whether an arithmetic overflow would occur. Note that for\nunsigned integers overflow never occurs, so the second value is\nalways `false`.\nSince, for the positive integers, all common\ndefinitions of division are equal, this operation\nis exactly equal to `self.overflowing_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5u128.overflowing_rem_euclid(2), (1, false));\n```",
+ "id": 11653,
"inner": {
"function": {
"generics": {
@@ -134413,7 +132783,7 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
@@ -134421,7 +132791,7 @@
"output": {
"tuple": [
{
- "primitive": "usize"
+ "primitive": "u128"
},
{
"primitive": "bool"
@@ -134435,18 +132805,18 @@
"name": "overflowing_rem_euclid",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11659": {
+ "11654": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
@@ -134462,8 +132832,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Negates self in an overflowing fashion.\n\nReturns `!self + 1` using wrapping operations to return the value\nthat represents the negation of this unsigned value. Note that for\npositive unsigned values overflow always occurs, but negating 0 does\nnot overflow.\n\n# Examples\n\n```\nassert_eq!(0usize.overflowing_neg(), (0, false));\nassert_eq!(2usize.overflowing_neg(), (-2i32 as usize, true));\n```",
- "id": 11659,
+ "docs": "Negates self in an overflowing fashion.\n\nReturns `!self + 1` using wrapping operations to return the value\nthat represents the negation of this unsigned value. Note that for\npositive unsigned values overflow always occurs, but negating 0 does\nnot overflow.\n\n# Examples\n\n```\nassert_eq!(0u128.overflowing_neg(), (0, false));\nassert_eq!(2u128.overflowing_neg(), (-2i32 as u128, true));\n```",
+ "id": 11654,
"inner": {
"function": {
"generics": {
@@ -134490,7 +132860,7 @@
"output": {
"tuple": [
{
- "primitive": "usize"
+ "primitive": "u128"
},
{
"primitive": "bool"
@@ -134504,89 +132874,18 @@
"name": "overflowing_neg",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "1166": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- },
- {
- "other": "#[attr = Inline(Hint)]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": "Gets a mutable reference to the value in the entry.\n\nIf you need a reference to the `OccupiedEntry` which may outlive the\ndestruction of the `Entry` value, see [`into_mut`].\n\n[`into_mut`]: Self::into_mut\n\n# Examples\n\n```\nuse std::collections::HashMap;\nuse std::collections::hash_map::Entry;\n\nlet mut map: HashMap<&str, u32> = HashMap::new();\nmap.entry(\"poneyland\").or_insert(12);\n\nassert_eq!(map[\"poneyland\"], 12);\nif let Entry::Occupied(mut o) = map.entry(\"poneyland\") {\n *o.get_mut() += 10;\n assert_eq!(*o.get(), 22);\n\n // We can use the same Entry multiple times.\n *o.get_mut() += 2;\n}\n\nassert_eq!(map[\"poneyland\"], 24);\n```",
- "id": 1166,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "borrowed_ref": {
- "is_mutable": true,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "borrowed_ref": {
- "is_mutable": true,
- "lifetime": null,
- "type": {
- "generic": "V"
- }
- }
- }
- }
- }
- },
- "links": {
- "Self::into_mut": 1165
- },
- "name": "get_mut",
- "span": {
- "begin": [
- 2609,
- 5
- ],
- "end": [
- 2611,
- 6
- ],
- "filename": "std/src/collections/hash/map.rs"
- },
- "visibility": "public"
- },
- "11660": {
+ "11655": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
@@ -134602,8 +132901,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts self left by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean\nindicating whether the shift value was larger than or equal to the\nnumber of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then\nused to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x1usize.overflowing_shl(4), (0x10, false));\nassert_eq!(0x1usize.overflowing_shl(132), (0x10, true));\nassert_eq!(0x10usize.overflowing_shl(63), (0, false));\n```",
- "id": 11660,
+ "docs": "Shifts self left by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean\nindicating whether the shift value was larger than or equal to the\nnumber of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then\nused to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x1u128.overflowing_shl(4), (0x10, false));\nassert_eq!(0x1u128.overflowing_shl(132), (0x10, true));\nassert_eq!(0x10u128.overflowing_shl(127), (0, false));\n```",
+ "id": 11655,
"inner": {
"function": {
"generics": {
@@ -134636,7 +132935,7 @@
"output": {
"tuple": [
{
- "primitive": "usize"
+ "primitive": "u128"
},
{
"primitive": "bool"
@@ -134650,18 +132949,18 @@
"name": "overflowing_shl",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11661": {
+ "11656": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
@@ -134677,8 +132976,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Shifts self right by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean\nindicating whether the shift value was larger than or equal to the\nnumber of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then\nused to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x10usize.overflowing_shr(4), (0x1, false));\nassert_eq!(0x10usize.overflowing_shr(132), (0x1, true));\n```",
- "id": 11661,
+ "docs": "Shifts self right by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean\nindicating whether the shift value was larger than or equal to the\nnumber of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then\nused to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x10u128.overflowing_shr(4), (0x1, false));\nassert_eq!(0x10u128.overflowing_shr(132), (0x1, true));\n```",
+ "id": 11656,
"inner": {
"function": {
"generics": {
@@ -134711,7 +133010,7 @@
"output": {
"tuple": [
{
- "primitive": "usize"
+ "primitive": "u128"
},
{
"primitive": "bool"
@@ -134725,18 +133024,18 @@
"name": "overflowing_shr",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11662": {
+ "11657": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
@@ -134752,8 +133051,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\nReturns a tuple of the exponentiation along with a bool indicating\nwhether an overflow happened.\n\n# Examples\n\n```\nassert_eq!(3usize.overflowing_pow(5), (243, false));\nassert_eq!(3u8.overflowing_pow(6), (217, true));\n```",
- "id": 11662,
+ "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\nReturns a tuple of the exponentiation along with a bool indicating\nwhether an overflow happened.\n\n# Examples\n\n```\nassert_eq!(3u128.overflowing_pow(5), (243, false));\nassert_eq!(3u8.overflowing_pow(6), (217, true));\n```",
+ "id": 11657,
"inner": {
"function": {
"generics": {
@@ -134786,7 +133085,7 @@
"output": {
"tuple": [
{
- "primitive": "usize"
+ "primitive": "u128"
},
{
"primitive": "bool"
@@ -134800,18 +133099,18 @@
"name": "overflowing_pow",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11663": {
+ "11658": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
@@ -134827,8 +133126,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\n# Examples\n\n```\nassert_eq!(2usize.pow(5), 32);\n```",
- "id": 11663,
+ "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\n# Examples\n\n```\nassert_eq!(2u128.pow(5), 32);\n```",
+ "id": 11658,
"inner": {
"function": {
"generics": {
@@ -134859,7 +133158,7 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
@@ -134868,18 +133167,18 @@
"name": "pow",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11664": {
+ "11659": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
@@ -134895,8 +133194,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the square root of the number, rounded down.\n\n# Examples\n\n```\nassert_eq!(10usize.isqrt(), 3);\n```",
- "id": 11664,
+ "docs": "Returns the square root of the number, rounded down.\n\n# Examples\n\n```\nassert_eq!(10u128.isqrt(), 3);\n```",
+ "id": 11659,
"inner": {
"function": {
"generics": {
@@ -134921,7 +133220,7 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
@@ -134930,38 +133229,30 @@
"name": "isqrt",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11665": {
+ "1166": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
- },
- {
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
- "other": "#[attr = TrackCaller]"
+ "other": "#[attr = Inline(Hint)]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Performs Euclidean division.\n\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7usize.div_euclid(4), 1); // or any other integer type\n```",
- "id": 11665,
+ "docs": "Gets a mutable reference to the value in the entry.\n\nIf you need a reference to the `OccupiedEntry` which may outlive the\ndestruction of the `Entry` value, see [`into_mut`].\n\n[`into_mut`]: Self::into_mut\n\n# Examples\n\n```\nuse std::collections::HashMap;\nuse std::collections::hash_map::Entry;\n\nlet mut map: HashMap<&str, u32> = HashMap::new();\nmap.entry(\"poneyland\").or_insert(12);\n\nassert_eq!(map[\"poneyland\"], 12);\nif let Entry::Occupied(mut o) = map.entry(\"poneyland\") {\n *o.get_mut() += 10;\n assert_eq!(*o.get(), 22);\n\n // We can use the same Entry multiple times.\n *o.get_mut() += 2;\n}\n\nassert_eq!(map[\"poneyland\"], 24);\n```",
+ "id": 1166,
"inner": {
"function": {
"generics": {
@@ -134972,7 +133263,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -134980,43 +133271,48 @@
[
"self",
{
- "generic": "Self"
- }
- ],
- [
- "rhs",
- {
- "primitive": "usize"
+ "borrowed_ref": {
+ "is_mutable": true,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "borrowed_ref": {
+ "is_mutable": true,
+ "lifetime": null,
+ "type": {
+ "generic": "V"
+ }
+ }
}
}
}
},
- "links": {},
- "name": "div_euclid",
+ "links": {
+ "Self::into_mut": 1165
+ },
+ "name": "get_mut",
"span": {
"begin": [
- 1248,
+ 2604,
5
],
"end": [
- 1266,
+ 2606,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/collections/hash/map.rs"
},
"visibility": "public"
},
- "11666": {
+ "11660": {
"attrs": [
- {
- "other": "#[doc(alias = \"modulo\", alias = \"mod\")]"
- },
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
@@ -135034,8 +133330,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the least remainder of `self (mod rhs)`.\n\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self % rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7usize.rem_euclid(4), 3); // or any other integer type\n```",
- "id": 11666,
+ "docs": "Performs Euclidean division.\n\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7u128.div_euclid(4), 1); // or any other integer type\n```",
+ "id": 11660,
"inner": {
"function": {
"generics": {
@@ -135060,36 +133356,42 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
"links": {},
- "name": "rem_euclid",
+ "name": "div_euclid",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11667": {
+ "11661": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ "other": "#[doc(alias = \"modulo\", alias = \"mod\")]"
+ },
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
},
{
"must_use": {
@@ -135102,8 +133404,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards negative infinity.\n\nThis is the same as performing `self / rhs` for all unsigned integers.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(7_usize.div_floor(4), 1);\n```",
- "id": 11667,
+ "docs": "Calculates the least remainder of `self (mod rhs)`.\n\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self % rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7u128.rem_euclid(4), 3); // or any other integer type\n```",
+ "id": 11661,
"inner": {
"function": {
"generics": {
@@ -135128,39 +133430,36 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
"links": {},
- "name": "div_floor",
+ "name": "rem_euclid",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11668": {
+ "11662": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
},
{
"must_use": {
@@ -135173,8 +133472,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards positive infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7_usize.div_ceil(4), 2);\n```",
- "id": 11668,
+ "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards negative infinity.\n\nThis is the same as performing `self / rhs` for all unsigned integers.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(7_u128.div_floor(4), 1);\n```",
+ "id": 11662,
"inner": {
"function": {
"generics": {
@@ -135199,33 +133498,33 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
"links": {},
- "name": "div_ceil",
+ "name": "div_floor",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11669": {
+ "11663": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
@@ -135237,12 +133536,15 @@
"must_use": {
"reason": "this returns the result of the operation, without modifying the original"
}
+ },
+ {
+ "other": "#[attr = TrackCaller]"
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the smallest value greater than or equal to `self` that\nis a multiple of `rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nOn overflow, this function will panic if overflow checks are enabled (default in debug\nmode) and wrap if overflow checks are disabled (default in release mode).\n\n# Examples\n\n```\nassert_eq!(16_usize.next_multiple_of(8), 16);\nassert_eq!(23_usize.next_multiple_of(8), 24);\n```",
- "id": 11669,
+ "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards positive infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7_u128.div_ceil(4), 2);\n```",
+ "id": 11663,
"inner": {
"function": {
"generics": {
@@ -135267,45 +133569,50 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
"links": {},
- "name": "next_multiple_of",
+ "name": "div_ceil",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "1167": {
+ "11664": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
},
{
- "other": "#[attr = Inline(Hint)]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
- "crate_id": 0,
+ "crate_id": 1,
"deprecation": null,
- "docs": "Sets the value of the entry, and returns the entry's old value.\n\n# Examples\n\n```\nuse std::collections::HashMap;\nuse std::collections::hash_map::Entry;\n\nlet mut map: HashMap<&str, u32> = HashMap::new();\nmap.entry(\"poneyland\").or_insert(12);\n\nif let Entry::Occupied(mut o) = map.entry(\"poneyland\") {\n assert_eq!(o.insert(15), 12);\n}\n\nassert_eq!(map[\"poneyland\"], 15);\n```",
- "id": 1167,
+ "docs": "Calculates the smallest value greater than or equal to `self` that\nis a multiple of `rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nOn overflow, this function will panic if overflow checks are enabled (default in debug\nmode) and wrap if overflow checks are disabled (default in release mode).\n\n# Examples\n\n```\nassert_eq!(16_u128.next_multiple_of(8), 16);\nassert_eq!(23_u128.next_multiple_of(8), 24);\n```",
+ "id": 11664,
"inner": {
"function": {
"generics": {
@@ -135316,7 +133623,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -135324,45 +133631,39 @@
[
"self",
{
- "borrowed_ref": {
- "is_mutable": true,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
+ "generic": "Self"
}
],
[
- "value",
+ "rhs",
{
- "generic": "V"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "generic": "V"
+ "primitive": "u128"
}
}
}
},
"links": {},
- "name": "insert",
+ "name": "next_multiple_of",
"span": {
"begin": [
- 2661,
+ 1186,
5
],
"end": [
- 2663,
+ 1209,
6
],
- "filename": "std/src/collections/hash/map.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11670": {
+ "11665": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
@@ -135378,8 +133679,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the smallest value greater than or equal to `self` that\nis a multiple of `rhs`. Returns `None` if `rhs` is zero or the\noperation would result in overflow.\n\n# Examples\n\n```\nassert_eq!(16_usize.checked_next_multiple_of(8), Some(16));\nassert_eq!(23_usize.checked_next_multiple_of(8), Some(24));\nassert_eq!(1_usize.checked_next_multiple_of(0), None);\nassert_eq!(usize::MAX.checked_next_multiple_of(2), None);\n```",
- "id": 11670,
+ "docs": "Calculates the smallest value greater than or equal to `self` that\nis a multiple of `rhs`. Returns `None` if `rhs` is zero or the\noperation would result in overflow.\n\n# Examples\n\n```\nassert_eq!(16_u128.checked_next_multiple_of(8), Some(16));\nassert_eq!(23_u128.checked_next_multiple_of(8), Some(24));\nassert_eq!(1_u128.checked_next_multiple_of(0), None);\nassert_eq!(u128::MAX.checked_next_multiple_of(2), None);\n```",
+ "id": 11665,
"inner": {
"function": {
"generics": {
@@ -135404,7 +133705,7 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
@@ -135416,7 +133717,7 @@
"args": [
{
"type": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
],
@@ -135434,18 +133735,18 @@
"name": "checked_next_multiple_of",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11671": {
+ "11666": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unsigned_is_multiple_of\",\npromotable: false}}]"
@@ -135461,8 +133762,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `true` if `self` is an integer multiple of `rhs`, and false otherwise.\n\nThis function is equivalent to `self % rhs == 0`, except that it will not panic\nfor `rhs == 0`. Instead, `0.is_multiple_of(0) == true`, and for any non-zero `n`,\n`n.is_multiple_of(0) == false`.\n\n# Examples\n\n```\nassert!(6_usize.is_multiple_of(2));\nassert!(!5_usize.is_multiple_of(2));\n\nassert!(0_usize.is_multiple_of(0));\nassert!(!6_usize.is_multiple_of(0));\n```",
- "id": 11671,
+ "docs": "Returns `true` if `self` is an integer multiple of `rhs`, and false otherwise.\n\nThis function is equivalent to `self % rhs == 0`, except that it will not panic\nfor `rhs == 0`. Instead, `0.is_multiple_of(0) == true`, and for any non-zero `n`,\n`n.is_multiple_of(0) == false`.\n\n# Examples\n\n```\nassert!(6_u128.is_multiple_of(2));\nassert!(!5_u128.is_multiple_of(2));\n\nassert!(0_u128.is_multiple_of(0));\nassert!(!6_u128.is_multiple_of(0));\n```",
+ "id": 11666,
"inner": {
"function": {
"generics": {
@@ -135487,7 +133788,7 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
@@ -135502,18 +133803,18 @@
"name": "is_multiple_of",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11672": {
+ "11667": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_is_power_of_two\", promotable: false}}]"
@@ -135529,8 +133830,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns `true` if and only if `self == 2^k` for some unsigned integer `k`.\n\n# Examples\n\n```\nassert!(16usize.is_power_of_two());\nassert!(!10usize.is_power_of_two());\n```",
- "id": 11672,
+ "docs": "Returns `true` if and only if `self == 2^k` for some unsigned integer `k`.\n\n# Examples\n\n```\nassert!(16u128.is_power_of_two());\nassert!(!10u128.is_power_of_two());\n```",
+ "id": 11667,
"inner": {
"function": {
"generics": {
@@ -135564,18 +133865,18 @@
"name": "is_power_of_two",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11673": {
+ "11668": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
@@ -135591,8 +133892,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the smallest power of two greater than or equal to `self`.\n\nWhen return value overflows (i.e., `self > (1 << (N-1))` for type\n`uN`), it panics in debug mode and the return value is wrapped to 0 in\nrelease mode (the only situation in which this method can return 0).\n\n# Examples\n\n```\nassert_eq!(2usize.next_power_of_two(), 2);\nassert_eq!(3usize.next_power_of_two(), 4);\nassert_eq!(0usize.next_power_of_two(), 1);\n```",
- "id": 11673,
+ "docs": "Returns the smallest power of two greater than or equal to `self`.\n\nWhen return value overflows (i.e., `self > (1 << (N-1))` for type\n`uN`), it panics in debug mode and the return value is wrapped to 0 in\nrelease mode (the only situation in which this method can return 0).\n\n# Examples\n\n```\nassert_eq!(2u128.next_power_of_two(), 2);\nassert_eq!(3u128.next_power_of_two(), 4);\nassert_eq!(0u128.next_power_of_two(), 1);\n```",
+ "id": 11668,
"inner": {
"function": {
"generics": {
@@ -135617,7 +133918,7 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
@@ -135626,18 +133927,18 @@
"name": "next_power_of_two",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11674": {
+ "11669": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
@@ -135653,8 +133954,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the smallest power of two greater than or equal to `self`. If\nthe next power of two is greater than the type's maximum value,\n`None` is returned, otherwise the power of two is wrapped in `Some`.\n\n# Examples\n\n```\nassert_eq!(2usize.checked_next_power_of_two(), Some(2));\nassert_eq!(3usize.checked_next_power_of_two(), Some(4));\nassert_eq!(usize::MAX.checked_next_power_of_two(), None);\n```",
- "id": 11674,
+ "docs": "Returns the smallest power of two greater than or equal to `self`. If\nthe next power of two is greater than the type's maximum value,\n`None` is returned, otherwise the power of two is wrapped in `Some`.\n\n# Examples\n\n```\nassert_eq!(2u128.checked_next_power_of_two(), Some(2));\nassert_eq!(3u128.checked_next_power_of_two(), Some(4));\nassert_eq!(u128::MAX.checked_next_power_of_two(), None);\n```",
+ "id": 11669,
"inner": {
"function": {
"generics": {
@@ -135685,7 +133986,7 @@
"args": [
{
"type": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
],
@@ -135703,32 +134004,30 @@
"name": "checked_next_power_of_two",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11675": {
+ "1167": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"needs decision on wrapping behavior\"),\nissue: 32463, is_soft: false}, feature: \"wrapping_next_power_of_two\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
{
- "must_use": {
- "reason": "this returns the result of the operation, without modifying the original"
- }
+ "other": "#[attr = Inline(Hint)]"
}
],
- "crate_id": 1,
+ "crate_id": 0,
"deprecation": null,
- "docs": "Returns the smallest power of two greater than or equal to `n`. If\nthe next power of two is greater than the type's maximum value,\nthe return value is wrapped to `0`.\n\n# Examples\n\n```\n#![feature(wrapping_next_power_of_two)]\n\nassert_eq!(2usize.wrapping_next_power_of_two(), 2);\nassert_eq!(3usize.wrapping_next_power_of_two(), 4);\nassert_eq!(usize::MAX.wrapping_next_power_of_two(), 0);\n```",
- "id": 11675,
+ "docs": "Sets the value of the entry, and returns the entry's old value.\n\n# Examples\n\n```\nuse std::collections::HashMap;\nuse std::collections::hash_map::Entry;\n\nlet mut map: HashMap<&str, u32> = HashMap::new();\nmap.entry(\"poneyland\").or_insert(12);\n\nif let Entry::Occupied(mut o) = map.entry(\"poneyland\") {\n assert_eq!(o.insert(15), 12);\n}\n\nassert_eq!(map[\"poneyland\"], 15);\n```",
+ "id": 1167,
"inner": {
"function": {
"generics": {
@@ -135739,7 +134038,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": true,
+ "is_const": false,
"is_unsafe": false
},
"sig": {
@@ -135747,39 +134046,48 @@
[
"self",
{
- "generic": "Self"
+ "borrowed_ref": {
+ "is_mutable": true,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
+ }
+ ],
+ [
+ "value",
+ {
+ "generic": "V"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "generic": "V"
}
}
}
},
"links": {},
- "name": "wrapping_next_power_of_two",
+ "name": "insert",
"span": {
"begin": [
- 1248,
+ 2656,
5
],
"end": [
- 1266,
+ 2658,
6
],
- "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ "filename": "std/src/collections/hash/map.rs"
},
"visibility": "public"
},
- "11676": {
+ "11670": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"needs decision on wrapping behavior\"),\nissue: 32463, is_soft: false}, feature: \"wrapping_next_power_of_two\"}}]"
},
{
"must_use": {
@@ -135789,8 +134097,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nbig-endian (network) byte order.\n\n\n**Note**: This function returns an array of length 2, 4 or 8 bytes\ndepending on the target pointer size.\n\n# Examples\n\n```\nlet bytes = 0x1234567890123456usize.to_be_bytes();\nassert_eq!(bytes, [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]);\n```",
- "id": 11676,
+ "docs": "Returns the smallest power of two greater than or equal to `n`. If\nthe next power of two is greater than the type's maximum value,\nthe return value is wrapped to `0`.\n\n# Examples\n\n```\n#![feature(wrapping_next_power_of_two)]\n\nassert_eq!(2u128.wrapping_next_power_of_two(), 2);\nassert_eq!(3u128.wrapping_next_power_of_two(), 4);\nassert_eq!(u128::MAX.wrapping_next_power_of_two(), 0);\n```",
+ "id": 11670,
"inner": {
"function": {
"generics": {
@@ -135815,32 +134123,27 @@
],
"is_c_variadic": false,
"output": {
- "array": {
- "len": "8",
- "type": {
- "primitive": "u8"
- }
- }
+ "primitive": "u128"
}
}
}
},
"links": {},
- "name": "to_be_bytes",
+ "name": "wrapping_next_power_of_two",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11677": {
+ "11671": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
@@ -135856,8 +134159,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nlittle-endian byte order.\n\n\n**Note**: This function returns an array of length 2, 4 or 8 bytes\ndepending on the target pointer size.\n\n# Examples\n\n```\nlet bytes = 0x1234567890123456usize.to_le_bytes();\nassert_eq!(bytes, [0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]);\n```",
- "id": 11677,
+ "docs": "Returns the memory representation of this integer as a byte array in\nbig-endian (network) byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x12345678901234567890123456789012u128.to_be_bytes();\nassert_eq!(bytes, [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]);\n```",
+ "id": 11671,
"inner": {
"function": {
"generics": {
@@ -135883,7 +134186,7 @@
"is_c_variadic": false,
"output": {
"array": {
- "len": "8",
+ "len": "16",
"type": {
"primitive": "u8"
}
@@ -135893,21 +134196,21 @@
}
},
"links": {},
- "name": "to_le_bytes",
+ "name": "to_be_bytes",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11678": {
+ "11672": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
@@ -135923,8 +134226,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Returns the memory representation of this integer as a byte array in\nnative byte order.\n\nAs the target platform's native endianness is used, portable code\nshould use [`to_be_bytes`] or [`to_le_bytes`], as appropriate,\ninstead.\n\n\n**Note**: This function returns an array of length 2, 4 or 8 bytes\ndepending on the target pointer size.\n\n[`to_be_bytes`]: Self::to_be_bytes\n[`to_le_bytes`]: Self::to_le_bytes\n\n# Examples\n\n```\nlet bytes = 0x1234567890123456usize.to_ne_bytes();\nassert_eq!(\n bytes,\n if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]\n } else {\n [0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]\n }\n);\n```",
- "id": 11678,
+ "docs": "Returns the memory representation of this integer as a byte array in\nlittle-endian byte order.\n\n\n\n# Examples\n\n```\nlet bytes = 0x12345678901234567890123456789012u128.to_le_bytes();\nassert_eq!(bytes, [0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]);\n```",
+ "id": 11672,
"inner": {
"function": {
"generics": {
@@ -135950,7 +134253,7 @@
"is_c_variadic": false,
"output": {
"array": {
- "len": "8",
+ "len": "16",
"type": {
"primitive": "u8"
}
@@ -135959,25 +134262,22 @@
}
}
},
- "links": {
- "Self::to_be_bytes": 11676,
- "Self::to_le_bytes": 11677
- },
- "name": "to_ne_bytes",
+ "links": {},
+ "name": "to_le_bytes",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11679": {
+ "11673": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
@@ -135987,14 +134287,14 @@
},
{
"must_use": {
- "reason": null
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
],
"crate_id": 1,
"deprecation": null,
- "docs": "Creates a native endian integer value from its representation\nas a byte array in big endian.\n\n\n**Note**: This function takes an array of length 2, 4 or 8 bytes\ndepending on the target pointer size.\n\n# Examples\n\n```\nlet value = usize::from_be_bytes([0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]);\nassert_eq!(value, 0x1234567890123456);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_be_usize(input: &mut &[u8]) -> usize {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n usize::from_be_bytes(int_bytes.try_into().unwrap())\n}\n```",
- "id": 11679,
+ "docs": "Returns the memory representation of this integer as a byte array in\nnative byte order.\n\nAs the target platform's native endianness is used, portable code\nshould use [`to_be_bytes`] or [`to_le_bytes`], as appropriate,\ninstead.\n\n\n\n[`to_be_bytes`]: Self::to_be_bytes\n[`to_le_bytes`]: Self::to_le_bytes\n\n# Examples\n\n```\nlet bytes = 0x12345678901234567890123456789012u128.to_ne_bytes();\nassert_eq!(\n bytes,\n if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]\n } else {\n [0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]\n }\n);\n```",
+ "id": 11673,
"inner": {
"function": {
"generics": {
@@ -136011,52 +134311,60 @@
"sig": {
"inputs": [
[
- "bytes",
+ "self",
{
- "array": {
- "len": "8",
- "type": {
- "primitive": "u8"
- }
- }
+ "generic": "Self"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "array": {
+ "len": "16",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
}
}
},
- "links": {},
- "name": "from_be_bytes",
+ "links": {
+ "Self::to_be_bytes": 11671,
+ "Self::to_le_bytes": 11672
+ },
+ "name": "to_ne_bytes",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "1168": {
+ "11674": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
},
{
- "other": "#[attr = Inline(Hint)]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": null
+ }
}
],
- "crate_id": 0,
+ "crate_id": 1,
"deprecation": null,
- "docs": "Takes the value out of the entry, and returns it.\n\n# Examples\n\n```\nuse std::collections::HashMap;\nuse std::collections::hash_map::Entry;\n\nlet mut map: HashMap<&str, u32> = HashMap::new();\nmap.entry(\"poneyland\").or_insert(12);\n\nif let Entry::Occupied(o) = map.entry(\"poneyland\") {\n assert_eq!(o.remove(), 12);\n}\n\nassert_eq!(map.contains_key(\"poneyland\"), false);\n```",
- "id": 1168,
+ "docs": "Creates a native endian integer value from its representation\nas a byte array in big endian.\n\n\n\n# Examples\n\n```\nlet value = u128::from_be_bytes([0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]);\nassert_eq!(value, 0x12345678901234567890123456789012);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_be_u128(input: &mut &[u8]) -> u128 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n u128::from_be_bytes(int_bytes.try_into().unwrap())\n}\n```",
+ "id": 11674,
"inner": {
"function": {
"generics": {
@@ -136067,41 +134375,46 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
"inputs": [
[
- "self",
+ "bytes",
{
- "generic": "Self"
+ "array": {
+ "len": "16",
+ "type": {
+ "primitive": "u8"
+ }
+ }
}
]
],
"is_c_variadic": false,
"output": {
- "generic": "V"
+ "primitive": "u128"
}
}
}
},
"links": {},
- "name": "remove",
+ "name": "from_be_bytes",
"span": {
"begin": [
- 2684,
+ 1186,
5
],
"end": [
- 2686,
+ 1209,
6
],
- "filename": "std/src/collections/hash/map.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11680": {
+ "11675": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
@@ -136117,8 +134430,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Creates a native endian integer value from its representation\nas a byte array in little endian.\n\n\n**Note**: This function takes an array of length 2, 4 or 8 bytes\ndepending on the target pointer size.\n\n# Examples\n\n```\nlet value = usize::from_le_bytes([0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]);\nassert_eq!(value, 0x1234567890123456);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_le_usize(input: &mut &[u8]) -> usize {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n usize::from_le_bytes(int_bytes.try_into().unwrap())\n}\n```",
- "id": 11680,
+ "docs": "Creates a native endian integer value from its representation\nas a byte array in little endian.\n\n\n\n# Examples\n\n```\nlet value = u128::from_le_bytes([0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]);\nassert_eq!(value, 0x12345678901234567890123456789012);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_le_u128(input: &mut &[u8]) -> u128 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n u128::from_le_bytes(int_bytes.try_into().unwrap())\n}\n```",
+ "id": 11675,
"inner": {
"function": {
"generics": {
@@ -136138,7 +134451,7 @@
"bytes",
{
"array": {
- "len": "8",
+ "len": "16",
"type": {
"primitive": "u8"
}
@@ -136148,7 +134461,7 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
@@ -136157,18 +134470,18 @@
"name": "from_le_bytes",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11681": {
+ "11676": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
@@ -136184,8 +134497,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Creates a native endian integer value from its memory representation\nas a byte array in native endianness.\n\nAs the target platform's native endianness is used, portable code\nlikely wants to use [`from_be_bytes`] or [`from_le_bytes`], as\nappropriate instead.\n\n[`from_be_bytes`]: Self::from_be_bytes\n[`from_le_bytes`]: Self::from_le_bytes\n\n\n**Note**: This function takes an array of length 2, 4 or 8 bytes\ndepending on the target pointer size.\n\n# Examples\n\n```\nlet value = usize::from_ne_bytes(if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]\n} else {\n [0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]\n});\nassert_eq!(value, 0x1234567890123456);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_ne_usize(input: &mut &[u8]) -> usize {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n usize::from_ne_bytes(int_bytes.try_into().unwrap())\n}\n```",
- "id": 11681,
+ "docs": "Creates a native endian integer value from its memory representation\nas a byte array in native endianness.\n\nAs the target platform's native endianness is used, portable code\nlikely wants to use [`from_be_bytes`] or [`from_le_bytes`], as\nappropriate instead.\n\n[`from_be_bytes`]: Self::from_be_bytes\n[`from_le_bytes`]: Self::from_le_bytes\n\n\n\n# Examples\n\n```\nlet value = u128::from_ne_bytes(if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56, 0x78, 0x90, 0x12]\n} else {\n [0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]\n});\nassert_eq!(value, 0x12345678901234567890123456789012);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_ne_u128(input: &mut &[u8]) -> u128 {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n u128::from_ne_bytes(int_bytes.try_into().unwrap())\n}\n```",
+ "id": 11676,
"inner": {
"function": {
"generics": {
@@ -136205,7 +134518,7 @@
"bytes",
{
"array": {
- "len": "8",
+ "len": "16",
"type": {
"primitive": "u8"
}
@@ -136215,33 +134528,33 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
"links": {
- "Self::from_be_bytes": 11679,
- "Self::from_le_bytes": 11680
+ "Self::from_be_bytes": 11674,
+ "Self::from_le_bytes": 11675
},
"name": "from_ne_bytes",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11682": {
+ "11677": {
"attrs": [
{
- "other": "#[rustc_diagnostic_item = \"usize_legacy_fn_min_value\"]"
+ "other": "#[rustc_diagnostic_item = \"u128_legacy_fn_min_value\"]"
},
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
@@ -136255,8 +134568,8 @@
"note": "replaced by the `MIN` associated constant on this type",
"since": "TBD"
},
- "docs": "New code should prefer to use\n[`usize::MIN`] instead.\n\nReturns the smallest value that can be represented by this integer type.",
- "id": 11682,
+ "docs": "New code should prefer to use\n[`u128::MIN`] instead.\n\nReturns the smallest value that can be represented by this integer type.",
+ "id": 11677,
"inner": {
"function": {
"generics": {
@@ -136274,32 +134587,32 @@
"inputs": [],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
"links": {
- "`usize::MIN`": 11559
+ "`u128::MIN`": 11548
},
"name": "min_value",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11683": {
+ "11678": {
"attrs": [
{
- "other": "#[rustc_diagnostic_item = \"usize_legacy_fn_max_value\"]"
+ "other": "#[rustc_diagnostic_item = \"u128_legacy_fn_max_value\"]"
},
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
@@ -136313,8 +134626,8 @@
"note": "replaced by the `MAX` associated constant on this type",
"since": "TBD"
},
- "docs": "New code should prefer to use\n[`usize::MAX`] instead.\n\nReturns the largest value that can be represented by this integer type.",
- "id": 11683,
+ "docs": "New code should prefer to use\n[`u128::MAX`] instead.\n\nReturns the largest value that can be represented by this integer type.",
+ "id": 11678,
"inner": {
"function": {
"generics": {
@@ -136332,29 +134645,29 @@
"inputs": [],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
},
"links": {
- "`usize::MAX`": 11560
+ "`u128::MAX`": 11549
},
"name": "max_value",
"span": {
"begin": [
- 1248,
+ 1186,
5
],
"end": [
- 1266,
+ 1209,
6
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11684": {
+ "11679": {
"attrs": [
{
"other": "#[doc(alias = \"average_floor\")]"
@@ -136376,8 +134689,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Calculates the midpoint (average) between `self` and `rhs`.\n\n`midpoint(a, b)` is `(a + b) / 2` as if it were performed in a\nsufficiently-large unsigned integral type. This implies that the result is\nalways rounded towards zero and that no overflow will ever occur.\n\n# Examples\n\n```\nassert_eq!(0usize.midpoint(4), 2);\nassert_eq!(1usize.midpoint(4), 2);\n```",
- "id": 11684,
+ "docs": "Calculates the midpoint (average) between `self` and `rhs`.\n\n`midpoint(a, b)` is `(a + b) / 2` as if it were performed in a\nsufficiently-large unsigned integral type. This implies that the result is\nalways rounded towards zero and that no overflow will ever occur.\n\n# Examples\n\n```\nassert_eq!(0u128.midpoint(4), 2);\nassert_eq!(1u128.midpoint(4), 2);\n```",
+ "id": 11679,
"inner": {
"function": {
"generics": {
@@ -136402,13 +134715,13 @@
[
"rhs",
{
- "primitive": "usize"
+ "primitive": "u128"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
}
@@ -136417,28 +134730,85 @@
"name": "midpoint",
"span": {
"begin": [
- 1267,
+ 1210,
5
],
"end": [
- 1267,
- 45
+ 1210,
+ 38
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11685": {
+ "1168": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": "Takes the value out of the entry, and returns it.\n\n# Examples\n\n```\nuse std::collections::HashMap;\nuse std::collections::hash_map::Entry;\n\nlet mut map: HashMap<&str, u32> = HashMap::new();\nmap.entry(\"poneyland\").or_insert(12);\n\nif let Entry::Occupied(o) = map.entry(\"poneyland\") {\n assert_eq!(o.remove(), 12);\n}\n\nassert_eq!(map.contains_key(\"poneyland\"), false);\n```",
+ "id": 1168,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "generic": "V"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "remove",
+ "span": {
+ "begin": [
+ 2679,
+ 5
+ ],
+ "end": [
+ 2681,
+ 6
+ ],
+ "filename": "std/src/collections/hash/map.rs"
+ },
+ "visibility": "public"
+ },
+ "11680": {
"attrs": [],
"crate_id": 1,
"deprecation": null,
"docs": null,
- "id": 11685,
+ "id": 11680,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
- "primitive": "usize"
+ "primitive": "u128"
},
"generics": {
"params": [],
@@ -136448,11 +134818,22 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 11548,
+ 11549,
+ 11550,
+ 11551,
+ 11552,
+ 11554,
+ 11555,
+ 11556,
+ 11557,
+ 11558,
11559,
11560,
11561,
11562,
11563,
+ 11564,
11565,
11566,
11567,
@@ -136464,31 +134845,32 @@
11573,
11574,
11575,
- 11576,
11577,
11578,
11579,
11580,
11581,
- 11582,
11583,
11584,
+ 11585,
11586,
11587,
11588,
- 11589,
11590,
+ 11591,
11592,
11593,
11594,
11595,
11596,
11597,
+ 11598,
11599,
11600,
11601,
11602,
11603,
+ 11553,
11604,
11605,
11606,
@@ -136498,7 +134880,6 @@
11610,
11611,
11612,
- 11564,
11613,
11614,
11615,
@@ -136517,34 +134898,34 @@
11628,
11629,
11630,
+ 11576,
11631,
+ 11582,
11632,
+ 11589,
11633,
11634,
11635,
- 11585,
11636,
- 11591,
11637,
- 11598,
11638,
11639,
11640,
11641,
+ 10920,
11642,
11643,
+ 10924,
11644,
11645,
- 11646,
- 11505,
11647,
- 11648,
- 11509,
11649,
+ 11646,
+ 11648,
11650,
11651,
- 11653,
11652,
+ 11653,
11654,
11655,
11656,
@@ -136570,12 +134951,7 @@
11676,
11677,
11678,
- 11679,
- 11680,
- 11681,
- 11682,
- 11683,
- 11684
+ 11679
],
"provided_trait_methods": [],
"trait": null
@@ -136585,18 +134961,18 @@
"name": null,
"span": {
"begin": [
- 1247,
+ 1185,
1
],
"end": [
- 1247,
- 11
+ 1185,
+ 10
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "default"
},
- "11686": {
+ "11681": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 82, patch: 0})}, feature: \"const_int_from_str\", promotable: false}}]"
@@ -136607,8 +134983,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from a string slice with digits in a given base.\n\nThe string is expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\nassert_eq!(usize::from_str_radix(\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\nassert!(usize::from_str_radix(\"1 \", 10).is_err());\n```",
- "id": 11686,
+ "docs": "Parses an integer from a string slice with digits in a given base.\n\nThe string is expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# See also\nIf the string to be parsed is in base 10 (decimal),\n[`from_str`] or [`str::parse`] can also be used.\n\n[`from_str`]: #method.from_str\n[`str::parse`]: primitive.str.html#method.parse\n\n# Examples\n\n```\nassert_eq!(u128::from_str_radix(\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\nassert!(u128::from_str_radix(\"1 \", 10).is_err());\n```",
+ "id": 11681,
"inner": {
"function": {
"generics": {
@@ -136651,14 +135027,14 @@
"args": [
{
"type": {
- "primitive": "usize"
+ "primitive": "u128"
}
},
{
"type": {
"resolved_path": {
"args": null,
- "id": 4784,
+ "id": 4786,
"path": "ParseIntError"
}
}
@@ -136678,18 +135054,18 @@
"name": "from_str_radix",
"span": {
"begin": [
- 1631,
+ 1667,
1
],
"end": [
- 1631,
+ 1667,
58
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11687": {
+ "11682": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
@@ -136697,8 +135073,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from an ASCII-byte slice with decimal digits.\n\nThe characters are expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(usize::from_ascii(b\"+10\"), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(usize::from_ascii(b\"1 \").is_err());\n```",
- "id": 11687,
+ "docs": "Parses an integer from an ASCII-byte slice with decimal digits.\n\nThe characters are expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(u128::from_ascii(b\"+10\"), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(u128::from_ascii(b\"1 \").is_err());\n```",
+ "id": 11682,
"inner": {
"function": {
"generics": {
@@ -136737,14 +135113,14 @@
"args": [
{
"type": {
- "primitive": "usize"
+ "primitive": "u128"
}
},
{
"type": {
"resolved_path": {
"args": null,
- "id": 4784,
+ "id": 4786,
"path": "ParseIntError"
}
}
@@ -136764,18 +135140,18 @@
"name": "from_ascii",
"span": {
"begin": [
- 1631,
+ 1667,
1
],
"end": [
- 1631,
+ 1667,
58
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11688": {
+ "11683": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
@@ -136783,8 +135159,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Parses an integer from an ASCII-byte slice with digits in a given base.\n\nThe characters are expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(usize::from_ascii_radix(b\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(usize::from_ascii_radix(b\"1 \", 10).is_err());\n```",
- "id": 11688,
+ "docs": "Parses an integer from an ASCII-byte slice with digits in a given base.\n\nThe characters are expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(u128::from_ascii_radix(b\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(u128::from_ascii_radix(b\"1 \", 10).is_err());\n```",
+ "id": 11683,
"inner": {
"function": {
"generics": {
@@ -136829,14 +135205,14 @@
"args": [
{
"type": {
- "primitive": "usize"
+ "primitive": "u128"
}
},
{
"type": {
"resolved_path": {
"args": null,
- "id": 4784,
+ "id": 4786,
"path": "ParseIntError"
}
}
@@ -136856,28 +135232,28 @@
"name": "from_ascii_radix",
"span": {
"begin": [
- 1631,
+ 1667,
1
],
"end": [
- 1631,
+ 1667,
58
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11689": {
+ "11684": {
"attrs": [],
"crate_id": 1,
"deprecation": null,
"docs": null,
- "id": 11689,
+ "id": 11684,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
- "primitive": "usize"
+ "primitive": "u128"
},
"generics": {
"params": [],
@@ -136887,9 +135263,9 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 11686,
- 11687,
- 11688
+ 11681,
+ 11682,
+ 11683
],
"provided_trait_methods": [],
"trait": null
@@ -136899,117 +135275,18 @@
"name": null,
"span": {
"begin": [
- 1631,
+ 1667,
1
],
"end": [
- 1631,
+ 1667,
58
],
"filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "default"
},
- "1169": {
- "attrs": [],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 1169,
- "inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 1132,
- "path": "OccupiedEntry"
- }
- },
- "generics": {
- "params": [
- {
- "kind": {
- "lifetime": {
- "outlives": []
- }
- },
- "name": "'a"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "K"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "V"
- }
- ],
- "where_predicates": []
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 1162,
- 1163,
- 1164,
- 1166,
- 1165,
- 1167,
- 1168
- ],
- "provided_trait_methods": [],
- "trait": null
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 2517,
- 1
- ],
- "end": [
- 2687,
- 2
- ],
- "filename": "std/src/collections/hash/map.rs"
- },
- "visibility": "default"
- },
- "11690": {
+ "11685": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 138215, is_soft: false}, feature: \"int_format_into\"}}]"
@@ -137017,8 +135294,8 @@
],
"crate_id": 1,
"deprecation": null,
- "docs": "Allows users to write an integer (in signed decimal format) into a variable `buf` of\ntype [`NumBuffer`] that is passed by the caller by mutable reference.\n\n# Examples\n\n```\n#![feature(int_format_into)]\nuse core::fmt::NumBuffer;\n\nlet n = 0usize;\nlet mut buf = NumBuffer::new();\nassert_eq!(n.format_into(&mut buf), \"0\");\n\nlet n1 = 32usize;\nassert_eq!(n1.format_into(&mut buf), \"32\");\n\nlet n2 = usize :: MAX;\nassert_eq!(n2.format_into(&mut buf), usize :: MAX.to_string());\n```",
- "id": 11690,
+ "docs": "Allows users to write an integer (in signed decimal format) into a variable `buf` of\ntype [`NumBuffer`] that is passed by the caller by mutable reference.\n\n# Examples\n\n```\n#![feature(int_format_into)]\nuse core::fmt::NumBuffer;\n\nlet n = 0u128;\nlet mut buf = NumBuffer::new();\nassert_eq!(n.format_into(&mut buf), \"0\");\n\nlet n1 = 32u128;\nlet mut buf1 = NumBuffer::new();\nassert_eq!(n1.format_into(&mut buf1), \"32\");\n\nlet n2 = u128::MAX;\nlet mut buf2 = NumBuffer::new();\nassert_eq!(n2.format_into(&mut buf2), u128::MAX.to_string());\n```",
+ "id": 11685,
"inner": {
"function": {
"generics": {
@@ -137053,14 +135330,14 @@
"args": [
{
"type": {
- "primitive": "usize"
+ "primitive": "u128"
}
}
],
"constraints": []
}
},
- "id": 10162,
+ "id": 10387,
"path": "NumBuffer"
}
}
@@ -137082,33 +135359,33 @@
}
},
"links": {
- "`NumBuffer`": 10162
+ "`NumBuffer`": 10387
},
"name": "format_into",
"span": {
"begin": [
- 562,
+ 761,
5
],
"end": [
- 562,
- 95
+ 761,
+ 64
],
"filename": "checkouts/rust/library/core/src/fmt/num.rs"
},
"visibility": "public"
},
- "11691": {
+ "11686": {
"attrs": [],
"crate_id": 1,
"deprecation": null,
"docs": null,
- "id": 11691,
+ "id": 11686,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
- "primitive": "usize"
+ "primitive": "u128"
},
"generics": {
"params": [],
@@ -137118,7 +135395,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 11690
+ 11685
],
"provided_trait_methods": [],
"trait": null
@@ -137128,27 +135405,21 @@
"name": null,
"span": {
"begin": [
- 562,
- 5
+ 639,
+ 1
],
"end": [
- 562,
- 95
+ 639,
+ 10
],
"filename": "checkouts/rust/library/core/src/fmt/num.rs"
},
"visibility": "default"
},
- "11692": {
+ "11687": {
"attrs": [
{
- "other": "#[rustc_doc_primitive = \"reference\"]"
- },
- {
- "other": "#[doc(alias = \"&\")]"
- },
- {
- "other": "#[doc(alias = \"&mut\")]"
+ "other": "#[rustc_doc_primitive = \"isize\"]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -137156,180 +135427,144 @@
],
"crate_id": 0,
"deprecation": null,
- "docs": "References, `&T` and `&mut T`.\n\nA reference represents a borrow of some owned value. You can get one by using the `&` or `&mut`\noperators on a value, or by using a [`ref`](../std/keyword.ref.html) or\n[ref](../std/keyword.ref.html) [mut](../std/keyword.mut.html) pattern.\n\nFor those familiar with pointers, a reference is just a pointer that is assumed to be\naligned, not null, and pointing to memory containing a valid value of `T` - for example,\n&[bool] can only point to an allocation containing the integer values `1`\n([`true`](../std/keyword.true.html)) or `0` ([`false`](../std/keyword.false.html)), but\ncreating a &[bool] that points to an allocation containing\nthe value `3` causes undefined behavior.\nIn fact, [Option]\\<&T> has the same memory representation as a\nnullable but aligned pointer, and can be passed across FFI boundaries as such.\n\nIn most cases, references can be used much like the original value. Field access, method\ncalling, and indexing work the same (save for mutability rules, of course). In addition, the\ncomparison operators transparently defer to the referent's implementation, allowing references\nto be compared the same as owned values.\n\nReferences have a lifetime attached to them, which represents the scope for which the borrow is\nvalid. A lifetime is said to \"outlive\" another one if its representative scope is as long or\nlonger than the other. The `'static` lifetime is the longest lifetime, which represents the\ntotal life of the program. For example, string literals have a `'static` lifetime because the\ntext data is embedded into the binary of the program, rather than in an allocation that needs\nto be dynamically managed.\n\n`&mut T` references can be freely coerced into `&T` references with the same referent type, and\nreferences with longer lifetimes can be freely coerced into references with shorter ones.\n\nReference equality by address, instead of comparing the values pointed to, is accomplished via\nimplicit reference-pointer coercion and raw pointer equality via [`ptr::eq`], while\n[`PartialEq`] compares values.\n\n```\nuse std::ptr;\n\nlet five = 5;\nlet other_five = 5;\nlet five_ref = &five;\nlet same_five_ref = &five;\nlet other_five_ref = &other_five;\n\nassert!(five_ref == same_five_ref);\nassert!(five_ref == other_five_ref);\n\nassert!(ptr::eq(five_ref, same_five_ref));\nassert!(!ptr::eq(five_ref, other_five_ref));\n```\n\nFor more information on how to use references, see [the book's section on \"References and\nBorrowing\"][book-refs].\n\n[book-refs]: ../book/ch04-02-references-and-borrowing.html\n\n# Trait implementations\n\nThe following traits are implemented for all `&T`, regardless of the type of its referent:\n\n* [`Copy`]\n* [`Clone`] \\(Note that this will not defer to `T`'s `Clone` implementation if it exists!)\n* [`Deref`]\n* [`Borrow`]\n* [`fmt::Pointer`]\n\n[`Deref`]: ops::Deref\n[`Borrow`]: borrow::Borrow\n\n`&mut T` references get all of the above except `Copy` and `Clone` (to prevent creating\nmultiple simultaneous mutable borrows), plus the following, regardless of the type of its\nreferent:\n\n* [`DerefMut`]\n* [`BorrowMut`]\n\n[`DerefMut`]: ops::DerefMut\n[`BorrowMut`]: borrow::BorrowMut\n[bool]: prim@bool\n\nThe following traits are implemented on `&T` references if the underlying `T` also implements\nthat trait:\n\n* All the traits in [`std::fmt`] except [`fmt::Pointer`] (which is implemented regardless of the type of its referent) and [`fmt::Write`]\n* [`PartialOrd`]\n* [`Ord`]\n* [`PartialEq`]\n* [`Eq`]\n* [`AsRef`]\n* [`Fn`] \\(in addition, `&T` references get [`FnMut`] and [`FnOnce`] if `T: Fn`)\n* [`Hash`]\n* [`ToSocketAddrs`]\n* [`Sync`]\n\n[`std::fmt`]: fmt\n[`Hash`]: hash::Hash\n[`ToSocketAddrs`]: ../std/net/trait.ToSocketAddrs.html\n\n`&mut T` references get all of the above except `ToSocketAddrs`, plus the following, if `T`\nimplements that trait:\n\n* [`AsMut`]\n* [`FnMut`] \\(in addition, `&mut T` references get [`FnOnce`] if `T: FnMut`)\n* [`fmt::Write`]\n* [`Iterator`]\n* [`DoubleEndedIterator`]\n* [`ExactSizeIterator`]\n* [`FusedIterator`]\n* [`TrustedLen`]\n* [`Send`]\n* [`io::Write`]\n* [`Read`]\n* [`Seek`]\n* [`BufRead`]\n\n[`FusedIterator`]: iter::FusedIterator\n[`TrustedLen`]: iter::TrustedLen\n[`Seek`]: ../std/io/trait.Seek.html\n[`BufRead`]: ../std/io/trait.BufRead.html\n[`Read`]: ../std/io/trait.Read.html\n[`io::Write`]: ../std/io/trait.Write.html\n\nIn addition, `&T` references implement [`Send`] if and only if `T` implements [`Sync`].\n\nNote that due to method call deref coercion, simply calling a trait method will act like they\nwork on references as well as they do on owned values! The implementations described here are\nmeant for generic contexts, where the final type `T` is a type parameter or otherwise not\nlocally known.\n\n# Safety\n\nFor all types, `T: ?Sized`, and for all `t: &T` or `t: &mut T`, when such values cross an API\nboundary, the following invariants must generally be upheld:\n\n* `t` is non-null\n* `t` is aligned to `align_of_val(t)`\n* if `size_of_val(t) > 0`, then `t` is dereferenceable for `size_of_val(t)` many bytes\n\nIf `t` points at address `a`, being \"dereferenceable\" for N bytes means that the memory range\n`[a, a + N)` is all contained within a single [allocation].\n\nFor instance, this means that unsafe code in a safe function may assume these invariants are\nensured of arguments passed by the caller, and it may assume that these invariants are ensured\nof return values from any safe functions it calls.\n\nFor the other direction, things are more complicated: when unsafe code passes arguments\nto safe functions or returns values from safe functions, they generally must *at least*\nnot violate these invariants. The full requirements are stronger, as the reference generally\nmust point to data that is safe to use at type `T`.\n\nIt is not decided yet whether unsafe code may violate these invariants temporarily on internal\ndata. As a consequence, unsafe code which violates these invariants temporarily on internal data\nmay be unsound or become unsound in future versions of Rust depending on how this question is\ndecided.\n\n[allocation]: ptr#allocation",
- "id": 11692,
+ "docs": "The pointer-sized signed integer type.\n\nThe size of this primitive is how many bytes it takes to reference any\nlocation in memory. For example, on a 32 bit target, this is 4 bytes\nand on a 64 bit target, this is 8 bytes.",
+ "id": 11687,
"inner": {
"primitive": {
"impls": [
- 815,
- 1309,
- 1976,
- 6558
+ 11827,
+ 11831,
+ 11833
],
- "name": "reference"
+ "name": "isize"
}
},
- "links": {
- "Option": 51,
- "`AsMut`": 33,
- "`AsRef`": 35,
- "`Clone`": 99,
- "`Copy`": 103,
- "`DoubleEndedIterator`": 41,
- "`Eq`": 113,
- "`ExactSizeIterator`": 43,
- "`FnMut`": 13,
- "`FnOnce`": 15,
- "`Fn`": 11,
- "`Iterator`": 49,
- "`Ord`": 119,
- "`PartialEq`": 123,
- "`PartialOrd`": 127,
- "`Send`": 1,
- "`Sync`": 5,
- "`fmt::Pointer`": 9184,
- "`fmt::Write`": 2023,
- "`ptr::eq`": 9183,
- "borrow::Borrow": 323,
- "borrow::BorrowMut": 326,
- "fmt": 6957,
- "hash::Hash": 539,
- "iter::FusedIterator": 878,
- "iter::TrustedLen": 9185,
- "ops::Deref": 1969,
- "ops::DerefMut": 1989,
- "prim@bool": 9182,
- "ptr#allocation": 9144
- },
- "name": "reference",
+ "links": {},
+ "name": "isize",
"span": {
"begin": [
- 1660,
+ 1488,
1
],
"end": [
- 1660,
- 16
+ 1488,
+ 18
],
"filename": "std/src/../../core/src/primitive_docs.rs"
},
"visibility": "public"
},
- "11693": {
+ "11688": {
"attrs": [
{
- "other": "#[rustc_doc_primitive = \"fn\"]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
}
],
- "crate_id": 0,
+ "crate_id": 1,
"deprecation": null,
- "docs": "Function pointers, like `fn(usize) -> bool`.\n\n*See also the traits [`Fn`], [`FnMut`], and [`FnOnce`].*\n\nFunction pointers are pointers that point to *code*, not data. They can be called\njust like functions. Like references, function pointers are, among other things, assumed to\nnot be null, so if you want to pass a function pointer over FFI and be able to accommodate null\npointers, make your type [`Option`](core::option#options-and-pointers-nullable-pointers)\nwith your required signature.\n\nNote that FFI requires additional care to ensure that the ABI for both sides of the call match.\nThe exact requirements are not currently documented.\n\n### Safety\n\nPlain function pointers are obtained by casting either plain functions, or closures that don't\ncapture an environment:\n\n```\nfn add_one(x: usize) -> usize {\n x + 1\n}\n\nlet ptr: fn(usize) -> usize = add_one;\nassert_eq!(ptr(5), 6);\n\nlet clos: fn(usize) -> usize = |x| x + 5;\nassert_eq!(clos(5), 10);\n```\n\nIn addition to varying based on their signature, function pointers come in two flavors: safe\nand unsafe. Plain `fn()` function pointers can only point to safe functions,\nwhile `unsafe fn()` function pointers can point to safe or unsafe functions.\n\n```\nfn add_one(x: usize) -> usize {\n x + 1\n}\n\nunsafe fn add_one_unsafely(x: usize) -> usize {\n x + 1\n}\n\nlet safe_ptr: fn(usize) -> usize = add_one;\n\n//ERROR: mismatched types: expected normal fn, found unsafe fn\n//let bad_ptr: fn(usize) -> usize = add_one_unsafely;\n\nlet unsafe_ptr: unsafe fn(usize) -> usize = add_one_unsafely;\nlet really_safe_ptr: unsafe fn(usize) -> usize = add_one;\n```\n\n### ABI\n\nOn top of that, function pointers can vary based on what ABI they use. This\nis achieved by adding the `extern` keyword before the type, followed by the\nABI in question. The default ABI is \"Rust\", i.e., `fn()` is the exact same\ntype as `extern \"Rust\" fn()`. A pointer to a function with C ABI would have\ntype `extern \"C\" fn()`.\n\n`extern \"ABI\" { ... }` blocks declare functions with ABI \"ABI\". The default\nhere is \"C\", i.e., functions declared in an `extern {...}` block have \"C\"\nABI.\n\nFor more information and a list of supported ABIs, see [the nomicon's\nsection on foreign calling conventions][nomicon-abi].\n\n[nomicon-abi]: ../nomicon/ffi.html#foreign-calling-conventions\n\n### Variadic functions\n\nExtern function declarations with the \"C\" or \"cdecl\" ABIs can also be *variadic*, allowing them\nto be called with a variable number of arguments. Normal Rust functions, even those with an\n`extern \"ABI\"`, cannot be variadic. For more information, see [the nomicon's section on\nvariadic functions][nomicon-variadic].\n\n[nomicon-variadic]: ../nomicon/ffi.html#variadic-functions\n\n### Creating function pointers\n\nWhen `bar` is the name of a function, then the expression `bar` is *not* a\nfunction pointer. Rather, it denotes a value of an unnameable type that\nuniquely identifies the function `bar`. The value is zero-sized because the\ntype already identifies the function. This has the advantage that \"calling\"\nthe value (it implements the `Fn*` traits) does not require dynamic\ndispatch.\n\nThis zero-sized type *coerces* to a regular function pointer. For example:\n\n```rust\nfn bar(x: i32) {}\n\nlet not_bar_ptr = bar; // `not_bar_ptr` is zero-sized, uniquely identifying `bar`\nassert_eq!(size_of_val(¬_bar_ptr), 0);\n\nlet bar_ptr: fn(i32) = not_bar_ptr; // force coercion to function pointer\nassert_eq!(size_of_val(&bar_ptr), size_of::());\n\nlet footgun = &bar; // this is a shared reference to the zero-sized type identifying `bar`\n```\n\nThe last line shows that `&bar` is not a function pointer either. Rather, it\nis a reference to the function-specific ZST. `&bar` is basically never what you\nwant when `bar` is a function.\n\n### Casting to and from integers\n\nYou can cast function pointers directly to integers:\n\n```rust\nlet fnptr: fn(i32) -> i32 = |x| x+2;\nlet fnptr_addr = fnptr as usize;\n```\n\nHowever, a direct cast back is not possible. You need to use `transmute`:\n\n```rust\n# #[cfg(not(miri))] { // FIXME: use strict provenance APIs once they are stable, then remove this `cfg`\n# let fnptr: fn(i32) -> i32 = |x| x+2;\n# let fnptr_addr = fnptr as usize;\nlet fnptr = fnptr_addr as *const ();\nlet fnptr: fn(i32) -> i32 = unsafe { std::mem::transmute(fnptr) };\nassert_eq!(fnptr(40), 42);\n# }\n```\n\nCrucially, we `as`-cast to a raw pointer before `transmute`ing to a function pointer.\nThis avoids an integer-to-pointer `transmute`, which can be problematic.\nTransmuting between raw pointers and function pointers (i.e., two pointer types) is fine.\n\nNote that all of this is not portable to platforms where function pointers and data pointers\nhave different sizes.\n\n### ABI compatibility\n\nGenerally, when a function is declared with one signature and called via a function pointer with\na different signature, the two signatures must be *ABI-compatible* or else calling the function\nvia that function pointer is Undefined Behavior. ABI compatibility is a lot stricter than merely\nhaving the same memory layout; for example, even if `i32` and `f32` have the same size and\nalignment, they might be passed in different registers and hence not be ABI-compatible.\n\nABI compatibility as a concern only arises in code that alters the type of function pointers,\nand code that imports functions via `extern` blocks. Altering the type of function pointers is\nwildly unsafe (as in, a lot more unsafe than even [`transmute_copy`][mem::transmute_copy]), and\nshould only occur in the most exceptional circumstances. Most Rust code just imports functions\nvia `use`. So, most likely you do not have to worry about ABI compatibility.\n\nBut assuming such circumstances, what are the rules? For this section, we are only considering\nthe ABI of direct Rust-to-Rust calls (with both definition and callsite visible to the\nRust compiler), not linking in general -- once functions are imported via `extern` blocks, there\nare more things to consider that we do not go into here. Note that this also applies to\npassing/calling functions across language boundaries via function pointers.\n\n**Nothing in this section should be taken as a guarantee for non-Rust-to-Rust calls, even with\ntypes from `core::ffi` or `libc`**.\n\nFor two signatures to be considered *ABI-compatible*, they must use a compatible ABI string,\nmust take the same number of arguments, and the individual argument types and the return types\nmust be ABI-compatible. The ABI string is declared via `extern \"ABI\" fn(...) -> ...`; note that\n`fn name(...) -> ...` implicitly uses the `\"Rust\"` ABI string and `extern fn name(...) -> ...`\nimplicitly uses the `\"C\"` ABI string.\n\nThe ABI strings are guaranteed to be compatible if they are the same, or if the caller ABI\nstring is `$X-unwind` and the callee ABI string is `$X`, where `$X` is one of the following:\n\"C\", \"aapcs\", \"fastcall\", \"stdcall\", \"system\", \"sysv64\", \"thiscall\", \"vectorcall\", \"win64\".\n\nThe following types are guaranteed to be ABI-compatible:\n\n- `*const T`, `*mut T`, `&T`, `&mut T`, `Box` (specifically, only `Box`), and\n `NonNull` are all ABI-compatible with each other for all `T`. They are also ABI-compatible\n with each other for _different_ `T` if they have the same metadata type (`::Metadata`).\n- `usize` is ABI-compatible with the `uN` integer type of the same size, and likewise `isize` is\n ABI-compatible with the `iN` integer type of the same size.\n- `char` is ABI-compatible with `u32`.\n- Any two `fn` (function pointer) types are ABI-compatible with each other if they have the same\n ABI string or the ABI string only differs in a trailing `-unwind`, independent of the rest of\n their signature. (This means you can pass `fn()` to a function expecting `fn(i32)`, and the\n call will be valid ABI-wise. The callee receives the result of transmuting the function pointer\n from `fn()` to `fn(i32)`; that transmutation is itself a well-defined operation, it's just\n almost certainly UB to later call that function pointer.)\n- Any two types with size 0 and alignment 1 are ABI-compatible.\n- A `repr(transparent)` type `T` is ABI-compatible with its unique non-trivial field, i.e., the\n unique field that doesn't have size 0 and alignment 1 (if there is such a field).\n- `i32` is ABI-compatible with `NonZero`, and similar for all other integer types.\n- If `T` is guaranteed to be subject to the [null pointer\n optimization](option/index.html#representation), and `E` is an enum satisfying the following\n requirements, then `T` and `E` are ABI-compatible. Such an enum `E` is called \"option-like\".\n - The enum `E` uses the [`Rust` representation], and is not modified by the `align` or\n `packed` representation modifiers.\n - The enum `E` has exactly two variants.\n - One variant has exactly one field, of type `T`.\n - All fields of the other variant are zero-sized with 1-byte alignment.\n\nFurthermore, ABI compatibility satisfies the following general properties:\n\n- Every type is ABI-compatible with itself.\n- If `T1` and `T2` are ABI-compatible and `T2` and `T3` are ABI-compatible, then so are `T1` and\n `T3` (i.e., ABI-compatibility is transitive).\n- If `T1` and `T2` are ABI-compatible, then so are `T2` and `T1` (i.e., ABI-compatibility is\n symmetric).\n\nMore signatures can be ABI-compatible on specific targets, but that should not be relied upon\nsince it is not portable and not a stable guarantee.\n\nNoteworthy cases of types *not* being ABI-compatible in general are:\n* `bool` vs `u8`, `i32` vs `u32`, `char` vs `i32`: on some targets, the calling conventions for\n these types differ in terms of what they guarantee for the remaining bits in the register that\n are not used by the value.\n* `i32` vs `f32` are not compatible either, as has already been mentioned above.\n* `struct Foo(u32)` and `u32` are not compatible (without `repr(transparent)`) since structs are\n aggregate types and often passed in a different way than primitives like `i32`.\n\nNote that these rules describe when two completely known types are ABI-compatible. When\nconsidering ABI compatibility of a type declared in another crate (including the standard\nlibrary), consider that any type that has a private field or the `#[non_exhaustive]` attribute\nmay change its layout as a non-breaking update unless documented otherwise -- so for instance,\neven if such a type is a 1-ZST or `repr(transparent)` right now, this might change with any\nlibrary version bump.\n\nIf the declared signature and the signature of the function pointer are ABI-compatible, then the\nfunction call behaves as if every argument was [`transmute`d][mem::transmute] from the\ntype in the function pointer to the type at the function declaration, and the return value is\n[`transmute`d][mem::transmute] from the type in the declaration to the type in the\npointer. All the usual caveats and concerns around transmutation apply; for instance, if the\nfunction expects a `NonZero` and the function pointer uses the ABI-compatible type\n`Option>`, and the value used for the argument is `None`, then this call is Undefined\nBehavior since transmuting `None::>` to `NonZero` violates the non-zero\nrequirement.\n\n### Trait implementations\n\nIn this documentation the shorthand `fn(T₁, T₂, …, Tₙ)` is used to represent non-variadic\nfunction pointers of varying length. Note that this is a convenience notation to avoid\nrepetitive documentation, not valid Rust syntax.\n\nThe following traits are implemented for function pointers with any number of arguments and\nany ABI.\n\n* [`PartialEq`]\n* [`Eq`]\n* [`PartialOrd`]\n* [`Ord`]\n* [`Hash`]\n* [`Pointer`]\n* [`Debug`]\n* [`Clone`]\n* [`Copy`]\n* [`Send`]\n* [`Sync`]\n* [`Unpin`]\n* [`UnwindSafe`]\n* [`RefUnwindSafe`]\n\nNote that while this type implements `PartialEq`, comparing function pointers is unreliable:\npointers to the same function can compare inequal (because functions are duplicated in multiple\ncodegen units), and pointers to *different* functions can compare equal (since identical\nfunctions can be deduplicated within a codegen unit).\n\n[`Hash`]: hash::Hash\n[`Pointer`]: fmt::Pointer\n[`UnwindSafe`]: panic::UnwindSafe\n[`RefUnwindSafe`]: panic::RefUnwindSafe\n[`Rust` representation]: \n\nIn addition, all *safe* function pointers implement [`Fn`], [`FnMut`], and [`FnOnce`], because\nthese traits are specially known to the compiler.",
- "id": 11693,
+ "docs": "The smallest value that can be represented by this integer type\n(−263 on 64-bit targets).\n\n# Examples\n\n```\nassert_eq!(isize::MIN, -9223372036854775808);\n```",
+ "id": 11688,
"inner": {
- "primitive": {
- "impls": [
- 11694,
- 11695,
- 11696,
- 11697,
- 11698,
- 11699,
- 11700,
- 11701,
- 11702,
- 11704,
- 11706,
- 11708,
- 11710,
- 11711,
- 11712,
- 11713,
- 11714,
- 11715,
- 11718,
- 11720,
- 11722,
- 11731,
- 11732
- ],
- "name": "fn"
+ "assoc_const": {
+ "type": {
+ "primitive": "isize"
+ },
+ "value": "_"
}
},
- "links": {
- "`Clone`": 99,
- "`Copy`": 103,
- "`Debug`": 107,
- "`Eq`": 113,
- "`FnMut`": 13,
- "`FnOnce`": 15,
- "`Fn`": 11,
- "`Ord`": 119,
- "`PartialEq`": 123,
- "`PartialOrd`": 127,
- "`Send`": 1,
- "`Sync`": 5,
- "`Unpin`": 7,
- "core::option#options-and-pointers-nullable-pointers": 195,
- "fmt::Pointer": 9184,
- "hash::Hash": 539,
- "mem::transmute": 9188,
- "mem::transmute_copy": 9187,
- "panic::RefUnwindSafe": 320,
- "panic::UnwindSafe": 318
+ "links": {},
+ "name": "MIN",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "name": "fn",
+ "visibility": "public"
+ },
+ "11689": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "The largest value that can be represented by this integer type\n(263 − 1 on 64-bit targets).\n\n# Examples\n\n```\nassert_eq!(isize::MAX, 9223372036854775807);\n```",
+ "id": 11689,
+ "inner": {
+ "assoc_const": {
+ "type": {
+ "primitive": "isize"
+ },
+ "value": "_"
+ }
+ },
+ "links": {},
+ "name": "MAX",
"span": {
"begin": [
- 1932,
- 1
+ 420,
+ 5
],
"end": [
- 1932,
- 15
+ 439,
+ 6
],
- "filename": "std/src/../../core/src/primitive_docs.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "11694": {
+ "1169": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 11694,
+ "id": 1169,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
- "function_pointer": {
- "generic_params": [],
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "_",
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
{
- "generic": "T"
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
}
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "generic": "Ret"
+ ],
+ "constraints": []
}
- }
+ },
+ "id": 1132,
+ "path": "OccupiedEntry"
}
},
"generics": {
"params": [
+ {
+ "kind": {
+ "lifetime": {
+ "outlives": []
+ }
+ },
+ "name": "'a"
+ },
{
"kind": {
"type": {
@@ -137338,7 +135573,7 @@
"is_synthetic": false
}
},
- "name": "Ret"
+ "name": "K"
},
{
"kind": {
@@ -137348,407 +135583,637 @@
"is_synthetic": false
}
},
- "name": "T"
+ "name": "V"
}
],
"where_predicates": []
},
"is_negative": false,
- "is_synthetic": true,
+ "is_synthetic": false,
"is_unsafe": false,
- "items": [],
+ "items": [
+ 1162,
+ 1163,
+ 1164,
+ 1166,
+ 1165,
+ 1167,
+ 1168
+ ],
"provided_trait_methods": [],
- "trait": {
- "args": null,
- "id": 1,
- "path": "Send"
- }
+ "trait": null
}
},
"links": {},
"name": null,
- "span": null,
+ "span": {
+ "begin": [
+ 2512,
+ 1
+ ],
+ "end": [
+ 2682,
+ 2
+ ],
+ "filename": "std/src/collections/hash/map.rs"
+ },
"visibility": "default"
},
- "11695": {
- "attrs": [],
- "crate_id": 0,
+ "11690": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 53, patch: 0})}, feature: \"int_bits_const\"}}]"
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 11695,
+ "docs": "The size of this integer type in bits.\n\n# Examples\n\n```\nassert_eq!(isize::BITS, 64);\n```",
+ "id": 11690,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "function_pointer": {
- "generic_params": [],
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "_",
- {
- "generic": "T"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "generic": "Ret"
- }
- }
- }
+ "assoc_const": {
+ "type": {
+ "primitive": "u32"
},
+ "value": "usize::BITS"
+ }
+ },
+ "links": {},
+ "name": "BITS",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11691": {
+ "attrs": [
+ {
+ "other": "#[doc(alias = \"popcount\")]"
+ },
+ {
+ "other": "#[doc(alias = \"popcnt\")]"
+ },
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the number of ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 0b100_0000isize;\n\nassert_eq!(n.count_ones(), 1);\n```\n",
+ "id": 11691,
+ "inner": {
+ "function": {
"generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "Ret"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "T"
- }
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u32"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "count_ones",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11692": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the number of zeros in the binary representation of `self`.\n\n# Examples\n\n```\nassert_eq!(isize::MAX.count_zeros(), 1);\n```",
+ "id": 11692,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
"where_predicates": []
},
- "is_negative": false,
- "is_synthetic": true,
- "is_unsafe": false,
- "items": [],
- "provided_trait_methods": [],
- "trait": {
- "args": null,
- "id": 5,
- "path": "Sync"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u32"
+ }
}
}
},
"links": {},
- "name": null,
- "span": null,
- "visibility": "default"
+ "name": "count_zeros",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
},
- "11696": {
- "attrs": [],
- "crate_id": 0,
+ "11693": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 11696,
+ "docs": "Returns the base 2 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero.\n\n# Examples\n\n```\nassert_eq!(2isize.ilog2(), 1);\n```",
+ "id": 11693,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "function_pointer": {
- "generic_params": [],
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "_",
- {
- "generic": "T"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "generic": "Ret"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
}
- }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u32"
}
+ }
+ }
+ },
+ "links": {},
+ "name": "ilog2",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11694": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the number of leading zeros in the binary representation of `self`.\n\nDepending on what you're doing with the value, you might also be interested in the\n[`ilog2`] function which returns a consistent number, even if the type widens.\n\n# Examples\n\n```\nlet n = -1isize;\n\nassert_eq!(n.leading_zeros(), 0);\n```\n[`ilog2`]: isize::ilog2",
+ "id": 11694,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
},
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u32"
+ }
+ }
+ }
+ },
+ "links": {
+ "isize::ilog2": 11693
+ },
+ "name": "leading_zeros",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11695": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the number of trailing zeros in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = -4isize;\n\nassert_eq!(n.trailing_zeros(), 2);\n```",
+ "id": 11695,
+ "inner": {
+ "function": {
"generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "Ret"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "T"
- }
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u32"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "trailing_zeros",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11696": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the number of leading ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = -1isize;\n\nassert_eq!(n.leading_ones(), 64);\n```",
+ "id": 11696,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
"where_predicates": []
},
- "is_negative": false,
- "is_synthetic": true,
- "is_unsafe": false,
- "items": [],
- "provided_trait_methods": [],
- "trait": {
- "args": null,
- "id": 315,
- "path": "Freeze"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u32"
+ }
}
}
},
"links": {},
- "name": null,
- "span": null,
- "visibility": "default"
+ "name": "leading_ones",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
},
"11697": {
- "attrs": [],
- "crate_id": 0,
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Returns the number of trailing ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 3isize;\n\nassert_eq!(n.trailing_ones(), 2);\n```",
"id": 11697,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "function_pointer": {
- "generic_params": [],
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "_",
- {
- "generic": "T"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "generic": "Ret"
- }
- }
- }
- },
+ "function": {
"generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "Ret"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "T"
- }
- ],
+ "params": [],
"where_predicates": []
},
- "is_negative": false,
- "is_synthetic": true,
- "is_unsafe": false,
- "items": [],
- "provided_trait_methods": [],
- "trait": {
- "args": null,
- "id": 7,
- "path": "Unpin"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u32"
+ }
}
}
},
"links": {},
- "name": null,
- "span": null,
- "visibility": "default"
+ "name": "trailing_ones",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
},
"11698": {
- "attrs": [],
- "crate_id": 0,
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Returns `self` with only the most significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: isize = 0b_01100100;\n\nassert_eq!(n.isolate_highest_one(), 0b_01000000);\nassert_eq!(0_isize.isolate_highest_one(), 0);\n```",
"id": 11698,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "function_pointer": {
- "generic_params": [],
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "_",
- {
- "generic": "T"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "generic": "Ret"
- }
- }
- }
- },
+ "function": {
"generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "Ret"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "T"
- }
- ],
+ "params": [],
"where_predicates": []
},
- "is_negative": false,
- "is_synthetic": true,
- "is_unsafe": false,
- "items": [],
- "provided_trait_methods": [],
- "trait": {
- "args": null,
- "id": 318,
- "path": "UnwindSafe"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
}
}
},
"links": {},
- "name": null,
- "span": null,
- "visibility": "default"
+ "name": "isolate_highest_one",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
},
"11699": {
- "attrs": [],
- "crate_id": 0,
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Returns `self` with only the least significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: isize = 0b_01100100;\n\nassert_eq!(n.isolate_lowest_one(), 0b_00000100);\nassert_eq!(0_isize.isolate_lowest_one(), 0);\n```",
"id": 11699,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "function_pointer": {
- "generic_params": [],
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "_",
- {
- "generic": "T"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "generic": "Ret"
- }
- }
- }
- },
+ "function": {
"generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "Ret"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "T"
- }
- ],
+ "params": [],
"where_predicates": []
},
- "is_negative": false,
- "is_synthetic": true,
- "is_unsafe": false,
- "items": [],
- "provided_trait_methods": [],
- "trait": {
- "args": null,
- "id": 320,
- "path": "RefUnwindSafe"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
}
}
},
"links": {},
- "name": null,
- "span": null,
- "visibility": "default"
+ "name": "isolate_lowest_one",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
},
"1170": {
"attrs": [],
@@ -137879,338 +136344,232 @@
"visibility": "default"
},
"11700": {
- "attrs": [],
- "crate_id": 0,
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Returns the index of the highest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_isize.highest_one(), None);\nassert_eq!(0x1_isize.highest_one(), Some(0));\nassert_eq!(0x10_isize.highest_one(), Some(4));\nassert_eq!(0x1f_isize.highest_one(), Some(4));\n```",
"id": 11700,
"inner": {
- "impl": {
- "blanket_impl": {
- "generic": "T"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "for": {
- "function_pointer": {
- "generic_params": [],
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "_",
- {
- "generic": "T"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "generic": "Ret"
- }
- }
- }
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
},
- "generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "T"
- }
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "maybe",
- "trait": {
- "args": null,
- "id": 3,
- "path": "Sized"
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
}
}
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "T"
- }
- }
- }
- ]
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 321
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "generic": "T"
- }
+ ],
+ "constraints": []
}
- ],
- "constraints": []
+ },
+ "id": 51,
+ "path": "Option"
}
- },
- "id": 323,
- "path": "Borrow"
+ }
}
}
},
"links": {},
- "name": null,
+ "name": "highest_one",
"span": {
"begin": [
- 209,
- 1
+ 420,
+ 5
],
"end": [
- 209,
- 32
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/borrow.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"11701": {
- "attrs": [],
- "crate_id": 0,
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Returns the index of the lowest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_isize.lowest_one(), None);\nassert_eq!(0x1_isize.lowest_one(), Some(0));\nassert_eq!(0x10_isize.lowest_one(), Some(4));\nassert_eq!(0x1f_isize.lowest_one(), Some(0));\n```",
"id": 11701,
"inner": {
- "impl": {
- "blanket_impl": {
- "generic": "T"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "for": {
- "function_pointer": {
- "generic_params": [],
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "_",
- {
- "generic": "T"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "generic": "Ret"
- }
- }
- }
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
},
- "generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "T"
- }
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "maybe",
- "trait": {
- "args": null,
- "id": 3,
- "path": "Sized"
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
}
}
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "T"
- }
- }
- }
- ]
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 324
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "generic": "T"
- }
+ ],
+ "constraints": []
}
- ],
- "constraints": []
+ },
+ "id": 51,
+ "path": "Option"
}
- },
- "id": 326,
- "path": "BorrowMut"
+ }
}
}
},
"links": {},
- "name": null,
+ "name": "lowest_one",
"span": {
"begin": [
- 217,
- 1
+ 420,
+ 5
],
"end": [
- 217,
- 35
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/borrow.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"11702": {
- "attrs": [],
- "crate_id": 0,
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Returns the bit pattern of `self` reinterpreted as an unsigned integer of the same size.\n\nThis produces the same result as an `as` cast, but ensures that the bit-width remains\nthe same.\n\n# Examples\n\n```\nlet n = -1isize;\n\nassert_eq!(n.cast_unsigned(), usize::MAX);\n```",
"id": 11702,
"inner": {
- "impl": {
- "blanket_impl": {
- "generic": "T"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "for": {
- "function_pointer": {
- "generic_params": [],
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "_",
- {
- "generic": "T"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "generic": "Ret"
- }
- }
- }
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
},
- "generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "T"
- }
- ],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 99,
- "path": "Clone"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "T"
- }
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
}
- }
- ]
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 422
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": null,
- "id": 424,
- "path": "CloneToUninit"
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
}
}
},
"links": {},
- "name": null,
+ "name": "cast_unsigned",
"span": {
"begin": [
- 516,
- 1
+ 420,
+ 5
],
"end": [
- 516,
- 42
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/clone.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"11703": {
- "attrs": [],
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Shifts the bits to the left by a specified amount, `n`,\nwrapping the truncated bits to the end of the resulting integer.\n\nPlease note this isn't the same operation as the `<<` shifting operator!\n\n# Examples\n\n```\nlet n = 0xaa00000000006e1isize;\nlet m = 0x6e10aa;\n\nassert_eq!(n.rotate_left(12), m);\n```",
"id": 11703,
"inner": {
"function": {
@@ -138222,7 +136581,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -138230,262 +136589,186 @@
[
"self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
+ "generic": "Self"
}
],
[
- "other",
+ "n",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "F"
- }
- }
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "primitive": "isize"
}
}
}
},
"links": {},
- "name": "eq",
+ "name": "rotate_left",
"span": {
"begin": [
- 2521,
+ 420,
5
],
"end": [
- 2521,
- 39
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/ptr/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"11704": {
- "attrs": [],
- "crate_id": 0,
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Shifts the bits to the right by a specified amount, `n`,\nwrapping the truncated bits to the beginning of the resulting\ninteger.\n\nPlease note this isn't the same operation as the `>>` shifting operator!\n\n# Examples\n\n```\nlet n = 0x6e10aaisize;\nlet m = 0xaa00000000006e1;\n\nassert_eq!(n.rotate_right(12), m);\n```",
"id": 11704,
"inner": {
- "impl": {
- "blanket_impl": {
- "generic": "F"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "for": {
- "function_pointer": {
- "generic_params": [],
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "_",
- {
- "generic": "T"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "generic": "Ret"
- }
- }
- }
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
},
- "generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "F"
- }
- ],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 11705,
- "path": "FnPtr"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "F"
- }
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
}
- }
- ]
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 11703
- ],
- "provided_trait_methods": [
- "ne"
- ],
- "trait": {
- "args": null,
- "id": 123,
- "path": "PartialEq"
+ ],
+ [
+ "n",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
}
}
},
"links": {},
- "name": null,
+ "name": "rotate_right",
"span": {
"begin": [
- 2519,
- 1
+ 420,
+ 5
],
"end": [
- 2519,
- 31
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/ptr/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "11706": {
- "attrs": [],
- "crate_id": 0,
+ "11705": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 11706,
+ "docs": "Reverses the byte order of the integer.\n\n# Examples\n\n```\nlet n = 0x1234567890123456isize;\n\nlet m = n.swap_bytes();\n\nassert_eq!(m, 0x5634129078563412);\n```",
+ "id": 11705,
"inner": {
- "impl": {
- "blanket_impl": {
- "generic": "F"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "for": {
- "function_pointer": {
- "generic_params": [],
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "_",
- {
- "generic": "T"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "generic": "Ret"
- }
- }
- }
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
},
- "generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "F"
- }
- ],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 11705,
- "path": "FnPtr"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "F"
- }
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
}
- }
- ]
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [],
- "provided_trait_methods": [
- "assert_receiver_is_total_eq"
- ],
- "trait": {
- "args": null,
- "id": 113,
- "path": "Eq"
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
}
}
},
"links": {},
- "name": null,
+ "name": "swap_bytes",
"span": {
"begin": [
- 2526,
- 1
+ 420,
+ 5
],
"end": [
- 2526,
- 24
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/ptr/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "11707": {
- "attrs": [],
+ "11706": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 11707,
+ "docs": "Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\n second least-significant bit becomes second most-significant bit, etc.\n\n# Examples\n\n```\nlet n = 0x1234567890123456isize;\nlet m = n.reverse_bits();\n\nassert_eq!(m, 0x6a2c48091e6a2c48);\nassert_eq!(0, 0isize.reverse_bits());\n```",
+ "id": 11706,
"inner": {
"function": {
"generics": {
@@ -138496,7 +136779,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -138504,166 +136787,112 @@
[
"self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
- }
- ],
- [
- "other",
- {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "F"
- }
- }
+ "generic": "Self"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": null,
- "id": 2009,
- "path": "Ordering"
- }
+ "primitive": "isize"
}
}
}
},
"links": {},
- "name": "cmp",
+ "name": "reverse_bits",
"span": {
"begin": [
- 2538,
+ 420,
5
],
"end": [
- 2538,
- 44
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/ptr/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "11708": {
- "attrs": [],
- "crate_id": 0,
+ "11707": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": null
+ }
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 11708,
+ "docs": "Converts an integer from big endian to the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Aisize;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(isize::from_be(n), n)\n} else {\n assert_eq!(isize::from_be(n), n.swap_bytes())\n}\n```",
+ "id": 11707,
"inner": {
- "impl": {
- "blanket_impl": {
- "generic": "F"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "for": {
- "function_pointer": {
- "generic_params": [],
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "_",
- {
- "generic": "T"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "generic": "Ret"
- }
- }
- }
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
},
- "generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "F"
- }
- ],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 11705,
- "path": "FnPtr"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "F"
- }
+ "sig": {
+ "inputs": [
+ [
+ "x",
+ {
+ "primitive": "isize"
}
- }
- ]
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 11707
- ],
- "provided_trait_methods": [
- "max",
- "min",
- "clamp"
- ],
- "trait": {
- "args": null,
- "id": 119,
- "path": "Ord"
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
}
}
},
"links": {},
- "name": null,
+ "name": "from_be",
"span": {
"begin": [
- 2536,
- 1
+ 420,
+ 5
],
"end": [
- 2536,
- 25
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/ptr/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "11709": {
- "attrs": [],
+ "11708": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": null
+ }
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 11709,
+ "docs": "Converts an integer from little endian to the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Aisize;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(isize::from_le(n), n)\n} else {\n assert_eq!(isize::from_le(n), n.swap_bytes())\n}\n```",
+ "id": 11708,
"inner": {
"function": {
"generics": {
@@ -138674,76 +136903,101 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
"inputs": [
[
- "self",
- {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
- }
- ],
- [
- "other",
+ "x",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "F"
- }
- }
+ "primitive": "isize"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 2009,
- "path": "Ordering"
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "isize"
}
}
}
},
"links": {},
- "name": "partial_cmp",
+ "name": "from_le",
"span": {
"begin": [
- 2531,
+ 420,
5
],
"end": [
- 2531,
- 60
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/ptr/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
+ },
+ "11709": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Converts `self` to big endian from the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Aisize;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(n.to_be(), n)\n} else {\n assert_eq!(n.to_be(), n.swap_bytes())\n}\n```",
+ "id": 11709,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "to_be",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
},
"1171": {
"attrs": [],
@@ -138874,721 +137128,466 @@
"visibility": "default"
},
"11710": {
- "attrs": [],
- "crate_id": 0,
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_conversions\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Converts `self` to little endian from the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are swapped.\n\n# Examples\n\n```\nlet n = 0x1Aisize;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(n.to_le(), n)\n} else {\n assert_eq!(n.to_le(), n.swap_bytes())\n}\n```",
"id": 11710,
"inner": {
- "impl": {
- "blanket_impl": {
- "generic": "F"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "for": {
- "function_pointer": {
- "generic_params": [],
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "_",
- {
- "generic": "T"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "generic": "Ret"
- }
- }
- }
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
},
- "generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "F"
- }
- ],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 11705,
- "path": "FnPtr"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "F"
- }
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
}
- }
- ]
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 11709
- ],
- "provided_trait_methods": [
- "lt",
- "le",
- "gt",
- "ge",
- "__chaining_lt",
- "__chaining_le",
- "__chaining_gt",
- "__chaining_ge"
- ],
- "trait": {
- "args": null,
- "id": 127,
- "path": "PartialOrd"
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
}
}
},
"links": {},
- "name": null,
+ "name": "to_le",
"span": {
"begin": [
- 2529,
- 1
+ 420,
+ 5
],
"end": [
- 2529,
- 32
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/ptr/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"11711": {
- "attrs": [],
- "crate_id": 0,
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Checked integer addition. Computes `self + rhs`, returning `None`\nif overflow occurred.\n\n# Examples\n\n```\nassert_eq!((isize::MAX - 2).checked_add(1), Some(isize::MAX - 1));\nassert_eq!((isize::MAX - 2).checked_add(3), None);\n```",
"id": 11711,
"inner": {
- "impl": {
- "blanket_impl": {
- "generic": "T"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "for": {
- "function_pointer": {
- "generic_params": [],
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "_",
- {
- "generic": "T"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "generic": "Ret"
- }
- }
- }
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
},
- "generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "T"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "U"
- }
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "generic": "T"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 37,
- "path": "From"
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "isize"
}
}
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "U"
- }
- }
- }
- ]
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 327
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "generic": "U"
- }
+ ],
+ "constraints": []
}
- ],
- "constraints": []
+ },
+ "id": 51,
+ "path": "Option"
}
- },
- "id": 39,
- "path": "Into"
+ }
}
}
},
"links": {},
- "name": null,
+ "name": "checked_add",
"span": {
"begin": [
- 773,
- 1
+ 420,
+ 5
],
"end": [
- 775,
- 24
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/convert/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"11712": {
- "attrs": [],
- "crate_id": 0,
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Strict integer addition. Computes `self + rhs`, panicking\nif overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((isize::MAX - 2).strict_add(1), isize::MAX - 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (isize::MAX - 2).strict_add(3);\n```",
"id": 11712,
"inner": {
- "impl": {
- "blanket_impl": {
- "generic": "T"
- },
- "for": {
- "function_pointer": {
- "generic_params": [],
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "_",
- {
- "generic": "T"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "generic": "Ret"
- }
- }
- }
- },
+ "function": {
"generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "T"
- }
- ],
+ "params": [],
"where_predicates": []
},
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 329
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "generic": "T"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 37,
- "path": "From"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
}
}
},
"links": {},
- "name": null,
+ "name": "strict_add",
"span": {
"begin": [
- 791,
- 1
+ 420,
+ 5
],
"end": [
- 791,
- 28
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/convert/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"11713": {
- "attrs": [],
- "crate_id": 0,
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Wrapping (modular) addition. Computes `self + rhs`, wrapping around at the\nboundary of the type.\n\n# Examples\n\n```\nassert_eq!(100isize.wrapping_add(27), 127);\nassert_eq!(isize::MAX.wrapping_add(2), isize::MIN + 1);\n```",
"id": 11713,
"inner": {
- "impl": {
- "blanket_impl": {
- "generic": "T"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "for": {
- "function_pointer": {
- "generic_params": [],
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "_",
- {
- "generic": "T"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "generic": "Ret"
- }
- }
- }
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
},
- "generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "T"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "U"
- }
- ],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "generic": "T"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 199,
- "path": "TryFrom"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "U"
- }
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
}
- }
- ]
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 331,
- 332
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "generic": "U"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 200,
- "path": "TryInto"
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
}
}
},
"links": {},
- "name": null,
+ "name": "wrapping_add",
"span": {
"begin": [
- 817,
- 1
+ 420,
+ 5
],
"end": [
- 819,
- 27
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/convert/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"11714": {
- "attrs": [],
- "crate_id": 0,
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Unchecked integer addition. Computes `self + rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_add(y)` is semantically equivalent to calling\n`x.`[`checked_add`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_add`].\n\n# Safety\n\nThis results in undefined behavior when\n`self + rhs > isize::MAX` or `self + rhs < isize::MIN`,\ni.e. when [`checked_add`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_add`]: isize::checked_add\n[`wrapping_add`]: isize::wrapping_add",
"id": 11714,
"inner": {
- "impl": {
- "blanket_impl": {
- "generic": "T"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "for": {
- "function_pointer": {
- "generic_params": [],
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "_",
- {
- "generic": "T"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "generic": "Ret"
- }
- }
- }
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": true
},
- "generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "T"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "U"
- }
- ],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "generic": "T"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 39,
- "path": "Into"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "U"
- }
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
}
- }
- ]
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 334,
- 336
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "generic": "U"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 199,
- "path": "TryFrom"
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
}
}
},
- "links": {},
- "name": null,
+ "links": {
+ "isize::checked_add": 11711,
+ "isize::wrapping_add": 11713
+ },
+ "name": "unchecked_add",
"span": {
"begin": [
- 833,
- 1
+ 420,
+ 5
],
"end": [
- 835,
- 24
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/convert/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"11715": {
- "attrs": [],
- "crate_id": 0,
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Checked addition with an unsigned integer. Computes `self + rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1isize.checked_add_unsigned(2), Some(3));\nassert_eq!((isize::MAX - 2).checked_add_unsigned(3), None);\n```",
"id": 11715,
"inner": {
- "impl": {
- "blanket_impl": {
- "generic": "T"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "for": {
- "function_pointer": {
- "generic_params": [],
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "_",
- {
- "generic": "T"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "generic": "Ret"
- }
- }
- }
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
},
- "generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "T"
- }
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "outlives": "'static"
- },
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "maybe",
- "trait": {
- "args": null,
- "id": 3,
- "path": "Sized"
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "isize"
}
}
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "T"
+ ],
+ "constraints": []
}
- }
+ },
+ "id": 51,
+ "path": "Option"
}
- ]
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 338
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": null,
- "id": 341,
- "path": "Any"
+ }
}
}
},
"links": {},
- "name": null,
+ "name": "checked_add_unsigned",
"span": {
"begin": [
- 138,
- 1
+ 420,
+ 5
],
"end": [
- 138,
- 36
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/any.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"11716": {
- "attrs": [],
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Strict addition with an unsigned integer. Computes `self + rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1isize.strict_add_unsigned(2), 3);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (isize::MAX - 2).strict_add_unsigned(3);\n```",
"id": 11716,
"inner": {
"function": {
@@ -139600,7 +137599,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -139608,38 +137607,81 @@
[
"self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
+ "generic": "Self"
}
],
[
- "f",
+ "rhs",
{
- "borrowed_ref": {
- "is_mutable": true,
- "lifetime": null,
- "type": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'_"
- }
- ],
- "constraints": []
- }
- },
- "id": 343,
- "path": "Formatter"
- }
- }
- }
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "strict_add_unsigned",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11717": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Checked integer subtraction. Computes `self - rhs`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!((isize::MIN + 2).checked_sub(1), Some(isize::MIN + 1));\nassert_eq!((isize::MIN + 2).checked_sub(3), None);\n```",
+ "id": 11717,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
}
]
],
@@ -139651,151 +137693,123 @@
"args": [
{
"type": {
- "tuple": []
- }
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 11717,
- "path": "Error"
- }
+ "primitive": "isize"
}
}
],
"constraints": []
}
},
- "id": 57,
- "path": "Result"
+ "id": 51,
+ "path": "Option"
}
}
}
}
},
"links": {},
- "name": "fmt",
+ "name": "checked_sub",
"span": {
"begin": [
- 2559,
+ 420,
5
],
"end": [
- 2559,
- 61
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/ptr/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"11718": {
- "attrs": [],
- "crate_id": 0,
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Strict integer subtraction. Computes `self - rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((isize::MIN + 2).strict_sub(1), isize::MIN + 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (isize::MIN + 2).strict_sub(3);\n```",
"id": 11718,
"inner": {
- "impl": {
- "blanket_impl": {
- "generic": "F"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "for": {
- "function_pointer": {
- "generic_params": [],
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "_",
- {
- "generic": "T"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "generic": "Ret"
- }
- }
- }
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
},
- "generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "F"
- }
- ],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 11705,
- "path": "FnPtr"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "F"
- }
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
}
- }
- ]
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 11716
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": null,
- "id": 346,
- "path": "Debug"
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
}
}
},
"links": {},
- "name": null,
+ "name": "strict_sub",
"span": {
"begin": [
- 2558,
- 1
+ 420,
+ 5
],
"end": [
- 2558,
- 32
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/ptr/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"11719": {
- "attrs": [],
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Wrapping (modular) subtraction. Computes `self - rhs`, wrapping around at the\nboundary of the type.\n\n# Examples\n\n```\nassert_eq!(0isize.wrapping_sub(127), -127);\nassert_eq!((-2isize).wrapping_sub(isize::MAX), isize::MAX);\n```",
"id": 11719,
"inner": {
"function": {
@@ -139807,7 +137821,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -139815,86 +137829,37 @@
[
"self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
+ "generic": "Self"
}
],
[
- "f",
+ "rhs",
{
- "borrowed_ref": {
- "is_mutable": true,
- "lifetime": null,
- "type": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'_"
- }
- ],
- "constraints": []
- }
- },
- "id": 343,
- "path": "Formatter"
- }
- }
- }
+ "primitive": "isize"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "tuple": []
- }
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 11717,
- "path": "Error"
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 57,
- "path": "Result"
- }
+ "primitive": "isize"
}
}
}
},
"links": {},
- "name": "fmt",
+ "name": "wrapping_sub",
"span": {
"begin": [
- 2552,
+ 420,
5
],
"end": [
- 2552,
- 61
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/ptr/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"1172": {
"attrs": [],
@@ -139971,7 +137936,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -139982,157 +137947,108 @@
"visibility": "default"
},
"11720": {
- "attrs": [],
- "crate_id": 0,
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Unchecked integer subtraction. Computes `self - rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_sub(y)` is semantically equivalent to calling\n`x.`[`checked_sub`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_sub`].\n\n# Safety\n\nThis results in undefined behavior when\n`self - rhs > isize::MAX` or `self - rhs < isize::MIN`,\ni.e. when [`checked_sub`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_sub`]: isize::checked_sub\n[`wrapping_sub`]: isize::wrapping_sub",
"id": 11720,
"inner": {
- "impl": {
- "blanket_impl": {
- "generic": "F"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "for": {
- "function_pointer": {
- "generic_params": [],
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "_",
- {
- "generic": "T"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "generic": "Ret"
- }
- }
- }
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": true
},
- "generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "F"
- }
- ],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 11705,
- "path": "FnPtr"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "F"
- }
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
}
- }
- ]
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 11719
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": null,
- "id": 9184,
- "path": "Pointer"
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
}
}
},
- "links": {},
- "name": null,
+ "links": {
+ "isize::checked_sub": 11717,
+ "isize::wrapping_sub": 11719
+ },
+ "name": "unchecked_sub",
"span": {
"begin": [
- 2551,
- 1
+ 420,
+ 5
],
"end": [
- 2551,
- 34
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/ptr/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"11721": {
- "attrs": [],
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Checked subtraction with an unsigned integer. Computes `self - rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1isize.checked_sub_unsigned(2), Some(-1));\nassert_eq!((isize::MIN + 2).checked_sub_unsigned(3), None);\n```",
"id": 11721,
"inner": {
"function": {
"generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "HH"
- }
- ],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 537,
- "path": "Hasher"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "HH"
- }
- }
- }
- ]
+ "params": [],
+ "where_predicates": []
},
"has_body": true,
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -140140,238 +138056,153 @@
[
"self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
+ "generic": "Self"
}
],
[
- "state",
+ "rhs",
{
- "borrowed_ref": {
- "is_mutable": true,
- "lifetime": null,
- "type": {
- "generic": "HH"
- }
- }
+ "primitive": "usize"
}
]
],
"is_c_variadic": false,
- "output": null
- }
- }
- },
- "links": {},
- "name": "hash",
- "span": {
- "begin": [
- 2545,
- 5
- ],
- "end": [
- 2545,
- 53
- ],
- "filename": "checkouts/rust/library/core/src/ptr/mod.rs"
- },
- "visibility": "default"
- },
- "11722": {
- "attrs": [],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 11722,
- "inner": {
- "impl": {
- "blanket_impl": {
- "generic": "F"
- },
- "for": {
- "function_pointer": {
- "generic_params": [],
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "_",
- {
- "generic": "T"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "generic": "Ret"
- }
- }
- }
- },
- "generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "F"
- }
- ],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 11705,
- "path": "FnPtr"
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "isize"
}
}
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "F"
+ ],
+ "constraints": []
}
- }
+ },
+ "id": 51,
+ "path": "Option"
}
- ]
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 11721
- ],
- "provided_trait_methods": [
- "hash_slice"
- ],
- "trait": {
- "args": null,
- "id": 539,
- "path": "Hash"
+ }
}
}
},
"links": {},
- "name": null,
+ "name": "checked_sub_unsigned",
"span": {
"begin": [
- 2544,
- 1
+ 420,
+ 5
],
"end": [
- 2544,
- 32
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/ptr/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "11723": {
- "attrs": [],
+ "11722": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 11723,
+ "docs": "Strict subtraction with an unsigned integer. Computes `self - rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1isize.strict_sub_unsigned(2), -1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (isize::MIN + 2).strict_sub_unsigned(3);\n```",
+ "id": 11722,
"inner": {
- "assoc_type": {
- "bounds": [],
+ "function": {
"generics": {
- "params": [
- {
- "kind": {
- "lifetime": {
- "outlives": []
- }
- },
- "name": "'a"
- }
- ],
+ "params": [],
"where_predicates": []
},
- "type": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "F"
- }
- }
- ],
- "constraints": []
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
}
- },
- "id": 11724,
- "path": "CharPredicateSearcher"
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
}
}
}
},
"links": {},
- "name": "Searcher",
+ "name": "strict_sub_unsigned",
"span": {
"begin": [
- 946,
+ 420,
5
],
"end": [
- 946,
- 98
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/str/pattern.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "11725": {
- "attrs": [],
+ "11723": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 11725,
+ "docs": "Checked integer multiplication. Computes `self * rhs`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(isize::MAX.checked_mul(1), Some(isize::MAX));\nassert_eq!(isize::MAX.checked_mul(2), None);\n```",
+ "id": 11723,
"inner": {
"function": {
"generics": {
- "params": [
- {
- "kind": {
- "lifetime": {
- "outlives": []
- }
- },
- "name": "'a"
- }
- ],
+ "params": [],
"where_predicates": []
},
"has_body": true,
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -140383,15 +138214,9 @@
}
],
[
- "haystack",
+ "rhs",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": "'a",
- "type": {
- "primitive": "str"
- }
- }
+ "primitive": "isize"
}
]
],
@@ -140401,66 +138226,69 @@
"args": {
"angle_bracketed": {
"args": [
- {
- "lifetime": "'a"
- },
{
"type": {
- "generic": "F"
+ "primitive": "isize"
}
}
],
"constraints": []
}
},
- "id": 11724,
- "path": "CharPredicateSearcher"
+ "id": 51,
+ "path": "Option"
}
}
}
}
},
"links": {},
- "name": "into_searcher",
+ "name": "checked_mul",
"span": {
"begin": [
- 946,
+ 420,
5
],
"end": [
- 946,
- 98
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/str/pattern.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "11726": {
- "attrs": [],
+ "11724": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 11726,
+ "docs": "Strict integer multiplication. Computes `self * rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(isize::MAX.strict_mul(1), isize::MAX);\n```\n\nThe following panics because of overflow:\n\n``` should_panic\nlet _ = isize::MAX.strict_mul(2);\n```",
+ "id": 11724,
"inner": {
"function": {
"generics": {
- "params": [
- {
- "kind": {
- "lifetime": {
- "outlives": []
- }
- },
- "name": "'a"
- }
- ],
+ "params": [],
"where_predicates": []
},
"has_body": true,
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -140472,66 +138300,63 @@
}
],
[
- "haystack",
+ "rhs",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": "'a",
- "type": {
- "primitive": "str"
- }
- }
+ "primitive": "isize"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "primitive": "isize"
}
}
}
},
"links": {},
- "name": "is_contained_in",
+ "name": "strict_mul",
"span": {
"begin": [
- 946,
+ 420,
5
],
"end": [
- 946,
- 98
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/str/pattern.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "11727": {
- "attrs": [],
+ "11725": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 11727,
+ "docs": "Wrapping (modular) multiplication. Computes `self * rhs`, wrapping around at\nthe boundary of the type.\n\n# Examples\n\n```\nassert_eq!(10isize.wrapping_mul(12), 120);\nassert_eq!(11i8.wrapping_mul(12), -124);\n```",
+ "id": 11725,
"inner": {
"function": {
"generics": {
- "params": [
- {
- "kind": {
- "lifetime": {
- "outlives": []
- }
- },
- "name": "'a"
- }
- ],
+ "params": [],
"where_predicates": []
},
"has_body": true,
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -140543,67 +138368,67 @@
}
],
[
- "haystack",
+ "rhs",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": "'a",
- "type": {
- "primitive": "str"
- }
- }
+ "primitive": "isize"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "primitive": "isize"
}
}
}
},
"links": {},
- "name": "is_prefix_of",
+ "name": "wrapping_mul",
"span": {
"begin": [
- 946,
+ 420,
5
],
"end": [
- 946,
- 98
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/str/pattern.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "11728": {
- "attrs": [],
+ "11726": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 11728,
+ "docs": "Unchecked integer multiplication. Computes `self * rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_mul(y)` is semantically equivalent to calling\n`x.`[`checked_mul`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_mul`].\n\n# Safety\n\nThis results in undefined behavior when\n`self * rhs > isize::MAX` or `self * rhs < isize::MIN`,\ni.e. when [`checked_mul`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_mul`]: isize::checked_mul\n[`wrapping_mul`]: isize::wrapping_mul",
+ "id": 11726,
"inner": {
"function": {
"generics": {
- "params": [
- {
- "kind": {
- "lifetime": {
- "outlives": []
- }
- },
- "name": "'a"
- }
- ],
+ "params": [],
"where_predicates": []
},
"has_body": true,
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
- "is_unsafe": false
+ "is_const": true,
+ "is_unsafe": true
},
"sig": {
"inputs": [
@@ -140614,136 +138439,152 @@
}
],
[
- "haystack",
+ "rhs",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": "'a",
- "type": {
- "primitive": "str"
- }
- }
+ "primitive": "isize"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": "'a",
- "type": {
- "primitive": "str"
- }
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
+ "primitive": "isize"
}
}
}
},
- "links": {},
- "name": "strip_prefix_of",
+ "links": {
+ "isize::checked_mul": 11723,
+ "isize::wrapping_mul": 11725
+ },
+ "name": "unchecked_mul",
"span": {
"begin": [
- 946,
+ 420,
5
],
"end": [
- 946,
- 98
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/str/pattern.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "11729": {
- "attrs": [],
- "crate_id": 1,
- "deprecation": null,
- "docs": null,
- "id": 11729,
- "inner": {
- "function": {
- "generics": {
- "params": [
- {
- "kind": {
- "lifetime": {
- "outlives": []
- }
- },
- "name": "'a"
- }
+ "11727": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Checked integer division. Computes `self / rhs`, returning `None` if `rhs == 0`\nor the division results in overflow.\n\n# Examples\n\n```\nassert_eq!((isize::MIN + 1).checked_div(-1), Some(9223372036854775807));\nassert_eq!(isize::MIN.checked_div(-1), None);\nassert_eq!((1isize).checked_div(0), None);\n```",
+ "id": 11727,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- }
- ],
- "constraints": []
- }
- },
- "id": 9496,
- "path": "ReverseSearcher"
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "isize"
}
}
- }
- ],
- "generic_params": [],
- "type": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "F"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 11724,
- "path": "CharPredicateSearcher"
- }
+ ],
+ "constraints": []
}
- }
+ },
+ "id": 51,
+ "path": "Option"
}
- ]
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "checked_div",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11728": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Strict integer division. Computes `self / rhs`, panicking\nif overflow occurred.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type.\n\n# Examples\n\n```\nassert_eq!((isize::MIN + 1).strict_div(-1), 9223372036854775807);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = isize::MIN.strict_div(-1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1isize).strict_div(0);\n```",
+ "id": 11728,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
"has_body": true,
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -140755,39 +138596,116 @@
}
],
[
- "haystack",
+ "rhs",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": "'a",
- "type": {
- "primitive": "str"
- }
- }
+ "primitive": "isize"
}
]
],
"is_c_variadic": false,
"output": {
- "primitive": "bool"
+ "primitive": "isize"
}
}
}
},
"links": {},
- "name": "is_suffix_of",
+ "name": "strict_div",
"span": {
"begin": [
- 946,
+ 420,
5
],
"end": [
- 946,
- 98
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/str/pattern.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
+ },
+ "11729": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Checked Euclidean division. Computes `self.div_euclid(rhs)`,\nreturning `None` if `rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!((isize::MIN + 1).checked_div_euclid(-1), Some(9223372036854775807));\nassert_eq!(isize::MIN.checked_div_euclid(-1), None);\nassert_eq!((1isize).checked_div_euclid(0), None);\n```",
+ "id": 11729,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "isize"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "checked_div_euclid",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
},
"1173": {
"attrs": [],
@@ -140875,80 +138793,102 @@
"visibility": "default"
},
"11730": {
- "attrs": [],
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
"crate_id": 1,
"deprecation": null,
- "docs": null,
+ "docs": "Strict Euclidean division. Computes `self.div_euclid(rhs)`, panicking\nif overflow occurred.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type.\n\n# Examples\n\n```\nassert_eq!((isize::MIN + 1).strict_div_euclid(-1), 9223372036854775807);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = isize::MIN.strict_div_euclid(-1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1isize).strict_div_euclid(0);\n```",
"id": 11730,
"inner": {
"function": {
"generics": {
- "params": [
- {
- "kind": {
- "lifetime": {
- "outlives": []
- }
- },
- "name": "'a"
- }
- ],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- }
- ],
- "constraints": []
- }
- },
- "id": 9496,
- "path": "ReverseSearcher"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "F"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 11724,
- "path": "CharPredicateSearcher"
- }
- }
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
}
- }
- ]
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "strict_div_euclid",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11731": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Checked integer division without remainder. Computes `self / rhs`,\nreturning `None` if `rhs == 0`, the division results in overflow,\nor `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!((isize::MIN + 1).checked_exact_div(-1), Some(9223372036854775807));\nassert_eq!((-5isize).checked_exact_div(2), None);\nassert_eq!(isize::MIN.checked_exact_div(-1), None);\nassert_eq!((1isize).checked_exact_div(0), None);\n```",
+ "id": 11731,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
"has_body": true,
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -140960,15 +138900,9 @@
}
],
[
- "haystack",
+ "rhs",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": "'a",
- "type": {
- "primitive": "str"
- }
- }
+ "primitive": "isize"
}
]
],
@@ -140980,13 +138914,7 @@
"args": [
{
"type": {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": "'a",
- "type": {
- "primitive": "str"
- }
- }
+ "primitive": "isize"
}
}
],
@@ -141001,251 +138929,600 @@
}
},
"links": {},
- "name": "strip_suffix_of",
+ "name": "checked_exact_div",
"span": {
"begin": [
- 946,
+ 420,
5
],
"end": [
- 946,
- 98
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/str/pattern.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "11731": {
- "attrs": [],
- "crate_id": 0,
+ "11732": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 11731,
+ "docs": "Checked integer division without remainder. Computes `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs == 0`, the division results in overflow,\nor `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64isize.exact_div(2), 32);\nassert_eq!(64isize.exact_div(32), 2);\nassert_eq!((isize::MIN + 1).exact_div(-1), 9223372036854775807);\n```\n\n```should_panic\n#![feature(exact_div)]\nlet _ = 65isize.exact_div(2);\n```\n```should_panic\n#![feature(exact_div)]\nlet _ = isize::MIN.exact_div(-1);\n```",
+ "id": 11732,
"inner": {
- "impl": {
- "blanket_impl": {
- "generic": "F"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "for": {
- "function_pointer": {
- "generic_params": [],
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "_",
- {
- "generic": "T"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "generic": "Ret"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
}
- }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
}
+ }
+ }
+ },
+ "links": {},
+ "name": "exact_div",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11733": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Unchecked integer division without remainder. Computes `self / rhs`.\n\n# Safety\n\nThis results in undefined behavior when `rhs == 0`, `self % rhs != 0`, or\n`self == isize::MIN && rhs == -1`,\ni.e. when [`checked_exact_div`](Self::checked_exact_div) would return `None`.",
+ "id": 11733,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": true
},
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {
+ "Self::checked_exact_div": 11731
+ },
+ "name": "unchecked_exact_div",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11734": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Checked integer remainder. Computes `self % rhs`, returning `None` if\n`rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!(5isize.checked_rem(2), Some(1));\nassert_eq!(5isize.checked_rem(0), None);\nassert_eq!(isize::MIN.checked_rem(-1), None);\n```",
+ "id": 11734,
+ "inner": {
+ "function": {
"generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "F"
- }
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": {
- "parenthesized": {
- "inputs": [
- {
- "primitive": "char"
- }
- ],
- "output": {
- "primitive": "bool"
- }
- }
- },
- "id": 13,
- "path": "FnMut"
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "isize"
}
}
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "F"
+ ],
+ "constraints": []
}
- }
+ },
+ "id": 51,
+ "path": "Option"
}
- ]
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 11723,
- 11725,
- 11726,
- 11727,
- 11728,
- 11729,
- 11730
- ],
- "provided_trait_methods": [
- "is_contained_in",
- "is_prefix_of",
- "is_suffix_of",
- "strip_prefix_of",
- "strip_suffix_of",
- "as_utf8_pattern"
- ],
- "trait": {
- "args": null,
- "id": 9493,
- "path": "Pattern"
+ }
}
}
},
"links": {},
- "name": null,
+ "name": "checked_rem",
"span": {
"begin": [
- 942,
- 1
+ 420,
+ 5
],
"end": [
- 944,
- 28
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/str/pattern.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "11732": {
- "attrs": [],
- "crate_id": 0,
+ "11735": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 11732,
+ "docs": "Strict integer remainder. Computes `self % rhs`, panicking if\nthe division results in overflow.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is `x % y` for `MIN / -1` on a\nsigned type (where `MIN` is the negative minimal value), which is invalid due to implementation artifacts.\n\n# Examples\n\n```\nassert_eq!(5isize.strict_rem(2), 1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5isize.strict_rem(0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = isize::MIN.strict_rem(-1);\n```",
+ "id": 11735,
"inner": {
- "impl": {
- "blanket_impl": {
- "generic": "T"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "for": {
- "function_pointer": {
- "generic_params": [],
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "_",
- {
- "generic": "T"
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "generic": "Ret"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
}
- }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
}
- },
+ }
+ }
+ },
+ "links": {},
+ "name": "strict_rem",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11736": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Checked Euclidean remainder. Computes `self.rem_euclid(rhs)`, returning `None`\nif `rhs == 0` or the division results in overflow.\n\n# Examples\n\n```\nassert_eq!(5isize.checked_rem_euclid(2), Some(1));\nassert_eq!(5isize.checked_rem_euclid(0), None);\nassert_eq!(isize::MIN.checked_rem_euclid(-1), None);\n```",
+ "id": 11736,
+ "inner": {
+ "function": {
"generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "isize"
+ }
+ }
+ ],
+ "constraints": []
}
},
- "name": "T"
+ "id": 51,
+ "path": "Option"
}
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "checked_rem_euclid",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11737": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Strict Euclidean remainder. Computes `self.rem_euclid(rhs)`, panicking if\nthe division results in overflow.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\nThe only case where such an overflow can occur is `x % y` for `MIN / -1` on a\nsigned type (where `MIN` is the negative minimal value), which is invalid due to implementation artifacts.\n\n# Examples\n\n```\nassert_eq!(5isize.strict_rem_euclid(2), 1);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5isize.strict_rem_euclid(0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = isize::MIN.strict_rem_euclid(-1);\n```",
+ "id": 11737,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 99,
- "path": "Clone"
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "strict_rem_euclid",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11738": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Checked negation. Computes `-self`, returning `None` if `self == MIN`.\n\n# Examples\n\n```\nassert_eq!(5isize.checked_neg(), Some(-5));\nassert_eq!(isize::MIN.checked_neg(), None);\n```",
+ "id": 11738,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "isize"
}
}
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "T"
+ ],
+ "constraints": []
}
- }
+ },
+ "id": 51,
+ "path": "Option"
}
- ]
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 430,
- 431,
- 432
- ],
- "provided_trait_methods": [
- "clone_into"
- ],
- "trait": {
- "args": null,
- "id": 157,
- "path": "ToOwned"
+ }
}
}
},
"links": {},
- "name": null,
+ "name": "checked_neg",
"span": {
"begin": [
- 82,
- 1
+ 420,
+ 5
],
"end": [
- 84,
- 14
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/alloc/src/borrow.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
+ },
+ "11739": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_neg\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Unchecked negation. Computes `-self`, assuming overflow cannot occur.\n\n# Safety\n\nThis results in undefined behavior when\n`self == isize::MIN`,\ni.e. when [`checked_neg`] would return `None`.\n\n[`checked_neg`]: isize::checked_neg",
+ "id": 11739,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": true
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {
+ "isize::checked_neg": 11738
+ },
+ "name": "unchecked_neg",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
},
"1174": {
"attrs": [],
@@ -141322,7 +139599,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -141332,6 +139609,734 @@
"span": null,
"visibility": "default"
},
+ "11740": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Strict negation. Computes `-self`, panicking if `self == MIN`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(5isize.strict_neg(), -5);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = isize::MIN.strict_neg();\n```",
+ "id": 11740,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "strict_neg",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11741": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Checked shift left. Computes `self << rhs`, returning `None` if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x1isize.checked_shl(4), Some(0x10));\nassert_eq!(0x1isize.checked_shl(129), None);\nassert_eq!(0x10isize.checked_shl(63), Some(0));\n```",
+ "id": 11741,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "isize"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "checked_shl",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11742": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Strict shift left. Computes `self << rhs`, panicking if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x1isize.strict_shl(4), 0x10);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x1isize.strict_shl(129);\n```",
+ "id": 11742,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "strict_shl",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11743": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Unchecked shift left. Computes `self << rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shl`] would return `None`.\n\n[`checked_shl`]: isize::checked_shl",
+ "id": 11743,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": true
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {
+ "isize::checked_shl": 11741
+ },
+ "name": "unchecked_shl",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11744": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x1isize.unbounded_shl(4), 0x10);\nassert_eq!(0x1isize.unbounded_shl(129), 0);\n```",
+ "id": 11744,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "unbounded_shl",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11745": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Exact shift left. Computes `self << rhs` as long as it can be reversed losslessly.\n\nReturns `None` if any bits that would be shifted out differ from the resulting sign bit\nor if `rhs` >=\n`isize::BITS`.\nOtherwise, returns `Some(self << rhs)`.\n\n# Examples\n\n```\n#![feature(exact_bitshifts)]\n\nassert_eq!(0x1isize.exact_shl(4), Some(0x10));\nassert_eq!(0x1isize.exact_shl(isize::BITS - 2), Some(1 << isize::BITS - 2));\nassert_eq!(0x1isize.exact_shl(isize::BITS - 1), None);\nassert_eq!((-0x2isize).exact_shl(isize::BITS - 2), Some(-0x2 << isize::BITS - 2));\nassert_eq!((-0x2isize).exact_shl(isize::BITS - 1), None);\n```",
+ "id": 11745,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "isize"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "exact_shl",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11746": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Unchecked exact shift left. Computes `self << rhs`, assuming the operation can be\nlosslessly reversed and `rhs` cannot be larger than\n`isize::BITS`.\n\n# Safety\n\nThis results in undefined behavior when `rhs >= self.leading_zeros() && rhs >=\nself.leading_ones()` i.e. when\n[`isize::exact_shl`]\nwould return `None`.",
+ "id": 11746,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": true
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {
+ "`isize::exact_shl`": 11745
+ },
+ "name": "unchecked_exact_shl",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11747": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Checked shift right. Computes `self >> rhs`, returning `None` if `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x10isize.checked_shr(4), Some(0x1));\nassert_eq!(0x10isize.checked_shr(128), None);\n```",
+ "id": 11747,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "isize"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "checked_shr",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11748": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Strict shift right. Computes `self >> rhs`, panicking `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x10isize.strict_shr(4), 0x1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10isize.strict_shr(128);\n```",
+ "id": 11748,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "strict_shr",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11749": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Unchecked shift right. Computes `self >> rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shr`] would return `None`.\n\n[`checked_shr`]: isize::checked_shr",
+ "id": 11749,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": true
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {
+ "isize::checked_shr": 11747
+ },
+ "name": "unchecked_shr",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
"1175": {
"attrs": [],
"crate_id": 0,
@@ -141408,7 +140413,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -141429,7 +140434,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -141450,7 +140455,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -141460,1324 +140465,736 @@
"span": null,
"visibility": "default"
},
- "1176": {
- "attrs": [],
- "crate_id": 0,
+ "11750": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 1176,
+ "docs": "Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, which yields `0` for a positive number,\nand `-1` for a negative number.\n\n# Examples\n\n```\nassert_eq!(0x10isize.unbounded_shr(4), 0x1);\nassert_eq!(0x10isize.unbounded_shr(129), 0);\nassert_eq!(isize::MIN.unbounded_shr(129), -1);\n```",
+ "id": 11750,
"inner": {
- "impl": {
- "blanket_impl": {
- "generic": "T"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- }
- ],
- "constraints": []
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
}
- },
- "id": 1132,
- "path": "OccupiedEntry"
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
}
- },
+ }
+ }
+ },
+ "links": {},
+ "name": "unbounded_shr",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11751": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Exact shift right. Computes `self >> rhs` as long as it can be reversed losslessly.\n\nReturns `None` if any non-zero bits would be shifted out or if `rhs` >=\n`isize::BITS`.\nOtherwise, returns `Some(self >> rhs)`.\n\n# Examples\n\n```\n#![feature(exact_bitshifts)]\n\nassert_eq!(0x10isize.exact_shr(4), Some(0x1));\nassert_eq!(0x10isize.exact_shr(5), None);\n```",
+ "id": 11751,
+ "inner": {
+ "function": {
"generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "T"
- }
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "maybe",
- "trait": {
- "args": null,
- "id": 3,
- "path": "Sized"
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "isize"
}
}
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "T"
- }
- }
- }
- ]
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 321
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "generic": "T"
- }
+ ],
+ "constraints": []
}
- ],
- "constraints": []
+ },
+ "id": 51,
+ "path": "Option"
}
- },
- "id": 323,
- "path": "Borrow"
+ }
}
}
},
"links": {},
- "name": null,
+ "name": "exact_shr",
"span": {
"begin": [
- 209,
- 1
+ 420,
+ 5
],
"end": [
- 209,
- 32
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/borrow.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "1177": {
- "attrs": [],
- "crate_id": 0,
+ "11752": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 1177,
+ "docs": "Unchecked exact shift right. Computes `self >> rhs`, assuming the operation can be\nlosslessly reversed and `rhs` cannot be larger than\n`isize::BITS`.\n\n# Safety\n\nThis results in undefined behavior when `rhs > self.trailing_zeros() || rhs >=\nisize::BITS`\ni.e. when\n[`isize::exact_shr`]\nwould return `None`.",
+ "id": 11752,
"inner": {
- "impl": {
- "blanket_impl": {
- "generic": "T"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- }
- ],
- "constraints": []
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": true
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
}
- },
- "id": 1132,
- "path": "OccupiedEntry"
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
}
- },
+ }
+ }
+ },
+ "links": {
+ "`isize::exact_shr`": 11751
+ },
+ "name": "unchecked_exact_shr",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11753": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Checked absolute value. Computes `self.abs()`, returning `None` if\n`self == MIN`.\n\n# Examples\n\n```\nassert_eq!((-5isize).checked_abs(), Some(5));\nassert_eq!(isize::MIN.checked_abs(), None);\n```",
+ "id": 11753,
+ "inner": {
+ "function": {
"generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "T"
- }
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "maybe",
- "trait": {
- "args": null,
- "id": 3,
- "path": "Sized"
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "isize"
}
}
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "T"
- }
- }
- }
- ]
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 324
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "generic": "T"
- }
+ ],
+ "constraints": []
}
- ],
- "constraints": []
+ },
+ "id": 51,
+ "path": "Option"
}
- },
- "id": 326,
- "path": "BorrowMut"
+ }
}
}
},
"links": {},
- "name": null,
+ "name": "checked_abs",
"span": {
"begin": [
- 217,
- 1
+ 420,
+ 5
],
"end": [
- 217,
- 35
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/borrow.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "11774": {
+ "11754": {
"attrs": [
{
- "other": "#[(not(restricted_std), stable(feature = \"rust1\", since = \"1.0.0\"))]"
- },
- {
- "other": "#[(restricted_std,\nunstable(feature = \"restricted_std\", issue = \"none\", reason =\n\"You have attempted to use a standard library built for a platform that it doesn't \\\n know how to support. Consider building it for a known environment, disabling it with \\\n `#![no_std]` or overriding this warning by enabling this feature.\"))]"
- },
- {
- "other": "#[rustc_preserve_ub_checks]"
- },
- {
- "other": "#[doc(html_playground_url = \"https://play.rust-lang.org/\",\nissue_tracker_base_url = \"https://github.com/rust-lang/rust/issues/\",\ntest(no_crate_inject, attr(deny(warnings))),\ntest(attr(allow(dead_code, deprecated, unused_variables, unused_mut))))]"
- },
- {
- "other": "#[doc(rust_logo)]"
- },
- {
- "other": "#[doc(cfg_hide(not(test), no_global_oom_handling,\nnot(no_global_oom_handling)))]"
- },
- {
- "other": "#[no_std]"
- },
- {
- "other": "#[needs_panic_runtime]"
- },
- {
- "other": "#[warn(deprecated_in_future)]"
- },
- {
- "other": "#[warn(missing_docs)]"
- },
- {
- "other": "#[warn(missing_debug_implementations)]"
- },
- {
- "other": "#[allow(explicit_outlives_requirements)]"
- },
- {
- "other": "#[allow(unused_lifetimes)]"
- },
- {
- "other": "#[allow(internal_features)]"
- },
- {
- "other": "#[deny(fuzzy_provenance_casts)]"
- },
- {
- "other": "#[deny(unsafe_op_in_unsafe_fn)]"
- },
- {
- "other": "#[allow(rustdoc::redundant_explicit_links)]"
- },
- {
- "other": "#[warn(rustdoc::unescaped_backticks)]"
- },
- {
- "other": "#[deny(ffi_unwind_calls)]"
- },
- {
- "other": "#[allow(unused_features)]"
- },
- {
- "other": "#[(test,\nfeature(internal_output_capture, print_internals, update_panic_count, rt))]"
- },
- {
- "other": "#[(all(target_vendor = \"fortanix\", target_env = \"sgx\"),\nfeature(slice_index_methods, coerce_unsized, sgx_platform))]"
- },
- {
- "other": "#[(any(windows, target_os = \"uefi\"), feature(round_char_boundary))]"
- },
- {
- "other": "#[(target_family = \"wasm\", feature(stdarch_wasm_atomic_wait))]"
- },
- {
- "other": "#[(target_arch = \"wasm64\", feature(simd_wasm64))]"
- },
- {
- "other": "#[feature(alloc_error_handler)]"
- },
- {
- "other": "#[feature(allocator_internals)]"
- },
- {
- "other": "#[feature(allow_internal_unsafe)]"
- },
- {
- "other": "#[feature(allow_internal_unstable)]"
- },
- {
- "other": "#[feature(asm_experimental_arch)]"
- },
- {
- "other": "#[feature(autodiff)]"
- },
- {
- "other": "#[feature(cfg_sanitizer_cfi)]"
- },
- {
- "other": "#[feature(cfg_target_thread_local)]"
- },
- {
- "other": "#[feature(cfi_encoding)]"
- },
- {
- "other": "#[feature(char_max_len)]"
- },
- {
- "other": "#[feature(const_trait_impl)]"
- },
- {
- "other": "#[feature(core_float_math)]"
- },
- {
- "other": "#[feature(decl_macro)]"
- },
- {
- "other": "#[feature(deprecated_suggestion)]"
- },
- {
- "other": "#[feature(derive_const)]"
- },
- {
- "other": "#[feature(doc_cfg)]"
- },
- {
- "other": "#[feature(doc_cfg_hide)]"
- },
- {
- "other": "#[feature(doc_masked)]"
- },
- {
- "other": "#[feature(doc_notable_trait)]"
- },
- {
- "other": "#[feature(dropck_eyepatch)]"
- },
- {
- "other": "#[feature(extended_varargs_abi_support)]"
- },
- {
- "other": "#[feature(f16)]"
- },
- {
- "other": "#[feature(f128)]"
- },
- {
- "other": "#[feature(ffi_const)]"
- },
- {
- "other": "#[feature(formatting_options)]"
- },
- {
- "other": "#[feature(hash_map_internals)]"
- },
- {
- "other": "#[feature(hash_map_macro)]"
- },
- {
- "other": "#[feature(if_let_guard)]"
- },
- {
- "other": "#[feature(intra_doc_pointers)]"
- },
- {
- "other": "#[feature(iter_advance_by)]"
- },
- {
- "other": "#[feature(iter_next_chunk)]"
- },
- {
- "other": "#[feature(lang_items)]"
- },
- {
- "other": "#[feature(link_cfg)]"
- },
- {
- "other": "#[feature(linkage)]"
- },
- {
- "other": "#[feature(macro_metavar_expr_concat)]"
- },
- {
- "other": "#[feature(maybe_uninit_fill)]"
- },
- {
- "other": "#[feature(min_specialization)]"
- },
- {
- "other": "#[feature(must_not_suspend)]"
- },
- {
- "other": "#[feature(needs_panic_runtime)]"
- },
- {
- "other": "#[feature(negative_impls)]"
- },
- {
- "other": "#[feature(never_type)]"
- },
- {
- "other": "#[feature(optimize_attribute)]"
- },
- {
- "other": "#[feature(prelude_import)]"
- },
- {
- "other": "#[feature(rustc_attrs)]"
- },
- {
- "other": "#[feature(rustdoc_internals)]"
- },
- {
- "other": "#[feature(staged_api)]"
- },
- {
- "other": "#[feature(stmt_expr_attributes)]"
- },
- {
- "other": "#[feature(strict_provenance_lints)]"
- },
- {
- "other": "#[feature(thread_local)]"
- },
- {
- "other": "#[feature(try_blocks)]"
- },
- {
- "other": "#[feature(try_trait_v2)]"
- },
- {
- "other": "#[feature(type_alias_impl_trait)]"
- },
- {
- "other": "#[feature(bstr)]"
- },
- {
- "other": "#[feature(bstr_internals)]"
- },
- {
- "other": "#[feature(cast_maybe_uninit)]"
- },
- {
- "other": "#[feature(cfg_select)]"
- },
- {
- "other": "#[feature(char_internals)]"
- },
- {
- "other": "#[feature(clone_to_uninit)]"
- },
- {
- "other": "#[feature(const_cmp)]"
- },
- {
- "other": "#[feature(const_ops)]"
- },
- {
- "other": "#[feature(const_option_ops)]"
- },
- {
- "other": "#[feature(const_try)]"
- },
- {
- "other": "#[feature(core_intrinsics)]"
- },
- {
- "other": "#[feature(core_io_borrowed_buf)]"
- },
- {
- "other": "#[feature(drop_guard)]"
- },
- {
- "other": "#[feature(duration_constants)]"
- },
- {
- "other": "#[feature(error_generic_member_access)]"
- },
- {
- "other": "#[feature(error_iter)]"
- },
- {
- "other": "#[feature(exact_size_is_empty)]"
- },
- {
- "other": "#[feature(exclusive_wrapper)]"
- },
- {
- "other": "#[feature(extend_one)]"
- },
- {
- "other": "#[feature(float_algebraic)]"
- },
- {
- "other": "#[feature(float_gamma)]"
- },
- {
- "other": "#[feature(float_minimum_maximum)]"
- },
- {
- "other": "#[feature(fmt_internals)]"
- },
- {
- "other": "#[feature(generic_atomic)]"
- },
- {
- "other": "#[feature(hasher_prefixfree_extras)]"
- },
- {
- "other": "#[feature(hashmap_internals)]"
- },
- {
- "other": "#[feature(hint_must_use)]"
- },
- {
- "other": "#[feature(ip)]"
- },
- {
- "other": "#[feature(lazy_get)]"
- },
- {
- "other": "#[feature(maybe_uninit_slice)]"
- },
- {
- "other": "#[feature(maybe_uninit_write_slice)]"
- },
- {
- "other": "#[feature(panic_can_unwind)]"
- },
- {
- "other": "#[feature(panic_internals)]"
- },
- {
- "other": "#[feature(pin_coerce_unsized_trait)]"
- },
- {
- "other": "#[feature(pointer_is_aligned_to)]"
- },
- {
- "other": "#[feature(portable_simd)]"
- },
- {
- "other": "#[feature(ptr_as_uninit)]"
- },
- {
- "other": "#[feature(ptr_mask)]"
- },
- {
- "other": "#[feature(random)]"
- },
- {
- "other": "#[feature(slice_internals)]"
- },
- {
- "other": "#[feature(slice_ptr_get)]"
- },
- {
- "other": "#[feature(slice_range)]"
- },
- {
- "other": "#[feature(std_internals)]"
- },
- {
- "other": "#[feature(str_internals)]"
- },
- {
- "other": "#[feature(strict_provenance_atomic_ptr)]"
- },
- {
- "other": "#[feature(sync_unsafe_cell)]"
- },
- {
- "other": "#[feature(temporary_niche_types)]"
- },
- {
- "other": "#[feature(ub_checks)]"
- },
- {
- "other": "#[feature(used_with_arg)]"
- },
- {
- "other": "#[feature(alloc_layout_extra)]"
- },
- {
- "other": "#[feature(allocator_api)]"
- },
- {
- "other": "#[feature(get_mut_unchecked)]"
- },
- {
- "other": "#[feature(map_try_insert)]"
- },
- {
- "other": "#[feature(new_zeroed_alloc)]"
- },
- {
- "other": "#[feature(slice_concat_trait)]"
- },
- {
- "other": "#[feature(thin_box)]"
- },
- {
- "other": "#[feature(try_reserve_kind)]"
- },
- {
- "other": "#[feature(try_with_capacity)]"
- },
- {
- "other": "#[feature(unique_rc_arc)]"
- },
- {
- "other": "#[feature(vec_into_raw_parts)]"
- },
- {
- "other": "#[feature(panic_unwind)]"
- },
- {
- "other": "#[feature(stdarch_internal)]"
- },
- {
- "other": "#[feature(assert_matches)]"
- },
- {
- "other": "#[feature(async_iterator)]"
- },
- {
- "other": "#[feature(c_variadic)]"
- },
- {
- "other": "#[feature(cfg_accessible)]"
- },
- {
- "other": "#[feature(cfg_eval)]"
- },
- {
- "other": "#[feature(concat_bytes)]"
- },
- {
- "other": "#[feature(const_format_args)]"
- },
- {
- "other": "#[feature(custom_test_frameworks)]"
- },
- {
- "other": "#[feature(edition_panic)]"
- },
- {
- "other": "#[feature(format_args_nl)]"
- },
- {
- "other": "#[feature(log_syntax)]"
- },
- {
- "other": "#[feature(test)]"
- },
- {
- "other": "#[feature(trace_macros)]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
},
{
- "other": "#[feature(io_const_error)]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
},
{
- "other": "#[default_lib_allocator]"
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = TrackCaller]"
}
],
- "crate_id": 0,
+ "crate_id": 1,
"deprecation": null,
- "docs": "# The Rust Standard Library\n\nThe Rust Standard Library is the foundation of portable Rust software, a\nset of minimal and battle-tested shared abstractions for the [broader Rust\necosystem][crates.io]. It offers core types, like [`Vec`] and\n[`Option`], library-defined [operations on language\nprimitives](#primitives), [standard macros](#macros), [I/O] and\n[multithreading], among [many other things][other].\n\n`std` is available to all Rust crates by default. Therefore, the\nstandard library can be accessed in [`use`] statements through the path\n`std`, as in [`use std::env`].\n\n# How to read this documentation\n\nIf you already know the name of what you are looking for, the fastest way to\nfind it is to use the search\nbar at the top of the page.\n\nOtherwise, you may want to jump to one of these useful sections:\n\n* [`std::*` modules](#modules)\n* [Primitive types](#primitives)\n* [Standard macros](#macros)\n* [The Rust Prelude]\n\nIf this is your first time, the documentation for the standard library is\nwritten to be casually perused. Clicking on interesting things should\ngenerally lead you to interesting places. Still, there are important bits\nyou don't want to miss, so read on for a tour of the standard library and\nits documentation!\n\nOnce you are familiar with the contents of the standard library you may\nbegin to find the verbosity of the prose distracting. At this stage in your\ndevelopment you may want to press the\n\" Summary\"\nbutton near the top of the page to collapse it into a more skimmable view.\n\nWhile you are looking at the top of the page, also notice the\n\"Source\" link. Rust's API documentation comes with the source\ncode and you are encouraged to read it. The standard library source is\ngenerally high quality and a peek behind the curtains is\noften enlightening.\n\n# What is in the standard library documentation?\n\nFirst of all, The Rust Standard Library is divided into a number of focused\nmodules, [all listed further down this page](#modules). These modules are\nthe bedrock upon which all of Rust is forged, and they have mighty names\nlike [`std::slice`] and [`std::cmp`]. Modules' documentation typically\nincludes an overview of the module along with examples, and are a smart\nplace to start familiarizing yourself with the library.\n\nSecond, implicit methods on [primitive types] are documented here. This can\nbe a source of confusion for two reasons:\n\n1. While primitives are implemented by the compiler, the standard library\n implements methods directly on the primitive types (and it is the only\n library that does so), which are [documented in the section on\n primitives](#primitives).\n2. The standard library exports many modules *with the same name as\n primitive types*. These define additional items related to the primitive\n type, but not the all-important methods.\n\nSo for example there is a [page for the primitive type\n`i32`](primitive::i32) that lists all the methods that can be called on\n32-bit integers (very useful), and there is a [page for the module\n`std::i32`] that documents the constant values [`MIN`] and [`MAX`] (rarely\nuseful).\n\nNote the documentation for the primitives [`str`] and [`[T]`][prim@slice] (also\ncalled 'slice'). Many method calls on [`String`] and [`Vec`] are actually\ncalls to methods on [`str`] and [`[T]`][prim@slice] respectively, via [deref\ncoercions][deref-coercions].\n\nThird, the standard library defines [The Rust Prelude], a small collection\nof items - mostly traits - that are imported into every module of every\ncrate. The traits in the prelude are pervasive, making the prelude\ndocumentation a good entry point to learning about the library.\n\nAnd finally, the standard library exports a number of standard macros, and\n[lists them on this page](#macros) (technically, not all of the standard\nmacros are defined by the standard library - some are defined by the\ncompiler - but they are documented here the same). Like the prelude, the\nstandard macros are imported by default into all crates.\n\n# Contributing changes to the documentation\n\nCheck out the Rust contribution guidelines [here](\nhttps://rustc-dev-guide.rust-lang.org/contributing.html#writing-documentation).\nThe source for this documentation can be found on\n[GitHub](https://github.com/rust-lang/rust) in the 'library/std/' directory.\nTo contribute changes, make sure you read the guidelines first, then submit\npull-requests for your suggested changes.\n\nContributions are appreciated! If you see a part of the docs that can be\nimproved, submit a PR, or chat with us first on [Discord][rust-discord]\n#docs.\n\n# A Tour of The Rust Standard Library\n\nThe rest of this crate documentation is dedicated to pointing out notable\nfeatures of The Rust Standard Library.\n\n## Containers and collections\n\nThe [`option`] and [`result`] modules define optional and error-handling\ntypes, [`Option`] and [`Result`]. The [`iter`] module defines\nRust's iterator trait, [`Iterator`], which works with the [`for`] loop to\naccess collections.\n\nThe standard library exposes three common ways to deal with contiguous\nregions of memory:\n\n* [`Vec`] - A heap-allocated *vector* that is resizable at runtime.\n* [`[T; N]`][prim@array] - An inline *array* with a fixed size at compile time.\n* [`[T]`][prim@slice] - A dynamically sized *slice* into any other kind of contiguous\n storage, whether heap-allocated or not.\n\nSlices can only be handled through some kind of *pointer*, and as such come\nin many flavors such as:\n\n* `&[T]` - *shared slice*\n* `&mut [T]` - *mutable slice*\n* [`Box<[T]>`][owned slice] - *owned slice*\n\n[`str`], a UTF-8 string slice, is a primitive type, and the standard library\ndefines many methods for it. Rust [`str`]s are typically accessed as\nimmutable references: `&str`. Use the owned [`String`] for building and\nmutating strings.\n\nFor converting to strings use the [`format!`] macro, and for converting from\nstrings use the [`FromStr`] trait.\n\nData may be shared by placing it in a reference-counted box or the [`Rc`]\ntype, and if further contained in a [`Cell`] or [`RefCell`], may be mutated\nas well as shared. Likewise, in a concurrent setting it is common to pair an\natomically-reference-counted box, [`Arc`], with a [`Mutex`] to get the same\neffect.\n\nThe [`collections`] module defines maps, sets, linked lists and other\ntypical collection types, including the common [`HashMap`].\n\n## Platform abstractions and I/O\n\nBesides basic data types, the standard library is largely concerned with\nabstracting over differences in common platforms, most notably Windows and\nUnix derivatives.\n\nCommon types of I/O, including [files], [TCP], and [UDP], are defined in\nthe [`io`], [`fs`], and [`net`] modules.\n\nThe [`thread`] module contains Rust's threading abstractions. [`sync`]\ncontains further primitive shared memory types, including [`atomic`], [`mpmc`] and\n[`mpsc`], which contains the channel types for message passing.\n\n# Use before and after `main()`\n\nMany parts of the standard library are expected to work before and after `main()`;\nbut this is not guaranteed or ensured by tests. It is recommended that you write your own tests\nand run them on each platform you wish to support.\nThis means that use of `std` before/after main, especially of features that interact with the\nOS or global state, is exempted from stability and portability guarantees and instead only\nprovided on a best-effort basis. Nevertheless bug reports are appreciated.\n\nOn the other hand `core` and `alloc` are most likely to work in such environments with\nthe caveat that any hookable behavior such as panics, oom handling or allocators will also\ndepend on the compatibility of the hooks.\n\nSome features may also behave differently outside main, e.g. stdio could become unbuffered,\nsome panics might turn into aborts, backtraces might not get symbolicated or similar.\n\nNon-exhaustive list of known limitations:\n\n- after-main use of thread-locals, which also affects additional features:\n - [`thread::current()`]\n- under UNIX, before main, file descriptors 0, 1, and 2 may be unchanged\n (they are guaranteed to be open during main,\n and are opened to /dev/null O_RDWR if they weren't open on program start)\n\n\n[I/O]: io\n[`MIN`]: i32::MIN\n[`MAX`]: i32::MAX\n[page for the module `std::i32`]: crate::i32\n[TCP]: net::TcpStream\n[The Rust Prelude]: prelude\n[UDP]: net::UdpSocket\n[`Arc`]: sync::Arc\n[owned slice]: boxed\n[`Cell`]: cell::Cell\n[`FromStr`]: str::FromStr\n[`HashMap`]: collections::HashMap\n[`Mutex`]: sync::Mutex\n[`Option`]: option::Option\n[`Rc`]: rc::Rc\n[`RefCell`]: cell::RefCell\n[`Result`]: result::Result\n[`Vec`]: vec::Vec\n[`atomic`]: sync::atomic\n[`for`]: ../book/ch03-05-control-flow.html#looping-through-a-collection-with-for\n[`str`]: prim@str\n[`mpmc`]: sync::mpmc\n[`mpsc`]: sync::mpsc\n[`std::cmp`]: cmp\n[`std::slice`]: mod@slice\n[`use std::env`]: env/index.html\n[`use`]: ../book/ch07-02-defining-modules-to-control-scope-and-privacy.html\n[crates.io]: https://crates.io\n[deref-coercions]: ../book/ch15-02-deref.html#implicit-deref-coercions-with-functions-and-methods\n[files]: fs::File\n[multithreading]: thread\n[other]: #what-is-in-the-standard-library-documentation\n[primitive types]: ../book/ch03-02-data-types.html\n[rust-discord]: https://discord.gg/rust-lang\n[array]: prim@array\n[slice]: prim@slice",
- "id": 11774,
+ "docs": "Strict absolute value. Computes `self.abs()`, panicking if\n`self == MIN`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((-5isize).strict_abs(), 5);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = isize::MIN.strict_abs();\n```",
+ "id": 11754,
"inner": {
- "module": {
- "is_crate": true,
- "is_stripped": false,
- "items": [
- 166,
- 232,
- 236,
- 268,
- 300,
- 607,
- 656,
- 726,
- 731,
- 733,
- 1870,
- 1911,
- 1934,
- 2424,
- 3042,
- 501,
- 4769,
- 4811,
- 6198,
- 6274,
- 6277,
- 6510,
- 5390,
- 7198,
- 8490,
- 8626,
- 8671,
- 8676,
- 8681,
- 8704,
- 9083,
- 9136,
- 9235,
- 9237,
- 9239,
- 9241,
- 9242,
- 9244,
- 9245,
- 9246,
- 9247,
- 9248,
- 9249,
- 9251,
- 9253,
- 9255,
- 9257,
- 9259,
- 9261,
- 9263,
- 9265,
- 9266,
- 9267,
- 9268,
- 9269,
- 9270,
- 9272,
- 9273,
- 9275,
- 9276,
- 9278,
- 9280,
- 9282,
- 9284,
- 9286,
- 9288,
- 9290,
- 9291,
- 9292,
- 9293,
- 9294,
- 9296,
- 9297,
- 9298,
- 9299,
- 9300,
- 9302,
- 9303,
- 9305,
- 9306,
- 9308,
- 9310,
- 9312,
- 9313,
- 9315,
- 9316,
- 9317,
- 9318,
- 9319,
- 9321,
- 9322,
- 9323,
- 9324,
- 9325,
- 9326,
- 9327,
- 9328,
- 9329,
- 9330,
- 9331,
- 9332,
- 9333,
- 9334,
- 9336,
- 9338,
- 9340,
- 9342,
- 9344,
- 9346,
- 9348,
- 9350,
- 9351,
- 492,
- 9355,
- 4419,
- 9354,
- 9356,
- 9357,
- 9358,
- 376,
- 9182,
- 9197,
- 2397,
- 9140,
- 4832,
- 9450,
- 3999,
- 1928,
- 9151,
- 235,
- 267,
- 299,
- 231,
- 4812,
- 4816,
- 3367,
- 4822,
- 4826,
- 2398,
- 2404,
- 4820,
- 4824,
- 4828,
- 11416,
- 769,
- 11692,
- 11693
- ]
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
}
},
- "links": {
- "`Iterator`": 49,
- "`String`": 161,
- "`collections`": 733,
- "`format!`": 2328,
- "`fs`": 2424,
- "`io`": 501,
- "`iter`": 194,
- "`net`": 4769,
- "`option`": 195,
- "`result`": 196,
- "`sync`": 8490,
- "`thread::current()`": 371,
- "`thread`": 607,
- "boxed": 186,
- "cell::Cell": 378,
- "cell::RefCell": 380,
- "cmp": 191,
- "collections::HashMap": 738,
- "crate::i32": 9256,
- "fs::File": 2413,
- "i32::MAX": 11773,
- "i32::MIN": 11772,
- "io": 501,
- "mod@slice": 205,
- "net::TcpStream": 3047,
- "net::UdpSocket": 4437,
- "option::Option": 51,
- "prelude": 166,
- "prim@array": 9450,
- "prim@slice": 3999,
- "prim@str": 1928,
- "primitive::i32": 3367,
- "rc::Rc": 2030,
- "result::Result": 57,
- "str::FromStr": 2072,
- "sync::Arc": 606,
- "sync::Mutex": 495,
- "sync::atomic": 350,
- "sync::mpmc": 7249,
- "sync::mpsc": 493,
- "thread": 607,
- "vec::Vec": 165
- },
- "name": "std",
+ "links": {},
+ "name": "strict_abs",
"span": {
"begin": [
- 1,
- 1
+ 420,
+ 5
],
"end": [
- 775,
- 29
+ 439,
+ 6
],
- "filename": "std/src/lib.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "1178": {
- "attrs": [],
- "crate_id": 0,
+ "11755": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 1178,
+ "docs": "Checked exponentiation. Computes `self.pow(exp)`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(8isize.checked_pow(2), Some(64));\nassert_eq!(isize::MAX.checked_pow(2), None);\n```",
+ "id": 11755,
"inner": {
- "impl": {
- "blanket_impl": {
- "generic": "T"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 1132,
- "path": "OccupiedEntry"
- }
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
},
- "generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "T"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "U"
- }
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "exp",
+ {
+ "primitive": "u32"
+ }
+ ]
],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "generic": "T"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 37,
- "path": "From"
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "isize"
}
}
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "U"
- }
- }
- }
- ]
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 327
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "generic": "U"
- }
+ ],
+ "constraints": []
}
- ],
- "constraints": []
+ },
+ "id": 51,
+ "path": "Option"
}
- },
- "id": 39,
- "path": "Into"
+ }
}
}
},
"links": {},
- "name": null,
+ "name": "checked_pow",
"span": {
"begin": [
- 773,
- 1
+ 420,
+ 5
],
"end": [
- 775,
- 24
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/convert/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "1179": {
- "attrs": [],
- "crate_id": 0,
+ "11756": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 1179,
+ "docs": "Strict exponentiation. Computes `self.pow(exp)`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(8isize.strict_pow(2), 64);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = isize::MAX.strict_pow(2);\n```",
+ "id": 11756,
"inner": {
- "impl": {
- "blanket_impl": {
- "generic": "T"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- }
- ],
- "constraints": []
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
}
- },
- "id": 1132,
- "path": "OccupiedEntry"
+ ],
+ [
+ "exp",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
}
- },
+ }
+ }
+ },
+ "links": {},
+ "name": "strict_pow",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11757": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the square root of the number, rounded down.\n\nReturns `None` if `self` is negative.\n\n# Examples\n\n```\nassert_eq!(10isize.checked_isqrt(), Some(3));\n```",
+ "id": 11757,
+ "inner": {
+ "function": {
"generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "T"
- }
- ],
+ "params": [],
"where_predicates": []
},
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 329
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "generic": "T"
- }
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "isize"
+ }
+ }
+ ],
+ "constraints": []
}
- ],
- "constraints": []
+ },
+ "id": 51,
+ "path": "Option"
}
- },
- "id": 37,
- "path": "From"
+ }
}
}
},
"links": {},
- "name": null,
+ "name": "checked_isqrt",
"span": {
"begin": [
- 791,
- 1
+ 420,
+ 5
],
"end": [
- 791,
- 28
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/convert/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "118": {
+ "11758": {
"attrs": [
{
- "other": "#[doc(no_inline)]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"builtin_macro_prelude\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
- "crate_id": 0,
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 118,
+ "docs": "Saturating integer addition. Computes `self + rhs`, saturating at the numeric\nbounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100isize.saturating_add(1), 101);\nassert_eq!(isize::MAX.saturating_add(100), isize::MAX);\nassert_eq!(isize::MIN.saturating_add(-1), isize::MIN);\n```",
+ "id": 11758,
"inner": {
- "use": {
- "id": 119,
- "is_glob": false,
- "name": "Ord",
- "source": "core::prelude::v1::Ord"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
}
},
"links": {},
- "name": null,
+ "name": "saturating_add",
"span": {
"begin": [
- 52,
- 69
+ 420,
+ 5
],
"end": [
- 52,
- 72
+ 439,
+ 6
],
- "filename": "std/src/prelude/v1.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "1180": {
- "attrs": [],
- "crate_id": 0,
+ "11759": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 1180,
+ "docs": "Saturating addition with an unsigned integer. Computes `self + rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1isize.saturating_add_unsigned(2), 3);\nassert_eq!(isize::MAX.saturating_add_unsigned(100), isize::MAX);\n```",
+ "id": 11759,
"inner": {
- "impl": {
- "blanket_impl": {
- "generic": "T"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 1132,
- "path": "OccupiedEntry"
- }
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
},
- "generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "T"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "U"
- }
- ],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "generic": "T"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 199,
- "path": "TryFrom"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "U"
- }
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
}
- }
- ]
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 331,
- 332
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "generic": "U"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 200,
- "path": "TryInto"
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
}
}
},
"links": {},
- "name": null,
+ "name": "saturating_add_unsigned",
"span": {
"begin": [
- 817,
- 1
+ 420,
+ 5
],
"end": [
- 819,
- 27
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/convert/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "1181": {
+ "1176": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1181,
+ "id": 1176,
"inner": {
"impl": {
"blanket_impl": {
@@ -142820,16 +141237,6 @@
}
},
"name": "T"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "U"
}
],
"where_predicates": [
@@ -142839,29 +141246,18 @@
{
"trait_bound": {
"generic_params": [],
- "modifier": "none",
+ "modifier": "maybe",
"trait": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "generic": "T"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 39,
- "path": "Into"
+ "args": null,
+ "id": 3,
+ "path": "Sized"
}
}
}
],
"generic_params": [],
"type": {
- "generic": "U"
+ "generic": "T"
}
}
}
@@ -142871,8 +141267,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -142881,15 +141276,15 @@
"args": [
{
"type": {
- "generic": "U"
+ "generic": "T"
}
}
],
"constraints": []
}
},
- "id": 199,
- "path": "TryFrom"
+ "id": 321,
+ "path": "Borrow"
}
}
},
@@ -142897,129 +141292,103 @@
"name": null,
"span": {
"begin": [
- 833,
+ 212,
1
],
"end": [
- 835,
- 24
+ 212,
+ 38
],
- "filename": "checkouts/rust/library/core/src/convert/mod.rs"
+ "filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1182": {
- "attrs": [],
- "crate_id": 0,
+ "11760": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 1182,
+ "docs": "Saturating integer subtraction. Computes `self - rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100isize.saturating_sub(127), -27);\nassert_eq!(isize::MIN.saturating_sub(100), isize::MIN);\nassert_eq!(isize::MAX.saturating_sub(-1), isize::MAX);\n```",
+ "id": 11760,
"inner": {
- "impl": {
- "blanket_impl": {
- "generic": "T"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 1132,
- "path": "OccupiedEntry"
- }
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
},
- "generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "T"
- }
- ],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "outlives": "'static"
- },
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "maybe",
- "trait": {
- "args": null,
- "id": 3,
- "path": "Sized"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "T"
- }
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
}
- }
- ]
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 338
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": null,
- "id": 341,
- "path": "Any"
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
}
}
},
"links": {},
- "name": null,
+ "name": "saturating_sub",
"span": {
"begin": [
- 138,
- 1
+ 420,
+ 5
],
"end": [
- 138,
- 36
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/any.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "1183": {
- "attrs": [],
- "crate_id": 0,
+ "11761": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 1183,
+ "docs": "Saturating subtraction with an unsigned integer. Computes `self - rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100isize.saturating_sub_unsigned(127), -27);\nassert_eq!(isize::MIN.saturating_sub_unsigned(100), isize::MIN);\n```",
+ "id": 11761,
"inner": {
"function": {
"generics": {
@@ -143030,7 +141399,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -143038,197 +141407,118 @@
[
"self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
+ "generic": "Self"
}
],
[
- "f",
+ "rhs",
{
- "borrowed_ref": {
- "is_mutable": true,
- "lifetime": null,
- "type": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'_"
- }
- ],
- "constraints": []
- }
- },
- "id": 343,
- "path": "fmt::Formatter"
- }
- }
- }
+ "primitive": "usize"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": null,
- "id": 344,
- "path": "fmt::Result"
- }
+ "primitive": "isize"
}
}
}
},
"links": {},
- "name": "fmt",
+ "name": "saturating_sub_unsigned",
"span": {
"begin": [
- 1820,
+ 420,
5
],
"end": [
- 1825,
+ 439,
6
],
- "filename": "std/src/collections/hash/map.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "1184": {
+ "11762": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 12, patch: 0})}, feature: \"debug_hash_map\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 45, patch: 0})}, feature: \"saturating_neg\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
- "crate_id": 0,
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 1184,
+ "docs": "Saturating integer negation. Computes `-self`, returning `MAX` if `self == MIN`\ninstead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100isize.saturating_neg(), -100);\nassert_eq!((-100isize).saturating_neg(), 100);\nassert_eq!(isize::MIN.saturating_neg(), isize::MAX);\nassert_eq!(isize::MAX.saturating_neg(), isize::MIN + 1);\n```",
+ "id": 11762,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'_"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 1132,
- "path": "OccupiedEntry"
- }
- },
+ "function": {
"generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 346,
- "path": "Debug"
- }
- }
- }
- ],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "K"
- },
- {
- "kind": {
- "type": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 346,
- "path": "Debug"
- }
- }
- }
- ],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "V"
- }
- ],
+ "params": [],
"where_predicates": []
},
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 1183
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": null,
- "id": 346,
- "path": "Debug"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
}
}
},
"links": {},
- "name": null,
+ "name": "saturating_neg",
"span": {
"begin": [
- 1819,
- 1
+ 420,
+ 5
],
"end": [
- 1826,
- 2
+ 439,
+ 6
],
- "filename": "std/src/collections/hash/map.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "1186": {
+ "11763": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 10, patch: 0})}, feature: \"map_entry_keys\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Inline(Hint)]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 45, patch: 0})}, feature: \"saturating_neg\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
- "crate_id": 0,
+ "crate_id": 1,
"deprecation": null,
- "docs": "Gets a reference to the key that would be used when inserting a value\nthrough the `VacantEntry`.\n\n# Examples\n\n```\nuse std::collections::HashMap;\n\nlet mut map: HashMap<&str, u32> = HashMap::new();\nassert_eq!(map.entry(\"poneyland\").key(), &\"poneyland\");\n```",
- "id": 1186,
+ "docs": "Saturating absolute value. Computes `self.abs()`, returning `MAX` if `self ==\nMIN` instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100isize.saturating_abs(), 100);\nassert_eq!((-100isize).saturating_abs(), 100);\nassert_eq!(isize::MIN.saturating_abs(), isize::MAX);\nassert_eq!((isize::MIN + 1).saturating_abs(), isize::MAX);\n```",
+ "id": 11763,
"inner": {
"function": {
"generics": {
@@ -143239,7 +141529,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -143247,57 +141537,50 @@
[
"self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
+ "generic": "Self"
}
]
],
"is_c_variadic": false,
"output": {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "K"
- }
- }
+ "primitive": "isize"
}
}
}
},
"links": {},
- "name": "key",
+ "name": "saturating_abs",
"span": {
"begin": [
- 2703,
+ 420,
5
],
"end": [
- 2705,
+ 439,
6
],
- "filename": "std/src/collections/hash/map.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "1187": {
+ "11764": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 12, patch: 0})}, feature: \"map_entry_recover_keys2\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Inline(Hint)]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
- "crate_id": 0,
+ "crate_id": 1,
"deprecation": null,
- "docs": "Take ownership of the key.\n\n# Examples\n\n```\nuse std::collections::HashMap;\nuse std::collections::hash_map::Entry;\n\nlet mut map: HashMap<&str, u32> = HashMap::new();\n\nif let Entry::Vacant(v) = map.entry(\"poneyland\") {\n v.into_key();\n}\n```",
- "id": 1187,
+ "docs": "Saturating integer multiplication. Computes `self * rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(10isize.saturating_mul(12), 120);\nassert_eq!(isize::MAX.saturating_mul(10), isize::MAX);\nassert_eq!(isize::MIN.saturating_mul(10), isize::MIN);\n```",
+ "id": 11764,
"inner": {
"function": {
"generics": {
@@ -143308,7 +141591,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -143318,43 +141601,54 @@
{
"generic": "Self"
}
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
]
],
"is_c_variadic": false,
"output": {
- "generic": "K"
+ "primitive": "isize"
}
}
}
},
"links": {},
- "name": "into_key",
+ "name": "saturating_mul",
"span": {
"begin": [
- 2723,
+ 420,
5
],
"end": [
- 2725,
+ 439,
6
],
- "filename": "std/src/collections/hash/map.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "1188": {
+ "11765": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\", promotable: false}}]"
},
{
- "other": "#[attr = Inline(Hint)]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
- "crate_id": 0,
+ "crate_id": 1,
"deprecation": null,
- "docs": "Sets the value of the entry with the `VacantEntry`'s key,\nand returns a mutable reference to it.\n\n# Examples\n\n```\nuse std::collections::HashMap;\nuse std::collections::hash_map::Entry;\n\nlet mut map: HashMap<&str, u32> = HashMap::new();\n\nif let Entry::Vacant(o) = map.entry(\"poneyland\") {\n o.insert(37);\n}\nassert_eq!(map[\"poneyland\"], 37);\n```",
- "id": 1188,
+ "docs": "Saturating integer division. Computes `self / rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5isize.saturating_div(2), 2);\nassert_eq!(isize::MAX.saturating_div(-1), isize::MIN + 1);\nassert_eq!(isize::MIN.saturating_div(-1), isize::MAX);\n\n```",
+ "id": 11765,
"inner": {
"function": {
"generics": {
@@ -143365,7 +141659,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -143377,53 +141671,52 @@
}
],
[
- "value",
+ "rhs",
{
- "generic": "V"
+ "primitive": "isize"
}
]
],
"is_c_variadic": false,
"output": {
- "borrowed_ref": {
- "is_mutable": true,
- "lifetime": "'a",
- "type": {
- "generic": "V"
- }
- }
+ "primitive": "isize"
}
}
}
},
"links": {},
- "name": "insert",
+ "name": "saturating_div",
"span": {
"begin": [
- 2745,
+ 420,
5
],
"end": [
- 2747,
+ 439,
6
],
- "filename": "std/src/collections/hash/map.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "1189": {
+ "11766": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 83, patch: 0})}, feature: \"entry_insert\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
},
{
- "other": "#[attr = Inline(Hint)]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
- "crate_id": 0,
+ "crate_id": 1,
"deprecation": null,
- "docs": "Sets the value of the entry with the `VacantEntry`'s key,\nand returns an `OccupiedEntry`.\n\n# Examples\n\n```\nuse std::collections::HashMap;\nuse std::collections::hash_map::Entry;\n\nlet mut map: HashMap<&str, u32> = HashMap::new();\n\nif let Entry::Vacant(o) = map.entry(\"poneyland\") {\n o.insert_entry(37);\n}\nassert_eq!(map[\"poneyland\"], 37);\n```",
- "id": 1189,
+ "docs": "Saturating integer exponentiation. Computes `self.pow(exp)`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!((-4isize).saturating_pow(3), -64);\nassert_eq!(isize::MIN.saturating_pow(2), isize::MAX);\nassert_eq!(isize::MIN.saturating_pow(3), isize::MIN);\n```",
+ "id": 11766,
"inner": {
"function": {
"generics": {
@@ -143434,7 +141727,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -143446,850 +141739,244 @@
}
],
[
- "value",
+ "exp",
{
- "generic": "V"
+ "primitive": "u32"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 1132,
- "path": "OccupiedEntry"
- }
+ "primitive": "isize"
}
}
}
},
"links": {},
- "name": "insert_entry",
+ "name": "saturating_pow",
"span": {
"begin": [
- 2767,
+ 420,
5
],
"end": [
- 2770,
+ 439,
6
],
- "filename": "std/src/collections/hash/map.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "1190": {
- "attrs": [],
- "crate_id": 0,
+ "11767": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 1190,
+ "docs": "Wrapping (modular) addition with an unsigned integer. Computes\n`self + rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(100isize.wrapping_add_unsigned(27), 127);\nassert_eq!(isize::MAX.wrapping_add_unsigned(2), isize::MIN + 1);\n```",
+ "id": 11767,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 1135,
- "path": "VacantEntry"
- }
- },
+ "function": {
"generics": {
- "params": [
- {
- "kind": {
- "lifetime": {
- "outlives": []
- }
- },
- "name": "'a"
- },
- {
- "kind": {
- "type": {
- "bounds": [
- {
- "outlives": "'a"
- }
- ],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "K"
- },
- {
- "kind": {
- "type": {
- "bounds": [
- {
- "outlives": "'a"
- }
- ],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "V"
- }
- ],
+ "params": [],
"where_predicates": []
},
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 1186,
- 1187,
- 1188,
- 1189
- ],
- "provided_trait_methods": [],
- "trait": null
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
}
},
"links": {},
- "name": null,
+ "name": "wrapping_add_unsigned",
"span": {
"begin": [
- 2689,
- 1
+ 420,
+ 5
],
"end": [
- 2771,
- 2
+ 439,
+ 6
],
- "filename": "std/src/collections/hash/map.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "1191": {
- "attrs": [],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 1191,
- "inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 1135,
- "path": "VacantEntry"
- }
- },
- "generics": {
- "params": [
- {
- "kind": {
- "lifetime": {
- "outlives": []
- }
- },
- "name": "'a"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "K"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "V"
- }
- ],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 1,
- "path": "Send"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "K"
- }
- }
- },
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 1,
- "path": "Send"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "V"
- }
- }
- }
- ]
- },
- "is_negative": false,
- "is_synthetic": true,
- "is_unsafe": false,
- "items": [],
- "provided_trait_methods": [],
- "trait": {
- "args": null,
- "id": 1,
- "path": "Send"
+ "11768": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
}
}
- },
- "links": {},
- "name": null,
- "span": null,
- "visibility": "default"
- },
- "1192": {
- "attrs": [],
- "crate_id": 0,
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 1192,
+ "docs": "Wrapping (modular) subtraction with an unsigned integer. Computes\n`self - rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(0isize.wrapping_sub_unsigned(127), -127);\nassert_eq!((-2isize).wrapping_sub_unsigned(usize::MAX), -1);\n```",
+ "id": 11768,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 1135,
- "path": "VacantEntry"
- }
- },
+ "function": {
"generics": {
- "params": [
- {
- "kind": {
- "lifetime": {
- "outlives": []
- }
- },
- "name": "'a"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "K"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "V"
- }
- ],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 5,
- "path": "Sync"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "K"
- }
- }
- },
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 5,
- "path": "Sync"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "V"
- }
- }
- }
- ]
+ "params": [],
+ "where_predicates": []
},
- "is_negative": false,
- "is_synthetic": true,
- "is_unsafe": false,
- "items": [],
- "provided_trait_methods": [],
- "trait": {
- "args": null,
- "id": 5,
- "path": "Sync"
- }
- }
- },
- "links": {},
- "name": null,
- "span": null,
- "visibility": "default"
- },
- "1193": {
- "attrs": [],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 1193,
- "inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 1135,
- "path": "VacantEntry"
- }
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
},
- "generics": {
- "params": [
- {
- "kind": {
- "lifetime": {
- "outlives": []
- }
- },
- "name": "'a"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "K"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "V"
- }
- ],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 315,
- "path": "Freeze"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "K"
- }
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
}
- }
- ]
- },
- "is_negative": false,
- "is_synthetic": true,
- "is_unsafe": false,
- "items": [],
- "provided_trait_methods": [],
- "trait": {
- "args": null,
- "id": 315,
- "path": "Freeze"
- }
- }
- },
- "links": {},
- "name": null,
- "span": null,
- "visibility": "default"
- },
- "1194": {
- "attrs": [],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 1194,
- "inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- }
- ],
- "constraints": []
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
}
- },
- "id": 1135,
- "path": "VacantEntry"
- }
- },
- "generics": {
- "params": [
- {
- "kind": {
- "lifetime": {
- "outlives": []
- }
- },
- "name": "'a"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "K"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "V"
- }
+ ]
],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 7,
- "path": "Unpin"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "K"
- }
- }
- }
- ]
- },
- "is_negative": false,
- "is_synthetic": true,
- "is_unsafe": false,
- "items": [],
- "provided_trait_methods": [],
- "trait": {
- "args": null,
- "id": 7,
- "path": "Unpin"
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
}
}
},
"links": {},
- "name": null,
- "span": null,
- "visibility": "default"
+ "name": "wrapping_sub_unsigned",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
},
- "1195": {
- "attrs": [],
- "crate_id": 0,
+ "11769": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 1195,
+ "docs": "Wrapping (modular) division. Computes `self / rhs`, wrapping around at the\nboundary of the type.\n\nThe only case where such wrapping can occur is when one divides `MIN / -1` on a signed type (where\n`MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value\nthat is too large to represent in the type. In such a case, this function returns `MIN` itself.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100isize.wrapping_div(10), 10);\nassert_eq!((-128i8).wrapping_div(-1), -128);\n```",
+ "id": 11769,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 1135,
- "path": "VacantEntry"
- }
- },
+ "function": {
"generics": {
- "params": [
- {
- "kind": {
- "lifetime": {
- "outlives": []
- }
- },
- "name": "'a"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "K"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "V"
- }
- ],
+ "params": [],
"where_predicates": []
},
- "is_negative": true,
- "is_synthetic": true,
- "is_unsafe": false,
- "items": [],
- "provided_trait_methods": [],
- "trait": {
- "args": null,
- "id": 318,
- "path": "UnwindSafe"
- }
- }
- },
- "links": {},
- "name": null,
- "span": null,
- "visibility": "default"
- },
- "1196": {
- "attrs": [],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 1196,
- "inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 1135,
- "path": "VacantEntry"
- }
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
},
- "generics": {
- "params": [
- {
- "kind": {
- "lifetime": {
- "outlives": []
- }
- },
- "name": "'a"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "K"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "V"
- }
- ],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 320,
- "path": "RefUnwindSafe"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "K"
- }
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
}
- },
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 320,
- "path": "RefUnwindSafe"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "V"
- }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
}
- }
- ]
- },
- "is_negative": false,
- "is_synthetic": true,
- "is_unsafe": false,
- "items": [],
- "provided_trait_methods": [],
- "trait": {
- "args": null,
- "id": 320,
- "path": "RefUnwindSafe"
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
}
}
},
"links": {},
- "name": null,
- "span": null,
- "visibility": "default"
+ "name": "wrapping_div",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
},
- "1197": {
+ "1177": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1197,
+ "id": 1177,
"inner": {
"impl": {
"blanket_impl": {
@@ -144317,8 +142004,8 @@
"constraints": []
}
},
- "id": 1135,
- "path": "VacantEntry"
+ "id": 1132,
+ "path": "OccupiedEntry"
}
},
"generics": {
@@ -144362,7 +142049,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -144378,8 +142065,8 @@
"constraints": []
}
},
- "id": 323,
- "path": "Borrow"
+ "id": 324,
+ "path": "BorrowMut"
}
}
},
@@ -144387,572 +142074,696 @@
"name": null,
"span": {
"begin": [
- 209,
+ 221,
1
],
"end": [
- 209,
- 32
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1198": {
- "attrs": [],
- "crate_id": 0,
+ "11770": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 1198,
+ "docs": "Wrapping Euclidean division. Computes `self.div_euclid(rhs)`,\nwrapping around at the boundary of the type.\n\nWrapping will only occur in `MIN / -1` on a signed type (where `MIN` is the negative minimal value\nfor the type). This is equivalent to `-MIN`, a positive value that is too large to represent in the\ntype. In this case, this method returns `MIN` itself.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100isize.wrapping_div_euclid(10), 10);\nassert_eq!((-128i8).wrapping_div_euclid(-1), -128);\n```",
+ "id": 11770,
"inner": {
- "impl": {
- "blanket_impl": {
- "generic": "T"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 1135,
- "path": "VacantEntry"
- }
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
},
- "generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "T"
- }
- ],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "maybe",
- "trait": {
- "args": null,
- "id": 3,
- "path": "Sized"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "T"
- }
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
}
- }
- ]
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 324
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "generic": "T"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 326,
- "path": "BorrowMut"
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
}
}
},
"links": {},
- "name": null,
+ "name": "wrapping_div_euclid",
"span": {
"begin": [
- 217,
- 1
+ 420,
+ 5
],
"end": [
- 217,
- 35
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/borrow.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "1199": {
- "attrs": [],
- "crate_id": 0,
+ "11771": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 1199,
+ "docs": "Wrapping (modular) remainder. Computes `self % rhs`, wrapping around at the\nboundary of the type.\n\nSuch wrap-around never actually occurs mathematically; implementation artifacts make `x % y`\ninvalid for `MIN / -1` on a signed type (where `MIN` is the negative minimal value). In such a case,\nthis function returns `0`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100isize.wrapping_rem(10), 0);\nassert_eq!((-128i8).wrapping_rem(-1), 0);\n```",
+ "id": 11771,
"inner": {
- "impl": {
- "blanket_impl": {
- "generic": "T"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 1135,
- "path": "VacantEntry"
- }
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
},
- "generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "T"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "U"
- }
- ],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "generic": "T"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 37,
- "path": "From"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "U"
- }
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
}
- }
- ]
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 327
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "generic": "U"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 39,
- "path": "Into"
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
}
}
},
"links": {},
- "name": null,
+ "name": "wrapping_rem",
"span": {
"begin": [
- 773,
- 1
+ 420,
+ 5
],
"end": [
- 775,
- 24
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/convert/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "12": {
+ "11772": {
"attrs": [
{
- "other": "#[doc(no_inline)]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
- "crate_id": 0,
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 12,
+ "docs": "Wrapping Euclidean remainder. Computes `self.rem_euclid(rhs)`, wrapping around\nat the boundary of the type.\n\nWrapping will only occur in `MIN % -1` on a signed type (where `MIN` is the negative minimal value\nfor the type). In this case, this method returns 0.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100isize.wrapping_rem_euclid(10), 0);\nassert_eq!((-128i8).wrapping_rem_euclid(-1), 0);\n```",
+ "id": 11772,
"inner": {
- "use": {
- "id": 13,
- "is_glob": false,
- "name": "FnMut",
- "source": "crate::ops::FnMut"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
}
},
"links": {},
- "name": null,
+ "name": "wrapping_rem_euclid",
"span": {
"begin": [
- 16,
- 32
+ 420,
+ 5
],
"end": [
- 16,
- 37
+ 439,
+ 6
],
- "filename": "std/src/prelude/v1.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "120": {
+ "11773": {
"attrs": [
{
- "other": "#[doc(no_inline)]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"builtin_macro_prelude\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
- "crate_id": 0,
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 120,
+ "docs": "Wrapping (modular) negation. Computes `-self`, wrapping around at the boundary\nof the type.\n\nThe only case where such wrapping can occur is when one negates `MIN` on a signed type (where `MIN`\nis the negative minimal value for the type); this is a positive value that is too large to represent\nin the type. In such a case, this function returns `MIN` itself.\n\n# Examples\n\n```\nassert_eq!(100isize.wrapping_neg(), -100);\nassert_eq!((-100isize).wrapping_neg(), 100);\nassert_eq!(isize::MIN.wrapping_neg(), isize::MIN);\n```",
+ "id": 11773,
"inner": {
- "use": {
- "id": 121,
- "is_glob": false,
- "name": "Ord",
- "source": "core::prelude::v1::Ord"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
}
},
"links": {},
- "name": null,
+ "name": "wrapping_neg",
"span": {
"begin": [
- 52,
- 69
+ 420,
+ 5
],
"end": [
- 52,
- 72
+ 439,
+ 6
],
- "filename": "std/src/prelude/v1.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
"visibility": "public"
},
- "1200": {
- "attrs": [],
- "crate_id": 0,
+ "11774": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 1200,
+ "docs": "Panic-free bitwise shift-left; yields `self << mask(rhs)`, where `mask` removes\nany high-order bits of `rhs` that would cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-left; the RHS of a wrapping shift-left is restricted to\nthe range of the type, rather than the bits shifted out of the LHS being returned to the other end.\nThe primitive integer types all implement a [`rotate_left`](Self::rotate_left) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!((-1isize).wrapping_shl(7), -128);\nassert_eq!((-1isize).wrapping_shl(128), -1);\n```",
+ "id": 11774,
"inner": {
- "impl": {
- "blanket_impl": {
- "generic": "T"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- }
- ],
- "constraints": []
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
}
- },
- "id": 1135,
- "path": "VacantEntry"
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
}
- },
+ }
+ }
+ },
+ "links": {
+ "Self::rotate_left": 11703
+ },
+ "name": "wrapping_shl",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11775": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Panic-free bitwise shift-right; yields `self >> mask(rhs)`, where `mask`\nremoves any high-order bits of `rhs` that would cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-right; the RHS of a wrapping shift-right is restricted\nto the range of the type, rather than the bits shifted out of the LHS being returned to the other\nend. The primitive integer types all implement a [`rotate_right`](Self::rotate_right) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!((-128isize).wrapping_shr(7), -1);\nassert_eq!((-128i16).wrapping_shr(64), -128);\n```",
+ "id": 11775,
+ "inner": {
+ "function": {
"generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "T"
- }
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {
+ "Self::rotate_right": 11704
+ },
+ "name": "wrapping_shr",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11776": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Wrapping (modular) absolute value. Computes `self.abs()`, wrapping around at\nthe boundary of the type.\n\nThe only case where such wrapping can occur is when one takes the absolute value of the negative\nminimal value for the type; this is a positive value that is too large to represent in the type. In\nsuch a case, this function returns `MIN` itself.\n\n# Examples\n\n```\nassert_eq!(100isize.wrapping_abs(), 100);\nassert_eq!((-100isize).wrapping_abs(), 100);\nassert_eq!(isize::MIN.wrapping_abs(), isize::MIN);\nassert_eq!((-128i8).wrapping_abs() as u8, 128);\n```",
+ "id": 11776,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
"where_predicates": []
},
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 329
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "generic": "T"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 37,
- "path": "From"
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
}
}
},
"links": {},
- "name": null,
+ "name": "wrapping_abs",
"span": {
"begin": [
- 791,
- 1
+ 420,
+ 5
],
"end": [
- 791,
- 28
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/convert/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "1201": {
- "attrs": [],
- "crate_id": 0,
+ "11777": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 51, patch: 0})}, feature: \"unsigned_abs\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 51, patch: 0})}, feature: \"unsigned_abs\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 1201,
+ "docs": "Computes the absolute value of `self` without any wrapping\nor panicking.\n\n\n# Examples\n\n```\nassert_eq!(100isize.unsigned_abs(), 100usize);\nassert_eq!((-100isize).unsigned_abs(), 100usize);\nassert_eq!((-128i8).unsigned_abs(), 128u8);\n```",
+ "id": 11777,
"inner": {
- "impl": {
- "blanket_impl": {
- "generic": "T"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- }
- ],
- "constraints": []
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
}
- },
- "id": 1135,
- "path": "VacantEntry"
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
}
+ }
+ }
+ },
+ "links": {},
+ "name": "unsigned_abs",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11778": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Wrapping (modular) exponentiation. Computes `self.pow(exp)`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(3isize.wrapping_pow(4), 81);\nassert_eq!(3i8.wrapping_pow(5), -13);\nassert_eq!(3i8.wrapping_pow(6), -39);\n```",
+ "id": 11778,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
},
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "exp",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "wrapping_pow",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11779": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates `self` + `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would have\noccurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5isize.overflowing_add(2), (7, false));\nassert_eq!(isize::MAX.overflowing_add(1), (isize::MIN, true));\n```",
+ "id": 11779,
+ "inner": {
+ "function": {
"generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "T"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "U"
- }
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "generic": "T"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 199,
- "path": "TryFrom"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "U"
- }
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "isize"
+ },
+ {
+ "primitive": "bool"
}
- }
- ]
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 331,
- 332
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "generic": "U"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 200,
- "path": "TryInto"
+ ]
+ }
}
}
},
"links": {},
- "name": null,
+ "name": "overflowing_add",
"span": {
"begin": [
- 817,
- 1
+ 420,
+ 5
],
"end": [
- 819,
- 27
+ 439,
+ 6
],
- "filename": "checkouts/rust/library/core/src/convert/mod.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "1202": {
+ "1178": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1202,
+ "id": 1178,
"inner": {
"impl": {
"blanket_impl": {
@@ -144980,8 +142791,8 @@
"constraints": []
}
},
- "id": 1135,
- "path": "VacantEntry"
+ "id": 1132,
+ "path": "OccupiedEntry"
}
},
"generics": {
@@ -145028,8 +142839,8 @@
"constraints": []
}
},
- "id": 39,
- "path": "Into"
+ "id": 37,
+ "path": "From"
}
}
}
@@ -145046,8 +142857,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -145063,8 +142873,8 @@
"constraints": []
}
},
- "id": 199,
- "path": "TryFrom"
+ "id": 39,
+ "path": "Into"
}
}
},
@@ -145072,129 +142882,115 @@
"name": null,
"span": {
"begin": [
- 833,
+ 767,
1
],
"end": [
- 835,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1203": {
- "attrs": [],
- "crate_id": 0,
+ "11780": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_bigint_helpers\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 1203,
+ "docs": "Calculates `self` + `rhs` + `carry` and returns a tuple containing\nthe sum and the output carry (in that order).\n\nPerforms \"ternary addition\" of two integer operands and a carry-in\nbit, and returns an output integer and a carry-out bit. This allows\nchaining together multiple additions to create a wider addition, and\ncan be useful for bignum addition.\n\nThis can be thought of as a 64-bit \"full adder\", in the electronics sense.\n\nIf the input carry is false, this method is equivalent to\n[`overflowing_add`](Self::overflowing_add), and the output carry is\nequal to the overflow flag. Note that although carry and overflow\nflags are similar for unsigned integers, they are different for\nsigned integers.\n\n# Examples\n\n```\n// 3 MAX (a = 3 × 2^64 + 2^64 - 1)\n// + 5 7 (b = 5 × 2^64 + 7)\n// ---------\n// 9 6 (sum = 9 × 2^64 + 6)\n\nlet (a1, a0): (usize, usize) = (3, usize::MAX);\nlet (b1, b0): (usize, usize) = (5, 7);\nlet carry0 = false;\n\nlet (sum0, carry1) = a0.carrying_add(b0, carry0);\nassert_eq!(carry1, true);\nlet (sum1, carry2) = a1.carrying_add(b1, carry1);\nassert_eq!(carry2, false);\n\nassert_eq!((sum1, sum0), (9, 6));\n```",
+ "id": 11780,
"inner": {
- "impl": {
- "blanket_impl": {
- "generic": "T"
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
},
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 1135,
- "path": "VacantEntry"
- }
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
},
- "generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "T"
- }
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "bool"
+ }
+ ]
],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "outlives": "'static"
- },
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "maybe",
- "trait": {
- "args": null,
- "id": 3,
- "path": "Sized"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "T"
- }
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "usize"
+ },
+ {
+ "primitive": "bool"
}
- }
- ]
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 338
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": null,
- "id": 341,
- "path": "Any"
+ ]
+ }
}
}
},
- "links": {},
- "name": null,
+ "links": {
+ "Self::overflowing_add": 11927
+ },
+ "name": "carrying_add",
"span": {
"begin": [
- 138,
- 1
+ 1269,
+ 5
],
"end": [
- 138,
- 36
+ 1290,
+ 6
],
- "filename": "checkouts/rust/library/core/src/any.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "1204": {
- "attrs": [],
- "crate_id": 0,
+ "11781": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 1204,
+ "docs": "Calculates `self` + `rhs` + `carry` and checks for overflow.\n\nPerforms \"ternary addition\" of two integer operands and a carry-in\nbit, and returns a tuple of the sum along with a boolean indicating\nwhether an arithmetic overflow would occur. On overflow, the wrapped\nvalue is returned.\n\nThis allows chaining together multiple additions to create a wider\naddition, and can be useful for bignum addition. This method should\nonly be used for the most significant word; for the less significant\nwords the unsigned method\n[`usize::carrying_add`]\nshould be used.\n\nThe output boolean returned by this method is *not* a carry flag,\nand should *not* be added to a more significant word.\n\nIf the input carry is false, this method is equivalent to\n[`overflowing_add`](Self::overflowing_add).\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n// Only the most significant word is signed.\n//\n// 10 MAX (a = 10 × 2^64 + 2^64 - 1)\n// + -5 9 (b = -5 × 2^64 + 9)\n// ---------\n// 6 8 (sum = 6 × 2^64 + 8)\n\nlet (a1, a0): (isize, usize) = (10, usize::MAX);\nlet (b1, b0): (isize, usize) = (-5, 9);\nlet carry0 = false;\n\n// usize::carrying_add for the less significant words\nlet (sum0, carry1) = a0.carrying_add(b0, carry0);\nassert_eq!(carry1, true);\n\n// isize::carrying_add for the most significant word\nlet (sum1, overflow) = a1.carrying_add(b1, carry1);\nassert_eq!(overflow, false);\n\nassert_eq!((sum1, sum0), (6, 8));\n```",
+ "id": 11781,
"inner": {
"function": {
"generics": {
@@ -145205,7 +143001,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -145213,119 +143009,20292 @@
[
"self",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
+ "generic": "Self"
}
],
[
- "f",
+ "rhs",
{
- "borrowed_ref": {
- "is_mutable": true,
- "lifetime": null,
- "type": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'_"
- }
- ],
- "constraints": []
- }
- },
- "id": 343,
- "path": "fmt::Formatter"
- }
- }
- }
+ "primitive": "isize"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "bool"
}
]
],
"is_c_variadic": false,
"output": {
- "resolved_path": {
- "args": null,
- "id": 344,
- "path": "fmt::Result"
- }
+ "tuple": [
+ {
+ "primitive": "isize"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
}
}
}
},
- "links": {},
- "name": "fmt",
+ "links": {
+ "Self::overflowing_add": 11779,
+ "`usize::carrying_add`": 11780
+ },
+ "name": "carrying_add",
"span": {
"begin": [
- 1837,
+ 420,
5
],
"end": [
- 1839,
+ 439,
6
],
- "filename": "std/src/collections/hash/map.rs"
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "1205": {
+ "11782": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 12, patch: 0})}, feature: \"debug_hash_map\"}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
}
],
- "crate_id": 0,
+ "crate_id": 1,
"deprecation": null,
- "docs": null,
- "id": 1205,
+ "docs": "Calculates `self` + `rhs` with an unsigned `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1isize.overflowing_add_unsigned(2), (3, false));\nassert_eq!((isize::MIN).overflowing_add_unsigned(usize::MAX), (isize::MAX, false));\nassert_eq!((isize::MAX - 2).overflowing_add_unsigned(3), (isize::MIN, true));\n```",
+ "id": 11782,
"inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'_"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 1135,
- "path": "VacantEntry"
- }
- },
+ "function": {
"generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 346,
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "isize"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "overflowing_add_unsigned",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11783": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates `self` - `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating whether an arithmetic overflow\nwould occur. If an overflow would have occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5isize.overflowing_sub(2), (3, false));\nassert_eq!(isize::MIN.overflowing_sub(1), (isize::MAX, true));\n```",
+ "id": 11783,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "isize"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "overflowing_sub",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11784": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_bigint_helpers\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates `self` − `rhs` − `borrow` and returns a tuple\ncontaining the difference and the output borrow.\n\nPerforms \"ternary subtraction\" by subtracting both an integer\noperand and a borrow-in bit from `self`, and returns an output\ninteger and a borrow-out bit. This allows chaining together multiple\nsubtractions to create a wider subtraction, and can be useful for\nbignum subtraction.\n\n# Examples\n\n```\n// 9 6 (a = 9 × 2^64 + 6)\n// - 5 7 (b = 5 × 2^64 + 7)\n// ---------\n// 3 MAX (diff = 3 × 2^64 + 2^64 - 1)\n\nlet (a1, a0): (usize, usize) = (9, 6);\nlet (b1, b0): (usize, usize) = (5, 7);\nlet borrow0 = false;\n\nlet (diff0, borrow1) = a0.borrowing_sub(b0, borrow0);\nassert_eq!(borrow1, true);\nlet (diff1, borrow2) = a1.borrowing_sub(b1, borrow1);\nassert_eq!(borrow2, false);\n\nassert_eq!((diff1, diff0), (3, usize::MAX));\n```",
+ "id": 11784,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ],
+ [
+ "borrow",
+ {
+ "primitive": "bool"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "usize"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "borrowing_sub",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11785": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates `self` − `rhs` − `borrow` and checks for\noverflow.\n\nPerforms \"ternary subtraction\" by subtracting both an integer\noperand and a borrow-in bit from `self`, and returns a tuple of the\ndifference along with a boolean indicating whether an arithmetic\noverflow would occur. On overflow, the wrapped value is returned.\n\nThis allows chaining together multiple subtractions to create a\nwider subtraction, and can be useful for bignum subtraction. This\nmethod should only be used for the most significant word; for the\nless significant words the unsigned method\n[`usize::borrowing_sub`]\nshould be used.\n\nThe output boolean returned by this method is *not* a borrow flag,\nand should *not* be subtracted from a more significant word.\n\nIf the input borrow is false, this method is equivalent to\n[`overflowing_sub`](Self::overflowing_sub).\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\n// Only the most significant word is signed.\n//\n// 6 8 (a = 6 × 2^64 + 8)\n// - -5 9 (b = -5 × 2^64 + 9)\n// ---------\n// 10 MAX (diff = 10 × 2^64 + 2^64 - 1)\n\nlet (a1, a0): (isize, usize) = (6, 8);\nlet (b1, b0): (isize, usize) = (-5, 9);\nlet borrow0 = false;\n\n// usize::borrowing_sub for the less significant words\nlet (diff0, borrow1) = a0.borrowing_sub(b0, borrow0);\nassert_eq!(borrow1, true);\n\n// isize::borrowing_sub for the most significant word\nlet (diff1, overflow) = a1.borrowing_sub(b1, borrow1);\nassert_eq!(overflow, false);\n\nassert_eq!((diff1, diff0), (10, usize::MAX));\n```",
+ "id": 11785,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ],
+ [
+ "borrow",
+ {
+ "primitive": "bool"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "isize"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {
+ "Self::overflowing_sub": 11783,
+ "`usize::borrowing_sub`": 11784
+ },
+ "name": "borrowing_sub",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11786": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates `self` - `rhs` with an unsigned `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1isize.overflowing_sub_unsigned(2), (-1, false));\nassert_eq!((isize::MAX).overflowing_sub_unsigned(usize::MAX), (isize::MIN, false));\nassert_eq!((isize::MIN + 2).overflowing_sub_unsigned(3), (isize::MAX, true));\n```",
+ "id": 11786,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "isize"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "overflowing_sub_unsigned",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11787": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates the multiplication of `self` and `rhs`.\n\nReturns a tuple of the multiplication along with a boolean indicating whether an arithmetic overflow\nwould occur. If an overflow would have occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5isize.overflowing_mul(2), (10, false));\nassert_eq!(1_000_000_000i32.overflowing_mul(10), (1410065408, true));\n```",
+ "id": 11787,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "isize"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "overflowing_mul",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11788": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates the \"full multiplication\" `self * rhs + carry`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need the `carry`, then you can use [`Self::widening_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.carrying_mul(-2, 0), (4294967286, -1));\nassert_eq!(5i32.carrying_mul(-2, 10), (0, 0));\nassert_eq!(1_000_000_000i32.carrying_mul(-10, 0), (2884901888, -3));\nassert_eq!(1_000_000_000i32.carrying_mul(-10, 10), (2884901898, -3));\nassert_eq!(isize::MAX.carrying_mul(isize::MAX, isize::MAX), (isize::MAX.unsigned_abs() + 1, isize::MAX / 2));\n```",
+ "id": 11788,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "usize"
+ },
+ {
+ "primitive": "isize"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {
+ "`Self::widening_mul`": 11789
+ },
+ "name": "carrying_mul",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11789": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates the complete product `self * rhs` without the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nIf you also need to add a carry to the wide result, then you want\n[`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.widening_mul(-2), (4294967286, -1));\nassert_eq!(1_000_000_000i32.widening_mul(-10), (2884901888, -3));\n```",
+ "id": 11789,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "usize"
+ },
+ {
+ "primitive": "isize"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {
+ "`Self::carrying_mul`": 11788
+ },
+ "name": "widening_mul",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1179": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1179,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 1132,
+ "path": "OccupiedEntry"
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ }
+ ],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 327
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "T"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 37,
+ "path": "From"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 785,
+ 1
+ ],
+ "end": [
+ 785,
+ 28
+ ],
+ "filename": "checkouts/rust/library/core/src/convert/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "11790": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates the \"full multiplication\" `self * rhs + carry1 + carry2`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need either `carry`, then you can use [`Self::widening_mul`] instead,\nand if you only need one `carry`, then you can use [`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `i32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5i32.carrying_mul_add(-2, 0, 0), (4294967286, -1));\nassert_eq!(5i32.carrying_mul_add(-2, 10, 10), (10, 0));\nassert_eq!(1_000_000_000i32.carrying_mul_add(-10, 0, 0), (2884901888, -3));\nassert_eq!(1_000_000_000i32.carrying_mul_add(-10, 10, 10), (2884901908, -3));\nassert_eq!(isize::MAX.carrying_mul_add(isize::MAX, isize::MAX, isize::MAX), (usize::MAX, isize::MAX / 2));\n```",
+ "id": 11790,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "isize"
+ }
+ ],
+ [
+ "add",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "usize"
+ },
+ {
+ "primitive": "isize"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {
+ "`Self::carrying_mul`": 11788,
+ "`Self::widening_mul`": 11789
+ },
+ "name": "carrying_mul_add",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11791": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates the divisor when `self` is divided by `rhs`.\n\nReturns a tuple of the divisor along with a boolean indicating whether an arithmetic overflow would\noccur. If an overflow would occur then self is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5isize.overflowing_div(2), (2, false));\nassert_eq!(isize::MIN.overflowing_div(-1), (isize::MIN, true));\n```",
+ "id": 11791,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "isize"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "overflowing_div",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11792": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates the quotient of Euclidean division `self.div_euclid(rhs)`.\n\nReturns a tuple of the divisor along with a boolean indicating whether an arithmetic overflow would\noccur. If an overflow would occur then `self` is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5isize.overflowing_div_euclid(2), (2, false));\nassert_eq!(isize::MIN.overflowing_div_euclid(-1), (isize::MIN, true));\n```",
+ "id": 11792,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "isize"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "overflowing_div_euclid",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11793": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates the remainder when `self` is divided by `rhs`.\n\nReturns a tuple of the remainder after dividing along with a boolean indicating whether an\narithmetic overflow would occur. If an overflow would occur then 0 is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5isize.overflowing_rem(2), (1, false));\nassert_eq!(isize::MIN.overflowing_rem(-1), (0, true));\n```",
+ "id": 11793,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "isize"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "overflowing_rem",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11794": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Overflowing Euclidean remainder. Calculates `self.rem_euclid(rhs)`.\n\nReturns a tuple of the remainder after dividing along with a boolean indicating whether an\narithmetic overflow would occur. If an overflow would occur then 0 is returned.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5isize.overflowing_rem_euclid(2), (1, false));\nassert_eq!(isize::MIN.overflowing_rem_euclid(-1), (0, true));\n```",
+ "id": 11794,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "isize"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "overflowing_rem_euclid",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11795": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Negates self, overflowing if this is equal to the minimum value.\n\nReturns a tuple of the negated version of self along with a boolean indicating whether an overflow\nhappened. If `self` is the minimum value (e.g., `i32::MIN` for values of type `i32`), then the\nminimum value will be returned again and `true` will be returned for an overflow happening.\n\n# Examples\n\n```\nassert_eq!(2isize.overflowing_neg(), (-2, false));\nassert_eq!(isize::MIN.overflowing_neg(), (isize::MIN, true));\n```",
+ "id": 11795,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "isize"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "overflowing_neg",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11796": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Shifts self left by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean indicating whether the shift\nvalue was larger than or equal to the number of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then used to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x1isize.overflowing_shl(4), (0x10, false));\nassert_eq!(0x1i32.overflowing_shl(36), (0x10, true));\nassert_eq!(0x10isize.overflowing_shl(63), (0, false));\n```",
+ "id": 11796,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "isize"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "overflowing_shl",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11797": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Shifts self right by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean indicating whether the shift\nvalue was larger than or equal to the number of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then used to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x10isize.overflowing_shr(4), (0x1, false));\nassert_eq!(0x10i32.overflowing_shr(36), (0x1, true));\n```",
+ "id": 11797,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "isize"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "overflowing_shr",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11798": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 13, patch: 0})}, feature: \"no_panic_abs\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Computes the absolute value of `self`.\n\nReturns a tuple of the absolute version of self along with a boolean indicating whether an overflow\nhappened. If self is the minimum value\n(e.g., isize::MIN for values of type isize),\nthen the minimum value will be returned again and true will be returned\nfor an overflow happening.\n\n# Examples\n\n```\nassert_eq!(10isize.overflowing_abs(), (10, false));\nassert_eq!((-10isize).overflowing_abs(), (10, false));\nassert_eq!((isize::MIN).overflowing_abs(), (isize::MIN, true));\n```",
+ "id": 11798,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "isize"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "overflowing_abs",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11799": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\nReturns a tuple of the exponentiation along with a bool indicating\nwhether an overflow happened.\n\n# Examples\n\n```\nassert_eq!(3isize.overflowing_pow(4), (81, false));\nassert_eq!(3i8.overflowing_pow(5), (-13, true));\n```",
+ "id": 11799,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "exp",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "isize"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "overflowing_pow",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "118": {
+ "attrs": [
+ {
+ "other": "#[doc(no_inline)]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"builtin_macro_prelude\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 118,
+ "inner": {
+ "use": {
+ "id": 119,
+ "is_glob": false,
+ "name": "Ord",
+ "source": "core::prelude::v1::Ord"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 52,
+ 69
+ ],
+ "end": [
+ 52,
+ 72
+ ],
+ "filename": "std/src/prelude/v1.rs"
+ },
+ "visibility": "public"
+ },
+ "1180": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1180,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 1132,
+ "path": "OccupiedEntry"
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "U"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "T"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 197,
+ "path": "TryFrom"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "U"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 329,
+ 330
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "U"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 198,
+ "path": "TryInto"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 811,
+ 1
+ ],
+ "end": [
+ 813,
+ 27
+ ],
+ "filename": "checkouts/rust/library/core/src/convert/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "11800": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\n# Examples\n\n```\nlet x: isize = 2; // or any other integer type\n\nassert_eq!(x.pow(5), 32);\n```",
+ "id": 11800,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "exp",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "pow",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11801": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the square root of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is negative.\n\n# Examples\n\n```\nassert_eq!(10isize.isqrt(), 3);\n```",
+ "id": 11801,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "isqrt",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11802": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates the quotient of Euclidean division of `self` by `rhs`.\n\nThis computes the integer `q` such that `self = q * rhs + r`, with\n`r = self.rem_euclid(rhs)` and `0 <= r < abs(rhs)`.\n\nIn other words, the result is `self / rhs` rounded to the integer `q`\nsuch that `self >= q * rhs`.\nIf `self > 0`, this is equal to rounding towards zero (the default in Rust);\nif `self < 0`, this is equal to rounding away from zero (towards +/- infinity).\nIf `rhs > 0`, this is equal to rounding towards -infinity;\nif `rhs < 0`, this is equal to rounding towards +infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\nlet a: isize = 7; // or any other integer type\nlet b = 4;\n\nassert_eq!(a.div_euclid(b), 1); // 7 >= 4 * 1\nassert_eq!(a.div_euclid(-b), -1); // 7 >= -4 * -1\nassert_eq!((-a).div_euclid(b), -2); // -7 >= 4 * -2\nassert_eq!((-a).div_euclid(-b), 2); // -7 >= -4 * 2\n```",
+ "id": 11802,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "div_euclid",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11803": {
+ "attrs": [
+ {
+ "other": "#[doc(alias = \"modulo\", alias = \"mod\")]"
+ },
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates the least nonnegative remainder of `self (mod rhs)`.\n\nThis is done as if by the Euclidean division algorithm -- given\n`r = self.rem_euclid(rhs)`, the result satisfies\n`self = rhs * self.div_euclid(rhs) + r` and `0 <= r < abs(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN` and\n`rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\nlet a: isize = 7; // or any other integer type\nlet b = 4;\n\nassert_eq!(a.rem_euclid(b), 3);\nassert_eq!((-a).rem_euclid(b), 1);\nassert_eq!(a.rem_euclid(-b), 3);\nassert_eq!((-a).rem_euclid(-b), 1);\n```\n\nThis will panic:\n```should_panic\nlet _ = isize::MIN.rem_euclid(-1);\n```",
+ "id": 11803,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "rem_euclid",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11804": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards negative infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nlet a: isize = 8;\nlet b = 3;\n\nassert_eq!(a.div_floor(b), 2);\nassert_eq!(a.div_floor(-b), -3);\nassert_eq!((-a).div_floor(b), -3);\nassert_eq!((-a).div_floor(-b), 2);\n```",
+ "id": 11804,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "div_floor",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11805": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards positive infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero or if `self` is `Self::MIN`\nand `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nlet a: isize = 8;\nlet b = 3;\n\nassert_eq!(a.div_ceil(b), 3);\nassert_eq!(a.div_ceil(-b), -2);\nassert_eq!((-a).div_ceil(b), -2);\nassert_eq!((-a).div_ceil(-b), 3);\n```",
+ "id": 11805,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "div_ceil",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11806": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "If `rhs` is positive, calculates the smallest value greater than or\nequal to `self` that is a multiple of `rhs`. If `rhs` is negative,\ncalculates the largest value less than or equal to `self` that is a\nmultiple of `rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nOn overflow, this function will panic if overflow checks are enabled (default in debug\nmode) and wrap if overflow checks are disabled (default in release mode).\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(16_isize.next_multiple_of(8), 16);\nassert_eq!(23_isize.next_multiple_of(8), 24);\nassert_eq!(16_isize.next_multiple_of(-8), 16);\nassert_eq!(23_isize.next_multiple_of(-8), 16);\nassert_eq!((-16_isize).next_multiple_of(8), -16);\nassert_eq!((-23_isize).next_multiple_of(8), -16);\nassert_eq!((-16_isize).next_multiple_of(-8), -16);\nassert_eq!((-23_isize).next_multiple_of(-8), -24);\n```",
+ "id": 11806,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "next_multiple_of",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11807": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "If `rhs` is positive, calculates the smallest value greater than or\nequal to `self` that is a multiple of `rhs`. If `rhs` is negative,\ncalculates the largest value less than or equal to `self` that is a\nmultiple of `rhs`. Returns `None` if `rhs` is zero or the operation\nwould result in overflow.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(16_isize.checked_next_multiple_of(8), Some(16));\nassert_eq!(23_isize.checked_next_multiple_of(8), Some(24));\nassert_eq!(16_isize.checked_next_multiple_of(-8), Some(16));\nassert_eq!(23_isize.checked_next_multiple_of(-8), Some(16));\nassert_eq!((-16_isize).checked_next_multiple_of(8), Some(-16));\nassert_eq!((-23_isize).checked_next_multiple_of(8), Some(-16));\nassert_eq!((-16_isize).checked_next_multiple_of(-8), Some(-16));\nassert_eq!((-23_isize).checked_next_multiple_of(-8), Some(-24));\nassert_eq!(1_isize.checked_next_multiple_of(0), None);\nassert_eq!(isize::MAX.checked_next_multiple_of(2), None);\n```",
+ "id": 11807,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "isize"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "checked_next_multiple_of",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11808": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nThis method might not be optimized owing to implementation details;\n`ilog2` can produce results more efficiently for base 2, and `ilog10`\ncan produce results more efficiently for base 10.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero,\nor if `base` is less than 2.\n\n# Examples\n\n```\nassert_eq!(5isize.ilog(5), 1);\n```",
+ "id": 11808,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "base",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u32"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "ilog",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11809": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the base 10 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is less than or equal to zero.\n\n# Example\n\n```\nassert_eq!(10isize.ilog10(), 1);\n```",
+ "id": 11809,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u32"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "ilog10",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1181": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1181,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 1132,
+ "path": "OccupiedEntry"
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "U"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "T"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 39,
+ "path": "Into"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "U"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 332,
+ 334
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "U"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 197,
+ "path": "TryFrom"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 827,
+ 1
+ ],
+ "end": [
+ 829,
+ 24
+ ],
+ "filename": "checkouts/rust/library/core/src/convert/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "11810": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nReturns `None` if the number is negative or zero, or if the base is not at least 2.\n\nThis method might not be optimized owing to implementation details;\n`checked_ilog2` can produce results more efficiently for base 2, and\n`checked_ilog10` can produce results more efficiently for base 10.\n\n# Examples\n\n```\nassert_eq!(5isize.checked_ilog(5), Some(1));\n```",
+ "id": 11810,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "base",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "checked_ilog",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11811": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the base 2 logarithm of the number, rounded down.\n\nReturns `None` if the number is negative or zero.\n\n# Examples\n\n```\nassert_eq!(2isize.checked_ilog2(), Some(1));\n```",
+ "id": 11811,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "checked_ilog2",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11812": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the base 10 logarithm of the number, rounded down.\n\nReturns `None` if the number is negative or zero.\n\n# Example\n\n```\nassert_eq!(10isize.checked_ilog10(), Some(1));\n```",
+ "id": 11812,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "checked_ilog10",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11813": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Computes the absolute value of `self`.\n\n# Overflow behavior\n\nThe absolute value of\n`isize::MIN`\ncannot be represented as an\n`isize`,\nand attempting to calculate it will cause an overflow. This means\nthat code in debug mode will trigger a panic on this case and\noptimized code will return\n`isize::MIN`\nwithout a panic. If you do not want this behavior, consider\nusing [`unsigned_abs`](Self::unsigned_abs) instead.\n\n# Examples\n\n```\nassert_eq!(10isize.abs(), 10);\nassert_eq!((-10isize).abs(), 10);\n```",
+ "id": 11813,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {
+ "Self::unsigned_abs": 11777
+ },
+ "name": "abs",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11814": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Computes the absolute difference between `self` and `other`.\n\nThis function always returns the correct answer without overflow or\npanics by returning an unsigned integer.\n\n# Examples\n\n```\nassert_eq!(100isize.abs_diff(80), 20usize);\nassert_eq!(100isize.abs_diff(110), 10usize);\nassert_eq!((-100isize).abs_diff(80), 180usize);\nassert_eq!((-100isize).abs_diff(-120), 20usize);\nassert_eq!(isize::MIN.abs_diff(isize::MAX), usize::MAX);\n```",
+ "id": 11814,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "other",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "abs_diff",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11815": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_int_sign\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns a number representing sign of `self`.\n\n - `0` if the number is zero\n - `1` if the number is positive\n - `-1` if the number is negative\n\n# Examples\n\n```\nassert_eq!(10isize.signum(), 1);\nassert_eq!(0isize.signum(), 0);\nassert_eq!((-10isize).signum(), -1);\n```",
+ "id": 11815,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "signum",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11816": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": null
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns `true` if `self` is positive and `false` if the number is zero or\nnegative.\n\n# Examples\n\n```\nassert!(10isize.is_positive());\nassert!(!(-10isize).is_positive());\n```",
+ "id": 11816,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "bool"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "is_positive",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11817": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_int_methods\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": null
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns `true` if `self` is negative and `false` if the number is zero or\npositive.\n\n# Examples\n\n```\nassert!((-10isize).is_negative());\nassert!(!10isize.is_negative());\n```",
+ "id": 11817,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "bool"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "is_negative",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11818": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the memory representation of this integer as a byte array in\nbig-endian (network) byte order.\n\n\n**Note**: This function returns an array of length 2, 4 or 8 bytes\ndepending on the target pointer size.\n\n# Examples\n\n```\nlet bytes = 0x1234567890123456isize.to_be_bytes();\nassert_eq!(bytes, [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]);\n```",
+ "id": 11818,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "array": {
+ "len": "8",
+ "type": {
+ "primitive": "u8"
+ }
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "to_be_bytes",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11819": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the memory representation of this integer as a byte array in\nlittle-endian byte order.\n\n\n**Note**: This function returns an array of length 2, 4 or 8 bytes\ndepending on the target pointer size.\n\n# Examples\n\n```\nlet bytes = 0x1234567890123456isize.to_le_bytes();\nassert_eq!(bytes, [0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]);\n```",
+ "id": 11819,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "array": {
+ "len": "8",
+ "type": {
+ "primitive": "u8"
+ }
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "to_le_bytes",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1182": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1182,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 1132,
+ "path": "OccupiedEntry"
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "outlives": "'static"
+ },
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "maybe",
+ "trait": {
+ "args": null,
+ "id": 3,
+ "path": "Sized"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "T"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 336
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 339,
+ "path": "Any"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 138,
+ 1
+ ],
+ "end": [
+ 138,
+ 36
+ ],
+ "filename": "checkouts/rust/library/core/src/any.rs"
+ },
+ "visibility": "default"
+ },
+ "11820": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the memory representation of this integer as a byte array in\nnative byte order.\n\nAs the target platform's native endianness is used, portable code\nshould use [`to_be_bytes`] or [`to_le_bytes`], as appropriate,\ninstead.\n\n\n**Note**: This function returns an array of length 2, 4 or 8 bytes\ndepending on the target pointer size.\n\n[`to_be_bytes`]: Self::to_be_bytes\n[`to_le_bytes`]: Self::to_le_bytes\n\n# Examples\n\n```\nlet bytes = 0x1234567890123456isize.to_ne_bytes();\nassert_eq!(\n bytes,\n if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]\n } else {\n [0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]\n }\n);\n```",
+ "id": 11820,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "array": {
+ "len": "8",
+ "type": {
+ "primitive": "u8"
+ }
+ }
+ }
+ }
+ }
+ },
+ "links": {
+ "Self::to_be_bytes": 11818,
+ "Self::to_le_bytes": 11819
+ },
+ "name": "to_ne_bytes",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11821": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": null
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Creates an integer value from its representation as a byte array in\nbig endian.\n\n\n**Note**: This function takes an array of length 2, 4 or 8 bytes\ndepending on the target pointer size.\n\n# Examples\n\n```\nlet value = isize::from_be_bytes([0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]);\nassert_eq!(value, 0x1234567890123456);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_be_isize(input: &mut &[u8]) -> isize {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n isize::from_be_bytes(int_bytes.try_into().unwrap())\n}\n```",
+ "id": 11821,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "bytes",
+ {
+ "array": {
+ "len": "8",
+ "type": {
+ "primitive": "u8"
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "from_be_bytes",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11822": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": null
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Creates an integer value from its representation as a byte array in\nlittle endian.\n\n\n**Note**: This function takes an array of length 2, 4 or 8 bytes\ndepending on the target pointer size.\n\n# Examples\n\n```\nlet value = isize::from_le_bytes([0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]);\nassert_eq!(value, 0x1234567890123456);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_le_isize(input: &mut &[u8]) -> isize {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n isize::from_le_bytes(int_bytes.try_into().unwrap())\n}\n```",
+ "id": 11822,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "bytes",
+ {
+ "array": {
+ "len": "8",
+ "type": {
+ "primitive": "u8"
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "from_le_bytes",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11823": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": null
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Creates an integer value from its memory representation as a byte\narray in native endianness.\n\nAs the target platform's native endianness is used, portable code\nlikely wants to use [`from_be_bytes`] or [`from_le_bytes`], as\nappropriate instead.\n\n[`from_be_bytes`]: Self::from_be_bytes\n[`from_le_bytes`]: Self::from_le_bytes\n\n\n**Note**: This function takes an array of length 2, 4 or 8 bytes\ndepending on the target pointer size.\n\n# Examples\n\n```\nlet value = isize::from_ne_bytes(if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]\n} else {\n [0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]\n});\nassert_eq!(value, 0x1234567890123456);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_ne_isize(input: &mut &[u8]) -> isize {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n isize::from_ne_bytes(int_bytes.try_into().unwrap())\n}\n```",
+ "id": 11823,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "bytes",
+ {
+ "array": {
+ "len": "8",
+ "type": {
+ "primitive": "u8"
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {
+ "Self::from_be_bytes": 11821,
+ "Self::from_le_bytes": 11822
+ },
+ "name": "from_ne_bytes",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11824": {
+ "attrs": [
+ {
+ "other": "#[rustc_diagnostic_item = \"isize_legacy_fn_min_value\"]"
+ },
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_min_value\", promotable: true}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": {
+ "note": "replaced by the `MIN` associated constant on this type",
+ "since": "TBD"
+ },
+ "docs": "New code should prefer to use\n[`isize::MIN`] instead.\n\nReturns the smallest value that can be represented by this integer type.",
+ "id": 11824,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {
+ "`isize::MIN`": 11688
+ },
+ "name": "min_value",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11825": {
+ "attrs": [
+ {
+ "other": "#[rustc_diagnostic_item = \"isize_legacy_fn_max_value\"]"
+ },
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": {
+ "note": "replaced by the `MAX` associated constant on this type",
+ "since": "TBD"
+ },
+ "docs": "New code should prefer to use\n[`isize::MAX`] instead.\n\nReturns the largest value that can be represented by this integer type.",
+ "id": 11825,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {
+ "`isize::MAX`": 11689
+ },
+ "name": "max_value",
+ "span": {
+ "begin": [
+ 420,
+ 5
+ ],
+ "end": [
+ 439,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11826": {
+ "attrs": [
+ {
+ "other": "#[doc(alias = \"average_floor\")]"
+ },
+ {
+ "other": "#[doc(alias = \"average_ceil\")]"
+ },
+ {
+ "other": "#[doc(alias = \"average\")]"
+ },
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"num_midpoint_signed\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"num_midpoint_signed\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates the midpoint (average) between `self` and `rhs`.\n\n`midpoint(a, b)` is `(a + b) / 2` as if it were performed in a\nsufficiently-large signed integral type. This implies that the result is\nalways rounded towards zero and that no overflow will ever occur.\n\n# Examples\n\n```\nassert_eq!(0isize.midpoint(4), 2);\nassert_eq!((-1isize).midpoint(2), 0);\nassert_eq!((-7isize).midpoint(0), -3);\nassert_eq!(0isize.midpoint(-7), -3);\nassert_eq!(0isize.midpoint(7), 3);\n```",
+ "id": 11826,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "midpoint",
+ "span": {
+ "begin": [
+ 440,
+ 5
+ ],
+ "end": [
+ 440,
+ 37
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11827": {
+ "attrs": [],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": null,
+ "id": 11827,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "isize"
+ },
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 11688,
+ 11689,
+ 11690,
+ 11691,
+ 11692,
+ 11694,
+ 11695,
+ 11696,
+ 11697,
+ 11698,
+ 11699,
+ 11700,
+ 11701,
+ 11702,
+ 11703,
+ 11704,
+ 11705,
+ 11706,
+ 11707,
+ 11708,
+ 11709,
+ 11710,
+ 11711,
+ 11712,
+ 11714,
+ 11715,
+ 11716,
+ 11717,
+ 11718,
+ 11720,
+ 11721,
+ 11722,
+ 11723,
+ 11724,
+ 11726,
+ 11727,
+ 11728,
+ 11729,
+ 11730,
+ 11731,
+ 11732,
+ 11733,
+ 11734,
+ 11735,
+ 11736,
+ 11737,
+ 11738,
+ 11739,
+ 11740,
+ 11741,
+ 11742,
+ 11743,
+ 11744,
+ 11745,
+ 11746,
+ 11747,
+ 11748,
+ 11749,
+ 11750,
+ 11751,
+ 11752,
+ 11753,
+ 11754,
+ 11755,
+ 11756,
+ 11757,
+ 11758,
+ 11759,
+ 11760,
+ 11761,
+ 11762,
+ 11763,
+ 11764,
+ 11765,
+ 11766,
+ 11713,
+ 11767,
+ 11719,
+ 11768,
+ 11725,
+ 11769,
+ 11770,
+ 11771,
+ 11772,
+ 11773,
+ 11774,
+ 11775,
+ 11776,
+ 11777,
+ 11778,
+ 11779,
+ 11781,
+ 11782,
+ 11783,
+ 11785,
+ 11786,
+ 11787,
+ 11789,
+ 11788,
+ 11790,
+ 11791,
+ 11792,
+ 11793,
+ 11794,
+ 11795,
+ 11796,
+ 11797,
+ 11798,
+ 11799,
+ 11800,
+ 11801,
+ 11802,
+ 11803,
+ 11804,
+ 11805,
+ 11806,
+ 11807,
+ 11808,
+ 11693,
+ 11809,
+ 11810,
+ 11811,
+ 11812,
+ 11813,
+ 11814,
+ 11815,
+ 11816,
+ 11817,
+ 11818,
+ 11819,
+ 11820,
+ 11821,
+ 11822,
+ 11823,
+ 11824,
+ 11825,
+ 11826
+ ],
+ "provided_trait_methods": [],
+ "trait": null
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 419,
+ 1
+ ],
+ "end": [
+ 419,
+ 11
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "11828": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 82, patch: 0})}, feature: \"const_int_from_str\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Parses an integer from a string slice with digits in a given base.\n\nThe string is expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# See also\nIf the string to be parsed is in base 10 (decimal),\n[`from_str`] or [`str::parse`] can also be used.\n\n[`from_str`]: #method.from_str\n[`str::parse`]: primitive.str.html#method.parse\n\n# Examples\n\n```\nassert_eq!(isize::from_str_radix(\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\nassert!(isize::from_str_radix(\"1 \", 10).is_err());\n```",
+ "id": 11828,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "src",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "primitive": "str"
+ }
+ }
+ }
+ ],
+ [
+ "radix",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "isize"
+ }
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 4786,
+ "path": "ParseIntError"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 57,
+ "path": "Result"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "from_str_radix",
+ "span": {
+ "begin": [
+ 1666,
+ 1
+ ],
+ "end": [
+ 1666,
+ 56
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11829": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Parses an integer from an ASCII-byte slice with decimal digits.\n\nThe characters are expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(isize::from_ascii(b\"+10\"), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(isize::from_ascii(b\"1 \").is_err());\n```",
+ "id": 11829,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "src",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "slice": {
+ "primitive": "u8"
+ }
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "isize"
+ }
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 4786,
+ "path": "ParseIntError"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 57,
+ "path": "Result"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "from_ascii",
+ "span": {
+ "begin": [
+ 1666,
+ 1
+ ],
+ "end": [
+ 1666,
+ 56
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1183": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1183,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
+ }
+ ],
+ [
+ "f",
+ {
+ "borrowed_ref": {
+ "is_mutable": true,
+ "lifetime": null,
+ "type": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'_"
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 341,
+ "path": "fmt::Formatter"
+ }
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": null,
+ "id": 342,
+ "path": "fmt::Result"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "fmt",
+ "span": {
+ "begin": [
+ 1820,
+ 5
+ ],
+ "end": [
+ 1825,
+ 6
+ ],
+ "filename": "std/src/collections/hash/map.rs"
+ },
+ "visibility": "default"
+ },
+ "11830": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Parses an integer from an ASCII-byte slice with digits in a given base.\n\nThe characters are expected to be an optional\n `+` or `-` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(isize::from_ascii_radix(b\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(isize::from_ascii_radix(b\"1 \", 10).is_err());\n```",
+ "id": 11830,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "src",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "slice": {
+ "primitive": "u8"
+ }
+ }
+ }
+ }
+ ],
+ [
+ "radix",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "isize"
+ }
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 4786,
+ "path": "ParseIntError"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 57,
+ "path": "Result"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "from_ascii_radix",
+ "span": {
+ "begin": [
+ 1666,
+ 1
+ ],
+ "end": [
+ 1666,
+ 56
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11831": {
+ "attrs": [],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": null,
+ "id": 11831,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "isize"
+ },
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 11828,
+ 11829,
+ 11830
+ ],
+ "provided_trait_methods": [],
+ "trait": null
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 1666,
+ 1
+ ],
+ "end": [
+ 1666,
+ 56
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "11832": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 138215, is_soft: false}, feature: \"int_format_into\"}}]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Allows users to write an integer (in signed decimal format) into a variable `buf` of\ntype [`NumBuffer`] that is passed by the caller by mutable reference.\n\n# Examples\n\n```\n#![feature(int_format_into)]\nuse core::fmt::NumBuffer;\n\nlet n = 0isize;\nlet mut buf = NumBuffer::new();\nassert_eq!(n.format_into(&mut buf), \"0\");\n\nlet n1 = 32isize;\nassert_eq!(n1.format_into(&mut buf), \"32\");\n\nlet n2 = isize :: MAX;\nassert_eq!(n2.format_into(&mut buf), isize :: MAX.to_string());\n```",
+ "id": 11832,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "buf",
+ {
+ "borrowed_ref": {
+ "is_mutable": true,
+ "lifetime": null,
+ "type": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "isize"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 10387,
+ "path": "NumBuffer"
+ }
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "primitive": "str"
+ }
+ }
+ }
+ }
+ }
+ },
+ "links": {
+ "`NumBuffer`": 10387
+ },
+ "name": "format_into",
+ "span": {
+ "begin": [
+ 599,
+ 5
+ ],
+ "end": [
+ 599,
+ 95
+ ],
+ "filename": "checkouts/rust/library/core/src/fmt/num.rs"
+ },
+ "visibility": "public"
+ },
+ "11833": {
+ "attrs": [],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": null,
+ "id": 11833,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "isize"
+ },
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 11832
+ ],
+ "provided_trait_methods": [],
+ "trait": null
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 599,
+ 5
+ ],
+ "end": [
+ 599,
+ 95
+ ],
+ "filename": "checkouts/rust/library/core/src/fmt/num.rs"
+ },
+ "visibility": "default"
+ },
+ "11834": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "The smallest value that can be represented by this integer type.\n\n# Examples\n\n```\nassert_eq!(usize::MIN, 0);\n```",
+ "id": 11834,
+ "inner": {
+ "assoc_const": {
+ "type": {
+ "primitive": "usize"
+ },
+ "value": "0"
+ }
+ },
+ "links": {},
+ "name": "MIN",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11835": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 43, patch: 0})}, feature: \"assoc_int_consts\"}}]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "The largest value that can be represented by this integer type\n(264 − 1 on 64-bit targets).\n\n# Examples\n\n```\nassert_eq!(usize::MAX, 18446744073709551615);\n```",
+ "id": 11835,
+ "inner": {
+ "assoc_const": {
+ "type": {
+ "primitive": "usize"
+ },
+ "value": "_"
+ }
+ },
+ "links": {},
+ "name": "MAX",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11836": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 53, patch: 0})}, feature: \"int_bits_const\"}}]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "The size of this integer type in bits.\n\n# Examples\n\n```\nassert_eq!(usize::BITS, 64);\n```",
+ "id": 11836,
+ "inner": {
+ "assoc_const": {
+ "type": {
+ "primitive": "u32"
+ },
+ "value": "_"
+ }
+ },
+ "links": {},
+ "name": "BITS",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11837": {
+ "attrs": [
+ {
+ "other": "#[doc(alias = \"popcount\")]"
+ },
+ {
+ "other": "#[doc(alias = \"popcnt\")]"
+ },
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the number of ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = 0b01001100usize;\nassert_eq!(n.count_ones(), 3);\n\nlet max = usize::MAX;\nassert_eq!(max.count_ones(), 64);\n\nlet zero = 0usize;\nassert_eq!(zero.count_ones(), 0);\n```",
+ "id": 11837,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u32"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "count_ones",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11838": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the number of zeros in the binary representation of `self`.\n\n# Examples\n\n```\nlet zero = 0usize;\nassert_eq!(zero.count_zeros(), 64);\n\nlet max = usize::MAX;\nassert_eq!(max.count_zeros(), 0);\n```",
+ "id": 11838,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u32"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "count_zeros",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11839": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the base 2 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is zero.\n\n# Examples\n\n```\nassert_eq!(2usize.ilog2(), 1);\n```",
+ "id": 11839,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u32"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "ilog2",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1184": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 12, patch: 0})}, feature: \"debug_hash_map\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1184,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'_"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 1132,
+ "path": "OccupiedEntry"
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 344,
+ "path": "Debug"
+ }
+ }
+ }
+ ],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "K"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 344,
+ "path": "Debug"
+ }
+ }
+ }
+ ],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "V"
+ }
+ ],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 1183
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 344,
+ "path": "Debug"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 1819,
+ 1
+ ],
+ "end": [
+ 1826,
+ 2
+ ],
+ "filename": "std/src/collections/hash/map.rs"
+ },
+ "visibility": "default"
+ },
+ "11840": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the number of leading zeros in the binary representation of `self`.\n\nDepending on what you're doing with the value, you might also be interested in the\n[`ilog2`] function which returns a consistent number, even if the type widens.\n\n# Examples\n\n```\nlet n = usize::MAX >> 2;\nassert_eq!(n.leading_zeros(), 2);\n\nlet zero = 0usize;\nassert_eq!(zero.leading_zeros(), 64);\n\nlet max = usize::MAX;\nassert_eq!(max.leading_zeros(), 0);\n```\n[`ilog2`]: usize::ilog2",
+ "id": 11840,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u32"
+ }
+ }
+ }
+ },
+ "links": {
+ "usize::ilog2": 11839
+ },
+ "name": "leading_zeros",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11841": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the number of trailing zeros in the binary representation\nof `self`.\n\n# Examples\n\n```\nlet n = 0b0101000usize;\nassert_eq!(n.trailing_zeros(), 3);\n\nlet zero = 0usize;\nassert_eq!(zero.trailing_zeros(), 64);\n\nlet max = usize::MAX;\nassert_eq!(max.trailing_zeros(), 0);\n```",
+ "id": 11841,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u32"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "trailing_zeros",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11842": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the number of leading ones in the binary representation of `self`.\n\n# Examples\n\n```\nlet n = !(usize::MAX >> 2);\nassert_eq!(n.leading_ones(), 2);\n\nlet zero = 0usize;\nassert_eq!(zero.leading_ones(), 0);\n\nlet max = usize::MAX;\nassert_eq!(max.leading_ones(), 64);\n```",
+ "id": 11842,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u32"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "leading_ones",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11843": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 46, patch: 0})}, feature: \"leading_trailing_ones\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the number of trailing ones in the binary representation\nof `self`.\n\n# Examples\n\n```\nlet n = 0b1010111usize;\nassert_eq!(n.trailing_ones(), 3);\n\nlet zero = 0usize;\nassert_eq!(zero.trailing_ones(), 0);\n\nlet max = usize::MAX;\nassert_eq!(max.trailing_ones(), 64);\n```",
+ "id": 11843,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u32"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "trailing_ones",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11844": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 142326, is_soft: false}, feature: \"uint_bit_width\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the minimum number of bits required to represent `self`.\n\nThis method returns zero if `self` is zero.\n\n# Examples\n\n```\n#![feature(uint_bit_width)]\n\nassert_eq!(0_usize.bit_width(), 0);\nassert_eq!(0b111_usize.bit_width(), 3);\nassert_eq!(0b1110_usize.bit_width(), 4);\nassert_eq!(usize::MAX.bit_width(), 64);\n```",
+ "id": 11844,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u32"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "bit_width",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11845": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns `self` with only the most significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: usize = 0b_01100100;\n\nassert_eq!(n.isolate_highest_one(), 0b_01000000);\nassert_eq!(0_usize.isolate_highest_one(), 0);\n```",
+ "id": 11845,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "isolate_highest_one",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11846": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 136909, is_soft: false},\nfeature: \"isolate_most_least_significant_one\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns `self` with only the least significant bit set, or `0` if\nthe input is `0`.\n\n# Examples\n\n```\n#![feature(isolate_most_least_significant_one)]\n\nlet n: usize = 0b_01100100;\n\nassert_eq!(n.isolate_lowest_one(), 0b_00000100);\nassert_eq!(0_usize.isolate_lowest_one(), 0);\n```",
+ "id": 11846,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "isolate_lowest_one",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11847": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the index of the highest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_usize.highest_one(), None);\nassert_eq!(0x1_usize.highest_one(), Some(0));\nassert_eq!(0x10_usize.highest_one(), Some(4));\nassert_eq!(0x1f_usize.highest_one(), Some(4));\n```",
+ "id": 11847,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "highest_one",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11848": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145203, is_soft: false}, feature: \"int_lowest_highest_one\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the index of the lowest bit set to one in `self`, or `None`\nif `self` is `0`.\n\n# Examples\n\n```\n#![feature(int_lowest_highest_one)]\n\nassert_eq!(0x0_usize.lowest_one(), None);\nassert_eq!(0x1_usize.lowest_one(), Some(0));\nassert_eq!(0x10_usize.lowest_one(), Some(4));\nassert_eq!(0x1f_usize.lowest_one(), Some(0));\n```",
+ "id": 11848,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "lowest_one",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11849": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"integer_sign_cast\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the bit pattern of `self` reinterpreted as a signed integer of the same size.\n\nThis produces the same result as an `as` cast, but ensures that the bit-width remains\nthe same.\n\n# Examples\n\n```\nlet n = usize::MAX;\n\nassert_eq!(n.cast_signed(), -1isize);\n```",
+ "id": 11849,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "isize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "cast_signed",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11850": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Shifts the bits to the left by a specified amount, `n`,\nwrapping the truncated bits to the end of the resulting integer.\n\nPlease note this isn't the same operation as the `<<` shifting operator!\n\n# Examples\n\n```\nlet n = 0xaa00000000006e1usize;\nlet m = 0x6e10aa;\n\nassert_eq!(n.rotate_left(12), m);\n```",
+ "id": 11850,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "n",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "rotate_left",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11851": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Shifts the bits to the right by a specified amount, `n`,\nwrapping the truncated bits to the beginning of the resulting\ninteger.\n\nPlease note this isn't the same operation as the `>>` shifting operator!\n\n# Examples\n\n```\nlet n = 0x6e10aausize;\nlet m = 0xaa00000000006e1;\n\nassert_eq!(n.rotate_right(12), m);\n```",
+ "id": 11851,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "n",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "rotate_right",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11852": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 145686, is_soft: false}, feature: \"funnel_shifts\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145686, is_soft: false}, feature: \"funnel_shifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Performs a left funnel shift (concatenates `self` with `rhs`, with `self`\nmaking up the most significant half, then shifts the combined value left\nby `n`, and most significant half is extracted to produce the result).\n\nPlease note this isn't the same operation as the `<<` shifting operator or\n[`rotate_left`](Self::rotate_left), although `a.funnel_shl(a, n)` is *equivalent*\nto `a.rotate_left(n)`.\n\n# Panics\n\nIf `n` is greater than or equal to the number of bits in `self`\n\n# Examples\n\nBasic usage:\n\n```\n#![feature(funnel_shifts)]\nlet a = 0xaa00000000006e1usize;\nlet b = 0x2fe78e45983acd98usize;\nlet m = 0x6e12fe;\n\nassert_eq!(a.funnel_shl(b, 12), m);\n```",
+ "id": 11852,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ],
+ [
+ "n",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {
+ "Self::rotate_left": 11850
+ },
+ "name": "funnel_shl",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11853": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 145686, is_soft: false}, feature: \"funnel_shifts\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 145686, is_soft: false}, feature: \"funnel_shifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Performs a right funnel shift (concatenates `self` and `rhs`, with `self`\nmaking up the most significant half, then shifts the combined value right\nby `n`, and least significant half is extracted to produce the result).\n\nPlease note this isn't the same operation as the `>>` shifting operator or\n[`rotate_right`](Self::rotate_right), although `a.funnel_shr(a, n)` is *equivalent*\nto `a.rotate_right(n)`.\n\n# Panics\n\nIf `n` is greater than or equal to the number of bits in `self`\n\n# Examples\n\nBasic usage:\n\n```\n#![feature(funnel_shifts)]\nlet a = 0xaa00000000006e1usize;\nlet b = 0x2fe78e45983acd98usize;\nlet m = 0x6e12fe78e45983ac;\n\nassert_eq!(a.funnel_shr(b, 12), m);\n```",
+ "id": 11853,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ],
+ [
+ "n",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {
+ "Self::rotate_right": 11851
+ },
+ "name": "funnel_shr",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11854": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Reverses the byte order of the integer.\n\n# Examples\n\n```\nlet n = 0x1234567890123456usize;\nlet m = n.swap_bytes();\n\nassert_eq!(m, 0x5634129078563412);\n```",
+ "id": 11854,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "swap_bytes",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11855": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 37, patch: 0})}, feature: \"reverse_bits\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Reverses the order of bits in the integer. The least significant bit becomes the most significant bit,\n second least-significant bit becomes second most-significant bit, etc.\n\n# Examples\n\n```\nlet n = 0x1234567890123456usize;\nlet m = n.reverse_bits();\n\nassert_eq!(m, 0x6a2c48091e6a2c48);\nassert_eq!(0, 0usize.reverse_bits());\n```",
+ "id": 11855,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "reverse_bits",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11856": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": null
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Converts an integer from big endian to the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Ausize;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(usize::from_be(n), n)\n} else {\n assert_eq!(usize::from_be(n), n.swap_bytes())\n}\n```",
+ "id": 11856,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "x",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "from_be",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11857": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": null
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Converts an integer from little endian to the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Ausize;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(usize::from_le(n), n)\n} else {\n assert_eq!(usize::from_le(n), n.swap_bytes())\n}\n```",
+ "id": 11857,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "x",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "from_le",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11858": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Converts `self` to big endian from the target's endianness.\n\nOn big endian this is a no-op. On little endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Ausize;\n\nif cfg!(target_endian = \"big\") {\n assert_eq!(n.to_be(), n)\n} else {\n assert_eq!(n.to_be(), n.swap_bytes())\n}\n```",
+ "id": 11858,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "to_be",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11859": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Converts `self` to little endian from the target's endianness.\n\nOn little endian this is a no-op. On big endian the bytes are\nswapped.\n\n# Examples\n\n```\nlet n = 0x1Ausize;\n\nif cfg!(target_endian = \"little\") {\n assert_eq!(n.to_le(), n)\n} else {\n assert_eq!(n.to_le(), n.swap_bytes())\n}\n```",
+ "id": 11859,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "to_le",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1186": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 10, patch: 0})}, feature: \"map_entry_keys\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": "Gets a reference to the key that would be used when inserting a value\nthrough the `VacantEntry`.\n\n# Examples\n\n```\nuse std::collections::HashMap;\n\nlet mut map: HashMap<&str, u32> = HashMap::new();\nassert_eq!(map.entry(\"poneyland\").key(), &\"poneyland\");\n```",
+ "id": 1186,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "K"
+ }
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "key",
+ "span": {
+ "begin": [
+ 2698,
+ 5
+ ],
+ "end": [
+ 2700,
+ 6
+ ],
+ "filename": "std/src/collections/hash/map.rs"
+ },
+ "visibility": "public"
+ },
+ "11860": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Checked integer addition. Computes `self + rhs`, returning `None`\nif overflow occurred.\n\n# Examples\n\n```\nassert_eq!((usize::MAX - 2).checked_add(1), Some(usize::MAX - 1));\nassert_eq!((usize::MAX - 2).checked_add(3), None);\n```",
+ "id": 11860,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "usize"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "checked_add",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11861": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Strict integer addition. Computes `self + rhs`, panicking\nif overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!((usize::MAX - 2).strict_add(1), usize::MAX - 1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = (usize::MAX - 2).strict_add(3);\n```",
+ "id": 11861,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "strict_add",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11862": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Wrapping (modular) addition. Computes `self + rhs`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(200usize.wrapping_add(55), 255);\nassert_eq!(200usize.wrapping_add(usize::MAX), 199);\n```",
+ "id": 11862,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "wrapping_add",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11863": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Unchecked integer addition. Computes `self + rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_add(y)` is semantically equivalent to calling\n`x.`[`checked_add`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_add`].\n\n# Safety\n\nThis results in undefined behavior when\n`self + rhs > usize::MAX` or `self + rhs < usize::MIN`,\ni.e. when [`checked_add`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_add`]: usize::checked_add\n[`wrapping_add`]: usize::wrapping_add",
+ "id": 11863,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": true
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {
+ "usize::checked_add": 11860,
+ "usize::wrapping_add": 11862
+ },
+ "name": "unchecked_add",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11864": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Checked addition with a signed integer. Computes `self + rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1usize.checked_add_signed(2), Some(3));\nassert_eq!(1usize.checked_add_signed(-2), None);\nassert_eq!((usize::MAX - 2).checked_add_signed(3), None);\n```",
+ "id": 11864,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "usize"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "checked_add_signed",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11865": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Strict addition with a signed integer. Computes `self + rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1usize.strict_add_signed(2), 3);\n```\n\nThe following panic because of overflow:\n\n```should_panic\nlet _ = 1usize.strict_add_signed(-2);\n```\n\n```should_panic\nlet _ = (usize::MAX - 2).strict_add_signed(3);\n```",
+ "id": 11865,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "strict_add_signed",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11866": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Checked integer subtraction. Computes `self - rhs`, returning\n`None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1usize.checked_sub(1), Some(0));\nassert_eq!(0usize.checked_sub(1), None);\n```",
+ "id": 11866,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "usize"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "checked_sub",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11867": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Strict integer subtraction. Computes `self - rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(1usize.strict_sub(1), 0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0usize.strict_sub(1);\n```",
+ "id": 11867,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "strict_sub",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11868": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Wrapping (modular) subtraction. Computes `self - rhs`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(100usize.wrapping_sub(100), 0);\nassert_eq!(100usize.wrapping_sub(usize::MAX), 101);\n```",
+ "id": 11868,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "wrapping_sub",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11869": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Unchecked integer subtraction. Computes `self - rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_sub(y)` is semantically equivalent to calling\n`x.`[`checked_sub`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_sub`].\n\nIf you find yourself writing code like this:\n\n```\n# let foo = 30_u32;\n# let bar = 20;\nif foo >= bar {\n // SAFETY: just checked it will not overflow\n let diff = unsafe { foo.unchecked_sub(bar) };\n // ... use diff ...\n}\n```\n\nConsider changing it to\n\n```\n# let foo = 30_u32;\n# let bar = 20;\nif let Some(diff) = foo.checked_sub(bar) {\n // ... use diff ...\n}\n```\n\nAs that does exactly the same thing -- including telling the optimizer\nthat the subtraction cannot overflow -- but avoids needing `unsafe`.\n\n# Safety\n\nThis results in undefined behavior when\n`self - rhs > usize::MAX` or `self - rhs < usize::MIN`,\ni.e. when [`checked_sub`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_sub`]: usize::checked_sub\n[`wrapping_sub`]: usize::wrapping_sub",
+ "id": 11869,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": true
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {
+ "usize::checked_sub": 11866,
+ "usize::wrapping_sub": 11868
+ },
+ "name": "unchecked_sub",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1187": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 12, patch: 0})}, feature: \"map_entry_recover_keys2\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": "Take ownership of the key.\n\n# Examples\n\n```\nuse std::collections::HashMap;\nuse std::collections::hash_map::Entry;\n\nlet mut map: HashMap<&str, u32> = HashMap::new();\n\nif let Entry::Vacant(v) = map.entry(\"poneyland\") {\n v.into_key();\n}\n```",
+ "id": 1187,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "generic": "K"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "into_key",
+ "span": {
+ "begin": [
+ 2718,
+ 5
+ ],
+ "end": [
+ 2720,
+ 6
+ ],
+ "filename": "std/src/collections/hash/map.rs"
+ },
+ "visibility": "public"
+ },
+ "11870": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Checked subtraction with a signed integer. Computes `self - rhs`,\nreturning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(1usize.checked_sub_signed(2), None);\nassert_eq!(1usize.checked_sub_signed(-2), Some(3));\nassert_eq!((usize::MAX - 2).checked_sub_signed(-4), None);\n```",
+ "id": 11870,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "usize"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "checked_sub_signed",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11871": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Strict subtraction with a signed integer. Computes `self - rhs`,\npanicking if overflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(3usize.strict_sub_signed(2), 1);\n```\n\nThe following panic because of overflow:\n\n```should_panic\nlet _ = 1usize.strict_sub_signed(2);\n```\n\n```should_panic\nlet _ = (usize::MAX).strict_sub_signed(-1);\n```",
+ "id": 11871,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "strict_sub_signed",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11872": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_signed_diff\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_signed_diff\"}}]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Checked integer subtraction. Computes `self - rhs` and checks if the result fits into an [`isize`], returning `None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(10usize.checked_signed_diff(2), Some(8));\nassert_eq!(2usize.checked_signed_diff(10), Some(-8));\nassert_eq!(usize::MAX.checked_signed_diff(isize::MAX as usize), None);\nassert_eq!((isize::MAX as usize).checked_signed_diff(usize::MAX), Some(isize::MIN));\nassert_eq!((isize::MAX as usize + 1).checked_signed_diff(0), None);\nassert_eq!(usize::MAX.checked_signed_diff(usize::MAX), Some(0));\n```",
+ "id": 11872,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "isize"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {
+ "`isize`": 11687
+ },
+ "name": "checked_signed_diff",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11873": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Checked integer multiplication. Computes `self * rhs`, returning\n`None` if overflow occurred.\n\n# Examples\n\n```\nassert_eq!(5usize.checked_mul(1), Some(5));\nassert_eq!(usize::MAX.checked_mul(2), None);\n```",
+ "id": 11873,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "usize"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "checked_mul",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11874": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Strict integer multiplication. Computes `self * rhs`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(5usize.strict_mul(1), 5);\n```\n\nThe following panics because of overflow:\n\n``` should_panic\nlet _ = usize::MAX.strict_mul(2);\n```",
+ "id": 11874,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "strict_mul",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11875": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Wrapping (modular) multiplication. Computes `self *\nrhs`, wrapping around at the boundary of the type.\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u8` is used.\n\n```\nassert_eq!(10u8.wrapping_mul(12), 120);\nassert_eq!(25u8.wrapping_mul(12), 44);\n```",
+ "id": 11875,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "wrapping_mul",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11876": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 79, patch: 0})}, feature: \"unchecked_math\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Unchecked integer multiplication. Computes `self * rhs`, assuming overflow\ncannot occur.\n\nCalling `x.unchecked_mul(y)` is semantically equivalent to calling\n`x.`[`checked_mul`]`(y).`[`unwrap_unchecked`]`()`.\n\nIf you're just trying to avoid the panic in debug mode, then **do not**\nuse this. Instead, you're looking for [`wrapping_mul`].\n\n# Safety\n\nThis results in undefined behavior when\n`self * rhs > usize::MAX` or `self * rhs < usize::MIN`,\ni.e. when [`checked_mul`] would return `None`.\n\n[`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked\n[`checked_mul`]: usize::checked_mul\n[`wrapping_mul`]: usize::wrapping_mul",
+ "id": 11876,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": true
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {
+ "usize::checked_mul": 11873,
+ "usize::wrapping_mul": 11875
+ },
+ "name": "unchecked_mul",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11877": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Checked integer division. Computes `self / rhs`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(128usize.checked_div(2), Some(64));\nassert_eq!(1usize.checked_div(0), None);\n```",
+ "id": 11877,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "usize"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "checked_div",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11878": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Strict integer division. Computes `self / rhs`.\n\nStrict division on unsigned types is just normal division. There's no\nway overflow could ever happen. This function exists so that all\noperations are accounted for in the strict operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100usize.strict_div(10), 10);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1usize).strict_div(0);\n```",
+ "id": 11878,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "strict_div",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11879": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Checked Euclidean division. Computes `self.div_euclid(rhs)`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(128usize.checked_div_euclid(2), Some(64));\nassert_eq!(1usize.checked_div_euclid(0), None);\n```",
+ "id": 11879,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "usize"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "checked_div_euclid",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1188": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": "Sets the value of the entry with the `VacantEntry`'s key,\nand returns a mutable reference to it.\n\n# Examples\n\n```\nuse std::collections::HashMap;\nuse std::collections::hash_map::Entry;\n\nlet mut map: HashMap<&str, u32> = HashMap::new();\n\nif let Entry::Vacant(o) = map.entry(\"poneyland\") {\n o.insert(37);\n}\nassert_eq!(map[\"poneyland\"], 37);\n```",
+ "id": 1188,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "value",
+ {
+ "generic": "V"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "borrowed_ref": {
+ "is_mutable": true,
+ "lifetime": "'a",
+ "type": {
+ "generic": "V"
+ }
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "insert",
+ "span": {
+ "begin": [
+ 2740,
+ 5
+ ],
+ "end": [
+ 2742,
+ 6
+ ],
+ "filename": "std/src/collections/hash/map.rs"
+ },
+ "visibility": "public"
+ },
+ "11880": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Strict Euclidean division. Computes `self.div_euclid(rhs)`.\n\nStrict division on unsigned types is just normal division. There's no\nway overflow could ever happen. This function exists so that all\noperations are accounted for in the strict operations. Since, for the\npositive integers, all common definitions of division are equal, this\nis exactly equal to `self.strict_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100usize.strict_div_euclid(10), 10);\n```\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = (1usize).strict_div_euclid(0);\n```",
+ "id": 11880,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "strict_div_euclid",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11881": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Checked integer division without remainder. Computes `self / rhs`,\nreturning `None` if `rhs == 0` or if `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64usize.checked_exact_div(2), Some(32));\nassert_eq!(64usize.checked_exact_div(32), Some(2));\nassert_eq!(64usize.checked_exact_div(0), None);\nassert_eq!(65usize.checked_exact_div(2), None);\n```",
+ "id": 11881,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "usize"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "checked_exact_div",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11882": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Checked integer division without remainder. Computes `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs == 0` or `self % rhs != 0`.\n\n# Examples\n\n```\n#![feature(exact_div)]\nassert_eq!(64usize.exact_div(2), 32);\nassert_eq!(64usize.exact_div(32), 2);\n```\n\n```should_panic\n#![feature(exact_div)]\nlet _ = 65usize.exact_div(2);\n```",
+ "id": 11882,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "exact_div",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11883": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 139911, is_soft: false}, feature: \"exact_div\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Unchecked integer division without remainder. Computes `self / rhs`.\n\n# Safety\n\nThis results in undefined behavior when `rhs == 0` or `self % rhs != 0`,\ni.e. when [`checked_exact_div`](Self::checked_exact_div) would return `None`.",
+ "id": 11883,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": true
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {
+ "Self::checked_exact_div": 11881
+ },
+ "name": "unchecked_exact_div",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11884": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_checked_int_div\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Checked integer remainder. Computes `self % rhs`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(5usize.checked_rem(2), Some(1));\nassert_eq!(5usize.checked_rem(0), None);\n```",
+ "id": 11884,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "usize"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "checked_rem",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11885": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Strict integer remainder. Computes `self % rhs`.\n\nStrict remainder calculation on unsigned types is just the regular\nremainder calculation. There's no way overflow could ever happen.\nThis function exists so that all operations are accounted for in the\nstrict operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100usize.strict_rem(10), 0);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5usize.strict_rem(0);\n```",
+ "id": 11885,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "strict_rem",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11886": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Checked Euclidean modulo. Computes `self.rem_euclid(rhs)`, returning `None`\nif `rhs == 0`.\n\n# Examples\n\n```\nassert_eq!(5usize.checked_rem_euclid(2), Some(1));\nassert_eq!(5usize.checked_rem_euclid(0), None);\n```",
+ "id": 11886,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "usize"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "checked_rem_euclid",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11887": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Strict Euclidean modulo. Computes `self.rem_euclid(rhs)`.\n\nStrict modulo calculation on unsigned types is just the regular\nremainder calculation. There's no way overflow could ever happen.\nThis function exists so that all operations are accounted for in the\nstrict operations. Since, for the positive integers, all common\ndefinitions of division are equal, this is exactly equal to\n`self.strict_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100usize.strict_rem_euclid(10), 0);\n```\n\nThe following panics because of division by zero:\n\n```should_panic\nlet _ = 5usize.strict_rem_euclid(0);\n```",
+ "id": 11887,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "strict_rem_euclid",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11888": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 135758, is_soft: false}, feature: \"disjoint_bitor\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 135758, is_soft: false}, feature: \"disjoint_bitor\"}}]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Same value as `self | other`, but UB if any bit position is set in both inputs.\n\nThis is a situational micro-optimization for places where you'd rather\nuse addition on some platforms and bitwise or on other platforms, based\non exactly which instructions combine better with whatever else you're\ndoing. Note that there's no reason to bother using this for places\nwhere it's clear from the operations involved that they can't overlap.\nFor example, if you're combining `u16`s into a `u32` with\n`((a as u32) << 16) | (b as u32)`, that's fine, as the backend will\nknow those sides of the `|` are disjoint without needing help.\n\n# Examples\n\n```\n#![feature(disjoint_bitor)]\n\n// SAFETY: `1` and `4` have no bits in common.\nunsafe {\n assert_eq!(1_usize.unchecked_disjoint_bitor(4), 5);\n}\n```\n\n# Safety\n\nRequires that `(self & other) == 0`, otherwise it's immediate UB.\n\nEquivalently, requires that `(self | other) == (self + other)`.",
+ "id": 11888,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": true
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "other",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "unchecked_disjoint_bitor",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11889": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nThis method might not be optimized owing to implementation details;\n`ilog2` can produce results more efficiently for base 2, and `ilog10`\ncan produce results more efficiently for base 10.\n\n# Panics\n\nThis function will panic if `self` is zero, or if `base` is less than 2.\n\n# Examples\n\n```\nassert_eq!(5usize.ilog(5), 1);\n```",
+ "id": 11889,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "base",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u32"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "ilog",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1189": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 83, patch: 0})}, feature: \"entry_insert\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": "Sets the value of the entry with the `VacantEntry`'s key,\nand returns an `OccupiedEntry`.\n\n# Examples\n\n```\nuse std::collections::HashMap;\nuse std::collections::hash_map::Entry;\n\nlet mut map: HashMap<&str, u32> = HashMap::new();\n\nif let Entry::Vacant(o) = map.entry(\"poneyland\") {\n o.insert_entry(37);\n}\nassert_eq!(map[\"poneyland\"], 37);\n```",
+ "id": 1189,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "value",
+ {
+ "generic": "V"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 1132,
+ "path": "OccupiedEntry"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "insert_entry",
+ "span": {
+ "begin": [
+ 2762,
+ 5
+ ],
+ "end": [
+ 2765,
+ 6
+ ],
+ "filename": "std/src/collections/hash/map.rs"
+ },
+ "visibility": "public"
+ },
+ "11890": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the base 10 logarithm of the number, rounded down.\n\n# Panics\n\nThis function will panic if `self` is zero.\n\n# Example\n\n```\nassert_eq!(10usize.ilog10(), 1);\n```",
+ "id": 11890,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u32"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "ilog10",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11891": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the logarithm of the number with respect to an arbitrary base,\nrounded down.\n\nReturns `None` if the number is zero, or if the base is not at least 2.\n\nThis method might not be optimized owing to implementation details;\n`checked_ilog2` can produce results more efficiently for base 2, and\n`checked_ilog10` can produce results more efficiently for base 10.\n\n# Examples\n\n```\nassert_eq!(5usize.checked_ilog(5), Some(1));\n```",
+ "id": 11891,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "base",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "checked_ilog",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11892": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the base 2 logarithm of the number, rounded down.\n\nReturns `None` if the number is zero.\n\n# Examples\n\n```\nassert_eq!(2usize.checked_ilog2(), Some(1));\n```",
+ "id": 11892,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "checked_ilog2",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11893": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 67, patch: 0})}, feature: \"int_log\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the base 10 logarithm of the number, rounded down.\n\nReturns `None` if the number is zero.\n\n# Examples\n\n```\nassert_eq!(10usize.checked_ilog10(), Some(1));\n```",
+ "id": 11893,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "u32"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "checked_ilog10",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11894": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Checked negation. Computes `-self`, returning `None` unless `self ==\n0`.\n\nNote that negating any positive integer will overflow.\n\n# Examples\n\n```\nassert_eq!(0usize.checked_neg(), Some(0));\nassert_eq!(1usize.checked_neg(), None);\n```",
+ "id": 11894,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "usize"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "checked_neg",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11895": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Strict negation. Computes `-self`, panicking unless `self ==\n0`.\n\nNote that negating any positive integer will overflow.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0usize.strict_neg(), 0);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 1usize.strict_neg();\n```",
+ "id": 11895,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "strict_neg",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11896": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Checked shift left. Computes `self << rhs`, returning `None`\nif `rhs` is larger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x1usize.checked_shl(4), Some(0x10));\nassert_eq!(0x10usize.checked_shl(129), None);\nassert_eq!(0x10usize.checked_shl(63), Some(0));\n```",
+ "id": 11896,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "usize"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "checked_shl",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11897": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Strict shift left. Computes `self << rhs`, panicking if `rhs` is larger\nthan or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x1usize.strict_shl(4), 0x10);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10usize.strict_shl(129);\n```",
+ "id": 11897,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "strict_shl",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11898": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Unchecked shift left. Computes `self << rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shl`] would return `None`.\n\n[`checked_shl`]: usize::checked_shl",
+ "id": 11898,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": true
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {
+ "usize::checked_shl": 11896
+ },
+ "name": "unchecked_shl",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11899": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x1usize.unbounded_shl(4), 0x10);\nassert_eq!(0x1usize.unbounded_shl(129), 0);\n```",
+ "id": 11899,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "unbounded_shl",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1190": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1190,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 1135,
+ "path": "VacantEntry"
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "lifetime": {
+ "outlives": []
+ }
+ },
+ "name": "'a"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [
+ {
+ "outlives": "'a"
+ }
+ ],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "K"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [
+ {
+ "outlives": "'a"
+ }
+ ],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "V"
+ }
+ ],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 1186,
+ 1187,
+ 1188,
+ 1189
+ ],
+ "provided_trait_methods": [],
+ "trait": null
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 2684,
+ 1
+ ],
+ "end": [
+ 2766,
+ 2
+ ],
+ "filename": "std/src/collections/hash/map.rs"
+ },
+ "visibility": "default"
+ },
+ "11900": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Exact shift left. Computes `self << rhs` as long as it can be reversed losslessly.\n\nReturns `None` if any non-zero bits would be shifted out or if `rhs` >=\n`usize::BITS`.\nOtherwise, returns `Some(self << rhs)`.\n\n# Examples\n\n```\n#![feature(exact_bitshifts)]\n\nassert_eq!(0x1usize.exact_shl(4), Some(0x10));\nassert_eq!(0x1usize.exact_shl(129), None);\n```",
+ "id": 11900,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "usize"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "exact_shl",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11901": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Unchecked exact shift left. Computes `self << rhs`, assuming the operation can be\nlosslessly reversed `rhs` cannot be larger than\n`usize::BITS`.\n\n# Safety\n\nThis results in undefined behavior when `rhs > self.leading_zeros() || rhs >=\nusize::BITS`\ni.e. when\n[`usize::exact_shl`]\nwould return `None`.",
+ "id": 11901,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": true
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {
+ "`usize::exact_shl`": 11900
+ },
+ "name": "unchecked_exact_shl",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11902": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_checked_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Checked shift right. Computes `self >> rhs`, returning `None`\nif `rhs` is larger than or equal to the number of bits in `self`.\n\n# Examples\n\n```\nassert_eq!(0x10usize.checked_shr(4), Some(0x1));\nassert_eq!(0x10usize.checked_shr(129), None);\n```",
+ "id": 11902,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "usize"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "checked_shr",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11903": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Strict shift right. Computes `self >> rhs`, panicking `rhs` is\nlarger than or equal to the number of bits in `self`.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(0x10usize.strict_shr(4), 0x1);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = 0x10usize.strict_shr(129);\n```",
+ "id": 11903,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "strict_shr",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11904": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"niche optimization path\"),\nissue: 85122, is_soft: false}, feature: \"unchecked_shifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Unchecked shift right. Computes `self >> rhs`, assuming that\n`rhs` is less than the number of bits in `self`.\n\n# Safety\n\nThis results in undefined behavior if `rhs` is larger than\nor equal to the number of bits in `self`,\ni.e. when [`checked_shr`] would return `None`.\n\n[`checked_shr`]: usize::checked_shr",
+ "id": 11904,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": true
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {
+ "usize::checked_shr": 11902
+ },
+ "name": "unchecked_shr",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11905": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unbounded_shifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Unbounded shift right. Computes `self >> rhs`, without bounding the value of `rhs`.\n\nIf `rhs` is larger or equal to the number of bits in `self`,\nthe entire value is shifted out, and `0` is returned.\n\n# Examples\n\n```\nassert_eq!(0x10usize.unbounded_shr(4), 0x1);\nassert_eq!(0x10usize.unbounded_shr(129), 0);\n```",
+ "id": 11905,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "unbounded_shr",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11906": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Exact shift right. Computes `self >> rhs` as long as it can be reversed losslessly.\n\nReturns `None` if any non-zero bits would be shifted out or if `rhs` >=\n`usize::BITS`.\nOtherwise, returns `Some(self >> rhs)`.\n\n# Examples\n\n```\n#![feature(exact_bitshifts)]\n\nassert_eq!(0x10usize.exact_shr(4), Some(0x1));\nassert_eq!(0x10usize.exact_shr(5), None);\n```",
+ "id": 11906,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "usize"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "exact_shr",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11907": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 144336, is_soft: false}, feature: \"exact_bitshifts\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Unchecked exact shift right. Computes `self >> rhs`, assuming the operation can be\nlosslessly reversed and `rhs` cannot be larger than\n`usize::BITS`.\n\n# Safety\n\nThis results in undefined behavior when `rhs > self.trailing_zeros() || rhs >=\nusize::BITS`\ni.e. when\n[`usize::exact_shr`]\nwould return `None`.",
+ "id": 11907,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": true
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {
+ "`usize::exact_shr`": 11906
+ },
+ "name": "unchecked_exact_shr",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11908": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Checked exponentiation. Computes `self.pow(exp)`, returning `None` if\noverflow occurred.\n\n# Examples\n\n```\nassert_eq!(2usize.checked_pow(5), Some(32));\nassert_eq!(usize::MAX.checked_pow(2), None);\n```",
+ "id": 11908,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "exp",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "usize"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "checked_pow",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11909": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"strict_overflow_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Strict exponentiation. Computes `self.pow(exp)`, panicking if\noverflow occurred.\n\n# Panics\n\n## Overflow behavior\n\nThis function will always panic on overflow, regardless of whether overflow checks are enabled.\n\n# Examples\n\n```\nassert_eq!(2usize.strict_pow(5), 32);\n```\n\nThe following panics because of overflow:\n\n```should_panic\nlet _ = usize::MAX.strict_pow(2);\n```",
+ "id": 11909,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "exp",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "strict_pow",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1191": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1191,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 1135,
+ "path": "VacantEntry"
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "lifetime": {
+ "outlives": []
+ }
+ },
+ "name": "'a"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "K"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "V"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 1,
+ "path": "Send"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "K"
+ }
+ }
+ },
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 1,
+ "path": "Send"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "V"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": true,
+ "is_unsafe": false,
+ "items": [],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 1,
+ "path": "Send"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": null,
+ "visibility": "default"
+ },
+ "11910": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Saturating integer addition. Computes `self + rhs`, saturating at\nthe numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100usize.saturating_add(1), 101);\nassert_eq!(usize::MAX.saturating_add(127), usize::MAX);\n```",
+ "id": 11910,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "saturating_add",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11911": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Saturating addition with a signed integer. Computes `self + rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1usize.saturating_add_signed(2), 3);\nassert_eq!(1usize.saturating_add_signed(-2), 0);\nassert_eq!((usize::MAX - 2).saturating_add_signed(4), usize::MAX);\n```",
+ "id": 11911,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "saturating_add_signed",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11912": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Saturating integer subtraction. Computes `self - rhs`, saturating\nat the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(100usize.saturating_sub(27), 73);\nassert_eq!(13usize.saturating_sub(127), 0);\n```",
+ "id": 11912,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "saturating_sub",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11913": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Saturating integer subtraction. Computes `self` - `rhs`, saturating at\nthe numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(1usize.saturating_sub_signed(2), 0);\nassert_eq!(1usize.saturating_sub_signed(-2), 3);\nassert_eq!((usize::MAX - 2).saturating_sub_signed(-4), usize::MAX);\n```",
+ "id": 11913,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "saturating_sub_signed",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11914": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 47, patch: 0})}, feature: \"const_saturating_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Saturating integer multiplication. Computes `self * rhs`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(2usize.saturating_mul(10), 20);\nassert_eq!((usize::MAX).saturating_mul(10), usize::MAX);\n```",
+ "id": 11914,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "saturating_mul",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11915": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"saturating_div\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Saturating integer division. Computes `self / rhs`, saturating at the\nnumeric bounds instead of overflowing.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5usize.saturating_div(2), 2);\n\n```",
+ "id": 11915,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "saturating_div",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11916": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Saturating integer exponentiation. Computes `self.pow(exp)`,\nsaturating at the numeric bounds instead of overflowing.\n\n# Examples\n\n```\nassert_eq!(4usize.saturating_pow(3), 64);\nassert_eq!(usize::MAX.saturating_pow(2), usize::MAX);\n```",
+ "id": 11916,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "exp",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "saturating_pow",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11917": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Wrapping (modular) addition with a signed integer. Computes\n`self + rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(1usize.wrapping_add_signed(2), 3);\nassert_eq!(1usize.wrapping_add_signed(-2), usize::MAX);\nassert_eq!((usize::MAX - 2).wrapping_add_signed(4), 1);\n```",
+ "id": 11917,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "wrapping_add_signed",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11918": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Wrapping (modular) subtraction with a signed integer. Computes\n`self - rhs`, wrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(1usize.wrapping_sub_signed(2), usize::MAX);\nassert_eq!(1usize.wrapping_sub_signed(-2), 3);\nassert_eq!((usize::MAX - 2).wrapping_sub_signed(-4), 1);\n```",
+ "id": 11918,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "wrapping_sub_signed",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11919": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Wrapping (modular) division. Computes `self / rhs`.\n\nWrapped division on unsigned types is just normal division. There's\nno way wrapping could ever happen. This function exists so that all\noperations are accounted for in the wrapping operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100usize.wrapping_div(10), 10);\n```",
+ "id": 11919,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "wrapping_div",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1192": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1192,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 1135,
+ "path": "VacantEntry"
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "lifetime": {
+ "outlives": []
+ }
+ },
+ "name": "'a"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "K"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "V"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 5,
+ "path": "Sync"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "K"
+ }
+ }
+ },
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 5,
+ "path": "Sync"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "V"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": true,
+ "is_unsafe": false,
+ "items": [],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 5,
+ "path": "Sync"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": null,
+ "visibility": "default"
+ },
+ "11920": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Wrapping Euclidean division. Computes `self.div_euclid(rhs)`.\n\nWrapped division on unsigned types is just normal division. There's\nno way wrapping could ever happen. This function exists so that all\noperations are accounted for in the wrapping operations. Since, for\nthe positive integers, all common definitions of division are equal,\nthis is exactly equal to `self.wrapping_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100usize.wrapping_div_euclid(10), 10);\n```",
+ "id": 11920,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "wrapping_div_euclid",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11921": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_wrapping_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Wrapping (modular) remainder. Computes `self % rhs`.\n\nWrapped remainder calculation on unsigned types is just the regular\nremainder calculation. There's no way wrapping could ever happen.\nThis function exists so that all operations are accounted for in the\nwrapping operations.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100usize.wrapping_rem(10), 0);\n```",
+ "id": 11921,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "wrapping_rem",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11922": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Wrapping Euclidean modulo. Computes `self.rem_euclid(rhs)`.\n\nWrapped modulo calculation on unsigned types is just the regular\nremainder calculation. There's no way wrapping could ever happen.\nThis function exists so that all operations are accounted for in the\nwrapping operations. Since, for the positive integers, all common\ndefinitions of division are equal, this is exactly equal to\n`self.wrapping_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(100usize.wrapping_rem_euclid(10), 0);\n```",
+ "id": 11922,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "wrapping_rem_euclid",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11923": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Wrapping (modular) negation. Computes `-self`,\nwrapping around at the boundary of the type.\n\nSince unsigned types do not have negative equivalents\nall applications of this function will wrap (except for `-0`).\nFor values smaller than the corresponding signed type's maximum\nthe result is the same as casting the corresponding signed value.\nAny larger values are equivalent to `MAX + 1 - (val - MAX - 1)` where\n`MAX` is the corresponding signed type's maximum.\n\n# Examples\n\n```\nassert_eq!(0_usize.wrapping_neg(), 0);\nassert_eq!(usize::MAX.wrapping_neg(), 1);\nassert_eq!(13_usize.wrapping_neg(), (!13) + 1);\nassert_eq!(42_usize.wrapping_neg(), !(42 - 1));\n```",
+ "id": 11923,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "wrapping_neg",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11924": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Panic-free bitwise shift-left; yields `self << mask(rhs)`,\nwhere `mask` removes any high-order bits of `rhs` that\nwould cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-left; the\nRHS of a wrapping shift-left is restricted to the range\nof the type, rather than the bits shifted out of the LHS\nbeing returned to the other end. The primitive integer\ntypes all implement a [`rotate_left`](Self::rotate_left) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!(1usize.wrapping_shl(7), 128);\nassert_eq!(1usize.wrapping_shl(128), 1);\n```",
+ "id": 11924,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {
+ "Self::rotate_left": 11850
+ },
+ "name": "wrapping_shl",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11925": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 2, patch: 0})}, feature: \"num_wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Panic-free bitwise shift-right; yields `self >> mask(rhs)`,\nwhere `mask` removes any high-order bits of `rhs` that\nwould cause the shift to exceed the bitwidth of the type.\n\nNote that this is *not* the same as a rotate-right; the\nRHS of a wrapping shift-right is restricted to the range\nof the type, rather than the bits shifted out of the LHS\nbeing returned to the other end. The primitive integer\ntypes all implement a [`rotate_right`](Self::rotate_right) function,\nwhich may be what you want instead.\n\n# Examples\n\n```\nassert_eq!(128usize.wrapping_shr(7), 1);\nassert_eq!(128usize.wrapping_shr(128), 128);\n```",
+ "id": 11925,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {
+ "Self::rotate_right": 11851
+ },
+ "name": "wrapping_shr",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11926": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Wrapping (modular) exponentiation. Computes `self.pow(exp)`,\nwrapping around at the boundary of the type.\n\n# Examples\n\n```\nassert_eq!(3usize.wrapping_pow(5), 243);\nassert_eq!(3u8.wrapping_pow(6), 217);\n```",
+ "id": 11926,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "exp",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "wrapping_pow",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11927": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates `self` + `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5usize.overflowing_add(2), (7, false));\nassert_eq!(usize::MAX.overflowing_add(1), (0, true));\n```",
+ "id": 11927,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "usize"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "overflowing_add",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11928": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 66, patch: 0})}, feature: \"mixed_integer_ops\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates `self` + `rhs` with a signed `rhs`.\n\nReturns a tuple of the addition along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1usize.overflowing_add_signed(2), (3, false));\nassert_eq!(1usize.overflowing_add_signed(-2), (usize::MAX, true));\nassert_eq!((usize::MAX - 2).overflowing_add_signed(4), (1, true));\n```",
+ "id": 11928,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "usize"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "overflowing_add_signed",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11929": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates `self` - `rhs`.\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(5usize.overflowing_sub(2), (3, false));\nassert_eq!(0usize.overflowing_sub(1), (usize::MAX, true));\n```",
+ "id": 11929,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "usize"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "overflowing_sub",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1193": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1193,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 1135,
+ "path": "VacantEntry"
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "lifetime": {
+ "outlives": []
+ }
+ },
+ "name": "'a"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "K"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "V"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 313,
+ "path": "Freeze"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "K"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": true,
+ "is_unsafe": false,
+ "items": [],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 313,
+ "path": "Freeze"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": null,
+ "visibility": "default"
+ },
+ "11930": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 90, patch: 0})}, feature: \"mixed_integer_ops_unsigned_sub\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates `self` - `rhs` with a signed `rhs`\n\nReturns a tuple of the subtraction along with a boolean indicating\nwhether an arithmetic overflow would occur. If an overflow would\nhave occurred then the wrapped value is returned.\n\n# Examples\n\n```\nassert_eq!(1usize.overflowing_sub_signed(2), (usize::MAX, true));\nassert_eq!(1usize.overflowing_sub_signed(-2), (3, false));\nassert_eq!((usize::MAX - 2).overflowing_sub_signed(-4), (1, true));\n```",
+ "id": 11930,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "isize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "usize"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "overflowing_sub_signed",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11931": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 60, patch: 0})}, feature: \"int_abs_diff\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Computes the absolute difference between `self` and `other`.\n\n# Examples\n\n```\nassert_eq!(100usize.abs_diff(80), 20usize);\nassert_eq!(100usize.abs_diff(110), 10usize);\n```",
+ "id": 11931,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "other",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "abs_diff",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11932": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_bigint_helpers\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates the \"full multiplication\" `self * rhs + carry`\nwithout the possibility to overflow.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you also need to add a value, then use [`Self::carrying_mul_add`].\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u32` is used.\n\n```\nassert_eq!(5u32.carrying_mul(2, 0), (10, 0));\nassert_eq!(5u32.carrying_mul(2, 10), (20, 0));\nassert_eq!(1_000_000_000u32.carrying_mul(10, 0), (1410065408, 2));\nassert_eq!(1_000_000_000u32.carrying_mul(10, 10), (1410065418, 2));\nassert_eq!(usize::MAX.carrying_mul(usize::MAX, usize::MAX), (0, usize::MAX));\n```\n\nThis is the core operation needed for scalar multiplication when\nimplementing it for wider-than-native types.\n\n```\n#![feature(bigint_helper_methods)]\nfn scalar_mul_eq(little_endian_digits: &mut Vec, multiplicand: u16) {\n let mut carry = 0;\n for d in little_endian_digits.iter_mut() {\n (*d, carry) = d.carrying_mul(multiplicand, carry);\n }\n if carry != 0 {\n little_endian_digits.push(carry);\n }\n}\n\nlet mut v = vec![10, 20];\nscalar_mul_eq(&mut v, 3);\nassert_eq!(v, [30, 60]);\n\nassert_eq!(0x87654321_u64 * 0xFEED, 0x86D3D159E38D);\nlet mut v = vec![0x4321, 0x8765];\nscalar_mul_eq(&mut v, 0xFEED);\nassert_eq!(v, [0xE38D, 0xD159, 0x86D3]);\n```\n\nIf `carry` is zero, this is similar to [`overflowing_mul`](Self::overflowing_mul),\nexcept that it gives the value of the overflow instead of just whether one happened:\n\n```\n#![feature(bigint_helper_methods)]\nlet r = u8::carrying_mul(7, 13, 0);\nassert_eq!((r.0, r.1 != 0), u8::overflowing_mul(7, 13));\nlet r = u8::carrying_mul(13, 42, 0);\nassert_eq!((r.0, r.1 != 0), u8::overflowing_mul(13, 42));\n```\n\nThe value of the first field in the returned tuple matches what you'd get\nby combining the [`wrapping_mul`](Self::wrapping_mul) and\n[`wrapping_add`](Self::wrapping_add) methods:\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(\n 789_u16.carrying_mul(456, 123).0,\n 789_u16.wrapping_mul(456).wrapping_add(123),\n);\n```",
+ "id": 11932,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "usize"
+ },
+ {
+ "primitive": "usize"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {
+ "Self::overflowing_mul": 11933,
+ "Self::wrapping_add": 11862,
+ "Self::wrapping_mul": 11875,
+ "`Self::carrying_mul_add`": 11934
+ },
+ "name": "carrying_mul",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11933": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates the multiplication of `self` and `rhs`.\n\nReturns a tuple of the multiplication along with a boolean\nindicating whether an arithmetic overflow would occur. If an\noverflow would have occurred then the wrapped value is returned.\n\nIf you want the *value* of the overflow, rather than just *whether*\nan overflow occurred, see [`Self::carrying_mul`].\n\n# Examples\n\nPlease note that this example is shared among integer types, which is why `u32` is used.\n\n```\nassert_eq!(5u32.overflowing_mul(2), (10, false));\nassert_eq!(1_000_000_000u32.overflowing_mul(10), (1410065408, true));\n```",
+ "id": 11933,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "usize"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {
+ "`Self::carrying_mul`": 11932
+ },
+ "name": "overflowing_mul",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11934": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"unsigned_bigint_helpers\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates the \"full multiplication\" `self * rhs + carry1 + carry2`.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order.\n\nThis cannot overflow, as the double-width result has exactly enough\nspace for the largest possible result. This is equivalent to how, in\ndecimal, 9 × 9 + 9 + 9 = 81 + 18 = 99 = 9×10⁰ + 9×10¹ = 10² - 1.\n\nPerforms \"long multiplication\" which takes in an extra amount to add, and may return an\nadditional amount of overflow. This allows for chaining together multiple\nmultiplications to create \"big integers\" which represent larger values.\n\nIf you don't need the `add` part, then you can use [`Self::carrying_mul`] instead.\n\n# Examples\n\nPlease note that this example is shared between integer types,\nwhich explains why `u32` is used here.\n\n```\nassert_eq!(5u32.carrying_mul_add(2, 0, 0), (10, 0));\nassert_eq!(5u32.carrying_mul_add(2, 10, 10), (30, 0));\nassert_eq!(1_000_000_000u32.carrying_mul_add(10, 0, 0), (1410065408, 2));\nassert_eq!(1_000_000_000u32.carrying_mul_add(10, 10, 10), (1410065428, 2));\nassert_eq!(usize::MAX.carrying_mul_add(usize::MAX, usize::MAX, usize::MAX), (usize::MAX, usize::MAX));\n```\n\nThis is the core per-digit operation for \"grade school\" O(n²) multiplication.\n\nPlease note that this example is shared between integer types,\nusing `u8` for simplicity of the demonstration.\n\n```\nfn quadratic_mul(a: [u8; N], b: [u8; N]) -> [u8; N] {\n let mut out = [0; N];\n for j in 0..N {\n let mut carry = 0;\n for i in 0..(N - j) {\n (out[j + i], carry) = u8::carrying_mul_add(a[i], b[j], out[j + i], carry);\n }\n }\n out\n}\n\n// -1 * -1 == 1\nassert_eq!(quadratic_mul([0xFF; 3], [0xFF; 3]), [1, 0, 0]);\n\nassert_eq!(u32::wrapping_mul(0x9e3779b9, 0x7f4a7c15), 0xcffc982d);\nassert_eq!(\n quadratic_mul(u32::to_le_bytes(0x9e3779b9), u32::to_le_bytes(0x7f4a7c15)),\n u32::to_le_bytes(0xcffc982d)\n);\n```",
+ "id": 11934,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ],
+ [
+ "carry",
+ {
+ "primitive": "usize"
+ }
+ ],
+ [
+ "add",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "usize"
+ },
+ {
+ "primitive": "usize"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {
+ "`Self::carrying_mul`": 11932
+ },
+ "name": "carrying_mul_add",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11935": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 85532, is_soft: false}, feature: \"bigint_helper_methods\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates the complete double-width product `self * rhs`.\n\nThis returns the low-order (wrapping) bits and the high-order (overflow) bits\nof the result as two separate values, in that order. As such,\n`a.widening_mul(b).0` produces the same result as `a.wrapping_mul(b)`.\n\nIf you also need to add a value and carry to the wide result, then you want\n[`Self::carrying_mul_add`] instead.\n\nIf you also need to add a carry to the wide result, then you want\n[`Self::carrying_mul`] instead.\n\nIf you just want to know *whether* the multiplication overflowed, then you\nwant [`Self::overflowing_mul`] instead.\n\n# Examples\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5_usize.widening_mul(7), (35, 0));\nassert_eq!(usize::MAX.widening_mul(usize::MAX), (1, usize::MAX - 1));\n```\n\nCompared to other `*_mul` methods:\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(usize::widening_mul(1 << 63, 6), (0, 3));\nassert_eq!(usize::overflowing_mul(1 << 63, 6), (0, true));\nassert_eq!(usize::wrapping_mul(1 << 63, 6), 0);\nassert_eq!(usize::checked_mul(1 << 63, 6), None);\n```\n\nPlease note that this example is shared among integer types, which is why `u32` is used.\n\n```\n#![feature(bigint_helper_methods)]\nassert_eq!(5u32.widening_mul(2), (10, 0));\nassert_eq!(1_000_000_000u32.widening_mul(10), (1410065408, 2));\n```",
+ "id": 11935,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "usize"
+ },
+ {
+ "primitive": "usize"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {
+ "`Self::carrying_mul_add`": 11934,
+ "`Self::carrying_mul`": 11932,
+ "`Self::overflowing_mul`": 11933
+ },
+ "name": "widening_mul",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11936": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates the divisor when `self` is divided by `rhs`.\n\nReturns a tuple of the divisor along with a boolean indicating\nwhether an arithmetic overflow would occur. Note that for unsigned\nintegers overflow never occurs, so the second value is always\n`false`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5usize.overflowing_div(2), (2, false));\n```",
+ "id": 11936,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "usize"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "overflowing_div",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11937": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates the quotient of Euclidean division `self.div_euclid(rhs)`.\n\nReturns a tuple of the divisor along with a boolean indicating\nwhether an arithmetic overflow would occur. Note that for unsigned\nintegers overflow never occurs, so the second value is always\n`false`.\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self.overflowing_div(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5usize.overflowing_div_euclid(2), (2, false));\n```",
+ "id": 11937,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "usize"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "overflowing_div_euclid",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11938": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_overflowing_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates the remainder when `self` is divided by `rhs`.\n\nReturns a tuple of the remainder after dividing along with a boolean\nindicating whether an arithmetic overflow would occur. Note that for\nunsigned integers overflow never occurs, so the second value is\nalways `false`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5usize.overflowing_rem(2), (1, false));\n```",
+ "id": 11938,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "usize"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "overflowing_rem",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11939": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates the remainder `self.rem_euclid(rhs)` as if by Euclidean division.\n\nReturns a tuple of the modulo after dividing along with a boolean\nindicating whether an arithmetic overflow would occur. Note that for\nunsigned integers overflow never occurs, so the second value is\nalways `false`.\nSince, for the positive integers, all common\ndefinitions of division are equal, this operation\nis exactly equal to `self.overflowing_rem(rhs)`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(5usize.overflowing_rem_euclid(2), (1, false));\n```",
+ "id": 11939,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "usize"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "overflowing_rem_euclid",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1194": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1194,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 1135,
+ "path": "VacantEntry"
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "lifetime": {
+ "outlives": []
+ }
+ },
+ "name": "'a"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "K"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "V"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 7,
+ "path": "Unpin"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "K"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": true,
+ "is_unsafe": false,
+ "items": [],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 7,
+ "path": "Unpin"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": null,
+ "visibility": "default"
+ },
+ "11940": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Negates self in an overflowing fashion.\n\nReturns `!self + 1` using wrapping operations to return the value\nthat represents the negation of this unsigned value. Note that for\npositive unsigned values overflow always occurs, but negating 0 does\nnot overflow.\n\n# Examples\n\n```\nassert_eq!(0usize.overflowing_neg(), (0, false));\nassert_eq!(2usize.overflowing_neg(), (-2i32 as usize, true));\n```",
+ "id": 11940,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "usize"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "overflowing_neg",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11941": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Shifts self left by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean\nindicating whether the shift value was larger than or equal to the\nnumber of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then\nused to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x1usize.overflowing_shl(4), (0x10, false));\nassert_eq!(0x1usize.overflowing_shl(132), (0x10, true));\nassert_eq!(0x10usize.overflowing_shl(63), (0, false));\n```",
+ "id": 11941,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "usize"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "overflowing_shl",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11942": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_wrapping_math\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"wrapping\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Shifts self right by `rhs` bits.\n\nReturns a tuple of the shifted version of self along with a boolean\nindicating whether the shift value was larger than or equal to the\nnumber of bits. If the shift value is too large, then value is\nmasked (N-1) where N is the number of bits, and this value is then\nused to perform the shift.\n\n# Examples\n\n```\nassert_eq!(0x10usize.overflowing_shr(4), (0x1, false));\nassert_eq!(0x10usize.overflowing_shr(132), (0x1, true));\n```",
+ "id": 11942,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "usize"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "overflowing_shr",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11943": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 34, patch: 0})}, feature: \"no_panic_pow\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\nReturns a tuple of the exponentiation along with a bool indicating\nwhether an overflow happened.\n\n# Examples\n\n```\nassert_eq!(3usize.overflowing_pow(5), (243, false));\nassert_eq!(3u8.overflowing_pow(6), (217, true));\n```",
+ "id": 11943,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "exp",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "tuple": [
+ {
+ "primitive": "usize"
+ },
+ {
+ "primitive": "bool"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "overflowing_pow",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11944": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Raises self to the power of `exp`, using exponentiation by squaring.\n\n# Examples\n\n```\nassert_eq!(2usize.pow(5), 32);\n```",
+ "id": 11944,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "exp",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "pow",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11945": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"isqrt\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the square root of the number, rounded down.\n\n# Examples\n\n```\nassert_eq!(10usize.isqrt(), 3);\n```",
+ "id": 11945,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "isqrt",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11946": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Performs Euclidean division.\n\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self / rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7usize.div_euclid(4), 1); // or any other integer type\n```",
+ "id": 11946,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "div_euclid",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11947": {
+ "attrs": [
+ {
+ "other": "#[doc(alias = \"modulo\", alias = \"mod\")]"
+ },
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"const_euclidean_int_methods\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"euclidean_division\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates the least remainder of `self (mod rhs)`.\n\nSince, for the positive integers, all common\ndefinitions of division are equal, this\nis exactly equal to `self % rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7usize.rem_euclid(4), 3); // or any other integer type\n```",
+ "id": 11947,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "rem_euclid",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11948": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88581, is_soft: false}, feature: \"int_roundings\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards negative infinity.\n\nThis is the same as performing `self / rhs` for all unsigned integers.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\n#![feature(int_roundings)]\nassert_eq!(7_usize.div_floor(4), 1);\n```",
+ "id": 11948,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "div_floor",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11949": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ },
+ {
+ "other": "#[attr = TrackCaller]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates the quotient of `self` and `rhs`, rounding the result towards positive infinity.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n# Examples\n\n```\nassert_eq!(7_usize.div_ceil(4), 2);\n```",
+ "id": 11949,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "div_ceil",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1195": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1195,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 1135,
+ "path": "VacantEntry"
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "lifetime": {
+ "outlives": []
+ }
+ },
+ "name": "'a"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "K"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "V"
+ }
+ ],
+ "where_predicates": []
+ },
+ "is_negative": true,
+ "is_synthetic": true,
+ "is_unsafe": false,
+ "items": [],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 316,
+ "path": "UnwindSafe"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": null,
+ "visibility": "default"
+ },
+ "11950": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates the smallest value greater than or equal to `self` that\nis a multiple of `rhs`.\n\n# Panics\n\nThis function will panic if `rhs` is zero.\n\n## Overflow behavior\n\nOn overflow, this function will panic if overflow checks are enabled (default in debug\nmode) and wrap if overflow checks are disabled (default in release mode).\n\n# Examples\n\n```\nassert_eq!(16_usize.next_multiple_of(8), 16);\nassert_eq!(23_usize.next_multiple_of(8), 24);\n```",
+ "id": 11950,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "next_multiple_of",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11951": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 73, patch: 0})}, feature: \"int_roundings1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates the smallest value greater than or equal to `self` that\nis a multiple of `rhs`. Returns `None` if `rhs` is zero or the\noperation would result in overflow.\n\n# Examples\n\n```\nassert_eq!(16_usize.checked_next_multiple_of(8), Some(16));\nassert_eq!(23_usize.checked_next_multiple_of(8), Some(24));\nassert_eq!(1_usize.checked_next_multiple_of(0), None);\nassert_eq!(usize::MAX.checked_next_multiple_of(2), None);\n```",
+ "id": 11951,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "usize"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "checked_next_multiple_of",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11952": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unsigned_is_multiple_of\",\npromotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"unsigned_is_multiple_of\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": null
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns `true` if `self` is an integer multiple of `rhs`, and false otherwise.\n\nThis function is equivalent to `self % rhs == 0`, except that it will not panic\nfor `rhs == 0`. Instead, `0.is_multiple_of(0) == true`, and for any non-zero `n`,\n`n.is_multiple_of(0) == false`.\n\n# Examples\n\n```\nassert!(6_usize.is_multiple_of(2));\nassert!(!5_usize.is_multiple_of(2));\n\nassert!(0_usize.is_multiple_of(0));\nassert!(!6_usize.is_multiple_of(0));\n```",
+ "id": 11952,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "bool"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "is_multiple_of",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11953": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_is_power_of_two\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": null
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns `true` if and only if `self == 2^k` for some unsigned integer `k`.\n\n# Examples\n\n```\nassert!(16usize.is_power_of_two());\nassert!(!10usize.is_power_of_two());\n```",
+ "id": 11953,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "bool"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "is_power_of_two",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11954": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the smallest power of two greater than or equal to `self`.\n\nWhen return value overflows (i.e., `self > (1 << (N-1))` for type\n`uN`), it panics in debug mode and the return value is wrapped to 0 in\nrelease mode (the only situation in which this method can return 0).\n\n# Examples\n\n```\nassert_eq!(2usize.next_power_of_two(), 2);\nassert_eq!(3usize.next_power_of_two(), 4);\nassert_eq!(0usize.next_power_of_two(), 1);\n```",
+ "id": 11954,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "next_power_of_two",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11955": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 50, patch: 0})}, feature: \"const_int_pow\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the smallest power of two greater than or equal to `self`. If\nthe next power of two is greater than the type's maximum value,\n`None` is returned, otherwise the power of two is wrapped in `Some`.\n\n# Examples\n\n```\nassert_eq!(2usize.checked_next_power_of_two(), Some(2));\nassert_eq!(3usize.checked_next_power_of_two(), Some(4));\nassert_eq!(usize::MAX.checked_next_power_of_two(), None);\n```",
+ "id": 11955,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "usize"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "checked_next_power_of_two",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11956": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"needs decision on wrapping behavior\"),\nissue: 32463, is_soft: false}, feature: \"wrapping_next_power_of_two\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the smallest power of two greater than or equal to `n`. If\nthe next power of two is greater than the type's maximum value,\nthe return value is wrapped to `0`.\n\n# Examples\n\n```\n#![feature(wrapping_next_power_of_two)]\n\nassert_eq!(2usize.wrapping_next_power_of_two(), 2);\nassert_eq!(3usize.wrapping_next_power_of_two(), 4);\nassert_eq!(usize::MAX.wrapping_next_power_of_two(), 0);\n```",
+ "id": 11956,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "wrapping_next_power_of_two",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11957": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the memory representation of this integer as a byte array in\nbig-endian (network) byte order.\n\n\n**Note**: This function returns an array of length 2, 4 or 8 bytes\ndepending on the target pointer size.\n\n# Examples\n\n```\nlet bytes = 0x1234567890123456usize.to_be_bytes();\nassert_eq!(bytes, [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]);\n```",
+ "id": 11957,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "array": {
+ "len": "8",
+ "type": {
+ "primitive": "u8"
+ }
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "to_be_bytes",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11958": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the memory representation of this integer as a byte array in\nlittle-endian byte order.\n\n\n**Note**: This function returns an array of length 2, 4 or 8 bytes\ndepending on the target pointer size.\n\n# Examples\n\n```\nlet bytes = 0x1234567890123456usize.to_le_bytes();\nassert_eq!(bytes, [0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]);\n```",
+ "id": 11958,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "array": {
+ "len": "8",
+ "type": {
+ "primitive": "u8"
+ }
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "to_le_bytes",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11959": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Returns the memory representation of this integer as a byte array in\nnative byte order.\n\nAs the target platform's native endianness is used, portable code\nshould use [`to_be_bytes`] or [`to_le_bytes`], as appropriate,\ninstead.\n\n\n**Note**: This function returns an array of length 2, 4 or 8 bytes\ndepending on the target pointer size.\n\n[`to_be_bytes`]: Self::to_be_bytes\n[`to_le_bytes`]: Self::to_le_bytes\n\n# Examples\n\n```\nlet bytes = 0x1234567890123456usize.to_ne_bytes();\nassert_eq!(\n bytes,\n if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]\n } else {\n [0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]\n }\n);\n```",
+ "id": 11959,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "array": {
+ "len": "8",
+ "type": {
+ "primitive": "u8"
+ }
+ }
+ }
+ }
+ }
+ },
+ "links": {
+ "Self::to_be_bytes": 11957,
+ "Self::to_le_bytes": 11958
+ },
+ "name": "to_ne_bytes",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1196": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1196,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 1135,
+ "path": "VacantEntry"
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "lifetime": {
+ "outlives": []
+ }
+ },
+ "name": "'a"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "K"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "V"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 318,
+ "path": "RefUnwindSafe"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "K"
+ }
+ }
+ },
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 318,
+ "path": "RefUnwindSafe"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "V"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": true,
+ "is_unsafe": false,
+ "items": [],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 318,
+ "path": "RefUnwindSafe"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": null,
+ "visibility": "default"
+ },
+ "11960": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": null
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Creates a native endian integer value from its representation\nas a byte array in big endian.\n\n\n**Note**: This function takes an array of length 2, 4 or 8 bytes\ndepending on the target pointer size.\n\n# Examples\n\n```\nlet value = usize::from_be_bytes([0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]);\nassert_eq!(value, 0x1234567890123456);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_be_usize(input: &mut &[u8]) -> usize {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n usize::from_be_bytes(int_bytes.try_into().unwrap())\n}\n```",
+ "id": 11960,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "bytes",
+ {
+ "array": {
+ "len": "8",
+ "type": {
+ "primitive": "u8"
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "from_be_bytes",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11961": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": null
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Creates a native endian integer value from its representation\nas a byte array in little endian.\n\n\n**Note**: This function takes an array of length 2, 4 or 8 bytes\ndepending on the target pointer size.\n\n# Examples\n\n```\nlet value = usize::from_le_bytes([0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]);\nassert_eq!(value, 0x1234567890123456);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_le_usize(input: &mut &[u8]) -> usize {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n usize::from_le_bytes(int_bytes.try_into().unwrap())\n}\n```",
+ "id": 11961,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "bytes",
+ {
+ "array": {
+ "len": "8",
+ "type": {
+ "primitive": "u8"
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "from_le_bytes",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11962": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"const_int_conversion\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"int_to_from_bytes\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": null
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Creates a native endian integer value from its memory representation\nas a byte array in native endianness.\n\nAs the target platform's native endianness is used, portable code\nlikely wants to use [`from_be_bytes`] or [`from_le_bytes`], as\nappropriate instead.\n\n[`from_be_bytes`]: Self::from_be_bytes\n[`from_le_bytes`]: Self::from_le_bytes\n\n\n**Note**: This function takes an array of length 2, 4 or 8 bytes\ndepending on the target pointer size.\n\n# Examples\n\n```\nlet value = usize::from_ne_bytes(if cfg!(target_endian = \"big\") {\n [0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]\n} else {\n [0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]\n});\nassert_eq!(value, 0x1234567890123456);\n```\n\nWhen starting from a slice rather than an array, fallible conversion APIs can be used:\n\n```\nfn read_ne_usize(input: &mut &[u8]) -> usize {\n let (int_bytes, rest) = input.split_at(size_of::());\n *input = rest;\n usize::from_ne_bytes(int_bytes.try_into().unwrap())\n}\n```",
+ "id": 11962,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "bytes",
+ {
+ "array": {
+ "len": "8",
+ "type": {
+ "primitive": "u8"
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {
+ "Self::from_be_bytes": 11960,
+ "Self::from_le_bytes": 11961
+ },
+ "name": "from_ne_bytes",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11963": {
+ "attrs": [
+ {
+ "other": "#[rustc_diagnostic_item = \"usize_legacy_fn_min_value\"]"
+ },
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": {
+ "note": "replaced by the `MIN` associated constant on this type",
+ "since": "TBD"
+ },
+ "docs": "New code should prefer to use\n[`usize::MIN`] instead.\n\nReturns the smallest value that can be represented by this integer type.",
+ "id": 11963,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {
+ "`usize::MIN`": 11834
+ },
+ "name": "min_value",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11964": {
+ "attrs": [
+ {
+ "other": "#[rustc_diagnostic_item = \"usize_legacy_fn_max_value\"]"
+ },
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 32, patch: 0})}, feature: \"const_max_value\", promotable: true}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": {
+ "note": "replaced by the `MAX` associated constant on this type",
+ "since": "TBD"
+ },
+ "docs": "New code should prefer to use\n[`usize::MAX`] instead.\n\nReturns the largest value that can be represented by this integer type.",
+ "id": 11964,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {
+ "`usize::MAX`": 11835
+ },
+ "name": "max_value",
+ "span": {
+ "begin": [
+ 1269,
+ 5
+ ],
+ "end": [
+ 1290,
+ 6
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11965": {
+ "attrs": [
+ {
+ "other": "#[doc(alias = \"average_floor\")]"
+ },
+ {
+ "other": "#[doc(alias = \"average\")]"
+ },
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"num_midpoint\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"num_midpoint\"}}]"
+ },
+ {
+ "must_use": {
+ "reason": "this returns the result of the operation, without modifying the original"
+ }
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Calculates the midpoint (average) between `self` and `rhs`.\n\n`midpoint(a, b)` is `(a + b) / 2` as if it were performed in a\nsufficiently-large unsigned integral type. This implies that the result is\nalways rounded towards zero and that no overflow will ever occur.\n\n# Examples\n\n```\nassert_eq!(0usize.midpoint(4), 2);\nassert_eq!(1usize.midpoint(4), 2);\n```",
+ "id": 11965,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "rhs",
+ {
+ "primitive": "usize"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "usize"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "midpoint",
+ "span": {
+ "begin": [
+ 1291,
+ 5
+ ],
+ "end": [
+ 1291,
+ 45
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11966": {
+ "attrs": [],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": null,
+ "id": 11966,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "usize"
+ },
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 11834,
+ 11835,
+ 11836,
+ 11837,
+ 11838,
+ 11840,
+ 11841,
+ 11842,
+ 11843,
+ 11844,
+ 11845,
+ 11846,
+ 11847,
+ 11848,
+ 11849,
+ 11850,
+ 11851,
+ 11852,
+ 11853,
+ 11854,
+ 11855,
+ 11856,
+ 11857,
+ 11858,
+ 11859,
+ 11860,
+ 11861,
+ 11863,
+ 11864,
+ 11865,
+ 11866,
+ 11867,
+ 11869,
+ 11870,
+ 11871,
+ 11872,
+ 11873,
+ 11874,
+ 11876,
+ 11877,
+ 11878,
+ 11879,
+ 11880,
+ 11881,
+ 11882,
+ 11883,
+ 11884,
+ 11885,
+ 11886,
+ 11887,
+ 11888,
+ 11889,
+ 11839,
+ 11890,
+ 11891,
+ 11892,
+ 11893,
+ 11894,
+ 11895,
+ 11896,
+ 11897,
+ 11898,
+ 11899,
+ 11900,
+ 11901,
+ 11902,
+ 11903,
+ 11904,
+ 11905,
+ 11906,
+ 11907,
+ 11908,
+ 11909,
+ 11910,
+ 11911,
+ 11912,
+ 11913,
+ 11914,
+ 11915,
+ 11916,
+ 11862,
+ 11917,
+ 11868,
+ 11918,
+ 11875,
+ 11919,
+ 11920,
+ 11921,
+ 11922,
+ 11923,
+ 11924,
+ 11925,
+ 11926,
+ 11927,
+ 11780,
+ 11928,
+ 11929,
+ 11784,
+ 11930,
+ 11931,
+ 11933,
+ 11935,
+ 11932,
+ 11934,
+ 11936,
+ 11937,
+ 11938,
+ 11939,
+ 11940,
+ 11941,
+ 11942,
+ 11943,
+ 11944,
+ 11945,
+ 11946,
+ 11947,
+ 11948,
+ 11949,
+ 11950,
+ 11951,
+ 11952,
+ 11953,
+ 11954,
+ 11955,
+ 11956,
+ 11957,
+ 11958,
+ 11959,
+ 11960,
+ 11961,
+ 11962,
+ 11963,
+ 11964,
+ 11965
+ ],
+ "provided_trait_methods": [],
+ "trait": null
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 1268,
+ 1
+ ],
+ "end": [
+ 1268,
+ 11
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "11967": {
+ "attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 82, patch: 0})}, feature: \"const_int_from_str\", promotable: false}}]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Parses an integer from a string slice with digits in a given base.\n\nThe string is expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# See also\nIf the string to be parsed is in base 10 (decimal),\n[`from_str`] or [`str::parse`] can also be used.\n\n[`from_str`]: #method.from_str\n[`str::parse`]: primitive.str.html#method.parse\n\n# Examples\n\n```\nassert_eq!(usize::from_str_radix(\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\nassert!(usize::from_str_radix(\"1 \", 10).is_err());\n```",
+ "id": 11967,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "src",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "primitive": "str"
+ }
+ }
+ }
+ ],
+ [
+ "radix",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "usize"
+ }
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 4786,
+ "path": "ParseIntError"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 57,
+ "path": "Result"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "from_str_radix",
+ "span": {
+ "begin": [
+ 1667,
+ 1
+ ],
+ "end": [
+ 1667,
+ 58
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11968": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Parses an integer from an ASCII-byte slice with decimal digits.\n\nThe characters are expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(usize::from_ascii(b\"+10\"), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(usize::from_ascii(b\"1 \").is_err());\n```",
+ "id": 11968,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "src",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "slice": {
+ "primitive": "u8"
+ }
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "usize"
+ }
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 4786,
+ "path": "ParseIntError"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 57,
+ "path": "Result"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "from_ascii",
+ "span": {
+ "begin": [
+ 1667,
+ 1
+ ],
+ "end": [
+ 1667,
+ 58
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "11969": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 134821, is_soft: false}, feature: \"int_from_ascii\"}}]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Parses an integer from an ASCII-byte slice with digits in a given base.\n\nThe characters are expected to be an optional\n `+` \nsign followed by only digits. Leading and trailing non-digit characters (including\nwhitespace) represent an error. Underscores (which are accepted in Rust literals)\nalso represent an error.\n\nDigits are a subset of these characters, depending on `radix`:\n* `0-9`\n* `a-z`\n* `A-Z`\n\n# Panics\n\nThis function panics if `radix` is not in the range from 2 to 36.\n\n# Examples\n\n```\n#![feature(int_from_ascii)]\n\nassert_eq!(usize::from_ascii_radix(b\"A\", 16), Ok(10));\n```\nTrailing space returns error:\n```\n# #![feature(int_from_ascii)]\n#\nassert!(usize::from_ascii_radix(b\"1 \", 10).is_err());\n```",
+ "id": 11969,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": true,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "src",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "slice": {
+ "primitive": "u8"
+ }
+ }
+ }
+ }
+ ],
+ [
+ "radix",
+ {
+ "primitive": "u32"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "usize"
+ }
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 4786,
+ "path": "ParseIntError"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 57,
+ "path": "Result"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "from_ascii_radix",
+ "span": {
+ "begin": [
+ 1667,
+ 1
+ ],
+ "end": [
+ 1667,
+ 58
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1197": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1197,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 1135,
+ "path": "VacantEntry"
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "maybe",
+ "trait": {
+ "args": null,
+ "id": 3,
+ "path": "Sized"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "T"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 319
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "T"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 321,
+ "path": "Borrow"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 212,
+ 1
+ ],
+ "end": [
+ 212,
+ 38
+ ],
+ "filename": "checkouts/rust/library/core/src/borrow.rs"
+ },
+ "visibility": "default"
+ },
+ "11970": {
+ "attrs": [],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": null,
+ "id": 11970,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "usize"
+ },
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 11967,
+ 11968,
+ 11969
+ ],
+ "provided_trait_methods": [],
+ "trait": null
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 1667,
+ 1
+ ],
+ "end": [
+ 1667,
+ 58
+ ],
+ "filename": "checkouts/rust/library/core/src/num/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "11971": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 138215, is_soft: false}, feature: \"int_format_into\"}}]"
+ }
+ ],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": "Allows users to write an integer (in signed decimal format) into a variable `buf` of\ntype [`NumBuffer`] that is passed by the caller by mutable reference.\n\n# Examples\n\n```\n#![feature(int_format_into)]\nuse core::fmt::NumBuffer;\n\nlet n = 0usize;\nlet mut buf = NumBuffer::new();\nassert_eq!(n.format_into(&mut buf), \"0\");\n\nlet n1 = 32usize;\nassert_eq!(n1.format_into(&mut buf), \"32\");\n\nlet n2 = usize :: MAX;\nassert_eq!(n2.format_into(&mut buf), usize :: MAX.to_string());\n```",
+ "id": 11971,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "buf",
+ {
+ "borrowed_ref": {
+ "is_mutable": true,
+ "lifetime": null,
+ "type": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "usize"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 10387,
+ "path": "NumBuffer"
+ }
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "primitive": "str"
+ }
+ }
+ }
+ }
+ }
+ },
+ "links": {
+ "`NumBuffer`": 10387
+ },
+ "name": "format_into",
+ "span": {
+ "begin": [
+ 599,
+ 5
+ ],
+ "end": [
+ 599,
+ 95
+ ],
+ "filename": "checkouts/rust/library/core/src/fmt/num.rs"
+ },
+ "visibility": "public"
+ },
+ "11972": {
+ "attrs": [],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": null,
+ "id": 11972,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "primitive": "usize"
+ },
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 11971
+ ],
+ "provided_trait_methods": [],
+ "trait": null
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 599,
+ 5
+ ],
+ "end": [
+ 599,
+ 95
+ ],
+ "filename": "checkouts/rust/library/core/src/fmt/num.rs"
+ },
+ "visibility": "default"
+ },
+ "11973": {
+ "attrs": [
+ {
+ "other": "#[rustc_doc_primitive = \"reference\"]"
+ },
+ {
+ "other": "#[doc(alias = \"&\")]"
+ },
+ {
+ "other": "#[doc(alias = \"&mut\")]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": "References, `&T` and `&mut T`.\n\nA reference represents a borrow of some owned value. You can get one by using the `&` or `&mut`\noperators on a value, or by using a [`ref`](../std/keyword.ref.html) or\n[ref](../std/keyword.ref.html) [mut](../std/keyword.mut.html) pattern.\n\nFor those familiar with pointers, a reference is just a pointer that is assumed to be\naligned, not null, and pointing to memory containing a valid value of `T` - for example,\n&[bool] can only point to an allocation containing the integer values `1`\n([`true`](../std/keyword.true.html)) or `0` ([`false`](../std/keyword.false.html)), but\ncreating a &[bool] that points to an allocation containing\nthe value `3` causes undefined behavior.\nIn fact, [Option]\\<&T> has the same memory representation as a\nnullable but aligned pointer, and can be passed across FFI boundaries as such.\n\nIn most cases, references can be used much like the original value. Field access, method\ncalling, and indexing work the same (save for mutability rules, of course). In addition, the\ncomparison operators transparently defer to the referent's implementation, allowing references\nto be compared the same as owned values.\n\nReferences have a lifetime attached to them, which represents the scope for which the borrow is\nvalid. A lifetime is said to \"outlive\" another one if its representative scope is as long or\nlonger than the other. The `'static` lifetime is the longest lifetime, which represents the\ntotal life of the program. For example, string literals have a `'static` lifetime because the\ntext data is embedded into the binary of the program, rather than in an allocation that needs\nto be dynamically managed.\n\n`&mut T` references can be freely coerced into `&T` references with the same referent type, and\nreferences with longer lifetimes can be freely coerced into references with shorter ones.\n\nReference equality by address, instead of comparing the values pointed to, is accomplished via\nimplicit reference-pointer coercion and raw pointer equality via [`ptr::eq`], while\n[`PartialEq`] compares values.\n\n```\nuse std::ptr;\n\nlet five = 5;\nlet other_five = 5;\nlet five_ref = &five;\nlet same_five_ref = &five;\nlet other_five_ref = &other_five;\n\nassert!(five_ref == same_five_ref);\nassert!(five_ref == other_five_ref);\n\nassert!(ptr::eq(five_ref, same_five_ref));\nassert!(!ptr::eq(five_ref, other_five_ref));\n```\n\nFor more information on how to use references, see [the book's section on \"References and\nBorrowing\"][book-refs].\n\n[book-refs]: ../book/ch04-02-references-and-borrowing.html\n\n# Trait implementations\n\nThe following traits are implemented for all `&T`, regardless of the type of its referent:\n\n* [`Copy`]\n* [`Clone`] \\(Note that this will not defer to `T`'s `Clone` implementation if it exists!)\n* [`Deref`]\n* [`Borrow`]\n* [`fmt::Pointer`]\n\n[`Deref`]: ops::Deref\n[`Borrow`]: borrow::Borrow\n\n`&mut T` references get all of the above except `Copy` and `Clone` (to prevent creating\nmultiple simultaneous mutable borrows), plus the following, regardless of the type of its\nreferent:\n\n* [`DerefMut`]\n* [`BorrowMut`]\n\n[`DerefMut`]: ops::DerefMut\n[`BorrowMut`]: borrow::BorrowMut\n[bool]: prim@bool\n\nThe following traits are implemented on `&T` references if the underlying `T` also implements\nthat trait:\n\n* All the traits in [`std::fmt`] except [`fmt::Pointer`] (which is implemented regardless of the type of its referent) and [`fmt::Write`]\n* [`PartialOrd`]\n* [`Ord`]\n* [`PartialEq`]\n* [`Eq`]\n* [`AsRef`]\n* [`Fn`] \\(in addition, `&T` references get [`FnMut`] and [`FnOnce`] if `T: Fn`)\n* [`Hash`]\n* [`ToSocketAddrs`]\n* [`Sync`]\n\n[`std::fmt`]: fmt\n[`Hash`]: hash::Hash\n[`ToSocketAddrs`]: ../std/net/trait.ToSocketAddrs.html\n\n`&mut T` references get all of the above except `ToSocketAddrs`, plus the following, if `T`\nimplements that trait:\n\n* [`AsMut`]\n* [`FnMut`] \\(in addition, `&mut T` references get [`FnOnce`] if `T: FnMut`)\n* [`fmt::Write`]\n* [`Iterator`]\n* [`DoubleEndedIterator`]\n* [`ExactSizeIterator`]\n* [`FusedIterator`]\n* [`TrustedLen`]\n* [`Send`]\n* [`io::Write`]\n* [`Read`]\n* [`Seek`]\n* [`BufRead`]\n\n[`FusedIterator`]: iter::FusedIterator\n[`TrustedLen`]: iter::TrustedLen\n[`Seek`]: ../std/io/trait.Seek.html\n[`BufRead`]: ../std/io/trait.BufRead.html\n[`Read`]: ../std/io/trait.Read.html\n[`io::Write`]: ../std/io/trait.Write.html\n\nIn addition, `&T` references implement [`Send`] if and only if `T` implements [`Sync`].\n\nNote that due to method call deref coercion, simply calling a trait method will act like they\nwork on references as well as they do on owned values! The implementations described here are\nmeant for generic contexts, where the final type `T` is a type parameter or otherwise not\nlocally known.\n\n# Safety\n\nFor all types, `T: ?Sized`, and for all `t: &T` or `t: &mut T`, when such values cross an API\nboundary, the following invariants must generally be upheld:\n\n* `t` is non-null\n* `t` is aligned to `align_of_val(t)`\n* if `size_of_val(t) > 0`, then `t` is dereferenceable for `size_of_val(t)` many bytes\n\nIf `t` points at address `a`, being \"dereferenceable\" for N bytes means that the memory range\n`[a, a + N)` is all contained within a single [allocation].\n\nFor instance, this means that unsafe code in a safe function may assume these invariants are\nensured of arguments passed by the caller, and it may assume that these invariants are ensured\nof return values from any safe functions it calls.\n\nFor the other direction, things are more complicated: when unsafe code passes arguments\nto safe functions or returns values from safe functions, they generally must *at least*\nnot violate these invariants. The full requirements are stronger, as the reference generally\nmust point to data that is safe to use at type `T`.\n\nIt is not decided yet whether unsafe code may violate these invariants temporarily on internal\ndata. As a consequence, unsafe code which violates these invariants temporarily on internal data\nmay be unsound or become unsound in future versions of Rust depending on how this question is\ndecided.\n\n[allocation]: ptr#allocation",
+ "id": 11973,
+ "inner": {
+ "primitive": {
+ "impls": [
+ 815,
+ 1308,
+ 1974,
+ 6597
+ ],
+ "name": "reference"
+ }
+ },
+ "links": {
+ "Option": 51,
+ "`AsMut`": 33,
+ "`AsRef`": 35,
+ "`Clone`": 97,
+ "`Copy`": 101,
+ "`DoubleEndedIterator`": 41,
+ "`Eq`": 111,
+ "`ExactSizeIterator`": 43,
+ "`FnMut`": 13,
+ "`FnOnce`": 15,
+ "`Fn`": 11,
+ "`Iterator`": 49,
+ "`Ord`": 117,
+ "`PartialEq`": 121,
+ "`PartialOrd`": 125,
+ "`Send`": 1,
+ "`Sync`": 5,
+ "`fmt::Pointer`": 9406,
+ "`fmt::Write`": 2021,
+ "`ptr::eq`": 9405,
+ "borrow::Borrow": 321,
+ "borrow::BorrowMut": 324,
+ "fmt": 6995,
+ "hash::Hash": 539,
+ "iter::FusedIterator": 878,
+ "iter::TrustedLen": 9407,
+ "ops::Deref": 1967,
+ "ops::DerefMut": 1987,
+ "prim@bool": 9404,
+ "ptr#allocation": 9366
+ },
+ "name": "reference",
+ "span": {
+ "begin": [
+ 1660,
+ 1
+ ],
+ "end": [
+ 1660,
+ 16
+ ],
+ "filename": "std/src/../../core/src/primitive_docs.rs"
+ },
+ "visibility": "public"
+ },
+ "11974": {
+ "attrs": [
+ {
+ "other": "#[rustc_doc_primitive = \"fn\"]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": "Function pointers, like `fn(usize) -> bool`.\n\n*See also the traits [`Fn`], [`FnMut`], and [`FnOnce`].*\n\nFunction pointers are pointers that point to *code*, not data. They can be called\njust like functions. Like references, function pointers are, among other things, assumed to\nnot be null, so if you want to pass a function pointer over FFI and be able to accommodate null\npointers, make your type [`Option`](core::option#options-and-pointers-nullable-pointers)\nwith your required signature.\n\nNote that FFI requires additional care to ensure that the ABI for both sides of the call match.\nThe exact requirements are not currently documented.\n\n### Safety\n\nPlain function pointers are obtained by casting either plain functions, or closures that don't\ncapture an environment:\n\n```\nfn add_one(x: usize) -> usize {\n x + 1\n}\n\nlet ptr: fn(usize) -> usize = add_one;\nassert_eq!(ptr(5), 6);\n\nlet clos: fn(usize) -> usize = |x| x + 5;\nassert_eq!(clos(5), 10);\n```\n\nIn addition to varying based on their signature, function pointers come in two flavors: safe\nand unsafe. Plain `fn()` function pointers can only point to safe functions,\nwhile `unsafe fn()` function pointers can point to safe or unsafe functions.\n\n```\nfn add_one(x: usize) -> usize {\n x + 1\n}\n\nunsafe fn add_one_unsafely(x: usize) -> usize {\n x + 1\n}\n\nlet safe_ptr: fn(usize) -> usize = add_one;\n\n//ERROR: mismatched types: expected normal fn, found unsafe fn\n//let bad_ptr: fn(usize) -> usize = add_one_unsafely;\n\nlet unsafe_ptr: unsafe fn(usize) -> usize = add_one_unsafely;\nlet really_safe_ptr: unsafe fn(usize) -> usize = add_one;\n```\n\n### ABI\n\nOn top of that, function pointers can vary based on what ABI they use. This\nis achieved by adding the `extern` keyword before the type, followed by the\nABI in question. The default ABI is \"Rust\", i.e., `fn()` is the exact same\ntype as `extern \"Rust\" fn()`. A pointer to a function with C ABI would have\ntype `extern \"C\" fn()`.\n\n`extern \"ABI\" { ... }` blocks declare functions with ABI \"ABI\". The default\nhere is \"C\", i.e., functions declared in an `extern {...}` block have \"C\"\nABI.\n\nFor more information and a list of supported ABIs, see [the nomicon's\nsection on foreign calling conventions][nomicon-abi].\n\n[nomicon-abi]: ../nomicon/ffi.html#foreign-calling-conventions\n\n### Variadic functions\n\nExtern function declarations with the \"C\" or \"cdecl\" ABIs can also be *variadic*, allowing them\nto be called with a variable number of arguments. Normal Rust functions, even those with an\n`extern \"ABI\"`, cannot be variadic. For more information, see [the nomicon's section on\nvariadic functions][nomicon-variadic].\n\n[nomicon-variadic]: ../nomicon/ffi.html#variadic-functions\n\n### Creating function pointers\n\nWhen `bar` is the name of a function, then the expression `bar` is *not* a\nfunction pointer. Rather, it denotes a value of an unnameable type that\nuniquely identifies the function `bar`. The value is zero-sized because the\ntype already identifies the function. This has the advantage that \"calling\"\nthe value (it implements the `Fn*` traits) does not require dynamic\ndispatch.\n\nThis zero-sized type *coerces* to a regular function pointer. For example:\n\n```rust\nfn bar(x: i32) {}\n\nlet not_bar_ptr = bar; // `not_bar_ptr` is zero-sized, uniquely identifying `bar`\nassert_eq!(size_of_val(¬_bar_ptr), 0);\n\nlet bar_ptr: fn(i32) = not_bar_ptr; // force coercion to function pointer\nassert_eq!(size_of_val(&bar_ptr), size_of::());\n\nlet footgun = &bar; // this is a shared reference to the zero-sized type identifying `bar`\n```\n\nThe last line shows that `&bar` is not a function pointer either. Rather, it\nis a reference to the function-specific ZST. `&bar` is basically never what you\nwant when `bar` is a function.\n\n### Casting to and from integers\n\nYou can cast function pointers directly to integers:\n\n```rust\nlet fnptr: fn(i32) -> i32 = |x| x+2;\nlet fnptr_addr = fnptr as usize;\n```\n\nHowever, a direct cast back is not possible. You need to use `transmute`:\n\n```rust\n# #[cfg(not(miri))] { // FIXME: use strict provenance APIs once they are stable, then remove this `cfg`\n# let fnptr: fn(i32) -> i32 = |x| x+2;\n# let fnptr_addr = fnptr as usize;\nlet fnptr = fnptr_addr as *const ();\nlet fnptr: fn(i32) -> i32 = unsafe { std::mem::transmute(fnptr) };\nassert_eq!(fnptr(40), 42);\n# }\n```\n\nCrucially, we `as`-cast to a raw pointer before `transmute`ing to a function pointer.\nThis avoids an integer-to-pointer `transmute`, which can be problematic.\nTransmuting between raw pointers and function pointers (i.e., two pointer types) is fine.\n\nNote that all of this is not portable to platforms where function pointers and data pointers\nhave different sizes.\n\n### ABI compatibility\n\nGenerally, when a function is declared with one signature and called via a function pointer with\na different signature, the two signatures must be *ABI-compatible* or else calling the function\nvia that function pointer is Undefined Behavior. ABI compatibility is a lot stricter than merely\nhaving the same memory layout; for example, even if `i32` and `f32` have the same size and\nalignment, they might be passed in different registers and hence not be ABI-compatible.\n\nABI compatibility as a concern only arises in code that alters the type of function pointers,\nand code that imports functions via `extern` blocks. Altering the type of function pointers is\nwildly unsafe (as in, a lot more unsafe than even [`transmute_copy`][mem::transmute_copy]), and\nshould only occur in the most exceptional circumstances. Most Rust code just imports functions\nvia `use`. So, most likely you do not have to worry about ABI compatibility.\n\nBut assuming such circumstances, what are the rules? For this section, we are only considering\nthe ABI of direct Rust-to-Rust calls (with both definition and callsite visible to the\nRust compiler), not linking in general -- once functions are imported via `extern` blocks, there\nare more things to consider that we do not go into here. Note that this also applies to\npassing/calling functions across language boundaries via function pointers.\n\n**Nothing in this section should be taken as a guarantee for non-Rust-to-Rust calls, even with\ntypes from `core::ffi` or `libc`**.\n\nFor two signatures to be considered *ABI-compatible*, they must use a compatible ABI string,\nmust take the same number of arguments, and the individual argument types and the return types\nmust be ABI-compatible. The ABI string is declared via `extern \"ABI\" fn(...) -> ...`; note that\n`fn name(...) -> ...` implicitly uses the `\"Rust\"` ABI string and `extern fn name(...) -> ...`\nimplicitly uses the `\"C\"` ABI string.\n\nThe ABI strings are guaranteed to be compatible if they are the same, or if the caller ABI\nstring is `$X-unwind` and the callee ABI string is `$X`, where `$X` is one of the following:\n\"C\", \"aapcs\", \"fastcall\", \"stdcall\", \"system\", \"sysv64\", \"thiscall\", \"vectorcall\", \"win64\".\n\nThe following types are guaranteed to be ABI-compatible:\n\n- `*const T`, `*mut T`, `&T`, `&mut T`, `Box` (specifically, only `Box`), and\n `NonNull` are all ABI-compatible with each other for all `T`. They are also ABI-compatible\n with each other for _different_ `T` if they have the same metadata type (`::Metadata`).\n- `usize` is ABI-compatible with the `uN` integer type of the same size, and likewise `isize` is\n ABI-compatible with the `iN` integer type of the same size.\n- `char` is ABI-compatible with `u32`.\n- Any two `fn` (function pointer) types are ABI-compatible with each other if they have the same\n ABI string or the ABI string only differs in a trailing `-unwind`, independent of the rest of\n their signature. (This means you can pass `fn()` to a function expecting `fn(i32)`, and the\n call will be valid ABI-wise. The callee receives the result of transmuting the function pointer\n from `fn()` to `fn(i32)`; that transmutation is itself a well-defined operation, it's just\n almost certainly UB to later call that function pointer.)\n- Any two types with size 0 and alignment 1 are ABI-compatible.\n- A `repr(transparent)` type `T` is ABI-compatible with its unique non-trivial field, i.e., the\n unique field that doesn't have size 0 and alignment 1 (if there is such a field).\n- `i32` is ABI-compatible with `NonZero`, and similar for all other integer types.\n- If `T` is guaranteed to be subject to the [null pointer\n optimization](option/index.html#representation), and `E` is an enum satisfying the following\n requirements, then `T` and `E` are ABI-compatible. Such an enum `E` is called \"option-like\".\n - The enum `E` uses the [`Rust` representation], and is not modified by the `align` or\n `packed` representation modifiers.\n - The enum `E` has exactly two variants.\n - One variant has exactly one field, of type `T`.\n - All fields of the other variant are zero-sized with 1-byte alignment.\n\nFurthermore, ABI compatibility satisfies the following general properties:\n\n- Every type is ABI-compatible with itself.\n- If `T1` and `T2` are ABI-compatible and `T2` and `T3` are ABI-compatible, then so are `T1` and\n `T3` (i.e., ABI-compatibility is transitive).\n- If `T1` and `T2` are ABI-compatible, then so are `T2` and `T1` (i.e., ABI-compatibility is\n symmetric).\n\nMore signatures can be ABI-compatible on specific targets, but that should not be relied upon\nsince it is not portable and not a stable guarantee.\n\nNoteworthy cases of types *not* being ABI-compatible in general are:\n* `bool` vs `u8`, `i32` vs `u32`, `char` vs `i32`: on some targets, the calling conventions for\n these types differ in terms of what they guarantee for the remaining bits in the register that\n are not used by the value.\n* `i32` vs `f32` are not compatible either, as has already been mentioned above.\n* `struct Foo(u32)` and `u32` are not compatible (without `repr(transparent)`) since structs are\n aggregate types and often passed in a different way than primitives like `i32`.\n\nNote that these rules describe when two completely known types are ABI-compatible. When\nconsidering ABI compatibility of a type declared in another crate (including the standard\nlibrary), consider that any type that has a private field or the `#[non_exhaustive]` attribute\nmay change its layout as a non-breaking update unless documented otherwise -- so for instance,\neven if such a type is a 1-ZST or `repr(transparent)` right now, this might change with any\nlibrary version bump.\n\nIf the declared signature and the signature of the function pointer are ABI-compatible, then the\nfunction call behaves as if every argument was [`transmute`d][mem::transmute] from the\ntype in the function pointer to the type at the function declaration, and the return value is\n[`transmute`d][mem::transmute] from the type in the declaration to the type in the\npointer. All the usual caveats and concerns around transmutation apply; for instance, if the\nfunction expects a `NonZero` and the function pointer uses the ABI-compatible type\n`Option>`, and the value used for the argument is `None`, then this call is Undefined\nBehavior since transmuting `None::>` to `NonZero` violates the non-zero\nrequirement.\n\n### Trait implementations\n\nIn this documentation the shorthand `fn(T₁, T₂, …, Tₙ)` is used to represent non-variadic\nfunction pointers of varying length. Note that this is a convenience notation to avoid\nrepetitive documentation, not valid Rust syntax.\n\nThe following traits are implemented for function pointers with any number of arguments and\nany ABI.\n\n* [`PartialEq`]\n* [`Eq`]\n* [`PartialOrd`]\n* [`Ord`]\n* [`Hash`]\n* [`Pointer`]\n* [`Debug`]\n* [`Clone`]\n* [`Copy`]\n* [`Send`]\n* [`Sync`]\n* [`Unpin`]\n* [`UnwindSafe`]\n* [`RefUnwindSafe`]\n\nNote that while this type implements `PartialEq`, comparing function pointers is unreliable:\npointers to the same function can compare inequal (because functions are duplicated in multiple\ncodegen units), and pointers to *different* functions can compare equal (since identical\nfunctions can be deduplicated within a codegen unit).\n\n[`Hash`]: hash::Hash\n[`Pointer`]: fmt::Pointer\n[`UnwindSafe`]: panic::UnwindSafe\n[`RefUnwindSafe`]: panic::RefUnwindSafe\n[`Rust` representation]: \n\nIn addition, all *safe* function pointers implement [`Fn`], [`FnMut`], and [`FnOnce`], because\nthese traits are specially known to the compiler.",
+ "id": 11974,
+ "inner": {
+ "primitive": {
+ "impls": [
+ 11975,
+ 11976,
+ 11977,
+ 11978,
+ 11979,
+ 11980,
+ 11981,
+ 11982,
+ 11983,
+ 11985,
+ 11987,
+ 11989,
+ 11991,
+ 11992,
+ 11993,
+ 11994,
+ 11995,
+ 11996,
+ 11999,
+ 12001,
+ 12003,
+ 12012,
+ 12013
+ ],
+ "name": "fn"
+ }
+ },
+ "links": {
+ "`Clone`": 97,
+ "`Copy`": 101,
+ "`Debug`": 105,
+ "`Eq`": 111,
+ "`FnMut`": 13,
+ "`FnOnce`": 15,
+ "`Fn`": 11,
+ "`Ord`": 117,
+ "`PartialEq`": 121,
+ "`PartialOrd`": 125,
+ "`Send`": 1,
+ "`Sync`": 5,
+ "`Unpin`": 7,
+ "core::option#options-and-pointers-nullable-pointers": 193,
+ "fmt::Pointer": 9406,
+ "hash::Hash": 539,
+ "mem::transmute": 9410,
+ "mem::transmute_copy": 9409,
+ "panic::RefUnwindSafe": 318,
+ "panic::UnwindSafe": 316
+ },
+ "name": "fn",
+ "span": {
+ "begin": [
+ 1932,
+ 1
+ ],
+ "end": [
+ 1932,
+ 15
+ ],
+ "filename": "std/src/../../core/src/primitive_docs.rs"
+ },
+ "visibility": "public"
+ },
+ "11975": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 11975,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "function_pointer": {
+ "generic_params": [],
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "_",
+ {
+ "generic": "T"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "generic": "Ret"
+ }
+ }
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "Ret"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ }
+ ],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": true,
+ "is_unsafe": false,
+ "items": [],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 1,
+ "path": "Send"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": null,
+ "visibility": "default"
+ },
+ "11976": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 11976,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "function_pointer": {
+ "generic_params": [],
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "_",
+ {
+ "generic": "T"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "generic": "Ret"
+ }
+ }
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "Ret"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ }
+ ],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": true,
+ "is_unsafe": false,
+ "items": [],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 5,
+ "path": "Sync"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": null,
+ "visibility": "default"
+ },
+ "11977": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 11977,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "function_pointer": {
+ "generic_params": [],
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "_",
+ {
+ "generic": "T"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "generic": "Ret"
+ }
+ }
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "Ret"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ }
+ ],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": true,
+ "is_unsafe": false,
+ "items": [],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 313,
+ "path": "Freeze"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": null,
+ "visibility": "default"
+ },
+ "11978": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 11978,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "function_pointer": {
+ "generic_params": [],
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "_",
+ {
+ "generic": "T"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "generic": "Ret"
+ }
+ }
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "Ret"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ }
+ ],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": true,
+ "is_unsafe": false,
+ "items": [],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 7,
+ "path": "Unpin"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": null,
+ "visibility": "default"
+ },
+ "11979": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 11979,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "function_pointer": {
+ "generic_params": [],
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "_",
+ {
+ "generic": "T"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "generic": "Ret"
+ }
+ }
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "Ret"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ }
+ ],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": true,
+ "is_unsafe": false,
+ "items": [],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 316,
+ "path": "UnwindSafe"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": null,
+ "visibility": "default"
+ },
+ "1198": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1198,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 1135,
+ "path": "VacantEntry"
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "maybe",
+ "trait": {
+ "args": null,
+ "id": 3,
+ "path": "Sized"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "T"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 322
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "T"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 324,
+ "path": "BorrowMut"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 221,
+ 1
+ ],
+ "end": [
+ 221,
+ 41
+ ],
+ "filename": "checkouts/rust/library/core/src/borrow.rs"
+ },
+ "visibility": "default"
+ },
+ "11980": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 11980,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "function_pointer": {
+ "generic_params": [],
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "_",
+ {
+ "generic": "T"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "generic": "Ret"
+ }
+ }
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "Ret"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ }
+ ],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": true,
+ "is_unsafe": false,
+ "items": [],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 318,
+ "path": "RefUnwindSafe"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": null,
+ "visibility": "default"
+ },
+ "11981": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 11981,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "function_pointer": {
+ "generic_params": [],
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "_",
+ {
+ "generic": "T"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "generic": "Ret"
+ }
+ }
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "maybe",
+ "trait": {
+ "args": null,
+ "id": 3,
+ "path": "Sized"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "T"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 319
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "T"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 321,
+ "path": "Borrow"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 212,
+ 1
+ ],
+ "end": [
+ 212,
+ 38
+ ],
+ "filename": "checkouts/rust/library/core/src/borrow.rs"
+ },
+ "visibility": "default"
+ },
+ "11982": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 11982,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "function_pointer": {
+ "generic_params": [],
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "_",
+ {
+ "generic": "T"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "generic": "Ret"
+ }
+ }
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "maybe",
+ "trait": {
+ "args": null,
+ "id": 3,
+ "path": "Sized"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "T"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 322
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "T"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 324,
+ "path": "BorrowMut"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 221,
+ 1
+ ],
+ "end": [
+ 221,
+ 41
+ ],
+ "filename": "checkouts/rust/library/core/src/borrow.rs"
+ },
+ "visibility": "default"
+ },
+ "11983": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 11983,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "function_pointer": {
+ "generic_params": [],
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "_",
+ {
+ "generic": "T"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "generic": "Ret"
+ }
+ }
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 97,
+ "path": "Clone"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "T"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 422
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 424,
+ "path": "CloneToUninit"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 515,
+ 1
+ ],
+ "end": [
+ 515,
+ 42
+ ],
+ "filename": "checkouts/rust/library/core/src/clone.rs"
+ },
+ "visibility": "default"
+ },
+ "11984": {
+ "attrs": [],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": null,
+ "id": 11984,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
+ }
+ ],
+ [
+ "other",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "F"
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "bool"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "eq",
+ "span": {
+ "begin": [
+ 2561,
+ 5
+ ],
+ "end": [
+ 2561,
+ 39
+ ],
+ "filename": "checkouts/rust/library/core/src/ptr/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "11985": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 11985,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "F"
+ },
+ "for": {
+ "function_pointer": {
+ "generic_params": [],
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "_",
+ {
+ "generic": "T"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "generic": "Ret"
+ }
+ }
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "F"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 11986,
+ "path": "FnPtr"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "F"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 11984
+ ],
+ "provided_trait_methods": [
+ "ne"
+ ],
+ "trait": {
+ "args": null,
+ "id": 121,
+ "path": "PartialEq"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 2559,
+ 1
+ ],
+ "end": [
+ 2559,
+ 31
+ ],
+ "filename": "checkouts/rust/library/core/src/ptr/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "11987": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 11987,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "F"
+ },
+ "for": {
+ "function_pointer": {
+ "generic_params": [],
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "_",
+ {
+ "generic": "T"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "generic": "Ret"
+ }
+ }
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "F"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 11986,
+ "path": "FnPtr"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "F"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [],
+ "provided_trait_methods": [
+ "assert_receiver_is_total_eq"
+ ],
+ "trait": {
+ "args": null,
+ "id": 111,
+ "path": "Eq"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 2566,
+ 1
+ ],
+ "end": [
+ 2566,
+ 24
+ ],
+ "filename": "checkouts/rust/library/core/src/ptr/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "11988": {
+ "attrs": [],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": null,
+ "id": 11988,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
+ }
+ ],
+ [
+ "other",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "F"
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": null,
+ "id": 2007,
+ "path": "Ordering"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "cmp",
+ "span": {
+ "begin": [
+ 2578,
+ 5
+ ],
+ "end": [
+ 2578,
+ 44
+ ],
+ "filename": "checkouts/rust/library/core/src/ptr/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "11989": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 11989,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "F"
+ },
+ "for": {
+ "function_pointer": {
+ "generic_params": [],
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "_",
+ {
+ "generic": "T"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "generic": "Ret"
+ }
+ }
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "F"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 11986,
+ "path": "FnPtr"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "F"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 11988
+ ],
+ "provided_trait_methods": [
+ "max",
+ "min",
+ "clamp"
+ ],
+ "trait": {
+ "args": null,
+ "id": 117,
+ "path": "Ord"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 2576,
+ 1
+ ],
+ "end": [
+ 2576,
+ 25
+ ],
+ "filename": "checkouts/rust/library/core/src/ptr/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "1199": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1199,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 1135,
+ "path": "VacantEntry"
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "U"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "T"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 37,
+ "path": "From"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "U"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 325
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "U"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 39,
+ "path": "Into"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 767,
+ 1
+ ],
+ "end": [
+ 769,
+ 24
+ ],
+ "filename": "checkouts/rust/library/core/src/convert/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "11990": {
+ "attrs": [],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": null,
+ "id": 11990,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
+ }
+ ],
+ [
+ "other",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "F"
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 2007,
+ "path": "Ordering"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "partial_cmp",
+ "span": {
+ "begin": [
+ 2571,
+ 5
+ ],
+ "end": [
+ 2571,
+ 60
+ ],
+ "filename": "checkouts/rust/library/core/src/ptr/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "11991": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 11991,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "F"
+ },
+ "for": {
+ "function_pointer": {
+ "generic_params": [],
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "_",
+ {
+ "generic": "T"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "generic": "Ret"
+ }
+ }
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "F"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 11986,
+ "path": "FnPtr"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "F"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 11990
+ ],
+ "provided_trait_methods": [
+ "lt",
+ "le",
+ "gt",
+ "ge",
+ "__chaining_lt",
+ "__chaining_le",
+ "__chaining_gt",
+ "__chaining_ge"
+ ],
+ "trait": {
+ "args": null,
+ "id": 125,
+ "path": "PartialOrd"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 2569,
+ 1
+ ],
+ "end": [
+ 2569,
+ 32
+ ],
+ "filename": "checkouts/rust/library/core/src/ptr/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "11992": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 11992,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "function_pointer": {
+ "generic_params": [],
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "_",
+ {
+ "generic": "T"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "generic": "Ret"
+ }
+ }
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "U"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "T"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 37,
+ "path": "From"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "U"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 325
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "U"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 39,
+ "path": "Into"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 767,
+ 1
+ ],
+ "end": [
+ 769,
+ 24
+ ],
+ "filename": "checkouts/rust/library/core/src/convert/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "11993": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 11993,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "function_pointer": {
+ "generic_params": [],
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "_",
+ {
+ "generic": "T"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "generic": "Ret"
+ }
+ }
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ }
+ ],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 327
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "T"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 37,
+ "path": "From"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 785,
+ 1
+ ],
+ "end": [
+ 785,
+ 28
+ ],
+ "filename": "checkouts/rust/library/core/src/convert/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "11994": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 11994,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "function_pointer": {
+ "generic_params": [],
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "_",
+ {
+ "generic": "T"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "generic": "Ret"
+ }
+ }
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "U"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "T"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 197,
+ "path": "TryFrom"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "U"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 329,
+ 330
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "U"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 198,
+ "path": "TryInto"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 811,
+ 1
+ ],
+ "end": [
+ 813,
+ 27
+ ],
+ "filename": "checkouts/rust/library/core/src/convert/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "11995": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 11995,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "function_pointer": {
+ "generic_params": [],
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "_",
+ {
+ "generic": "T"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "generic": "Ret"
+ }
+ }
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "U"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "T"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 39,
+ "path": "Into"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "U"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 332,
+ 334
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "U"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 197,
+ "path": "TryFrom"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 827,
+ 1
+ ],
+ "end": [
+ 829,
+ 24
+ ],
+ "filename": "checkouts/rust/library/core/src/convert/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "11996": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 11996,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "function_pointer": {
+ "generic_params": [],
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "_",
+ {
+ "generic": "T"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "generic": "Ret"
+ }
+ }
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "outlives": "'static"
+ },
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "maybe",
+ "trait": {
+ "args": null,
+ "id": 3,
+ "path": "Sized"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "T"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 336
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 339,
+ "path": "Any"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 138,
+ 1
+ ],
+ "end": [
+ 138,
+ 36
+ ],
+ "filename": "checkouts/rust/library/core/src/any.rs"
+ },
+ "visibility": "default"
+ },
+ "11997": {
+ "attrs": [],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": null,
+ "id": 11997,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
+ }
+ ],
+ [
+ "f",
+ {
+ "borrowed_ref": {
+ "is_mutable": true,
+ "lifetime": null,
+ "type": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'_"
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 341,
+ "path": "Formatter"
+ }
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "tuple": []
+ }
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 11998,
+ "path": "Error"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 57,
+ "path": "Result"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "fmt",
+ "span": {
+ "begin": [
+ 2599,
+ 5
+ ],
+ "end": [
+ 2599,
+ 61
+ ],
+ "filename": "checkouts/rust/library/core/src/ptr/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "11999": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 11999,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "F"
+ },
+ "for": {
+ "function_pointer": {
+ "generic_params": [],
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "_",
+ {
+ "generic": "T"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "generic": "Ret"
+ }
+ }
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "F"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 11986,
+ "path": "FnPtr"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "F"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 11997
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 344,
+ "path": "Debug"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 2598,
+ 1
+ ],
+ "end": [
+ 2598,
+ 32
+ ],
+ "filename": "checkouts/rust/library/core/src/ptr/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "12": {
+ "attrs": [
+ {
+ "other": "#[doc(no_inline)]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 12,
+ "inner": {
+ "use": {
+ "id": 13,
+ "is_glob": false,
+ "name": "FnMut",
+ "source": "crate::ops::FnMut"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 16,
+ 32
+ ],
+ "end": [
+ 16,
+ 37
+ ],
+ "filename": "std/src/prelude/v1.rs"
+ },
+ "visibility": "public"
+ },
+ "120": {
+ "attrs": [
+ {
+ "other": "#[doc(no_inline)]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"builtin_macro_prelude\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 120,
+ "inner": {
+ "use": {
+ "id": 121,
+ "is_glob": false,
+ "name": "PartialEq",
+ "source": "core::prelude::v1::PartialEq"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 52,
+ 74
+ ],
+ "end": [
+ 52,
+ 83
+ ],
+ "filename": "std/src/prelude/v1.rs"
+ },
+ "visibility": "public"
+ },
+ "1200": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1200,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 1135,
+ "path": "VacantEntry"
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ }
+ ],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 327
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "T"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 37,
+ "path": "From"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 785,
+ 1
+ ],
+ "end": [
+ 785,
+ 28
+ ],
+ "filename": "checkouts/rust/library/core/src/convert/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "12000": {
+ "attrs": [],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": null,
+ "id": 12000,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
+ }
+ ],
+ [
+ "f",
+ {
+ "borrowed_ref": {
+ "is_mutable": true,
+ "lifetime": null,
+ "type": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'_"
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 341,
+ "path": "Formatter"
+ }
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "tuple": []
+ }
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 11998,
+ "path": "Error"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 57,
+ "path": "Result"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "fmt",
+ "span": {
+ "begin": [
+ 2592,
+ 5
+ ],
+ "end": [
+ 2592,
+ 61
+ ],
+ "filename": "checkouts/rust/library/core/src/ptr/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "12001": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 12001,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "F"
+ },
+ "for": {
+ "function_pointer": {
+ "generic_params": [],
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "_",
+ {
+ "generic": "T"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "generic": "Ret"
+ }
+ }
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "F"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 11986,
+ "path": "FnPtr"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "F"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 12000
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 9406,
+ "path": "Pointer"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 2591,
+ 1
+ ],
+ "end": [
+ 2591,
+ 34
+ ],
+ "filename": "checkouts/rust/library/core/src/ptr/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "12002": {
+ "attrs": [],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": null,
+ "id": 12002,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "HH"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 537,
+ "path": "Hasher"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "HH"
+ }
+ }
+ }
+ ]
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
+ }
+ ],
+ [
+ "state",
+ {
+ "borrowed_ref": {
+ "is_mutable": true,
+ "lifetime": null,
+ "type": {
+ "generic": "HH"
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": null
+ }
+ }
+ },
+ "links": {},
+ "name": "hash",
+ "span": {
+ "begin": [
+ 2585,
+ 5
+ ],
+ "end": [
+ 2585,
+ 53
+ ],
+ "filename": "checkouts/rust/library/core/src/ptr/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "12003": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 12003,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "F"
+ },
+ "for": {
+ "function_pointer": {
+ "generic_params": [],
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "_",
+ {
+ "generic": "T"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "generic": "Ret"
+ }
+ }
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "F"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 11986,
+ "path": "FnPtr"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "F"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 12002
+ ],
+ "provided_trait_methods": [
+ "hash_slice"
+ ],
+ "trait": {
+ "args": null,
+ "id": 539,
+ "path": "Hash"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 2584,
+ 1
+ ],
+ "end": [
+ 2584,
+ 32
+ ],
+ "filename": "checkouts/rust/library/core/src/ptr/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "12004": {
+ "attrs": [],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": null,
+ "id": 12004,
+ "inner": {
+ "assoc_type": {
+ "bounds": [],
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "lifetime": {
+ "outlives": []
+ }
+ },
+ "name": "'a"
+ }
+ ],
+ "where_predicates": []
+ },
+ "type": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "F"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 12005,
+ "path": "CharPredicateSearcher"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "Searcher",
+ "span": {
+ "begin": [
+ 946,
+ 5
+ ],
+ "end": [
+ 946,
+ 98
+ ],
+ "filename": "checkouts/rust/library/core/src/str/pattern.rs"
+ },
+ "visibility": "default"
+ },
+ "12006": {
+ "attrs": [],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": null,
+ "id": 12006,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "lifetime": {
+ "outlives": []
+ }
+ },
+ "name": "'a"
+ }
+ ],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "haystack",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": "'a",
+ "type": {
+ "primitive": "str"
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "F"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 12005,
+ "path": "CharPredicateSearcher"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "into_searcher",
+ "span": {
+ "begin": [
+ 946,
+ 5
+ ],
+ "end": [
+ 946,
+ 98
+ ],
+ "filename": "checkouts/rust/library/core/src/str/pattern.rs"
+ },
+ "visibility": "default"
+ },
+ "12007": {
+ "attrs": [],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": null,
+ "id": 12007,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "lifetime": {
+ "outlives": []
+ }
+ },
+ "name": "'a"
+ }
+ ],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "haystack",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": "'a",
+ "type": {
+ "primitive": "str"
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "bool"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "is_contained_in",
+ "span": {
+ "begin": [
+ 946,
+ 5
+ ],
+ "end": [
+ 946,
+ 98
+ ],
+ "filename": "checkouts/rust/library/core/src/str/pattern.rs"
+ },
+ "visibility": "default"
+ },
+ "12008": {
+ "attrs": [],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": null,
+ "id": 12008,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "lifetime": {
+ "outlives": []
+ }
+ },
+ "name": "'a"
+ }
+ ],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "haystack",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": "'a",
+ "type": {
+ "primitive": "str"
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "bool"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "is_prefix_of",
+ "span": {
+ "begin": [
+ 946,
+ 5
+ ],
+ "end": [
+ 946,
+ 98
+ ],
+ "filename": "checkouts/rust/library/core/src/str/pattern.rs"
+ },
+ "visibility": "default"
+ },
+ "12009": {
+ "attrs": [],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": null,
+ "id": 12009,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "lifetime": {
+ "outlives": []
+ }
+ },
+ "name": "'a"
+ }
+ ],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "haystack",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": "'a",
+ "type": {
+ "primitive": "str"
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": "'a",
+ "type": {
+ "primitive": "str"
+ }
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "strip_prefix_of",
+ "span": {
+ "begin": [
+ 946,
+ 5
+ ],
+ "end": [
+ 946,
+ 98
+ ],
+ "filename": "checkouts/rust/library/core/src/str/pattern.rs"
+ },
+ "visibility": "default"
+ },
+ "1201": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1201,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 1135,
+ "path": "VacantEntry"
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "U"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "T"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 197,
+ "path": "TryFrom"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "U"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 329,
+ 330
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "U"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 198,
+ "path": "TryInto"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 811,
+ 1
+ ],
+ "end": [
+ 813,
+ 27
+ ],
+ "filename": "checkouts/rust/library/core/src/convert/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "12010": {
+ "attrs": [],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": null,
+ "id": 12010,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "lifetime": {
+ "outlives": []
+ }
+ },
+ "name": "'a"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 9717,
+ "path": "ReverseSearcher"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "F"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 12005,
+ "path": "CharPredicateSearcher"
+ }
+ }
+ }
+ }
+ ]
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "haystack",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": "'a",
+ "type": {
+ "primitive": "str"
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "bool"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "is_suffix_of",
+ "span": {
+ "begin": [
+ 946,
+ 5
+ ],
+ "end": [
+ 946,
+ 98
+ ],
+ "filename": "checkouts/rust/library/core/src/str/pattern.rs"
+ },
+ "visibility": "default"
+ },
+ "12011": {
+ "attrs": [],
+ "crate_id": 1,
+ "deprecation": null,
+ "docs": null,
+ "id": 12011,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "lifetime": {
+ "outlives": []
+ }
+ },
+ "name": "'a"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 9717,
+ "path": "ReverseSearcher"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "F"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 12005,
+ "path": "CharPredicateSearcher"
+ }
+ }
+ }
+ }
+ ]
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "generic": "Self"
+ }
+ ],
+ [
+ "haystack",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": "'a",
+ "type": {
+ "primitive": "str"
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": "'a",
+ "type": {
+ "primitive": "str"
+ }
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "strip_suffix_of",
+ "span": {
+ "begin": [
+ 946,
+ 5
+ ],
+ "end": [
+ 946,
+ 98
+ ],
+ "filename": "checkouts/rust/library/core/src/str/pattern.rs"
+ },
+ "visibility": "default"
+ },
+ "12012": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 12012,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "F"
+ },
+ "for": {
+ "function_pointer": {
+ "generic_params": [],
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "_",
+ {
+ "generic": "T"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "generic": "Ret"
+ }
+ }
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "F"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": {
+ "parenthesized": {
+ "inputs": [
+ {
+ "primitive": "char"
+ }
+ ],
+ "output": {
+ "primitive": "bool"
+ }
+ }
+ },
+ "id": 13,
+ "path": "FnMut"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "F"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 12004,
+ 12006,
+ 12007,
+ 12008,
+ 12009,
+ 12010,
+ 12011
+ ],
+ "provided_trait_methods": [
+ "is_contained_in",
+ "is_prefix_of",
+ "is_suffix_of",
+ "strip_prefix_of",
+ "strip_suffix_of",
+ "as_utf8_pattern"
+ ],
+ "trait": {
+ "args": null,
+ "id": 9714,
+ "path": "Pattern"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 942,
+ 1
+ ],
+ "end": [
+ 944,
+ 28
+ ],
+ "filename": "checkouts/rust/library/core/src/str/pattern.rs"
+ },
+ "visibility": "default"
+ },
+ "12013": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 12013,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "function_pointer": {
+ "generic_params": [],
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "_",
+ {
+ "generic": "T"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "generic": "Ret"
+ }
+ }
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 97,
+ "path": "Clone"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "T"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 430,
+ 431,
+ 432
+ ],
+ "provided_trait_methods": [
+ "clone_into"
+ ],
+ "trait": {
+ "args": null,
+ "id": 155,
+ "path": "ToOwned"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 85,
+ 1
+ ],
+ "end": [
+ 87,
+ 14
+ ],
+ "filename": "checkouts/rust/library/alloc/src/borrow.rs"
+ },
+ "visibility": "default"
+ },
+ "1202": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1202,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 1135,
+ "path": "VacantEntry"
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "U"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "T"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 39,
+ "path": "Into"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "U"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 332,
+ 334
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "U"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 197,
+ "path": "TryFrom"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 827,
+ 1
+ ],
+ "end": [
+ 829,
+ 24
+ ],
+ "filename": "checkouts/rust/library/core/src/convert/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "1203": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1203,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 1135,
+ "path": "VacantEntry"
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "outlives": "'static"
+ },
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "maybe",
+ "trait": {
+ "args": null,
+ "id": 3,
+ "path": "Sized"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "T"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 336
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 339,
+ "path": "Any"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 138,
+ 1
+ ],
+ "end": [
+ 138,
+ 36
+ ],
+ "filename": "checkouts/rust/library/core/src/any.rs"
+ },
+ "visibility": "default"
+ },
+ "1204": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1204,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
+ }
+ ],
+ [
+ "f",
+ {
+ "borrowed_ref": {
+ "is_mutable": true,
+ "lifetime": null,
+ "type": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'_"
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 341,
+ "path": "fmt::Formatter"
+ }
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": null,
+ "id": 342,
+ "path": "fmt::Result"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "fmt",
+ "span": {
+ "begin": [
+ 1837,
+ 5
+ ],
+ "end": [
+ 1839,
+ 6
+ ],
+ "filename": "std/src/collections/hash/map.rs"
+ },
+ "visibility": "default"
+ },
+ "1205": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 12, patch: 0})}, feature: \"debug_hash_map\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1205,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'_"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 1135,
+ "path": "VacantEntry"
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 344,
"path": "Debug"
}
}
@@ -145359,7 +163328,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -145379,6 +163348,672 @@
},
"visibility": "default"
},
+ "12054": {
+ "attrs": [
+ {
+ "other": "#[(not(restricted_std), stable(feature = \"rust1\", since = \"1.0.0\"))]"
+ },
+ {
+ "other": "#[(restricted_std,\nunstable(feature = \"restricted_std\", issue = \"none\", reason =\n\"You have attempted to use a standard library built for a platform that it doesn't \\\n know how to support. Consider building it for a known environment, disabling it with \\\n `#![no_std]` or overriding this warning by enabling this feature.\"))]"
+ },
+ {
+ "other": "#[rustc_preserve_ub_checks]"
+ },
+ {
+ "other": "#[doc(html_playground_url = \"https://play.rust-lang.org/\",\nissue_tracker_base_url = \"https://github.com/rust-lang/rust/issues/\",\ntest(no_crate_inject, attr(deny(warnings))),\ntest(attr(allow(dead_code, deprecated, unused_variables, unused_mut))))]"
+ },
+ {
+ "other": "#[doc(rust_logo)]"
+ },
+ {
+ "other": "#[doc(auto_cfg(hide(no_global_oom_handling)))]"
+ },
+ {
+ "other": "#[needs_panic_runtime]"
+ },
+ {
+ "other": "#[warn(deprecated_in_future)]"
+ },
+ {
+ "other": "#[warn(missing_docs)]"
+ },
+ {
+ "other": "#[warn(missing_debug_implementations)]"
+ },
+ {
+ "other": "#[allow(explicit_outlives_requirements)]"
+ },
+ {
+ "other": "#[allow(unused_lifetimes)]"
+ },
+ {
+ "other": "#[allow(internal_features)]"
+ },
+ {
+ "other": "#[deny(fuzzy_provenance_casts)]"
+ },
+ {
+ "other": "#[deny(unsafe_op_in_unsafe_fn)]"
+ },
+ {
+ "other": "#[allow(rustdoc::redundant_explicit_links)]"
+ },
+ {
+ "other": "#[warn(rustdoc::unescaped_backticks)]"
+ },
+ {
+ "other": "#[deny(ffi_unwind_calls)]"
+ },
+ {
+ "other": "#[allow(unused_features)]"
+ },
+ {
+ "other": "#[(test,\nfeature(internal_output_capture, print_internals, update_panic_count, rt))]"
+ },
+ {
+ "other": "#[(all(target_vendor = \"fortanix\", target_env = \"sgx\"),\nfeature(slice_index_methods, coerce_unsized, sgx_platform))]"
+ },
+ {
+ "other": "#[(target_family = \"wasm\", feature(stdarch_wasm_atomic_wait))]"
+ },
+ {
+ "other": "#[(target_arch = \"wasm64\", feature(simd_wasm64))]"
+ },
+ {
+ "other": "#[feature(alloc_error_handler)]"
+ },
+ {
+ "other": "#[feature(allocator_internals)]"
+ },
+ {
+ "other": "#[feature(allow_internal_unsafe)]"
+ },
+ {
+ "other": "#[feature(allow_internal_unstable)]"
+ },
+ {
+ "other": "#[feature(asm_experimental_arch)]"
+ },
+ {
+ "other": "#[feature(autodiff)]"
+ },
+ {
+ "other": "#[feature(cfg_sanitizer_cfi)]"
+ },
+ {
+ "other": "#[feature(cfg_target_thread_local)]"
+ },
+ {
+ "other": "#[feature(cfi_encoding)]"
+ },
+ {
+ "other": "#[feature(char_max_len)]"
+ },
+ {
+ "other": "#[feature(const_trait_impl)]"
+ },
+ {
+ "other": "#[feature(core_float_math)]"
+ },
+ {
+ "other": "#[feature(decl_macro)]"
+ },
+ {
+ "other": "#[feature(deprecated_suggestion)]"
+ },
+ {
+ "other": "#[feature(doc_cfg)]"
+ },
+ {
+ "other": "#[feature(doc_masked)]"
+ },
+ {
+ "other": "#[feature(doc_notable_trait)]"
+ },
+ {
+ "other": "#[feature(dropck_eyepatch)]"
+ },
+ {
+ "other": "#[feature(f16)]"
+ },
+ {
+ "other": "#[feature(f128)]"
+ },
+ {
+ "other": "#[feature(ffi_const)]"
+ },
+ {
+ "other": "#[feature(formatting_options)]"
+ },
+ {
+ "other": "#[feature(funnel_shifts)]"
+ },
+ {
+ "other": "#[feature(if_let_guard)]"
+ },
+ {
+ "other": "#[feature(intra_doc_pointers)]"
+ },
+ {
+ "other": "#[feature(iter_advance_by)]"
+ },
+ {
+ "other": "#[feature(iter_next_chunk)]"
+ },
+ {
+ "other": "#[feature(lang_items)]"
+ },
+ {
+ "other": "#[feature(link_cfg)]"
+ },
+ {
+ "other": "#[feature(linkage)]"
+ },
+ {
+ "other": "#[feature(macro_metavar_expr_concat)]"
+ },
+ {
+ "other": "#[feature(maybe_uninit_fill)]"
+ },
+ {
+ "other": "#[feature(min_specialization)]"
+ },
+ {
+ "other": "#[feature(must_not_suspend)]"
+ },
+ {
+ "other": "#[feature(needs_panic_runtime)]"
+ },
+ {
+ "other": "#[feature(negative_impls)]"
+ },
+ {
+ "other": "#[feature(never_type)]"
+ },
+ {
+ "other": "#[feature(optimize_attribute)]"
+ },
+ {
+ "other": "#[feature(prelude_import)]"
+ },
+ {
+ "other": "#[feature(rustc_attrs)]"
+ },
+ {
+ "other": "#[feature(rustdoc_internals)]"
+ },
+ {
+ "other": "#[feature(staged_api)]"
+ },
+ {
+ "other": "#[feature(stmt_expr_attributes)]"
+ },
+ {
+ "other": "#[feature(strict_provenance_lints)]"
+ },
+ {
+ "other": "#[feature(thread_local)]"
+ },
+ {
+ "other": "#[feature(try_blocks)]"
+ },
+ {
+ "other": "#[feature(try_trait_v2)]"
+ },
+ {
+ "other": "#[feature(type_alias_impl_trait)]"
+ },
+ {
+ "other": "#[feature(bstr)]"
+ },
+ {
+ "other": "#[feature(bstr_internals)]"
+ },
+ {
+ "other": "#[feature(cast_maybe_uninit)]"
+ },
+ {
+ "other": "#[feature(cfg_select)]"
+ },
+ {
+ "other": "#[feature(char_internals)]"
+ },
+ {
+ "other": "#[feature(clone_to_uninit)]"
+ },
+ {
+ "other": "#[feature(const_convert)]"
+ },
+ {
+ "other": "#[feature(const_mul_add)]"
+ },
+ {
+ "other": "#[feature(core_intrinsics)]"
+ },
+ {
+ "other": "#[feature(core_io_borrowed_buf)]"
+ },
+ {
+ "other": "#[feature(drop_guard)]"
+ },
+ {
+ "other": "#[feature(duration_constants)]"
+ },
+ {
+ "other": "#[feature(error_generic_member_access)]"
+ },
+ {
+ "other": "#[feature(error_iter)]"
+ },
+ {
+ "other": "#[feature(exact_size_is_empty)]"
+ },
+ {
+ "other": "#[feature(exclusive_wrapper)]"
+ },
+ {
+ "other": "#[feature(extend_one)]"
+ },
+ {
+ "other": "#[feature(float_algebraic)]"
+ },
+ {
+ "other": "#[feature(float_gamma)]"
+ },
+ {
+ "other": "#[feature(float_minimum_maximum)]"
+ },
+ {
+ "other": "#[feature(fmt_internals)]"
+ },
+ {
+ "other": "#[feature(fn_ptr_trait)]"
+ },
+ {
+ "other": "#[feature(generic_atomic)]"
+ },
+ {
+ "other": "#[feature(hasher_prefixfree_extras)]"
+ },
+ {
+ "other": "#[feature(hashmap_internals)]"
+ },
+ {
+ "other": "#[feature(hint_must_use)]"
+ },
+ {
+ "other": "#[feature(int_from_ascii)]"
+ },
+ {
+ "other": "#[feature(ip)]"
+ },
+ {
+ "other": "#[feature(lazy_get)]"
+ },
+ {
+ "other": "#[feature(maybe_uninit_slice)]"
+ },
+ {
+ "other": "#[feature(maybe_uninit_write_slice)]"
+ },
+ {
+ "other": "#[feature(panic_can_unwind)]"
+ },
+ {
+ "other": "#[feature(panic_internals)]"
+ },
+ {
+ "other": "#[feature(pin_coerce_unsized_trait)]"
+ },
+ {
+ "other": "#[feature(pointer_is_aligned_to)]"
+ },
+ {
+ "other": "#[feature(portable_simd)]"
+ },
+ {
+ "other": "#[feature(ptr_as_uninit)]"
+ },
+ {
+ "other": "#[feature(ptr_mask)]"
+ },
+ {
+ "other": "#[feature(random)]"
+ },
+ {
+ "other": "#[feature(slice_internals)]"
+ },
+ {
+ "other": "#[feature(slice_ptr_get)]"
+ },
+ {
+ "other": "#[feature(slice_range)]"
+ },
+ {
+ "other": "#[feature(slice_split_once)]"
+ },
+ {
+ "other": "#[feature(std_internals)]"
+ },
+ {
+ "other": "#[feature(str_internals)]"
+ },
+ {
+ "other": "#[feature(sync_unsafe_cell)]"
+ },
+ {
+ "other": "#[feature(temporary_niche_types)]"
+ },
+ {
+ "other": "#[feature(ub_checks)]"
+ },
+ {
+ "other": "#[feature(used_with_arg)]"
+ },
+ {
+ "other": "#[feature(alloc_layout_extra)]"
+ },
+ {
+ "other": "#[feature(allocator_api)]"
+ },
+ {
+ "other": "#[feature(get_mut_unchecked)]"
+ },
+ {
+ "other": "#[feature(map_try_insert)]"
+ },
+ {
+ "other": "#[feature(slice_concat_trait)]"
+ },
+ {
+ "other": "#[feature(thin_box)]"
+ },
+ {
+ "other": "#[feature(try_reserve_kind)]"
+ },
+ {
+ "other": "#[feature(try_with_capacity)]"
+ },
+ {
+ "other": "#[feature(unique_rc_arc)]"
+ },
+ {
+ "other": "#[feature(vec_into_raw_parts)]"
+ },
+ {
+ "other": "#[feature(wtf8_internals)]"
+ },
+ {
+ "other": "#[feature(panic_unwind)]"
+ },
+ {
+ "other": "#[feature(stdarch_internal)]"
+ },
+ {
+ "other": "#[feature(assert_matches)]"
+ },
+ {
+ "other": "#[feature(async_iterator)]"
+ },
+ {
+ "other": "#[feature(c_variadic)]"
+ },
+ {
+ "other": "#[feature(cfg_accessible)]"
+ },
+ {
+ "other": "#[feature(cfg_eval)]"
+ },
+ {
+ "other": "#[feature(concat_bytes)]"
+ },
+ {
+ "other": "#[feature(const_format_args)]"
+ },
+ {
+ "other": "#[feature(custom_test_frameworks)]"
+ },
+ {
+ "other": "#[feature(edition_panic)]"
+ },
+ {
+ "other": "#[feature(format_args_nl)]"
+ },
+ {
+ "other": "#[feature(log_syntax)]"
+ },
+ {
+ "other": "#[feature(test)]"
+ },
+ {
+ "other": "#[feature(trace_macros)]"
+ },
+ {
+ "other": "#[feature(io_const_error)]"
+ },
+ {
+ "other": "#[default_lib_allocator]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "other": "#[attr = NoStd]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": "# The Rust Standard Library\n\nThe Rust Standard Library is the foundation of portable Rust software, a\nset of minimal and battle-tested shared abstractions for the [broader Rust\necosystem][crates.io]. It offers core types, like [`Vec`] and\n[`Option`], library-defined [operations on language\nprimitives](#primitives), [standard macros](#macros), [I/O] and\n[multithreading], among [many other things][other].\n\n`std` is available to all Rust crates by default. Therefore, the\nstandard library can be accessed in [`use`] statements through the path\n`std`, as in [`use std::env`].\n\n# How to read this documentation\n\nIf you already know the name of what you are looking for, the fastest way to\nfind it is to use the search\nbutton at the top of the page.\n\nOtherwise, you may want to jump to one of these useful sections:\n\n* [`std::*` modules](#modules)\n* [Primitive types](#primitives)\n* [Standard macros](#macros)\n* [The Rust Prelude]\n\nIf this is your first time, the documentation for the standard library is\nwritten to be casually perused. Clicking on interesting things should\ngenerally lead you to interesting places. Still, there are important bits\nyou don't want to miss, so read on for a tour of the standard library and\nits documentation!\n\nOnce you are familiar with the contents of the standard library you may\nbegin to find the verbosity of the prose distracting. At this stage in your\ndevelopment you may want to press the\n\" Summary\"\nbutton near the top of the page to collapse it into a more skimmable view.\n\nWhile you are looking at the top of the page, also notice the\n\"Source\" link. Rust's API documentation comes with the source\ncode and you are encouraged to read it. The standard library source is\ngenerally high quality and a peek behind the curtains is\noften enlightening.\n\n# What is in the standard library documentation?\n\nFirst of all, The Rust Standard Library is divided into a number of focused\nmodules, [all listed further down this page](#modules). These modules are\nthe bedrock upon which all of Rust is forged, and they have mighty names\nlike [`std::slice`] and [`std::cmp`]. Modules' documentation typically\nincludes an overview of the module along with examples, and are a smart\nplace to start familiarizing yourself with the library.\n\nSecond, implicit methods on [primitive types] are documented here. This can\nbe a source of confusion for two reasons:\n\n1. While primitives are implemented by the compiler, the standard library\n implements methods directly on the primitive types (and it is the only\n library that does so), which are [documented in the section on\n primitives](#primitives).\n2. The standard library exports many modules *with the same name as\n primitive types*. These define additional items related to the primitive\n type, but not the all-important methods.\n\nSo for example there is a [page for the primitive type\n`char`](primitive::char) that lists all the methods that can be called on\ncharacters (very useful), and there is a [page for the module\n`std::char`](crate::char) that documents iterator and error types created by these methods\n(rarely useful).\n\nNote the documentation for the primitives [`str`] and [`[T]`][prim@slice] (also\ncalled 'slice'). Many method calls on [`String`] and [`Vec`] are actually\ncalls to methods on [`str`] and [`[T]`][prim@slice] respectively, via [deref\ncoercions][deref-coercions].\n\nThird, the standard library defines [The Rust Prelude], a small collection\nof items - mostly traits - that are imported into every module of every\ncrate. The traits in the prelude are pervasive, making the prelude\ndocumentation a good entry point to learning about the library.\n\nAnd finally, the standard library exports a number of standard macros, and\n[lists them on this page](#macros) (technically, not all of the standard\nmacros are defined by the standard library - some are defined by the\ncompiler - but they are documented here the same). Like the prelude, the\nstandard macros are imported by default into all crates.\n\n# Contributing changes to the documentation\n\nCheck out the Rust contribution guidelines [here](\nhttps://rustc-dev-guide.rust-lang.org/contributing.html#writing-documentation).\nThe source for this documentation can be found on\n[GitHub](https://github.com/rust-lang/rust) in the 'library/std/' directory.\nTo contribute changes, make sure you read the guidelines first, then submit\npull-requests for your suggested changes.\n\nContributions are appreciated! If you see a part of the docs that can be\nimproved, submit a PR, or chat with us first on [Zulip][rust-zulip]\n#docs.\n\n# A Tour of The Rust Standard Library\n\nThe rest of this crate documentation is dedicated to pointing out notable\nfeatures of The Rust Standard Library.\n\n## Containers and collections\n\nThe [`option`] and [`result`] modules define optional and error-handling\ntypes, [`Option`] and [`Result`]. The [`iter`] module defines\nRust's iterator trait, [`Iterator`], which works with the [`for`] loop to\naccess collections.\n\nThe standard library exposes three common ways to deal with contiguous\nregions of memory:\n\n* [`Vec`] - A heap-allocated *vector* that is resizable at runtime.\n* [`[T; N]`][prim@array] - An inline *array* with a fixed size at compile time.\n* [`[T]`][prim@slice] - A dynamically sized *slice* into any other kind of contiguous\n storage, whether heap-allocated or not.\n\nSlices can only be handled through some kind of *pointer*, and as such come\nin many flavors such as:\n\n* `&[T]` - *shared slice*\n* `&mut [T]` - *mutable slice*\n* [`Box<[T]>`][owned slice] - *owned slice*\n\n[`str`], a UTF-8 string slice, is a primitive type, and the standard library\ndefines many methods for it. Rust [`str`]s are typically accessed as\nimmutable references: `&str`. Use the owned [`String`] for building and\nmutating strings.\n\nFor converting to strings use the [`format!`] macro, and for converting from\nstrings use the [`FromStr`] trait.\n\nData may be shared by placing it in a reference-counted box or the [`Rc`]\ntype, and if further contained in a [`Cell`] or [`RefCell`], may be mutated\nas well as shared. Likewise, in a concurrent setting it is common to pair an\natomically-reference-counted box, [`Arc`], with a [`Mutex`] to get the same\neffect.\n\nThe [`collections`] module defines maps, sets, linked lists and other\ntypical collection types, including the common [`HashMap`].\n\n## Platform abstractions and I/O\n\nBesides basic data types, the standard library is largely concerned with\nabstracting over differences in common platforms, most notably Windows and\nUnix derivatives.\n\nCommon types of I/O, including [files], [TCP], and [UDP], are defined in\nthe [`io`], [`fs`], and [`net`] modules.\n\nThe [`thread`] module contains Rust's threading abstractions. [`sync`]\ncontains further primitive shared memory types, including [`atomic`], [`mpmc`] and\n[`mpsc`], which contains the channel types for message passing.\n\n# Use before and after `main()`\n\nMany parts of the standard library are expected to work before and after `main()`;\nbut this is not guaranteed or ensured by tests. It is recommended that you write your own tests\nand run them on each platform you wish to support.\nThis means that use of `std` before/after main, especially of features that interact with the\nOS or global state, is exempted from stability and portability guarantees and instead only\nprovided on a best-effort basis. Nevertheless bug reports are appreciated.\n\nOn the other hand `core` and `alloc` are most likely to work in such environments with\nthe caveat that any hookable behavior such as panics, oom handling or allocators will also\ndepend on the compatibility of the hooks.\n\nSome features may also behave differently outside main, e.g. stdio could become unbuffered,\nsome panics might turn into aborts, backtraces might not get symbolicated or similar.\n\nNon-exhaustive list of known limitations:\n\n- after-main use of thread-locals, which also affects additional features:\n - [`thread::current()`]\n- under UNIX, before main, file descriptors 0, 1, and 2 may be unchanged\n (they are guaranteed to be open during main,\n and are opened to /dev/null O_RDWR if they weren't open on program start)\n\n\n[I/O]: io\n[TCP]: net::TcpStream\n[The Rust Prelude]: prelude\n[UDP]: net::UdpSocket\n[`Arc`]: sync::Arc\n[owned slice]: boxed\n[`Cell`]: cell::Cell\n[`FromStr`]: str::FromStr\n[`HashMap`]: collections::HashMap\n[`Mutex`]: sync::Mutex\n[`Option`]: option::Option\n[`Rc`]: rc::Rc\n[`RefCell`]: cell::RefCell\n[`Result`]: result::Result\n[`Vec`]: vec::Vec\n[`atomic`]: sync::atomic\n[`for`]: ../book/ch03-05-control-flow.html#looping-through-a-collection-with-for\n[`str`]: prim@str\n[`mpmc`]: sync::mpmc\n[`mpsc`]: sync::mpsc\n[`std::cmp`]: cmp\n[`std::slice`]: mod@slice\n[`use std::env`]: env/index.html\n[`use`]: ../book/ch07-02-defining-modules-to-control-scope-and-privacy.html\n[crates.io]: https://crates.io\n[deref-coercions]: ../book/ch15-02-deref.html#implicit-deref-coercions-with-functions-and-methods\n[files]: fs::File\n[multithreading]: thread\n[other]: #what-is-in-the-standard-library-documentation\n[primitive types]: ../book/ch03-02-data-types.html\n[rust-zulip]: https://rust-lang.zulipchat.com/\n[array]: prim@array\n[slice]: prim@slice",
+ "id": 12054,
+ "inner": {
+ "module": {
+ "is_crate": true,
+ "is_stripped": false,
+ "items": [
+ 164,
+ 230,
+ 234,
+ 266,
+ 298,
+ 607,
+ 656,
+ 726,
+ 731,
+ 733,
+ 1868,
+ 1909,
+ 1932,
+ 2422,
+ 3044,
+ 502,
+ 4771,
+ 4813,
+ 6231,
+ 6307,
+ 6310,
+ 6543,
+ 5395,
+ 7236,
+ 8715,
+ 8850,
+ 8895,
+ 8900,
+ 8905,
+ 8928,
+ 9305,
+ 9358,
+ 9458,
+ 9460,
+ 9462,
+ 9464,
+ 9465,
+ 9467,
+ 9468,
+ 9469,
+ 9470,
+ 9471,
+ 9472,
+ 9474,
+ 9476,
+ 9478,
+ 9480,
+ 9482,
+ 9484,
+ 9486,
+ 9488,
+ 9489,
+ 9490,
+ 9491,
+ 9492,
+ 9493,
+ 9495,
+ 9496,
+ 9498,
+ 9499,
+ 9501,
+ 9503,
+ 9505,
+ 9507,
+ 9509,
+ 9511,
+ 9513,
+ 9514,
+ 9515,
+ 9516,
+ 9517,
+ 9519,
+ 9520,
+ 9521,
+ 9522,
+ 9523,
+ 9525,
+ 9526,
+ 9528,
+ 9529,
+ 9531,
+ 9533,
+ 9535,
+ 9536,
+ 9538,
+ 9539,
+ 9540,
+ 9541,
+ 9542,
+ 9544,
+ 9545,
+ 9546,
+ 9547,
+ 9548,
+ 9549,
+ 9550,
+ 9551,
+ 9552,
+ 9553,
+ 9554,
+ 9555,
+ 9556,
+ 9558,
+ 9560,
+ 9562,
+ 9564,
+ 9566,
+ 9568,
+ 9570,
+ 9572,
+ 9573,
+ 493,
+ 9577,
+ 4418,
+ 9576,
+ 9578,
+ 9579,
+ 376,
+ 9404,
+ 9419,
+ 2395,
+ 9362,
+ 4834,
+ 9671,
+ 3998,
+ 1926,
+ 9373,
+ 233,
+ 265,
+ 297,
+ 229,
+ 4814,
+ 4818,
+ 3366,
+ 4824,
+ 4828,
+ 2396,
+ 2402,
+ 4822,
+ 4826,
+ 4830,
+ 11687,
+ 769,
+ 11973,
+ 11974
+ ]
+ }
+ },
+ "links": {
+ "`Iterator`": 49,
+ "`String`": 159,
+ "`collections`": 733,
+ "`format!`": 2326,
+ "`fs`": 2422,
+ "`io`": 502,
+ "`iter`": 192,
+ "`net`": 4771,
+ "`option`": 193,
+ "`result`": 194,
+ "`sync`": 8715,
+ "`thread::current()`": 371,
+ "`thread`": 607,
+ "boxed": 184,
+ "cell::Cell": 378,
+ "cell::RefCell": 380,
+ "cmp": 189,
+ "collections::HashMap": 738,
+ "crate::char": 9466,
+ "fs::File": 2411,
+ "io": 502,
+ "mod@slice": 203,
+ "net::TcpStream": 3049,
+ "net::UdpSocket": 4438,
+ "option::Option": 51,
+ "prelude": 164,
+ "prim@array": 9671,
+ "prim@slice": 3998,
+ "prim@str": 1926,
+ "primitive::char": 2395,
+ "rc::Rc": 2028,
+ "result::Result": 57,
+ "str::FromStr": 2070,
+ "sync::Arc": 606,
+ "sync::Mutex": 496,
+ "sync::atomic": 348,
+ "sync::mpmc": 7287,
+ "sync::mpsc": 494,
+ "thread": 607,
+ "vec::Vec": 163
+ },
+ "name": "std",
+ "span": {
+ "begin": [
+ 1,
+ 1
+ ],
+ "end": [
+ 767,
+ 29
+ ],
+ "filename": "std/src/lib.rs"
+ },
+ "visibility": "public"
+ },
"1206": {
"attrs": [],
"crate_id": 0,
@@ -145786,7 +164421,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -145807,7 +164442,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -145999,7 +164634,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -146085,7 +164720,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -146106,7 +164741,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -146127,7 +164762,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -146215,7 +164850,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -146231,7 +164866,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -146240,12 +164875,12 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -146329,7 +164964,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -146345,7 +164980,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -146354,12 +164989,12 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -146464,7 +165099,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -146489,11 +165124,11 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -146556,7 +165191,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -146581,11 +165216,11 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -146673,7 +165308,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -146691,8 +165326,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -146708,7 +165343,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -146717,11 +165352,11 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -146827,8 +165462,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -146844,7 +165479,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -146853,11 +165488,11 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -146981,12 +165616,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -147100,7 +165735,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 163,
+ "id": 161,
"path": "ToString"
}
}
@@ -147109,11 +165744,11 @@
"name": null,
"span": {
"begin": [
- 2806,
+ 2866,
1
],
"end": [
- 2806,
+ 2866,
46
],
"filename": "checkouts/rust/library/alloc/src/string.rs"
@@ -147171,7 +165806,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -147183,7 +165818,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -147256,7 +165891,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -147278,7 +165913,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -147302,7 +165937,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -147354,251 +165989,60 @@
}
}
}
- ],
- [
- "f",
- {
- "borrowed_ref": {
- "is_mutable": true,
- "lifetime": null,
- "type": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'_"
- }
- ],
- "constraints": []
- }
- },
- "id": 343,
- "path": "fmt::Formatter"
- }
- }
- }
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "resolved_path": {
- "args": null,
- "id": 344,
- "path": "fmt::Result"
- }
- }
- }
- }
- },
- "links": {},
- "name": "fmt",
- "span": {
- "begin": [
- 1866,
- 5
- ],
- "end": [
- 1874,
- 6
- ],
- "filename": "std/src/collections/hash/map.rs"
- },
- "visibility": "default"
- },
- "1225": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 82766, is_soft: false}, feature: \"map_try_insert\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 1225,
- "inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "K"
- }
- },
- {
- "type": {
- "generic": "V"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 785,
- "path": "OccupiedError"
- }
- },
- "generics": {
- "params": [
- {
- "kind": {
- "lifetime": {
- "outlives": []
- }
- },
- "name": "'a"
- },
- {
- "kind": {
- "type": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 346,
- "path": "Debug"
- }
- }
- }
- ],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "K"
- },
- {
- "kind": {
- "type": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 346,
- "path": "Debug"
- }
- }
- }
- ],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "V"
- }
- ],
- "where_predicates": []
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 1224
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": null,
- "id": 436,
- "path": "Display"
- }
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 1865,
- 1
- ],
- "end": [
- 1875,
- 2
- ],
- "filename": "std/src/collections/hash/map.rs"
- },
- "visibility": "default"
- },
- "1226": {
- "attrs": [
- {
- "other": "#[allow(deprecated)]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 1226,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
- }
+ ],
+ [
+ "f",
+ {
+ "borrowed_ref": {
+ "is_mutable": true,
+ "lifetime": null,
+ "type": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'_"
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 341,
+ "path": "fmt::Formatter"
+ }
+ }
+ }
+ }
]
],
"is_c_variadic": false,
"output": {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "primitive": "str"
- }
+ "resolved_path": {
+ "args": null,
+ "id": 342,
+ "path": "fmt::Result"
}
}
}
}
},
"links": {},
- "name": "description",
+ "name": "fmt",
"span": {
"begin": [
- 1880,
+ 1866,
5
],
"end": [
- 1882,
+ 1874,
6
],
"filename": "std/src/collections/hash/map.rs"
},
"visibility": "default"
},
- "1227": {
+ "1225": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 82766, is_soft: false}, feature: \"map_try_insert\"}}]"
@@ -147607,7 +166051,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1227,
+ "id": 1225,
"inner": {
"impl": {
"blanket_impl": null,
@@ -147657,8 +166101,8 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 346,
- "path": "fmt::Debug"
+ "id": 344,
+ "path": "Debug"
}
}
}
@@ -147679,8 +166123,8 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 346,
- "path": "fmt::Debug"
+ "id": 344,
+ "path": "Debug"
}
}
}
@@ -147698,8 +166142,131 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1226
+ 1224
],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 436,
+ "path": "Display"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 1865,
+ 1
+ ],
+ "end": [
+ 1875,
+ 2
+ ],
+ "filename": "std/src/collections/hash/map.rs"
+ },
+ "visibility": "default"
+ },
+ "1226": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 82766, is_soft: false}, feature: \"map_try_insert\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1226,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "K"
+ }
+ },
+ {
+ "type": {
+ "generic": "V"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 785,
+ "path": "OccupiedError"
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "lifetime": {
+ "outlives": []
+ }
+ },
+ "name": "'a"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 344,
+ "path": "Debug"
+ }
+ }
+ }
+ ],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "K"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 344,
+ "path": "Debug"
+ }
+ }
+ }
+ ],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "V"
+ }
+ ],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [],
"provided_trait_methods": [
"source",
"type_id",
@@ -147722,19 +166289,19 @@
1
],
"end": [
- 1883,
- 2
+ 1878,
+ 66
],
"filename": "std/src/collections/hash/map.rs"
},
"visibility": "default"
},
- "1228": {
+ "1227": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1228,
+ "id": 1227,
"inner": {
"module": {
"is_crate": false,
@@ -147766,14 +166333,14 @@
1
],
"end": [
- 2894,
+ 2889,
2
],
"filename": "std/src/collections/hash/map.rs"
},
"visibility": "public"
},
- "1230": {
+ "1229": {
"attrs": [
{
"other": "#[(not(test), rustc_diagnostic_item = \"HashSet\")]"
@@ -147788,7 +166355,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "A [hash set] implemented as a `HashMap` where the value is `()`.\n\nAs with the [`HashMap`] type, a `HashSet` requires that the elements\nimplement the [`Eq`] and [`Hash`] traits. This can frequently be achieved by\nusing `#[derive(PartialEq, Eq, Hash)]`. If you implement these yourself,\nit is important that the following property holds:\n\n```text\nk1 == k2 -> hash(k1) == hash(k2)\n```\n\nIn other words, if two keys are equal, their hashes must be equal.\nViolating this property is a logic error.\n\nIt is also a logic error for a key to be modified in such a way that the key's\nhash, as determined by the [`Hash`] trait, or its equality, as determined by\nthe [`Eq`] trait, changes while it is in the map. This is normally only\npossible through [`Cell`], [`RefCell`], global state, I/O, or unsafe code.\n\nThe behavior resulting from either logic error is not specified, but will\nbe encapsulated to the `HashSet` that observed the logic error and not\nresult in undefined behavior. This could include panics, incorrect results,\naborts, memory leaks, and non-termination.\n\n# Examples\n\n```\nuse std::collections::HashSet;\n// Type inference lets us omit an explicit type signature (which\n// would be `HashSet` in this example).\nlet mut books = HashSet::new();\n\n// Add some books.\nbooks.insert(\"A Dance With Dragons\".to_string());\nbooks.insert(\"To Kill a Mockingbird\".to_string());\nbooks.insert(\"The Odyssey\".to_string());\nbooks.insert(\"The Great Gatsby\".to_string());\n\n// Check for a specific one.\nif !books.contains(\"The Winds of Winter\") {\n println!(\"We have {} books, but The Winds of Winter ain't one.\",\n books.len());\n}\n\n// Remove a book.\nbooks.remove(\"The Odyssey\");\n\n// Iterate over everything.\nfor book in &books {\n println!(\"{book}\");\n}\n```\n\nThe easiest way to use `HashSet` with a custom type is to derive\n[`Eq`] and [`Hash`]. We must also derive [`PartialEq`],\nwhich is required if [`Eq`] is derived.\n\n```\nuse std::collections::HashSet;\n#[derive(Hash, Eq, PartialEq, Debug)]\nstruct Viking {\n name: String,\n power: usize,\n}\n\nlet mut vikings = HashSet::new();\n\nvikings.insert(Viking { name: \"Einar\".to_string(), power: 9 });\nvikings.insert(Viking { name: \"Einar\".to_string(), power: 9 });\nvikings.insert(Viking { name: \"Olaf\".to_string(), power: 4 });\nvikings.insert(Viking { name: \"Harald\".to_string(), power: 8 });\n\n// Use derived implementation to print the vikings.\nfor x in &vikings {\n println!(\"{x:?}\");\n}\n```\n\nA `HashSet` with a known list of items can be initialized from an array:\n\n```\nuse std::collections::HashSet;\n\nlet viking_names = HashSet::from([\"Einar\", \"Olaf\", \"Harald\"]);\n```\n\n[hash set]: crate::collections#use-the-set-variant-of-any-of-these-maps-when\n[`HashMap`]: crate::collections::HashMap\n[`RefCell`]: crate::cell::RefCell\n[`Cell`]: crate::cell::Cell\n\n# Usage in `const` and `static`\n\nLike `HashMap`, `HashSet` is randomly seeded: each `HashSet` instance uses a different seed,\nwhich means that `HashSet::new` cannot be used in const context. To construct a `HashSet` in the\ninitializer of a `const` or `static` item, you will have to use a different hasher that does not\ninvolve a random seed, as demonstrated in the following example. **A `HashSet` constructed this\nway is not resistant against HashDoS!**\n\n```rust\nuse std::collections::HashSet;\nuse std::hash::{BuildHasherDefault, DefaultHasher};\nuse std::sync::Mutex;\n\nconst EMPTY_SET: HashSet> =\n HashSet::with_hasher(BuildHasherDefault::new());\nstatic SET: Mutex>> =\n Mutex::new(HashSet::with_hasher(BuildHasherDefault::new()));\n```",
- "id": 1230,
+ "id": 1229,
"inner": {
"struct": {
"generics": {
@@ -147823,8 +166390,9 @@
"where_predicates": []
},
"impls": [
- 1233,
- 1248,
+ 1232,
+ 1247,
+ 1273,
1274,
1275,
1276,
@@ -147840,22 +166408,21 @@
1286,
1287,
1288,
- 1289,
- 1292,
+ 1291,
+ 1293,
1294,
- 1295,
- 1297,
- 1299,
- 1301,
- 1305,
- 1309,
- 1311,
- 1314,
- 1318,
- 1322,
- 1326,
- 1331,
- 1336
+ 1296,
+ 1298,
+ 1300,
+ 1304,
+ 1308,
+ 1310,
+ 1313,
+ 1317,
+ 1321,
+ 1325,
+ 1330,
+ 1335
],
"kind": {
"plain": {
@@ -147866,9 +166433,9 @@
}
},
"links": {
- "`Eq`": 113,
+ "`Eq`": 111,
"`Hash`": 539,
- "`PartialEq`": 123,
+ "`PartialEq`": 121,
"crate::cell::Cell": 378,
"crate::cell::RefCell": 380,
"crate::collections#use-the-set-variant-of-any-of-these-maps-when": 733,
@@ -147888,7 +166455,7 @@
},
"visibility": "public"
},
- "1231": {
+ "1230": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -147905,7 +166472,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Creates an empty `HashSet`.\n\nThe hash set is initially created with a capacity of 0, so it will not allocate until it\nis first inserted into.\n\n# Examples\n\n```\nuse std::collections::HashSet;\nlet set: HashSet = HashSet::new();\n```",
- "id": 1231,
+ "id": 1230,
"inner": {
"function": {
"generics": {
@@ -147945,7 +166512,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -147967,7 +166534,7 @@
},
"visibility": "public"
},
- "1232": {
+ "1231": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -147984,7 +166551,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Creates an empty `HashSet` with at least the specified capacity.\n\nThe hash set will be able to hold at least `capacity` elements without\nreallocating. This method is allowed to allocate for more elements than\n`capacity`. If `capacity` is zero, the hash set will not allocate.\n\n# Examples\n\n```\nuse std::collections::HashSet;\nlet set: HashSet = HashSet::with_capacity(10);\nassert!(set.capacity() >= 10);\n```",
- "id": 1232,
+ "id": 1231,
"inner": {
"function": {
"generics": {
@@ -148031,7 +166598,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -148053,12 +166620,12 @@
},
"visibility": "public"
},
- "1233": {
+ "1232": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1233,
+ "id": 1232,
"inner": {
"impl": {
"blanket_impl": null,
@@ -148085,7 +166652,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
},
@@ -148108,8 +166675,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1231,
- 1232
+ 1230,
+ 1231
],
"provided_trait_methods": [],
"trait": null
@@ -148130,7 +166697,7 @@
},
"visibility": "default"
},
- "1234": {
+ "1233": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -148142,7 +166709,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Returns the number of elements the set can hold without reallocating.\n\n# Examples\n\n```\nuse std::collections::HashSet;\nlet set: HashSet = HashSet::with_capacity(100);\nassert!(set.capacity() >= 100);\n```",
- "id": 1234,
+ "id": 1233,
"inner": {
"function": {
"generics": {
@@ -148193,7 +166760,7 @@
},
"visibility": "public"
},
- "1235": {
+ "1234": {
"attrs": [
{
"other": "#[rustc_lint_query_instability]"
@@ -148214,7 +166781,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "An iterator visiting all elements in arbitrary order.\nThe iterator element type is `&'a T`.\n\n# Examples\n\n```\nuse std::collections::HashSet;\nlet mut set = HashSet::new();\nset.insert(\"a\");\nset.insert(\"b\");\n\n// Will print in an arbitrary order.\nfor x in set.iter() {\n println!(\"{x}\");\n}\n```\n\n# Performance\n\nIn the current implementation, iterating over set takes O(capacity) time\ninstead of O(len) because it internally visits empty buckets too.",
- "id": 1235,
+ "id": 1234,
"inner": {
"function": {
"generics": {
@@ -148261,7 +166828,7 @@
"constraints": []
}
},
- "id": 1236,
+ "id": 1235,
"path": "Iter"
}
}
@@ -148283,7 +166850,7 @@
},
"visibility": "public"
},
- "1236": {
+ "1235": {
"attrs": [
{
"other": "#[(not(test), rustc_diagnostic_item = \"hashset_iter_ty\")]"
@@ -148298,7 +166865,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "An iterator over the items of a `HashSet`.\n\nThis `struct` is created by the [`iter`] method on [`HashSet`].\nSee its documentation for more.\n\n[`iter`]: HashSet::iter\n\n# Examples\n\n```\nuse std::collections::HashSet;\n\nlet a = HashSet::from([1, 2, 3]);\n\nlet mut iter = a.iter();\n```",
- "id": 1236,
+ "id": 1235,
"inner": {
"struct": {
"generics": {
@@ -148329,6 +166896,7 @@
"where_predicates": []
},
"impls": [
+ 1337,
1338,
1339,
1340,
@@ -148344,13 +166912,12 @@
1350,
1351,
1352,
- 1353,
- 1355,
- 1357,
- 1363,
+ 1354,
+ 1356,
+ 1362,
+ 1364,
1365,
- 1366,
- 1368
+ 1367
],
"kind": {
"plain": {
@@ -148361,8 +166928,8 @@
}
},
"links": {
- "HashSet::iter": 1235,
- "`HashSet`": 1230
+ "HashSet::iter": 1234,
+ "`HashSet`": 1229
},
"name": "Iter",
"span": {
@@ -148378,7 +166945,7 @@
},
"visibility": "public"
},
- "1237": {
+ "1236": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -148390,7 +166957,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Returns the number of elements in the set.\n\n# Examples\n\n```\nuse std::collections::HashSet;\n\nlet mut v = HashSet::new();\nassert_eq!(v.len(), 0);\nv.insert(1);\nassert_eq!(v.len(), 1);\n```",
- "id": 1237,
+ "id": 1236,
"inner": {
"function": {
"generics": {
@@ -148441,7 +167008,7 @@
},
"visibility": "public"
},
- "1238": {
+ "1237": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -148453,7 +167020,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Returns `true` if the set contains no elements.\n\n# Examples\n\n```\nuse std::collections::HashSet;\n\nlet mut v = HashSet::new();\nassert!(v.is_empty());\nv.insert(1);\nassert!(!v.is_empty());\n```",
- "id": 1238,
+ "id": 1237,
"inner": {
"function": {
"generics": {
@@ -148504,7 +167071,7 @@
},
"visibility": "public"
},
- "1239": {
+ "1238": {
"attrs": [
{
"other": "#[rustc_lint_query_instability]"
@@ -148519,7 +167086,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Clears the set, returning all elements as an iterator. Keeps the\nallocated memory for reuse.\n\nIf the returned iterator is dropped before being fully consumed, it\ndrops the remaining elements. The returned iterator keeps a mutable\nborrow on the set to optimize its implementation.\n\n# Examples\n\n```\nuse std::collections::HashSet;\n\nlet mut set = HashSet::from([1, 2, 3]);\nassert!(!set.is_empty());\n\n// print 1, 2, 3 in an arbitrary order\nfor i in set.drain() {\n println!(\"{i}\");\n}\n\nassert!(set.is_empty());\n```",
- "id": 1239,
+ "id": 1238,
"inner": {
"function": {
"generics": {
@@ -148566,7 +167133,7 @@
"constraints": []
}
},
- "id": 1240,
+ "id": 1239,
"path": "Drain"
}
}
@@ -148588,43 +167155,7 @@
},
"visibility": "public"
},
- "124": {
- "attrs": [
- {
- "other": "#[doc(no_inline)]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"builtin_macro_prelude\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 124,
- "inner": {
- "use": {
- "id": 125,
- "is_glob": false,
- "name": "PartialEq",
- "source": "core::prelude::v1::PartialEq"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 52,
- 74
- ],
- "end": [
- 52,
- 83
- ],
- "filename": "std/src/prelude/v1.rs"
- },
- "visibility": "public"
- },
- "1240": {
+ "1239": {
"attrs": [
{
"other": "#[(not(test), rustc_diagnostic_item = \"hashset_drain_ty\")]"
@@ -148639,7 +167170,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "A draining iterator over the items of a `HashSet`.\n\nThis `struct` is created by the [`drain`] method on [`HashSet`].\nSee its documentation for more.\n\n[`drain`]: HashSet::drain\n\n# Examples\n\n```\nuse std::collections::HashSet;\n\nlet mut a = HashSet::from([1, 2, 3]);\n\nlet mut drain = a.drain();\n```",
- "id": 1240,
+ "id": 1239,
"inner": {
"struct": {
"generics": {
@@ -148670,6 +167201,7 @@
"where_predicates": []
},
"impls": [
+ 1397,
1398,
1399,
1400,
@@ -148683,11 +167215,10 @@
1408,
1409,
1410,
- 1411,
- 1416,
+ 1415,
+ 1417,
1418,
- 1419,
- 1421
+ 1420
],
"kind": {
"plain": {
@@ -148698,8 +167229,8 @@
}
},
"links": {
- "HashSet::drain": 1239,
- "`HashSet`": 1230
+ "HashSet::drain": 1238,
+ "`HashSet`": 1229
},
"name": "Drain",
"span": {
@@ -148715,7 +167246,43 @@
},
"visibility": "public"
},
- "1241": {
+ "124": {
+ "attrs": [
+ {
+ "other": "#[doc(no_inline)]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"builtin_macro_prelude\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 124,
+ "inner": {
+ "use": {
+ "id": 125,
+ "is_glob": false,
+ "name": "PartialOrd",
+ "source": "core::prelude::v1::PartialOrd"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 52,
+ 85
+ ],
+ "end": [
+ 52,
+ 95
+ ],
+ "filename": "std/src/prelude/v1.rs"
+ },
+ "visibility": "public"
+ },
+ "1240": {
"attrs": [
{
"other": "#[rustc_lint_query_instability]"
@@ -148727,7 +167294,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Retains only the elements specified by the predicate.\n\nIn other words, remove all elements `e` for which `f(&e)` returns `false`.\nThe elements are visited in unsorted (and unspecified) order.\n\n# Examples\n\n```\nuse std::collections::HashSet;\n\nlet mut set = HashSet::from([1, 2, 3, 4, 5, 6]);\nset.retain(|&k| k % 2 == 0);\nassert_eq!(set, HashSet::from([2, 4, 6]));\n```\n\n# Performance\n\nIn the current implementation, this operation takes O(capacity) time\ninstead of O(len) because it internally visits empty buckets too.",
- "id": 1241,
+ "id": 1240,
"inner": {
"function": {
"generics": {
@@ -148832,7 +167399,7 @@
},
"visibility": "public"
},
- "1242": {
+ "1241": {
"attrs": [
{
"other": "#[rustc_lint_query_instability]"
@@ -148847,7 +167414,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Creates an iterator which uses a closure to determine if an element should be removed.\n\nIf the closure returns `true`, the element is removed from the set and\nyielded. If the closure returns `false`, or panics, the element remains\nin the set and will not be yielded.\n\nIf the returned `ExtractIf` is not exhausted, e.g. because it is dropped without iterating\nor the iteration short-circuits, then the remaining elements will be retained.\nUse [`retain`] with a negated predicate if you do not need the returned iterator.\n\n[`retain`]: HashSet::retain\n\n# Examples\n\nSplitting a set into even and odd values, reusing the original set:\n\n```\nuse std::collections::HashSet;\n\nlet mut set: HashSet = (0..8).collect();\nlet extracted: HashSet = set.extract_if(|v| v % 2 == 0).collect();\n\nlet mut evens = extracted.into_iter().collect::>();\nlet mut odds = set.into_iter().collect::>();\nevens.sort();\nodds.sort();\n\nassert_eq!(evens, vec![0, 2, 4, 6]);\nassert_eq!(odds, vec![1, 3, 5, 7]);\n```",
- "id": 1242,
+ "id": 1241,
"inner": {
"function": {
"generics": {
@@ -148955,7 +167522,7 @@
"constraints": []
}
},
- "id": 1243,
+ "id": 1242,
"path": "ExtractIf"
}
}
@@ -148963,7 +167530,7 @@
}
},
"links": {
- "HashSet::retain": 1241
+ "HashSet::retain": 1240
},
"name": "extract_if",
"span": {
@@ -148979,7 +167546,7 @@
},
"visibility": "public"
},
- "1243": {
+ "1242": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 88, patch: 0})}, feature: \"hash_extract_if\"}}]"
@@ -148988,7 +167555,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "A draining, filtering iterator over the items of a `HashSet`.\n\nThis `struct` is created by the [`extract_if`] method on [`HashSet`].\n\n[`extract_if`]: HashSet::extract_if\n\n# Examples\n\n```\nuse std::collections::HashSet;\n\nlet mut a = HashSet::from([1, 2, 3]);\n\nlet mut extract_ifed = a.extract_if(|v| v % 2 == 0);\n```",
- "id": 1243,
+ "id": 1242,
"inner": {
"struct": {
"generics": {
@@ -149025,6 +167592,7 @@
"where_predicates": []
},
"impls": [
+ 1422,
1423,
1424,
1425,
@@ -149038,10 +167606,9 @@
1433,
1434,
1435,
- 1436,
+ 1439,
1440,
- 1441,
- 1443
+ 1442
],
"kind": {
"plain": {
@@ -149052,8 +167619,8 @@
}
},
"links": {
- "HashSet::extract_if": 1242,
- "`HashSet`": 1230
+ "HashSet::extract_if": 1241,
+ "`HashSet`": 1229
},
"name": "ExtractIf",
"span": {
@@ -149069,7 +167636,7 @@
},
"visibility": "public"
},
- "1244": {
+ "1243": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -149081,7 +167648,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Clears the set, removing all values.\n\n# Examples\n\n```\nuse std::collections::HashSet;\n\nlet mut v = HashSet::new();\nv.insert(1);\nv.clear();\nassert!(v.is_empty());\n```",
- "id": 1244,
+ "id": 1243,
"inner": {
"function": {
"generics": {
@@ -149130,7 +167697,7 @@
},
"visibility": "public"
},
- "1245": {
+ "1244": {
"attrs": [
{
"other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"const_collections_with_hasher\",\npromotable: false}}]"
@@ -149145,7 +167712,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Creates a new empty hash set which will use the given hasher to hash\nkeys.\n\nThe hash set is also created with the default initial capacity.\n\nWarning: `hasher` is normally randomly generated, and\nis designed to allow `HashSet`s to be resistant to attacks that\ncause many collisions and very poor performance. Setting it\nmanually using this function can expose a DoS attack vector.\n\nThe `hash_builder` passed should implement the [`BuildHasher`] trait for\nthe `HashSet` to be useful, see its documentation for details.\n\n# Examples\n\n```\nuse std::collections::HashSet;\nuse std::hash::RandomState;\n\nlet s = RandomState::new();\nlet mut set = HashSet::with_hasher(s);\nset.insert(2);\n```",
- "id": 1245,
+ "id": 1244,
"inner": {
"function": {
"generics": {
@@ -149188,7 +167755,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -149212,7 +167779,7 @@
},
"visibility": "public"
},
- "1246": {
+ "1245": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"hashmap_build_hasher\"}}]"
@@ -149224,7 +167791,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Creates an empty `HashSet` with at least the specified capacity, using\n`hasher` to hash the keys.\n\nThe hash set will be able to hold at least `capacity` elements without\nreallocating. This method is allowed to allocate for more elements than\n`capacity`. If `capacity` is zero, the hash set will not allocate.\n\nWarning: `hasher` is normally randomly generated, and\nis designed to allow `HashSet`s to be resistant to attacks that\ncause many collisions and very poor performance. Setting it\nmanually using this function can expose a DoS attack vector.\n\nThe `hash_builder` passed should implement the [`BuildHasher`] trait for\nthe `HashSet` to be useful, see its documentation for details.\n\n# Examples\n\n```\nuse std::collections::HashSet;\nuse std::hash::RandomState;\n\nlet s = RandomState::new();\nlet mut set = HashSet::with_capacity_and_hasher(10, s);\nset.insert(1);\n```",
- "id": 1246,
+ "id": 1245,
"inner": {
"function": {
"generics": {
@@ -149273,7 +167840,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -149297,7 +167864,7 @@
},
"visibility": "public"
},
- "1247": {
+ "1246": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 9, patch: 0})}, feature: \"hashmap_public_hasher\"}}]"
@@ -149309,7 +167876,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Returns a reference to the set's [`BuildHasher`].\n\n# Examples\n\n```\nuse std::collections::HashSet;\nuse std::hash::RandomState;\n\nlet hasher = RandomState::new();\nlet set: HashSet = HashSet::with_hasher(hasher);\nlet hasher: &RandomState = set.hasher();\n```",
- "id": 1247,
+ "id": 1246,
"inner": {
"function": {
"generics": {
@@ -149368,12 +167935,12 @@
},
"visibility": "public"
},
- "1248": {
+ "1247": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1248,
+ "id": 1247,
"inner": {
"impl": {
"blanket_impl": null,
@@ -149396,7 +167963,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
},
@@ -149429,17 +167996,17 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 1233,
1234,
- 1235,
+ 1236,
1237,
1238,
- 1239,
- 1242,
1241,
+ 1240,
+ 1243,
1244,
1245,
- 1246,
- 1247
+ 1246
],
"provided_trait_methods": [],
"trait": null
@@ -149460,7 +168027,7 @@
},
"visibility": "default"
},
- "1249": {
+ "1248": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -149472,7 +168039,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Reserves capacity for at least `additional` more elements to be inserted\nin the `HashSet`. The collection may reserve more space to speculatively\navoid frequent reallocations. After calling `reserve`,\ncapacity will be greater than or equal to `self.len() + additional`.\nDoes nothing if capacity is already sufficient.\n\n# Panics\n\nPanics if the new allocation size overflows `usize`.\n\n# Examples\n\n```\nuse std::collections::HashSet;\nlet mut set: HashSet = HashSet::new();\nset.reserve(10);\nassert!(set.capacity() >= 10);\n```",
- "id": 1249,
+ "id": 1248,
"inner": {
"function": {
"generics": {
@@ -149527,7 +168094,7 @@
},
"visibility": "public"
},
- "1250": {
+ "1249": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 57, patch: 0})}, feature: \"try_reserve\"}}]"
@@ -149539,7 +168106,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Tries to reserve capacity for at least `additional` more elements to be inserted\nin the `HashSet`. The collection may reserve more space to speculatively\navoid frequent reallocations. After calling `try_reserve`,\ncapacity will be greater than or equal to `self.len() + additional` if\nit returns `Ok(())`.\nDoes nothing if capacity is already sufficient.\n\n# Errors\n\nIf the capacity overflows, or the allocator reports a failure, then an error\nis returned.\n\n# Examples\n\n```\nuse std::collections::HashSet;\nlet mut set: HashSet = HashSet::new();\nset.try_reserve(10).expect(\"why is the test harness OOMing on a handful of bytes?\");\n```",
- "id": 1250,
+ "id": 1249,
"inner": {
"function": {
"generics": {
@@ -149620,7 +168187,7 @@
},
"visibility": "public"
},
- "1251": {
+ "1250": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -149632,7 +168199,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Shrinks the capacity of the set as much as possible. It will drop\ndown as much as possible while maintaining the internal rules\nand possibly leaving some space in accordance with the resize policy.\n\n# Examples\n\n```\nuse std::collections::HashSet;\n\nlet mut set = HashSet::with_capacity(100);\nset.insert(1);\nset.insert(2);\nassert!(set.capacity() >= 100);\nset.shrink_to_fit();\nassert!(set.capacity() >= 2);\n```",
- "id": 1251,
+ "id": 1250,
"inner": {
"function": {
"generics": {
@@ -149681,7 +168248,7 @@
},
"visibility": "public"
},
- "1252": {
+ "1251": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 56, patch: 0})}, feature: \"shrink_to\"}}]"
@@ -149693,7 +168260,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Shrinks the capacity of the set with a lower limit. It will drop\ndown no lower than the supplied limit while maintaining the internal rules\nand possibly leaving some space in accordance with the resize policy.\n\nIf the current capacity is less than the lower limit, this is a no-op.\n# Examples\n\n```\nuse std::collections::HashSet;\n\nlet mut set = HashSet::with_capacity(100);\nset.insert(1);\nset.insert(2);\nassert!(set.capacity() >= 100);\nset.shrink_to(10);\nassert!(set.capacity() >= 10);\nset.shrink_to(0);\nassert!(set.capacity() >= 2);\n```",
- "id": 1252,
+ "id": 1251,
"inner": {
"function": {
"generics": {
@@ -149748,7 +168315,7 @@
},
"visibility": "public"
},
- "1253": {
+ "1252": {
"attrs": [
{
"other": "#[rustc_lint_query_instability]"
@@ -149763,7 +168330,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Visits the values representing the difference,\ni.e., the values that are in `self` but not in `other`.\n\n# Examples\n\n```\nuse std::collections::HashSet;\nlet a = HashSet::from([1, 2, 3]);\nlet b = HashSet::from([4, 2, 3, 4]);\n\n// Can be seen as `a - b`.\nfor x in a.difference(&b) {\n println!(\"{x}\"); // Print 1\n}\n\nlet diff: HashSet<_> = a.difference(&b).collect();\nassert_eq!(diff, [1].iter().collect());\n\n// Note that difference is not symmetric,\n// and `b - a` means something else:\nlet diff: HashSet<_> = b.difference(&a).collect();\nassert_eq!(diff, [4].iter().collect());\n```",
- "id": 1253,
+ "id": 1252,
"inner": {
"function": {
"generics": {
@@ -149825,7 +168392,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -149856,7 +168423,7 @@
"constraints": []
}
},
- "id": 1254,
+ "id": 1253,
"path": "Difference"
}
}
@@ -149878,7 +168445,7 @@
},
"visibility": "public"
},
- "1254": {
+ "1253": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -149892,7 +168459,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "A lazy iterator producing elements in the difference of `HashSet`s.\n\nThis `struct` is created by the [`difference`] method on [`HashSet`].\nSee its documentation for more.\n\n[`difference`]: HashSet::difference\n\n# Examples\n\n```\nuse std::collections::HashSet;\n\nlet a = HashSet::from([1, 2, 3]);\nlet b = HashSet::from([4, 2, 3, 4]);\n\nlet mut difference = a.difference(&b);\n```",
- "id": 1254,
+ "id": 1253,
"inner": {
"struct": {
"generics": {
@@ -149937,6 +168504,7 @@
"where_predicates": []
},
"impls": [
+ 1473,
1474,
1475,
1476,
@@ -149952,11 +168520,10 @@
1486,
1487,
1488,
- 1489,
- 1491,
+ 1490,
+ 1495,
1496,
- 1497,
- 1499
+ 1498
],
"kind": {
"plain": {
@@ -149967,8 +168534,8 @@
}
},
"links": {
- "HashSet::difference": 1253,
- "`HashSet`": 1230
+ "HashSet::difference": 1252,
+ "`HashSet`": 1229
},
"name": "Difference",
"span": {
@@ -149984,7 +168551,7 @@
},
"visibility": "public"
},
- "1255": {
+ "1254": {
"attrs": [
{
"other": "#[rustc_lint_query_instability]"
@@ -149999,7 +168566,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Visits the values representing the symmetric difference,\ni.e., the values that are in `self` or in `other` but not in both.\n\n# Examples\n\n```\nuse std::collections::HashSet;\nlet a = HashSet::from([1, 2, 3]);\nlet b = HashSet::from([4, 2, 3, 4]);\n\n// Print 1, 4 in arbitrary order.\nfor x in a.symmetric_difference(&b) {\n println!(\"{x}\");\n}\n\nlet diff1: HashSet<_> = a.symmetric_difference(&b).collect();\nlet diff2: HashSet<_> = b.symmetric_difference(&a).collect();\n\nassert_eq!(diff1, diff2);\nassert_eq!(diff1, [1, 4].iter().collect());\n```",
- "id": 1255,
+ "id": 1254,
"inner": {
"function": {
"generics": {
@@ -150061,7 +168628,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -150092,7 +168659,7 @@
"constraints": []
}
},
- "id": 1256,
+ "id": 1255,
"path": "SymmetricDifference"
}
}
@@ -150114,7 +168681,7 @@
},
"visibility": "public"
},
- "1256": {
+ "1255": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -150128,7 +168695,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "A lazy iterator producing elements in the symmetric difference of `HashSet`s.\n\nThis `struct` is created by the [`symmetric_difference`] method on\n[`HashSet`]. See its documentation for more.\n\n[`symmetric_difference`]: HashSet::symmetric_difference\n\n# Examples\n\n```\nuse std::collections::HashSet;\n\nlet a = HashSet::from([1, 2, 3]);\nlet b = HashSet::from([4, 2, 3, 4]);\n\nlet mut intersection = a.symmetric_difference(&b);\n```",
- "id": 1256,
+ "id": 1255,
"inner": {
"struct": {
"generics": {
@@ -150173,6 +168740,7 @@
"where_predicates": []
},
"impls": [
+ 1500,
1501,
1502,
1503,
@@ -150188,11 +168756,10 @@
1513,
1514,
1515,
- 1516,
- 1518,
+ 1517,
+ 1522,
1523,
- 1524,
- 1526
+ 1525
],
"kind": {
"plain": {
@@ -150203,8 +168770,8 @@
}
},
"links": {
- "HashSet::symmetric_difference": 1255,
- "`HashSet`": 1230
+ "HashSet::symmetric_difference": 1254,
+ "`HashSet`": 1229
},
"name": "SymmetricDifference",
"span": {
@@ -150220,7 +168787,7 @@
},
"visibility": "public"
},
- "1257": {
+ "1256": {
"attrs": [
{
"other": "#[rustc_lint_query_instability]"
@@ -150235,7 +168802,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Visits the values representing the intersection,\ni.e., the values that are both in `self` and `other`.\n\nWhen an equal element is present in `self` and `other`\nthen the resulting `Intersection` may yield references to\none or the other. This can be relevant if `T` contains fields which\nare not compared by its `Eq` implementation, and may hold different\nvalue between the two equal copies of `T` in the two sets.\n\n# Examples\n\n```\nuse std::collections::HashSet;\nlet a = HashSet::from([1, 2, 3]);\nlet b = HashSet::from([4, 2, 3, 4]);\n\n// Print 2, 3 in arbitrary order.\nfor x in a.intersection(&b) {\n println!(\"{x}\");\n}\n\nlet intersection: HashSet<_> = a.intersection(&b).collect();\nassert_eq!(intersection, [2, 3].iter().collect());\n```",
- "id": 1257,
+ "id": 1256,
"inner": {
"function": {
"generics": {
@@ -150297,7 +168864,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -150328,7 +168895,7 @@
"constraints": []
}
},
- "id": 1258,
+ "id": 1257,
"path": "Intersection"
}
}
@@ -150350,7 +168917,7 @@
},
"visibility": "public"
},
- "1258": {
+ "1257": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -150364,7 +168931,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "A lazy iterator producing elements in the intersection of `HashSet`s.\n\nThis `struct` is created by the [`intersection`] method on [`HashSet`].\nSee its documentation for more.\n\n[`intersection`]: HashSet::intersection\n\n# Examples\n\n```\nuse std::collections::HashSet;\n\nlet a = HashSet::from([1, 2, 3]);\nlet b = HashSet::from([4, 2, 3, 4]);\n\nlet mut intersection = a.intersection(&b);\n```",
- "id": 1258,
+ "id": 1257,
"inner": {
"struct": {
"generics": {
@@ -150409,6 +168976,7 @@
"where_predicates": []
},
"impls": [
+ 1445,
1446,
1447,
1448,
@@ -150424,11 +168992,10 @@
1458,
1459,
1460,
- 1461,
- 1463,
- 1468,
- 1470,
- 1471
+ 1462,
+ 1467,
+ 1469,
+ 1470
],
"kind": {
"plain": {
@@ -150439,8 +169006,8 @@
}
},
"links": {
- "HashSet::intersection": 1257,
- "`HashSet`": 1230
+ "HashSet::intersection": 1256,
+ "`HashSet`": 1229
},
"name": "Intersection",
"span": {
@@ -150456,7 +169023,7 @@
},
"visibility": "public"
},
- "1259": {
+ "1258": {
"attrs": [
{
"other": "#[rustc_lint_query_instability]"
@@ -150471,7 +169038,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Visits the values representing the union,\ni.e., all the values in `self` or `other`, without duplicates.\n\n# Examples\n\n```\nuse std::collections::HashSet;\nlet a = HashSet::from([1, 2, 3]);\nlet b = HashSet::from([4, 2, 3, 4]);\n\n// Print 1, 2, 3, 4 in arbitrary order.\nfor x in a.union(&b) {\n println!(\"{x}\");\n}\n\nlet union: HashSet<_> = a.union(&b).collect();\nassert_eq!(union, [1, 2, 3, 4].iter().collect());\n```",
- "id": 1259,
+ "id": 1258,
"inner": {
"function": {
"generics": {
@@ -150533,7 +169100,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -150564,7 +169131,7 @@
"constraints": []
}
},
- "id": 1260,
+ "id": 1259,
"path": "Union"
}
}
@@ -150586,43 +169153,7 @@
},
"visibility": "public"
},
- "126": {
- "attrs": [
- {
- "other": "#[doc(no_inline)]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"builtin_macro_prelude\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 126,
- "inner": {
- "use": {
- "id": 127,
- "is_glob": false,
- "name": "PartialOrd",
- "source": "core::prelude::v1::PartialOrd"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 52,
- 85
- ],
- "end": [
- 52,
- 95
- ],
- "filename": "std/src/prelude/v1.rs"
- },
- "visibility": "public"
- },
- "1260": {
+ "1259": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -150636,7 +169167,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "A lazy iterator producing elements in the union of `HashSet`s.\n\nThis `struct` is created by the [`union`] method on [`HashSet`].\nSee its documentation for more.\n\n[`union`]: HashSet::union\n\n# Examples\n\n```\nuse std::collections::HashSet;\n\nlet a = HashSet::from([1, 2, 3]);\nlet b = HashSet::from([4, 2, 3, 4]);\n\nlet mut union_iter = a.union(&b);\n```",
- "id": 1260,
+ "id": 1259,
"inner": {
"struct": {
"generics": {
@@ -150681,6 +169212,7 @@
"where_predicates": []
},
"impls": [
+ 1527,
1528,
1529,
1530,
@@ -150696,11 +169228,10 @@
1540,
1541,
1542,
- 1543,
+ 1544,
1545,
- 1546,
- 1548,
- 1554
+ 1547,
+ 1553
],
"kind": {
"plain": {
@@ -150711,8 +169242,8 @@
}
},
"links": {
- "HashSet::union": 1259,
- "`HashSet`": 1230
+ "HashSet::union": 1258,
+ "`HashSet`": 1229
},
"name": "Union",
"span": {
@@ -150728,7 +169259,43 @@
},
"visibility": "public"
},
- "1261": {
+ "126": {
+ "attrs": [
+ {
+ "other": "#[doc(no_inline)]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"builtin_macro_prelude\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 126,
+ "inner": {
+ "use": {
+ "id": 127,
+ "is_glob": false,
+ "name": "PartialOrd",
+ "source": "core::prelude::v1::PartialOrd"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 52,
+ 85
+ ],
+ "end": [
+ 52,
+ 95
+ ],
+ "filename": "std/src/prelude/v1.rs"
+ },
+ "visibility": "public"
+ },
+ "1260": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -150740,7 +169307,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Returns `true` if the set contains a value.\n\nThe value may be any borrowed form of the set's value type, but\n[`Hash`] and [`Eq`] on the borrowed form *must* match those for\nthe value type.\n\n# Examples\n\n```\nuse std::collections::HashSet;\n\nlet set = HashSet::from([1, 2, 3]);\nassert_eq!(set.contains(&1), true);\nassert_eq!(set.contains(&4), false);\n```",
- "id": 1261,
+ "id": 1260,
"inner": {
"function": {
"generics": {
@@ -150777,7 +169344,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -150809,7 +169376,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -150876,7 +169443,7 @@
}
},
"links": {
- "`Eq`": 113,
+ "`Eq`": 111,
"`Hash`": 539
},
"name": "contains",
@@ -150893,7 +169460,7 @@
},
"visibility": "public"
},
- "1262": {
+ "1261": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 9, patch: 0})}, feature: \"set_recovery\"}}]"
@@ -150905,7 +169472,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Returns a reference to the value in the set, if any, that is equal to the given value.\n\nThe value may be any borrowed form of the set's value type, but\n[`Hash`] and [`Eq`] on the borrowed form *must* match those for\nthe value type.\n\n# Examples\n\n```\nuse std::collections::HashSet;\n\nlet set = HashSet::from([1, 2, 3]);\nassert_eq!(set.get(&2), Some(&2));\nassert_eq!(set.get(&4), None);\n```",
- "id": 1262,
+ "id": 1261,
"inner": {
"function": {
"generics": {
@@ -150942,7 +169509,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -150974,7 +169541,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -151062,7 +169629,7 @@
}
},
"links": {
- "`Eq`": 113,
+ "`Eq`": 111,
"`Hash`": 539
},
"name": "get",
@@ -151079,7 +169646,7 @@
},
"visibility": "public"
},
- "1263": {
+ "1262": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 60896, is_soft: false}, feature: \"hash_set_entry\"}}]"
@@ -151091,7 +169658,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Inserts the given `value` into the set if it is not present, then\nreturns a reference to the value in the set.\n\n# Examples\n\n```\n#![feature(hash_set_entry)]\n\nuse std::collections::HashSet;\n\nlet mut set = HashSet::from([1, 2, 3]);\nassert_eq!(set.len(), 3);\nassert_eq!(set.get_or_insert(2), &2);\nassert_eq!(set.get_or_insert(100), &100);\nassert_eq!(set.len(), 4); // 100 was inserted\n```",
- "id": 1263,
+ "id": 1262,
"inner": {
"function": {
"generics": {
@@ -151154,7 +169721,7 @@
},
"visibility": "public"
},
- "1264": {
+ "1263": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 60896, is_soft: false}, feature: \"hash_set_entry\"}}]"
@@ -151166,7 +169733,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Inserts a value computed from `f` into the set if the given `value` is\nnot present, then returns a reference to the value in the set.\n\n# Examples\n\n```\n#![feature(hash_set_entry)]\n\nuse std::collections::HashSet;\n\nlet mut set: HashSet = [\"cat\", \"dog\", \"horse\"]\n .iter().map(|&pet| pet.to_owned()).collect();\n\nassert_eq!(set.len(), 3);\nfor &pet in &[\"cat\", \"dog\", \"fish\"] {\n let value = set.get_or_insert_with(pet, str::to_owned);\n assert_eq!(value, pet);\n}\nassert_eq!(set.len(), 4); // a new \"fish\" was inserted\n```",
- "id": 1264,
+ "id": 1263,
"inner": {
"function": {
"generics": {
@@ -151213,7 +169780,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -151245,7 +169812,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -151376,7 +169943,7 @@
},
"visibility": "public"
},
- "1265": {
+ "1264": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 60896, is_soft: false}, feature: \"hash_set_entry\"}}]"
@@ -151388,7 +169955,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Gets the given value's corresponding entry in the set for in-place manipulation.\n\n# Examples\n\n```\n#![feature(hash_set_entry)]\n\nuse std::collections::HashSet;\nuse std::collections::hash_set::Entry::*;\n\nlet mut singles = HashSet::new();\nlet mut dupes = HashSet::new();\n\nfor ch in \"a short treatise on fungi\".chars() {\n if let Vacant(dupe_entry) = dupes.entry(ch) {\n // We haven't already seen a duplicate, so\n // check if we've at least seen it once.\n match singles.entry(ch) {\n Vacant(single_entry) => {\n // We found a new character for the first time.\n single_entry.insert()\n }\n Occupied(single_entry) => {\n // We've already seen this once, \"move\" it to dupes.\n single_entry.remove();\n dupe_entry.insert();\n }\n }\n }\n}\n\nassert!(!singles.contains(&'t') && dupes.contains(&'t'));\nassert!(singles.contains(&'u') && !dupes.contains(&'u'));\nassert!(!singles.contains(&'v') && !dupes.contains(&'v'));\n```",
- "id": 1265,
+ "id": 1264,
"inner": {
"function": {
"generics": {
@@ -151446,7 +170013,7 @@
"constraints": []
}
},
- "id": 1266,
+ "id": 1265,
"path": "Entry"
}
}
@@ -151468,7 +170035,7 @@
},
"visibility": "public"
},
- "1266": {
+ "1265": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 60896, is_soft: false}, feature: \"hash_set_entry\"}}]"
@@ -151477,7 +170044,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "A view into a single entry in a set, which may either be vacant or occupied.\n\nThis `enum` is constructed from the [`entry`] method on [`HashSet`].\n\n[`HashSet`]: struct.HashSet.html\n[`entry`]: struct.HashSet.html#method.entry\n\n# Examples\n\n```\n#![feature(hash_set_entry)]\n\nuse std::collections::hash_set::HashSet;\n\nlet mut set = HashSet::new();\nset.extend([\"a\", \"b\", \"c\"]);\nassert_eq!(set.len(), 3);\n\n// Existing value (insert)\nlet entry = set.entry(\"a\");\nlet _raw_o = entry.insert();\nassert_eq!(set.len(), 3);\n// Nonexistent value (insert)\nset.entry(\"d\").insert();\n\n// Existing value (or_insert)\nset.entry(\"b\").or_insert();\n// Nonexistent value (or_insert)\nset.entry(\"e\").or_insert();\n\nprintln!(\"Our HashSet: {:?}\", set);\n\nlet mut vec: Vec<_> = set.iter().copied().collect();\n// The `Iter` iterator produces items in arbitrary order, so the\n// items must be sorted to test them against a sorted array.\nvec.sort_unstable();\nassert_eq!(vec, [\"a\", \"b\", \"c\", \"d\", \"e\"]);\n```",
- "id": 1266,
+ "id": 1265,
"inner": {
"enum": {
"generics": {
@@ -151515,6 +170082,7 @@
},
"has_stripped_variants": false,
"impls": [
+ 1563,
1564,
1565,
1566,
@@ -151528,12 +170096,11 @@
1574,
1575,
1576,
- 1577,
- 1579
+ 1578
],
"variants": [
- 1557,
- 1560
+ 1556,
+ 1559
]
}
},
@@ -151552,7 +170119,7 @@
},
"visibility": "public"
},
- "1267": {
+ "1266": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -151561,7 +170128,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Returns `true` if `self` has no elements in common with `other`.\nThis is equivalent to checking for an empty intersection.\n\n# Examples\n\n```\nuse std::collections::HashSet;\n\nlet a = HashSet::from([1, 2, 3]);\nlet mut b = HashSet::new();\n\nassert_eq!(a.is_disjoint(&b), true);\nb.insert(4);\nassert_eq!(a.is_disjoint(&b), true);\nb.insert(1);\nassert_eq!(a.is_disjoint(&b), false);\n```",
- "id": 1267,
+ "id": 1266,
"inner": {
"function": {
"generics": {
@@ -151614,7 +170181,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -151644,7 +170211,7 @@
},
"visibility": "public"
},
- "1268": {
+ "1267": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -151653,7 +170220,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Returns `true` if the set is a subset of another,\ni.e., `other` contains at least all the values in `self`.\n\n# Examples\n\n```\nuse std::collections::HashSet;\n\nlet sup = HashSet::from([1, 2, 3]);\nlet mut set = HashSet::new();\n\nassert_eq!(set.is_subset(&sup), true);\nset.insert(2);\nassert_eq!(set.is_subset(&sup), true);\nset.insert(4);\nassert_eq!(set.is_subset(&sup), false);\n```",
- "id": 1268,
+ "id": 1267,
"inner": {
"function": {
"generics": {
@@ -151706,7 +170273,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -151736,7 +170303,7 @@
},
"visibility": "public"
},
- "1269": {
+ "1268": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -151748,7 +170315,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Returns `true` if the set is a superset of another,\ni.e., `self` contains at least all the values in `other`.\n\n# Examples\n\n```\nuse std::collections::HashSet;\n\nlet sub = HashSet::from([1, 2]);\nlet mut set = HashSet::new();\n\nassert_eq!(set.is_superset(&sub), false);\n\nset.insert(0);\nset.insert(1);\nassert_eq!(set.is_superset(&sub), false);\n\nset.insert(2);\nassert_eq!(set.is_superset(&sub), true);\n```",
- "id": 1269,
+ "id": 1268,
"inner": {
"function": {
"generics": {
@@ -151801,7 +170368,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -151831,7 +170398,7 @@
},
"visibility": "public"
},
- "1270": {
+ "1269": {
"attrs": [
{
"other": "#[attr = Confusables {symbols: [\"push\", \"append\", \"put\"]}]"
@@ -151846,7 +170413,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Adds a value to the set.\n\nReturns whether the value was newly inserted. That is:\n\n- If the set did not previously contain this value, `true` is returned.\n- If the set already contained this value, `false` is returned,\n and the set is not modified: original value is not replaced,\n and the value passed as argument is dropped.\n\n# Examples\n\n```\nuse std::collections::HashSet;\n\nlet mut set = HashSet::new();\n\nassert_eq!(set.insert(2), true);\nassert_eq!(set.insert(2), false);\nassert_eq!(set.len(), 1);\n```",
- "id": 1270,
+ "id": 1269,
"inner": {
"function": {
"generics": {
@@ -151903,7 +170470,7 @@
},
"visibility": "public"
},
- "1271": {
+ "1270": {
"attrs": [
{
"other": "#[attr = Confusables {symbols: [\"swap\"]}]"
@@ -151918,7 +170485,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Adds a value to the set, replacing the existing value, if any, that is equal to the given\none. Returns the replaced value.\n\n# Examples\n\n```\nuse std::collections::HashSet;\n\nlet mut set = HashSet::new();\nset.insert(Vec::::new());\n\nassert_eq!(set.get(&[][..]).unwrap().capacity(), 0);\nset.replace(Vec::with_capacity(10));\nassert_eq!(set.get(&[][..]).unwrap().capacity(), 10);\n```",
- "id": 1271,
+ "id": 1270,
"inner": {
"function": {
"generics": {
@@ -151990,7 +170557,7 @@
},
"visibility": "public"
},
- "1272": {
+ "1271": {
"attrs": [
{
"other": "#[attr = Confusables {symbols: [\"delete\", \"take\"]}]"
@@ -152005,7 +170572,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Removes a value from the set. Returns whether the value was\npresent in the set.\n\nThe value may be any borrowed form of the set's value type, but\n[`Hash`] and [`Eq`] on the borrowed form *must* match those for\nthe value type.\n\n# Examples\n\n```\nuse std::collections::HashSet;\n\nlet mut set = HashSet::new();\n\nset.insert(2);\nassert_eq!(set.remove(&2), true);\nassert_eq!(set.remove(&2), false);\n```",
- "id": 1272,
+ "id": 1271,
"inner": {
"function": {
"generics": {
@@ -152042,7 +170609,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -152074,7 +170641,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -152141,7 +170708,7 @@
}
},
"links": {
- "`Eq`": 113,
+ "`Eq`": 111,
"`Hash`": 539
},
"name": "remove",
@@ -152158,7 +170725,7 @@
},
"visibility": "public"
},
- "1273": {
+ "1272": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 9, patch: 0})}, feature: \"set_recovery\"}}]"
@@ -152170,7 +170737,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Removes and returns the value in the set, if any, that is equal to the given one.\n\nThe value may be any borrowed form of the set's value type, but\n[`Hash`] and [`Eq`] on the borrowed form *must* match those for\nthe value type.\n\n# Examples\n\n```\nuse std::collections::HashSet;\n\nlet mut set = HashSet::from([1, 2, 3]);\nassert_eq!(set.take(&2), Some(2));\nassert_eq!(set.take(&2), None);\n```",
- "id": 1273,
+ "id": 1272,
"inner": {
"function": {
"generics": {
@@ -152207,7 +170774,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -152239,7 +170806,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -152321,7 +170888,7 @@
}
},
"links": {
- "`Eq`": 113,
+ "`Eq`": 111,
"`Hash`": 539
},
"name": "take",
@@ -152338,12 +170905,12 @@
},
"visibility": "public"
},
- "1274": {
+ "1273": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1274,
+ "id": 1273,
"inner": {
"impl": {
"blanket_impl": null,
@@ -152366,7 +170933,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
},
@@ -152403,7 +170970,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -152453,26 +171020,26 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 1248,
1249,
1250,
1251,
1252,
- 1253,
- 1255,
- 1257,
- 1259,
+ 1254,
+ 1256,
+ 1258,
+ 1260,
1261,
1262,
1263,
1264,
- 1265,
+ 1266,
1267,
1268,
1269,
1270,
1271,
- 1272,
- 1273
+ 1272
],
"provided_trait_methods": [],
"trait": null
@@ -152493,12 +171060,12 @@
},
"visibility": "default"
},
- "1275": {
+ "1274": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1275,
+ "id": 1274,
"inner": {
"impl": {
"blanket_impl": null,
@@ -152521,7 +171088,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
},
@@ -152610,12 +171177,12 @@
"span": null,
"visibility": "default"
},
- "1276": {
+ "1275": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1276,
+ "id": 1275,
"inner": {
"impl": {
"blanket_impl": null,
@@ -152638,7 +171205,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
},
@@ -152727,12 +171294,12 @@
"span": null,
"visibility": "default"
},
- "1277": {
+ "1276": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1277,
+ "id": 1276,
"inner": {
"impl": {
"blanket_impl": null,
@@ -152755,7 +171322,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
},
@@ -152792,7 +171359,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -152813,7 +171380,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -152823,12 +171390,12 @@
"span": null,
"visibility": "default"
},
- "1278": {
+ "1277": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1278,
+ "id": 1277,
"inner": {
"impl": {
"blanket_impl": null,
@@ -152851,7 +171418,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
},
@@ -152940,12 +171507,12 @@
"span": null,
"visibility": "default"
},
- "1279": {
+ "1278": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1279,
+ "id": 1278,
"inner": {
"impl": {
"blanket_impl": null,
@@ -152968,7 +171535,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
},
@@ -153005,7 +171572,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -153026,7 +171593,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -153047,7 +171614,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -153057,48 +171624,12 @@
"span": null,
"visibility": "default"
},
- "128": {
- "attrs": [
- {
- "other": "#[doc(no_inline)]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"builtin_macro_prelude\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 128,
- "inner": {
- "use": {
- "id": 129,
- "is_glob": false,
- "name": "PartialOrd",
- "source": "core::prelude::v1::PartialOrd"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 52,
- 85
- ],
- "end": [
- 52,
- 95
- ],
- "filename": "std/src/prelude/v1.rs"
- },
- "visibility": "public"
- },
- "1280": {
+ "1279": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1280,
+ "id": 1279,
"inner": {
"impl": {
"blanket_impl": null,
@@ -153121,7 +171652,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
},
@@ -153158,7 +171689,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -153179,7 +171710,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -153200,7 +171731,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -153210,12 +171741,48 @@
"span": null,
"visibility": "default"
},
- "1281": {
+ "128": {
+ "attrs": [
+ {
+ "other": "#[doc(no_inline)]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"`concat_bytes` is not stable enough for use and is subject to change\"),\nissue: 87555, is_soft: false}, feature: \"concat_bytes\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 128,
+ "inner": {
+ "use": {
+ "id": 129,
+ "is_glob": false,
+ "name": "concat_bytes",
+ "source": "core::prelude::v1::concat_bytes"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 61,
+ 1
+ ],
+ "end": [
+ 61,
+ 41
+ ],
+ "filename": "std/src/prelude/v1.rs"
+ },
+ "visibility": "public"
+ },
+ "1280": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1281,
+ "id": 1280,
"inner": {
"impl": {
"blanket_impl": {
@@ -153240,7 +171807,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
},
@@ -153285,7 +171852,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -153301,7 +171868,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -153310,23 +171877,23 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1282": {
+ "1281": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1282,
+ "id": 1281,
"inner": {
"impl": {
"blanket_impl": {
@@ -153351,7 +171918,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
},
@@ -153396,7 +171963,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -153412,7 +171979,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -153421,23 +171988,23 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1283": {
+ "1282": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1283,
+ "id": 1282,
"inner": {
"impl": {
"blanket_impl": {
@@ -153462,7 +172029,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
},
@@ -153489,7 +172056,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -153521,23 +172088,23 @@
"name": null,
"span": {
"begin": [
- 516,
+ 515,
1
],
"end": [
- 516,
+ 515,
42
],
"filename": "checkouts/rust/library/core/src/clone.rs"
},
"visibility": "default"
},
- "1284": {
+ "1283": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1284,
+ "id": 1283,
"inner": {
"impl": {
"blanket_impl": {
@@ -153562,7 +172129,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
},
@@ -153628,7 +172195,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -153653,23 +172220,23 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1285": {
+ "1284": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1285,
+ "id": 1284,
"inner": {
"impl": {
"blanket_impl": {
@@ -153694,7 +172261,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
},
@@ -153717,7 +172284,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -153742,23 +172309,23 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1286": {
+ "1285": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1286,
+ "id": 1285,
"inner": {
"impl": {
"blanket_impl": {
@@ -153783,7 +172350,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
},
@@ -153831,7 +172398,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -153849,8 +172416,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -153866,7 +172433,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -153875,23 +172442,23 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1287": {
+ "1286": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1287,
+ "id": 1286,
"inner": {
"impl": {
"blanket_impl": {
@@ -153916,7 +172483,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
},
@@ -153982,8 +172549,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -153999,7 +172566,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -154008,23 +172575,23 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1288": {
+ "1287": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1288,
+ "id": 1287,
"inner": {
"impl": {
"blanket_impl": {
@@ -154049,7 +172616,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
},
@@ -154097,12 +172664,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -154122,12 +172689,12 @@
},
"visibility": "default"
},
- "1289": {
+ "1288": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1289,
+ "id": 1288,
"inner": {
"impl": {
"blanket_impl": {
@@ -154152,7 +172719,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
},
@@ -154179,7 +172746,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -154206,7 +172773,7 @@
],
"trait": {
"args": null,
- "id": 157,
+ "id": 155,
"path": "ToOwned"
}
}
@@ -154215,18 +172782,18 @@
"name": null,
"span": {
"begin": [
- 82,
+ 85,
1
],
"end": [
- 84,
+ 87,
14
],
"filename": "checkouts/rust/library/alloc/src/borrow.rs"
},
"visibility": "default"
},
- "1290": {
+ "1289": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -154235,7 +172802,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1290,
+ "id": 1289,
"inner": {
"function": {
"generics": {
@@ -154286,7 +172853,7 @@
},
"visibility": "default"
},
- "1291": {
+ "1290": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -154295,7 +172862,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Overwrites the contents of `self` with a clone of the contents of `source`.\n\nThis method is preferred over simply assigning `source.clone()` to `self`,\nas it avoids reallocation if possible.",
- "id": 1291,
+ "id": 1290,
"inner": {
"function": {
"generics": {
@@ -154356,7 +172923,7 @@
},
"visibility": "default"
},
- "1292": {
+ "1291": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -154365,7 +172932,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1292,
+ "id": 1291,
"inner": {
"impl": {
"blanket_impl": null,
@@ -154388,7 +172955,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
},
@@ -154425,7 +172992,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -154446,7 +173013,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -154464,15 +173031,15 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1290,
- 1291
+ 1289,
+ 1290
],
"provided_trait_methods": [
"clone_from"
],
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -154492,12 +173059,12 @@
},
"visibility": "default"
},
- "1293": {
+ "1292": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1293,
+ "id": 1292,
"inner": {
"function": {
"generics": {
@@ -154550,7 +173117,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -154580,7 +173147,7 @@
},
"visibility": "default"
},
- "1294": {
+ "1293": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -154589,7 +173156,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1294,
+ "id": 1293,
"inner": {
"impl": {
"blanket_impl": null,
@@ -154612,7 +173179,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
},
@@ -154649,7 +173216,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -154699,14 +173266,14 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1293
+ 1292
],
"provided_trait_methods": [
"ne"
],
"trait": {
"args": null,
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -154726,7 +173293,7 @@
},
"visibility": "default"
},
- "1295": {
+ "1294": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -154735,7 +173302,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1295,
+ "id": 1294,
"inner": {
"impl": {
"blanket_impl": null,
@@ -154758,7 +173325,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
},
@@ -154795,7 +173362,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -154850,7 +173417,7 @@
],
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -154870,12 +173437,12 @@
},
"visibility": "default"
},
- "1296": {
+ "1295": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1296,
+ "id": 1295,
"inner": {
"function": {
"generics": {
@@ -154921,7 +173488,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -154933,7 +173500,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -154955,7 +173522,7 @@
},
"visibility": "default"
},
- "1297": {
+ "1296": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -154964,7 +173531,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1297,
+ "id": 1296,
"inner": {
"impl": {
"blanket_impl": null,
@@ -154987,7 +173554,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
},
@@ -155024,7 +173591,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "fmt::Debug"
}
}
@@ -155042,12 +173609,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1296
+ 1295
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -155067,7 +173634,7 @@
},
"visibility": "default"
},
- "1298": {
+ "1297": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -155076,7 +173643,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1298,
+ "id": 1297,
"inner": {
"function": {
"generics": {
@@ -155159,7 +173726,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -155181,7 +173748,7 @@
},
"visibility": "default"
},
- "1299": {
+ "1298": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -155190,7 +173757,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1299,
+ "id": 1298,
"inner": {
"impl": {
"blanket_impl": null,
@@ -155213,7 +173780,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
},
@@ -155250,7 +173817,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -155293,7 +173860,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 109,
+ "id": 107,
"path": "Default"
}
}
@@ -155311,7 +173878,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1298
+ 1297
],
"provided_trait_methods": [],
"trait": {
@@ -155327,7 +173894,7 @@
"constraints": []
}
},
- "id": 201,
+ "id": 199,
"path": "FromIterator"
}
}
@@ -155347,48 +173914,12 @@
},
"visibility": "default"
},
- "130": {
- "attrs": [
- {
- "other": "#[doc(no_inline)]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"`concat_bytes` is not stable enough for use and is subject to change\"),\nissue: 87555, is_soft: false}, feature: \"concat_bytes\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 130,
- "inner": {
- "use": {
- "id": 131,
- "is_glob": false,
- "name": "concat_bytes",
- "source": "core::prelude::v1::concat_bytes"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 61,
- 1
- ],
- "end": [
- 61,
- 41
- ],
- "filename": "std/src/prelude/v1.rs"
- },
- "visibility": "public"
- },
- "1300": {
+ "1299": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": "Converts a `[T; N]` into a `HashSet`.\n\nIf the array contains any equal values,\nall but one will be dropped.\n\n# Examples\n\n```\nuse std::collections::HashSet;\n\nlet set1 = HashSet::from([1, 2, 3, 4]);\nlet set2: HashSet<_> = [1, 2, 3, 4].into();\nassert_eq!(set1, set2);\n```",
- "id": 1300,
+ "id": 1299,
"inner": {
"function": {
"generics": {
@@ -155438,7 +173969,40 @@
},
"visibility": "default"
},
- "1301": {
+ "130": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"builtin_macro_prelude\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 130,
+ "inner": {
+ "use": {
+ "id": 131,
+ "is_glob": false,
+ "name": "alloc_error_handler",
+ "source": "core::prelude::v1::alloc_error_handler"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 67,
+ 5
+ ],
+ "end": [
+ 67,
+ 24
+ ],
+ "filename": "std/src/prelude/v1.rs"
+ },
+ "visibility": "public"
+ },
+ "1300": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 56, patch: 0})}, feature: \"std_collections_from_array\"}}]"
@@ -155447,7 +174011,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1301,
+ "id": 1300,
"inner": {
"impl": {
"blanket_impl": null,
@@ -155474,7 +174038,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
},
@@ -155512,7 +174076,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -155541,7 +174105,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1300
+ 1299
],
"provided_trait_methods": [],
"trait": {
@@ -155582,7 +174146,7 @@
},
"visibility": "default"
},
- "1302": {
+ "1301": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -155591,7 +174155,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1302,
+ "id": 1301,
"inner": {
"function": {
"generics": {
@@ -155686,7 +174250,7 @@
},
"visibility": "default"
},
- "1303": {
+ "1302": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -155695,7 +174259,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1303,
+ "id": 1302,
"inner": {
"function": {
"generics": {
@@ -155750,7 +174314,7 @@
},
"visibility": "default"
},
- "1304": {
+ "1303": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -155759,7 +174323,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1304,
+ "id": 1303,
"inner": {
"function": {
"generics": {
@@ -155814,7 +174378,7 @@
},
"visibility": "default"
},
- "1305": {
+ "1304": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -155823,7 +174387,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1305,
+ "id": 1304,
"inner": {
"impl": {
"blanket_impl": null,
@@ -155846,7 +174410,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
},
@@ -155883,7 +174447,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -155933,9 +174497,9 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 1301,
1302,
- 1303,
- 1304
+ 1303
],
"provided_trait_methods": [
"extend_one",
@@ -155975,7 +174539,7 @@
},
"visibility": "default"
},
- "1306": {
+ "1305": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -155984,7 +174548,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1306,
+ "id": 1305,
"inner": {
"function": {
"generics": {
@@ -156085,7 +174649,7 @@
},
"visibility": "default"
},
- "1307": {
+ "1306": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -156094,7 +174658,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1307,
+ "id": 1306,
"inner": {
"function": {
"generics": {
@@ -156155,7 +174719,7 @@
},
"visibility": "default"
},
- "1308": {
+ "1307": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -156164,7 +174728,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1308,
+ "id": 1307,
"inner": {
"function": {
"generics": {
@@ -156219,7 +174783,7 @@
},
"visibility": "default"
},
- "1309": {
+ "1308": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 4, patch: 0})}, feature: \"hash_extend_copy\"}}]"
@@ -156228,7 +174792,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1309,
+ "id": 1308,
"inner": {
"impl": {
"blanket_impl": null,
@@ -156251,7 +174815,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
},
@@ -156299,7 +174863,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -156321,7 +174885,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 103,
+ "id": 101,
"path": "Copy"
}
}
@@ -156360,9 +174924,9 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 1305,
1306,
- 1307,
- 1308
+ 1307
],
"provided_trait_methods": [
"extend_one",
@@ -156408,7 +174972,7 @@
},
"visibility": "default"
},
- "1310": {
+ "1309": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -156417,7 +174981,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Creates an empty `HashSet` with the `Default` value for the hasher.",
- "id": 1310,
+ "id": 1309,
"inner": {
"function": {
"generics": {
@@ -156453,7 +175017,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -156475,7 +175039,7 @@
},
"visibility": "default"
},
- "1311": {
+ "1310": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -156484,7 +175048,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1311,
+ "id": 1310,
"inner": {
"impl": {
"blanket_impl": null,
@@ -156507,7 +175071,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
},
@@ -156544,7 +175108,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 109,
+ "id": 107,
"path": "Default"
}
}
@@ -156562,12 +175126,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1310
+ 1309
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 109,
+ "id": 107,
"path": "Default"
}
}
@@ -156587,12 +175151,12 @@
},
"visibility": "default"
},
- "1312": {
+ "1311": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1312,
+ "id": 1311,
"inner": {
"assoc_type": {
"bounds": [],
@@ -156619,7 +175183,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -156640,12 +175204,12 @@
},
"visibility": "default"
},
- "1313": {
+ "1312": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": "Returns the union of `self` and `rhs` as a new `HashSet`.\n\n# Examples\n\n```\nuse std::collections::HashSet;\n\nlet a = HashSet::from([1, 2, 3]);\nlet b = HashSet::from([3, 4, 5]);\n\nlet set = &a | &b;\n\nlet mut i = 0;\nlet expected = [1, 2, 3, 4, 5];\nfor x in &set {\n assert!(expected.contains(x));\n i += 1;\n}\nassert_eq!(i, expected.len());\n```",
- "id": 1313,
+ "id": 1312,
"inner": {
"function": {
"generics": {
@@ -156692,7 +175256,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -156720,7 +175284,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -156742,7 +175306,7 @@
},
"visibility": "default"
},
- "1314": {
+ "1313": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -156751,7 +175315,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1314,
+ "id": 1313,
"inner": {
"impl": {
"blanket_impl": null,
@@ -156778,7 +175342,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -156817,7 +175381,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -156839,7 +175403,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -156871,7 +175435,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 109,
+ "id": 107,
"path": "Default"
}
}
@@ -156889,8 +175453,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1312,
- 1313
+ 1311,
+ 1312
],
"provided_trait_methods": [],
"trait": {
@@ -156921,7 +175485,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -156932,7 +175496,7 @@
"constraints": []
}
},
- "id": 1315,
+ "id": 1314,
"path": "BitOr"
}
}
@@ -156952,12 +175516,12 @@
},
"visibility": "default"
},
- "1316": {
+ "1315": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1316,
+ "id": 1315,
"inner": {
"assoc_type": {
"bounds": [],
@@ -156984,7 +175548,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -157005,12 +175569,12 @@
},
"visibility": "default"
},
- "1317": {
+ "1316": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": "Returns the intersection of `self` and `rhs` as a new `HashSet`.\n\n# Examples\n\n```\nuse std::collections::HashSet;\n\nlet a = HashSet::from([1, 2, 3]);\nlet b = HashSet::from([2, 3, 4]);\n\nlet set = &a & &b;\n\nlet mut i = 0;\nlet expected = [2, 3];\nfor x in &set {\n assert!(expected.contains(x));\n i += 1;\n}\nassert_eq!(i, expected.len());\n```",
- "id": 1317,
+ "id": 1316,
"inner": {
"function": {
"generics": {
@@ -157057,7 +175621,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -157085,7 +175649,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -157107,7 +175671,7 @@
},
"visibility": "default"
},
- "1318": {
+ "1317": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -157116,7 +175680,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1318,
+ "id": 1317,
"inner": {
"impl": {
"blanket_impl": null,
@@ -157143,7 +175707,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -157182,7 +175746,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -157204,7 +175768,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -157236,7 +175800,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 109,
+ "id": 107,
"path": "Default"
}
}
@@ -157254,8 +175818,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1316,
- 1317
+ 1315,
+ 1316
],
"provided_trait_methods": [],
"trait": {
@@ -157286,7 +175850,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -157297,7 +175861,7 @@
"constraints": []
}
},
- "id": 1319,
+ "id": 1318,
"path": "BitAnd"
}
}
@@ -157317,45 +175881,12 @@
},
"visibility": "default"
},
- "132": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"builtin_macro_prelude\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 132,
- "inner": {
- "use": {
- "id": 133,
- "is_glob": false,
- "name": "alloc_error_handler",
- "source": "core::prelude::v1::alloc_error_handler"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 67,
- 5
- ],
- "end": [
- 67,
- 24
- ],
- "filename": "std/src/prelude/v1.rs"
- },
- "visibility": "public"
- },
- "1320": {
+ "1319": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1320,
+ "id": 1319,
"inner": {
"assoc_type": {
"bounds": [],
@@ -157382,7 +175913,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -157403,12 +175934,45 @@
},
"visibility": "default"
},
- "1321": {
+ "132": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"builtin_macro_prelude\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 132,
+ "inner": {
+ "use": {
+ "id": 133,
+ "is_glob": false,
+ "name": "bench",
+ "source": "core::prelude::v1::bench"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 67,
+ 26
+ ],
+ "end": [
+ 67,
+ 31
+ ],
+ "filename": "std/src/prelude/v1.rs"
+ },
+ "visibility": "public"
+ },
+ "1320": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": "Returns the symmetric difference of `self` and `rhs` as a new `HashSet`.\n\n# Examples\n\n```\nuse std::collections::HashSet;\n\nlet a = HashSet::from([1, 2, 3]);\nlet b = HashSet::from([3, 4, 5]);\n\nlet set = &a ^ &b;\n\nlet mut i = 0;\nlet expected = [1, 2, 4, 5];\nfor x in &set {\n assert!(expected.contains(x));\n i += 1;\n}\nassert_eq!(i, expected.len());\n```",
- "id": 1321,
+ "id": 1320,
"inner": {
"function": {
"generics": {
@@ -157455,7 +176019,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -157483,7 +176047,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -157505,7 +176069,7 @@
},
"visibility": "default"
},
- "1322": {
+ "1321": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -157514,7 +176078,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1322,
+ "id": 1321,
"inner": {
"impl": {
"blanket_impl": null,
@@ -157541,7 +176105,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -157580,7 +176144,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -157602,7 +176166,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -157634,7 +176198,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 109,
+ "id": 107,
"path": "Default"
}
}
@@ -157652,8 +176216,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1320,
- 1321
+ 1319,
+ 1320
],
"provided_trait_methods": [],
"trait": {
@@ -157684,7 +176248,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -157695,7 +176259,7 @@
"constraints": []
}
},
- "id": 1323,
+ "id": 1322,
"path": "BitXor"
}
}
@@ -157715,12 +176279,12 @@
},
"visibility": "default"
},
- "1324": {
+ "1323": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1324,
+ "id": 1323,
"inner": {
"assoc_type": {
"bounds": [],
@@ -157747,7 +176311,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -157768,12 +176332,12 @@
},
"visibility": "default"
},
- "1325": {
+ "1324": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": "Returns the difference of `self` and `rhs` as a new `HashSet`.\n\n# Examples\n\n```\nuse std::collections::HashSet;\n\nlet a = HashSet::from([1, 2, 3]);\nlet b = HashSet::from([3, 4, 5]);\n\nlet set = &a - &b;\n\nlet mut i = 0;\nlet expected = [1, 2];\nfor x in &set {\n assert!(expected.contains(x));\n i += 1;\n}\nassert_eq!(i, expected.len());\n```",
- "id": 1325,
+ "id": 1324,
"inner": {
"function": {
"generics": {
@@ -157820,7 +176384,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -157848,7 +176412,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -157870,7 +176434,7 @@
},
"visibility": "default"
},
- "1326": {
+ "1325": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -157879,7 +176443,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1326,
+ "id": 1325,
"inner": {
"impl": {
"blanket_impl": null,
@@ -157906,7 +176470,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -157945,7 +176509,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -157967,7 +176531,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -157999,7 +176563,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 109,
+ "id": 107,
"path": "Default"
}
}
@@ -158017,8 +176581,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1324,
- 1325
+ 1323,
+ 1324
],
"provided_trait_methods": [],
"trait": {
@@ -158049,7 +176613,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -158060,7 +176624,7 @@
"constraints": []
}
},
- "id": 1327,
+ "id": 1326,
"path": "Sub"
}
}
@@ -158080,12 +176644,12 @@
},
"visibility": "default"
},
- "1328": {
+ "1327": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1328,
+ "id": 1327,
"inner": {
"assoc_type": {
"bounds": [],
@@ -158119,12 +176683,12 @@
},
"visibility": "default"
},
- "1329": {
+ "1328": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1329,
+ "id": 1328,
"inner": {
"assoc_type": {
"bounds": [],
@@ -158149,7 +176713,7 @@
"constraints": []
}
},
- "id": 1236,
+ "id": 1235,
"path": "Iter"
}
}
@@ -158170,7 +176734,7 @@
},
"visibility": "default"
},
- "1330": {
+ "1329": {
"attrs": [
{
"other": "#[rustc_lint_query_instability]"
@@ -158182,7 +176746,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1330,
+ "id": 1329,
"inner": {
"function": {
"generics": {
@@ -158223,7 +176787,7 @@
"constraints": []
}
},
- "id": 1236,
+ "id": 1235,
"path": "Iter"
}
}
@@ -158245,7 +176809,7 @@
},
"visibility": "default"
},
- "1331": {
+ "1330": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -158254,7 +176818,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1331,
+ "id": 1330,
"inner": {
"impl": {
"blanket_impl": null,
@@ -158281,7 +176845,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
}
@@ -158324,9 +176888,9 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 1327,
1328,
- 1329,
- 1330
+ 1329
],
"provided_trait_methods": [],
"trait": {
@@ -158351,12 +176915,12 @@
},
"visibility": "default"
},
- "1332": {
+ "1331": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1332,
+ "id": 1331,
"inner": {
"assoc_type": {
"bounds": [],
@@ -158384,12 +176948,12 @@
},
"visibility": "default"
},
- "1333": {
+ "1332": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1333,
+ "id": 1332,
"inner": {
"assoc_type": {
"bounds": [],
@@ -158411,7 +176975,7 @@
"constraints": []
}
},
- "id": 1334,
+ "id": 1333,
"path": "IntoIter"
}
}
@@ -158432,7 +176996,7 @@
},
"visibility": "default"
},
- "1334": {
+ "1333": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -158441,7 +177005,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "An owning iterator over the items of a `HashSet`.\n\nThis `struct` is created by the [`into_iter`] method on [`HashSet`]\n(provided by the [`IntoIterator`] trait). See its documentation for more.\n\n[`into_iter`]: IntoIterator::into_iter\n\n# Examples\n\n```\nuse std::collections::HashSet;\n\nlet a = HashSet::from([1, 2, 3]);\n\nlet mut iter = a.into_iter();\n```",
- "id": 1334,
+ "id": 1333,
"inner": {
"struct": {
"generics": {
@@ -158460,6 +177024,7 @@
"where_predicates": []
},
"impls": [
+ 1369,
1370,
1371,
1372,
@@ -158473,12 +177038,11 @@
1380,
1381,
1382,
- 1383,
- 1385,
- 1391,
+ 1384,
+ 1390,
+ 1392,
1393,
- 1394,
- 1396
+ 1395
],
"kind": {
"plain": {
@@ -158490,7 +177054,7 @@
},
"links": {
"IntoIterator::into_iter": 908,
- "`HashSet`": 1230,
+ "`HashSet`": 1229,
"`IntoIterator`": 47
},
"name": "IntoIter",
@@ -158507,7 +177071,7 @@
},
"visibility": "public"
},
- "1335": {
+ "1334": {
"attrs": [
{
"other": "#[rustc_lint_query_instability]"
@@ -158519,7 +177083,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Creates a consuming iterator, that is, one that moves each value out\nof the set in arbitrary order. The set cannot be used after calling\nthis.\n\n# Examples\n\n```\nuse std::collections::HashSet;\nlet mut set = HashSet::new();\nset.insert(\"a\".to_string());\nset.insert(\"b\".to_string());\n\n// Not possible to collect to a Vec with a regular `.iter()`.\nlet v: Vec = set.into_iter().collect();\n\n// Will print in an arbitrary order.\nfor x in &v {\n println!(\"{x}\");\n}\n```",
- "id": 1335,
+ "id": 1334,
"inner": {
"function": {
"generics": {
@@ -158557,7 +177121,7 @@
"constraints": []
}
},
- "id": 1334,
+ "id": 1333,
"path": "IntoIter"
}
}
@@ -158579,7 +177143,7 @@
},
"visibility": "default"
},
- "1336": {
+ "1335": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -158588,7 +177152,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1336,
+ "id": 1335,
"inner": {
"impl": {
"blanket_impl": null,
@@ -158611,7 +177175,7 @@
"constraints": []
}
},
- "id": 1230,
+ "id": 1229,
"path": "HashSet"
}
},
@@ -158644,9 +177208,9 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 1331,
1332,
- 1333,
- 1335
+ 1334
],
"provided_trait_methods": [],
"trait": {
@@ -158671,12 +177235,12 @@
},
"visibility": "default"
},
- "1338": {
+ "1337": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1338,
+ "id": 1337,
"inner": {
"impl": {
"blanket_impl": null,
@@ -158697,7 +177261,7 @@
"constraints": []
}
},
- "id": 1236,
+ "id": 1235,
"path": "Iter"
}
},
@@ -158763,12 +177327,12 @@
"span": null,
"visibility": "default"
},
- "1339": {
+ "1338": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1339,
+ "id": 1338,
"inner": {
"impl": {
"blanket_impl": null,
@@ -158789,7 +177353,7 @@
"constraints": []
}
},
- "id": 1236,
+ "id": 1235,
"path": "Iter"
}
},
@@ -158855,45 +177419,12 @@
"span": null,
"visibility": "default"
},
- "134": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"builtin_macro_prelude\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 134,
- "inner": {
- "use": {
- "id": 135,
- "is_glob": false,
- "name": "bench",
- "source": "core::prelude::v1::bench"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 67,
- 26
- ],
- "end": [
- 67,
- 31
- ],
- "filename": "std/src/prelude/v1.rs"
- },
- "visibility": "public"
- },
- "1340": {
+ "1339": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1340,
+ "id": 1339,
"inner": {
"impl": {
"blanket_impl": null,
@@ -158914,7 +177445,7 @@
"constraints": []
}
},
- "id": 1236,
+ "id": 1235,
"path": "Iter"
}
},
@@ -158948,7 +177479,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -158958,12 +177489,45 @@
"span": null,
"visibility": "default"
},
- "1341": {
+ "134": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"builtin_macro_prelude\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 134,
+ "inner": {
+ "use": {
+ "id": 135,
+ "is_glob": false,
+ "name": "derive",
+ "source": "core::prelude::v1::derive"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 67,
+ 33
+ ],
+ "end": [
+ 67,
+ 39
+ ],
+ "filename": "std/src/prelude/v1.rs"
+ },
+ "visibility": "public"
+ },
+ "1340": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1341,
+ "id": 1340,
"inner": {
"impl": {
"blanket_impl": null,
@@ -158984,7 +177548,7 @@
"constraints": []
}
},
- "id": 1236,
+ "id": 1235,
"path": "Iter"
}
},
@@ -159028,12 +177592,12 @@
"span": null,
"visibility": "default"
},
- "1342": {
+ "1341": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1342,
+ "id": 1341,
"inner": {
"impl": {
"blanket_impl": null,
@@ -159054,7 +177618,7 @@
"constraints": []
}
},
- "id": 1236,
+ "id": 1235,
"path": "Iter"
}
},
@@ -159089,7 +177653,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -159110,7 +177674,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -159120,12 +177684,12 @@
"span": null,
"visibility": "default"
},
- "1343": {
+ "1342": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1343,
+ "id": 1342,
"inner": {
"impl": {
"blanket_impl": null,
@@ -159146,7 +177710,7 @@
"constraints": []
}
},
- "id": 1236,
+ "id": 1235,
"path": "Iter"
}
},
@@ -159181,7 +177745,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -159202,7 +177766,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -159212,12 +177776,12 @@
"span": null,
"visibility": "default"
},
- "1344": {
+ "1343": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1344,
+ "id": 1343,
"inner": {
"impl": {
"blanket_impl": {
@@ -159240,7 +177804,7 @@
"constraints": []
}
},
- "id": 1236,
+ "id": 1235,
"path": "Iter"
}
},
@@ -159285,7 +177849,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -159301,7 +177865,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -159310,23 +177874,23 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1345": {
+ "1344": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1345,
+ "id": 1344,
"inner": {
"impl": {
"blanket_impl": {
@@ -159349,7 +177913,7 @@
"constraints": []
}
},
- "id": 1236,
+ "id": 1235,
"path": "Iter"
}
},
@@ -159394,7 +177958,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -159410,7 +177974,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -159419,23 +177983,23 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1346": {
+ "1345": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1346,
+ "id": 1345,
"inner": {
"impl": {
"blanket_impl": {
@@ -159458,7 +178022,7 @@
"constraints": []
}
},
- "id": 1236,
+ "id": 1235,
"path": "Iter"
}
},
@@ -159485,7 +178049,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -159517,23 +178081,23 @@
"name": null,
"span": {
"begin": [
- 516,
+ 515,
1
],
"end": [
- 516,
+ 515,
42
],
"filename": "checkouts/rust/library/core/src/clone.rs"
},
"visibility": "default"
},
- "1347": {
+ "1346": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1347,
+ "id": 1346,
"inner": {
"impl": {
"blanket_impl": {
@@ -159556,7 +178120,7 @@
"constraints": []
}
},
- "id": 1236,
+ "id": 1235,
"path": "Iter"
}
},
@@ -159622,7 +178186,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -159647,23 +178211,23 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1348": {
+ "1347": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1348,
+ "id": 1347,
"inner": {
"impl": {
"blanket_impl": {
@@ -159686,7 +178250,7 @@
"constraints": []
}
},
- "id": 1236,
+ "id": 1235,
"path": "Iter"
}
},
@@ -159709,7 +178273,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -159734,23 +178298,23 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1349": {
+ "1348": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1349,
+ "id": 1348,
"inner": {
"impl": {
"blanket_impl": {
@@ -159773,7 +178337,7 @@
"constraints": []
}
},
- "id": 1236,
+ "id": 1235,
"path": "Iter"
}
},
@@ -159821,7 +178385,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -159839,8 +178403,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -159856,7 +178420,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -159865,23 +178429,23 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1350": {
+ "1349": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1350,
+ "id": 1349,
"inner": {
"impl": {
"blanket_impl": {
@@ -159904,7 +178468,7 @@
"constraints": []
}
},
- "id": 1236,
+ "id": 1235,
"path": "Iter"
}
},
@@ -159970,8 +178534,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -159987,7 +178551,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -159996,23 +178560,23 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1351": {
+ "1350": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1351,
+ "id": 1350,
"inner": {
"impl": {
"blanket_impl": {
@@ -160035,7 +178599,7 @@
"constraints": []
}
},
- "id": 1236,
+ "id": 1235,
"path": "Iter"
}
},
@@ -160083,12 +178647,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -160108,12 +178672,12 @@
},
"visibility": "default"
},
- "1352": {
+ "1351": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1352,
+ "id": 1351,
"inner": {
"impl": {
"blanket_impl": {
@@ -160136,7 +178700,7 @@
"constraints": []
}
},
- "id": 1236,
+ "id": 1235,
"path": "Iter"
}
},
@@ -160208,12 +178772,12 @@
},
"visibility": "default"
},
- "1353": {
+ "1352": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1353,
+ "id": 1352,
"inner": {
"impl": {
"blanket_impl": {
@@ -160236,7 +178800,7 @@
"constraints": []
}
},
- "id": 1236,
+ "id": 1235,
"path": "Iter"
}
},
@@ -160263,7 +178827,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -160290,7 +178854,7 @@
],
"trait": {
"args": null,
- "id": 157,
+ "id": 155,
"path": "ToOwned"
}
}
@@ -160299,18 +178863,18 @@
"name": null,
"span": {
"begin": [
- 82,
+ 85,
1
],
"end": [
- 84,
+ 87,
14
],
"filename": "checkouts/rust/library/alloc/src/borrow.rs"
},
"visibility": "default"
},
- "1354": {
+ "1353": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -160319,7 +178883,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1354,
+ "id": 1353,
"inner": {
"function": {
"generics": {
@@ -160357,7 +178921,7 @@
},
"visibility": "default"
},
- "1355": {
+ "1354": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 83, patch: 0})}, feature: \"default_iters_hash\"}}]"
@@ -160366,7 +178930,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1355,
+ "id": 1354,
"inner": {
"impl": {
"blanket_impl": null,
@@ -160387,7 +178951,7 @@
"constraints": []
}
},
- "id": 1236,
+ "id": 1235,
"path": "Iter"
}
},
@@ -160410,12 +178974,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1354
+ 1353
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 109,
+ "id": 107,
"path": "Default"
}
}
@@ -160435,7 +178999,7 @@
},
"visibility": "default"
},
- "1356": {
+ "1355": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -160444,7 +179008,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1356,
+ "id": 1355,
"inner": {
"function": {
"generics": {
@@ -160495,7 +179059,7 @@
},
"visibility": "default"
},
- "1357": {
+ "1356": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -160504,7 +179068,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1357,
+ "id": 1356,
"inner": {
"impl": {
"blanket_impl": null,
@@ -160525,7 +179089,7 @@
"constraints": []
}
},
- "id": 1236,
+ "id": 1235,
"path": "Iter"
}
},
@@ -160548,14 +179112,14 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1356
+ 1355
],
"provided_trait_methods": [
"clone_from"
],
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -160575,12 +179139,12 @@
},
"visibility": "default"
},
- "1358": {
+ "1357": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1358,
+ "id": 1357,
"inner": {
"assoc_type": {
"bounds": [],
@@ -160614,7 +179178,7 @@
},
"visibility": "default"
},
- "1359": {
+ "1358": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -160623,7 +179187,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1359,
+ "id": 1358,
"inner": {
"function": {
"generics": {
@@ -160695,40 +179259,7 @@
},
"visibility": "default"
},
- "136": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"builtin_macro_prelude\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 136,
- "inner": {
- "use": {
- "id": 137,
- "is_glob": false,
- "name": "derive",
- "source": "core::prelude::v1::derive"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 67,
- 33
- ],
- "end": [
- 67,
- 39
- ],
- "filename": "std/src/prelude/v1.rs"
- },
- "visibility": "public"
- },
- "1360": {
+ "1359": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -160737,7 +179268,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1360,
+ "id": 1359,
"inner": {
"function": {
"generics": {
@@ -160810,7 +179341,40 @@
},
"visibility": "default"
},
- "1361": {
+ "136": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"builtin_macro_prelude\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 136,
+ "inner": {
+ "use": {
+ "id": 137,
+ "is_glob": false,
+ "name": "global_allocator",
+ "source": "core::prelude::v1::global_allocator"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 67,
+ 41
+ ],
+ "end": [
+ 67,
+ 57
+ ],
+ "filename": "std/src/prelude/v1.rs"
+ },
+ "visibility": "public"
+ },
+ "1360": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -160819,7 +179383,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1361,
+ "id": 1360,
"inner": {
"function": {
"generics": {
@@ -160864,7 +179428,7 @@
},
"visibility": "default"
},
- "1362": {
+ "1361": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -160873,7 +179437,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1362,
+ "id": 1361,
"inner": {
"function": {
"generics": {
@@ -161019,7 +179583,7 @@
},
"visibility": "default"
},
- "1363": {
+ "1362": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -161028,7 +179592,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1363,
+ "id": 1362,
"inner": {
"impl": {
"blanket_impl": null,
@@ -161049,7 +179613,7 @@
"constraints": []
}
},
- "id": 1236,
+ "id": 1235,
"path": "Iter"
}
},
@@ -161080,11 +179644,11 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 1357,
1358,
1359,
1360,
- 1361,
- 1362
+ 1361
],
"provided_trait_methods": [
"next_chunk",
@@ -161186,7 +179750,7 @@
},
"visibility": "default"
},
- "1364": {
+ "1363": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -161195,7 +179759,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1364,
+ "id": 1363,
"inner": {
"function": {
"generics": {
@@ -161246,7 +179810,7 @@
},
"visibility": "default"
},
- "1365": {
+ "1364": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -161255,7 +179819,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1365,
+ "id": 1364,
"inner": {
"impl": {
"blanket_impl": null,
@@ -161276,7 +179840,7 @@
"constraints": []
}
},
- "id": 1236,
+ "id": 1235,
"path": "Iter"
}
},
@@ -161299,7 +179863,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1364
+ 1363
],
"provided_trait_methods": [
"len",
@@ -161327,7 +179891,7 @@
},
"visibility": "default"
},
- "1366": {
+ "1365": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 26, patch: 0})}, feature: \"fused\"}}]"
@@ -161336,7 +179900,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1366,
+ "id": 1365,
"inner": {
"impl": {
"blanket_impl": null,
@@ -161357,7 +179921,7 @@
"constraints": []
}
},
- "id": 1236,
+ "id": 1235,
"path": "Iter"
}
},
@@ -161403,12 +179967,12 @@
},
"visibility": "default"
},
- "1367": {
+ "1366": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1367,
+ "id": 1366,
"inner": {
"function": {
"generics": {
@@ -161454,7 +180018,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -161466,7 +180030,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -161488,7 +180052,7 @@
},
"visibility": "default"
},
- "1368": {
+ "1367": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 16, patch: 0})}, feature: \"std_debug\"}}]"
@@ -161497,7 +180061,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1368,
+ "id": 1367,
"inner": {
"impl": {
"blanket_impl": null,
@@ -161518,7 +180082,7 @@
"constraints": []
}
},
- "id": 1236,
+ "id": 1235,
"path": "Iter"
}
},
@@ -161534,7 +180098,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "fmt::Debug"
}
}
@@ -161553,12 +180117,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1367
+ 1366
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -161578,12 +180142,12 @@
},
"visibility": "default"
},
- "1370": {
+ "1369": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1370,
+ "id": 1369,
"inner": {
"impl": {
"blanket_impl": null,
@@ -161601,7 +180165,7 @@
"constraints": []
}
},
- "id": 1334,
+ "id": 1333,
"path": "IntoIter"
}
},
@@ -161659,12 +180223,12 @@
"span": null,
"visibility": "default"
},
- "1371": {
+ "1370": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1371,
+ "id": 1370,
"inner": {
"impl": {
"blanket_impl": null,
@@ -161682,7 +180246,7 @@
"constraints": []
}
},
- "id": 1334,
+ "id": 1333,
"path": "IntoIter"
}
},
@@ -161740,12 +180304,12 @@
"span": null,
"visibility": "default"
},
- "1372": {
+ "1371": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1372,
+ "id": 1371,
"inner": {
"impl": {
"blanket_impl": null,
@@ -161763,7 +180327,7 @@
"constraints": []
}
},
- "id": 1334,
+ "id": 1333,
"path": "IntoIter"
}
},
@@ -161789,7 +180353,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -161799,12 +180363,12 @@
"span": null,
"visibility": "default"
},
- "1373": {
+ "1372": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1373,
+ "id": 1372,
"inner": {
"impl": {
"blanket_impl": null,
@@ -161822,7 +180386,7 @@
"constraints": []
}
},
- "id": 1334,
+ "id": 1333,
"path": "IntoIter"
}
},
@@ -161880,12 +180444,12 @@
"span": null,
"visibility": "default"
},
- "1374": {
+ "1373": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1374,
+ "id": 1373,
"inner": {
"impl": {
"blanket_impl": null,
@@ -161903,7 +180467,7 @@
"constraints": []
}
},
- "id": 1334,
+ "id": 1333,
"path": "IntoIter"
}
},
@@ -161930,7 +180494,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -161941,7 +180505,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -161962,7 +180526,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -161972,12 +180536,12 @@
"span": null,
"visibility": "default"
},
- "1375": {
+ "1374": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1375,
+ "id": 1374,
"inner": {
"impl": {
"blanket_impl": null,
@@ -161995,7 +180559,7 @@
"constraints": []
}
},
- "id": 1334,
+ "id": 1333,
"path": "IntoIter"
}
},
@@ -162022,7 +180586,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -162043,7 +180607,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -162053,12 +180617,12 @@
"span": null,
"visibility": "default"
},
- "1376": {
+ "1375": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1376,
+ "id": 1375,
"inner": {
"impl": {
"blanket_impl": {
@@ -162078,7 +180642,7 @@
"constraints": []
}
},
- "id": 1334,
+ "id": 1333,
"path": "IntoIter"
}
},
@@ -162123,7 +180687,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -162139,7 +180703,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -162148,23 +180712,23 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1377": {
+ "1376": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1377,
+ "id": 1376,
"inner": {
"impl": {
"blanket_impl": {
@@ -162184,7 +180748,7 @@
"constraints": []
}
},
- "id": 1334,
+ "id": 1333,
"path": "IntoIter"
}
},
@@ -162229,7 +180793,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -162245,7 +180809,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -162254,23 +180818,23 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1378": {
+ "1377": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1378,
+ "id": 1377,
"inner": {
"impl": {
"blanket_impl": {
@@ -162290,7 +180854,7 @@
"constraints": []
}
},
- "id": 1334,
+ "id": 1333,
"path": "IntoIter"
}
},
@@ -162356,7 +180920,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -162381,23 +180945,23 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1379": {
+ "1378": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1379,
+ "id": 1378,
"inner": {
"impl": {
"blanket_impl": {
@@ -162417,7 +180981,7 @@
"constraints": []
}
},
- "id": 1334,
+ "id": 1333,
"path": "IntoIter"
}
},
@@ -162440,7 +181004,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -162465,56 +181029,23 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "138": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"builtin_macro_prelude\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 138,
- "inner": {
- "use": {
- "id": 139,
- "is_glob": false,
- "name": "global_allocator",
- "source": "core::prelude::v1::global_allocator"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 67,
- 41
- ],
- "end": [
- 67,
- 57
- ],
- "filename": "std/src/prelude/v1.rs"
- },
- "visibility": "public"
- },
- "1380": {
+ "1379": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1380,
+ "id": 1379,
"inner": {
"impl": {
"blanket_impl": {
@@ -162534,7 +181065,7 @@
"constraints": []
}
},
- "id": 1334,
+ "id": 1333,
"path": "IntoIter"
}
},
@@ -162582,7 +181113,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -162600,8 +181131,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -162617,7 +181148,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -162626,23 +181157,56 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1381": {
+ "138": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"builtin_macro_prelude\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 138,
+ "inner": {
+ "use": {
+ "id": 139,
+ "is_glob": false,
+ "name": "test",
+ "source": "core::prelude::v1::test"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 67,
+ 59
+ ],
+ "end": [
+ 67,
+ 63
+ ],
+ "filename": "std/src/prelude/v1.rs"
+ },
+ "visibility": "public"
+ },
+ "1380": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1381,
+ "id": 1380,
"inner": {
"impl": {
"blanket_impl": {
@@ -162662,7 +181226,7 @@
"constraints": []
}
},
- "id": 1334,
+ "id": 1333,
"path": "IntoIter"
}
},
@@ -162728,8 +181292,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -162745,7 +181309,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -162754,23 +181318,23 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1382": {
+ "1381": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1382,
+ "id": 1381,
"inner": {
"impl": {
"blanket_impl": {
@@ -162790,7 +181354,7 @@
"constraints": []
}
},
- "id": 1334,
+ "id": 1333,
"path": "IntoIter"
}
},
@@ -162838,12 +181402,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -162863,12 +181427,12 @@
},
"visibility": "default"
},
- "1383": {
+ "1382": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1383,
+ "id": 1382,
"inner": {
"impl": {
"blanket_impl": {
@@ -162888,7 +181452,7 @@
"constraints": []
}
},
- "id": 1334,
+ "id": 1333,
"path": "IntoIter"
}
},
@@ -162960,7 +181524,7 @@
},
"visibility": "default"
},
- "1384": {
+ "1383": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -162969,7 +181533,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1384,
+ "id": 1383,
"inner": {
"function": {
"generics": {
@@ -163007,7 +181571,7 @@
},
"visibility": "default"
},
- "1385": {
+ "1384": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 83, patch: 0})}, feature: \"default_iters_hash\"}}]"
@@ -163016,7 +181580,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1385,
+ "id": 1384,
"inner": {
"impl": {
"blanket_impl": null,
@@ -163034,7 +181598,7 @@
"constraints": []
}
},
- "id": 1334,
+ "id": 1333,
"path": "IntoIter"
}
},
@@ -163057,12 +181621,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1384
+ 1383
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 109,
+ "id": 107,
"path": "Default"
}
}
@@ -163082,12 +181646,12 @@
},
"visibility": "default"
},
- "1386": {
+ "1385": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1386,
+ "id": 1385,
"inner": {
"assoc_type": {
"bounds": [],
@@ -163115,7 +181679,7 @@
},
"visibility": "default"
},
- "1387": {
+ "1386": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -163124,7 +181688,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1387,
+ "id": 1386,
"inner": {
"function": {
"generics": {
@@ -163190,7 +181754,7 @@
},
"visibility": "default"
},
- "1388": {
+ "1387": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -163199,7 +181763,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1388,
+ "id": 1387,
"inner": {
"function": {
"generics": {
@@ -163272,7 +181836,7 @@
},
"visibility": "default"
},
- "1389": {
+ "1388": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -163281,7 +181845,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1389,
+ "id": 1388,
"inner": {
"function": {
"generics": {
@@ -163326,7 +181890,7 @@
},
"visibility": "default"
},
- "1390": {
+ "1389": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -163335,7 +181899,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1390,
+ "id": 1389,
"inner": {
"function": {
"generics": {
@@ -163481,7 +182045,7 @@
},
"visibility": "default"
},
- "1391": {
+ "1390": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -163490,7 +182054,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1391,
+ "id": 1390,
"inner": {
"impl": {
"blanket_impl": null,
@@ -163508,7 +182072,7 @@
"constraints": []
}
},
- "id": 1334,
+ "id": 1333,
"path": "IntoIter"
}
},
@@ -163531,11 +182095,11 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 1385,
1386,
1387,
1388,
- 1389,
- 1390
+ 1389
],
"provided_trait_methods": [
"next_chunk",
@@ -163637,7 +182201,7 @@
},
"visibility": "default"
},
- "1392": {
+ "1391": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -163646,7 +182210,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1392,
+ "id": 1391,
"inner": {
"function": {
"generics": {
@@ -163697,7 +182261,7 @@
},
"visibility": "default"
},
- "1393": {
+ "1392": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -163706,7 +182270,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1393,
+ "id": 1392,
"inner": {
"impl": {
"blanket_impl": null,
@@ -163724,7 +182288,7 @@
"constraints": []
}
},
- "id": 1334,
+ "id": 1333,
"path": "IntoIter"
}
},
@@ -163747,7 +182311,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1392
+ 1391
],
"provided_trait_methods": [
"len",
@@ -163775,7 +182339,7 @@
},
"visibility": "default"
},
- "1394": {
+ "1393": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 26, patch: 0})}, feature: \"fused\"}}]"
@@ -163784,7 +182348,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1394,
+ "id": 1393,
"inner": {
"impl": {
"blanket_impl": null,
@@ -163802,7 +182366,7 @@
"constraints": []
}
},
- "id": 1334,
+ "id": 1333,
"path": "IntoIter"
}
},
@@ -163848,12 +182412,12 @@
},
"visibility": "default"
},
- "1395": {
+ "1394": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1395,
+ "id": 1394,
"inner": {
"function": {
"generics": {
@@ -163899,7 +182463,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -163911,7 +182475,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -163933,7 +182497,7 @@
},
"visibility": "default"
},
- "1396": {
+ "1395": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 16, patch: 0})}, feature: \"std_debug\"}}]"
@@ -163942,7 +182506,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1396,
+ "id": 1395,
"inner": {
"impl": {
"blanket_impl": null,
@@ -163960,7 +182524,7 @@
"constraints": []
}
},
- "id": 1334,
+ "id": 1333,
"path": "IntoIter"
}
},
@@ -163976,7 +182540,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "fmt::Debug"
}
}
@@ -163995,12 +182559,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1395
+ 1394
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -164020,12 +182584,12 @@
},
"visibility": "default"
},
- "1398": {
+ "1397": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1398,
+ "id": 1397,
"inner": {
"impl": {
"blanket_impl": null,
@@ -164046,7 +182610,7 @@
"constraints": []
}
},
- "id": 1240,
+ "id": 1239,
"path": "Drain"
}
},
@@ -164112,12 +182676,12 @@
"span": null,
"visibility": "default"
},
- "1399": {
+ "1398": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1399,
+ "id": 1398,
"inner": {
"impl": {
"blanket_impl": null,
@@ -164138,7 +182702,7 @@
"constraints": []
}
},
- "id": 1240,
+ "id": 1239,
"path": "Drain"
}
},
@@ -164204,81 +182768,12 @@
"span": null,
"visibility": "default"
},
- "14": {
- "attrs": [
- {
- "other": "#[doc(no_inline)]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 14,
- "inner": {
- "use": {
- "id": 15,
- "is_glob": false,
- "name": "FnOnce",
- "source": "crate::ops::FnOnce"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 16,
- 39
- ],
- "end": [
- 16,
- 45
- ],
- "filename": "std/src/prelude/v1.rs"
- },
- "visibility": "public"
- },
- "140": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"builtin_macro_prelude\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 140,
- "inner": {
- "use": {
- "id": 141,
- "is_glob": false,
- "name": "test",
- "source": "core::prelude::v1::test"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 67,
- 59
- ],
- "end": [
- 67,
- 63
- ],
- "filename": "std/src/prelude/v1.rs"
- },
- "visibility": "public"
- },
- "1400": {
+ "1399": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1400,
+ "id": 1399,
"inner": {
"impl": {
"blanket_impl": null,
@@ -164299,7 +182794,7 @@
"constraints": []
}
},
- "id": 1240,
+ "id": 1239,
"path": "Drain"
}
},
@@ -164333,7 +182828,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -164343,12 +182838,81 @@
"span": null,
"visibility": "default"
},
- "1401": {
+ "14": {
+ "attrs": [
+ {
+ "other": "#[doc(no_inline)]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 14,
+ "inner": {
+ "use": {
+ "id": 15,
+ "is_glob": false,
+ "name": "FnOnce",
+ "source": "crate::ops::FnOnce"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 16,
+ 39
+ ],
+ "end": [
+ 16,
+ 45
+ ],
+ "filename": "std/src/prelude/v1.rs"
+ },
+ "visibility": "public"
+ },
+ "140": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"builtin_macro_prelude\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 140,
+ "inner": {
+ "use": {
+ "id": 141,
+ "is_glob": false,
+ "name": "test_case",
+ "source": "core::prelude::v1::test_case"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 67,
+ 65
+ ],
+ "end": [
+ 67,
+ 74
+ ],
+ "filename": "std/src/prelude/v1.rs"
+ },
+ "visibility": "public"
+ },
+ "1400": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1401,
+ "id": 1400,
"inner": {
"impl": {
"blanket_impl": null,
@@ -164369,7 +182933,7 @@
"constraints": []
}
},
- "id": 1240,
+ "id": 1239,
"path": "Drain"
}
},
@@ -164413,12 +182977,12 @@
"span": null,
"visibility": "default"
},
- "1402": {
+ "1401": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1402,
+ "id": 1401,
"inner": {
"impl": {
"blanket_impl": null,
@@ -164439,7 +183003,7 @@
"constraints": []
}
},
- "id": 1240,
+ "id": 1239,
"path": "Drain"
}
},
@@ -164474,7 +183038,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -164495,7 +183059,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -164505,12 +183069,12 @@
"span": null,
"visibility": "default"
},
- "1403": {
+ "1402": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1403,
+ "id": 1402,
"inner": {
"impl": {
"blanket_impl": null,
@@ -164531,7 +183095,7 @@
"constraints": []
}
},
- "id": 1240,
+ "id": 1239,
"path": "Drain"
}
},
@@ -164566,7 +183130,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -164587,7 +183151,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -164597,12 +183161,12 @@
"span": null,
"visibility": "default"
},
- "1404": {
+ "1403": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1404,
+ "id": 1403,
"inner": {
"impl": {
"blanket_impl": {
@@ -164625,7 +183189,7 @@
"constraints": []
}
},
- "id": 1240,
+ "id": 1239,
"path": "Drain"
}
},
@@ -164670,7 +183234,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -164686,7 +183250,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -164695,23 +183259,23 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1405": {
+ "1404": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1405,
+ "id": 1404,
"inner": {
"impl": {
"blanket_impl": {
@@ -164734,7 +183298,7 @@
"constraints": []
}
},
- "id": 1240,
+ "id": 1239,
"path": "Drain"
}
},
@@ -164779,7 +183343,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -164795,7 +183359,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -164804,23 +183368,23 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1406": {
+ "1405": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1406,
+ "id": 1405,
"inner": {
"impl": {
"blanket_impl": {
@@ -164843,7 +183407,7 @@
"constraints": []
}
},
- "id": 1240,
+ "id": 1239,
"path": "Drain"
}
},
@@ -164909,7 +183473,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -164934,23 +183498,23 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1407": {
+ "1406": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1407,
+ "id": 1406,
"inner": {
"impl": {
"blanket_impl": {
@@ -164973,7 +183537,7 @@
"constraints": []
}
},
- "id": 1240,
+ "id": 1239,
"path": "Drain"
}
},
@@ -164996,7 +183560,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -165021,23 +183585,23 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1408": {
+ "1407": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1408,
+ "id": 1407,
"inner": {
"impl": {
"blanket_impl": {
@@ -165060,7 +183624,7 @@
"constraints": []
}
},
- "id": 1240,
+ "id": 1239,
"path": "Drain"
}
},
@@ -165108,7 +183672,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -165126,8 +183690,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -165143,7 +183707,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -165152,23 +183716,23 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1409": {
+ "1408": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1409,
+ "id": 1408,
"inner": {
"impl": {
"blanket_impl": {
@@ -165191,7 +183755,7 @@
"constraints": []
}
},
- "id": 1240,
+ "id": 1239,
"path": "Drain"
}
},
@@ -165257,8 +183821,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -165274,7 +183838,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -165283,23 +183847,23 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1410": {
+ "1409": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1410,
+ "id": 1409,
"inner": {
"impl": {
"blanket_impl": {
@@ -165322,7 +183886,7 @@
"constraints": []
}
},
- "id": 1240,
+ "id": 1239,
"path": "Drain"
}
},
@@ -165370,12 +183934,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -165395,12 +183959,12 @@
},
"visibility": "default"
},
- "1411": {
+ "1410": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1411,
+ "id": 1410,
"inner": {
"impl": {
"blanket_impl": {
@@ -165423,7 +183987,7 @@
"constraints": []
}
},
- "id": 1240,
+ "id": 1239,
"path": "Drain"
}
},
@@ -165495,12 +184059,12 @@
},
"visibility": "default"
},
- "1412": {
+ "1411": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1412,
+ "id": 1411,
"inner": {
"assoc_type": {
"bounds": [],
@@ -165528,7 +184092,7 @@
},
"visibility": "default"
},
- "1413": {
+ "1412": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -165537,7 +184101,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1413,
+ "id": 1412,
"inner": {
"function": {
"generics": {
@@ -165603,7 +184167,7 @@
},
"visibility": "default"
},
- "1414": {
+ "1413": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -165612,7 +184176,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1414,
+ "id": 1413,
"inner": {
"function": {
"generics": {
@@ -165685,7 +184249,7 @@
},
"visibility": "default"
},
- "1415": {
+ "1414": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -165694,7 +184258,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1415,
+ "id": 1414,
"inner": {
"function": {
"generics": {
@@ -165840,7 +184404,7 @@
},
"visibility": "default"
},
- "1416": {
+ "1415": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -165849,7 +184413,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1416,
+ "id": 1415,
"inner": {
"impl": {
"blanket_impl": null,
@@ -165870,7 +184434,7 @@
"constraints": []
}
},
- "id": 1240,
+ "id": 1239,
"path": "Drain"
}
},
@@ -165901,10 +184465,10 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 1411,
1412,
1413,
- 1414,
- 1415
+ 1414
],
"provided_trait_methods": [
"next_chunk",
@@ -166006,7 +184570,7 @@
},
"visibility": "default"
},
- "1417": {
+ "1416": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -166015,7 +184579,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1417,
+ "id": 1416,
"inner": {
"function": {
"generics": {
@@ -166066,7 +184630,7 @@
},
"visibility": "default"
},
- "1418": {
+ "1417": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -166075,7 +184639,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1418,
+ "id": 1417,
"inner": {
"impl": {
"blanket_impl": null,
@@ -166096,7 +184660,7 @@
"constraints": []
}
},
- "id": 1240,
+ "id": 1239,
"path": "Drain"
}
},
@@ -166119,7 +184683,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1417
+ 1416
],
"provided_trait_methods": [
"len",
@@ -166147,7 +184711,7 @@
},
"visibility": "default"
},
- "1419": {
+ "1418": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 26, patch: 0})}, feature: \"fused\"}}]"
@@ -166156,7 +184720,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1419,
+ "id": 1418,
"inner": {
"impl": {
"blanket_impl": null,
@@ -166177,7 +184741,7 @@
"constraints": []
}
},
- "id": 1240,
+ "id": 1239,
"path": "Drain"
}
},
@@ -166223,45 +184787,12 @@
},
"visibility": "default"
},
- "142": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 38, patch: 0})}, feature: \"builtin_macro_prelude\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 142,
- "inner": {
- "use": {
- "id": 143,
- "is_glob": false,
- "name": "test_case",
- "source": "core::prelude::v1::test_case"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 67,
- 65
- ],
- "end": [
- 67,
- 74
- ],
- "filename": "std/src/prelude/v1.rs"
- },
- "visibility": "public"
- },
- "1420": {
+ "1419": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1420,
+ "id": 1419,
"inner": {
"function": {
"generics": {
@@ -166307,7 +184838,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -166319,7 +184850,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -166341,7 +184872,40 @@
},
"visibility": "default"
},
- "1421": {
+ "142": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 118304, is_soft: false}, feature: \"derive_const\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 142,
+ "inner": {
+ "use": {
+ "id": 143,
+ "is_glob": false,
+ "name": "derive_const",
+ "source": "core::prelude::v1::derive_const"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 71,
+ 1
+ ],
+ "end": [
+ 71,
+ 41
+ ],
+ "filename": "std/src/prelude/v1.rs"
+ },
+ "visibility": "public"
+ },
+ "1420": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 16, patch: 0})}, feature: \"std_debug\"}}]"
@@ -166350,7 +184914,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1421,
+ "id": 1420,
"inner": {
"impl": {
"blanket_impl": null,
@@ -166371,7 +184935,7 @@
"constraints": []
}
},
- "id": 1240,
+ "id": 1239,
"path": "Drain"
}
},
@@ -166387,7 +184951,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "fmt::Debug"
}
}
@@ -166406,12 +184970,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1420
+ 1419
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -166431,12 +184995,12 @@
},
"visibility": "default"
},
- "1423": {
+ "1422": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1423,
+ "id": 1422,
"inner": {
"impl": {
"blanket_impl": null,
@@ -166462,7 +185026,7 @@
"constraints": []
}
},
- "id": 1243,
+ "id": 1242,
"path": "ExtractIf"
}
},
@@ -166559,12 +185123,12 @@
"span": null,
"visibility": "default"
},
- "1424": {
+ "1423": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1424,
+ "id": 1423,
"inner": {
"impl": {
"blanket_impl": null,
@@ -166590,7 +185154,7 @@
"constraints": []
}
},
- "id": 1243,
+ "id": 1242,
"path": "ExtractIf"
}
},
@@ -166687,12 +185251,12 @@
"span": null,
"visibility": "default"
},
- "1425": {
+ "1424": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1425,
+ "id": 1424,
"inner": {
"impl": {
"blanket_impl": null,
@@ -166718,7 +185282,7 @@
"constraints": []
}
},
- "id": 1243,
+ "id": 1242,
"path": "ExtractIf"
}
},
@@ -166763,7 +185327,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -166784,7 +185348,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -166794,12 +185358,12 @@
"span": null,
"visibility": "default"
},
- "1426": {
+ "1425": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1426,
+ "id": 1425,
"inner": {
"impl": {
"blanket_impl": null,
@@ -166825,7 +185389,7 @@
"constraints": []
}
},
- "id": 1243,
+ "id": 1242,
"path": "ExtractIf"
}
},
@@ -166901,12 +185465,12 @@
"span": null,
"visibility": "default"
},
- "1427": {
+ "1426": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1427,
+ "id": 1426,
"inner": {
"impl": {
"blanket_impl": null,
@@ -166932,7 +185496,7 @@
"constraints": []
}
},
- "id": 1243,
+ "id": 1242,
"path": "ExtractIf"
}
},
@@ -166976,7 +185540,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -166986,12 +185550,12 @@
"span": null,
"visibility": "default"
},
- "1428": {
+ "1427": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1428,
+ "id": 1427,
"inner": {
"impl": {
"blanket_impl": null,
@@ -167017,7 +185581,7 @@
"constraints": []
}
},
- "id": 1243,
+ "id": 1242,
"path": "ExtractIf"
}
},
@@ -167062,7 +185626,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -167083,7 +185647,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -167104,7 +185668,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -167114,12 +185678,12 @@
"span": null,
"visibility": "default"
},
- "1429": {
+ "1428": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1429,
+ "id": 1428,
"inner": {
"impl": {
"blanket_impl": {
@@ -167147,7 +185711,7 @@
"constraints": []
}
},
- "id": 1243,
+ "id": 1242,
"path": "ExtractIf"
}
},
@@ -167192,7 +185756,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -167208,7 +185772,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -167217,23 +185781,23 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1430": {
+ "1429": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1430,
+ "id": 1429,
"inner": {
"impl": {
"blanket_impl": {
@@ -167261,7 +185825,7 @@
"constraints": []
}
},
- "id": 1243,
+ "id": 1242,
"path": "ExtractIf"
}
},
@@ -167306,7 +185870,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -167322,7 +185886,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -167331,23 +185895,23 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1431": {
+ "1430": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1431,
+ "id": 1430,
"inner": {
"impl": {
"blanket_impl": {
@@ -167375,7 +185939,7 @@
"constraints": []
}
},
- "id": 1243,
+ "id": 1242,
"path": "ExtractIf"
}
},
@@ -167441,7 +186005,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -167466,23 +186030,23 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1432": {
+ "1431": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1432,
+ "id": 1431,
"inner": {
"impl": {
"blanket_impl": {
@@ -167510,7 +186074,7 @@
"constraints": []
}
},
- "id": 1243,
+ "id": 1242,
"path": "ExtractIf"
}
},
@@ -167533,7 +186097,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -167558,23 +186122,23 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1433": {
+ "1432": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1433,
+ "id": 1432,
"inner": {
"impl": {
"blanket_impl": {
@@ -167602,7 +186166,7 @@
"constraints": []
}
},
- "id": 1243,
+ "id": 1242,
"path": "ExtractIf"
}
},
@@ -167650,7 +186214,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -167668,8 +186232,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -167685,7 +186249,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -167694,23 +186258,23 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1434": {
+ "1433": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1434,
+ "id": 1433,
"inner": {
"impl": {
"blanket_impl": {
@@ -167738,7 +186302,7 @@
"constraints": []
}
},
- "id": 1243,
+ "id": 1242,
"path": "ExtractIf"
}
},
@@ -167804,8 +186368,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -167821,7 +186385,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -167830,23 +186394,23 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1435": {
+ "1434": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1435,
+ "id": 1434,
"inner": {
"impl": {
"blanket_impl": {
@@ -167874,7 +186438,7 @@
"constraints": []
}
},
- "id": 1243,
+ "id": 1242,
"path": "ExtractIf"
}
},
@@ -167922,12 +186486,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -167947,12 +186511,12 @@
},
"visibility": "default"
},
- "1436": {
+ "1435": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1436,
+ "id": 1435,
"inner": {
"impl": {
"blanket_impl": {
@@ -167980,7 +186544,7 @@
"constraints": []
}
},
- "id": 1243,
+ "id": 1242,
"path": "ExtractIf"
}
},
@@ -168052,12 +186616,12 @@
},
"visibility": "default"
},
- "1437": {
+ "1436": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1437,
+ "id": 1436,
"inner": {
"assoc_type": {
"bounds": [],
@@ -168085,7 +186649,7 @@
},
"visibility": "default"
},
- "1438": {
+ "1437": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -168094,7 +186658,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1438,
+ "id": 1437,
"inner": {
"function": {
"generics": {
@@ -168160,7 +186724,7 @@
},
"visibility": "default"
},
- "1439": {
+ "1438": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -168169,7 +186733,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1439,
+ "id": 1438,
"inner": {
"function": {
"generics": {
@@ -168242,40 +186806,7 @@
},
"visibility": "default"
},
- "144": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 118304, is_soft: false}, feature: \"derive_const\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 144,
- "inner": {
- "use": {
- "id": 145,
- "is_glob": false,
- "name": "derive_const",
- "source": "core::prelude::v1::derive_const"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 71,
- 1
- ],
- "end": [
- 71,
- 41
- ],
- "filename": "std/src/prelude/v1.rs"
- },
- "visibility": "public"
- },
- "1440": {
+ "1439": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 88, patch: 0})}, feature: \"hash_extract_if\"}}]"
@@ -168284,7 +186815,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1440,
+ "id": 1439,
"inner": {
"impl": {
"blanket_impl": null,
@@ -168310,7 +186841,7 @@
"constraints": []
}
},
- "id": 1243,
+ "id": 1242,
"path": "ExtractIf"
}
},
@@ -168382,9 +186913,9 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 1436,
1437,
- 1438,
- 1439
+ 1438
],
"provided_trait_methods": [
"next_chunk",
@@ -168486,7 +187017,40 @@
},
"visibility": "default"
},
- "1441": {
+ "144": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"`cfg_accessible` is not fully implemented\"),\nissue: 64797, is_soft: false}, feature: \"cfg_accessible\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 144,
+ "inner": {
+ "use": {
+ "id": 145,
+ "is_glob": false,
+ "name": "cfg_accessible",
+ "source": "core::prelude::v1::cfg_accessible"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 79,
+ 1
+ ],
+ "end": [
+ 79,
+ 43
+ ],
+ "filename": "std/src/prelude/v1.rs"
+ },
+ "visibility": "public"
+ },
+ "1440": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 88, patch: 0})}, feature: \"hash_extract_if\"}}]"
@@ -168495,7 +187059,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1441,
+ "id": 1440,
"inner": {
"impl": {
"blanket_impl": null,
@@ -168521,7 +187085,7 @@
"constraints": []
}
},
- "id": 1243,
+ "id": 1242,
"path": "ExtractIf"
}
},
@@ -168616,12 +187180,12 @@
},
"visibility": "default"
},
- "1442": {
+ "1441": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1442,
+ "id": 1441,
"inner": {
"function": {
"generics": {
@@ -168667,7 +187231,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -168679,7 +187243,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -168701,7 +187265,7 @@
},
"visibility": "default"
},
- "1443": {
+ "1442": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 88, patch: 0})}, feature: \"hash_extract_if\"}}]"
@@ -168710,7 +187274,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1443,
+ "id": 1442,
"inner": {
"impl": {
"blanket_impl": null,
@@ -168736,7 +187300,7 @@
"constraints": []
}
},
- "id": 1243,
+ "id": 1242,
"path": "ExtractIf"
}
},
@@ -168773,7 +187337,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "fmt::Debug"
}
}
@@ -168791,12 +187355,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1442
+ 1441
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -168816,12 +187380,12 @@
},
"visibility": "default"
},
- "1446": {
+ "1445": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1446,
+ "id": 1445,
"inner": {
"impl": {
"blanket_impl": null,
@@ -168847,7 +187411,7 @@
"constraints": []
}
},
- "id": 1258,
+ "id": 1257,
"path": "Intersection"
}
},
@@ -168944,12 +187508,12 @@
"span": null,
"visibility": "default"
},
- "1447": {
+ "1446": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1447,
+ "id": 1446,
"inner": {
"impl": {
"blanket_impl": null,
@@ -168975,7 +187539,7 @@
"constraints": []
}
},
- "id": 1258,
+ "id": 1257,
"path": "Intersection"
}
},
@@ -169072,12 +187636,12 @@
"span": null,
"visibility": "default"
},
- "1448": {
+ "1447": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1448,
+ "id": 1447,
"inner": {
"impl": {
"blanket_impl": null,
@@ -169103,7 +187667,7 @@
"constraints": []
}
},
- "id": 1258,
+ "id": 1257,
"path": "Intersection"
}
},
@@ -169147,7 +187711,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -169157,12 +187721,12 @@
"span": null,
"visibility": "default"
},
- "1449": {
+ "1448": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1449,
+ "id": 1448,
"inner": {
"impl": {
"blanket_impl": null,
@@ -169188,7 +187752,7 @@
"constraints": []
}
},
- "id": 1258,
+ "id": 1257,
"path": "Intersection"
}
},
@@ -169242,12 +187806,12 @@
"span": null,
"visibility": "default"
},
- "1450": {
+ "1449": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1450,
+ "id": 1449,
"inner": {
"impl": {
"blanket_impl": null,
@@ -169273,7 +187837,7 @@
"constraints": []
}
},
- "id": 1258,
+ "id": 1257,
"path": "Intersection"
}
},
@@ -169318,7 +187882,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -169339,7 +187903,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -169360,7 +187924,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -169370,12 +187934,12 @@
"span": null,
"visibility": "default"
},
- "1451": {
+ "1450": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1451,
+ "id": 1450,
"inner": {
"impl": {
"blanket_impl": null,
@@ -169401,7 +187965,7 @@
"constraints": []
}
},
- "id": 1258,
+ "id": 1257,
"path": "Intersection"
}
},
@@ -169446,7 +188010,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -169467,7 +188031,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -169488,7 +188052,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -169498,12 +188062,12 @@
"span": null,
"visibility": "default"
},
- "1452": {
+ "1451": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1452,
+ "id": 1451,
"inner": {
"impl": {
"blanket_impl": {
@@ -169531,7 +188095,7 @@
"constraints": []
}
},
- "id": 1258,
+ "id": 1257,
"path": "Intersection"
}
},
@@ -169576,7 +188140,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -169592,7 +188156,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -169601,23 +188165,23 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1453": {
+ "1452": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1453,
+ "id": 1452,
"inner": {
"impl": {
"blanket_impl": {
@@ -169645,7 +188209,7 @@
"constraints": []
}
},
- "id": 1258,
+ "id": 1257,
"path": "Intersection"
}
},
@@ -169690,7 +188254,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -169706,7 +188270,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -169715,23 +188279,23 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1454": {
+ "1453": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1454,
+ "id": 1453,
"inner": {
"impl": {
"blanket_impl": {
@@ -169759,7 +188323,7 @@
"constraints": []
}
},
- "id": 1258,
+ "id": 1257,
"path": "Intersection"
}
},
@@ -169786,7 +188350,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -169818,23 +188382,23 @@
"name": null,
"span": {
"begin": [
- 516,
+ 515,
1
],
"end": [
- 516,
+ 515,
42
],
"filename": "checkouts/rust/library/core/src/clone.rs"
},
"visibility": "default"
},
- "1455": {
+ "1454": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1455,
+ "id": 1454,
"inner": {
"impl": {
"blanket_impl": {
@@ -169862,7 +188426,7 @@
"constraints": []
}
},
- "id": 1258,
+ "id": 1257,
"path": "Intersection"
}
},
@@ -169928,7 +188492,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -169953,23 +188517,23 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1456": {
+ "1455": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1456,
+ "id": 1455,
"inner": {
"impl": {
"blanket_impl": {
@@ -169997,7 +188561,7 @@
"constraints": []
}
},
- "id": 1258,
+ "id": 1257,
"path": "Intersection"
}
},
@@ -170020,7 +188584,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -170045,23 +188609,23 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1457": {
+ "1456": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1457,
+ "id": 1456,
"inner": {
"impl": {
"blanket_impl": {
@@ -170089,7 +188653,7 @@
"constraints": []
}
},
- "id": 1258,
+ "id": 1257,
"path": "Intersection"
}
},
@@ -170137,7 +188701,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -170155,8 +188719,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -170172,7 +188736,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -170181,23 +188745,23 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1458": {
+ "1457": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1458,
+ "id": 1457,
"inner": {
"impl": {
"blanket_impl": {
@@ -170225,7 +188789,7 @@
"constraints": []
}
},
- "id": 1258,
+ "id": 1257,
"path": "Intersection"
}
},
@@ -170291,8 +188855,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -170308,7 +188872,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -170317,23 +188881,23 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1459": {
+ "1458": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1459,
+ "id": 1458,
"inner": {
"impl": {
"blanket_impl": {
@@ -170361,7 +188925,7 @@
"constraints": []
}
},
- "id": 1258,
+ "id": 1257,
"path": "Intersection"
}
},
@@ -170409,12 +188973,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -170434,45 +188998,12 @@
},
"visibility": "default"
},
- "146": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"`cfg_accessible` is not fully implemented\"),\nissue: 64797, is_soft: false}, feature: \"cfg_accessible\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 146,
- "inner": {
- "use": {
- "id": 147,
- "is_glob": false,
- "name": "cfg_accessible",
- "source": "core::prelude::v1::cfg_accessible"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 79,
- 1
- ],
- "end": [
- 79,
- 43
- ],
- "filename": "std/src/prelude/v1.rs"
- },
- "visibility": "public"
- },
- "1460": {
+ "1459": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1460,
+ "id": 1459,
"inner": {
"impl": {
"blanket_impl": {
@@ -170500,7 +189031,7 @@
"constraints": []
}
},
- "id": 1258,
+ "id": 1257,
"path": "Intersection"
}
},
@@ -170572,12 +189103,45 @@
},
"visibility": "default"
},
- "1461": {
+ "146": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"`cfg_eval` is a recently implemented feature\"),\nissue: 82679, is_soft: false}, feature: \"cfg_eval\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 146,
+ "inner": {
+ "use": {
+ "id": 147,
+ "is_glob": false,
+ "name": "cfg_eval",
+ "source": "core::prelude::v1::cfg_eval"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 87,
+ 1
+ ],
+ "end": [
+ 87,
+ 37
+ ],
+ "filename": "std/src/prelude/v1.rs"
+ },
+ "visibility": "public"
+ },
+ "1460": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1461,
+ "id": 1460,
"inner": {
"impl": {
"blanket_impl": {
@@ -170605,7 +189169,7 @@
"constraints": []
}
},
- "id": 1258,
+ "id": 1257,
"path": "Intersection"
}
},
@@ -170632,7 +189196,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -170659,7 +189223,7 @@
],
"trait": {
"args": null,
- "id": 157,
+ "id": 155,
"path": "ToOwned"
}
}
@@ -170668,18 +189232,18 @@
"name": null,
"span": {
"begin": [
- 82,
+ 85,
1
],
"end": [
- 84,
+ 87,
14
],
"filename": "checkouts/rust/library/alloc/src/borrow.rs"
},
"visibility": "default"
},
- "1462": {
+ "1461": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -170688,7 +189252,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1462,
+ "id": 1461,
"inner": {
"function": {
"generics": {
@@ -170739,7 +189303,7 @@
},
"visibility": "default"
},
- "1463": {
+ "1462": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -170748,7 +189312,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1463,
+ "id": 1462,
"inner": {
"impl": {
"blanket_impl": null,
@@ -170774,7 +189338,7 @@
"constraints": []
}
},
- "id": 1258,
+ "id": 1257,
"path": "Intersection"
}
},
@@ -170807,14 +189371,14 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1462
+ 1461
],
"provided_trait_methods": [
"clone_from"
],
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -170834,12 +189398,12 @@
},
"visibility": "default"
},
- "1464": {
+ "1463": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1464,
+ "id": 1463,
"inner": {
"assoc_type": {
"bounds": [],
@@ -170873,7 +189437,7 @@
},
"visibility": "default"
},
- "1465": {
+ "1464": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -170882,7 +189446,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1465,
+ "id": 1464,
"inner": {
"function": {
"generics": {
@@ -170954,7 +189518,7 @@
},
"visibility": "default"
},
- "1466": {
+ "1465": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -170963,7 +189527,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1466,
+ "id": 1465,
"inner": {
"function": {
"generics": {
@@ -171036,7 +189600,7 @@
},
"visibility": "default"
},
- "1467": {
+ "1466": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -171045,7 +189609,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1467,
+ "id": 1466,
"inner": {
"function": {
"generics": {
@@ -171191,7 +189755,7 @@
},
"visibility": "default"
},
- "1468": {
+ "1467": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -171200,7 +189764,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1468,
+ "id": 1467,
"inner": {
"impl": {
"blanket_impl": null,
@@ -171226,7 +189790,7 @@
"constraints": []
}
},
- "id": 1258,
+ "id": 1257,
"path": "Intersection"
}
},
@@ -171271,7 +189835,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -171321,10 +189885,10 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 1463,
1464,
1465,
- 1466,
- 1467
+ 1466
],
"provided_trait_methods": [
"next_chunk",
@@ -171426,12 +189990,12 @@
},
"visibility": "default"
},
- "1469": {
+ "1468": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1469,
+ "id": 1468,
"inner": {
"function": {
"generics": {
@@ -171477,7 +190041,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -171489,7 +190053,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -171511,7 +190075,7 @@
},
"visibility": "default"
},
- "1470": {
+ "1469": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 16, patch: 0})}, feature: \"std_debug\"}}]"
@@ -171520,7 +190084,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1470,
+ "id": 1469,
"inner": {
"impl": {
"blanket_impl": null,
@@ -171546,7 +190110,7 @@
"constraints": []
}
},
- "id": 1258,
+ "id": 1257,
"path": "Intersection"
}
},
@@ -171583,7 +190147,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "fmt::Debug"
}
}
@@ -171594,7 +190158,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -171644,12 +190208,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1469
+ 1468
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -171669,7 +190233,7 @@
},
"visibility": "default"
},
- "1471": {
+ "1470": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 26, patch: 0})}, feature: \"fused\"}}]"
@@ -171678,7 +190242,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1471,
+ "id": 1470,
"inner": {
"impl": {
"blanket_impl": null,
@@ -171704,7 +190268,7 @@
"constraints": []
}
},
- "id": 1258,
+ "id": 1257,
"path": "Intersection"
}
},
@@ -171741,7 +190305,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -171814,12 +190378,12 @@
},
"visibility": "default"
},
- "1474": {
+ "1473": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1474,
+ "id": 1473,
"inner": {
"impl": {
"blanket_impl": null,
@@ -171845,7 +190409,7 @@
"constraints": []
}
},
- "id": 1254,
+ "id": 1253,
"path": "Difference"
}
},
@@ -171942,12 +190506,12 @@
"span": null,
"visibility": "default"
},
- "1475": {
+ "1474": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1475,
+ "id": 1474,
"inner": {
"impl": {
"blanket_impl": null,
@@ -171973,7 +190537,7 @@
"constraints": []
}
},
- "id": 1254,
+ "id": 1253,
"path": "Difference"
}
},
@@ -172070,12 +190634,12 @@
"span": null,
"visibility": "default"
},
- "1476": {
+ "1475": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1476,
+ "id": 1475,
"inner": {
"impl": {
"blanket_impl": null,
@@ -172101,7 +190665,7 @@
"constraints": []
}
},
- "id": 1254,
+ "id": 1253,
"path": "Difference"
}
},
@@ -172145,7 +190709,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -172155,12 +190719,12 @@
"span": null,
"visibility": "default"
},
- "1477": {
+ "1476": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1477,
+ "id": 1476,
"inner": {
"impl": {
"blanket_impl": null,
@@ -172186,7 +190750,7 @@
"constraints": []
}
},
- "id": 1254,
+ "id": 1253,
"path": "Difference"
}
},
@@ -172240,12 +190804,12 @@
"span": null,
"visibility": "default"
},
- "1478": {
+ "1477": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1478,
+ "id": 1477,
"inner": {
"impl": {
"blanket_impl": null,
@@ -172271,7 +190835,7 @@
"constraints": []
}
},
- "id": 1254,
+ "id": 1253,
"path": "Difference"
}
},
@@ -172316,7 +190880,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -172337,7 +190901,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -172358,7 +190922,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -172368,12 +190932,12 @@
"span": null,
"visibility": "default"
},
- "1479": {
+ "1478": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1479,
+ "id": 1478,
"inner": {
"impl": {
"blanket_impl": null,
@@ -172399,7 +190963,7 @@
"constraints": []
}
},
- "id": 1254,
+ "id": 1253,
"path": "Difference"
}
},
@@ -172444,7 +191008,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -172465,7 +191029,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -172486,7 +191050,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -172496,45 +191060,12 @@
"span": null,
"visibility": "default"
},
- "148": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"`cfg_eval` is a recently implemented feature\"),\nissue: 82679, is_soft: false}, feature: \"cfg_eval\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 148,
- "inner": {
- "use": {
- "id": 149,
- "is_glob": false,
- "name": "cfg_eval",
- "source": "core::prelude::v1::cfg_eval"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 87,
- 1
- ],
- "end": [
- 87,
- 37
- ],
- "filename": "std/src/prelude/v1.rs"
- },
- "visibility": "public"
- },
- "1480": {
+ "1479": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1480,
+ "id": 1479,
"inner": {
"impl": {
"blanket_impl": {
@@ -172562,7 +191093,7 @@
"constraints": []
}
},
- "id": 1254,
+ "id": 1253,
"path": "Difference"
}
},
@@ -172607,7 +191138,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -172623,7 +191154,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -172632,23 +191163,56 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1481": {
+ "148": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"placeholder syntax for type ascription\"),\nissue: 23416, is_soft: false}, feature: \"type_ascription\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 148,
+ "inner": {
+ "use": {
+ "id": 149,
+ "is_glob": false,
+ "name": "type_ascribe",
+ "source": "core::prelude::v1::type_ascribe"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 95,
+ 1
+ ],
+ "end": [
+ 95,
+ 41
+ ],
+ "filename": "std/src/prelude/v1.rs"
+ },
+ "visibility": "public"
+ },
+ "1480": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1481,
+ "id": 1480,
"inner": {
"impl": {
"blanket_impl": {
@@ -172676,7 +191240,7 @@
"constraints": []
}
},
- "id": 1254,
+ "id": 1253,
"path": "Difference"
}
},
@@ -172721,7 +191285,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -172737,7 +191301,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -172746,23 +191310,23 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1482": {
+ "1481": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1482,
+ "id": 1481,
"inner": {
"impl": {
"blanket_impl": {
@@ -172790,7 +191354,7 @@
"constraints": []
}
},
- "id": 1254,
+ "id": 1253,
"path": "Difference"
}
},
@@ -172817,7 +191381,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -172849,23 +191413,23 @@
"name": null,
"span": {
"begin": [
- 516,
+ 515,
1
],
"end": [
- 516,
+ 515,
42
],
"filename": "checkouts/rust/library/core/src/clone.rs"
},
"visibility": "default"
},
- "1483": {
+ "1482": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1483,
+ "id": 1482,
"inner": {
"impl": {
"blanket_impl": {
@@ -172893,7 +191457,7 @@
"constraints": []
}
},
- "id": 1254,
+ "id": 1253,
"path": "Difference"
}
},
@@ -172959,7 +191523,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -172984,23 +191548,23 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1484": {
+ "1483": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1484,
+ "id": 1483,
"inner": {
"impl": {
"blanket_impl": {
@@ -173028,7 +191592,7 @@
"constraints": []
}
},
- "id": 1254,
+ "id": 1253,
"path": "Difference"
}
},
@@ -173051,7 +191615,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -173076,23 +191640,23 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1485": {
+ "1484": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1485,
+ "id": 1484,
"inner": {
"impl": {
"blanket_impl": {
@@ -173120,7 +191684,7 @@
"constraints": []
}
},
- "id": 1254,
+ "id": 1253,
"path": "Difference"
}
},
@@ -173168,7 +191732,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -173186,8 +191750,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -173203,7 +191767,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -173212,23 +191776,23 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1486": {
+ "1485": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1486,
+ "id": 1485,
"inner": {
"impl": {
"blanket_impl": {
@@ -173256,7 +191820,7 @@
"constraints": []
}
},
- "id": 1254,
+ "id": 1253,
"path": "Difference"
}
},
@@ -173322,8 +191886,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -173339,7 +191903,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -173348,23 +191912,23 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1487": {
+ "1486": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1487,
+ "id": 1486,
"inner": {
"impl": {
"blanket_impl": {
@@ -173392,7 +191956,7 @@
"constraints": []
}
},
- "id": 1254,
+ "id": 1253,
"path": "Difference"
}
},
@@ -173440,12 +192004,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -173465,12 +192029,12 @@
},
"visibility": "default"
},
- "1488": {
+ "1487": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1488,
+ "id": 1487,
"inner": {
"impl": {
"blanket_impl": {
@@ -173498,7 +192062,7 @@
"constraints": []
}
},
- "id": 1254,
+ "id": 1253,
"path": "Difference"
}
},
@@ -173570,12 +192134,12 @@
},
"visibility": "default"
},
- "1489": {
+ "1488": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1489,
+ "id": 1488,
"inner": {
"impl": {
"blanket_impl": {
@@ -173603,7 +192167,7 @@
"constraints": []
}
},
- "id": 1254,
+ "id": 1253,
"path": "Difference"
}
},
@@ -173630,7 +192194,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -173657,7 +192221,7 @@
],
"trait": {
"args": null,
- "id": 157,
+ "id": 155,
"path": "ToOwned"
}
}
@@ -173666,18 +192230,18 @@
"name": null,
"span": {
"begin": [
- 82,
+ 85,
1
],
"end": [
- 84,
+ 87,
14
],
"filename": "checkouts/rust/library/alloc/src/borrow.rs"
},
"visibility": "default"
},
- "1490": {
+ "1489": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -173686,7 +192250,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1490,
+ "id": 1489,
"inner": {
"function": {
"generics": {
@@ -173737,7 +192301,7 @@
},
"visibility": "default"
},
- "1491": {
+ "1490": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -173746,7 +192310,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1491,
+ "id": 1490,
"inner": {
"impl": {
"blanket_impl": null,
@@ -173772,7 +192336,7 @@
"constraints": []
}
},
- "id": 1254,
+ "id": 1253,
"path": "Difference"
}
},
@@ -173805,14 +192369,14 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1490
+ 1489
],
"provided_trait_methods": [
"clone_from"
],
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -173832,12 +192396,12 @@
},
"visibility": "default"
},
- "1492": {
+ "1491": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1492,
+ "id": 1491,
"inner": {
"assoc_type": {
"bounds": [],
@@ -173871,7 +192435,7 @@
},
"visibility": "default"
},
- "1493": {
+ "1492": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -173880,7 +192444,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1493,
+ "id": 1492,
"inner": {
"function": {
"generics": {
@@ -173952,7 +192516,7 @@
},
"visibility": "default"
},
- "1494": {
+ "1493": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -173961,7 +192525,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1494,
+ "id": 1493,
"inner": {
"function": {
"generics": {
@@ -174034,7 +192598,7 @@
},
"visibility": "default"
},
- "1495": {
+ "1494": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -174043,7 +192607,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1495,
+ "id": 1494,
"inner": {
"function": {
"generics": {
@@ -174189,7 +192753,7 @@
},
"visibility": "default"
},
- "1496": {
+ "1495": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -174198,7 +192762,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1496,
+ "id": 1495,
"inner": {
"impl": {
"blanket_impl": null,
@@ -174224,7 +192788,7 @@
"constraints": []
}
},
- "id": 1254,
+ "id": 1253,
"path": "Difference"
}
},
@@ -174269,7 +192833,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -174319,10 +192883,10 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 1491,
1492,
1493,
- 1494,
- 1495
+ 1494
],
"provided_trait_methods": [
"next_chunk",
@@ -174424,7 +192988,7 @@
},
"visibility": "default"
},
- "1497": {
+ "1496": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 26, patch: 0})}, feature: \"fused\"}}]"
@@ -174433,7 +192997,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1497,
+ "id": 1496,
"inner": {
"impl": {
"blanket_impl": null,
@@ -174459,7 +193023,7 @@
"constraints": []
}
},
- "id": 1254,
+ "id": 1253,
"path": "Difference"
}
},
@@ -174496,7 +193060,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -174569,12 +193133,12 @@
},
"visibility": "default"
},
- "1498": {
+ "1497": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1498,
+ "id": 1497,
"inner": {
"function": {
"generics": {
@@ -174620,7 +193184,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -174632,7 +193196,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -174654,7 +193218,7 @@
},
"visibility": "default"
},
- "1499": {
+ "1498": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 16, patch: 0})}, feature: \"std_debug\"}}]"
@@ -174663,7 +193227,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1499,
+ "id": 1498,
"inner": {
"impl": {
"blanket_impl": null,
@@ -174689,7 +193253,7 @@
"constraints": []
}
},
- "id": 1254,
+ "id": 1253,
"path": "Difference"
}
},
@@ -174726,7 +193290,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "fmt::Debug"
}
}
@@ -174737,7 +193301,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -174787,12 +193351,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1498
+ 1497
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -174815,7 +193379,7 @@
"150": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"placeholder syntax for type ascription\"),\nissue: 23416, is_soft: false}, feature: \"type_ascription\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"placeholder syntax for deref patterns\"),\nissue: 87121, is_soft: false}, feature: \"deref_patterns\"}}]"
}
],
"crate_id": 0,
@@ -174826,31 +193390,31 @@
"use": {
"id": 151,
"is_glob": false,
- "name": "type_ascribe",
- "source": "core::prelude::v1::type_ascribe"
+ "name": "deref",
+ "source": "core::prelude::v1::deref"
}
},
"links": {},
"name": null,
"span": {
"begin": [
- 95,
+ 103,
1
],
"end": [
- 95,
- 41
+ 103,
+ 34
],
"filename": "std/src/prelude/v1.rs"
},
"visibility": "public"
},
- "1501": {
+ "1500": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1501,
+ "id": 1500,
"inner": {
"impl": {
"blanket_impl": null,
@@ -174876,7 +193440,7 @@
"constraints": []
}
},
- "id": 1256,
+ "id": 1255,
"path": "SymmetricDifference"
}
},
@@ -174973,12 +193537,12 @@
"span": null,
"visibility": "default"
},
- "1502": {
+ "1501": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1502,
+ "id": 1501,
"inner": {
"impl": {
"blanket_impl": null,
@@ -175004,7 +193568,7 @@
"constraints": []
}
},
- "id": 1256,
+ "id": 1255,
"path": "SymmetricDifference"
}
},
@@ -175101,12 +193665,12 @@
"span": null,
"visibility": "default"
},
- "1503": {
+ "1502": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1503,
+ "id": 1502,
"inner": {
"impl": {
"blanket_impl": null,
@@ -175132,7 +193696,7 @@
"constraints": []
}
},
- "id": 1256,
+ "id": 1255,
"path": "SymmetricDifference"
}
},
@@ -175176,7 +193740,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -175186,12 +193750,12 @@
"span": null,
"visibility": "default"
},
- "1504": {
+ "1503": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1504,
+ "id": 1503,
"inner": {
"impl": {
"blanket_impl": null,
@@ -175217,7 +193781,7 @@
"constraints": []
}
},
- "id": 1256,
+ "id": 1255,
"path": "SymmetricDifference"
}
},
@@ -175271,12 +193835,12 @@
"span": null,
"visibility": "default"
},
- "1505": {
+ "1504": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1505,
+ "id": 1504,
"inner": {
"impl": {
"blanket_impl": null,
@@ -175302,7 +193866,7 @@
"constraints": []
}
},
- "id": 1256,
+ "id": 1255,
"path": "SymmetricDifference"
}
},
@@ -175347,7 +193911,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -175368,7 +193932,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -175389,7 +193953,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -175399,12 +193963,12 @@
"span": null,
"visibility": "default"
},
- "1506": {
+ "1505": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1506,
+ "id": 1505,
"inner": {
"impl": {
"blanket_impl": null,
@@ -175430,7 +193994,7 @@
"constraints": []
}
},
- "id": 1256,
+ "id": 1255,
"path": "SymmetricDifference"
}
},
@@ -175475,7 +194039,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -175496,7 +194060,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -175517,7 +194081,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -175527,12 +194091,12 @@
"span": null,
"visibility": "default"
},
- "1507": {
+ "1506": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1507,
+ "id": 1506,
"inner": {
"impl": {
"blanket_impl": {
@@ -175560,7 +194124,7 @@
"constraints": []
}
},
- "id": 1256,
+ "id": 1255,
"path": "SymmetricDifference"
}
},
@@ -175605,7 +194169,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -175621,7 +194185,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -175630,23 +194194,23 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1508": {
+ "1507": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1508,
+ "id": 1507,
"inner": {
"impl": {
"blanket_impl": {
@@ -175674,7 +194238,7 @@
"constraints": []
}
},
- "id": 1256,
+ "id": 1255,
"path": "SymmetricDifference"
}
},
@@ -175719,7 +194283,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -175735,7 +194299,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -175744,23 +194308,23 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1509": {
+ "1508": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1509,
+ "id": 1508,
"inner": {
"impl": {
"blanket_impl": {
@@ -175788,7 +194352,7 @@
"constraints": []
}
},
- "id": 1256,
+ "id": 1255,
"path": "SymmetricDifference"
}
},
@@ -175815,7 +194379,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -175847,23 +194411,23 @@
"name": null,
"span": {
"begin": [
- 516,
+ 515,
1
],
"end": [
- 516,
+ 515,
42
],
"filename": "checkouts/rust/library/core/src/clone.rs"
},
"visibility": "default"
},
- "1510": {
+ "1509": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1510,
+ "id": 1509,
"inner": {
"impl": {
"blanket_impl": {
@@ -175891,7 +194455,7 @@
"constraints": []
}
},
- "id": 1256,
+ "id": 1255,
"path": "SymmetricDifference"
}
},
@@ -175957,7 +194521,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -175982,23 +194546,23 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1511": {
+ "1510": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1511,
+ "id": 1510,
"inner": {
"impl": {
"blanket_impl": {
@@ -176026,7 +194590,7 @@
"constraints": []
}
},
- "id": 1256,
+ "id": 1255,
"path": "SymmetricDifference"
}
},
@@ -176049,7 +194613,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -176074,23 +194638,23 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1512": {
+ "1511": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1512,
+ "id": 1511,
"inner": {
"impl": {
"blanket_impl": {
@@ -176118,7 +194682,7 @@
"constraints": []
}
},
- "id": 1256,
+ "id": 1255,
"path": "SymmetricDifference"
}
},
@@ -176166,7 +194730,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -176184,8 +194748,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -176201,7 +194765,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -176210,23 +194774,23 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1513": {
+ "1512": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1513,
+ "id": 1512,
"inner": {
"impl": {
"blanket_impl": {
@@ -176254,7 +194818,7 @@
"constraints": []
}
},
- "id": 1256,
+ "id": 1255,
"path": "SymmetricDifference"
}
},
@@ -176320,8 +194884,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -176337,7 +194901,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -176346,23 +194910,23 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1514": {
+ "1513": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1514,
+ "id": 1513,
"inner": {
"impl": {
"blanket_impl": {
@@ -176390,7 +194954,7 @@
"constraints": []
}
},
- "id": 1256,
+ "id": 1255,
"path": "SymmetricDifference"
}
},
@@ -176438,12 +195002,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -176463,12 +195027,12 @@
},
"visibility": "default"
},
- "1515": {
+ "1514": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1515,
+ "id": 1514,
"inner": {
"impl": {
"blanket_impl": {
@@ -176496,7 +195060,7 @@
"constraints": []
}
},
- "id": 1256,
+ "id": 1255,
"path": "SymmetricDifference"
}
},
@@ -176568,12 +195132,12 @@
},
"visibility": "default"
},
- "1516": {
+ "1515": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1516,
+ "id": 1515,
"inner": {
"impl": {
"blanket_impl": {
@@ -176601,7 +195165,7 @@
"constraints": []
}
},
- "id": 1256,
+ "id": 1255,
"path": "SymmetricDifference"
}
},
@@ -176628,7 +195192,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -176655,7 +195219,7 @@
],
"trait": {
"args": null,
- "id": 157,
+ "id": 155,
"path": "ToOwned"
}
}
@@ -176664,18 +195228,18 @@
"name": null,
"span": {
"begin": [
- 82,
+ 85,
1
],
"end": [
- 84,
+ 87,
14
],
"filename": "checkouts/rust/library/alloc/src/borrow.rs"
},
"visibility": "default"
},
- "1517": {
+ "1516": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -176684,7 +195248,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1517,
+ "id": 1516,
"inner": {
"function": {
"generics": {
@@ -176735,7 +195299,7 @@
},
"visibility": "default"
},
- "1518": {
+ "1517": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -176744,7 +195308,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1518,
+ "id": 1517,
"inner": {
"impl": {
"blanket_impl": null,
@@ -176770,7 +195334,7 @@
"constraints": []
}
},
- "id": 1256,
+ "id": 1255,
"path": "SymmetricDifference"
}
},
@@ -176803,14 +195367,14 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1517
+ 1516
],
"provided_trait_methods": [
"clone_from"
],
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -176830,12 +195394,12 @@
},
"visibility": "default"
},
- "1519": {
+ "1518": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1519,
+ "id": 1518,
"inner": {
"assoc_type": {
"bounds": [],
@@ -176869,40 +195433,7 @@
},
"visibility": "default"
},
- "152": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"placeholder syntax for deref patterns\"),\nissue: 87121, is_soft: false}, feature: \"deref_patterns\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 152,
- "inner": {
- "use": {
- "id": 153,
- "is_glob": false,
- "name": "deref",
- "source": "core::prelude::v1::deref"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 103,
- 1
- ],
- "end": [
- 103,
- 34
- ],
- "filename": "std/src/prelude/v1.rs"
- },
- "visibility": "public"
- },
- "1520": {
+ "1519": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -176911,7 +195442,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1520,
+ "id": 1519,
"inner": {
"function": {
"generics": {
@@ -176983,7 +195514,40 @@
},
"visibility": "default"
},
- "1521": {
+ "152": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"`type_alias_impl_trait` has open design concerns\"),\nissue: 63063, is_soft: false}, feature: \"type_alias_impl_trait\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 152,
+ "inner": {
+ "use": {
+ "id": 153,
+ "is_glob": false,
+ "name": "define_opaque",
+ "source": "core::prelude::v1::define_opaque"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 111,
+ 1
+ ],
+ "end": [
+ 111,
+ 42
+ ],
+ "filename": "std/src/prelude/v1.rs"
+ },
+ "visibility": "public"
+ },
+ "1520": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -176992,7 +195556,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1521,
+ "id": 1520,
"inner": {
"function": {
"generics": {
@@ -177065,7 +195629,7 @@
},
"visibility": "default"
},
- "1522": {
+ "1521": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -177074,7 +195638,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1522,
+ "id": 1521,
"inner": {
"function": {
"generics": {
@@ -177220,7 +195784,7 @@
},
"visibility": "default"
},
- "1523": {
+ "1522": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -177229,7 +195793,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1523,
+ "id": 1522,
"inner": {
"impl": {
"blanket_impl": null,
@@ -177255,7 +195819,7 @@
"constraints": []
}
},
- "id": 1256,
+ "id": 1255,
"path": "SymmetricDifference"
}
},
@@ -177300,7 +195864,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -177350,10 +195914,10 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 1518,
1519,
1520,
- 1521,
- 1522
+ 1521
],
"provided_trait_methods": [
"next_chunk",
@@ -177455,7 +196019,7 @@
},
"visibility": "default"
},
- "1524": {
+ "1523": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 26, patch: 0})}, feature: \"fused\"}}]"
@@ -177464,7 +196028,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1524,
+ "id": 1523,
"inner": {
"impl": {
"blanket_impl": null,
@@ -177490,7 +196054,7 @@
"constraints": []
}
},
- "id": 1256,
+ "id": 1255,
"path": "SymmetricDifference"
}
},
@@ -177527,7 +196091,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -177600,12 +196164,12 @@
},
"visibility": "default"
},
- "1525": {
+ "1524": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1525,
+ "id": 1524,
"inner": {
"function": {
"generics": {
@@ -177651,7 +196215,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -177663,7 +196227,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -177685,7 +196249,7 @@
},
"visibility": "default"
},
- "1526": {
+ "1525": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 16, patch: 0})}, feature: \"std_debug\"}}]"
@@ -177694,7 +196258,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1526,
+ "id": 1525,
"inner": {
"impl": {
"blanket_impl": null,
@@ -177720,7 +196284,7 @@
"constraints": []
}
},
- "id": 1256,
+ "id": 1255,
"path": "SymmetricDifference"
}
},
@@ -177757,7 +196321,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "fmt::Debug"
}
}
@@ -177768,7 +196332,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -177818,12 +196382,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1525
+ 1524
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -177843,12 +196407,12 @@
},
"visibility": "default"
},
- "1528": {
+ "1527": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1528,
+ "id": 1527,
"inner": {
"impl": {
"blanket_impl": null,
@@ -177874,7 +196438,7 @@
"constraints": []
}
},
- "id": 1260,
+ "id": 1259,
"path": "Union"
}
},
@@ -177971,12 +196535,12 @@
"span": null,
"visibility": "default"
},
- "1529": {
+ "1528": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1529,
+ "id": 1528,
"inner": {
"impl": {
"blanket_impl": null,
@@ -178002,7 +196566,7 @@
"constraints": []
}
},
- "id": 1260,
+ "id": 1259,
"path": "Union"
}
},
@@ -178099,12 +196663,12 @@
"span": null,
"visibility": "default"
},
- "1530": {
+ "1529": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1530,
+ "id": 1529,
"inner": {
"impl": {
"blanket_impl": null,
@@ -178130,7 +196694,7 @@
"constraints": []
}
},
- "id": 1260,
+ "id": 1259,
"path": "Union"
}
},
@@ -178174,7 +196738,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -178184,12 +196748,12 @@
"span": null,
"visibility": "default"
},
- "1531": {
+ "1530": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1531,
+ "id": 1530,
"inner": {
"impl": {
"blanket_impl": null,
@@ -178215,7 +196779,7 @@
"constraints": []
}
},
- "id": 1260,
+ "id": 1259,
"path": "Union"
}
},
@@ -178269,12 +196833,12 @@
"span": null,
"visibility": "default"
},
- "1532": {
+ "1531": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1532,
+ "id": 1531,
"inner": {
"impl": {
"blanket_impl": null,
@@ -178300,7 +196864,7 @@
"constraints": []
}
},
- "id": 1260,
+ "id": 1259,
"path": "Union"
}
},
@@ -178345,7 +196909,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -178366,7 +196930,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -178387,7 +196951,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -178397,12 +196961,12 @@
"span": null,
"visibility": "default"
},
- "1533": {
+ "1532": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1533,
+ "id": 1532,
"inner": {
"impl": {
"blanket_impl": null,
@@ -178428,7 +196992,7 @@
"constraints": []
}
},
- "id": 1260,
+ "id": 1259,
"path": "Union"
}
},
@@ -178473,7 +197037,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -178494,7 +197058,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -178515,7 +197079,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -178525,12 +197089,12 @@
"span": null,
"visibility": "default"
},
- "1534": {
+ "1533": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1534,
+ "id": 1533,
"inner": {
"impl": {
"blanket_impl": {
@@ -178558,7 +197122,7 @@
"constraints": []
}
},
- "id": 1260,
+ "id": 1259,
"path": "Union"
}
},
@@ -178603,7 +197167,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -178619,7 +197183,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -178628,23 +197192,23 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1535": {
+ "1534": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1535,
+ "id": 1534,
"inner": {
"impl": {
"blanket_impl": {
@@ -178672,7 +197236,7 @@
"constraints": []
}
},
- "id": 1260,
+ "id": 1259,
"path": "Union"
}
},
@@ -178717,7 +197281,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -178733,7 +197297,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -178742,23 +197306,23 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1536": {
+ "1535": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1536,
+ "id": 1535,
"inner": {
"impl": {
"blanket_impl": {
@@ -178786,7 +197350,7 @@
"constraints": []
}
},
- "id": 1260,
+ "id": 1259,
"path": "Union"
}
},
@@ -178813,7 +197377,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -178845,23 +197409,23 @@
"name": null,
"span": {
"begin": [
- 516,
+ 515,
1
],
"end": [
- 516,
+ 515,
42
],
"filename": "checkouts/rust/library/core/src/clone.rs"
},
"visibility": "default"
},
- "1537": {
+ "1536": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1537,
+ "id": 1536,
"inner": {
"impl": {
"blanket_impl": {
@@ -178889,7 +197453,7 @@
"constraints": []
}
},
- "id": 1260,
+ "id": 1259,
"path": "Union"
}
},
@@ -178955,7 +197519,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -178980,23 +197544,23 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1538": {
+ "1537": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1538,
+ "id": 1537,
"inner": {
"impl": {
"blanket_impl": {
@@ -179024,7 +197588,7 @@
"constraints": []
}
},
- "id": 1260,
+ "id": 1259,
"path": "Union"
}
},
@@ -179047,7 +197611,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -179072,23 +197636,23 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1539": {
+ "1538": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1539,
+ "id": 1538,
"inner": {
"impl": {
"blanket_impl": {
@@ -179116,7 +197680,7 @@
"constraints": []
}
},
- "id": 1260,
+ "id": 1259,
"path": "Union"
}
},
@@ -179164,7 +197728,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -179182,8 +197746,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -179199,7 +197763,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -179208,56 +197772,23 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "154": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"`type_alias_impl_trait` has open design concerns\"),\nissue: 63063, is_soft: false}, feature: \"type_alias_impl_trait\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 154,
- "inner": {
- "use": {
- "id": 155,
- "is_glob": false,
- "name": "define_opaque",
- "source": "core::prelude::v1::define_opaque"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 111,
- 1
- ],
- "end": [
- 111,
- 42
- ],
- "filename": "std/src/prelude/v1.rs"
- },
- "visibility": "public"
- },
- "1540": {
+ "1539": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1540,
+ "id": 1539,
"inner": {
"impl": {
"blanket_impl": {
@@ -179285,7 +197816,7 @@
"constraints": []
}
},
- "id": 1260,
+ "id": 1259,
"path": "Union"
}
},
@@ -179351,8 +197882,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -179368,7 +197899,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -179377,23 +197908,59 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1541": {
+ "154": {
+ "attrs": [
+ {
+ "other": "#[doc(no_inline)]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 154,
+ "inner": {
+ "use": {
+ "id": 155,
+ "is_glob": false,
+ "name": "ToOwned",
+ "source": "crate::borrow::ToOwned"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 120,
+ 1
+ ],
+ "end": [
+ 120,
+ 32
+ ],
+ "filename": "std/src/prelude/v1.rs"
+ },
+ "visibility": "public"
+ },
+ "1540": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1541,
+ "id": 1540,
"inner": {
"impl": {
"blanket_impl": {
@@ -179421,7 +197988,7 @@
"constraints": []
}
},
- "id": 1260,
+ "id": 1259,
"path": "Union"
}
},
@@ -179469,12 +198036,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -179494,12 +198061,12 @@
},
"visibility": "default"
},
- "1542": {
+ "1541": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1542,
+ "id": 1541,
"inner": {
"impl": {
"blanket_impl": {
@@ -179527,7 +198094,7 @@
"constraints": []
}
},
- "id": 1260,
+ "id": 1259,
"path": "Union"
}
},
@@ -179599,12 +198166,12 @@
},
"visibility": "default"
},
- "1543": {
+ "1542": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1543,
+ "id": 1542,
"inner": {
"impl": {
"blanket_impl": {
@@ -179632,7 +198199,7 @@
"constraints": []
}
},
- "id": 1260,
+ "id": 1259,
"path": "Union"
}
},
@@ -179659,7 +198226,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -179686,7 +198253,7 @@
],
"trait": {
"args": null,
- "id": 157,
+ "id": 155,
"path": "ToOwned"
}
}
@@ -179695,18 +198262,18 @@
"name": null,
"span": {
"begin": [
- 82,
+ 85,
1
],
"end": [
- 84,
+ 87,
14
],
"filename": "checkouts/rust/library/alloc/src/borrow.rs"
},
"visibility": "default"
},
- "1544": {
+ "1543": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -179715,7 +198282,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1544,
+ "id": 1543,
"inner": {
"function": {
"generics": {
@@ -179766,7 +198333,7 @@
},
"visibility": "default"
},
- "1545": {
+ "1544": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -179775,7 +198342,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1545,
+ "id": 1544,
"inner": {
"impl": {
"blanket_impl": null,
@@ -179801,7 +198368,7 @@
"constraints": []
}
},
- "id": 1260,
+ "id": 1259,
"path": "Union"
}
},
@@ -179834,14 +198401,14 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1544
+ 1543
],
"provided_trait_methods": [
"clone_from"
],
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -179861,7 +198428,7 @@
},
"visibility": "default"
},
- "1546": {
+ "1545": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 26, patch: 0})}, feature: \"fused\"}}]"
@@ -179870,7 +198437,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1546,
+ "id": 1545,
"inner": {
"impl": {
"blanket_impl": null,
@@ -179896,7 +198463,7 @@
"constraints": []
}
},
- "id": 1260,
+ "id": 1259,
"path": "Union"
}
},
@@ -179933,7 +198500,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -180006,12 +198573,12 @@
},
"visibility": "default"
},
- "1547": {
+ "1546": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1547,
+ "id": 1546,
"inner": {
"function": {
"generics": {
@@ -180057,7 +198624,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -180069,7 +198636,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -180091,7 +198658,7 @@
},
"visibility": "default"
},
- "1548": {
+ "1547": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 16, patch: 0})}, feature: \"std_debug\"}}]"
@@ -180100,7 +198667,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1548,
+ "id": 1547,
"inner": {
"impl": {
"blanket_impl": null,
@@ -180126,7 +198693,7 @@
"constraints": []
}
},
- "id": 1260,
+ "id": 1259,
"path": "Union"
}
},
@@ -180163,7 +198730,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "fmt::Debug"
}
}
@@ -180174,7 +198741,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -180224,12 +198791,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1547
+ 1546
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -180249,12 +198816,12 @@
},
"visibility": "default"
},
- "1549": {
+ "1548": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1549,
+ "id": 1548,
"inner": {
"assoc_type": {
"bounds": [],
@@ -180288,7 +198855,7 @@
},
"visibility": "default"
},
- "1550": {
+ "1549": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -180297,7 +198864,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1550,
+ "id": 1549,
"inner": {
"function": {
"generics": {
@@ -180369,7 +198936,7 @@
},
"visibility": "default"
},
- "1551": {
+ "1550": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -180378,7 +198945,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1551,
+ "id": 1550,
"inner": {
"function": {
"generics": {
@@ -180451,7 +199018,7 @@
},
"visibility": "default"
},
- "1552": {
+ "1551": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -180460,7 +199027,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1552,
+ "id": 1551,
"inner": {
"function": {
"generics": {
@@ -180505,7 +199072,7 @@
},
"visibility": "default"
},
- "1553": {
+ "1552": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -180514,7 +199081,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1553,
+ "id": 1552,
"inner": {
"function": {
"generics": {
@@ -180660,7 +199227,7 @@
},
"visibility": "default"
},
- "1554": {
+ "1553": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -180669,7 +199236,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1554,
+ "id": 1553,
"inner": {
"impl": {
"blanket_impl": null,
@@ -180695,7 +199262,7 @@
"constraints": []
}
},
- "id": 1260,
+ "id": 1259,
"path": "Union"
}
},
@@ -180740,7 +199307,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -180790,11 +199357,11 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 1548,
1549,
1550,
1551,
- 1552,
- 1553
+ 1552
],
"provided_trait_methods": [
"next_chunk",
@@ -180896,12 +199463,12 @@
},
"visibility": "default"
},
- "1555": {
+ "1554": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1555,
+ "id": 1554,
"inner": {
"struct_field": {
"resolved_path": {
@@ -180925,7 +199492,7 @@
"constraints": []
}
},
- "id": 1556,
+ "id": 1555,
"path": "OccupiedEntry"
}
}
@@ -180945,7 +199512,7 @@
},
"visibility": "default"
},
- "1556": {
+ "1555": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 60896, is_soft: false}, feature: \"hash_set_entry\"}}]"
@@ -180954,7 +199521,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "A view into an occupied entry in a `HashSet`.\nIt is part of the [`Entry`] enum.\n\n[`Entry`]: enum.Entry.html\n\n# Examples\n\n```\n#![feature(hash_set_entry)]\n\nuse std::collections::hash_set::{Entry, HashSet};\n\nlet mut set = HashSet::new();\nset.extend([\"a\", \"b\", \"c\"]);\n\nlet _entry_o = set.entry(\"a\").insert();\nassert_eq!(set.len(), 3);\n\n// Existing key\nmatch set.entry(\"a\") {\n Entry::Vacant(_) => unreachable!(),\n Entry::Occupied(view) => {\n assert_eq!(view.get(), &\"a\");\n }\n}\n\nassert_eq!(set.len(), 3);\n\n// Existing key (take)\nmatch set.entry(\"c\") {\n Entry::Vacant(_) => unreachable!(),\n Entry::Occupied(view) => {\n assert_eq!(view.remove(), \"c\");\n }\n}\nassert_eq!(set.get(&\"c\"), None);\nassert_eq!(set.len(), 2);\n```",
- "id": 1556,
+ "id": 1555,
"inner": {
"struct": {
"generics": {
@@ -180991,6 +199558,7 @@
"where_predicates": []
},
"impls": [
+ 1582,
1583,
1584,
1585,
@@ -181004,8 +199572,7 @@
1593,
1594,
1595,
- 1596,
- 1598
+ 1597
],
"kind": {
"plain": {
@@ -181030,18 +199597,18 @@
},
"visibility": "public"
},
- "1557": {
+ "1556": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": "An occupied entry.\n\n# Examples\n\n```\n#![feature(hash_set_entry)]\n\nuse std::collections::hash_set::{Entry, HashSet};\n\nlet mut set = HashSet::from([\"a\", \"b\"]);\n\nmatch set.entry(\"a\") {\n Entry::Vacant(_) => unreachable!(),\n Entry::Occupied(_) => { }\n}\n```",
- "id": 1557,
+ "id": 1556,
"inner": {
"variant": {
"discriminant": null,
"kind": {
"tuple": [
- 1555
+ 1554
]
}
}
@@ -181061,12 +199628,12 @@
},
"visibility": "default"
},
- "1558": {
+ "1557": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1558,
+ "id": 1557,
"inner": {
"struct_field": {
"resolved_path": {
@@ -181090,7 +199657,7 @@
"constraints": []
}
},
- "id": 1559,
+ "id": 1558,
"path": "VacantEntry"
}
}
@@ -181110,7 +199677,7 @@
},
"visibility": "default"
},
- "1559": {
+ "1558": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 60896, is_soft: false}, feature: \"hash_set_entry\"}}]"
@@ -181119,7 +199686,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "A view into a vacant entry in a `HashSet`.\nIt is part of the [`Entry`] enum.\n\n[`Entry`]: enum.Entry.html\n\n# Examples\n\n```\n#![feature(hash_set_entry)]\n\nuse std::collections::hash_set::{Entry, HashSet};\n\nlet mut set = HashSet::<&str>::new();\n\nlet entry_v = match set.entry(\"a\") {\n Entry::Vacant(view) => view,\n Entry::Occupied(_) => unreachable!(),\n};\nentry_v.insert();\nassert!(set.contains(\"a\") && set.len() == 1);\n\n// Nonexistent key (insert)\nmatch set.entry(\"b\") {\n Entry::Vacant(view) => view.insert(),\n Entry::Occupied(_) => unreachable!(),\n}\nassert!(set.contains(\"b\") && set.len() == 2);\n```",
- "id": 1559,
+ "id": 1558,
"inner": {
"struct": {
"generics": {
@@ -181156,6 +199723,7 @@
"where_predicates": []
},
"impls": [
+ 1602,
1603,
1604,
1605,
@@ -181169,8 +199737,7 @@
1613,
1614,
1615,
- 1616,
- 1618
+ 1617
],
"kind": {
"plain": {
@@ -181195,54 +199762,18 @@
},
"visibility": "public"
},
- "156": {
- "attrs": [
- {
- "other": "#[doc(no_inline)]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 156,
- "inner": {
- "use": {
- "id": 157,
- "is_glob": false,
- "name": "ToOwned",
- "source": "crate::borrow::ToOwned"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 120,
- 1
- ],
- "end": [
- 120,
- 32
- ],
- "filename": "std/src/prelude/v1.rs"
- },
- "visibility": "public"
- },
- "1560": {
+ "1559": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": "A vacant entry.\n\n# Examples\n\n```\n#![feature(hash_set_entry)]\n\nuse std::collections::hash_set::{Entry, HashSet};\n\nlet mut set = HashSet::new();\n\nmatch set.entry(\"a\") {\n Entry::Occupied(_) => unreachable!(),\n Entry::Vacant(_) => { }\n}\n```",
- "id": 1560,
+ "id": 1559,
"inner": {
"variant": {
"discriminant": null,
"kind": {
"tuple": [
- 1558
+ 1557
]
}
}
@@ -181262,7 +199793,43 @@
},
"visibility": "default"
},
- "1561": {
+ "156": {
+ "attrs": [
+ {
+ "other": "#[doc(no_inline)]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 156,
+ "inner": {
+ "use": {
+ "id": 157,
+ "is_glob": false,
+ "name": "Box",
+ "source": "crate::boxed::Box"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 123,
+ 1
+ ],
+ "end": [
+ 123,
+ 27
+ ],
+ "filename": "std/src/prelude/v1.rs"
+ },
+ "visibility": "public"
+ },
+ "1560": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 60896, is_soft: false}, feature: \"hash_set_entry\"}}]"
@@ -181274,7 +199841,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Sets the value of the entry, and returns an OccupiedEntry.\n\n# Examples\n\n```\n#![feature(hash_set_entry)]\n\nuse std::collections::HashSet;\n\nlet mut set = HashSet::new();\nlet entry = set.entry(\"horseyland\").insert();\n\nassert_eq!(entry.get(), &\"horseyland\");\n```",
- "id": 1561,
+ "id": 1560,
"inner": {
"function": {
"generics": {
@@ -181363,7 +199930,7 @@
"constraints": []
}
},
- "id": 1556,
+ "id": 1555,
"path": "OccupiedEntry"
}
}
@@ -181385,7 +199952,7 @@
},
"visibility": "public"
},
- "1562": {
+ "1561": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 60896, is_soft: false}, feature: \"hash_set_entry\"}}]"
@@ -181397,7 +199964,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Ensures a value is in the entry by inserting if it was vacant.\n\n# Examples\n\n```\n#![feature(hash_set_entry)]\n\nuse std::collections::HashSet;\n\nlet mut set = HashSet::new();\n\n// nonexistent key\nset.entry(\"poneyland\").or_insert();\nassert!(set.contains(\"poneyland\"));\n\n// existing key\nset.entry(\"poneyland\").or_insert();\nassert!(set.contains(\"poneyland\"));\nassert_eq!(set.len(), 1);\n```",
- "id": 1562,
+ "id": 1561,
"inner": {
"function": {
"generics": {
@@ -181483,7 +200050,7 @@
},
"visibility": "public"
},
- "1563": {
+ "1562": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 60896, is_soft: false}, feature: \"hash_set_entry\"}}]"
@@ -181495,7 +200062,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Returns a reference to this entry's value.\n\n# Examples\n\n```\n#![feature(hash_set_entry)]\n\nuse std::collections::HashSet;\n\nlet mut set = HashSet::new();\nset.entry(\"poneyland\").or_insert();\n\n// existing key\nassert_eq!(set.entry(\"poneyland\").get(), &\"poneyland\");\n// nonexistent key\nassert_eq!(set.entry(\"horseland\").get(), &\"horseland\");\n```",
- "id": 1563,
+ "id": 1562,
"inner": {
"function": {
"generics": {
@@ -181552,12 +200119,12 @@
},
"visibility": "public"
},
- "1564": {
+ "1563": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1564,
+ "id": 1563,
"inner": {
"impl": {
"blanket_impl": null,
@@ -181583,7 +200150,7 @@
"constraints": []
}
},
- "id": 1266,
+ "id": 1265,
"path": "Entry"
}
},
@@ -181624,9 +200191,9 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 1560,
1561,
- 1562,
- 1563
+ 1562
],
"provided_trait_methods": [],
"trait": null
@@ -181647,12 +200214,12 @@
},
"visibility": "default"
},
- "1565": {
+ "1564": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1565,
+ "id": 1564,
"inner": {
"impl": {
"blanket_impl": null,
@@ -181678,7 +200245,7 @@
"constraints": []
}
},
- "id": 1266,
+ "id": 1265,
"path": "Entry"
}
},
@@ -181775,12 +200342,12 @@
"span": null,
"visibility": "default"
},
- "1566": {
+ "1565": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1566,
+ "id": 1565,
"inner": {
"impl": {
"blanket_impl": null,
@@ -181806,7 +200373,7 @@
"constraints": []
}
},
- "id": 1266,
+ "id": 1265,
"path": "Entry"
}
},
@@ -181903,12 +200470,12 @@
"span": null,
"visibility": "default"
},
- "1567": {
+ "1566": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1567,
+ "id": 1566,
"inner": {
"impl": {
"blanket_impl": null,
@@ -181934,7 +200501,7 @@
"constraints": []
}
},
- "id": 1266,
+ "id": 1265,
"path": "Entry"
}
},
@@ -181979,7 +200546,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -182000,7 +200567,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -182010,12 +200577,12 @@
"span": null,
"visibility": "default"
},
- "1568": {
+ "1567": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1568,
+ "id": 1567,
"inner": {
"impl": {
"blanket_impl": null,
@@ -182041,7 +200608,7 @@
"constraints": []
}
},
- "id": 1266,
+ "id": 1265,
"path": "Entry"
}
},
@@ -182117,12 +200684,12 @@
"span": null,
"visibility": "default"
},
- "1569": {
+ "1568": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1569,
+ "id": 1568,
"inner": {
"impl": {
"blanket_impl": null,
@@ -182148,7 +200715,7 @@
"constraints": []
}
},
- "id": 1266,
+ "id": 1265,
"path": "Entry"
}
},
@@ -182192,7 +200759,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -182202,12 +200769,12 @@
"span": null,
"visibility": "default"
},
- "1570": {
+ "1569": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1570,
+ "id": 1569,
"inner": {
"impl": {
"blanket_impl": null,
@@ -182233,7 +200800,7 @@
"constraints": []
}
},
- "id": 1266,
+ "id": 1265,
"path": "Entry"
}
},
@@ -182278,7 +200845,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -182299,7 +200866,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -182320,7 +200887,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -182330,12 +200897,12 @@
"span": null,
"visibility": "default"
},
- "1571": {
+ "1570": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1571,
+ "id": 1570,
"inner": {
"impl": {
"blanket_impl": {
@@ -182363,7 +200930,7 @@
"constraints": []
}
},
- "id": 1266,
+ "id": 1265,
"path": "Entry"
}
},
@@ -182408,7 +200975,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -182424,7 +200991,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -182433,23 +201000,23 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1572": {
+ "1571": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1572,
+ "id": 1571,
"inner": {
"impl": {
"blanket_impl": {
@@ -182477,7 +201044,7 @@
"constraints": []
}
},
- "id": 1266,
+ "id": 1265,
"path": "Entry"
}
},
@@ -182522,7 +201089,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -182538,7 +201105,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -182547,23 +201114,23 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1573": {
+ "1572": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1573,
+ "id": 1572,
"inner": {
"impl": {
"blanket_impl": {
@@ -182591,7 +201158,7 @@
"constraints": []
}
},
- "id": 1266,
+ "id": 1265,
"path": "Entry"
}
},
@@ -182657,7 +201224,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -182682,23 +201249,23 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1574": {
+ "1573": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1574,
+ "id": 1573,
"inner": {
"impl": {
"blanket_impl": {
@@ -182726,7 +201293,7 @@
"constraints": []
}
},
- "id": 1266,
+ "id": 1265,
"path": "Entry"
}
},
@@ -182749,7 +201316,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -182774,23 +201341,23 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1575": {
+ "1574": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1575,
+ "id": 1574,
"inner": {
"impl": {
"blanket_impl": {
@@ -182818,7 +201385,7 @@
"constraints": []
}
},
- "id": 1266,
+ "id": 1265,
"path": "Entry"
}
},
@@ -182866,7 +201433,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -182884,8 +201451,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -182901,7 +201468,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -182910,23 +201477,23 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1576": {
+ "1575": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1576,
+ "id": 1575,
"inner": {
"impl": {
"blanket_impl": {
@@ -182954,7 +201521,7 @@
"constraints": []
}
},
- "id": 1266,
+ "id": 1265,
"path": "Entry"
}
},
@@ -183020,8 +201587,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -183037,7 +201604,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -183046,23 +201613,23 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1577": {
+ "1576": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1577,
+ "id": 1576,
"inner": {
"impl": {
"blanket_impl": {
@@ -183090,7 +201657,7 @@
"constraints": []
}
},
- "id": 1266,
+ "id": 1265,
"path": "Entry"
}
},
@@ -183138,12 +201705,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -183163,12 +201730,12 @@
},
"visibility": "default"
},
- "1578": {
+ "1577": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1578,
+ "id": 1577,
"inner": {
"function": {
"generics": {
@@ -183214,7 +201781,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -183226,7 +201793,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -183248,7 +201815,7 @@
},
"visibility": "default"
},
- "1579": {
+ "1578": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 60896, is_soft: false}, feature: \"hash_set_entry\"}}]"
@@ -183257,7 +201824,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1579,
+ "id": 1578,
"inner": {
"impl": {
"blanket_impl": null,
@@ -183283,7 +201850,7 @@
"constraints": []
}
},
- "id": 1266,
+ "id": 1265,
"path": "Entry"
}
},
@@ -183299,7 +201866,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "fmt::Debug"
}
}
@@ -183328,12 +201895,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1578
+ 1577
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -183370,26 +201937,26 @@
"use": {
"id": 159,
"is_glob": false,
- "name": "Box",
- "source": "crate::boxed::Box"
+ "name": "String",
+ "source": "crate::string::String"
}
},
"links": {},
"name": null,
"span": {
"begin": [
- 123,
- 1
+ 126,
+ 25
],
"end": [
- 123,
- 27
+ 126,
+ 31
],
"filename": "std/src/prelude/v1.rs"
},
"visibility": "public"
},
- "1581": {
+ "1580": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 60896, is_soft: false}, feature: \"hash_set_entry\"}}]"
@@ -183401,7 +201968,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Gets a reference to the value in the entry.\n\n# Examples\n\n```\n#![feature(hash_set_entry)]\n\nuse std::collections::hash_set::{Entry, HashSet};\n\nlet mut set = HashSet::new();\nset.entry(\"poneyland\").or_insert();\n\nmatch set.entry(\"poneyland\") {\n Entry::Vacant(_) => panic!(),\n Entry::Occupied(entry) => assert_eq!(entry.get(), &\"poneyland\"),\n}\n```",
- "id": 1581,
+ "id": 1580,
"inner": {
"function": {
"generics": {
@@ -183458,7 +202025,7 @@
},
"visibility": "public"
},
- "1582": {
+ "1581": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 60896, is_soft: false}, feature: \"hash_set_entry\"}}]"
@@ -183470,7 +202037,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Takes the value out of the entry, and returns it.\nKeeps the allocated memory for reuse.\n\n# Examples\n\n```\n#![feature(hash_set_entry)]\n\nuse std::collections::HashSet;\nuse std::collections::hash_set::Entry;\n\nlet mut set = HashSet::new();\n// The set is empty\nassert!(set.is_empty() && set.capacity() == 0);\n\nset.entry(\"poneyland\").or_insert();\nlet capacity_before_remove = set.capacity();\n\nif let Entry::Occupied(o) = set.entry(\"poneyland\") {\n assert_eq!(o.remove(), \"poneyland\");\n}\n\nassert_eq!(set.contains(\"poneyland\"), false);\n// Now set hold none elements but capacity is equal to the old one\nassert!(set.len() == 0 && set.capacity() == capacity_before_remove);\n```",
- "id": 1582,
+ "id": 1581,
"inner": {
"function": {
"generics": {
@@ -183515,12 +202082,12 @@
},
"visibility": "public"
},
- "1583": {
+ "1582": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1583,
+ "id": 1582,
"inner": {
"impl": {
"blanket_impl": null,
@@ -183546,7 +202113,7 @@
"constraints": []
}
},
- "id": 1556,
+ "id": 1555,
"path": "OccupiedEntry"
}
},
@@ -183579,8 +202146,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1581,
- 1582
+ 1580,
+ 1581
],
"provided_trait_methods": [],
"trait": null
@@ -183601,12 +202168,12 @@
},
"visibility": "default"
},
- "1584": {
+ "1583": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1584,
+ "id": 1583,
"inner": {
"impl": {
"blanket_impl": null,
@@ -183632,7 +202199,7 @@
"constraints": []
}
},
- "id": 1556,
+ "id": 1555,
"path": "OccupiedEntry"
}
},
@@ -183729,12 +202296,12 @@
"span": null,
"visibility": "default"
},
- "1585": {
+ "1584": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1585,
+ "id": 1584,
"inner": {
"impl": {
"blanket_impl": null,
@@ -183760,7 +202327,7 @@
"constraints": []
}
},
- "id": 1556,
+ "id": 1555,
"path": "OccupiedEntry"
}
},
@@ -183857,12 +202424,12 @@
"span": null,
"visibility": "default"
},
- "1586": {
+ "1585": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1586,
+ "id": 1585,
"inner": {
"impl": {
"blanket_impl": null,
@@ -183888,7 +202455,7 @@
"constraints": []
}
},
- "id": 1556,
+ "id": 1555,
"path": "OccupiedEntry"
}
},
@@ -183932,7 +202499,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -183942,12 +202509,12 @@
"span": null,
"visibility": "default"
},
- "1587": {
+ "1586": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1587,
+ "id": 1586,
"inner": {
"impl": {
"blanket_impl": null,
@@ -183973,7 +202540,7 @@
"constraints": []
}
},
- "id": 1556,
+ "id": 1555,
"path": "OccupiedEntry"
}
},
@@ -184027,12 +202594,12 @@
"span": null,
"visibility": "default"
},
- "1588": {
+ "1587": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1588,
+ "id": 1587,
"inner": {
"impl": {
"blanket_impl": null,
@@ -184058,7 +202625,7 @@
"constraints": []
}
},
- "id": 1556,
+ "id": 1555,
"path": "OccupiedEntry"
}
},
@@ -184102,7 +202669,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -184112,12 +202679,12 @@
"span": null,
"visibility": "default"
},
- "1589": {
+ "1588": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1589,
+ "id": 1588,
"inner": {
"impl": {
"blanket_impl": null,
@@ -184143,7 +202710,7 @@
"constraints": []
}
},
- "id": 1556,
+ "id": 1555,
"path": "OccupiedEntry"
}
},
@@ -184188,7 +202755,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -184209,7 +202776,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -184230,7 +202797,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -184240,12 +202807,12 @@
"span": null,
"visibility": "default"
},
- "1590": {
+ "1589": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1590,
+ "id": 1589,
"inner": {
"impl": {
"blanket_impl": {
@@ -184273,7 +202840,7 @@
"constraints": []
}
},
- "id": 1556,
+ "id": 1555,
"path": "OccupiedEntry"
}
},
@@ -184318,7 +202885,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -184334,7 +202901,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -184343,23 +202910,23 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1591": {
+ "1590": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1591,
+ "id": 1590,
"inner": {
"impl": {
"blanket_impl": {
@@ -184387,7 +202954,7 @@
"constraints": []
}
},
- "id": 1556,
+ "id": 1555,
"path": "OccupiedEntry"
}
},
@@ -184432,7 +202999,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -184448,7 +203015,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -184457,23 +203024,23 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1592": {
+ "1591": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1592,
+ "id": 1591,
"inner": {
"impl": {
"blanket_impl": {
@@ -184501,7 +203068,7 @@
"constraints": []
}
},
- "id": 1556,
+ "id": 1555,
"path": "OccupiedEntry"
}
},
@@ -184567,7 +203134,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -184592,23 +203159,23 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1593": {
+ "1592": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1593,
+ "id": 1592,
"inner": {
"impl": {
"blanket_impl": {
@@ -184636,7 +203203,7 @@
"constraints": []
}
},
- "id": 1556,
+ "id": 1555,
"path": "OccupiedEntry"
}
},
@@ -184659,7 +203226,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -184684,23 +203251,23 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1594": {
+ "1593": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1594,
+ "id": 1593,
"inner": {
"impl": {
"blanket_impl": {
@@ -184728,7 +203295,7 @@
"constraints": []
}
},
- "id": 1556,
+ "id": 1555,
"path": "OccupiedEntry"
}
},
@@ -184776,7 +203343,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -184794,8 +203361,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -184811,7 +203378,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -184820,23 +203387,23 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1595": {
+ "1594": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1595,
+ "id": 1594,
"inner": {
"impl": {
"blanket_impl": {
@@ -184864,7 +203431,7 @@
"constraints": []
}
},
- "id": 1556,
+ "id": 1555,
"path": "OccupiedEntry"
}
},
@@ -184930,8 +203497,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -184947,7 +203514,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -184956,23 +203523,23 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1596": {
+ "1595": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1596,
+ "id": 1595,
"inner": {
"impl": {
"blanket_impl": {
@@ -185000,7 +203567,7 @@
"constraints": []
}
},
- "id": 1556,
+ "id": 1555,
"path": "OccupiedEntry"
}
},
@@ -185048,12 +203615,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -185073,12 +203640,12 @@
},
"visibility": "default"
},
- "1597": {
+ "1596": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1597,
+ "id": 1596,
"inner": {
"function": {
"generics": {
@@ -185124,7 +203691,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -185136,7 +203703,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -185158,7 +203725,7 @@
},
"visibility": "default"
},
- "1598": {
+ "1597": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 60896, is_soft: false}, feature: \"hash_set_entry\"}}]"
@@ -185167,7 +203734,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1598,
+ "id": 1597,
"inner": {
"impl": {
"blanket_impl": null,
@@ -185193,7 +203760,7 @@
"constraints": []
}
},
- "id": 1556,
+ "id": 1555,
"path": "OccupiedEntry"
}
},
@@ -185209,7 +203776,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "fmt::Debug"
}
}
@@ -185238,12 +203805,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1597
+ 1596
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -185263,6 +203830,75 @@
},
"visibility": "default"
},
+ "1599": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 60896, is_soft: false}, feature: \"hash_set_entry\"}}]"
+ },
+ {
+ "other": "#[attr = Inline(Hint)]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": "Gets a reference to the value that would be used when inserting\nthrough the `VacantEntry`.\n\n# Examples\n\n```\n#![feature(hash_set_entry)]\n\nuse std::collections::HashSet;\n\nlet mut set = HashSet::new();\nassert_eq!(set.entry(\"poneyland\").get(), &\"poneyland\");\n```",
+ "id": 1599,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "T"
+ }
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "get",
+ "span": {
+ "begin": [
+ 2272,
+ 5
+ ],
+ "end": [
+ 2274,
+ 6
+ ],
+ "filename": "std/src/collections/hash/set.rs"
+ },
+ "visibility": "public"
+ },
"16": {
"attrs": [
{
@@ -185316,8 +203952,8 @@
"use": {
"id": 161,
"is_glob": false,
- "name": "String",
- "source": "crate::string::String"
+ "name": "ToString",
+ "source": "crate::string::ToString"
}
},
"links": {},
@@ -185325,86 +203961,17 @@
"span": {
"begin": [
126,
- 25
+ 33
],
"end": [
126,
- 31
+ 41
],
"filename": "std/src/prelude/v1.rs"
},
"visibility": "public"
},
"1600": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 60896, is_soft: false}, feature: \"hash_set_entry\"}}]"
- },
- {
- "other": "#[attr = Inline(Hint)]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": "Gets a reference to the value that would be used when inserting\nthrough the `VacantEntry`.\n\n# Examples\n\n```\n#![feature(hash_set_entry)]\n\nuse std::collections::HashSet;\n\nlet mut set = HashSet::new();\nassert_eq!(set.entry(\"poneyland\").get(), &\"poneyland\");\n```",
- "id": 1600,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "T"
- }
- }
- }
- }
- }
- },
- "links": {},
- "name": "get",
- "span": {
- "begin": [
- 2272,
- 5
- ],
- "end": [
- 2274,
- 6
- ],
- "filename": "std/src/collections/hash/set.rs"
- },
- "visibility": "public"
- },
- "1601": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 60896, is_soft: false}, feature: \"hash_set_entry\"}}]"
@@ -185416,7 +203983,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Take ownership of the value.\n\n# Examples\n\n```\n#![feature(hash_set_entry)]\n\nuse std::collections::hash_set::{Entry, HashSet};\n\nlet mut set = HashSet::new();\n\nmatch set.entry(\"poneyland\") {\n Entry::Occupied(_) => panic!(),\n Entry::Vacant(v) => assert_eq!(v.into_value(), \"poneyland\"),\n}\n```",
- "id": 1601,
+ "id": 1600,
"inner": {
"function": {
"generics": {
@@ -185461,7 +204028,7 @@
},
"visibility": "public"
},
- "1602": {
+ "1601": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 60896, is_soft: false}, feature: \"hash_set_entry\"}}]"
@@ -185473,7 +204040,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Sets the value of the entry with the VacantEntry's value.\n\n# Examples\n\n```\n#![feature(hash_set_entry)]\n\nuse std::collections::HashSet;\nuse std::collections::hash_set::Entry;\n\nlet mut set = HashSet::new();\n\nif let Entry::Vacant(o) = set.entry(\"poneyland\") {\n o.insert();\n}\nassert!(set.contains(\"poneyland\"));\n```",
- "id": 1602,
+ "id": 1601,
"inner": {
"function": {
"generics": {
@@ -185559,12 +204126,12 @@
},
"visibility": "public"
},
- "1603": {
+ "1602": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1603,
+ "id": 1602,
"inner": {
"impl": {
"blanket_impl": null,
@@ -185590,7 +204157,7 @@
"constraints": []
}
},
- "id": 1559,
+ "id": 1558,
"path": "VacantEntry"
}
},
@@ -185631,9 +204198,9 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 1599,
1600,
- 1601,
- 1602
+ 1601
],
"provided_trait_methods": [],
"trait": null
@@ -185654,140 +204221,12 @@
},
"visibility": "default"
},
- "1604": {
- "attrs": [],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 1604,
- "inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "T"
- }
- },
- {
- "type": {
- "generic": "S"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 1559,
- "path": "VacantEntry"
- }
- },
- "generics": {
- "params": [
- {
- "kind": {
- "lifetime": {
- "outlives": []
- }
- },
- "name": "'a"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "T"
- },
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "S"
- }
- ],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 1,
- "path": "Send"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "T"
- }
- }
- },
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "none",
- "trait": {
- "args": null,
- "id": 1,
- "path": "Send"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "S"
- }
- }
- }
- ]
- },
- "is_negative": false,
- "is_synthetic": true,
- "is_unsafe": false,
- "items": [],
- "provided_trait_methods": [],
- "trait": {
- "args": null,
- "id": 1,
- "path": "Send"
- }
- }
- },
- "links": {},
- "name": null,
- "span": null,
- "visibility": "default"
- },
- "1605": {
+ "1603": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1605,
+ "id": 1603,
"inner": {
"impl": {
"blanket_impl": null,
@@ -185813,7 +204252,135 @@
"constraints": []
}
},
- "id": 1559,
+ "id": 1558,
+ "path": "VacantEntry"
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "lifetime": {
+ "outlives": []
+ }
+ },
+ "name": "'a"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ },
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "S"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 1,
+ "path": "Send"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "T"
+ }
+ }
+ },
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": null,
+ "id": 1,
+ "path": "Send"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "S"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": true,
+ "is_unsafe": false,
+ "items": [],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 1,
+ "path": "Send"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": null,
+ "visibility": "default"
+ },
+ "1604": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1604,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "T"
+ }
+ },
+ {
+ "type": {
+ "generic": "S"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 1558,
"path": "VacantEntry"
}
},
@@ -185910,12 +204477,12 @@
"span": null,
"visibility": "default"
},
- "1606": {
+ "1605": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1606,
+ "id": 1605,
"inner": {
"impl": {
"blanket_impl": null,
@@ -185941,7 +204508,7 @@
"constraints": []
}
},
- "id": 1559,
+ "id": 1558,
"path": "VacantEntry"
}
},
@@ -185986,7 +204553,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -186007,7 +204574,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -186017,12 +204584,12 @@
"span": null,
"visibility": "default"
},
- "1607": {
+ "1606": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1607,
+ "id": 1606,
"inner": {
"impl": {
"blanket_impl": null,
@@ -186048,7 +204615,7 @@
"constraints": []
}
},
- "id": 1559,
+ "id": 1558,
"path": "VacantEntry"
}
},
@@ -186124,12 +204691,12 @@
"span": null,
"visibility": "default"
},
- "1608": {
+ "1607": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1608,
+ "id": 1607,
"inner": {
"impl": {
"blanket_impl": null,
@@ -186155,7 +204722,7 @@
"constraints": []
}
},
- "id": 1559,
+ "id": 1558,
"path": "VacantEntry"
}
},
@@ -186199,7 +204766,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -186209,12 +204776,12 @@
"span": null,
"visibility": "default"
},
- "1609": {
+ "1608": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1609,
+ "id": 1608,
"inner": {
"impl": {
"blanket_impl": null,
@@ -186240,7 +204807,7 @@
"constraints": []
}
},
- "id": 1559,
+ "id": 1558,
"path": "VacantEntry"
}
},
@@ -186285,7 +204852,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -186306,7 +204873,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -186327,7 +204894,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -186337,6 +204904,120 @@
"span": null,
"visibility": "default"
},
+ "1609": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1609,
+ "inner": {
+ "impl": {
+ "blanket_impl": {
+ "generic": "T"
+ },
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "generic": "T"
+ }
+ },
+ {
+ "type": {
+ "generic": "S"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 1558,
+ "path": "VacantEntry"
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "T"
+ }
+ ],
+ "where_predicates": [
+ {
+ "bound_predicate": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "maybe",
+ "trait": {
+ "args": null,
+ "id": 3,
+ "path": "Sized"
+ }
+ }
+ }
+ ],
+ "generic_params": [],
+ "type": {
+ "generic": "T"
+ }
+ }
+ }
+ ]
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 319
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "generic": "T"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 321,
+ "path": "Borrow"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 212,
+ 1
+ ],
+ "end": [
+ 212,
+ 38
+ ],
+ "filename": "checkouts/rust/library/core/src/borrow.rs"
+ },
+ "visibility": "default"
+ },
"1610": {
"attrs": [],
"crate_id": 0,
@@ -186370,7 +205051,7 @@
"constraints": []
}
},
- "id": 1559,
+ "id": 1558,
"path": "VacantEntry"
}
},
@@ -186415,7 +205096,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -186431,8 +205112,8 @@
"constraints": []
}
},
- "id": 323,
- "path": "Borrow"
+ "id": 324,
+ "path": "BorrowMut"
}
}
},
@@ -186440,12 +205121,12 @@
"name": null,
"span": {
"begin": [
- 209,
+ 221,
1
],
"end": [
- 209,
- 32
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -186484,121 +205165,7 @@
"constraints": []
}
},
- "id": 1559,
- "path": "VacantEntry"
- }
- },
- "generics": {
- "params": [
- {
- "kind": {
- "type": {
- "bounds": [],
- "default": null,
- "is_synthetic": false
- }
- },
- "name": "T"
- }
- ],
- "where_predicates": [
- {
- "bound_predicate": {
- "bounds": [
- {
- "trait_bound": {
- "generic_params": [],
- "modifier": "maybe",
- "trait": {
- "args": null,
- "id": 3,
- "path": "Sized"
- }
- }
- }
- ],
- "generic_params": [],
- "type": {
- "generic": "T"
- }
- }
- }
- ]
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 324
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "generic": "T"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 326,
- "path": "BorrowMut"
- }
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 217,
- 1
- ],
- "end": [
- 217,
- 35
- ],
- "filename": "checkouts/rust/library/core/src/borrow.rs"
- },
- "visibility": "default"
- },
- "1612": {
- "attrs": [],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 1612,
- "inner": {
- "impl": {
- "blanket_impl": {
- "generic": "T"
- },
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "generic": "T"
- }
- },
- {
- "type": {
- "generic": "S"
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 1559,
+ "id": 1558,
"path": "VacantEntry"
}
},
@@ -186664,7 +205231,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -186689,23 +205256,23 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1613": {
+ "1612": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1613,
+ "id": 1612,
"inner": {
"impl": {
"blanket_impl": {
@@ -186733,7 +205300,7 @@
"constraints": []
}
},
- "id": 1559,
+ "id": 1558,
"path": "VacantEntry"
}
},
@@ -186756,7 +205323,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -186781,23 +205348,23 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1614": {
+ "1613": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1614,
+ "id": 1613,
"inner": {
"impl": {
"blanket_impl": {
@@ -186825,7 +205392,7 @@
"constraints": []
}
},
- "id": 1559,
+ "id": 1558,
"path": "VacantEntry"
}
},
@@ -186873,7 +205440,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -186891,8 +205458,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -186908,7 +205475,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -186917,23 +205484,23 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1615": {
+ "1614": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1615,
+ "id": 1614,
"inner": {
"impl": {
"blanket_impl": {
@@ -186961,7 +205528,7 @@
"constraints": []
}
},
- "id": 1559,
+ "id": 1558,
"path": "VacantEntry"
}
},
@@ -187027,8 +205594,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -187044,7 +205611,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -187053,23 +205620,23 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1616": {
+ "1615": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1616,
+ "id": 1615,
"inner": {
"impl": {
"blanket_impl": {
@@ -187097,7 +205664,7 @@
"constraints": []
}
},
- "id": 1559,
+ "id": 1558,
"path": "VacantEntry"
}
},
@@ -187145,12 +205712,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -187170,12 +205737,12 @@
},
"visibility": "default"
},
- "1617": {
+ "1616": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1617,
+ "id": 1616,
"inner": {
"function": {
"generics": {
@@ -187221,7 +205788,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -187233,7 +205800,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -187255,7 +205822,7 @@
},
"visibility": "default"
},
- "1618": {
+ "1617": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 60896, is_soft: false}, feature: \"hash_set_entry\"}}]"
@@ -187264,7 +205831,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1618,
+ "id": 1617,
"inner": {
"impl": {
"blanket_impl": null,
@@ -187290,7 +205857,7 @@
"constraints": []
}
},
- "id": 1559,
+ "id": 1558,
"path": "VacantEntry"
}
},
@@ -187306,7 +205873,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "fmt::Debug"
}
}
@@ -187335,12 +205902,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1617
+ 1616
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -187360,29 +205927,29 @@
},
"visibility": "default"
},
- "1619": {
+ "1618": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1619,
+ "id": 1618,
"inner": {
"module": {
"is_crate": false,
"is_stripped": true,
"items": [
- 1230,
- 1236,
- 1334,
- 1240,
- 1243,
- 1258,
- 1254,
- 1256,
- 1260,
- 1266,
- 1556,
- 1559
+ 1229,
+ 1235,
+ 1333,
+ 1239,
+ 1242,
+ 1257,
+ 1253,
+ 1255,
+ 1259,
+ 1265,
+ 1555,
+ 1558
]
}
},
@@ -187418,26 +205985,26 @@
"use": {
"id": 163,
"is_glob": false,
- "name": "ToString",
- "source": "crate::string::ToString"
+ "name": "Vec",
+ "source": "crate::vec::Vec"
}
},
"links": {},
"name": null,
"span": {
"begin": [
- 126,
- 33
+ 129,
+ 1
],
"end": [
- 126,
- 41
+ 129,
+ 25
],
"filename": "std/src/prelude/v1.rs"
},
"visibility": "public"
},
- "1621": {
+ "1620": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"hashmap_build_hasher\"}}]"
@@ -187446,10 +206013,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1621,
+ "id": 1620,
"inner": {
"use": {
- "id": 1622,
+ "id": 1621,
"is_glob": false,
"name": "DefaultHasher",
"source": "crate::hash::random::DefaultHasher"
@@ -187470,7 +206037,7 @@
},
"visibility": "public"
},
- "1622": {
+ "1621": {
"attrs": [
{
"other": "#[allow(deprecated)]"
@@ -187482,7 +206049,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "The default [`Hasher`] used by [`RandomState`].\n\nThe internal algorithm is not specified, and so it and its hashes should\nnot be relied upon over releases.",
- "id": 1622,
+ "id": 1621,
"inner": {
"struct": {
"generics": {
@@ -187490,8 +206057,6 @@
"where_predicates": []
},
"impls": [
- 3011,
- 3012,
3013,
3014,
3015,
@@ -187506,10 +206071,12 @@
3024,
3025,
3026,
+ 3027,
3028,
3030,
3032,
- 3036
+ 3034,
+ 3038
],
"kind": {
"tuple": [
@@ -187536,7 +206103,7 @@
},
"visibility": "public"
},
- "1623": {
+ "1622": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"hashmap_build_hasher\"}}]"
@@ -187545,7 +206112,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1623,
+ "id": 1622,
"inner": {
"use": {
"id": 739,
@@ -187569,7 +206136,7 @@
},
"visibility": "public"
},
- "1624": {
+ "1623": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -187578,10 +206145,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1624,
+ "id": 1623,
"inner": {
"use": {
- "id": 1228,
+ "id": 1227,
"is_glob": true,
"name": "map",
"source": "super::hash::map"
@@ -187602,7 +206169,7 @@
},
"visibility": "public"
},
- "1625": {
+ "1624": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -187611,15 +206178,15 @@
"crate_id": 0,
"deprecation": null,
"docs": "A hash map implemented with quadratic probing and SIMD lookup.",
- "id": 1625,
+ "id": 1624,
"inner": {
"module": {
"is_crate": false,
"is_stripped": false,
"items": [
- 1621,
- 1623,
- 1624
+ 1620,
+ 1622,
+ 1623
]
}
},
@@ -187638,7 +206205,7 @@
},
"visibility": "public"
},
- "1626": {
+ "1625": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -187647,10 +206214,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1626,
+ "id": 1625,
"inner": {
"use": {
- "id": 1619,
+ "id": 1618,
"is_glob": true,
"name": "set",
"source": "super::hash::set"
@@ -187671,7 +206238,7 @@
},
"visibility": "public"
},
- "1627": {
+ "1626": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -187680,13 +206247,13 @@
"crate_id": 0,
"deprecation": null,
"docs": "A hash set implemented as a `HashMap` where the value is `()`.",
- "id": 1627,
+ "id": 1626,
"inner": {
"module": {
"is_crate": false,
"is_stripped": false,
"items": [
- 1626
+ 1625
]
}
},
@@ -187705,7 +206272,7 @@
},
"visibility": "public"
},
- "1628": {
+ "1627": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 57, patch: 0})}, feature: \"try_reserve\"}}]"
@@ -187714,7 +206281,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1628,
+ "id": 1627,
"inner": {
"use": {
"id": 772,
@@ -187738,7 +206305,7 @@
},
"visibility": "public"
},
- "1629": {
+ "1628": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"Uncertain how much info should be exposed\"),\nissue: 48043, is_soft: false}, feature: \"try_reserve_kind\"}}]"
@@ -187747,10 +206314,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1629,
+ "id": 1628,
"inner": {
"use": {
- "id": 1630,
+ "id": 1629,
"is_glob": false,
"name": "TryReserveErrorKind",
"source": "alloc_crate::collections::TryReserveErrorKind"
@@ -187771,7 +206338,7 @@
},
"visibility": "public"
},
- "1631": {
+ "1630": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -187780,10 +206347,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1631,
+ "id": 1630,
"inner": {
"use": {
- "id": 1632,
+ "id": 1631,
"is_glob": false,
"name": "BTreeMap",
"source": "alloc_crate::collections::BTreeMap"
@@ -187804,7 +206371,7 @@
},
"visibility": "public"
},
- "1633": {
+ "1632": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -187813,10 +206380,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1633,
+ "id": 1632,
"inner": {
"use": {
- "id": 1634,
+ "id": 1633,
"is_glob": false,
"name": "BTreeSet",
"source": "alloc_crate::collections::BTreeSet"
@@ -187837,7 +206404,7 @@
},
"visibility": "public"
},
- "1635": {
+ "1634": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -187846,10 +206413,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1635,
+ "id": 1634,
"inner": {
"use": {
- "id": 1636,
+ "id": 1635,
"is_glob": false,
"name": "BinaryHeap",
"source": "alloc_crate::collections::BinaryHeap"
@@ -187870,7 +206437,7 @@
},
"visibility": "public"
},
- "1637": {
+ "1636": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -187879,10 +206446,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1637,
+ "id": 1636,
"inner": {
"use": {
- "id": 1638,
+ "id": 1637,
"is_glob": false,
"name": "LinkedList",
"source": "alloc_crate::collections::LinkedList"
@@ -187903,7 +206470,7 @@
},
"visibility": "public"
},
- "1639": {
+ "1638": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -187912,10 +206479,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1639,
+ "id": 1638,
"inner": {
"use": {
- "id": 1640,
+ "id": 1639,
"is_glob": false,
"name": "VecDeque",
"source": "alloc_crate::collections::VecDeque"
@@ -187939,7 +206506,7 @@
"164": {
"attrs": [
{
- "other": "#[doc(no_inline)]"
+ "other": "#[(rustfmt, rustfmt::skip)]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -187947,32 +206514,111 @@
],
"crate_id": 0,
"deprecation": null,
- "docs": null,
+ "docs": "# The Rust Prelude\n\nRust comes with a variety of things in its standard library. However, if\nyou had to manually import every single thing that you used, it would be\nvery verbose. But importing a lot of things that a program never uses isn't\ngood either. A balance needs to be struck.\n\nThe *prelude* is the list of things that Rust automatically imports into\nevery Rust program. It's kept as small as possible, and is focused on\nthings, particularly traits, which are used in almost every single Rust\nprogram.\n\n# Other preludes\n\nPreludes can be seen as a pattern to make using multiple types more\nconvenient. As such, you'll find other preludes in the standard library,\nsuch as [`std::io::prelude`]. Various libraries in the Rust ecosystem may\nalso define their own preludes.\n\n[`std::io::prelude`]: crate::io::prelude\n\nThe difference between 'the prelude' and these other preludes is that they\nare not automatically `use`'d, and must be imported manually. This is still\neasier than importing all of their constituent components.\n\n# Prelude contents\n\nThe items included in the prelude depend on the edition of the crate.\nThe first version of the prelude is used in Rust 2015 and Rust 2018,\nand lives in [`std::prelude::v1`].\n[`std::prelude::rust_2015`] and [`std::prelude::rust_2018`] re-export this prelude.\nIt re-exports the following:\n\n* [std::marker]::{[Copy], [Send], [Sized], [Sync], [Unpin]},\n marker traits that indicate fundamental properties of types.\n* [std::ops]::{[Fn], [FnMut], [FnOnce]}, and their analogous\n async traits, [std::ops]::{[AsyncFn], [AsyncFnMut], [AsyncFnOnce]}.\n* [std::ops]::[Drop], for implementing destructors.\n* [std::mem]::[drop], a convenience function for explicitly\n dropping a value.\n* [std::mem]::{[size_of], [size_of_val]}, to get the size of\n a type or value.\n* [std::mem]::{[align_of], [align_of_val]}, to get the\n alignment of a type or value.\n* [std::boxed]::[Box], a way to allocate values on the heap.\n* [std::borrow]::[ToOwned], the conversion trait that defines\n [`to_owned`], the generic method for creating an owned type from a\n borrowed type.\n* [std::clone]::[Clone], the ubiquitous trait that defines\n [`clone`][Clone::clone], the method for producing a copy of a value.\n* [std::cmp]::{[PartialEq], [PartialOrd], [Eq], [Ord]}, the\n comparison traits, which implement the comparison operators and are often\n seen in trait bounds.\n* [std::convert]::{[AsRef], [AsMut], [Into], [From]}, generic\n conversions, used by savvy API authors to create overloaded methods.\n* [std::default]::[Default], types that have default values.\n* [std::iter]::{[Iterator], [Extend], [IntoIterator], [DoubleEndedIterator], [ExactSizeIterator]},\n iterators of various\n kinds.\n* [std::option]::[Option]::{[self][Option], [Some], [None]}, a\n type which expresses the presence or absence of a value. This type is so\n commonly used, its variants are also exported.\n* [std::result]::[Result]::{[self][Result], [Ok], [Err]}, a type\n for functions that may succeed or fail. Like [`Option`], its variants are\n exported as well.\n* [std::string]::{[String], [ToString]}, heap-allocated strings.\n* [std::vec]::[Vec], a growable, heap-allocated vector.\n\nThe prelude used in Rust 2021, [`std::prelude::rust_2021`], includes all of the above,\nand in addition re-exports:\n\n* [std::convert]::{[TryFrom], [TryInto]}.\n* [std::iter]::[FromIterator].\n\nThe prelude used in Rust 2024, [`std::prelude::rust_2024`], includes all of the above,\nand in addition re-exports:\n\n* [std::future]::{[Future], [IntoFuture]}.\n\n[std::borrow]: crate::borrow\n[std::boxed]: crate::boxed\n[std::clone]: crate::clone\n[std::cmp]: crate::cmp\n[std::convert]: crate::convert\n[std::default]: crate::default\n[std::future]: crate::future\n[std::iter]: crate::iter\n[std::marker]: crate::marker\n[std::mem]: crate::mem\n[std::ops]: crate::ops\n[std::option]: crate::option\n[`std::prelude::v1`]: v1\n[`std::prelude::rust_2015`]: rust_2015\n[`std::prelude::rust_2018`]: rust_2018\n[`std::prelude::rust_2021`]: rust_2021\n[`std::prelude::rust_2024`]: rust_2024\n[std::result]: crate::result\n[std::slice]: crate::slice\n[std::string]: crate::string\n[std::vec]: mod@crate::vec\n[`to_owned`]: crate::borrow::ToOwned::to_owned\n[book-closures]: ../../book/ch13-01-closures.html\n[book-dtor]: ../../book/ch15-03-drop.html\n[book-enums]: ../../book/ch06-01-defining-an-enum.html\n[book-iter]: ../../book/ch13-02-iterators.html\n[Future]: crate::future::Future\n[IntoFuture]: crate::future::IntoFuture",
"id": 164,
"inner": {
- "use": {
- "id": 165,
- "is_glob": false,
- "name": "Vec",
- "source": "crate::vec::Vec"
+ "module": {
+ "is_crate": false,
+ "is_stripped": false,
+ "items": [
+ 165,
+ 167,
+ 169,
+ 173,
+ 177
+ ]
}
},
- "links": {},
- "name": null,
+ "links": {
+ "AsMut": 33,
+ "AsRef": 35,
+ "AsyncFn": 17,
+ "AsyncFnMut": 19,
+ "AsyncFnOnce": 21,
+ "Box": 157,
+ "Clone": 97,
+ "Clone::clone": 188,
+ "Copy": 101,
+ "Default": 107,
+ "DoubleEndedIterator": 41,
+ "Drop": 9,
+ "Eq": 111,
+ "Err": 59,
+ "ExactSizeIterator": 43,
+ "Extend": 45,
+ "Fn": 11,
+ "FnMut": 13,
+ "FnOnce": 15,
+ "From": 37,
+ "FromIterator": 199,
+ "Into": 39,
+ "IntoIterator": 47,
+ "Iterator": 49,
+ "None": 53,
+ "Ok": 61,
+ "Option": 51,
+ "Ord": 117,
+ "PartialEq": 121,
+ "PartialOrd": 125,
+ "Result": 57,
+ "Send": 1,
+ "Sized": 3,
+ "Some": 55,
+ "String": 159,
+ "Sync": 5,
+ "ToOwned": 155,
+ "ToString": 161,
+ "TryFrom": 197,
+ "TryInto": 198,
+ "Unpin": 7,
+ "Vec": 163,
+ "`Option`": 51,
+ "align_of": 25,
+ "align_of_val": 27,
+ "crate::borrow": 185,
+ "crate::borrow::ToOwned::to_owned": 186,
+ "crate::boxed": 184,
+ "crate::clone": 187,
+ "crate::cmp": 189,
+ "crate::convert": 190,
+ "crate::default": 191,
+ "crate::future": 200,
+ "crate::future::Future": 201,
+ "crate::future::IntoFuture": 202,
+ "crate::io::prelude": 180,
+ "crate::iter": 192,
+ "crate::marker": 181,
+ "crate::mem": 183,
+ "crate::ops": 182,
+ "crate::option": 193,
+ "crate::result": 194,
+ "crate::slice": 203,
+ "crate::string": 195,
+ "drop": 23,
+ "mod@crate::vec": 196,
+ "rust_2015": 167,
+ "rust_2018": 169,
+ "rust_2021": 173,
+ "rust_2024": 177,
+ "size_of": 29,
+ "size_of_val": 31,
+ "v1": 165
+ },
+ "name": "prelude",
"span": {
"begin": [
- 129,
+ 1,
1
],
"end": [
- 129,
- 25
+ 177,
+ 2
],
- "filename": "std/src/prelude/v1.rs"
+ "filename": "std/src/prelude/mod.rs"
},
"visibility": "public"
},
- "1641": {
+ "1640": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -187981,10 +206627,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1641,
+ "id": 1640,
"inner": {
"use": {
- "id": 1642,
+ "id": 1641,
"is_glob": false,
"name": "binary_heap",
"source": "alloc_crate::collections::binary_heap"
@@ -188005,7 +206651,7 @@
},
"visibility": "public"
},
- "1643": {
+ "1642": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -188014,10 +206660,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1643,
+ "id": 1642,
"inner": {
"use": {
- "id": 1644,
+ "id": 1643,
"is_glob": false,
"name": "btree_map",
"source": "alloc_crate::collections::btree_map"
@@ -188038,7 +206684,7 @@
},
"visibility": "public"
},
- "1645": {
+ "1644": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -188047,10 +206693,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1645,
+ "id": 1644,
"inner": {
"use": {
- "id": 1646,
+ "id": 1645,
"is_glob": false,
"name": "btree_set",
"source": "alloc_crate::collections::btree_set"
@@ -188071,7 +206717,7 @@
},
"visibility": "public"
},
- "1647": {
+ "1646": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -188080,10 +206726,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1647,
+ "id": 1646,
"inner": {
"use": {
- "id": 1648,
+ "id": 1647,
"is_glob": false,
"name": "linked_list",
"source": "alloc_crate::collections::linked_list"
@@ -188104,7 +206750,7 @@
},
"visibility": "public"
},
- "1649": {
+ "1648": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -188113,10 +206759,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1649,
+ "id": 1648,
"inner": {
"use": {
- "id": 1650,
+ "id": 1649,
"is_glob": false,
"name": "vec_deque",
"source": "alloc_crate::collections::vec_deque"
@@ -188137,7 +206783,127 @@
},
"visibility": "public"
},
- "1651": {
+ "165": {
+ "attrs": [
+ {
+ "other": "#[(rustfmt, rustfmt::skip)]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": "The first version of the prelude of The Rust Standard Library.\n\nSee the [module-level documentation](super) for more.",
+ "id": 165,
+ "inner": {
+ "module": {
+ "is_crate": false,
+ "is_stripped": false,
+ "items": [
+ 0,
+ 2,
+ 4,
+ 6,
+ 8,
+ 10,
+ 12,
+ 14,
+ 16,
+ 18,
+ 20,
+ 22,
+ 24,
+ 26,
+ 28,
+ 30,
+ 32,
+ 34,
+ 36,
+ 38,
+ 40,
+ 42,
+ 44,
+ 46,
+ 48,
+ 50,
+ 52,
+ 54,
+ 56,
+ 58,
+ 60,
+ 62,
+ 64,
+ 66,
+ 68,
+ 70,
+ 72,
+ 74,
+ 76,
+ 78,
+ 80,
+ 82,
+ 84,
+ 86,
+ 88,
+ 90,
+ 92,
+ 94,
+ 96,
+ 98,
+ 100,
+ 102,
+ 104,
+ 106,
+ 108,
+ 110,
+ 112,
+ 114,
+ 116,
+ 118,
+ 120,
+ 122,
+ 124,
+ 126,
+ 128,
+ 130,
+ 132,
+ 134,
+ 136,
+ 138,
+ 140,
+ 142,
+ 144,
+ 146,
+ 148,
+ 150,
+ 152,
+ 154,
+ 156,
+ 158,
+ 160,
+ 162
+ ]
+ }
+ },
+ "links": {
+ "super": 164
+ },
+ "name": "v1",
+ "span": {
+ "begin": [
+ 1,
+ 1
+ ],
+ "end": [
+ 129,
+ 25
+ ],
+ "filename": "std/src/prelude/v1.rs"
+ },
+ "visibility": "public"
+ },
+ "1650": {
"attrs": [
{
"other": "#[doc(inline)]"
@@ -188149,7 +206915,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1651,
+ "id": 1650,
"inner": {
"use": {
"id": 738,
@@ -188173,7 +206939,7 @@
},
"visibility": "public"
},
- "1652": {
+ "1651": {
"attrs": [
{
"other": "#[doc(inline)]"
@@ -188185,10 +206951,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1652,
+ "id": 1651,
"inner": {
"use": {
- "id": 1230,
+ "id": 1229,
"is_glob": false,
"name": "HashSet",
"source": "self::hash_set::HashSet"
@@ -188209,7 +206975,7 @@
},
"visibility": "public"
},
- "1655": {
+ "1654": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -188218,7 +206984,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "A string describing the architecture of the CPU that is currently in use.\nAn example value may be: `\"x86\"`, `\"arm\"` or `\"riscv64\"`.\n\nFull list of possible values
\n\n* `\"x86\"`\n* `\"x86_64\"`\n* `\"arm\"`\n* `\"aarch64\"`\n* `\"m68k\"`\n* `\"mips\"`\n* `\"mips32r6\"`\n* `\"mips64\"`\n* `\"mips64r6\"`\n* `\"csky\"`\n* `\"powerpc\"`\n* `\"powerpc64\"`\n* `\"riscv32\"`\n* `\"riscv64\"`\n* `\"s390x\"`\n* `\"sparc\"`\n* `\"sparc64\"`\n* `\"hexagon\"`\n* `\"loongarch32\"`\n* `\"loongarch64\"`\n\n ",
- "id": 1655,
+ "id": 1654,
"inner": {
"constant": {
"const": {
@@ -188241,18 +207007,18 @@
"name": "ARCH",
"span": {
"begin": [
- 1054,
+ 1046,
5
],
"end": [
- 1054,
+ 1046,
49
],
"filename": "std/src/env.rs"
},
"visibility": "public"
},
- "1656": {
+ "1655": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -188261,7 +207027,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "A string describing the family of the operating system.\nAn example value may be: `\"unix\"`, or `\"windows\"`.\n\nThis value may be an empty string if the family is unknown.\n\nFull list of possible values
\n\n* `\"unix\"`\n* `\"windows\"`\n* `\"itron\"`\n* `\"wasm\"`\n* `\"\"`\n\n ",
- "id": 1656,
+ "id": 1655,
"inner": {
"constant": {
"const": {
@@ -188284,18 +207050,18 @@
"name": "FAMILY",
"span": {
"begin": [
- 1071,
+ 1063,
5
],
"end": [
- 1071,
+ 1063,
41
],
"filename": "std/src/env.rs"
},
"visibility": "public"
},
- "1657": {
+ "1656": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -188303,8 +207069,8 @@
],
"crate_id": 0,
"deprecation": null,
- "docs": "A string describing the specific operating system in use.\nAn example value may be: `\"linux\"`, or `\"freebsd\"`.\n\nFull list of possible values
\n\n* `\"linux\"`\n* `\"windows\"`\n* `\"macos\"`\n* `\"android\"`\n* `\"ios\"`\n* `\"openbsd\"`\n* `\"freebsd\"`\n* `\"netbsd\"`\n* `\"wasi\"`\n* `\"hermit\"`\n* `\"aix\"`\n* `\"apple\"`\n* `\"dragonfly\"`\n* `\"emscripten\"`\n* `\"espidf\"`\n* `\"fortanix\"`\n* `\"uefi\"`\n* `\"fuchsia\"`\n* `\"haiku\"`\n* `\"hermit\"`\n* `\"watchos\"`\n* `\"visionos\"`\n* `\"tvos\"`\n* `\"horizon\"`\n* `\"hurd\"`\n* `\"illumos\"`\n* `\"l4re\"`\n* `\"nto\"`\n* `\"redox\"`\n* `\"solaris\"`\n* `\"solid_asp3`\n* `\"vita\"`\n* `\"vxworks\"`\n* `\"xous\"`\n\n ",
- "id": 1657,
+ "docs": "A string describing the specific operating system in use.\nAn example value may be: `\"linux\"`, or `\"freebsd\"`.\n\nFull list of possible values
\n\n* `\"linux\"`\n* `\"windows\"`\n* `\"macos\"`\n* `\"android\"`\n* `\"ios\"`\n* `\"openbsd\"`\n* `\"freebsd\"`\n* `\"netbsd\"`\n* `\"wasi\"`\n* `\"hermit\"`\n* `\"aix\"`\n* `\"apple\"`\n* `\"dragonfly\"`\n* `\"emscripten\"`\n* `\"espidf\"`\n* `\"fortanix\"`\n* `\"uefi\"`\n* `\"fuchsia\"`\n* `\"haiku\"`\n* `\"hermit\"`\n* `\"watchos\"`\n* `\"visionos\"`\n* `\"tvos\"`\n* `\"horizon\"`\n* `\"hurd\"`\n* `\"illumos\"`\n* `\"l4re\"`\n* `\"nto\"`\n* `\"redox\"`\n* `\"solaris\"`\n* `\"solid_asp3`\n* `\"vexos\"`\n* `\"vita\"`\n* `\"vxworks\"`\n* `\"xous\"`\n\n ",
+ "id": 1656,
"inner": {
"constant": {
"const": {
@@ -188327,18 +207093,18 @@
"name": "OS",
"span": {
"begin": [
- 1115,
+ 1108,
5
],
"end": [
- 1115,
+ 1108,
33
],
"filename": "std/src/env.rs"
},
"visibility": "public"
},
- "1658": {
+ "1657": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -188347,7 +207113,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Specifies the filename prefix, if any, used for shared libraries on this platform.\nThis is either `\"lib\"` or an empty string. (`\"\"`).",
- "id": 1658,
+ "id": 1657,
"inner": {
"constant": {
"const": {
@@ -188370,18 +207136,18 @@
"name": "DLL_PREFIX",
"span": {
"begin": [
- 1120,
+ 1113,
5
],
"end": [
- 1120,
+ 1113,
49
],
"filename": "std/src/env.rs"
},
"visibility": "public"
},
- "1659": {
+ "1658": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -188390,7 +207156,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Specifies the file extension, if any, used for shared libraries on this platform that goes after the dot.\nAn example value may be: `\"so\"`, `\"elf\"`, or `\"dll\"`.\n\nFull list of possible values
\n\n* `\"so\"`\n* `\"dylib\"`\n* `\"dll\"`\n* `\"sgxs\"`\n* `\"a\"`\n* `\"elf\"`\n* `\"wasm\"`\n* `\"\"` (an empty string)\n\n ",
- "id": 1659,
+ "id": 1658,
"inner": {
"constant": {
"const": {
@@ -188413,133 +207179,18 @@
"name": "DLL_EXTENSION",
"span": {
"begin": [
- 1145,
+ 1138,
5
],
"end": [
- 1145,
+ 1138,
55
],
"filename": "std/src/env.rs"
},
"visibility": "public"
},
- "166": {
- "attrs": [
- {
- "other": "#[(rustfmt, rustfmt::skip)]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": "# The Rust Prelude\n\nRust comes with a variety of things in its standard library. However, if\nyou had to manually import every single thing that you used, it would be\nvery verbose. But importing a lot of things that a program never uses isn't\ngood either. A balance needs to be struck.\n\nThe *prelude* is the list of things that Rust automatically imports into\nevery Rust program. It's kept as small as possible, and is focused on\nthings, particularly traits, which are used in almost every single Rust\nprogram.\n\n# Other preludes\n\nPreludes can be seen as a pattern to make using multiple types more\nconvenient. As such, you'll find other preludes in the standard library,\nsuch as [`std::io::prelude`]. Various libraries in the Rust ecosystem may\nalso define their own preludes.\n\n[`std::io::prelude`]: crate::io::prelude\n\nThe difference between 'the prelude' and these other preludes is that they\nare not automatically `use`'d, and must be imported manually. This is still\neasier than importing all of their constituent components.\n\n# Prelude contents\n\nThe items included in the prelude depend on the edition of the crate.\nThe first version of the prelude is used in Rust 2015 and Rust 2018,\nand lives in [`std::prelude::v1`].\n[`std::prelude::rust_2015`] and [`std::prelude::rust_2018`] re-export this prelude.\nIt re-exports the following:\n\n* [std::marker]::{[Copy], [Send], [Sized], [Sync], [Unpin]},\n marker traits that indicate fundamental properties of types.\n* [std::ops]::{[Fn], [FnMut], [FnOnce]}, and their analogous\n async traits, [std::ops]::{[AsyncFn], [AsyncFnMut], [AsyncFnOnce]}.\n* [std::ops]::[Drop], for implementing destructors.\n* [std::mem]::[drop], a convenience function for explicitly\n dropping a value.\n* [std::mem]::{[size_of], [size_of_val]}, to get the size of\n a type or value.\n* [std::mem]::{[align_of], [align_of_val]}, to get the\n alignment of a type or value.\n* [std::boxed]::[Box], a way to allocate values on the heap.\n* [std::borrow]::[ToOwned], the conversion trait that defines\n [`to_owned`], the generic method for creating an owned type from a\n borrowed type.\n* [std::clone]::[Clone], the ubiquitous trait that defines\n [`clone`][Clone::clone], the method for producing a copy of a value.\n* [std::cmp]::{[PartialEq], [PartialOrd], [Eq], [Ord]}, the\n comparison traits, which implement the comparison operators and are often\n seen in trait bounds.\n* [std::convert]::{[AsRef], [AsMut], [Into], [From]}, generic\n conversions, used by savvy API authors to create overloaded methods.\n* [std::default]::[Default], types that have default values.\n* [std::iter]::{[Iterator], [Extend], [IntoIterator], [DoubleEndedIterator], [ExactSizeIterator]},\n iterators of various\n kinds.\n* [std::option]::[Option]::{[self][Option], [Some], [None]}, a\n type which expresses the presence or absence of a value. This type is so\n commonly used, its variants are also exported.\n* [std::result]::[Result]::{[self][Result], [Ok], [Err]}, a type\n for functions that may succeed or fail. Like [`Option`], its variants are\n exported as well.\n* [std::string]::{[String], [ToString]}, heap-allocated strings.\n* [std::vec]::[Vec], a growable, heap-allocated vector.\n\nThe prelude used in Rust 2021, [`std::prelude::rust_2021`], includes all of the above,\nand in addition re-exports:\n\n* [std::convert]::{[TryFrom], [TryInto]}.\n* [std::iter]::[FromIterator].\n\nThe prelude used in Rust 2024, [`std::prelude::rust_2024`], includes all of the above,\nand in addition re-exports:\n\n* [std::future]::{[Future], [IntoFuture]}.\n\n[std::borrow]: crate::borrow\n[std::boxed]: crate::boxed\n[std::clone]: crate::clone\n[std::cmp]: crate::cmp\n[std::convert]: crate::convert\n[std::default]: crate::default\n[std::future]: crate::future\n[std::iter]: crate::iter\n[std::marker]: crate::marker\n[std::mem]: crate::mem\n[std::ops]: crate::ops\n[std::option]: crate::option\n[`std::prelude::v1`]: v1\n[`std::prelude::rust_2015`]: rust_2015\n[`std::prelude::rust_2018`]: rust_2018\n[`std::prelude::rust_2021`]: rust_2021\n[`std::prelude::rust_2024`]: rust_2024\n[std::result]: crate::result\n[std::slice]: crate::slice\n[std::string]: crate::string\n[std::vec]: mod@crate::vec\n[`to_owned`]: crate::borrow::ToOwned::to_owned\n[book-closures]: ../../book/ch13-01-closures.html\n[book-dtor]: ../../book/ch15-03-drop.html\n[book-enums]: ../../book/ch06-01-defining-an-enum.html\n[book-iter]: ../../book/ch13-02-iterators.html\n[Future]: crate::future::Future\n[IntoFuture]: crate::future::IntoFuture",
- "id": 166,
- "inner": {
- "module": {
- "is_crate": false,
- "is_stripped": false,
- "items": [
- 167,
- 169,
- 171,
- 175,
- 179
- ]
- }
- },
- "links": {
- "AsMut": 33,
- "AsRef": 35,
- "AsyncFn": 17,
- "AsyncFnMut": 19,
- "AsyncFnOnce": 21,
- "Box": 159,
- "Clone": 99,
- "Clone::clone": 190,
- "Copy": 103,
- "Default": 109,
- "DoubleEndedIterator": 41,
- "Drop": 9,
- "Eq": 113,
- "Err": 59,
- "ExactSizeIterator": 43,
- "Extend": 45,
- "Fn": 11,
- "FnMut": 13,
- "FnOnce": 15,
- "From": 37,
- "FromIterator": 201,
- "Into": 39,
- "IntoIterator": 47,
- "Iterator": 49,
- "None": 53,
- "Ok": 61,
- "Option": 51,
- "Ord": 119,
- "PartialEq": 123,
- "PartialOrd": 127,
- "Result": 57,
- "Send": 1,
- "Sized": 3,
- "Some": 55,
- "String": 161,
- "Sync": 5,
- "ToOwned": 157,
- "ToString": 163,
- "TryFrom": 199,
- "TryInto": 200,
- "Unpin": 7,
- "Vec": 165,
- "`Option`": 51,
- "align_of": 25,
- "align_of_val": 27,
- "crate::borrow": 187,
- "crate::borrow::ToOwned::to_owned": 188,
- "crate::boxed": 186,
- "crate::clone": 189,
- "crate::cmp": 191,
- "crate::convert": 192,
- "crate::default": 193,
- "crate::future": 202,
- "crate::future::Future": 203,
- "crate::future::IntoFuture": 204,
- "crate::io::prelude": 182,
- "crate::iter": 194,
- "crate::marker": 183,
- "crate::mem": 185,
- "crate::ops": 184,
- "crate::option": 195,
- "crate::result": 196,
- "crate::slice": 205,
- "crate::string": 197,
- "drop": 23,
- "mod@crate::vec": 198,
- "rust_2015": 169,
- "rust_2018": 171,
- "rust_2021": 175,
- "rust_2024": 179,
- "size_of": 29,
- "size_of_val": 31,
- "v1": 167
- },
- "name": "prelude",
- "span": {
- "begin": [
- 1,
- 1
- ],
- "end": [
- 177,
- 2
- ],
- "filename": "std/src/prelude/mod.rs"
- },
- "visibility": "public"
- },
- "1660": {
+ "1659": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -188548,7 +207199,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Specifies the filename suffix, if any, used for shared libraries on this platform.\nAn example value may be: `\".so\"`, `\".elf\"`, or `\".dll\"`.\n\nThe possible values are identical to those of [`DLL_EXTENSION`], but with the leading period included.",
- "id": 1660,
+ "id": 1659,
"inner": {
"constant": {
"const": {
@@ -188568,23 +207219,59 @@
}
},
"links": {
- "`DLL_EXTENSION`": 1659
+ "`DLL_EXTENSION`": 1658
},
"name": "DLL_SUFFIX",
"span": {
"begin": [
- 1127,
+ 1120,
5
],
"end": [
- 1127,
+ 1120,
49
],
"filename": "std/src/env.rs"
},
"visibility": "public"
},
- "1661": {
+ "166": {
+ "attrs": [
+ {
+ "other": "#[doc(no_inline)]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 55, patch: 0})}, feature: \"prelude_2015\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 166,
+ "inner": {
+ "use": {
+ "id": 165,
+ "is_glob": true,
+ "name": "v1",
+ "source": "super::v1"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 123,
+ 5
+ ],
+ "end": [
+ 123,
+ 26
+ ],
+ "filename": "std/src/prelude/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1660": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -188592,8 +207279,8 @@
],
"crate_id": 0,
"deprecation": null,
- "docs": "Specifies the file extension, if any, used for executable binaries on this platform.\nAn example value may be: `\"exe\"`, or an empty string (`\"\"`).\n\nFull list of possible values
\n\n* `\"exe\"`\n* `\"efi\"`\n* `\"js\"`\n* `\"sgxs\"`\n* `\"elf\"`\n* `\"wasm\"`\n* `\"\"` (an empty string)\n\n ",
- "id": 1661,
+ "docs": "Specifies the file extension, if any, used for executable binaries on this platform.\nAn example value may be: `\"exe\"`, or an empty string (`\"\"`).\n\nFull list of possible values
\n\n* `\"bin\"`\n* `\"exe\"`\n* `\"efi\"`\n* `\"js\"`\n* `\"sgxs\"`\n* `\"elf\"`\n* `\"wasm\"`\n* `\"\"` (an empty string)\n\n ",
+ "id": 1660,
"inner": {
"constant": {
"const": {
@@ -188616,18 +207303,18 @@
"name": "EXE_EXTENSION",
"span": {
"begin": [
- 1169,
+ 1163,
5
],
"end": [
- 1169,
+ 1163,
55
],
"filename": "std/src/env.rs"
},
"visibility": "public"
},
- "1662": {
+ "1661": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -188636,7 +207323,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Specifies the filename suffix, if any, used for executable binaries on this platform.\nAn example value may be: `\".exe\"`, or `\".efi\"`.\n\nThe possible values are identical to those of [`EXE_EXTENSION`], but with the leading period included.",
- "id": 1662,
+ "id": 1661,
"inner": {
"constant": {
"const": {
@@ -188656,23 +207343,23 @@
}
},
"links": {
- "`EXE_EXTENSION`": 1661
+ "`EXE_EXTENSION`": 1660
},
"name": "EXE_SUFFIX",
"span": {
"begin": [
- 1152,
+ 1145,
5
],
"end": [
- 1152,
+ 1145,
49
],
"filename": "std/src/env.rs"
},
"visibility": "public"
},
- "1663": {
+ "1662": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -188681,20 +207368,20 @@
"crate_id": 0,
"deprecation": null,
"docs": "Constants associated with the current target",
- "id": 1663,
+ "id": 1662,
"inner": {
"module": {
"is_crate": false,
"is_stripped": false,
"items": [
+ 1654,
1655,
1656,
1657,
- 1658,
- 1660,
1659,
- 1662,
- 1661
+ 1658,
+ 1661,
+ 1660
]
}
},
@@ -188702,18 +207389,18 @@
"name": "consts",
"span": {
"begin": [
- 1023,
+ 1015,
1
],
"end": [
- 1023,
+ 1015,
15
],
"filename": "std/src/env.rs"
},
"visibility": "public"
},
- "1664": {
+ "1663": {
"attrs": [
{
"other": "#[(not(test), rustc_diagnostic_item = \"PathBuf\")]"
@@ -188728,7 +207415,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "An owned, mutable path (akin to [`String`]).\n\nThis type provides methods like [`push`] and [`set_extension`] that mutate\nthe path in place. It also implements [`Deref`] to [`Path`], meaning that\nall methods on [`Path`] slices are available on `PathBuf` values as well.\n\n[`push`]: PathBuf::push\n[`set_extension`]: PathBuf::set_extension\n\nMore details about the overall approach can be found in\nthe [module documentation](self).\n\n# Examples\n\nYou can use [`push`] to build up a `PathBuf` from\ncomponents:\n\n```\nuse std::path::PathBuf;\n\nlet mut path = PathBuf::new();\n\npath.push(r\"C:\\\");\npath.push(\"windows\");\npath.push(\"system32\");\n\npath.set_extension(\"dll\");\n```\n\nHowever, [`push`] is best used for dynamic situations. This is a better way\nto do this when you know all of the components ahead of time:\n\n```\nuse std::path::PathBuf;\n\nlet path: PathBuf = [r\"C:\\\", \"windows\", \"system32.dll\"].iter().collect();\n```\n\nWe can still do better than this! Since these are all strings, we can use\n`From::from`:\n\n```\nuse std::path::PathBuf;\n\nlet path = PathBuf::from(r\"C:\\windows\\system32.dll\");\n```\n\nWhich method works best depends on what kind of situation you're in.\n\nNote that `PathBuf` does not always sanitize arguments, for example\n[`push`] allows paths built from strings which include separators:\n\n```\nuse std::path::PathBuf;\n\nlet mut path = PathBuf::new();\n\npath.push(r\"C:\\\");\npath.push(\"windows\");\npath.push(r\"..\\otherdir\");\npath.push(\"system32\");\n```\n\nThe behavior of `PathBuf` may be changed to a panic on such inputs\nin the future. [`Extend::extend`] should be used to add multi-part paths.",
- "id": 1664,
+ "id": 1663,
"inner": {
"struct": {
"generics": {
@@ -188736,54 +207423,34 @@
"where_predicates": []
},
"impls": [
- 6533,
- 6534,
- 6535,
- 6536,
- 6537,
- 6538,
- 6539,
- 6540,
- 6541,
- 6542,
- 6543,
- 6544,
- 6545,
- 6546,
- 6547,
- 6548,
- 6549,
- 6552,
- 6554,
- 6556,
- 6558,
- 2098,
- 2100,
- 6560,
- 6563,
- 6565,
- 6568,
- 6570,
+ 6572,
6573,
+ 6574,
6575,
+ 6576,
6577,
+ 6578,
6579,
+ 6580,
6581,
+ 6582,
6583,
+ 6584,
6585,
+ 6586,
6587,
- 6589,
+ 6588,
6591,
6593,
6595,
6597,
+ 2096,
+ 2098,
6599,
- 6601,
6602,
6604,
- 6606,
- 2266,
- 6608,
+ 6607,
+ 6609,
6612,
6614,
6616,
@@ -188797,6 +207464,27 @@
6632,
6634,
6636,
+ 6638,
+ 6640,
+ 6641,
+ 6643,
+ 6645,
+ 2264,
+ 6647,
+ 6651,
+ 6653,
+ 6655,
+ 6657,
+ 6659,
+ 6661,
+ 6663,
+ 6665,
+ 6667,
+ 6669,
+ 6671,
+ 6673,
+ 6675,
+ 2270,
2272,
2274,
2276,
@@ -188804,15 +207492,14 @@
2280,
2282,
2284,
- 2286,
- 6638,
- 6640,
- 6642,
- 6644,
+ 6677,
+ 6679,
+ 6681,
+ 6683,
+ 2102,
2104,
2106,
- 2108,
- 2110
+ 2108
],
"kind": {
"plain": {
@@ -188823,13 +207510,13 @@
}
},
"links": {
- "PathBuf::push": 6508,
- "PathBuf::set_extension": 6509,
- "`Deref`": 1969,
- "`Extend::extend`": 1654,
- "`Path`": 1667,
- "`String`": 161,
- "self": 6510
+ "PathBuf::push": 6541,
+ "PathBuf::set_extension": 6542,
+ "`Deref`": 1967,
+ "`Extend::extend`": 1653,
+ "`Path`": 1666,
+ "`String`": 159,
+ "self": 6543
},
"name": "PathBuf",
"span": {
@@ -188845,7 +207532,7 @@
},
"visibility": "public"
},
- "1665": {
+ "1664": {
"attrs": [
{
"other": "#[doc(alias = \"pwd\")]"
@@ -188863,7 +207550,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Returns the current working directory as a [`PathBuf`].\n\n# Platform-specific behavior\n\nThis function [currently] corresponds to the `getcwd` function on Unix\nand the `GetCurrentDirectoryW` function on Windows.\n\n[currently]: crate::io#platform-specific-behavior\n\n# Errors\n\nReturns an [`Err`] if the current working directory value is invalid.\nPossible cases:\n\n* Current directory does not exist.\n* There are insufficient permissions to access the current directory.\n\n# Examples\n\n```\nuse std::env;\n\nfn main() -> std::io::Result<()> {\n let path = env::current_dir()?;\n println!(\"The current directory is {}\", path.display());\n Ok(())\n}\n```",
- "id": 1665,
+ "id": 1664,
"inner": {
"function": {
"generics": {
@@ -188889,7 +207576,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "crate::path::PathBuf"
}
}
@@ -188898,7 +207585,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -188907,8 +207594,8 @@
},
"links": {
"`Err`": 59,
- "`PathBuf`": 1664,
- "crate::io#platform-specific-behavior": 501
+ "`PathBuf`": 1663,
+ "crate::io#platform-specific-behavior": 502
},
"name": "current_dir",
"span": {
@@ -188924,7 +207611,7 @@
},
"visibility": "public"
},
- "1666": {
+ "1665": {
"attrs": [
{
"other": "#[doc(alias = \"chdir\", alias = \"SetCurrentDirectory\", alias =\n\"SetCurrentDirectoryW\")]"
@@ -188936,7 +207623,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Changes the current working directory to the specified path.\n\n# Platform-specific behavior\n\nThis function [currently] corresponds to the `chdir` function on Unix\nand the `SetCurrentDirectoryW` function on Windows.\n\nReturns an [`Err`] if the operation fails.\n\n[currently]: crate::io#platform-specific-behavior\n\n# Examples\n\n```\nuse std::env;\nuse std::path::Path;\n\nlet root = Path::new(\"/\");\nassert!(env::set_current_dir(&root).is_ok());\nprintln!(\"Successfully changed working directory to {}!\", root.display());\n```",
- "id": 1666,
+ "id": 1665,
"inner": {
"function": {
"generics": {
@@ -188957,7 +207644,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "crate::path::Path"
}
}
@@ -189012,7 +207699,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -189021,7 +207708,7 @@
},
"links": {
"`Err`": 59,
- "crate::io#platform-specific-behavior": 501
+ "crate::io#platform-specific-behavior": 502
},
"name": "set_current_dir",
"span": {
@@ -189037,7 +207724,7 @@
},
"visibility": "public"
},
- "1667": {
+ "1666": {
"attrs": [
{
"other": "#[(not(test), rustc_diagnostic_item = \"Path\")]"
@@ -189060,7 +207747,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "A slice of a path (akin to [`str`]).\n\nThis type supports a number of operations for inspecting a path, including\nbreaking the path into its components (separated by `/` on Unix and by either\n`/` or `\\` on Windows), extracting the file name, determining whether the path\nis absolute, and so on.\n\nThis is an *unsized* type, meaning that it must always be used behind a\npointer like `&` or [`Box`]. For an owned version of this type,\nsee [`PathBuf`].\n\nMore details about the overall approach can be found in\nthe [module documentation](self).\n\n# Examples\n\n```\nuse std::path::Path;\nuse std::ffi::OsStr;\n\n// Note: this example does work on Windows\nlet path = Path::new(\"./foo/bar.txt\");\n\nlet parent = path.parent();\nassert_eq!(parent, Some(Path::new(\"./foo\")));\n\nlet file_stem = path.file_stem();\nassert_eq!(file_stem, Some(OsStr::new(\"bar\")));\n\nlet extension = path.extension();\nassert_eq!(extension, Some(OsStr::new(\"txt\")));\n```",
- "id": 1667,
+ "id": 1666,
"inner": {
"struct": {
"generics": {
@@ -189068,68 +207755,69 @@
"where_predicates": []
},
"impls": [
- 6679,
- 6680,
- 6681,
- 6682,
- 6683,
- 6684,
- 6685,
- 6686,
- 6687,
- 6688,
- 6689,
- 6404,
- 6433,
- 6472,
- 6691,
- 6693,
- 6695,
- 6556,
- 6697,
- 6577,
- 6699,
- 6701,
- 6703,
- 6705,
- 6707,
- 6711,
- 6713,
- 2268,
- 6715,
- 6717,
+ 6718,
6719,
+ 6720,
6721,
+ 6722,
6723,
+ 6724,
6725,
+ 6726,
6727,
6728,
+ 6437,
+ 6466,
+ 6505,
6730,
6732,
6734,
- 2270,
+ 6595,
6736,
- 2102,
+ 6616,
6738,
6740,
- 6608,
+ 6742,
6744,
- 6614,
- 6616,
- 6618,
- 6620,
- 6622,
- 6624,
- 6626,
- 6628,
6746,
- 6748,
6750,
6752,
+ 2266,
6754,
6756,
6758,
6760,
+ 6762,
+ 6764,
+ 6766,
+ 6767,
+ 6769,
+ 6771,
+ 6773,
+ 2268,
+ 6775,
+ 2100,
+ 6777,
+ 6779,
+ 6647,
+ 6783,
+ 6653,
+ 6655,
+ 6657,
+ 6659,
+ 6661,
+ 6663,
+ 6665,
+ 6667,
+ 6785,
+ 6787,
+ 6789,
+ 6791,
+ 6793,
+ 6795,
+ 6797,
+ 6799,
+ 2286,
2288,
2290,
2292,
@@ -189137,27 +207825,26 @@
2296,
2298,
2300,
- 2302,
- 6762,
- 6764,
- 6766,
- 6768,
+ 6801,
+ 6803,
+ 6805,
+ 6807,
+ 2110,
2112,
2114,
2116,
- 2118,
+ 2302,
2304,
2306,
2308,
- 2310,
- 6770,
- 6772,
- 6774,
- 6776,
+ 6809,
+ 6811,
+ 6813,
+ 6815,
+ 2118,
2120,
2122,
- 2124,
- 2126
+ 2124
],
"kind": {
"plain": {
@@ -189168,26 +207855,26 @@
}
},
"links": {
- "`Box`": 159,
- "`PathBuf`": 1664,
- "`str`": 1928,
- "self": 6510
+ "`Box`": 157,
+ "`PathBuf`": 1663,
+ "`str`": 1926,
+ "self": 6543
},
"name": "Path",
"span": {
"begin": [
- 2212,
+ 2303,
1
],
"end": [
- 2214,
+ 2305,
2
],
"filename": "std/src/path.rs"
},
"visibility": "public"
},
- "1669": {
+ "1668": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -189201,7 +207888,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Returns an iterator of (variable, value) pairs of strings, for all the\nenvironment variables of the current process.\n\nThe returned iterator contains a snapshot of the process's environment\nvariables at the time of this invocation. Modifications to environment\nvariables afterwards will not be reflected in the returned iterator.\n\n# Panics\n\nWhile iterating, the returned iterator will panic if any key or value in the\nenvironment is not valid unicode. If this is not desired, consider using\n[`env::vars_os()`].\n\n# Examples\n\n```\n// Print all environment variables.\nfor (key, value) in std::env::vars() {\n println!(\"{key}: {value}\");\n}\n```\n\n[`env::vars_os()`]: vars_os",
- "id": 1669,
+ "id": 1668,
"inner": {
"function": {
"generics": {
@@ -189221,7 +207908,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 1670,
+ "id": 1669,
"path": "Vars"
}
}
@@ -189229,7 +207916,7 @@
}
},
"links": {
- "vars_os": 1692
+ "vars_os": 1691
},
"name": "vars",
"span": {
@@ -189245,128 +207932,7 @@
},
"visibility": "public"
},
- "167": {
- "attrs": [
- {
- "other": "#[(rustfmt, rustfmt::skip)]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": "The first version of the prelude of The Rust Standard Library.\n\nSee the [module-level documentation](super) for more.",
- "id": 167,
- "inner": {
- "module": {
- "is_crate": false,
- "is_stripped": false,
- "items": [
- 0,
- 2,
- 4,
- 6,
- 8,
- 10,
- 12,
- 14,
- 16,
- 18,
- 20,
- 22,
- 24,
- 26,
- 28,
- 30,
- 32,
- 34,
- 36,
- 38,
- 40,
- 42,
- 44,
- 46,
- 48,
- 50,
- 52,
- 54,
- 56,
- 58,
- 60,
- 62,
- 64,
- 66,
- 68,
- 70,
- 72,
- 74,
- 76,
- 78,
- 80,
- 82,
- 84,
- 86,
- 88,
- 90,
- 92,
- 94,
- 96,
- 98,
- 100,
- 102,
- 104,
- 106,
- 108,
- 110,
- 112,
- 114,
- 116,
- 118,
- 120,
- 122,
- 124,
- 126,
- 128,
- 130,
- 132,
- 134,
- 136,
- 138,
- 140,
- 142,
- 144,
- 146,
- 148,
- 150,
- 152,
- 154,
- 156,
- 158,
- 160,
- 162,
- 164
- ]
- }
- },
- "links": {
- "super": 166
- },
- "name": "v1",
- "span": {
- "begin": [
- 1,
- 1
- ],
- "end": [
- 129,
- 25
- ],
- "filename": "std/src/prelude/v1.rs"
- },
- "visibility": "public"
- },
- "1670": {
+ "1669": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -189375,7 +207941,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "An iterator over a snapshot of the environment variables of this process.\n\nThis structure is created by [`env::vars()`]. See its documentation for more.\n\n[`env::vars()`]: vars",
- "id": 1670,
+ "id": 1669,
"inner": {
"struct": {
"generics": {
@@ -189383,6 +207949,7 @@
"where_predicates": []
},
"impls": [
+ 1670,
1671,
1672,
1673,
@@ -189396,9 +207963,8 @@
1681,
1682,
1683,
- 1684,
- 1688,
- 1690
+ 1687,
+ 1689
],
"kind": {
"plain": {
@@ -189409,7 +207975,7 @@
}
},
"links": {
- "vars": 1669
+ "vars": 1668
},
"name": "Vars",
"span": {
@@ -189425,19 +207991,55 @@
},
"visibility": "public"
},
- "1671": {
+ "167": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 55, patch: 0})}, feature: \"prelude_2015\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": "The 2015 version of the prelude of The Rust Standard Library.\n\nSee the [module-level documentation](self) for more.",
+ "id": 167,
+ "inner": {
+ "module": {
+ "is_crate": false,
+ "is_stripped": false,
+ "items": [
+ 166
+ ]
+ }
+ },
+ "links": {
+ "self": 164
+ },
+ "name": "rust_2015",
+ "span": {
+ "begin": [
+ 120,
+ 1
+ ],
+ "end": [
+ 120,
+ 18
+ ],
+ "filename": "std/src/prelude/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1670": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1671,
+ "id": 1670,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1670,
+ "id": 1669,
"path": "Vars"
}
},
@@ -189462,19 +208064,19 @@
"span": null,
"visibility": "default"
},
- "1672": {
+ "1671": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1672,
+ "id": 1671,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1670,
+ "id": 1669,
"path": "Vars"
}
},
@@ -189499,19 +208101,19 @@
"span": null,
"visibility": "default"
},
- "1673": {
+ "1672": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1673,
+ "id": 1672,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1670,
+ "id": 1669,
"path": "Vars"
}
},
@@ -189526,7 +208128,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -189536,19 +208138,19 @@
"span": null,
"visibility": "default"
},
- "1674": {
+ "1673": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1674,
+ "id": 1673,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1670,
+ "id": 1669,
"path": "Vars"
}
},
@@ -189573,19 +208175,19 @@
"span": null,
"visibility": "default"
},
- "1675": {
+ "1674": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1675,
+ "id": 1674,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1670,
+ "id": 1669,
"path": "Vars"
}
},
@@ -189600,7 +208202,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -189610,19 +208212,19 @@
"span": null,
"visibility": "default"
},
- "1676": {
+ "1675": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1676,
+ "id": 1675,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1670,
+ "id": 1669,
"path": "Vars"
}
},
@@ -189637,7 +208239,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -189647,12 +208249,12 @@
"span": null,
"visibility": "default"
},
- "1677": {
+ "1676": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1677,
+ "id": 1676,
"inner": {
"impl": {
"blanket_impl": {
@@ -189661,7 +208263,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1670,
+ "id": 1669,
"path": "Vars"
}
},
@@ -189706,7 +208308,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -189722,7 +208324,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -189731,23 +208333,23 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1678": {
+ "1677": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1678,
+ "id": 1677,
"inner": {
"impl": {
"blanket_impl": {
@@ -189756,7 +208358,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1670,
+ "id": 1669,
"path": "Vars"
}
},
@@ -189801,7 +208403,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -189817,7 +208419,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -189826,23 +208428,23 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1679": {
+ "1678": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1679,
+ "id": 1678,
"inner": {
"impl": {
"blanket_impl": {
@@ -189851,7 +208453,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1670,
+ "id": 1669,
"path": "Vars"
}
},
@@ -189917,7 +208519,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -189942,59 +208544,23 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "168": {
- "attrs": [
- {
- "other": "#[doc(no_inline)]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 55, patch: 0})}, feature: \"prelude_2015\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 168,
- "inner": {
- "use": {
- "id": 167,
- "is_glob": true,
- "name": "v1",
- "source": "super::v1"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 123,
- 5
- ],
- "end": [
- 123,
- 26
- ],
- "filename": "std/src/prelude/mod.rs"
- },
- "visibility": "public"
- },
- "1680": {
+ "1679": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1680,
+ "id": 1679,
"inner": {
"impl": {
"blanket_impl": {
@@ -190003,7 +208569,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1670,
+ "id": 1669,
"path": "Vars"
}
},
@@ -190026,7 +208592,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -190051,23 +208617,59 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1681": {
+ "168": {
+ "attrs": [
+ {
+ "other": "#[doc(no_inline)]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 55, patch: 0})}, feature: \"prelude_2018\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 168,
+ "inner": {
+ "use": {
+ "id": 165,
+ "is_glob": true,
+ "name": "v1",
+ "source": "super::v1"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 133,
+ 5
+ ],
+ "end": [
+ 133,
+ 26
+ ],
+ "filename": "std/src/prelude/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1680": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1681,
+ "id": 1680,
"inner": {
"impl": {
"blanket_impl": {
@@ -190076,7 +208678,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1670,
+ "id": 1669,
"path": "Vars"
}
},
@@ -190124,7 +208726,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -190142,8 +208744,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -190159,7 +208761,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -190168,23 +208770,23 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1682": {
+ "1681": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1682,
+ "id": 1681,
"inner": {
"impl": {
"blanket_impl": {
@@ -190193,7 +208795,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1670,
+ "id": 1669,
"path": "Vars"
}
},
@@ -190259,8 +208861,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -190276,7 +208878,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -190285,23 +208887,23 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1683": {
+ "1682": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1683,
+ "id": 1682,
"inner": {
"impl": {
"blanket_impl": {
@@ -190310,7 +208912,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1670,
+ "id": 1669,
"path": "Vars"
}
},
@@ -190358,12 +208960,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -190383,12 +208985,12 @@
},
"visibility": "default"
},
- "1684": {
+ "1683": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1684,
+ "id": 1683,
"inner": {
"impl": {
"blanket_impl": {
@@ -190397,7 +208999,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1670,
+ "id": 1669,
"path": "Vars"
}
},
@@ -190469,12 +209071,12 @@
},
"visibility": "default"
},
- "1685": {
+ "1684": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1685,
+ "id": 1684,
"inner": {
"assoc_type": {
"bounds": [],
@@ -190487,14 +209089,14 @@
{
"resolved_path": {
"args": null,
- "id": 161,
+ "id": 159,
"path": "String"
}
},
{
"resolved_path": {
"args": null,
- "id": 161,
+ "id": 159,
"path": "String"
}
}
@@ -190517,12 +209119,12 @@
},
"visibility": "default"
},
- "1686": {
+ "1685": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1686,
+ "id": 1685,
"inner": {
"function": {
"generics": {
@@ -190563,14 +209165,14 @@
{
"resolved_path": {
"args": null,
- "id": 161,
+ "id": 159,
"path": "String"
}
},
{
"resolved_path": {
"args": null,
- "id": 161,
+ "id": 159,
"path": "String"
}
}
@@ -190603,12 +209205,12 @@
},
"visibility": "default"
},
- "1687": {
+ "1686": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1687,
+ "id": 1686,
"inner": {
"function": {
"generics": {
@@ -190681,7 +209283,7 @@
},
"visibility": "default"
},
- "1688": {
+ "1687": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -190690,14 +209292,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1688,
+ "id": 1687,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1670,
+ "id": 1669,
"path": "Vars"
}
},
@@ -190709,9 +209311,9 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 1684,
1685,
- 1686,
- 1687
+ 1686
],
"provided_trait_methods": [
"next_chunk",
@@ -190813,12 +209415,12 @@
},
"visibility": "default"
},
- "1689": {
+ "1688": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1689,
+ "id": 1688,
"inner": {
"function": {
"generics": {
@@ -190864,7 +209466,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -190876,7 +209478,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -190898,43 +209500,7 @@
},
"visibility": "default"
},
- "169": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 55, patch: 0})}, feature: \"prelude_2015\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": "The 2015 version of the prelude of The Rust Standard Library.\n\nSee the [module-level documentation](self) for more.",
- "id": 169,
- "inner": {
- "module": {
- "is_crate": false,
- "is_stripped": false,
- "items": [
- 168
- ]
- }
- },
- "links": {
- "self": 166
- },
- "name": "rust_2015",
- "span": {
- "begin": [
- 120,
- 1
- ],
- "end": [
- 120,
- 18
- ],
- "filename": "std/src/prelude/mod.rs"
- },
- "visibility": "public"
- },
- "1690": {
+ "1689": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 16, patch: 0})}, feature: \"std_debug\"}}]"
@@ -190943,14 +209509,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1690,
+ "id": 1689,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1670,
+ "id": 1669,
"path": "Vars"
}
},
@@ -190962,12 +209528,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1689
+ 1688
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -190987,7 +209553,43 @@
},
"visibility": "default"
},
- "1692": {
+ "169": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 55, patch: 0})}, feature: \"prelude_2018\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": "The 2018 version of the prelude of The Rust Standard Library.\n\nSee the [module-level documentation](self) for more.",
+ "id": 169,
+ "inner": {
+ "module": {
+ "is_crate": false,
+ "is_stripped": false,
+ "items": [
+ 168
+ ]
+ }
+ },
+ "links": {
+ "self": 164
+ },
+ "name": "rust_2018",
+ "span": {
+ "begin": [
+ 130,
+ 1
+ ],
+ "end": [
+ 130,
+ 18
+ ],
+ "filename": "std/src/prelude/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1691": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -191001,7 +209603,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Returns an iterator of (variable, value) pairs of OS strings, for all the\nenvironment variables of the current process.\n\nThe returned iterator contains a snapshot of the process's environment\nvariables at the time of this invocation. Modifications to environment\nvariables afterwards will not be reflected in the returned iterator.\n\nNote that the returned iterator will not check if the environment variables\nare valid Unicode. If you want to panic on invalid UTF-8,\nuse the [`vars`] function instead.\n\n# Examples\n\n```\n// Print all environment variables.\nfor (key, value) in std::env::vars_os() {\n println!(\"{key:?}: {value:?}\");\n}\n```",
- "id": 1692,
+ "id": 1691,
"inner": {
"function": {
"generics": {
@@ -191021,7 +209623,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 1693,
+ "id": 1692,
"path": "VarsOs"
}
}
@@ -191029,7 +209631,7 @@
}
},
"links": {
- "`vars`": 1669
+ "`vars`": 1668
},
"name": "vars_os",
"span": {
@@ -191045,7 +209647,7 @@
},
"visibility": "public"
},
- "1693": {
+ "1692": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -191054,7 +209656,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "An iterator over a snapshot of the environment variables of this process.\n\nThis structure is created by [`env::vars_os()`]. See its documentation for more.\n\n[`env::vars_os()`]: vars_os",
- "id": 1693,
+ "id": 1692,
"inner": {
"struct": {
"generics": {
@@ -191062,6 +209664,7 @@
"where_predicates": []
},
"impls": [
+ 1693,
1694,
1695,
1696,
@@ -191075,9 +209678,8 @@
1704,
1705,
1706,
- 1707,
- 1712,
- 1714
+ 1711,
+ 1713
],
"kind": {
"plain": {
@@ -191088,7 +209690,7 @@
}
},
"links": {
- "vars_os": 1692
+ "vars_os": 1691
},
"name": "VarsOs",
"span": {
@@ -191104,19 +209706,19 @@
},
"visibility": "public"
},
- "1694": {
+ "1693": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1694,
+ "id": 1693,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1693,
+ "id": 1692,
"path": "VarsOs"
}
},
@@ -191141,19 +209743,19 @@
"span": null,
"visibility": "default"
},
- "1695": {
+ "1694": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1695,
+ "id": 1694,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1693,
+ "id": 1692,
"path": "VarsOs"
}
},
@@ -191178,19 +209780,19 @@
"span": null,
"visibility": "default"
},
- "1696": {
+ "1695": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1696,
+ "id": 1695,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1693,
+ "id": 1692,
"path": "VarsOs"
}
},
@@ -191205,7 +209807,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -191215,19 +209817,19 @@
"span": null,
"visibility": "default"
},
- "1697": {
+ "1696": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1697,
+ "id": 1696,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1693,
+ "id": 1692,
"path": "VarsOs"
}
},
@@ -191252,19 +209854,19 @@
"span": null,
"visibility": "default"
},
- "1698": {
+ "1697": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1698,
+ "id": 1697,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1693,
+ "id": 1692,
"path": "VarsOs"
}
},
@@ -191279,7 +209881,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -191289,19 +209891,19 @@
"span": null,
"visibility": "default"
},
- "1699": {
+ "1698": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1699,
+ "id": 1698,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1693,
+ "id": 1692,
"path": "VarsOs"
}
},
@@ -191316,7 +209918,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -191326,48 +209928,12 @@
"span": null,
"visibility": "default"
},
- "170": {
- "attrs": [
- {
- "other": "#[doc(no_inline)]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 55, patch: 0})}, feature: \"prelude_2018\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 170,
- "inner": {
- "use": {
- "id": 167,
- "is_glob": true,
- "name": "v1",
- "source": "super::v1"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 133,
- 5
- ],
- "end": [
- 133,
- 26
- ],
- "filename": "std/src/prelude/mod.rs"
- },
- "visibility": "public"
- },
- "1700": {
+ "1699": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1700,
+ "id": 1699,
"inner": {
"impl": {
"blanket_impl": {
@@ -191376,7 +209942,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1693,
+ "id": 1692,
"path": "VarsOs"
}
},
@@ -191421,7 +209987,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -191437,7 +210003,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -191446,23 +210012,59 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1701": {
+ "170": {
+ "attrs": [
+ {
+ "other": "#[doc(no_inline)]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 55, patch: 0})}, feature: \"prelude_2021\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 170,
+ "inner": {
+ "use": {
+ "id": 165,
+ "is_glob": true,
+ "name": "v1",
+ "source": "super::v1"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 143,
+ 5
+ ],
+ "end": [
+ 143,
+ 26
+ ],
+ "filename": "std/src/prelude/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1700": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1701,
+ "id": 1700,
"inner": {
"impl": {
"blanket_impl": {
@@ -191471,7 +210073,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1693,
+ "id": 1692,
"path": "VarsOs"
}
},
@@ -191516,7 +210118,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -191532,7 +210134,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -191541,23 +210143,23 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1702": {
+ "1701": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1702,
+ "id": 1701,
"inner": {
"impl": {
"blanket_impl": {
@@ -191566,7 +210168,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1693,
+ "id": 1692,
"path": "VarsOs"
}
},
@@ -191632,7 +210234,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -191657,23 +210259,23 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1703": {
+ "1702": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1703,
+ "id": 1702,
"inner": {
"impl": {
"blanket_impl": {
@@ -191682,7 +210284,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1693,
+ "id": 1692,
"path": "VarsOs"
}
},
@@ -191705,7 +210307,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -191730,23 +210332,23 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1704": {
+ "1703": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1704,
+ "id": 1703,
"inner": {
"impl": {
"blanket_impl": {
@@ -191755,7 +210357,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1693,
+ "id": 1692,
"path": "VarsOs"
}
},
@@ -191803,7 +210405,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -191821,8 +210423,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -191838,7 +210440,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -191847,23 +210449,23 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1705": {
+ "1704": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1705,
+ "id": 1704,
"inner": {
"impl": {
"blanket_impl": {
@@ -191872,7 +210474,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1693,
+ "id": 1692,
"path": "VarsOs"
}
},
@@ -191938,8 +210540,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -191955,7 +210557,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -191964,23 +210566,23 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1706": {
+ "1705": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1706,
+ "id": 1705,
"inner": {
"impl": {
"blanket_impl": {
@@ -191989,7 +210591,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1693,
+ "id": 1692,
"path": "VarsOs"
}
},
@@ -192037,12 +210639,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -192062,12 +210664,12 @@
},
"visibility": "default"
},
- "1707": {
+ "1706": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1707,
+ "id": 1706,
"inner": {
"impl": {
"blanket_impl": {
@@ -192076,7 +210678,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1693,
+ "id": 1692,
"path": "VarsOs"
}
},
@@ -192148,12 +210750,12 @@
},
"visibility": "default"
},
- "1708": {
+ "1707": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1708,
+ "id": 1707,
"inner": {
"assoc_type": {
"bounds": [],
@@ -192166,14 +210768,14 @@
{
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
{
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -192196,7 +210798,7 @@
},
"visibility": "default"
},
- "1709": {
+ "1708": {
"attrs": [
{
"other": "#[(not(test), rustc_diagnostic_item = \"OsString\")]"
@@ -192211,7 +210813,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "A type that can represent owned, mutable platform-native strings, but is\ncheaply inter-convertible with Rust strings.\n\nThe need for this type arises from the fact that:\n\n* On Unix systems, strings are often arbitrary sequences of non-zero\n bytes, in many cases interpreted as UTF-8.\n\n* On Windows, strings are often arbitrary sequences of non-zero 16-bit\n values, interpreted as UTF-16 when it is valid to do so.\n\n* In Rust, strings are always valid UTF-8, which may contain zeros.\n\n`OsString` and [`OsStr`] bridge this gap by simultaneously representing Rust\nand platform-native string values, and in particular allowing a Rust string\nto be converted into an \"OS\" string with no cost if possible. A consequence\nof this is that `OsString` instances are *not* `NUL` terminated; in order\nto pass to e.g., Unix system call, you should create a [`CStr`].\n\n`OsString` is to &[OsStr] as [`String`] is to &[str]: the former\nin each pair are owned strings; the latter are borrowed\nreferences.\n\nNote, `OsString` and [`OsStr`] internally do not necessarily hold strings in\nthe form native to the platform; While on Unix, strings are stored as a\nsequence of 8-bit values, on Windows, where strings are 16-bit value based\nas just discussed, strings are also actually stored as a sequence of 8-bit\nvalues, encoded in a less-strict variant of UTF-8. This is useful to\nunderstand when handling capacity and length values.\n\n# Capacity of `OsString`\n\nCapacity uses units of UTF-8 bytes for OS strings which were created from valid unicode, and\nuses units of bytes in an unspecified encoding for other contents. On a given target, all\n`OsString` and `OsStr` values use the same units for capacity, so the following will work:\n```\nuse std::ffi::{OsStr, OsString};\n\nfn concat_os_strings(a: &OsStr, b: &OsStr) -> OsString {\n let mut ret = OsString::with_capacity(a.len() + b.len()); // This will allocate\n ret.push(a); // This will not allocate further\n ret.push(b); // This will not allocate further\n ret\n}\n```\n\n# Creating an `OsString`\n\n**From a Rust string**: `OsString` implements\n[From]<[String]>, so you can use my_string.[into]\\() to\ncreate an `OsString` from a normal Rust string.\n\n**From slices:** Just like you can start with an empty Rust\n[`String`] and then [`String::push_str`] some &[str]\nsub-string slices into it, you can create an empty `OsString` with\nthe [`OsString::new`] method and then push string slices into it with the\n[`OsString::push`] method.\n\n# Extracting a borrowed reference to the whole OS string\n\nYou can use the [`OsString::as_os_str`] method to get an &[OsStr] from\nan `OsString`; this is effectively a borrowed reference to the\nwhole string.\n\n# Conversions\n\nSee the [module's toplevel documentation about conversions][conversions] for a discussion on\nthe traits which `OsString` implements for [conversions] from/to native representations.\n\n[`CStr`]: crate::ffi::CStr\n[conversions]: super#conversions\n[into]: Into::into",
- "id": 1709,
+ "id": 1708,
"inner": {
"struct": {
"generics": {
@@ -192219,6 +210821,8 @@
"where_predicates": []
},
"impls": [
+ 1951,
+ 1952,
1953,
1954,
1955,
@@ -192231,36 +210835,35 @@
1962,
1963,
1964,
- 1965,
1966,
- 1968,
- 1971,
+ 1969,
+ 1970,
1972,
1974,
- 1976,
+ 1978,
1980,
- 1982,
+ 1984,
1986,
- 1988,
- 1991,
+ 1989,
+ 1992,
1994,
1996,
1998,
2000,
2002,
2004,
- 2006,
- 2007,
+ 2005,
+ 2012,
2014,
2016,
2018,
2020,
- 2022,
+ 2023,
2025,
2027,
- 2029,
- 2032,
- 2036,
+ 2030,
+ 2034,
+ 2037,
2039,
2041,
2043,
@@ -192276,17 +210879,17 @@
2063,
2065,
2067,
- 2069,
+ 2071,
2073,
2075,
2077,
2079,
2081,
2083,
- 2085,
- 2088,
- 2092,
- 2095,
+ 2086,
+ 2090,
+ 2093,
+ 2096,
2098,
2100,
2102,
@@ -192304,8 +210907,7 @@
2126,
2128,
2130,
- 2132,
- 2134
+ 2132
],
"kind": {
"plain": {
@@ -192317,18 +210919,18 @@
},
"links": {
"From": 37,
- "Into::into": 1929,
- "OsStr": 1720,
- "String": 161,
- "`OsStr`": 1720,
- "`OsString::as_os_str`": 1933,
- "`OsString::new`": 1931,
- "`OsString::push`": 1932,
- "`String::push_str`": 1930,
- "`String`": 161,
- "crate::ffi::CStr": 1921,
- "str": 1928,
- "super#conversions": 1934
+ "Into::into": 1927,
+ "OsStr": 1719,
+ "String": 159,
+ "`OsStr`": 1719,
+ "`OsString::as_os_str`": 1931,
+ "`OsString::new`": 1929,
+ "`OsString::push`": 1930,
+ "`String::push_str`": 1928,
+ "`String`": 159,
+ "crate::ffi::CStr": 1919,
+ "str": 1926,
+ "super#conversions": 1932
},
"name": "OsString",
"span": {
@@ -192344,48 +210946,12 @@
},
"visibility": "public"
},
- "171": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 55, patch: 0})}, feature: \"prelude_2018\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": "The 2018 version of the prelude of The Rust Standard Library.\n\nSee the [module-level documentation](self) for more.",
- "id": 171,
- "inner": {
- "module": {
- "is_crate": false,
- "is_stripped": false,
- "items": [
- 170
- ]
- }
- },
- "links": {
- "self": 166
- },
- "name": "rust_2018",
- "span": {
- "begin": [
- 130,
- 1
- ],
- "end": [
- 130,
- 18
- ],
- "filename": "std/src/prelude/mod.rs"
- },
- "visibility": "public"
- },
- "1710": {
+ "1709": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1710,
+ "id": 1709,
"inner": {
"function": {
"generics": {
@@ -192426,14 +210992,14 @@
{
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
{
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -192466,12 +211032,48 @@
},
"visibility": "default"
},
- "1711": {
+ "171": {
+ "attrs": [
+ {
+ "other": "#[doc(no_inline)]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 55, patch: 0})}, feature: \"prelude_2021\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 171,
+ "inner": {
+ "use": {
+ "id": 172,
+ "is_glob": true,
+ "name": "rust_2021",
+ "source": "core::prelude::rust_2021"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 147,
+ 5
+ ],
+ "end": [
+ 147,
+ 41
+ ],
+ "filename": "std/src/prelude/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1710": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1711,
+ "id": 1710,
"inner": {
"function": {
"generics": {
@@ -192544,7 +211146,7 @@
},
"visibility": "default"
},
- "1712": {
+ "1711": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -192553,14 +211155,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1712,
+ "id": 1711,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1693,
+ "id": 1692,
"path": "VarsOs"
}
},
@@ -192572,9 +211174,9 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1708,
- 1710,
- 1711
+ 1707,
+ 1709,
+ 1710
],
"provided_trait_methods": [
"next_chunk",
@@ -192676,12 +211278,12 @@
},
"visibility": "default"
},
- "1713": {
+ "1712": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1713,
+ "id": 1712,
"inner": {
"function": {
"generics": {
@@ -192727,7 +211329,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -192739,7 +211341,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -192761,7 +211363,7 @@
},
"visibility": "default"
},
- "1714": {
+ "1713": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 16, patch: 0})}, feature: \"std_debug\"}}]"
@@ -192770,14 +211372,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1714,
+ "id": 1713,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1693,
+ "id": 1692,
"path": "VarsOs"
}
},
@@ -192789,12 +211391,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1713
+ 1712
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -192814,7 +211416,7 @@
},
"visibility": "default"
},
- "1715": {
+ "1714": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -192823,7 +211425,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "The specified environment variable was not present in the current\nprocess's environment.",
- "id": 1715,
+ "id": 1714,
"inner": {
"variant": {
"discriminant": null,
@@ -192845,7 +211447,7 @@
},
"visibility": "default"
},
- "1716": {
+ "1715": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -192854,13 +211456,13 @@
"crate_id": 0,
"deprecation": null,
"docs": "The specified environment variable was found, but it did not contain\nvalid unicode data. The found data is returned as a payload of this\nvariant.",
- "id": 1716,
+ "id": 1715,
"inner": {
"variant": {
"discriminant": null,
"kind": {
"tuple": [
- 1722
+ 1721
]
}
}
@@ -192880,7 +211482,7 @@
},
"visibility": "default"
},
- "1717": {
+ "1716": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -192894,7 +211496,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Fetches the environment variable `key` from the current process, returning\n[`None`] if the variable isn't set or if there is another error.\n\nIt may return `None` if the environment variable's name contains\nthe equal sign character (`=`) or the NUL character.\n\nNote that this function will not check if the environment variable\nis valid Unicode. If you want to have an error on invalid UTF-8,\nuse the [`var`] function instead.\n\n# Examples\n\n```\nuse std::env;\n\nlet key = \"HOME\";\nmatch env::var_os(key) {\n Some(val) => println!(\"{key}: {val:?}\"),\n None => println!(\"{key} is not defined in the environment.\")\n}\n```\n\nIf expecting a delimited variable (such as `PATH`), [`split_paths`]\ncan be used to separate items.",
- "id": 1717,
+ "id": 1716,
"inner": {
"function": {
"generics": {
@@ -192915,7 +211517,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "crate::ffi::OsStr"
}
}
@@ -192965,7 +211567,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "crate::ffi::OsString"
}
}
@@ -192983,8 +211585,8 @@
},
"links": {
"`None`": 53,
- "`split_paths`": 1721,
- "`var`": 1718
+ "`split_paths`": 1720,
+ "`var`": 1717
},
"name": "var_os",
"span": {
@@ -193000,7 +211602,7 @@
},
"visibility": "public"
},
- "1718": {
+ "1717": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -193009,7 +211611,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Fetches the environment variable `key` from the current process.\n\n# Errors\n\nReturns [`VarError::NotPresent`] if:\n- The variable is not set.\n- The variable's name contains an equal sign or NUL (`'='` or `'\\0'`).\n\nReturns [`VarError::NotUnicode`] if the variable's value is not valid\nUnicode. If this is not desired, consider using [`var_os`].\n\nUse [`env!`] or [`option_env!`] instead if you want to check environment\nvariables at compile time.\n\n# Examples\n\n```\nuse std::env;\n\nlet key = \"HOME\";\nmatch env::var(key) {\n Ok(val) => println!(\"{key}: {val:?}\"),\n Err(e) => println!(\"couldn't interpret {key}: {e}\"),\n}\n```",
- "id": 1718,
+ "id": 1717,
"inner": {
"function": {
"generics": {
@@ -193030,7 +211632,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "crate::ffi::OsStr"
}
}
@@ -193080,7 +211682,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 161,
+ "id": 159,
"path": "String"
}
}
@@ -193089,7 +211691,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1719,
+ "id": 1718,
"path": "VarError"
}
}
@@ -193106,11 +211708,11 @@
}
},
"links": {
- "`VarError::NotPresent`": 1715,
- "`VarError::NotUnicode`": 1716,
+ "`VarError::NotPresent`": 1714,
+ "`VarError::NotUnicode`": 1715,
"`env!`": 73,
- "`option_env!`": 93,
- "`var_os`": 1717
+ "`option_env!`": 91,
+ "`var_os`": 1716
},
"name": "var",
"span": {
@@ -193126,7 +211728,7 @@
},
"visibility": "public"
},
- "1719": {
+ "1718": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -193135,7 +211737,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "The error type for operations interacting with environment variables.\nPossibly returned from [`env::var()`].\n\n[`env::var()`]: var",
- "id": 1719,
+ "id": 1718,
"inner": {
"enum": {
"generics": {
@@ -193144,6 +211746,7 @@
},
"has_stripped_variants": false,
"impls": [
+ 1722,
1723,
1724,
1725,
@@ -193159,23 +211762,22 @@
1735,
1736,
1737,
- 1738,
+ 1739,
1740,
- 1741,
+ 1742,
1743,
- 1744,
- 1746,
- 1748,
- 1750
+ 1745,
+ 1747,
+ 1748
],
"variants": [
- 1715,
- 1716
+ 1714,
+ 1715
]
}
},
"links": {
- "var": 1718
+ "var": 1717
},
"name": "VarError",
"span": {
@@ -193191,43 +211793,7 @@
},
"visibility": "public"
},
- "172": {
- "attrs": [
- {
- "other": "#[doc(no_inline)]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 55, patch: 0})}, feature: \"prelude_2021\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 172,
- "inner": {
- "use": {
- "id": 167,
- "is_glob": true,
- "name": "v1",
- "source": "super::v1"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 143,
- 5
- ],
- "end": [
- 143,
- 26
- ],
- "filename": "std/src/prelude/mod.rs"
- },
- "visibility": "public"
- },
- "1720": {
+ "1719": {
"attrs": [
{
"other": "#[(not(test), rustc_diagnostic_item = \"OsStr\")]"
@@ -193250,7 +211816,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Borrowed reference to an OS string (see [`OsString`]).\n\nThis type represents a borrowed reference to a string in the operating system's preferred\nrepresentation.\n\n`&OsStr` is to [`OsString`] as &[str] is to [`String`]: the\nformer in each pair are borrowed references; the latter are owned strings.\n\nSee the [module's toplevel documentation about conversions][conversions] for a discussion on\nthe traits which `OsStr` implements for [conversions] from/to native representations.\n\n[conversions]: super#conversions",
- "id": 1720,
+ "id": 1719,
"inner": {
"struct": {
"generics": {
@@ -193258,6 +211824,8 @@
"where_predicates": []
},
"impls": [
+ 2152,
+ 2153,
2154,
2155,
2156,
@@ -193267,29 +211835,28 @@
2160,
2161,
2162,
- 2163,
2164,
2166,
2168,
+ 2025,
2170,
- 2027,
2172,
2174,
2176,
2178,
2180,
2182,
- 2184,
+ 2186,
2188,
2190,
2192,
2194,
2196,
- 2198,
- 2199,
+ 2197,
+ 2203,
2205,
2207,
- 2209,
+ 2041,
2043,
2045,
2047,
@@ -193297,7 +211864,7 @@
2051,
2053,
2055,
- 2057,
+ 2209,
2211,
2213,
2215,
@@ -193307,22 +211874,22 @@
2223,
2225,
2227,
- 2229,
- 2232,
- 2067,
+ 2230,
+ 2065,
+ 2235,
2237,
+ 2067,
2239,
- 2069,
2241,
- 2243,
- 2077,
- 2083,
- 2246,
- 2250,
- 2254,
- 2257,
- 2260,
- 2263,
+ 2075,
+ 2081,
+ 2244,
+ 2248,
+ 2252,
+ 2255,
+ 2258,
+ 2261,
+ 2264,
2266,
2268,
2270,
@@ -193352,8 +211919,7 @@
2318,
2320,
2322,
- 2324,
- 2326
+ 2324
],
"kind": {
"plain": {
@@ -193364,10 +211930,10 @@
}
},
"links": {
- "`OsString`": 1709,
- "`String`": 161,
- "str": 1928,
- "super#conversions": 1934
+ "`OsString`": 1708,
+ "`String`": 159,
+ "str": 1926,
+ "super#conversions": 1932
},
"name": "OsStr",
"span": {
@@ -193383,7 +211949,7 @@
},
"visibility": "public"
},
- "1721": {
+ "1720": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -193392,7 +211958,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Parses input according to platform conventions for the `PATH`\nenvironment variable.\n\nReturns an iterator over the paths contained in `unparsed`. The iterator\nelement type is [`PathBuf`].\n\nOn most Unix platforms, the separator is `:` and on Windows it is `;`. This\nalso performs unquoting on Windows.\n\n[`join_paths`] can be used to recombine elements.\n\n# Panics\n\nThis will panic on systems where there is no delimited `PATH` variable,\nsuch as UEFI.\n\n# Examples\n\n```\nuse std::env;\n\nlet key = \"PATH\";\nmatch env::var_os(key) {\n Some(paths) => {\n for path in env::split_paths(&paths) {\n println!(\"'{}'\", path.display());\n }\n }\n None => println!(\"{key} is not defined in the environment.\")\n}\n```",
- "id": 1721,
+ "id": 1720,
"inner": {
"function": {
"generics": {
@@ -193413,7 +211979,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "crate::ffi::OsStr"
}
}
@@ -193483,7 +212049,7 @@
"constraints": []
}
},
- "id": 1758,
+ "id": 1756,
"path": "SplitPaths"
}
}
@@ -193491,24 +212057,24 @@
}
},
"links": {
- "`PathBuf`": 1664,
- "`join_paths`": 1779
+ "`PathBuf`": 1663,
+ "`join_paths`": 1777
},
"name": "split_paths",
"span": {
"begin": [
- 490,
+ 482,
1
],
"end": [
- 492,
+ 484,
2
],
"filename": "std/src/env.rs"
},
"visibility": "public"
},
- "1722": {
+ "1721": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -193517,12 +212083,12 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1722,
+ "id": 1721,
"inner": {
"struct_field": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "crate::ffi::OsString"
}
}
@@ -193542,19 +212108,19 @@
},
"visibility": "default"
},
- "1723": {
+ "1722": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1723,
+ "id": 1722,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1719,
+ "id": 1718,
"path": "VarError"
}
},
@@ -193579,19 +212145,19 @@
"span": null,
"visibility": "default"
},
- "1724": {
+ "1723": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1724,
+ "id": 1723,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1719,
+ "id": 1718,
"path": "VarError"
}
},
@@ -193616,19 +212182,19 @@
"span": null,
"visibility": "default"
},
- "1725": {
+ "1724": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1725,
+ "id": 1724,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1719,
+ "id": 1718,
"path": "VarError"
}
},
@@ -193643,7 +212209,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -193653,19 +212219,19 @@
"span": null,
"visibility": "default"
},
- "1726": {
+ "1725": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1726,
+ "id": 1725,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1719,
+ "id": 1718,
"path": "VarError"
}
},
@@ -193690,19 +212256,19 @@
"span": null,
"visibility": "default"
},
- "1727": {
+ "1726": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1727,
+ "id": 1726,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1719,
+ "id": 1718,
"path": "VarError"
}
},
@@ -193717,7 +212283,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -193727,19 +212293,19 @@
"span": null,
"visibility": "default"
},
- "1728": {
+ "1727": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1728,
+ "id": 1727,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1719,
+ "id": 1718,
"path": "VarError"
}
},
@@ -193754,7 +212320,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -193764,12 +212330,12 @@
"span": null,
"visibility": "default"
},
- "1729": {
+ "1728": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1729,
+ "id": 1728,
"inner": {
"impl": {
"blanket_impl": {
@@ -193778,7 +212344,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1719,
+ "id": 1718,
"path": "VarError"
}
},
@@ -193823,7 +212389,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -193839,7 +212405,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -193848,59 +212414,23 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "173": {
- "attrs": [
- {
- "other": "#[doc(no_inline)]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 55, patch: 0})}, feature: \"prelude_2021\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 173,
- "inner": {
- "use": {
- "id": 174,
- "is_glob": true,
- "name": "rust_2021",
- "source": "core::prelude::rust_2021"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 147,
- 5
- ],
- "end": [
- 147,
- 41
- ],
- "filename": "std/src/prelude/mod.rs"
- },
- "visibility": "public"
- },
- "1730": {
+ "1729": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1730,
+ "id": 1729,
"inner": {
"impl": {
"blanket_impl": {
@@ -193909,7 +212439,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1719,
+ "id": 1718,
"path": "VarError"
}
},
@@ -193954,7 +212484,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -193970,7 +212500,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -193979,23 +212509,60 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1731": {
+ "173": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 55, patch: 0})}, feature: \"prelude_2021\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": "The 2021 version of the prelude of The Rust Standard Library.\n\nSee the [module-level documentation](self) for more.",
+ "id": 173,
+ "inner": {
+ "module": {
+ "is_crate": false,
+ "is_stripped": false,
+ "items": [
+ 170,
+ 171
+ ]
+ }
+ },
+ "links": {
+ "self": 164
+ },
+ "name": "rust_2021",
+ "span": {
+ "begin": [
+ 140,
+ 1
+ ],
+ "end": [
+ 140,
+ 18
+ ],
+ "filename": "std/src/prelude/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1730": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1731,
+ "id": 1730,
"inner": {
"impl": {
"blanket_impl": {
@@ -194004,7 +212571,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1719,
+ "id": 1718,
"path": "VarError"
}
},
@@ -194031,7 +212598,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -194063,23 +212630,23 @@
"name": null,
"span": {
"begin": [
- 516,
+ 515,
1
],
"end": [
- 516,
+ 515,
42
],
"filename": "checkouts/rust/library/core/src/clone.rs"
},
"visibility": "default"
},
- "1732": {
+ "1731": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1732,
+ "id": 1731,
"inner": {
"impl": {
"blanket_impl": {
@@ -194088,7 +212655,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1719,
+ "id": 1718,
"path": "VarError"
}
},
@@ -194154,7 +212721,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -194179,23 +212746,23 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1733": {
+ "1732": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1733,
+ "id": 1732,
"inner": {
"impl": {
"blanket_impl": {
@@ -194204,7 +212771,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1719,
+ "id": 1718,
"path": "VarError"
}
},
@@ -194227,7 +212794,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -194252,23 +212819,23 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1734": {
+ "1733": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1734,
+ "id": 1733,
"inner": {
"impl": {
"blanket_impl": {
@@ -194277,7 +212844,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1719,
+ "id": 1718,
"path": "VarError"
}
},
@@ -194325,7 +212892,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -194343,8 +212910,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -194360,7 +212927,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -194369,23 +212936,23 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1735": {
+ "1734": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1735,
+ "id": 1734,
"inner": {
"impl": {
"blanket_impl": {
@@ -194394,7 +212961,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1719,
+ "id": 1718,
"path": "VarError"
}
},
@@ -194460,8 +213027,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -194477,7 +213044,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -194486,23 +213053,23 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1736": {
+ "1735": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1736,
+ "id": 1735,
"inner": {
"impl": {
"blanket_impl": {
@@ -194511,7 +213078,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1719,
+ "id": 1718,
"path": "VarError"
}
},
@@ -194559,12 +213126,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -194584,12 +213151,12 @@
},
"visibility": "default"
},
- "1737": {
+ "1736": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1737,
+ "id": 1736,
"inner": {
"impl": {
"blanket_impl": {
@@ -194598,7 +213165,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1719,
+ "id": 1718,
"path": "VarError"
}
},
@@ -194625,7 +213192,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -194652,7 +213219,7 @@
],
"trait": {
"args": null,
- "id": 157,
+ "id": 155,
"path": "ToOwned"
}
}
@@ -194661,23 +213228,23 @@
"name": null,
"span": {
"begin": [
- 82,
+ 85,
1
],
"end": [
- 84,
+ 87,
14
],
"filename": "checkouts/rust/library/alloc/src/borrow.rs"
},
"visibility": "default"
},
- "1738": {
+ "1737": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1738,
+ "id": 1737,
"inner": {
"impl": {
"blanket_impl": {
@@ -194686,7 +213253,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1719,
+ "id": 1718,
"path": "VarError"
}
},
@@ -194747,7 +213314,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 163,
+ "id": 161,
"path": "ToString"
}
}
@@ -194756,18 +213323,18 @@
"name": null,
"span": {
"begin": [
- 2806,
+ 2866,
1
],
"end": [
- 2806,
+ 2866,
46
],
"filename": "checkouts/rust/library/alloc/src/string.rs"
},
"visibility": "default"
},
- "1739": {
+ "1738": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -194776,7 +213343,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1739,
+ "id": 1738,
"inner": {
"function": {
"generics": {
@@ -194822,7 +213389,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "$crate::fmt::Formatter"
}
}
@@ -194834,7 +213401,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "$crate::fmt::Result"
}
}
@@ -194856,7 +213423,7 @@
},
"visibility": "default"
},
- "1740": {
+ "1739": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -194866,14 +213433,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1740,
+ "id": 1739,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1719,
+ "id": 1718,
"path": "VarError"
}
},
@@ -194885,12 +213452,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1739
+ 1738
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -194910,7 +213477,43 @@
},
"visibility": "default"
},
- "1741": {
+ "174": {
+ "attrs": [
+ {
+ "other": "#[doc(no_inline)]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 174,
+ "inner": {
+ "use": {
+ "id": 165,
+ "is_glob": true,
+ "name": "v1",
+ "source": "super::v1"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 157,
+ 5
+ ],
+ "end": [
+ 157,
+ 26
+ ],
+ "filename": "std/src/prelude/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1740": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -194920,14 +213523,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1741,
+ "id": 1740,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1719,
+ "id": 1718,
"path": "VarError"
}
},
@@ -194962,7 +213565,7 @@
},
"visibility": "default"
},
- "1742": {
+ "1741": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -194971,7 +213574,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1742,
+ "id": 1741,
"inner": {
"function": {
"generics": {
@@ -195008,7 +213611,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1719,
+ "id": 1718,
"path": "VarError"
}
}
@@ -195038,7 +213641,7 @@
},
"visibility": "default"
},
- "1743": {
+ "1742": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -195048,14 +213651,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1743,
+ "id": 1742,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1719,
+ "id": 1718,
"path": "VarError"
}
},
@@ -195067,14 +213670,14 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1742
+ 1741
],
"provided_trait_methods": [
"ne"
],
"trait": {
"args": null,
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -195094,7 +213697,7 @@
},
"visibility": "default"
},
- "1744": {
+ "1743": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -195104,14 +213707,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1744,
+ "id": 1743,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1719,
+ "id": 1718,
"path": "VarError"
}
},
@@ -195128,7 +213731,7 @@
],
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -195148,7 +213751,7 @@
},
"visibility": "default"
},
- "1745": {
+ "1744": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -195157,7 +213760,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1745,
+ "id": 1744,
"inner": {
"function": {
"generics": {
@@ -195190,7 +213793,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 1719,
+ "id": 1718,
"path": "VarError"
}
}
@@ -195212,7 +213815,7 @@
},
"visibility": "default"
},
- "1746": {
+ "1745": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -195222,14 +213825,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1746,
+ "id": 1745,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1719,
+ "id": 1718,
"path": "VarError"
}
},
@@ -195241,14 +213844,14 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1745
+ 1744
],
"provided_trait_methods": [
"clone_from"
],
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -195268,154 +213871,12 @@
},
"visibility": "default"
},
- "1747": {
+ "1746": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1747,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
- }
- ],
- [
- "f",
- {
- "borrowed_ref": {
- "is_mutable": true,
- "lifetime": null,
- "type": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'_"
- }
- ],
- "constraints": []
- }
- },
- "id": 343,
- "path": "fmt::Formatter"
- }
- }
- }
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "resolved_path": {
- "args": null,
- "id": 344,
- "path": "fmt::Result"
- }
- }
- }
- }
- },
- "links": {},
- "name": "fmt",
- "span": {
- "begin": [
- 288,
- 5
- ],
- "end": [
- 295,
- 6
- ],
- "filename": "std/src/env.rs"
- },
- "visibility": "default"
- },
- "1748": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 1748,
- "inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "resolved_path": {
- "args": null,
- "id": 1719,
- "path": "VarError"
- }
- },
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 1747
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": null,
- "id": 436,
- "path": "Display"
- }
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 287,
- 1
- ],
- "end": [
- 296,
- 2
- ],
- "filename": "std/src/env.rs"
- },
- "visibility": "default"
- },
- "1749": {
- "attrs": [
- {
- "other": "#[allow(deprecated)]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 1749,
+ "id": 1746,
"inner": {
"function": {
"generics": {
@@ -195442,74 +213903,113 @@
}
}
}
+ ],
+ [
+ "f",
+ {
+ "borrowed_ref": {
+ "is_mutable": true,
+ "lifetime": null,
+ "type": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'_"
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 341,
+ "path": "fmt::Formatter"
+ }
+ }
+ }
+ }
]
],
"is_c_variadic": false,
"output": {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "primitive": "str"
- }
+ "resolved_path": {
+ "args": null,
+ "id": 342,
+ "path": "fmt::Result"
}
}
}
}
},
"links": {},
- "name": "description",
+ "name": "fmt",
"span": {
"begin": [
- 301,
+ 288,
5
],
"end": [
- 306,
+ 295,
6
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "175": {
+ "1747": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 55, patch: 0})}, feature: \"prelude_2021\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
}
],
"crate_id": 0,
"deprecation": null,
- "docs": "The 2021 version of the prelude of The Rust Standard Library.\n\nSee the [module-level documentation](self) for more.",
- "id": 175,
+ "docs": null,
+ "id": 1747,
"inner": {
- "module": {
- "is_crate": false,
- "is_stripped": false,
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "resolved_path": {
+ "args": null,
+ "id": 1718,
+ "path": "VarError"
+ }
+ },
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
"items": [
- 172,
- 173
- ]
+ 1746
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 436,
+ "path": "Display"
+ }
}
},
- "links": {
- "self": 166
- },
- "name": "rust_2021",
+ "links": {},
+ "name": null,
"span": {
"begin": [
- 140,
+ 287,
1
],
"end": [
- 140,
- 18
+ 296,
+ 2
],
- "filename": "std/src/prelude/mod.rs"
+ "filename": "std/src/env.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
- "1750": {
+ "1748": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -195518,14 +214018,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1750,
+ "id": 1748,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1719,
+ "id": 1718,
"path": "VarError"
}
},
@@ -195536,9 +214036,7 @@
"is_negative": false,
"is_synthetic": false,
"is_unsafe": false,
- "items": [
- 1749
- ],
+ "items": [],
"provided_trait_methods": [
"source",
"type_id",
@@ -195561,14 +214059,14 @@
1
],
"end": [
- 307,
- 2
+ 299,
+ 27
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1751": {
+ "1749": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -195576,8 +214074,8 @@
],
"crate_id": 0,
"deprecation": null,
- "docs": "A trait for objects which can be converted or resolved to one or more\n[`SocketAddr`] values.\n\nThis trait is used for generic address resolution when constructing network\nobjects. By default it is implemented for the following types:\n\n * [`SocketAddr`]: [`to_socket_addrs`] is the identity function.\n\n * [`SocketAddrV4`], [`SocketAddrV6`], ([IpAddr], [u16]),\n ([Ipv4Addr], [u16]), ([Ipv6Addr], [u16]):\n [`to_socket_addrs`] constructs a [`SocketAddr`] trivially.\n\n * (&[str], [u16]): &[str] should be either a string representation\n of an [`IpAddr`] address as expected by [`FromStr`] implementation or a host\n name. [`u16`] is the port number.\n\n * &[str]: the string should be either a string representation of a\n [`SocketAddr`] as expected by its [`FromStr`] implementation or a string like\n `:` pair where `` is a [`u16`] value.\n\nThis trait allows constructing network objects like [`TcpStream`] or\n[`UdpSocket`] easily with values of various types for the bind/connection\naddress. It is needed because sometimes one type is more appropriate than\nthe other: for simple uses a string like `\"localhost:12345\"` is much nicer\nthan manual construction of the corresponding [`SocketAddr`], but sometimes\n[`SocketAddr`] value is *the* main source of the address, and converting it to\nsome other type (e.g., a string) just for it to be converted back to\n[`SocketAddr`] in constructor methods is pointless.\n\nAddresses returned by the operating system that are not IP addresses are\nsilently ignored.\n\n[`FromStr`]: crate::str::FromStr \"std::str::FromStr\"\n[`TcpStream`]: crate::net::TcpStream \"net::TcpStream\"\n[`to_socket_addrs`]: ToSocketAddrs::to_socket_addrs\n[`UdpSocket`]: crate::net::UdpSocket \"net::UdpSocket\"\n\n# Examples\n\nCreating a [`SocketAddr`] iterator that yields one item:\n\n```\nuse std::net::{ToSocketAddrs, SocketAddr};\n\nlet addr = SocketAddr::from(([127, 0, 0, 1], 443));\nlet mut addrs_iter = addr.to_socket_addrs().unwrap();\n\nassert_eq!(Some(addr), addrs_iter.next());\nassert!(addrs_iter.next().is_none());\n```\n\nCreating a [`SocketAddr`] iterator from a hostname:\n\n```no_run\nuse std::net::{SocketAddr, ToSocketAddrs};\n\n// assuming 'localhost' resolves to 127.0.0.1\nlet mut addrs_iter = \"localhost:443\".to_socket_addrs().unwrap();\nassert_eq!(addrs_iter.next(), Some(SocketAddr::from(([127, 0, 0, 1], 443))));\nassert!(addrs_iter.next().is_none());\n\n// assuming 'foo' does not resolve\nassert!(\"foo:443\".to_socket_addrs().is_err());\n```\n\nCreating a [`SocketAddr`] iterator that yields multiple items:\n\n```\nuse std::net::{SocketAddr, ToSocketAddrs};\n\nlet addr1 = SocketAddr::from(([0, 0, 0, 0], 80));\nlet addr2 = SocketAddr::from(([127, 0, 0, 1], 443));\nlet addrs = vec![addr1, addr2];\n\nlet mut addrs_iter = (&addrs[..]).to_socket_addrs().unwrap();\n\nassert_eq!(Some(addr1), addrs_iter.next());\nassert_eq!(Some(addr2), addrs_iter.next());\nassert!(addrs_iter.next().is_none());\n```\n\nAttempting to create a [`SocketAddr`] iterator from an improperly formatted\nsocket address `&str` (missing the port):\n\n```\nuse std::io;\nuse std::net::ToSocketAddrs;\n\nlet err = \"127.0.0.1\".to_socket_addrs().unwrap_err();\nassert_eq!(err.kind(), io::ErrorKind::InvalidInput);\n```\n\n[`TcpStream::connect`] is an example of a function that utilizes\n`ToSocketAddrs` as a trait bound on its parameter in order to accept\ndifferent types:\n\n```no_run\nuse std::net::{TcpStream, Ipv4Addr};\n\nlet stream = TcpStream::connect((\"127.0.0.1\", 443));\n// or\nlet stream = TcpStream::connect(\"127.0.0.1:443\");\n// or\nlet stream = TcpStream::connect((Ipv4Addr::new(127, 0, 0, 1), 443));\n```\n\n[`TcpStream::connect`]: crate::net::TcpStream::connect",
- "id": 1751,
+ "docs": "A trait for objects which can be converted or resolved to one or more\n[`SocketAddr`] values.\n\nThis trait is used for generic address resolution when constructing network\nobjects. By default it is implemented for the following types:\n\n * [`SocketAddr`]: [`to_socket_addrs`] is the identity function.\n\n * [`SocketAddrV4`], [`SocketAddrV6`], ([IpAddr], [u16]),\n ([Ipv4Addr], [u16]), ([Ipv6Addr], [u16]):\n [`to_socket_addrs`] constructs a [`SocketAddr`] trivially.\n\n * (&[str], [u16]): &[str] should be either a string representation\n of an [`IpAddr`] address as expected by [`FromStr`] implementation or a host\n name. [`u16`] is the port number.\n\n * &[str]: the string should be either a string representation of a\n [`SocketAddr`] as expected by its [`FromStr`] implementation or a string like\n `:` pair where `` is a [`u16`] value.\n\n * &[[SocketAddr]]: all [`SocketAddr`] values in the slice will be used.\n\nThis trait allows constructing network objects like [`TcpStream`] or\n[`UdpSocket`] easily with values of various types for the bind/connection\naddress. It is needed because sometimes one type is more appropriate than\nthe other: for simple uses a string like `\"localhost:12345\"` is much nicer\nthan manual construction of the corresponding [`SocketAddr`], but sometimes\n[`SocketAddr`] value is *the* main source of the address, and converting it to\nsome other type (e.g., a string) just for it to be converted back to\n[`SocketAddr`] in constructor methods is pointless.\n\nAddresses returned by the operating system that are not IP addresses are\nsilently ignored.\n\n[`FromStr`]: crate::str::FromStr \"std::str::FromStr\"\n[`TcpStream`]: crate::net::TcpStream \"net::TcpStream\"\n[`to_socket_addrs`]: ToSocketAddrs::to_socket_addrs\n[`UdpSocket`]: crate::net::UdpSocket \"net::UdpSocket\"\n\n# Examples\n\nCreating a [`SocketAddr`] iterator that yields one item:\n\n```\nuse std::net::{ToSocketAddrs, SocketAddr};\n\nlet addr = SocketAddr::from(([127, 0, 0, 1], 443));\nlet mut addrs_iter = addr.to_socket_addrs().unwrap();\n\nassert_eq!(Some(addr), addrs_iter.next());\nassert!(addrs_iter.next().is_none());\n```\n\nCreating a [`SocketAddr`] iterator from a hostname:\n\n```no_run\nuse std::net::{SocketAddr, ToSocketAddrs};\n\n// assuming 'localhost' resolves to 127.0.0.1\nlet mut addrs_iter = \"localhost:443\".to_socket_addrs().unwrap();\nassert_eq!(addrs_iter.next(), Some(SocketAddr::from(([127, 0, 0, 1], 443))));\nassert!(addrs_iter.next().is_none());\n\n// assuming 'foo' does not resolve\nassert!(\"foo:443\".to_socket_addrs().is_err());\n```\n\nCreating a [`SocketAddr`] iterator that yields multiple items:\n\n```\nuse std::net::{SocketAddr, ToSocketAddrs};\n\nlet addr1 = SocketAddr::from(([0, 0, 0, 0], 80));\nlet addr2 = SocketAddr::from(([127, 0, 0, 1], 443));\nlet addrs = vec![addr1, addr2];\n\nlet mut addrs_iter = (&addrs[..]).to_socket_addrs().unwrap();\n\nassert_eq!(Some(addr1), addrs_iter.next());\nassert_eq!(Some(addr2), addrs_iter.next());\nassert!(addrs_iter.next().is_none());\n```\n\nAttempting to create a [`SocketAddr`] iterator from an improperly formatted\nsocket address `&str` (missing the port):\n\n```\nuse std::io;\nuse std::net::ToSocketAddrs;\n\nlet err = \"127.0.0.1\".to_socket_addrs().unwrap_err();\nassert_eq!(err.kind(), io::ErrorKind::InvalidInput);\n```\n\n[`TcpStream::connect`] is an example of a function that utilizes\n`ToSocketAddrs` as a trait bound on its parameter in order to accept\ndifferent types:\n\n```no_run\nuse std::net::{TcpStream, Ipv4Addr};\n\nlet stream = TcpStream::connect((\"127.0.0.1\", 443));\n// or\nlet stream = TcpStream::connect(\"127.0.0.1:443\");\n// or\nlet stream = TcpStream::connect((Ipv4Addr::new(127, 0, 0, 1), 443));\n```\n\n[`TcpStream::connect`]: crate::net::TcpStream::connect",
+ "id": 1749,
"inner": {
"trait": {
"bounds": [],
@@ -195586,60 +214084,97 @@
"where_predicates": []
},
"implementations": [
- 4442,
- 4445,
- 4448,
- 4451,
- 4454,
- 4457,
- 4461,
- 4464,
- 4467,
- 4472,
- 4475,
- 4478
+ 4443,
+ 4446,
+ 4449,
+ 4452,
+ 4455,
+ 4458,
+ 4462,
+ 4465,
+ 4468,
+ 4473,
+ 4476,
+ 4479
],
"is_auto": false,
"is_dyn_compatible": true,
"is_unsafe": false,
"items": [
- 4435,
- 4436
+ 4436,
+ 4437
]
}
},
"links": {
- "IpAddr": 4421,
- "Ipv4Addr": 4425,
- "Ipv6Addr": 4427,
- "ToSocketAddrs::to_socket_addrs": 4436,
- "`IpAddr`": 4421,
- "`SocketAddrV4`": 4432,
- "`SocketAddrV6`": 4434,
- "`SocketAddr`": 4430,
- "`u16`": 2404,
- "crate::net::TcpStream": 3047,
- "crate::net::TcpStream::connect": 4438,
- "crate::net::UdpSocket": 4437,
- "crate::str::FromStr": 2072,
- "str": 1928,
- "u16": 2404
+ "IpAddr": 4422,
+ "Ipv4Addr": 4426,
+ "Ipv6Addr": 4428,
+ "SocketAddr": 4431,
+ "ToSocketAddrs::to_socket_addrs": 4437,
+ "`IpAddr`": 4422,
+ "`SocketAddrV4`": 4433,
+ "`SocketAddrV6`": 4435,
+ "`SocketAddr`": 4431,
+ "`u16`": 2402,
+ "crate::net::TcpStream": 3049,
+ "crate::net::TcpStream::connect": 4439,
+ "crate::net::UdpSocket": 4438,
+ "crate::str::FromStr": 2070,
+ "str": 1926,
+ "u16": 2402
},
"name": "ToSocketAddrs",
"span": {
"begin": [
- 120,
+ 121,
1
],
"end": [
- 135,
+ 136,
2
],
"filename": "std/src/net/socket_addr.rs"
},
"visibility": "public"
},
- "1752": {
+ "175": {
+ "attrs": [
+ {
+ "other": "#[doc(no_inline)]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"prelude_2024\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 175,
+ "inner": {
+ "use": {
+ "id": 176,
+ "is_glob": true,
+ "name": "rust_2024",
+ "source": "core::prelude::rust_2024"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 161,
+ 5
+ ],
+ "end": [
+ 161,
+ 41
+ ],
+ "filename": "std/src/prelude/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1750": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"process\"}}]"
@@ -195648,7 +214183,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Inserts or updates an explicit environment variable mapping.\n\nThis method allows you to add an environment variable mapping to the spawned process or\noverwrite a previously set value. You can use [`Command::envs`] to set multiple environment\nvariables simultaneously.\n\nChild processes will inherit environment variables from their parent process by default.\nEnvironment variables explicitly set using [`Command::env`] take precedence over inherited\nvariables. You can disable environment variable inheritance entirely using\n[`Command::env_clear`] or for a single key using [`Command::env_remove`].\n\nNote that environment variable names are case-insensitive (but\ncase-preserving) on Windows and case-sensitive on all other platforms.\n\n# Examples\n\n```no_run\nuse std::process::Command;\n\nCommand::new(\"ls\")\n .env(\"PATH\", \"/bin\")\n .spawn()\n .expect(\"ls command failed to start\");\n```",
- "id": 1752,
+ "id": 1750,
"inner": {
"function": {
"generics": {
@@ -195690,7 +214225,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -195726,7 +214261,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -195791,7 +214326,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 5336,
+ "id": 5341,
"path": "Command"
}
}
@@ -195801,26 +214336,26 @@
}
},
"links": {
- "`Command::env_clear`": 1755,
- "`Command::env_remove`": 1754,
- "`Command::env`": 1752,
- "`Command::envs`": 6931
+ "`Command::env_clear`": 1753,
+ "`Command::env_remove`": 1752,
+ "`Command::env`": 1750,
+ "`Command::envs`": 6969
},
"name": "env",
"span": {
"begin": [
- 800,
+ 811,
5
],
"end": [
- 807,
+ 818,
6
],
"filename": "std/src/process.rs"
},
"visibility": "public"
},
- "1753": {
+ "1751": {
"attrs": [
{
"other": "#[rustc_deprecated_safe_2024(audit_that =\n\"the environment access only happens in single-threaded code\")]"
@@ -195832,7 +214367,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Sets the environment variable `key` to the value `value` for the currently running\nprocess.\n\n# Safety\n\nThis function is safe to call in a single-threaded program.\n\nThis function is also always safe to call on Windows, in single-threaded\nand multi-threaded programs.\n\nIn multi-threaded programs on other operating systems, the only safe option is\nto not use `set_var` or `remove_var` at all.\n\nThe exact requirement is: you\nmust ensure that there are no other threads concurrently writing or\n*reading*(!) the environment through functions or global variables other\nthan the ones in this module. The problem is that these operating systems\ndo not provide a thread-safe way to read the environment, and most C\nlibraries, including libc itself, do not advertise which functions read\nfrom the environment. Even functions from the Rust standard library may\nread the environment without going through this module, e.g. for DNS\nlookups from [`std::net::ToSocketAddrs`]. No stable guarantee is made about\nwhich functions may read from the environment in future versions of a\nlibrary. All this makes it not practically possible for you to guarantee\nthat no other thread will read the environment, so the only safe option is\nto not use `set_var` or `remove_var` in multi-threaded programs at all.\n\nDiscussion of this unsafety on Unix may be found in:\n\n - [Austin Group Bugzilla (for POSIX)](https://austingroupbugs.net/view.php?id=188)\n - [GNU C library Bugzilla](https://sourceware.org/bugzilla/show_bug.cgi?id=15607#c2)\n\nTo pass an environment variable to a child process, you can instead use [`Command::env`].\n\n[`std::net::ToSocketAddrs`]: crate::net::ToSocketAddrs\n[`Command::env`]: crate::process::Command::env\n\n# Panics\n\nThis function may panic if `key` is empty, contains an ASCII equals sign `'='`\nor the NUL character `'\\0'`, or when `value` contains the NUL character.\n\n# Examples\n\n```\nuse std::env;\n\nlet key = \"KEY\";\nunsafe {\n env::set_var(key, \"VALUE\");\n}\nassert_eq!(env::var(key), Ok(\"VALUE\".to_string()));\n```",
- "id": 1753,
+ "id": 1751,
"inner": {
"function": {
"generics": {
@@ -195853,7 +214388,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "crate::ffi::OsStr"
}
}
@@ -195890,7 +214425,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "crate::ffi::OsStr"
}
}
@@ -195942,24 +214477,24 @@
}
},
"links": {
- "crate::net::ToSocketAddrs": 1751,
- "crate::process::Command::env": 1752
+ "crate::net::ToSocketAddrs": 1749,
+ "crate::process::Command::env": 1750
},
"name": "set_var",
"span": {
"begin": [
- 366,
+ 358,
1
],
"end": [
- 371,
+ 363,
2
],
"filename": "std/src/env.rs"
},
"visibility": "public"
},
- "1754": {
+ "1752": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"process\"}}]"
@@ -195968,7 +214503,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Removes an explicitly set environment variable and prevents inheriting it from a parent\nprocess.\n\nThis method will remove the explicit value of an environment variable set via\n[`Command::env`] or [`Command::envs`]. In addition, it will prevent the spawned child\nprocess from inheriting that environment variable from its parent process.\n\nAfter calling [`Command::env_remove`], the value associated with its key from\n[`Command::get_envs`] will be [`None`].\n\nTo clear all explicitly set environment variables and disable all environment variable\ninheritance, you can use [`Command::env_clear`].\n\n# Examples\n\nPrevent any inherited `GIT_DIR` variable from changing the target of the `git` command,\nwhile allowing all other variables, like `GIT_AUTHOR_NAME`.\n\n```no_run\nuse std::process::Command;\n\nCommand::new(\"git\")\n .arg(\"commit\")\n .env_remove(\"GIT_DIR\")\n .spawn()?;\n# std::io::Result::Ok(())\n```",
- "id": 1754,
+ "id": 1752,
"inner": {
"function": {
"generics": {
@@ -195989,7 +214524,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -196049,7 +214584,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 5336,
+ "id": 5341,
"path": "Command"
}
}
@@ -196059,28 +214594,28 @@
}
},
"links": {
- "`Command::env_clear`": 1755,
- "`Command::env_remove`": 1754,
- "`Command::env`": 1752,
- "`Command::envs`": 6931,
- "`Command::get_envs`": 6932,
+ "`Command::env_clear`": 1753,
+ "`Command::env_remove`": 1752,
+ "`Command::env`": 1750,
+ "`Command::envs`": 6969,
+ "`Command::get_envs`": 6970,
"`None`": 53
},
"name": "env_remove",
"span": {
"begin": [
- 884,
+ 895,
5
],
"end": [
- 887,
+ 898,
6
],
"filename": "std/src/process.rs"
},
"visibility": "public"
},
- "1755": {
+ "1753": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"process\"}}]"
@@ -196089,7 +214624,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Clears all explicitly set environment variables and prevents inheriting any parent process\nenvironment variables.\n\nThis method will remove all explicitly added environment variables set via [`Command::env`]\nor [`Command::envs`]. In addition, it will prevent the spawned child process from inheriting\nany environment variable from its parent process.\n\nAfter calling [`Command::env_clear`], the iterator from [`Command::get_envs`] will be\nempty.\n\nYou can use [`Command::env_remove`] to clear a single mapping.\n\n# Examples\n\nThe behavior of `sort` is affected by `LANG` and `LC_*` environment variables.\nClearing the environment makes `sort`'s behavior independent of the parent processes' language.\n\n```no_run\nuse std::process::Command;\n\nCommand::new(\"sort\")\n .arg(\"file.txt\")\n .env_clear()\n .spawn()?;\n# std::io::Result::Ok(())\n```",
- "id": 1755,
+ "id": 1753,
"inner": {
"function": {
"generics": {
@@ -196126,7 +214661,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 5336,
+ "id": 5341,
"path": "Command"
}
}
@@ -196136,27 +214671,27 @@
}
},
"links": {
- "`Command::env_clear`": 1755,
- "`Command::env_remove`": 1754,
- "`Command::env`": 1752,
- "`Command::envs`": 6931,
- "`Command::get_envs`": 6932
+ "`Command::env_clear`": 1753,
+ "`Command::env_remove`": 1752,
+ "`Command::env`": 1750,
+ "`Command::envs`": 6969,
+ "`Command::get_envs`": 6970
},
"name": "env_clear",
"span": {
"begin": [
- 916,
+ 927,
5
],
"end": [
- 919,
+ 930,
6
],
"filename": "std/src/process.rs"
},
"visibility": "public"
},
- "1756": {
+ "1754": {
"attrs": [
{
"other": "#[rustc_deprecated_safe_2024(audit_that =\n\"the environment access only happens in single-threaded code\")]"
@@ -196168,7 +214703,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Removes an environment variable from the environment of the currently running process.\n\n# Safety\n\nThis function is safe to call in a single-threaded program.\n\nThis function is also always safe to call on Windows, in single-threaded\nand multi-threaded programs.\n\nIn multi-threaded programs on other operating systems, the only safe option is\nto not use `set_var` or `remove_var` at all.\n\nThe exact requirement is: you\nmust ensure that there are no other threads concurrently writing or\n*reading*(!) the environment through functions or global variables other\nthan the ones in this module. The problem is that these operating systems\ndo not provide a thread-safe way to read the environment, and most C\nlibraries, including libc itself, do not advertise which functions read\nfrom the environment. Even functions from the Rust standard library may\nread the environment without going through this module, e.g. for DNS\nlookups from [`std::net::ToSocketAddrs`]. No stable guarantee is made about\nwhich functions may read from the environment in future versions of a\nlibrary. All this makes it not practically possible for you to guarantee\nthat no other thread will read the environment, so the only safe option is\nto not use `set_var` or `remove_var` in multi-threaded programs at all.\n\nDiscussion of this unsafety on Unix may be found in:\n\n - [Austin Group Bugzilla](https://austingroupbugs.net/view.php?id=188)\n - [GNU C library Bugzilla](https://sourceware.org/bugzilla/show_bug.cgi?id=15607#c2)\n\nTo prevent a child process from inheriting an environment variable, you can\ninstead use [`Command::env_remove`] or [`Command::env_clear`].\n\n[`std::net::ToSocketAddrs`]: crate::net::ToSocketAddrs\n[`Command::env_remove`]: crate::process::Command::env_remove\n[`Command::env_clear`]: crate::process::Command::env_clear\n\n# Panics\n\nThis function may panic if `key` is empty, contains an ASCII equals sign\n`'='` or the NUL character `'\\0'`, or when the value contains the NUL\ncharacter.\n\n# Examples\n\n```no_run\nuse std::env;\n\nlet key = \"KEY\";\nunsafe {\n env::set_var(key, \"VALUE\");\n}\nassert_eq!(env::var(key), Ok(\"VALUE\".to_string()));\n\nunsafe {\n env::remove_var(key);\n}\nassert!(env::var(key).is_err());\n```",
- "id": 1756,
+ "id": 1754,
"inner": {
"function": {
"generics": {
@@ -196189,7 +214724,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "crate::ffi::OsStr"
}
}
@@ -196235,25 +214770,25 @@
}
},
"links": {
- "crate::net::ToSocketAddrs": 1751,
- "crate::process::Command::env_clear": 1755,
- "crate::process::Command::env_remove": 1754
+ "crate::net::ToSocketAddrs": 1749,
+ "crate::process::Command::env_clear": 1753,
+ "crate::process::Command::env_remove": 1752
},
"name": "remove_var",
"span": {
"begin": [
- 437,
+ 429,
1
],
"end": [
- 441,
+ 433,
2
],
"filename": "std/src/env.rs"
},
"visibility": "public"
},
- "1758": {
+ "1756": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -196267,7 +214802,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "An iterator that splits an environment variable into paths according to\nplatform-specific conventions.\n\nThe iterator element type is [`PathBuf`].\n\nThis structure is created by [`env::split_paths()`]. See its\ndocumentation for more.\n\n[`env::split_paths()`]: split_paths",
- "id": 1758,
+ "id": 1756,
"inner": {
"struct": {
"generics": {
@@ -196284,6 +214819,8 @@
"where_predicates": []
},
"impls": [
+ 1757,
+ 1758,
1759,
1760,
1761,
@@ -196296,10 +214833,8 @@
1768,
1769,
1770,
- 1771,
- 1772,
- 1776,
- 1778
+ 1774,
+ 1776
],
"kind": {
"plain": {
@@ -196310,29 +214845,29 @@
}
},
"links": {
- "`PathBuf`": 1664,
- "split_paths": 1721
+ "`PathBuf`": 1663,
+ "split_paths": 1720
},
"name": "SplitPaths",
"span": {
"begin": [
- 454,
+ 446,
1
],
"end": [
- 456,
+ 448,
2
],
"filename": "std/src/env.rs"
},
"visibility": "public"
},
- "1759": {
+ "1757": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1759,
+ "id": 1757,
"inner": {
"impl": {
"blanket_impl": null,
@@ -196348,7 +214883,7 @@
"constraints": []
}
},
- "id": 1758,
+ "id": 1756,
"path": "SplitPaths"
}
},
@@ -196382,48 +214917,12 @@
"span": null,
"visibility": "default"
},
- "176": {
- "attrs": [
- {
- "other": "#[doc(no_inline)]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 176,
- "inner": {
- "use": {
- "id": 167,
- "is_glob": true,
- "name": "v1",
- "source": "super::v1"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 157,
- 5
- ],
- "end": [
- 157,
- 26
- ],
- "filename": "std/src/prelude/mod.rs"
- },
- "visibility": "public"
- },
- "1760": {
+ "1758": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1760,
+ "id": 1758,
"inner": {
"impl": {
"blanket_impl": null,
@@ -196439,7 +214938,7 @@
"constraints": []
}
},
- "id": 1758,
+ "id": 1756,
"path": "SplitPaths"
}
},
@@ -196473,12 +214972,12 @@
"span": null,
"visibility": "default"
},
- "1761": {
+ "1759": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1761,
+ "id": 1759,
"inner": {
"impl": {
"blanket_impl": null,
@@ -196494,7 +214993,7 @@
"constraints": []
}
},
- "id": 1758,
+ "id": 1756,
"path": "SplitPaths"
}
},
@@ -196518,7 +215017,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -196528,12 +215027,12 @@
"span": null,
"visibility": "default"
},
- "1762": {
+ "1760": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1762,
+ "id": 1760,
"inner": {
"impl": {
"blanket_impl": null,
@@ -196549,7 +215048,7 @@
"constraints": []
}
},
- "id": 1758,
+ "id": 1756,
"path": "SplitPaths"
}
},
@@ -196583,12 +215082,12 @@
"span": null,
"visibility": "default"
},
- "1763": {
+ "1761": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1763,
+ "id": 1761,
"inner": {
"impl": {
"blanket_impl": null,
@@ -196604,7 +215103,7 @@
"constraints": []
}
},
- "id": 1758,
+ "id": 1756,
"path": "SplitPaths"
}
},
@@ -196628,7 +215127,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -196638,12 +215137,12 @@
"span": null,
"visibility": "default"
},
- "1764": {
+ "1762": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1764,
+ "id": 1762,
"inner": {
"impl": {
"blanket_impl": null,
@@ -196659,7 +215158,7 @@
"constraints": []
}
},
- "id": 1758,
+ "id": 1756,
"path": "SplitPaths"
}
},
@@ -196683,7 +215182,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -196693,12 +215192,12 @@
"span": null,
"visibility": "default"
},
- "1765": {
+ "1763": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1765,
+ "id": 1763,
"inner": {
"impl": {
"blanket_impl": {
@@ -196716,7 +215215,7 @@
"constraints": []
}
},
- "id": 1758,
+ "id": 1756,
"path": "SplitPaths"
}
},
@@ -196761,7 +215260,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -196777,7 +215276,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -196786,23 +215285,23 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1766": {
+ "1764": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1766,
+ "id": 1764,
"inner": {
"impl": {
"blanket_impl": {
@@ -196820,7 +215319,7 @@
"constraints": []
}
},
- "id": 1758,
+ "id": 1756,
"path": "SplitPaths"
}
},
@@ -196865,7 +215364,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -196881,7 +215380,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -196890,23 +215389,23 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1767": {
+ "1765": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1767,
+ "id": 1765,
"inner": {
"impl": {
"blanket_impl": {
@@ -196924,7 +215423,7 @@
"constraints": []
}
},
- "id": 1758,
+ "id": 1756,
"path": "SplitPaths"
}
},
@@ -196990,7 +215489,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -197015,23 +215514,23 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1768": {
+ "1766": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1768,
+ "id": 1766,
"inner": {
"impl": {
"blanket_impl": {
@@ -197049,7 +215548,7 @@
"constraints": []
}
},
- "id": 1758,
+ "id": 1756,
"path": "SplitPaths"
}
},
@@ -197072,7 +215571,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -197097,23 +215596,23 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1769": {
+ "1767": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1769,
+ "id": 1767,
"inner": {
"impl": {
"blanket_impl": {
@@ -197131,7 +215630,7 @@
"constraints": []
}
},
- "id": 1758,
+ "id": 1756,
"path": "SplitPaths"
}
},
@@ -197179,7 +215678,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -197197,8 +215696,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -197214,7 +215713,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -197223,59 +215722,23 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "177": {
- "attrs": [
- {
- "other": "#[doc(no_inline)]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"prelude_2024\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 177,
- "inner": {
- "use": {
- "id": 178,
- "is_glob": true,
- "name": "rust_2024",
- "source": "core::prelude::rust_2024"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 161,
- 5
- ],
- "end": [
- 161,
- 41
- ],
- "filename": "std/src/prelude/mod.rs"
- },
- "visibility": "public"
- },
- "1770": {
+ "1768": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1770,
+ "id": 1768,
"inner": {
"impl": {
"blanket_impl": {
@@ -197293,7 +215756,7 @@
"constraints": []
}
},
- "id": 1758,
+ "id": 1756,
"path": "SplitPaths"
}
},
@@ -197359,8 +215822,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -197376,7 +215839,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -197385,23 +215848,23 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1771": {
+ "1769": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1771,
+ "id": 1769,
"inner": {
"impl": {
"blanket_impl": {
@@ -197419,7 +215882,7 @@
"constraints": []
}
},
- "id": 1758,
+ "id": 1756,
"path": "SplitPaths"
}
},
@@ -197467,12 +215930,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -197492,12 +215955,49 @@
},
"visibility": "default"
},
- "1772": {
+ "177": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"prelude_2024\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": "The 2024 version of the prelude of The Rust Standard Library.\n\nSee the [module-level documentation](self) for more.",
+ "id": 177,
+ "inner": {
+ "module": {
+ "is_crate": false,
+ "is_stripped": false,
+ "items": [
+ 174,
+ 175
+ ]
+ }
+ },
+ "links": {
+ "self": 164
+ },
+ "name": "rust_2024",
+ "span": {
+ "begin": [
+ 154,
+ 1
+ ],
+ "end": [
+ 154,
+ 18
+ ],
+ "filename": "std/src/prelude/mod.rs"
+ },
+ "visibility": "public"
+ },
+ "1770": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1772,
+ "id": 1770,
"inner": {
"impl": {
"blanket_impl": {
@@ -197515,7 +216015,7 @@
"constraints": []
}
},
- "id": 1758,
+ "id": 1756,
"path": "SplitPaths"
}
},
@@ -197587,12 +216087,12 @@
},
"visibility": "default"
},
- "1773": {
+ "1771": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1773,
+ "id": 1771,
"inner": {
"assoc_type": {
"bounds": [],
@@ -197603,7 +216103,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "PathBuf"
}
}
@@ -197613,23 +216113,23 @@
"name": "Item",
"span": {
"begin": [
- 496,
+ 488,
5
],
"end": [
- 496,
+ 488,
25
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1774": {
+ "1772": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1774,
+ "id": 1772,
"inner": {
"function": {
"generics": {
@@ -197668,7 +216168,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "PathBuf"
}
}
@@ -197688,23 +216188,23 @@
"name": "next",
"span": {
"begin": [
- 497,
+ 489,
5
],
"end": [
- 499,
+ 491,
6
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1775": {
+ "1773": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1775,
+ "id": 1773,
"inner": {
"function": {
"generics": {
@@ -197766,18 +216266,18 @@
"name": "size_hint",
"span": {
"begin": [
- 500,
+ 492,
5
],
"end": [
- 502,
+ 494,
6
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1776": {
+ "1774": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -197786,7 +216286,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1776,
+ "id": 1774,
"inner": {
"impl": {
"blanket_impl": null,
@@ -197802,7 +216302,7 @@
"constraints": []
}
},
- "id": 1758,
+ "id": 1756,
"path": "SplitPaths"
}
},
@@ -197823,9 +216323,9 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1773,
- 1774,
- 1775
+ 1771,
+ 1772,
+ 1773
],
"provided_trait_methods": [
"next_chunk",
@@ -197916,23 +216416,23 @@
"name": null,
"span": {
"begin": [
- 495,
+ 487,
1
],
"end": [
- 503,
+ 495,
2
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1777": {
+ "1775": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1777,
+ "id": 1775,
"inner": {
"function": {
"generics": {
@@ -197978,7 +216478,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -197990,7 +216490,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -198001,18 +216501,18 @@
"name": "fmt",
"span": {
"begin": [
- 507,
+ 499,
5
],
"end": [
- 509,
+ 501,
6
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1778": {
+ "1776": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 16, patch: 0})}, feature: \"std_debug\"}}]"
@@ -198021,7 +216521,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1778,
+ "id": 1776,
"inner": {
"impl": {
"blanket_impl": null,
@@ -198037,7 +216537,7 @@
"constraints": []
}
},
- "id": 1758,
+ "id": 1756,
"path": "SplitPaths"
}
},
@@ -198049,12 +216549,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1777
+ 1775
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -198063,18 +216563,18 @@
"name": null,
"span": {
"begin": [
- 506,
+ 498,
1
],
"end": [
- 510,
+ 502,
2
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1779": {
+ "1777": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -198083,7 +216583,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Joins a collection of [`Path`]s appropriately for the `PATH`\nenvironment variable.\n\n# Errors\n\nReturns an [`Err`] (containing an error message) if one of the input\n[`Path`]s contains an invalid character for constructing the `PATH`\nvariable (a double quote on Windows or a colon on Unix), or if the system\ndoes not have a `PATH`-like variable (e.g. UEFI or WASI).\n\n# Examples\n\nJoining paths on a Unix-like platform:\n\n```\nuse std::env;\nuse std::ffi::OsString;\nuse std::path::Path;\n\nfn main() -> Result<(), env::JoinPathsError> {\n# if cfg!(unix) {\n let paths = [Path::new(\"/bin\"), Path::new(\"/usr/bin\")];\n let path_os_string = env::join_paths(paths.iter())?;\n assert_eq!(path_os_string, OsString::from(\"/bin:/usr/bin\"));\n# }\n Ok(())\n}\n```\n\nJoining a path containing a colon on a Unix-like platform results in an\nerror:\n\n```\n# if cfg!(unix) {\nuse std::env;\nuse std::path::Path;\n\nlet paths = [Path::new(\"/bin\"), Path::new(\"/usr/bi:n\")];\nassert!(env::join_paths(paths.iter()).is_err());\n# }\n```\n\nUsing `env::join_paths()` with [`env::split_paths()`] to append an item to\nthe `PATH` environment variable:\n\n```\nuse std::env;\nuse std::path::PathBuf;\n\nfn main() -> Result<(), env::JoinPathsError> {\n if let Some(path) = env::var_os(\"PATH\") {\n let mut paths = env::split_paths(&path).collect::>();\n paths.push(PathBuf::from(\"/home/xyz/bin\"));\n let new_path = env::join_paths(paths)?;\n unsafe { env::set_var(\"PATH\", &new_path); }\n }\n\n Ok(())\n}\n```\n\n[`env::split_paths()`]: split_paths",
- "id": 1779,
+ "id": 1777,
"inner": {
"function": {
"generics": {
@@ -198163,7 +216663,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "crate::ffi::OsStr"
}
}
@@ -198212,7 +216712,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "crate::ffi::OsString"
}
}
@@ -198221,7 +216721,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1781,
+ "id": 1779,
"path": "JoinPathsError"
}
}
@@ -198239,24 +216739,24 @@
},
"links": {
"`Err`": 59,
- "`Path`": 1667,
- "split_paths": 1721
+ "`Path`": 1666,
+ "split_paths": 1720
},
"name": "join_paths",
"span": {
"begin": [
- 585,
+ 577,
1
],
"end": [
- 591,
+ 583,
2
],
"filename": "std/src/env.rs"
},
"visibility": "public"
},
- "1781": {
+ "1779": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -198265,7 +216765,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "The error type for operations on the `PATH` variable. Possibly returned from\n[`env::join_paths()`].\n\n[`env::join_paths()`]: join_paths",
- "id": 1781,
+ "id": 1779,
"inner": {
"struct": {
"generics": {
@@ -198273,6 +216773,8 @@
"where_predicates": []
},
"impls": [
+ 1780,
+ 1781,
1782,
1783,
1784,
@@ -198285,11 +216787,9 @@
1791,
1792,
1793,
- 1794,
1795,
1797,
- 1799,
- 1801
+ 1799
],
"kind": {
"plain": {
@@ -198300,35 +216800,35 @@
}
},
"links": {
- "join_paths": 1779
+ "join_paths": 1777
},
"name": "JoinPathsError",
"span": {
"begin": [
- 518,
+ 510,
1
],
"end": [
- 520,
+ 512,
2
],
"filename": "std/src/env.rs"
},
"visibility": "public"
},
- "1782": {
+ "1780": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1782,
+ "id": 1780,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1781,
+ "id": 1779,
"path": "JoinPathsError"
}
},
@@ -198353,19 +216853,19 @@
"span": null,
"visibility": "default"
},
- "1783": {
+ "1781": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1783,
+ "id": 1781,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1781,
+ "id": 1779,
"path": "JoinPathsError"
}
},
@@ -198390,19 +216890,19 @@
"span": null,
"visibility": "default"
},
- "1784": {
+ "1782": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1784,
+ "id": 1782,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1781,
+ "id": 1779,
"path": "JoinPathsError"
}
},
@@ -198417,7 +216917,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -198427,19 +216927,19 @@
"span": null,
"visibility": "default"
},
- "1785": {
+ "1783": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1785,
+ "id": 1783,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1781,
+ "id": 1779,
"path": "JoinPathsError"
}
},
@@ -198464,19 +216964,19 @@
"span": null,
"visibility": "default"
},
- "1786": {
+ "1784": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1786,
+ "id": 1784,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1781,
+ "id": 1779,
"path": "JoinPathsError"
}
},
@@ -198491,7 +216991,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -198501,19 +217001,19 @@
"span": null,
"visibility": "default"
},
- "1787": {
+ "1785": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1787,
+ "id": 1785,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1781,
+ "id": 1779,
"path": "JoinPathsError"
}
},
@@ -198528,7 +217028,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -198538,12 +217038,12 @@
"span": null,
"visibility": "default"
},
- "1788": {
+ "1786": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1788,
+ "id": 1786,
"inner": {
"impl": {
"blanket_impl": {
@@ -198552,7 +217052,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1781,
+ "id": 1779,
"path": "JoinPathsError"
}
},
@@ -198597,7 +217097,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -198613,7 +217113,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -198622,23 +217122,23 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1789": {
+ "1787": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1789,
+ "id": 1787,
"inner": {
"impl": {
"blanket_impl": {
@@ -198647,7 +217147,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1781,
+ "id": 1779,
"path": "JoinPathsError"
}
},
@@ -198692,7 +217192,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -198708,7 +217208,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -198717,60 +217217,23 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "179": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"prelude_2024\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": "The 2024 version of the prelude of The Rust Standard Library.\n\nSee the [module-level documentation](self) for more.",
- "id": 179,
- "inner": {
- "module": {
- "is_crate": false,
- "is_stripped": false,
- "items": [
- 176,
- 177
- ]
- }
- },
- "links": {
- "self": 166
- },
- "name": "rust_2024",
- "span": {
- "begin": [
- 154,
- 1
- ],
- "end": [
- 154,
- 18
- ],
- "filename": "std/src/prelude/mod.rs"
- },
- "visibility": "public"
- },
- "1790": {
+ "1788": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1790,
+ "id": 1788,
"inner": {
"impl": {
"blanket_impl": {
@@ -198779,7 +217242,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1781,
+ "id": 1779,
"path": "JoinPathsError"
}
},
@@ -198845,7 +217308,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -198870,23 +217333,23 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1791": {
+ "1789": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1791,
+ "id": 1789,
"inner": {
"impl": {
"blanket_impl": {
@@ -198895,7 +217358,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1781,
+ "id": 1779,
"path": "JoinPathsError"
}
},
@@ -198918,7 +217381,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -198943,23 +217406,23 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1792": {
+ "1790": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1792,
+ "id": 1790,
"inner": {
"impl": {
"blanket_impl": {
@@ -198968,7 +217431,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1781,
+ "id": 1779,
"path": "JoinPathsError"
}
},
@@ -199016,7 +217479,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -199034,8 +217497,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -199051,7 +217514,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -199060,23 +217523,23 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1793": {
+ "1791": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1793,
+ "id": 1791,
"inner": {
"impl": {
"blanket_impl": {
@@ -199085,7 +217548,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1781,
+ "id": 1779,
"path": "JoinPathsError"
}
},
@@ -199151,8 +217614,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -199168,7 +217631,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -199177,23 +217640,23 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1794": {
+ "1792": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1794,
+ "id": 1792,
"inner": {
"impl": {
"blanket_impl": {
@@ -199202,7 +217665,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1781,
+ "id": 1779,
"path": "JoinPathsError"
}
},
@@ -199250,12 +217713,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -199275,12 +217738,12 @@
},
"visibility": "default"
},
- "1795": {
+ "1793": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1795,
+ "id": 1793,
"inner": {
"impl": {
"blanket_impl": {
@@ -199289,7 +217752,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1781,
+ "id": 1779,
"path": "JoinPathsError"
}
},
@@ -199350,7 +217813,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 163,
+ "id": 161,
"path": "ToString"
}
}
@@ -199359,18 +217822,18 @@
"name": null,
"span": {
"begin": [
- 2806,
+ 2866,
1
],
"end": [
- 2806,
+ 2866,
46
],
"filename": "checkouts/rust/library/alloc/src/string.rs"
},
"visibility": "default"
},
- "1796": {
+ "1794": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -199379,7 +217842,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1796,
+ "id": 1794,
"inner": {
"function": {
"generics": {
@@ -199425,7 +217888,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "$crate::fmt::Formatter"
}
}
@@ -199437,7 +217900,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "$crate::fmt::Result"
}
}
@@ -199448,18 +217911,18 @@
"name": "fmt",
"span": {
"begin": [
- 516,
+ 508,
10
],
"end": [
- 516,
+ 508,
15
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1797": {
+ "1795": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -199469,14 +217932,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1797,
+ "id": 1795,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1781,
+ "id": 1779,
"path": "JoinPathsError"
}
},
@@ -199488,12 +217951,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1796
+ 1794
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -199502,23 +217965,23 @@
"name": null,
"span": {
"begin": [
- 516,
+ 508,
10
],
"end": [
- 516,
+ 508,
15
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1798": {
+ "1796": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1798,
+ "id": 1796,
"inner": {
"function": {
"generics": {
@@ -199564,7 +218027,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -199576,7 +218039,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -199587,18 +218050,18 @@
"name": "fmt",
"span": {
"begin": [
- 595,
+ 587,
5
],
"end": [
- 597,
+ 589,
6
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1799": {
+ "1797": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -199607,14 +218070,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1799,
+ "id": 1797,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1781,
+ "id": 1779,
"path": "JoinPathsError"
}
},
@@ -199626,7 +218089,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1798
+ 1796
],
"provided_trait_methods": [],
"trait": {
@@ -199640,54 +218103,18 @@
"name": null,
"span": {
"begin": [
- 594,
+ 586,
1
],
"end": [
- 598,
+ 590,
2
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "18": {
- "attrs": [
- {
- "other": "#[doc(no_inline)]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"async_closure\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 18,
- "inner": {
- "use": {
- "id": 19,
- "is_glob": false,
- "name": "AsyncFnMut",
- "source": "crate::ops::AsyncFnMut"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 19,
- 31
- ],
- "end": [
- 19,
- 41
- ],
- "filename": "std/src/prelude/v1.rs"
- },
- "visibility": "public"
- },
- "1800": {
+ "1798": {
"attrs": [
{
"other": "#[allow(deprecated, deprecated_in_future)]"
@@ -199696,7 +218123,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1800,
+ "id": 1798,
"inner": {
"function": {
"generics": {
@@ -199742,18 +218169,18 @@
"name": "description",
"span": {
"begin": [
- 603,
+ 595,
5
],
"end": [
- 605,
+ 597,
6
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1801": {
+ "1799": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -199762,14 +218189,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1801,
+ "id": 1799,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1781,
+ "id": 1779,
"path": "JoinPathsError"
}
},
@@ -199781,7 +218208,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1800
+ 1798
],
"provided_trait_methods": [
"source",
@@ -199801,18 +218228,91 @@
"name": null,
"span": {
"begin": [
- 601,
+ 593,
1
],
"end": [
- 606,
+ 598,
2
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1802": {
+ "18": {
+ "attrs": [
+ {
+ "other": "#[doc(no_inline)]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"async_closure\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 18,
+ "inner": {
+ "use": {
+ "id": 19,
+ "is_glob": false,
+ "name": "AsyncFnMut",
+ "source": "crate::ops::AsyncFnMut"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 19,
+ 31
+ ],
+ "end": [
+ 19,
+ 41
+ ],
+ "filename": "std/src/prelude/v1.rs"
+ },
+ "visibility": "public"
+ },
+ "180": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": "The I/O Prelude.\n\nThe purpose of this module is to alleviate imports of many common I/O traits\nby adding a glob import to the top of I/O heavy modules:\n\n```\n# #![allow(unused_imports)]\nuse std::io::prelude::*;\n```",
+ "id": 180,
+ "inner": {
+ "module": {
+ "is_crate": false,
+ "is_stripped": false,
+ "items": [
+ 3549,
+ 3550,
+ 3551,
+ 3552
+ ]
+ }
+ },
+ "links": {},
+ "name": "prelude",
+ "span": {
+ "begin": [
+ 1,
+ 1
+ ],
+ "end": [
+ 14,
+ 45
+ ],
+ "filename": "std/src/io/prelude.rs"
+ },
+ "visibility": "public"
+ },
+ "1800": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -199826,7 +218326,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Returns the path of the current user's home directory if known.\n\nThis may return `None` if getting the directory fails or if the platform does not have user home directories.\n\nFor storing user data and configuration it is often preferable to use more specific directories.\nFor example, [XDG Base Directories] on Unix or the `LOCALAPPDATA` and `APPDATA` environment variables on Windows.\n\n[XDG Base Directories]: https://specifications.freedesktop.org/basedir-spec/latest/\n\n# Unix\n\n- Returns the value of the 'HOME' environment variable if it is set\n (and not an empty string).\n- Otherwise, it tries to determine the home directory by invoking the `getpwuid_r` function\n using the UID of the current user. An empty home directory field returned from the\n `getpwuid_r` function is considered to be a valid value.\n- Returns `None` if the current user has no entry in the /etc/passwd file.\n\n# Windows\n\n- Returns the value of the 'USERPROFILE' environment variable if it is set, and is not an empty string.\n- Otherwise, [`GetUserProfileDirectory`][msdn] is used to return the path. This may change in the future.\n\n[msdn]: https://docs.microsoft.com/en-us/windows/win32/api/userenv/nf-userenv-getuserprofiledirectorya\n\nIn UWP (Universal Windows Platform) targets this function is unimplemented and always returns `None`.\n\nBefore Rust 1.85.0, this function used to return the value of the 'HOME' environment variable\non Windows, which in Cygwin or Mingw environments could return non-standard paths like `/home/you`\ninstead of `C:\\Users\\you`.\n\n# Examples\n\n```\nuse std::env;\n\nmatch env::home_dir() {\n Some(path) => println!(\"Your home directory, probably: {}\", path.display()),\n None => println!(\"Impossible to get your home dir!\"),\n}\n```",
- "id": 1802,
+ "id": 1800,
"inner": {
"function": {
"generics": {
@@ -199852,7 +218352,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "crate::path::PathBuf"
}
}
@@ -199872,18 +218372,18 @@
"name": "home_dir",
"span": {
"begin": [
- 651,
+ 643,
1
],
"end": [
- 653,
+ 645,
2
],
"filename": "std/src/env.rs"
},
"visibility": "public"
},
- "1803": {
+ "1801": {
"attrs": [
{
"other": "#[doc(alias = \"GetTempPath\", alias = \"GetTempPath2\")]"
@@ -199900,7 +218400,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Returns the path of a temporary directory.\n\nThe temporary directory may be shared among users, or between processes\nwith different privileges; thus, the creation of any files or directories\nin the temporary directory must use a secure method to create a uniquely\nnamed file. Creating a file or directory with a fixed or predictable name\nmay result in \"insecure temporary file\" security vulnerabilities. Consider\nusing a crate that securely creates temporary files or directories.\n\nNote that the returned value may be a symbolic link, not a directory.\n\n# Platform-specific behavior\n\nOn Unix, returns the value of the `TMPDIR` environment variable if it is\nset, otherwise the value is OS-specific:\n- On Android, there is no global temporary folder (it is usually allocated\n per-app), it will return the application's cache dir if the program runs\n in application's namespace and system version is Android 13 (or above), or\n `/data/local/tmp` otherwise.\n- On Darwin-based OSes (macOS, iOS, etc) it returns the directory provided\n by `confstr(_CS_DARWIN_USER_TEMP_DIR, ...)`, as recommended by [Apple's\n security guidelines][appledoc].\n- On all other unix-based OSes, it returns `/tmp`.\n\nOn Windows, the behavior is equivalent to that of [`GetTempPath2`][GetTempPath2] /\n[`GetTempPath`][GetTempPath], which this function uses internally.\n\nNote that, this [may change in the future][changes].\n\n[changes]: io#platform-specific-behavior\n[GetTempPath2]: https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-gettemppath2a\n[GetTempPath]: https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-gettemppatha\n[appledoc]: https://developer.apple.com/library/archive/documentation/Security/Conceptual/SecureCodingGuide/Articles/RaceConditions.html#//apple_ref/doc/uid/TP40002585-SW10\n\n```no_run\nuse std::env;\n\nfn main() {\n let dir = env::temp_dir();\n println!(\"Temporary directory: {}\", dir.display());\n}\n```",
- "id": 1803,
+ "id": 1801,
"inner": {
"function": {
"generics": {
@@ -199920,7 +218420,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "crate::path::PathBuf"
}
}
@@ -199928,23 +218428,23 @@
}
},
"links": {
- "io#platform-specific-behavior": 501
+ "io#platform-specific-behavior": 502
},
"name": "temp_dir",
"span": {
"begin": [
- 700,
+ 692,
1
],
"end": [
- 702,
+ 694,
2
],
"filename": "std/src/env.rs"
},
"visibility": "public"
},
- "1804": {
+ "1802": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -199953,7 +218453,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Returns the full filesystem path of the current running executable.\n\n# Platform-specific behavior\n\nIf the executable was invoked through a symbolic link, some platforms will\nreturn the path of the symbolic link and other platforms will return the\npath of the symbolic link’s target.\n\nIf the executable is renamed while it is running, platforms may return the\npath at the time it was loaded instead of the new path.\n\n# Errors\n\nAcquiring the path of the current executable is a platform-specific operation\nthat can fail for a good number of reasons. Some errors can include, but not\nbe limited to, filesystem operations failing or general syscall failures.\n\n# Security\n\nThe output of this function should not be trusted for anything\nthat might have security implications. Basically, if users can run\nthe executable, they can change the output arbitrarily.\n\nAs an example, you can easily introduce a race condition. It goes\nlike this:\n\n1. You get the path to the current executable using `current_exe()`, and\n store it in a variable.\n2. Time passes. A malicious actor removes the current executable, and\n replaces it with a malicious one.\n3. You then use the stored path to re-execute the current\n executable.\n\nYou expected to safely execute the current executable, but you're\ninstead executing something completely different. The code you\njust executed run with your privileges.\n\nThis sort of behavior has been known to [lead to privilege escalation] when\nused incorrectly.\n\n[lead to privilege escalation]: https://securityvulns.com/Wdocument183.html\n\n# Examples\n\n```\nuse std::env;\n\nmatch env::current_exe() {\n Ok(exe_path) => println!(\"Path of this executable is: {}\",\n exe_path.display()),\n Err(e) => println!(\"failed to get current exe path: {e}\"),\n};\n```",
- "id": 1804,
+ "id": 1802,
"inner": {
"function": {
"generics": {
@@ -199979,7 +218479,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "crate::path::PathBuf"
}
}
@@ -199988,7 +218488,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -199999,18 +218499,18 @@
"name": "current_exe",
"span": {
"begin": [
- 758,
+ 750,
1
],
"end": [
- 760,
+ 752,
2
],
"filename": "std/src/env.rs"
},
"visibility": "public"
},
- "1806": {
+ "1804": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -200019,7 +218519,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Returns the arguments that this program was started with (normally passed\nvia the command line).\n\nThe first element is traditionally the path of the executable, but it can be\nset to arbitrary text, and might not even exist. This means this property should\nnot be relied upon for security purposes.\n\nOn Unix systems the shell usually expands unquoted arguments with glob patterns\n(such as `*` and `?`). On Windows this is not done, and such arguments are\npassed as-is.\n\nOn glibc Linux systems, arguments are retrieved by placing a function in `.init_array`.\nglibc passes `argc`, `argv`, and `envp` to functions in `.init_array`, as a non-standard\nextension. This allows `std::env::args` to work even in a `cdylib` or `staticlib`, as it\ndoes on macOS and Windows.\n\n# Panics\n\nThe returned iterator will panic during iteration if any argument to the\nprocess is not valid Unicode. If this is not desired,\nuse the [`args_os`] function instead.\n\n# Examples\n\n```\nuse std::env;\n\n// Prints each argument on a separate line\nfor argument in env::args() {\n println!(\"{argument}\");\n}\n```",
- "id": 1806,
+ "id": 1804,
"inner": {
"function": {
"generics": {
@@ -200039,7 +218539,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 1807,
+ "id": 1805,
"path": "Args"
}
}
@@ -200047,23 +218547,23 @@
}
},
"links": {
- "`args_os`": 1834
+ "`args_os`": 1832
},
"name": "args",
"span": {
"begin": [
- 829,
+ 821,
1
],
"end": [
- 831,
+ 823,
2
],
"filename": "std/src/env.rs"
},
"visibility": "public"
},
- "1807": {
+ "1805": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -200077,7 +218577,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "An iterator over the arguments of a process, yielding a [`String`] value for\neach argument.\n\nThis struct is created by [`env::args()`]. See its documentation\nfor more.\n\nThe first element is traditionally the path of the executable, but it can be\nset to arbitrary text, and might not even exist. This means this property\nshould not be relied upon for security purposes.\n\n[`env::args()`]: args",
- "id": 1807,
+ "id": 1805,
"inner": {
"struct": {
"generics": {
@@ -200085,6 +218585,8 @@
"where_predicates": []
},
"impls": [
+ 1806,
+ 1807,
1808,
1809,
1810,
@@ -200097,12 +218599,10 @@
1817,
1818,
1819,
- 1820,
- 1821,
- 1825,
+ 1823,
+ 1826,
1828,
- 1830,
- 1832
+ 1830
],
"kind": {
"plain": {
@@ -200113,23 +218613,97 @@
}
},
"links": {
- "`String`": 161,
- "args": 1806
+ "`String`": 159,
+ "args": 1804
},
"name": "Args",
"span": {
"begin": [
- 775,
+ 767,
1
],
"end": [
- 777,
+ 769,
2
],
"filename": "std/src/env.rs"
},
"visibility": "public"
},
+ "1806": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1806,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "resolved_path": {
+ "args": null,
+ "id": 1805,
+ "path": "Args"
+ }
+ },
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": true,
+ "is_unsafe": false,
+ "items": [],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 313,
+ "path": "Freeze"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": null,
+ "visibility": "default"
+ },
+ "1807": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 1807,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "resolved_path": {
+ "args": null,
+ "id": 1805,
+ "path": "Args"
+ }
+ },
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": true,
+ "is_unsafe": false,
+ "items": [],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": null,
+ "id": 7,
+ "path": "Unpin"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": null,
+ "visibility": "default"
+ },
"1808": {
"attrs": [],
"crate_id": 0,
@@ -200142,7 +218716,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1807,
+ "id": 1805,
"path": "Args"
}
},
@@ -200157,8 +218731,8 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
- "path": "Freeze"
+ "id": 316,
+ "path": "UnwindSafe"
}
}
},
@@ -200179,44 +218753,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1807,
- "path": "Args"
- }
- },
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "is_negative": false,
- "is_synthetic": true,
- "is_unsafe": false,
- "items": [],
- "provided_trait_methods": [],
- "trait": {
- "args": null,
- "id": 7,
- "path": "Unpin"
- }
- }
- },
- "links": {},
- "name": null,
- "span": null,
- "visibility": "default"
- },
- "1810": {
- "attrs": [],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 1810,
- "inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "resolved_path": {
- "args": null,
- "id": 1807,
+ "id": 1805,
"path": "Args"
}
},
@@ -200232,43 +218769,6 @@
"trait": {
"args": null,
"id": 318,
- "path": "UnwindSafe"
- }
- }
- },
- "links": {},
- "name": null,
- "span": null,
- "visibility": "default"
- },
- "1811": {
- "attrs": [],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 1811,
- "inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "resolved_path": {
- "args": null,
- "id": 1807,
- "path": "Args"
- }
- },
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "is_negative": false,
- "is_synthetic": true,
- "is_unsafe": false,
- "items": [],
- "provided_trait_methods": [],
- "trait": {
- "args": null,
- "id": 320,
"path": "RefUnwindSafe"
}
}
@@ -200278,12 +218778,12 @@
"span": null,
"visibility": "default"
},
- "1812": {
+ "1810": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1812,
+ "id": 1810,
"inner": {
"impl": {
"blanket_impl": {
@@ -200292,7 +218792,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1807,
+ "id": 1805,
"path": "Args"
}
},
@@ -200337,7 +218837,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -200353,7 +218853,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -200362,23 +218862,23 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1813": {
+ "1811": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1813,
+ "id": 1811,
"inner": {
"impl": {
"blanket_impl": {
@@ -200387,7 +218887,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1807,
+ "id": 1805,
"path": "Args"
}
},
@@ -200432,7 +218932,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -200448,7 +218948,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -200457,23 +218957,23 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1814": {
+ "1812": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1814,
+ "id": 1812,
"inner": {
"impl": {
"blanket_impl": {
@@ -200482,7 +218982,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1807,
+ "id": 1805,
"path": "Args"
}
},
@@ -200548,7 +219048,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -200573,23 +219073,23 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1815": {
+ "1813": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1815,
+ "id": 1813,
"inner": {
"impl": {
"blanket_impl": {
@@ -200598,7 +219098,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1807,
+ "id": 1805,
"path": "Args"
}
},
@@ -200621,7 +219121,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -200646,23 +219146,23 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1816": {
+ "1814": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1816,
+ "id": 1814,
"inner": {
"impl": {
"blanket_impl": {
@@ -200671,7 +219171,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1807,
+ "id": 1805,
"path": "Args"
}
},
@@ -200719,7 +219219,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -200737,8 +219237,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -200754,7 +219254,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -200763,23 +219263,23 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1817": {
+ "1815": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1817,
+ "id": 1815,
"inner": {
"impl": {
"blanket_impl": {
@@ -200788,7 +219288,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1807,
+ "id": 1805,
"path": "Args"
}
},
@@ -200854,8 +219354,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -200871,7 +219371,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -200880,23 +219380,23 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1818": {
+ "1816": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1818,
+ "id": 1816,
"inner": {
"impl": {
"blanket_impl": {
@@ -200905,7 +219405,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1807,
+ "id": 1805,
"path": "Args"
}
},
@@ -200953,12 +219453,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -200978,12 +219478,12 @@
},
"visibility": "default"
},
- "1819": {
+ "1817": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1819,
+ "id": 1817,
"inner": {
"impl": {
"blanket_impl": {
@@ -200992,7 +219492,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1807,
+ "id": 1805,
"path": "Args"
}
},
@@ -201064,44 +219564,7 @@
},
"visibility": "default"
},
- "182": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": "The I/O Prelude.\n\nThe purpose of this module is to alleviate imports of many common I/O traits\nby adding a glob import to the top of I/O heavy modules:\n\n```\n# #![allow(unused_imports)]\nuse std::io::prelude::*;\n```",
- "id": 182,
- "inner": {
- "module": {
- "is_crate": false,
- "is_stripped": false,
- "items": [
- 3550,
- 3551,
- 3552,
- 3553
- ]
- }
- },
- "links": {},
- "name": "prelude",
- "span": {
- "begin": [
- 1,
- 1
- ],
- "end": [
- 14,
- 45
- ],
- "filename": "std/src/io/prelude.rs"
- },
- "visibility": "public"
- },
- "1820": {
+ "1818": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 26, patch: 0})}, feature: \"env_unimpl_send_sync\"}}]"
@@ -201110,14 +219573,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1820,
+ "id": 1818,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1807,
+ "id": 1805,
"path": "Args"
}
},
@@ -201141,18 +219604,18 @@
"name": null,
"span": {
"begin": [
- 869,
+ 861,
1
],
"end": [
- 869,
+ 861,
23
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1821": {
+ "1819": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 26, patch: 0})}, feature: \"env_unimpl_send_sync\"}}]"
@@ -201161,14 +219624,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1821,
+ "id": 1819,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1807,
+ "id": 1805,
"path": "Args"
}
},
@@ -201192,23 +219655,23 @@
"name": null,
"span": {
"begin": [
- 872,
+ 864,
1
],
"end": [
- 872,
+ 864,
23
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1822": {
+ "1820": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1822,
+ "id": 1820,
"inner": {
"assoc_type": {
"bounds": [],
@@ -201219,7 +219682,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 161,
+ "id": 159,
"path": "String"
}
}
@@ -201229,23 +219692,23 @@
"name": "Item",
"span": {
"begin": [
- 876,
+ 868,
5
],
"end": [
- 876,
+ 868,
24
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1823": {
+ "1821": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1823,
+ "id": 1821,
"inner": {
"function": {
"generics": {
@@ -201284,7 +219747,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 161,
+ "id": 159,
"path": "String"
}
}
@@ -201304,18 +219767,18 @@
"name": "next",
"span": {
"begin": [
- 878,
+ 870,
5
],
"end": [
- 880,
+ 872,
6
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1824": {
+ "1822": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -201324,7 +219787,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1824,
+ "id": 1822,
"inner": {
"function": {
"generics": {
@@ -201386,18 +219849,18 @@
"name": "size_hint",
"span": {
"begin": [
- 883,
+ 875,
5
],
"end": [
- 885,
+ 877,
6
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1825": {
+ "1823": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -201406,14 +219869,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1825,
+ "id": 1823,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1807,
+ "id": 1805,
"path": "Args"
}
},
@@ -201425,9 +219888,9 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1822,
- 1823,
- 1824
+ 1820,
+ 1821,
+ 1822
],
"provided_trait_methods": [
"next_chunk",
@@ -201518,18 +219981,18 @@
"name": null,
"span": {
"begin": [
- 875,
+ 867,
1
],
"end": [
- 897,
+ 889,
2
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1826": {
+ "1824": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -201538,7 +220001,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1826,
+ "id": 1824,
"inner": {
"function": {
"generics": {
@@ -201578,18 +220041,18 @@
"name": "len",
"span": {
"begin": [
- 902,
+ 894,
5
],
"end": [
- 904,
+ 896,
6
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1827": {
+ "1825": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -201598,7 +220061,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1827,
+ "id": 1825,
"inner": {
"function": {
"generics": {
@@ -201638,18 +220101,18 @@
"name": "is_empty",
"span": {
"begin": [
- 907,
+ 899,
5
],
"end": [
- 909,
+ 901,
6
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1828": {
+ "1826": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -201658,14 +220121,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1828,
+ "id": 1826,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1807,
+ "id": 1805,
"path": "Args"
}
},
@@ -201677,8 +220140,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1826,
- 1827
+ 1824,
+ 1825
],
"provided_trait_methods": [
"len",
@@ -201695,23 +220158,23 @@
"name": null,
"span": {
"begin": [
- 900,
+ 892,
1
],
"end": [
- 910,
+ 902,
2
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1829": {
+ "1827": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1829,
+ "id": 1827,
"inner": {
"function": {
"generics": {
@@ -201750,7 +220213,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 161,
+ "id": 159,
"path": "String"
}
}
@@ -201770,18 +220233,18 @@
"name": "next_back",
"span": {
"begin": [
- 914,
+ 906,
5
],
"end": [
- 916,
+ 908,
6
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1830": {
+ "1828": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 12, patch: 0})}, feature: \"env_iterators\"}}]"
@@ -201790,14 +220253,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1830,
+ "id": 1828,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1807,
+ "id": 1805,
"path": "Args"
}
},
@@ -201809,7 +220272,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1829
+ 1827
],
"provided_trait_methods": [
"advance_back_by",
@@ -201829,23 +220292,23 @@
"name": null,
"span": {
"begin": [
- 913,
+ 905,
1
],
"end": [
- 917,
+ 909,
2
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1831": {
+ "1829": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1831,
+ "id": 1829,
"inner": {
"function": {
"generics": {
@@ -201891,7 +220354,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -201903,7 +220366,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -201914,18 +220377,18 @@
"name": "fmt",
"span": {
"begin": [
- 921,
+ 913,
5
],
"end": [
- 924,
+ 916,
6
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1832": {
+ "1830": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 16, patch: 0})}, feature: \"std_debug\"}}]"
@@ -201934,14 +220397,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1832,
+ "id": 1830,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1807,
+ "id": 1805,
"path": "Args"
}
},
@@ -201953,12 +220416,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1831
+ 1829
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -201967,18 +220430,18 @@
"name": null,
"span": {
"begin": [
- 920,
+ 912,
1
],
"end": [
- 925,
+ 917,
2
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1834": {
+ "1832": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -201987,7 +220450,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Returns the arguments that this program was started with (normally passed\nvia the command line).\n\nThe first element is traditionally the path of the executable, but it can be\nset to arbitrary text, and might not even exist. This means this property should\nnot be relied upon for security purposes.\n\nOn Unix systems the shell usually expands unquoted arguments with glob patterns\n(such as `*` and `?`). On Windows this is not done, and such arguments are\npassed as-is.\n\nOn glibc Linux systems, arguments are retrieved by placing a function in `.init_array`.\nglibc passes `argc`, `argv`, and `envp` to functions in `.init_array`, as a non-standard\nextension. This allows `std::env::args_os` to work even in a `cdylib` or `staticlib`, as it\ndoes on macOS and Windows.\n\nNote that the returned iterator will not check if the arguments to the\nprocess are valid Unicode. If you want to panic on invalid UTF-8,\nuse the [`args`] function instead.\n\n# Examples\n\n```\nuse std::env;\n\n// Prints each argument on a separate line\nfor argument in env::args_os() {\n println!(\"{argument:?}\");\n}\n```",
- "id": 1834,
+ "id": 1832,
"inner": {
"function": {
"generics": {
@@ -202007,7 +220470,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 1835,
+ "id": 1833,
"path": "ArgsOs"
}
}
@@ -202015,23 +220478,23 @@
}
},
"links": {
- "`args`": 1806
+ "`args`": 1804
},
"name": "args_os",
"span": {
"begin": [
- 864,
+ 856,
1
],
"end": [
- 866,
+ 858,
2
],
"filename": "std/src/env.rs"
},
"visibility": "public"
},
- "1835": {
+ "1833": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -202045,7 +220508,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "An iterator over the arguments of a process, yielding an [`OsString`] value\nfor each argument.\n\nThis struct is created by [`env::args_os()`]. See its documentation\nfor more.\n\nThe first element is traditionally the path of the executable, but it can be\nset to arbitrary text, and might not even exist. This means this property\nshould not be relied upon for security purposes.\n\n[`env::args_os()`]: args_os",
- "id": 1835,
+ "id": 1833,
"inner": {
"struct": {
"generics": {
@@ -202053,6 +220516,8 @@
"where_predicates": []
},
"impls": [
+ 1834,
+ 1835,
1836,
1837,
1838,
@@ -202065,12 +220530,10 @@
1845,
1846,
1847,
- 1848,
- 1849,
- 1861,
- 1864,
- 1867,
- 1869
+ 1859,
+ 1862,
+ 1865,
+ 1867
],
"kind": {
"plain": {
@@ -202081,36 +220544,36 @@
}
},
"links": {
- "`OsString`": 1709,
- "args_os": 1834
+ "`OsString`": 1708,
+ "args_os": 1832
},
"name": "ArgsOs",
"span": {
"begin": [
- 792,
+ 784,
1
],
"end": [
- 794,
+ 786,
2
],
"filename": "std/src/env.rs"
},
"visibility": "public"
},
- "1836": {
+ "1834": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1836,
+ "id": 1834,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1835,
+ "id": 1833,
"path": "ArgsOs"
}
},
@@ -202125,7 +220588,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -202135,19 +220598,19 @@
"span": null,
"visibility": "default"
},
- "1837": {
+ "1835": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1837,
+ "id": 1835,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1835,
+ "id": 1833,
"path": "ArgsOs"
}
},
@@ -202172,19 +220635,19 @@
"span": null,
"visibility": "default"
},
- "1838": {
+ "1836": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1838,
+ "id": 1836,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1835,
+ "id": 1833,
"path": "ArgsOs"
}
},
@@ -202199,7 +220662,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -202209,19 +220672,19 @@
"span": null,
"visibility": "default"
},
- "1839": {
+ "1837": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1839,
+ "id": 1837,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1835,
+ "id": 1833,
"path": "ArgsOs"
}
},
@@ -202236,7 +220699,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -202246,12 +220709,12 @@
"span": null,
"visibility": "default"
},
- "1840": {
+ "1838": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1840,
+ "id": 1838,
"inner": {
"impl": {
"blanket_impl": {
@@ -202260,7 +220723,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1835,
+ "id": 1833,
"path": "ArgsOs"
}
},
@@ -202305,7 +220768,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -202321,7 +220784,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -202330,23 +220793,23 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1841": {
+ "1839": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1841,
+ "id": 1839,
"inner": {
"impl": {
"blanket_impl": {
@@ -202355,7 +220818,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1835,
+ "id": 1833,
"path": "ArgsOs"
}
},
@@ -202400,7 +220863,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -202416,7 +220879,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -202425,23 +220888,23 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1842": {
+ "1840": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1842,
+ "id": 1840,
"inner": {
"impl": {
"blanket_impl": {
@@ -202450,7 +220913,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1835,
+ "id": 1833,
"path": "ArgsOs"
}
},
@@ -202516,7 +220979,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -202541,23 +221004,23 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1843": {
+ "1841": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1843,
+ "id": 1841,
"inner": {
"impl": {
"blanket_impl": {
@@ -202566,7 +221029,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1835,
+ "id": 1833,
"path": "ArgsOs"
}
},
@@ -202589,7 +221052,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -202614,23 +221077,23 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1844": {
+ "1842": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1844,
+ "id": 1842,
"inner": {
"impl": {
"blanket_impl": {
@@ -202639,7 +221102,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1835,
+ "id": 1833,
"path": "ArgsOs"
}
},
@@ -202687,7 +221150,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -202705,8 +221168,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -202722,7 +221185,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -202731,23 +221194,23 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1845": {
+ "1843": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1845,
+ "id": 1843,
"inner": {
"impl": {
"blanket_impl": {
@@ -202756,7 +221219,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1835,
+ "id": 1833,
"path": "ArgsOs"
}
},
@@ -202822,8 +221285,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -202839,7 +221302,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -202848,23 +221311,23 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1846": {
+ "1844": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1846,
+ "id": 1844,
"inner": {
"impl": {
"blanket_impl": {
@@ -202873,7 +221336,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1835,
+ "id": 1833,
"path": "ArgsOs"
}
},
@@ -202921,12 +221384,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -202946,12 +221409,12 @@
},
"visibility": "default"
},
- "1847": {
+ "1845": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1847,
+ "id": 1845,
"inner": {
"impl": {
"blanket_impl": {
@@ -202960,7 +221423,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1835,
+ "id": 1833,
"path": "ArgsOs"
}
},
@@ -203032,7 +221495,7 @@
},
"visibility": "default"
},
- "1848": {
+ "1846": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 26, patch: 0})}, feature: \"env_unimpl_send_sync\"}}]"
@@ -203041,14 +221504,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1848,
+ "id": 1846,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1835,
+ "id": 1833,
"path": "ArgsOs"
}
},
@@ -203072,18 +221535,18 @@
"name": null,
"span": {
"begin": [
- 928,
+ 920,
1
],
"end": [
- 928,
+ 920,
25
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1849": {
+ "1847": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 26, patch: 0})}, feature: \"env_unimpl_send_sync\"}}]"
@@ -203092,14 +221555,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1849,
+ "id": 1847,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1835,
+ "id": 1833,
"path": "ArgsOs"
}
},
@@ -203123,23 +221586,23 @@
"name": null,
"span": {
"begin": [
- 931,
+ 923,
1
],
"end": [
- 931,
+ 923,
25
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1850": {
+ "1848": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1850,
+ "id": 1848,
"inner": {
"assoc_type": {
"bounds": [],
@@ -203150,7 +221613,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -203160,18 +221623,18 @@
"name": "Item",
"span": {
"begin": [
- 935,
+ 927,
5
],
"end": [
- 935,
+ 927,
26
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1851": {
+ "1849": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -203180,7 +221643,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1851,
+ "id": 1849,
"inner": {
"function": {
"generics": {
@@ -203219,7 +221682,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -203239,18 +221702,18 @@
"name": "next",
"span": {
"begin": [
- 938,
+ 930,
5
],
"end": [
- 940,
+ 932,
6
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1852": {
+ "1850": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -203259,7 +221722,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1852,
+ "id": 1850,
"inner": {
"function": {
"generics": {
@@ -203313,7 +221776,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -203330,7 +221793,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -203346,7 +221809,7 @@
"constraints": []
}
},
- "id": 1853,
+ "id": 1851,
"path": "array::IntoIter"
}
}
@@ -203366,18 +221829,18 @@
"name": "next_chunk",
"span": {
"begin": [
- 943,
+ 935,
5
],
"end": [
- 947,
+ 939,
6
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1854": {
+ "1852": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -203386,7 +221849,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1854,
+ "id": 1852,
"inner": {
"function": {
"generics": {
@@ -203448,18 +221911,18 @@
"name": "size_hint",
"span": {
"begin": [
- 950,
+ 942,
5
],
"end": [
- 952,
+ 944,
6
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1855": {
+ "1853": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -203468,7 +221931,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1855,
+ "id": 1853,
"inner": {
"function": {
"generics": {
@@ -203502,18 +221965,18 @@
"name": "count",
"span": {
"begin": [
- 955,
+ 947,
5
],
"end": [
- 957,
+ 949,
6
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1856": {
+ "1854": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -203522,7 +221985,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1856,
+ "id": 1854,
"inner": {
"function": {
"generics": {
@@ -203555,7 +222018,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -203575,18 +222038,18 @@
"name": "last",
"span": {
"begin": [
- 960,
+ 952,
5
],
"end": [
- 962,
+ 954,
6
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1857": {
+ "1855": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -203595,7 +222058,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1857,
+ "id": 1855,
"inner": {
"function": {
"generics": {
@@ -203676,18 +222139,18 @@
"name": "advance_by",
"span": {
"begin": [
- 965,
+ 957,
5
],
"end": [
- 967,
+ 959,
6
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1858": {
+ "1856": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -203696,7 +222159,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1858,
+ "id": 1856,
"inner": {
"function": {
"generics": {
@@ -203805,7 +222268,7 @@
]
}
},
- "id": 1859,
+ "id": 1857,
"path": "Try"
}
}
@@ -203864,18 +222327,18 @@
"name": "try_fold",
"span": {
"begin": [
- 970,
+ 962,
5
],
"end": [
- 976,
+ 968,
6
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1860": {
+ "1858": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -203884,7 +222347,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1860,
+ "id": 1858,
"inner": {
"function": {
"generics": {
@@ -203998,18 +222461,18 @@
"name": "fold",
"span": {
"begin": [
- 979,
+ 971,
5
],
"end": [
- 984,
+ 976,
6
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1861": {
+ "1859": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -204018,14 +222481,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1861,
+ "id": 1859,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1835,
+ "id": 1833,
"path": "ArgsOs"
}
},
@@ -204037,15 +222500,15 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 1848,
+ 1849,
1850,
- 1851,
1852,
+ 1853,
1854,
1855,
1856,
- 1857,
- 1858,
- 1860
+ 1858
],
"provided_trait_methods": [
"next_chunk",
@@ -204136,18 +222599,18 @@
"name": null,
"span": {
"begin": [
- 934,
+ 926,
1
],
"end": [
- 985,
+ 977,
2
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1862": {
+ "1860": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -204156,7 +222619,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1862,
+ "id": 1860,
"inner": {
"function": {
"generics": {
@@ -204196,18 +222659,18 @@
"name": "len",
"span": {
"begin": [
- 990,
+ 982,
5
],
"end": [
- 992,
+ 984,
6
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1863": {
+ "1861": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -204216,7 +222679,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1863,
+ "id": 1861,
"inner": {
"function": {
"generics": {
@@ -204256,18 +222719,18 @@
"name": "is_empty",
"span": {
"begin": [
- 995,
+ 987,
5
],
"end": [
- 997,
+ 989,
6
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1864": {
+ "1862": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -204276,14 +222739,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1864,
+ "id": 1862,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1835,
+ "id": 1833,
"path": "ArgsOs"
}
},
@@ -204295,8 +222758,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1862,
- 1863
+ 1860,
+ 1861
],
"provided_trait_methods": [
"len",
@@ -204313,18 +222776,18 @@
"name": null,
"span": {
"begin": [
- 988,
+ 980,
1
],
"end": [
- 998,
+ 990,
2
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1865": {
+ "1863": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -204333,7 +222796,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1865,
+ "id": 1863,
"inner": {
"function": {
"generics": {
@@ -204372,7 +222835,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -204392,18 +222855,18 @@
"name": "next_back",
"span": {
"begin": [
- 1003,
+ 995,
5
],
"end": [
- 1005,
+ 997,
6
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1866": {
+ "1864": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -204412,7 +222875,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1866,
+ "id": 1864,
"inner": {
"function": {
"generics": {
@@ -204493,18 +222956,18 @@
"name": "advance_back_by",
"span": {
"begin": [
- 1008,
+ 1000,
5
],
"end": [
- 1010,
+ 1002,
6
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1867": {
+ "1865": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 12, patch: 0})}, feature: \"env_iterators\"}}]"
@@ -204513,14 +222976,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1867,
+ "id": 1865,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1835,
+ "id": 1833,
"path": "ArgsOs"
}
},
@@ -204532,8 +222995,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1865,
- 1866
+ 1863,
+ 1864
],
"provided_trait_methods": [
"advance_back_by",
@@ -204553,23 +223016,23 @@
"name": null,
"span": {
"begin": [
- 1001,
+ 993,
1
],
"end": [
- 1011,
+ 1003,
2
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1868": {
+ "1866": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1868,
+ "id": 1866,
"inner": {
"function": {
"generics": {
@@ -204615,7 +223078,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -204627,7 +223090,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -204638,18 +223101,18 @@
"name": "fmt",
"span": {
"begin": [
- 1015,
+ 1007,
5
],
"end": [
- 1018,
+ 1010,
6
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1869": {
+ "1867": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 16, patch: 0})}, feature: \"std_debug\"}}]"
@@ -204658,14 +223121,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1869,
+ "id": 1867,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1835,
+ "id": 1833,
"path": "ArgsOs"
}
},
@@ -204677,12 +223140,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1868
+ 1866
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -204691,18 +223154,18 @@
"name": null,
"span": {
"begin": [
- 1014,
+ 1006,
1
],
"end": [
- 1019,
+ 1011,
2
],
"filename": "std/src/env.rs"
},
"visibility": "default"
},
- "1870": {
+ "1868": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"env\"}}]"
@@ -204711,41 +223174,41 @@
"crate_id": 0,
"deprecation": null,
"docs": "Inspection and manipulation of the process's environment.\n\nThis module contains functions to inspect various aspects such as\nenvironment variables, process arguments, the current directory, and various\nother important directories.\n\nThere are several functions and structs in this module that have a\ncounterpart ending in `os`. Those ending in `os` will return an [`OsString`]\nand those without will return a [`String`].",
- "id": 1870,
+ "id": 1868,
"inner": {
"module": {
"is_crate": false,
"is_stripped": false,
"items": [
- 1663,
+ 1662,
+ 1664,
1665,
- 1666,
- 1670,
- 1693,
1669,
1692,
- 1718,
+ 1668,
+ 1691,
1717,
- 1719,
- 1753,
+ 1716,
+ 1718,
+ 1751,
+ 1754,
1756,
- 1758,
- 1721,
- 1781,
+ 1720,
1779,
+ 1777,
+ 1800,
+ 1801,
1802,
- 1803,
+ 1805,
+ 1833,
1804,
- 1807,
- 1835,
- 1806,
- 1834
+ 1832
]
}
},
"links": {
- "`OsString`": 1709,
- "`String`": 161
+ "`OsString`": 1708,
+ "`String`": 159
},
"name": "env",
"span": {
@@ -204754,14 +223217,14 @@
1
],
"end": [
- 1170,
+ 1164,
2
],
"filename": "std/src/env.rs"
},
"visibility": "public"
},
- "1871": {
+ "1869": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -204770,7 +223233,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1871,
+ "id": 1869,
"inner": {
"use": {
"id": 450,
@@ -204794,7 +223257,7 @@
},
"visibility": "public"
},
- "1872": {
+ "1870": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 99301, is_soft: false}, feature: \"error_generic_member_access\"}}]"
@@ -204803,10 +223266,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1872,
+ "id": 1870,
"inner": {
"use": {
- "id": 1873,
+ "id": 1871,
"is_glob": false,
"name": "Request",
"source": "core::error::Request"
@@ -204827,7 +223290,7 @@
},
"visibility": "public"
},
- "1874": {
+ "1872": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 99301, is_soft: false}, feature: \"error_generic_member_access\"}}]"
@@ -204836,10 +223299,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1874,
+ "id": 1872,
"inner": {
"use": {
- "id": 1875,
+ "id": 1873,
"is_glob": false,
"name": "request_ref",
"source": "core::error::request_ref"
@@ -204860,7 +223323,7 @@
},
"visibility": "public"
},
- "1876": {
+ "1874": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 99301, is_soft: false}, feature: \"error_generic_member_access\"}}]"
@@ -204869,10 +223332,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1876,
+ "id": 1874,
"inner": {
"use": {
- "id": 1877,
+ "id": 1875,
"is_glob": false,
"name": "request_value",
"source": "core::error::request_value"
@@ -204893,7 +223356,7 @@
},
"visibility": "public"
},
- "1882": {
+ "1880": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 90172, is_soft: false}, feature: \"error_reporter\"}}]"
@@ -204902,7 +223365,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "An error reporter that prints an error and its sources.\n\nReport also exposes configuration options for formatting the error sources, either entirely on a\nsingle line, or in multi-line format with each source on a new line.\n\n`Report` only requires that the wrapped error implement `Error`. It doesn't require that the\nwrapped error be `Send`, `Sync`, or `'static`.\n\n# Examples\n\n```rust\n#![feature(error_reporter)]\nuse std::error::{Error, Report};\nuse std::fmt;\n\n#[derive(Debug)]\nstruct SuperError {\n source: SuperErrorSideKick,\n}\n\nimpl fmt::Display for SuperError {\n fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n write!(f, \"SuperError is here!\")\n }\n}\n\nimpl Error for SuperError {\n fn source(&self) -> Option<&(dyn Error + 'static)> {\n Some(&self.source)\n }\n}\n\n#[derive(Debug)]\nstruct SuperErrorSideKick;\n\nimpl fmt::Display for SuperErrorSideKick {\n fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n write!(f, \"SuperErrorSideKick is here!\")\n }\n}\n\nimpl Error for SuperErrorSideKick {}\n\nfn get_super_error() -> Result<(), SuperError> {\n Err(SuperError { source: SuperErrorSideKick })\n}\n\nfn main() {\n match get_super_error() {\n Err(e) => println!(\"Error: {}\", Report::new(e)),\n _ => println!(\"No error\"),\n }\n}\n```\n\nThis example produces the following output:\n\n```console\nError: SuperError is here!: SuperErrorSideKick is here!\n```\n\n## Output consistency\n\nReport prints the same output via `Display` and `Debug`, so it works well with\n[`Result::unwrap`]/[`Result::expect`] which print their `Err` variant via `Debug`:\n\n```should_panic\n#![feature(error_reporter)]\nuse std::error::Report;\n# use std::error::Error;\n# use std::fmt;\n# #[derive(Debug)]\n# struct SuperError {\n# source: SuperErrorSideKick,\n# }\n# impl fmt::Display for SuperError {\n# fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n# write!(f, \"SuperError is here!\")\n# }\n# }\n# impl Error for SuperError {\n# fn source(&self) -> Option<&(dyn Error + 'static)> {\n# Some(&self.source)\n# }\n# }\n# #[derive(Debug)]\n# struct SuperErrorSideKick;\n# impl fmt::Display for SuperErrorSideKick {\n# fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n# write!(f, \"SuperErrorSideKick is here!\")\n# }\n# }\n# impl Error for SuperErrorSideKick {}\n# fn get_super_error() -> Result<(), SuperError> {\n# Err(SuperError { source: SuperErrorSideKick })\n# }\n\nget_super_error().map_err(Report::new).unwrap();\n```\n\nThis example produces the following output:\n\n```console\nthread 'main' panicked at src/error.rs:34:40:\ncalled `Result::unwrap()` on an `Err` value: SuperError is here!: SuperErrorSideKick is here!\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n```\n\n## Return from `main`\n\n`Report` also implements `From` for all types that implement [`Error`]; this when combined with\nthe `Debug` output means `Report` is an ideal starting place for formatting errors returned\nfrom `main`.\n\n```should_panic\n#![feature(error_reporter)]\nuse std::error::Report;\n# use std::error::Error;\n# use std::fmt;\n# #[derive(Debug)]\n# struct SuperError {\n# source: SuperErrorSideKick,\n# }\n# impl fmt::Display for SuperError {\n# fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n# write!(f, \"SuperError is here!\")\n# }\n# }\n# impl Error for SuperError {\n# fn source(&self) -> Option<&(dyn Error + 'static)> {\n# Some(&self.source)\n# }\n# }\n# #[derive(Debug)]\n# struct SuperErrorSideKick;\n# impl fmt::Display for SuperErrorSideKick {\n# fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n# write!(f, \"SuperErrorSideKick is here!\")\n# }\n# }\n# impl Error for SuperErrorSideKick {}\n# fn get_super_error() -> Result<(), SuperError> {\n# Err(SuperError { source: SuperErrorSideKick })\n# }\n\nfn main() -> Result<(), Report> {\n get_super_error()?;\n Ok(())\n}\n```\n\nThis example produces the following output:\n\n```console\nError: SuperError is here!: SuperErrorSideKick is here!\n```\n\n**Note**: `Report`s constructed via `?` and `From` will be configured to use the single line\noutput format. If you want to make sure your `Report`s are pretty printed and include backtrace\nyou will need to manually convert and enable those flags.\n\n```should_panic\n#![feature(error_reporter)]\nuse std::error::Report;\n# use std::error::Error;\n# use std::fmt;\n# #[derive(Debug)]\n# struct SuperError {\n# source: SuperErrorSideKick,\n# }\n# impl fmt::Display for SuperError {\n# fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n# write!(f, \"SuperError is here!\")\n# }\n# }\n# impl Error for SuperError {\n# fn source(&self) -> Option<&(dyn Error + 'static)> {\n# Some(&self.source)\n# }\n# }\n# #[derive(Debug)]\n# struct SuperErrorSideKick;\n# impl fmt::Display for SuperErrorSideKick {\n# fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n# write!(f, \"SuperErrorSideKick is here!\")\n# }\n# }\n# impl Error for SuperErrorSideKick {}\n# fn get_super_error() -> Result<(), SuperError> {\n# Err(SuperError { source: SuperErrorSideKick })\n# }\n\nfn main() -> Result<(), Report> {\n get_super_error()\n .map_err(Report::from)\n .map_err(|r| r.pretty(true).show_backtrace(true))?;\n Ok(())\n}\n```\n\nThis example produces the following output:\n\n```console\nError: SuperError is here!\n\nCaused by:\n SuperErrorSideKick is here!\n```",
- "id": 1882,
+ "id": 1880,
"inner": {
"struct": {
"generics": {
@@ -204937,7 +223400,7 @@
"constraints": []
}
},
- "id": 159,
+ "id": 157,
"path": "Box"
}
},
@@ -204950,7 +223413,9 @@
"where_predicates": []
},
"impls": [
- 1884,
+ 1882,
+ 1885,
+ 1886,
1887,
1888,
1889,
@@ -204960,16 +223425,14 @@
1893,
1894,
1895,
- 1896,
1897,
+ 1898,
1899,
1900,
1901,
- 1902,
1903,
1905,
- 1907,
- 1909
+ 1907
],
"kind": {
"plain": {
@@ -204981,8 +223444,8 @@
},
"links": {
"`Error`": 450,
- "`Result::expect`": 1881,
- "`Result::unwrap`": 470
+ "`Result::expect`": 1879,
+ "`Result::unwrap`": 471
},
"name": "Report",
"span": {
@@ -204998,7 +223461,7 @@
},
"visibility": "public"
},
- "1883": {
+ "1881": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 90172, is_soft: false}, feature: \"error_reporter\"}}]"
@@ -205007,7 +223470,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Creates a new `Report` from an input error.",
- "id": 1883,
+ "id": 1881,
"inner": {
"function": {
"generics": {
@@ -205045,7 +223508,7 @@
"constraints": []
}
},
- "id": 1882,
+ "id": 1880,
"path": "Report"
}
}
@@ -205067,12 +223530,12 @@
},
"visibility": "public"
},
- "1884": {
+ "1882": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1884,
+ "id": 1882,
"inner": {
"impl": {
"blanket_impl": null,
@@ -205090,7 +223553,7 @@
"constraints": []
}
},
- "id": 1882,
+ "id": 1880,
"path": "Report"
}
},
@@ -205149,7 +223612,7 @@
"constraints": []
}
},
- "id": 1882,
+ "id": 1880,
"path": "Report"
}
}
@@ -205161,7 +223624,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1883
+ 1881
],
"provided_trait_methods": [],
"trait": null
@@ -205182,7 +223645,7 @@
},
"visibility": "default"
},
- "1885": {
+ "1883": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 90172, is_soft: false}, feature: \"error_reporter\"}}]"
@@ -205191,7 +223654,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Enable pretty-printing the report across multiple lines.\n\n# Examples\n\n```rust\n#![feature(error_reporter)]\nuse std::error::Report;\n# use std::error::Error;\n# use std::fmt;\n# #[derive(Debug)]\n# struct SuperError {\n# source: SuperErrorSideKick,\n# }\n# impl fmt::Display for SuperError {\n# fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n# write!(f, \"SuperError is here!\")\n# }\n# }\n# impl Error for SuperError {\n# fn source(&self) -> Option<&(dyn Error + 'static)> {\n# Some(&self.source)\n# }\n# }\n# #[derive(Debug)]\n# struct SuperErrorSideKick;\n# impl fmt::Display for SuperErrorSideKick {\n# fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n# write!(f, \"SuperErrorSideKick is here!\")\n# }\n# }\n# impl Error for SuperErrorSideKick {}\n\nlet error = SuperError { source: SuperErrorSideKick };\nlet report = Report::new(error).pretty(true);\neprintln!(\"Error: {report:?}\");\n```\n\nThis example produces the following output:\n\n```console\nError: SuperError is here!\n\nCaused by:\n SuperErrorSideKick is here!\n```\n\nWhen there are multiple source errors the causes will be numbered in order of iteration\nstarting from the outermost error.\n\n```rust\n#![feature(error_reporter)]\nuse std::error::Report;\n# use std::error::Error;\n# use std::fmt;\n# #[derive(Debug)]\n# struct SuperError {\n# source: SuperErrorSideKick,\n# }\n# impl fmt::Display for SuperError {\n# fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n# write!(f, \"SuperError is here!\")\n# }\n# }\n# impl Error for SuperError {\n# fn source(&self) -> Option<&(dyn Error + 'static)> {\n# Some(&self.source)\n# }\n# }\n# #[derive(Debug)]\n# struct SuperErrorSideKick {\n# source: SuperErrorSideKickSideKick,\n# }\n# impl fmt::Display for SuperErrorSideKick {\n# fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n# write!(f, \"SuperErrorSideKick is here!\")\n# }\n# }\n# impl Error for SuperErrorSideKick {\n# fn source(&self) -> Option<&(dyn Error + 'static)> {\n# Some(&self.source)\n# }\n# }\n# #[derive(Debug)]\n# struct SuperErrorSideKickSideKick;\n# impl fmt::Display for SuperErrorSideKickSideKick {\n# fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n# write!(f, \"SuperErrorSideKickSideKick is here!\")\n# }\n# }\n# impl Error for SuperErrorSideKickSideKick { }\n\nlet source = SuperErrorSideKickSideKick;\nlet source = SuperErrorSideKick { source };\nlet error = SuperError { source };\nlet report = Report::new(error).pretty(true);\neprintln!(\"Error: {report:?}\");\n```\n\nThis example produces the following output:\n\n```console\nError: SuperError is here!\n\nCaused by:\n 0: SuperErrorSideKick is here!\n 1: SuperErrorSideKickSideKick is here!\n```",
- "id": 1885,
+ "id": 1883,
"inner": {
"function": {
"generics": {
@@ -205242,7 +223705,7 @@
},
"visibility": "public"
},
- "1886": {
+ "1884": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 90172, is_soft: false}, feature: \"error_reporter\"}}]"
@@ -205251,7 +223714,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Display backtrace if available when using pretty output format.\n\n# Examples\n\n**Note**: Report will search for the first `Backtrace` it can find starting from the\noutermost error. In this example it will display the backtrace from the second error in the\nsources, `SuperErrorSideKick`.\n\n```rust\n#![feature(error_reporter)]\n#![feature(error_generic_member_access)]\n# use std::error::Error;\n# use std::fmt;\nuse std::error::Request;\nuse std::error::Report;\nuse std::backtrace::Backtrace;\n\n# #[derive(Debug)]\n# struct SuperError {\n# source: SuperErrorSideKick,\n# }\n# impl fmt::Display for SuperError {\n# fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n# write!(f, \"SuperError is here!\")\n# }\n# }\n# impl Error for SuperError {\n# fn source(&self) -> Option<&(dyn Error + 'static)> {\n# Some(&self.source)\n# }\n# }\n#[derive(Debug)]\nstruct SuperErrorSideKick {\n backtrace: Backtrace,\n}\n\nimpl SuperErrorSideKick {\n fn new() -> SuperErrorSideKick {\n SuperErrorSideKick { backtrace: Backtrace::force_capture() }\n }\n}\n\nimpl Error for SuperErrorSideKick {\n fn provide<'a>(&'a self, request: &mut Request<'a>) {\n request.provide_ref::(&self.backtrace);\n }\n}\n\n// The rest of the example is unchanged ...\n# impl fmt::Display for SuperErrorSideKick {\n# fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n# write!(f, \"SuperErrorSideKick is here!\")\n# }\n# }\n\nlet source = SuperErrorSideKick::new();\nlet error = SuperError { source };\nlet report = Report::new(error).pretty(true).show_backtrace(true);\neprintln!(\"Error: {report:?}\");\n```\n\nThis example produces something similar to the following output:\n\n```console\nError: SuperError is here!\n\nCaused by:\n SuperErrorSideKick is here!\n\nStack backtrace:\n 0: rust_out::main::_doctest_main_src_error_rs_1158_0::SuperErrorSideKick::new\n 1: rust_out::main::_doctest_main_src_error_rs_1158_0\n 2: rust_out::main\n 3: core::ops::function::FnOnce::call_once\n 4: std::sys::backtrace::__rust_begin_short_backtrace\n 5: std::rt::lang_start::{{closure}}\n 6: std::panicking::try\n 7: std::rt::lang_start_internal\n 8: std::rt::lang_start\n 9: main\n 10: __libc_start_main\n 11: _start\n```",
- "id": 1886,
+ "id": 1884,
"inner": {
"function": {
"generics": {
@@ -205302,12 +223765,12 @@
},
"visibility": "public"
},
- "1887": {
+ "1885": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1887,
+ "id": 1885,
"inner": {
"impl": {
"blanket_impl": null,
@@ -205325,7 +223788,7 @@
"constraints": []
}
},
- "id": 1882,
+ "id": 1880,
"path": "Report"
}
},
@@ -205348,8 +223811,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1885,
- 1886
+ 1883,
+ 1884
],
"provided_trait_methods": [],
"trait": null
@@ -205370,12 +223833,12 @@
},
"visibility": "default"
},
- "1888": {
+ "1886": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1888,
+ "id": 1886,
"inner": {
"impl": {
"blanket_impl": null,
@@ -205393,7 +223856,7 @@
"constraints": []
}
},
- "id": 1882,
+ "id": 1880,
"path": "Report"
}
},
@@ -205451,12 +223914,12 @@
"span": null,
"visibility": "default"
},
- "1889": {
+ "1887": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1889,
+ "id": 1887,
"inner": {
"impl": {
"blanket_impl": null,
@@ -205474,7 +223937,7 @@
"constraints": []
}
},
- "id": 1882,
+ "id": 1880,
"path": "Report"
}
},
@@ -205532,12 +223995,12 @@
"span": null,
"visibility": "default"
},
- "1890": {
+ "1888": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1890,
+ "id": 1888,
"inner": {
"impl": {
"blanket_impl": null,
@@ -205555,7 +224018,7 @@
"constraints": []
}
},
- "id": 1882,
+ "id": 1880,
"path": "Report"
}
},
@@ -205582,7 +224045,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -205603,7 +224066,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -205613,12 +224076,12 @@
"span": null,
"visibility": "default"
},
- "1891": {
+ "1889": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1891,
+ "id": 1889,
"inner": {
"impl": {
"blanket_impl": null,
@@ -205636,7 +224099,7 @@
"constraints": []
}
},
- "id": 1882,
+ "id": 1880,
"path": "Report"
}
},
@@ -205694,12 +224157,12 @@
"span": null,
"visibility": "default"
},
- "1892": {
+ "1890": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1892,
+ "id": 1890,
"inner": {
"impl": {
"blanket_impl": null,
@@ -205717,7 +224180,7 @@
"constraints": []
}
},
- "id": 1882,
+ "id": 1880,
"path": "Report"
}
},
@@ -205744,7 +224207,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -205765,7 +224228,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -205775,12 +224238,12 @@
"span": null,
"visibility": "default"
},
- "1893": {
+ "1891": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1893,
+ "id": 1891,
"inner": {
"impl": {
"blanket_impl": null,
@@ -205798,7 +224261,7 @@
"constraints": []
}
},
- "id": 1882,
+ "id": 1880,
"path": "Report"
}
},
@@ -205825,7 +224288,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -205846,7 +224309,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -205856,12 +224319,12 @@
"span": null,
"visibility": "default"
},
- "1894": {
+ "1892": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1894,
+ "id": 1892,
"inner": {
"impl": {
"blanket_impl": {
@@ -205881,7 +224344,7 @@
"constraints": []
}
},
- "id": 1882,
+ "id": 1880,
"path": "Report"
}
},
@@ -205926,7 +224389,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -205942,7 +224405,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -205951,23 +224414,23 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1895": {
+ "1893": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1895,
+ "id": 1893,
"inner": {
"impl": {
"blanket_impl": {
@@ -205987,7 +224450,7 @@
"constraints": []
}
},
- "id": 1882,
+ "id": 1880,
"path": "Report"
}
},
@@ -206032,7 +224495,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -206048,7 +224511,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -206057,23 +224520,23 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1896": {
+ "1894": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1896,
+ "id": 1894,
"inner": {
"impl": {
"blanket_impl": {
@@ -206093,7 +224556,7 @@
"constraints": []
}
},
- "id": 1882,
+ "id": 1880,
"path": "Report"
}
},
@@ -206159,7 +224622,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -206184,23 +224647,23 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1897": {
+ "1895": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1897,
+ "id": 1895,
"inner": {
"impl": {
"blanket_impl": {
@@ -206220,7 +224683,7 @@
"constraints": []
}
},
- "id": 1882,
+ "id": 1880,
"path": "Report"
}
},
@@ -206243,7 +224706,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -206268,23 +224731,23 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1898": {
+ "1896": {
"attrs": [],
"crate_id": 1,
"deprecation": null,
"docs": null,
- "id": 1898,
+ "id": 1896,
"inner": {
"function": {
"generics": {
@@ -206318,23 +224781,23 @@
"name": "from",
"span": {
"begin": [
- 809,
+ 803,
5
],
"end": [
- 809,
+ 803,
23
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1899": {
+ "1897": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1899,
+ "id": 1897,
"inner": {
"impl": {
"blanket_impl": {
@@ -206354,7 +224817,7 @@
"constraints": []
}
},
- "id": 1882,
+ "id": 1880,
"path": "Report"
}
},
@@ -206377,7 +224840,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1898
+ 1896
],
"provided_trait_methods": [],
"trait": {
@@ -206402,23 +224865,23 @@
"name": null,
"span": {
"begin": [
- 808,
+ 802,
1
],
"end": [
- 808,
+ 802,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1900": {
+ "1898": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1900,
+ "id": 1898,
"inner": {
"impl": {
"blanket_impl": {
@@ -206438,7 +224901,7 @@
"constraints": []
}
},
- "id": 1882,
+ "id": 1880,
"path": "Report"
}
},
@@ -206486,7 +224949,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -206504,8 +224967,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -206521,7 +224984,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -206530,23 +224993,23 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1901": {
+ "1899": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1901,
+ "id": 1899,
"inner": {
"impl": {
"blanket_impl": {
@@ -206566,7 +225029,7 @@
"constraints": []
}
},
- "id": 1882,
+ "id": 1880,
"path": "Report"
}
},
@@ -206632,8 +225095,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -206649,7 +225112,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -206658,23 +225121,23 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1902": {
+ "1900": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1902,
+ "id": 1900,
"inner": {
"impl": {
"blanket_impl": {
@@ -206694,7 +225157,7 @@
"constraints": []
}
},
- "id": 1882,
+ "id": 1880,
"path": "Report"
}
},
@@ -206742,12 +225205,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -206767,12 +225230,12 @@
},
"visibility": "default"
},
- "1903": {
+ "1901": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1903,
+ "id": 1901,
"inner": {
"impl": {
"blanket_impl": {
@@ -206792,7 +225255,7 @@
"constraints": []
}
},
- "id": 1882,
+ "id": 1880,
"path": "Report"
}
},
@@ -206853,7 +225316,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 163,
+ "id": 161,
"path": "ToString"
}
}
@@ -206862,23 +225325,23 @@
"name": null,
"span": {
"begin": [
- 2806,
+ 2866,
1
],
"end": [
- 2806,
+ 2866,
46
],
"filename": "checkouts/rust/library/alloc/src/string.rs"
},
"visibility": "default"
},
- "1904": {
+ "1902": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1904,
+ "id": 1902,
"inner": {
"function": {
"generics": {
@@ -206923,7 +225386,7 @@
},
"visibility": "default"
},
- "1905": {
+ "1903": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 90172, is_soft: false}, feature: \"error_reporter\"}}]"
@@ -206932,7 +225395,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1905,
+ "id": 1903,
"inner": {
"impl": {
"blanket_impl": null,
@@ -206950,7 +225413,7 @@
"constraints": []
}
},
- "id": 1882,
+ "id": 1880,
"path": "Report"
}
},
@@ -206995,7 +225458,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1904
+ 1902
],
"provided_trait_methods": [],
"trait": {
@@ -207031,12 +225494,12 @@
},
"visibility": "default"
},
- "1906": {
+ "1904": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1906,
+ "id": 1904,
"inner": {
"function": {
"generics": {
@@ -207082,7 +225545,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -207094,7 +225557,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -207116,7 +225579,7 @@
},
"visibility": "default"
},
- "1907": {
+ "1905": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 90172, is_soft: false}, feature: \"error_reporter\"}}]"
@@ -207125,7 +225588,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1907,
+ "id": 1905,
"inner": {
"impl": {
"blanket_impl": null,
@@ -207143,7 +225606,7 @@
"constraints": []
}
},
- "id": 1882,
+ "id": 1880,
"path": "Report"
}
},
@@ -207188,7 +225651,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1906
+ 1904
],
"provided_trait_methods": [],
"trait": {
@@ -207213,12 +225676,12 @@
},
"visibility": "default"
},
- "1908": {
+ "1906": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1908,
+ "id": 1906,
"inner": {
"function": {
"generics": {
@@ -207264,7 +225727,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -207276,7 +225739,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -207298,7 +225761,7 @@
},
"visibility": "default"
},
- "1909": {
+ "1907": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 90172, is_soft: false}, feature: \"error_reporter\"}}]"
@@ -207307,7 +225770,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1909,
+ "id": 1907,
"inner": {
"impl": {
"blanket_impl": null,
@@ -207325,7 +225788,7 @@
"constraints": []
}
},
- "id": 1882,
+ "id": 1880,
"path": "Report"
}
},
@@ -207373,7 +225836,7 @@
"constraints": []
}
},
- "id": 1882,
+ "id": 1880,
"path": "Report"
}
}
@@ -207385,12 +225848,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1908
+ 1906
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -207410,7 +225873,7 @@
},
"visibility": "default"
},
- "1910": {
+ "1908": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 10, patch: 0})}, feature: \"panic_hooks\"}}]"
@@ -207422,7 +225885,7 @@
"since": "1.82.0"
},
"docs": "A struct providing information about a panic.\n\n`PanicInfo` has been renamed to [`PanicHookInfo`] to avoid confusion with\n[`core::panic::PanicInfo`].",
- "id": 1910,
+ "id": 1908,
"inner": {
"type_alias": {
"generics": {
@@ -207450,15 +225913,15 @@
"constraints": []
}
},
- "id": 6199,
+ "id": 6232,
"path": "PanicHookInfo"
}
}
}
},
"links": {
- "`PanicHookInfo`": 6199,
- "`core::panic::PanicInfo`": 6200
+ "`PanicHookInfo`": 6232,
+ "`core::panic::PanicInfo`": 6233
},
"name": "PanicInfo",
"span": {
@@ -207474,7 +225937,7 @@
},
"visibility": "public"
},
- "1911": {
+ "1909": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -207483,29 +225946,29 @@
"crate_id": 0,
"deprecation": null,
"docs": "Interfaces for working with Errors.\n\n# Error Handling In Rust\n\nThe Rust language provides two complementary systems for constructing /\nrepresenting, reporting, propagating, reacting to, and discarding errors.\nThese responsibilities are collectively known as \"error handling.\" The\ncomponents of the first system, the panic runtime and interfaces, are most\ncommonly used to represent bugs that have been detected in your program. The\ncomponents of the second system, `Result`, the error traits, and user\ndefined types, are used to represent anticipated runtime failure modes of\nyour program.\n\n## The Panic Interfaces\n\nThe following are the primary interfaces of the panic system and the\nresponsibilities they cover:\n\n* [`panic!`] and [`panic_any`] (Constructing, Propagated automatically)\n* [`set_hook`], [`take_hook`], and [`PanicHookInfo`] (Reporting)\n* [`#[panic_handler]`][panic-handler] and [`PanicInfo`] (Reporting in no_std)\n* [`catch_unwind`] and [`resume_unwind`] (Discarding, Propagating)\n\nThe following are the primary interfaces of the error system and the\nresponsibilities they cover:\n\n* [`Result`] (Propagating, Reacting)\n* The [`Error`] trait (Reporting)\n* User defined types (Constructing / Representing)\n* [`match`] and [`downcast`] (Reacting)\n* The question mark operator ([`?`]) (Propagating)\n* The partially stable [`Try`] traits (Propagating, Constructing)\n* [`Termination`] (Reporting)\n\n## Converting Errors into Panics\n\nThe panic and error systems are not entirely distinct. Often times errors\nthat are anticipated runtime failures in an API might instead represent bugs\nto a caller. For these situations the standard library provides APIs for\nconstructing panics with an `Error` as its source.\n\n* [`Result::unwrap`]\n* [`Result::expect`]\n\nThese functions are equivalent, they either return the inner value if the\n`Result` is `Ok` or panic if the `Result` is `Err` printing the inner error\nas the source. The only difference between them is that with `expect` you\nprovide a panic error message to be printed alongside the source, whereas\n`unwrap` has a default message indicating only that you unwrapped an `Err`.\n\nOf the two, `expect` is generally preferred since its `msg` field allows you\nto convey your intent and assumptions which makes tracking down the source\nof a panic easier. `unwrap` on the other hand can still be a good fit in\nsituations where you can trivially show that a piece of code will never\npanic, such as `\"127.0.0.1\".parse::().unwrap()` or early\nprototyping.\n\n# Common Message Styles\n\nThere are two common styles for how people word `expect` messages. Using\nthe message to present information to users encountering a panic\n(\"expect as error message\") or using the message to present information\nto developers debugging the panic (\"expect as precondition\").\n\nIn the former case the expect message is used to describe the error that\nhas occurred which is considered a bug. Consider the following example:\n\n```should_panic\n// Read environment variable, panic if it is not present\nlet path = std::env::var(\"IMPORTANT_PATH\").unwrap();\n```\n\nIn the \"expect as error message\" style we would use expect to describe\nthat the environment variable was not set when it should have been:\n\n```should_panic\nlet path = std::env::var(\"IMPORTANT_PATH\")\n .expect(\"env variable `IMPORTANT_PATH` is not set\");\n```\n\nIn the \"expect as precondition\" style, we would instead describe the\nreason we _expect_ the `Result` should be `Ok`. With this style we would\nprefer to write:\n\n```should_panic\nlet path = std::env::var(\"IMPORTANT_PATH\")\n .expect(\"env variable `IMPORTANT_PATH` should be set by `wrapper_script.sh`\");\n```\n\nThe \"expect as error message\" style does not work as well with the\ndefault output of the std panic hooks, and often ends up repeating\ninformation that is already communicated by the source error being\nunwrapped:\n\n```text\nthread 'main' panicked at src/main.rs:4:6:\nenv variable `IMPORTANT_PATH` is not set: NotPresent\n```\n\nIn this example we end up mentioning that an env variable is not set,\nfollowed by our source message that says the env is not present, the\nonly additional information we're communicating is the name of the\nenvironment variable being checked.\n\nThe \"expect as precondition\" style instead focuses on source code\nreadability, making it easier to understand what must have gone wrong in\nsituations where panics are being used to represent bugs exclusively.\nAlso, by framing our expect in terms of what \"SHOULD\" have happened to\nprevent the source error, we end up introducing new information that is\nindependent from our source error.\n\n```text\nthread 'main' panicked at src/main.rs:4:6:\nenv variable `IMPORTANT_PATH` should be set by `wrapper_script.sh`: NotPresent\n```\n\nIn this example we are communicating not only the name of the\nenvironment variable that should have been set, but also an explanation\nfor why it should have been set, and we let the source error display as\na clear contradiction to our expectation.\n\n**Hint**: If you're having trouble remembering how to phrase\nexpect-as-precondition style error messages remember to focus on the word\n\"should\" as in \"env variable should be set by blah\" or \"the given binary\nshould be available and executable by the current user\".\n\n[`panic_any`]: ../../std/panic/fn.panic_any.html\n[`PanicHookInfo`]: ../../std/panic/struct.PanicHookInfo.html\n[`PanicInfo`]: crate::panic::PanicInfo\n[`catch_unwind`]: ../../std/panic/fn.catch_unwind.html\n[`resume_unwind`]: ../../std/panic/fn.resume_unwind.html\n[`downcast`]: crate::error::Error\n[`Termination`]: ../../std/process/trait.Termination.html\n[`Try`]: crate::ops::Try\n[panic hook]: ../../std/panic/fn.set_hook.html\n[`set_hook`]: ../../std/panic/fn.set_hook.html\n[`take_hook`]: ../../std/panic/fn.take_hook.html\n[panic-handler]: \n[`match`]: ../../std/keyword.match.html\n[`?`]: ../../std/result/index.html#the-question-mark-operator-",
- "id": 1911,
+ "id": 1909,
"inner": {
"module": {
"is_crate": false,
"is_stripped": false,
"items": [
- 1871,
+ 1869,
+ 1870,
1872,
1874,
- 1876,
- 1882
+ 1880
]
}
},
"links": {
"`Error`": 450,
- "`Result::expect`": 1881,
- "`Result::unwrap`": 470,
+ "`Result::expect`": 1879,
+ "`Result::unwrap`": 471,
"`Result`": 57,
- "`panic!`": 492,
+ "`panic!`": 493,
"crate::error::Error": 450,
- "crate::ops::Try": 1859,
- "crate::panic::PanicInfo": 1910
+ "crate::ops::Try": 1857,
+ "crate::panic::PanicInfo": 1908
},
"name": "error",
"span": {
@@ -207521,7 +225984,7 @@
},
"visibility": "public"
},
- "1912": {
+ "1910": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"cstring_from_vec_with_nul\"}}]"
@@ -207530,10 +225993,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1912,
+ "id": 1910,
"inner": {
"use": {
- "id": 1913,
+ "id": 1911,
"is_glob": false,
"name": "FromVecWithNulError",
"source": "alloc::ffi::c_str::FromVecWithNulError"
@@ -207554,7 +226017,7 @@
},
"visibility": "public"
},
- "1914": {
+ "1912": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"cstring_into\"}}]"
@@ -207563,10 +226026,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1914,
+ "id": 1912,
"inner": {
"use": {
- "id": 1915,
+ "id": 1913,
"is_glob": false,
"name": "IntoStringError",
"source": "alloc::ffi::c_str::IntoStringError"
@@ -207587,7 +226050,7 @@
},
"visibility": "public"
},
- "1916": {
+ "1914": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -207596,10 +226059,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1916,
+ "id": 1914,
"inner": {
"use": {
- "id": 1917,
+ "id": 1915,
"is_glob": false,
"name": "CString",
"source": "alloc::ffi::c_str::CString"
@@ -207620,7 +226083,7 @@
},
"visibility": "public"
},
- "1918": {
+ "1916": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -207629,10 +226092,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1918,
+ "id": 1916,
"inner": {
"use": {
- "id": 1919,
+ "id": 1917,
"is_glob": false,
"name": "NulError",
"source": "alloc::ffi::c_str::NulError"
@@ -207653,7 +226116,7 @@
},
"visibility": "public"
},
- "1920": {
+ "1918": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -207662,10 +226125,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1920,
+ "id": 1918,
"inner": {
"use": {
- "id": 1921,
+ "id": 1919,
"is_glob": false,
"name": "CStr",
"source": "core::ffi::c_str::CStr"
@@ -207686,7 +226149,7 @@
},
"visibility": "public"
},
- "1922": {
+ "1920": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 69, patch: 0})}, feature: \"cstr_from_bytes_until_nul\"}}]"
@@ -207695,10 +226158,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1922,
+ "id": 1920,
"inner": {
"use": {
- "id": 1923,
+ "id": 1921,
"is_glob": false,
"name": "FromBytesUntilNulError",
"source": "core::ffi::c_str::FromBytesUntilNulError"
@@ -207719,7 +226182,7 @@
},
"visibility": "public"
},
- "1924": {
+ "1922": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 10, patch: 0})}, feature: \"cstr_from_bytes\"}}]"
@@ -207728,10 +226191,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1924,
+ "id": 1922,
"inner": {
"use": {
- "id": 1925,
+ "id": 1923,
"is_glob": false,
"name": "FromBytesWithNulError",
"source": "core::ffi::c_str::FromBytesWithNulError"
@@ -207752,7 +226215,7 @@
},
"visibility": "public"
},
- "1926": {
+ "1924": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 88, patch: 0})}, feature: \"c_str_module\"}}]"
@@ -207761,25 +226224,25 @@
"crate_id": 0,
"deprecation": null,
"docs": "[`CStr`], [`CString`], and related types.",
- "id": 1926,
+ "id": 1924,
"inner": {
"module": {
"is_crate": false,
"is_stripped": false,
"items": [
+ 1910,
1912,
1914,
1916,
1918,
1920,
- 1922,
- 1924
+ 1922
]
}
},
"links": {
- "`CStr`": 1921,
- "`CString`": 1917
+ "`CStr`": 1919,
+ "`CString`": 1915
},
"name": "c_str",
"span": {
@@ -207795,7 +226258,7 @@
},
"visibility": "public"
},
- "1928": {
+ "1926": {
"attrs": [
{
"other": "#[rustc_doc_primitive = \"str\"]"
@@ -207807,37 +226270,37 @@
"crate_id": 0,
"deprecation": null,
"docs": "String slices.\n\n*[See also the `std::str` module](crate::str).*\n\nThe `str` type, also called a 'string slice', is the most primitive string\ntype. It is usually seen in its borrowed form, `&str`. It is also the type\nof string literals, `&'static str`.\n\n# Basic Usage\n\nString literals are string slices:\n\n```\nlet hello_world = \"Hello, World!\";\n```\n\nHere we have declared a string slice initialized with a string literal.\nString literals have a static lifetime, which means the string `hello_world`\nis guaranteed to be valid for the duration of the entire program.\nWe can explicitly specify `hello_world`'s lifetime as well:\n\n```\nlet hello_world: &'static str = \"Hello, world!\";\n```\n\n# Representation\n\nA `&str` is made up of two components: a pointer to some bytes, and a\nlength. You can look at these with the [`as_ptr`] and [`len`] methods:\n\n```\nuse std::slice;\nuse std::str;\n\nlet story = \"Once upon a time...\";\n\nlet ptr = story.as_ptr();\nlet len = story.len();\n\n// story has nineteen bytes\nassert_eq!(19, len);\n\n// We can re-build a str out of ptr and len. This is all unsafe because\n// we are responsible for making sure the two components are valid:\nlet s = unsafe {\n // First, we build a &[u8]...\n let slice = slice::from_raw_parts(ptr, len);\n\n // ... and then convert that slice into a string slice\n str::from_utf8(slice)\n};\n\nassert_eq!(s, Ok(story));\n```\n\n[`as_ptr`]: str::as_ptr\n[`len`]: str::len\n\nNote: This example shows the internals of `&str`. `unsafe` should not be\nused to get a string slice under normal circumstances. Use `as_str`\ninstead.\n\n# Invariant\n\nRust libraries may assume that string slices are always valid UTF-8.\n\nConstructing a non-UTF-8 string slice is not immediate undefined behavior, but any function\ncalled on a string slice may assume that it is valid UTF-8, which means that a non-UTF-8 string\nslice can lead to undefined behavior down the road.",
- "id": 1928,
+ "id": 1926,
"inner": {
"primitive": {
"impls": [
- 9559,
- 9567,
+ 9780,
+ 9788,
655,
+ 1998,
2000,
2002,
2004,
- 2006,
- 2016,
- 2188,
+ 2014,
+ 2186,
+ 2194,
2196,
- 2198,
- 2207,
- 2241,
- 4467,
- 6593,
- 6595,
- 6719,
- 6721,
- 6738
+ 2205,
+ 2239,
+ 4468,
+ 6632,
+ 6634,
+ 6758,
+ 6760,
+ 6777
],
"name": "str"
}
},
"links": {
- "crate::str": 9161,
- "str::as_ptr": 9162,
- "str::len": 9163
+ "crate::str": 9383,
+ "str::as_ptr": 9384,
+ "str::len": 9385
},
"name": "str",
"span": {
@@ -207853,10 +226316,10 @@
},
"visibility": "public"
},
- "1931": {
+ "1929": {
"attrs": [
{
- "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Current},\nfeature: \"const_pathbuf_osstring_new\", promotable: false}}]"
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 91, patch: 0})}, feature: \"const_pathbuf_osstring_new\",\npromotable: false}}]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -207873,7 +226336,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Constructs a new empty `OsString`.\n\n# Examples\n\n```\nuse std::ffi::OsString;\n\nlet os_string = OsString::new();\n```",
- "id": 1931,
+ "id": 1929,
"inner": {
"function": {
"generics": {
@@ -207893,7 +226356,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -207915,7 +226378,7 @@
},
"visibility": "public"
},
- "1932": {
+ "1930": {
"attrs": [
{
"other": "#[attr = Confusables {symbols: [\"append\", \"put\"]}]"
@@ -207930,7 +226393,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Extends the string with the given &[OsStr] slice.\n\n# Examples\n\n```\nuse std::ffi::OsString;\n\nlet mut os_string = OsString::from(\"foo\");\nos_string.push(\"bar\");\nassert_eq!(&os_string, \"foobar\");\n```",
- "id": 1932,
+ "id": 1930,
"inner": {
"function": {
"generics": {
@@ -207951,7 +226414,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -208009,7 +226472,7 @@
}
},
"links": {
- "OsStr": 1720
+ "OsStr": 1719
},
"name": "push",
"span": {
@@ -208025,7 +226488,7 @@
},
"visibility": "public"
},
- "1933": {
+ "1931": {
"attrs": [
{
"other": "#[(not(test), rustc_diagnostic_item = \"os_string_as_os_str\")]"
@@ -208048,7 +226511,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Converts to an [`OsStr`] slice.\n\n# Examples\n\n```\nuse std::ffi::{OsString, OsStr};\n\nlet os_string = OsString::from(\"foo\");\nlet os_str = OsStr::new(\"foo\");\nassert_eq!(os_string.as_os_str(), os_str);\n```",
- "id": 1933,
+ "id": 1931,
"inner": {
"function": {
"generics": {
@@ -208085,7 +226548,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -208095,7 +226558,7 @@
}
},
"links": {
- "`OsStr`": 1720
+ "`OsStr`": 1719
},
"name": "as_os_str",
"span": {
@@ -208111,7 +226574,7 @@
},
"visibility": "public"
},
- "1934": {
+ "1932": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -208120,14 +226583,15 @@
"crate_id": 0,
"deprecation": null,
"docs": "Utilities related to FFI bindings.\n\nThis module provides utilities to handle data across non-Rust\ninterfaces, like other programming languages and the underlying\noperating system. It is mainly of use for FFI (Foreign Function\nInterface) bindings and code that needs to exchange C-like strings\nwith other languages.\n\n# Overview\n\nRust represents owned strings with the [`String`] type, and\nborrowed slices of strings with the [`str`] primitive. Both are\nalways in UTF-8 encoding, and may contain nul bytes in the middle,\ni.e., if you look at the bytes that make up the string, there may\nbe a `\\0` among them. Both `String` and `str` store their length\nexplicitly; there are no nul terminators at the end of strings\nlike in C.\n\nC strings are different from Rust strings:\n\n* **Encodings** - Rust strings are UTF-8, but C strings may use\nother encodings. If you are using a string from C, you should\ncheck its encoding explicitly, rather than just assuming that it\nis UTF-8 like you can do in Rust.\n\n* **Character size** - C strings may use `char` or `wchar_t`-sized\ncharacters; please **note** that C's `char` is different from Rust's.\nThe C standard leaves the actual sizes of those types open to\ninterpretation, but defines different APIs for strings made up of\neach character type. Rust strings are always UTF-8, so different\nUnicode characters will be encoded in a variable number of bytes\neach. The Rust type [`char`] represents a '[Unicode scalar\nvalue]', which is similar to, but not the same as, a '[Unicode\ncode point]'.\n\n* **Nul terminators and implicit string lengths** - Often, C\nstrings are nul-terminated, i.e., they have a `\\0` character at the\nend. The length of a string buffer is not stored, but has to be\ncalculated; to compute the length of a string, C code must\nmanually call a function like `strlen()` for `char`-based strings,\nor `wcslen()` for `wchar_t`-based ones. Those functions return\nthe number of characters in the string excluding the nul\nterminator, so the buffer length is really `len+1` characters.\nRust strings don't have a nul terminator; their length is always\nstored and does not need to be calculated. While in Rust\naccessing a string's length is an *O*(1) operation (because the\nlength is stored); in C it is an *O*(*n*) operation because the\nlength needs to be computed by scanning the string for the nul\nterminator.\n\n* **Internal nul characters** - When C strings have a nul\nterminator character, this usually means that they cannot have nul\ncharacters in the middle — a nul character would essentially\ntruncate the string. Rust strings *can* have nul characters in\nthe middle, because nul does not have to mark the end of the\nstring in Rust.\n\n# Representations of non-Rust strings\n\n[`CString`] and [`CStr`] are useful when you need to transfer\nUTF-8 strings to and from languages with a C ABI, like Python.\n\n* **From Rust to C:** [`CString`] represents an owned, C-friendly\nstring: it is nul-terminated, and has no internal nul characters.\nRust code can create a [`CString`] out of a normal string (provided\nthat the string doesn't have nul characters in the middle), and\nthen use a variety of methods to obtain a raw \\*mut [u8] that can\nthen be passed as an argument to functions which use the C\nconventions for strings.\n\n* **From C to Rust:** [`CStr`] represents a borrowed C string; it\nis what you would use to wrap a raw \\*const [u8] that you got from\na C function. A [`CStr`] is guaranteed to be a nul-terminated array\nof bytes. Once you have a [`CStr`], you can convert it to a Rust\n&[str] if it's valid UTF-8, or lossily convert it by adding\nreplacement characters.\n\n[`OsString`] and [`OsStr`] are useful when you need to transfer\nstrings to and from the operating system itself, or when capturing\nthe output of external commands. Conversions between [`OsString`],\n[`OsStr`] and Rust strings work similarly to those for [`CString`]\nand [`CStr`].\n\n* [`OsString`] losslessly represents an owned platform string. However, this\nrepresentation is not necessarily in a form native to the platform.\nIn the Rust standard library, various APIs that transfer strings to/from the operating\nsystem use [`OsString`] instead of plain strings. For example,\n[`env::var_os()`] is used to query environment variables; it\nreturns an [Option]<[OsString]>. If the environment variable\nexists you will get a [Some]\\(os_string), which you can\n*then* try to convert to a Rust string. This yields a [`Result`], so that\nyour code can detect errors in case the environment variable did\nnot in fact contain valid Unicode data.\n\n* [`OsStr`] losslessly represents a borrowed reference to a platform string.\nHowever, this representation is not necessarily in a form native to the platform.\nIt can be converted into a UTF-8 Rust string slice in a similar way to\n[`OsString`].\n\n# Conversions\n\n## On Unix\n\nOn Unix, [`OsStr`] implements the\nstd::os::unix::ffi::[OsStrExt][unix.OsStrExt] trait, which\naugments it with two methods, [`from_bytes`] and [`as_bytes`].\nThese do inexpensive conversions from and to byte slices.\n\nAdditionally, on Unix [`OsString`] implements the\nstd::os::unix::ffi::[OsStringExt][unix.OsStringExt] trait,\nwhich provides [`from_vec`] and [`into_vec`] methods that consume\ntheir arguments, and take or produce vectors of [`u8`].\n\n## On Windows\n\nAn [`OsStr`] can be losslessly converted to a native Windows string. And\na native Windows string can be losslessly converted to an [`OsString`].\n\nOn Windows, [`OsStr`] implements the\nstd::os::windows::ffi::[OsStrExt][windows.OsStrExt] trait,\nwhich provides an [`encode_wide`] method. This provides an\niterator that can be [`collect`]ed into a vector of [`u16`]. After a nul\ncharacters is appended, this is the same as a native Windows string.\n\nAdditionally, on Windows [`OsString`] implements the\nstd::os::windows:ffi::[OsStringExt][windows.OsStringExt]\ntrait, which provides a [`from_wide`] method to convert a native Windows\nstring (without the terminating nul character) to an [`OsString`].\n\n## Other platforms\n\nMany other platforms provide their own extension traits in a\n`std::os::*::ffi` module.\n\n## On all platforms\n\nOn all platforms, [`OsStr`] consists of a sequence of bytes that is encoded as a superset of\nUTF-8; see [`OsString`] for more details on its encoding on different platforms.\n\nFor limited, inexpensive conversions from and to bytes, see [`OsStr::as_encoded_bytes`] and\n[`OsStr::from_encoded_bytes_unchecked`].\n\nFor basic string processing, see [`OsStr::slice_encoded_bytes`].\n\n[Unicode scalar value]: https://www.unicode.org/glossary/#unicode_scalar_value\n[Unicode code point]: https://www.unicode.org/glossary/#code_point\n[`env::set_var()`]: crate::env::set_var \"env::set_var\"\n[`env::var_os()`]: crate::env::var_os \"env::var_os\"\n[unix.OsStringExt]: crate::os::unix::ffi::OsStringExt \"os::unix::ffi::OsStringExt\"\n[`from_vec`]: crate::os::unix::ffi::OsStringExt::from_vec \"os::unix::ffi::OsStringExt::from_vec\"\n[`into_vec`]: crate::os::unix::ffi::OsStringExt::into_vec \"os::unix::ffi::OsStringExt::into_vec\"\n[unix.OsStrExt]: crate::os::unix::ffi::OsStrExt \"os::unix::ffi::OsStrExt\"\n[`from_bytes`]: crate::os::unix::ffi::OsStrExt::from_bytes \"os::unix::ffi::OsStrExt::from_bytes\"\n[`as_bytes`]: crate::os::unix::ffi::OsStrExt::as_bytes \"os::unix::ffi::OsStrExt::as_bytes\"\n[`OsStrExt`]: crate::os::unix::ffi::OsStrExt \"os::unix::ffi::OsStrExt\"\n[windows.OsStrExt]: crate::os::windows::ffi::OsStrExt \"os::windows::ffi::OsStrExt\"\n[`encode_wide`]: crate::os::windows::ffi::OsStrExt::encode_wide \"os::windows::ffi::OsStrExt::encode_wide\"\n[`collect`]: crate::iter::Iterator::collect \"iter::Iterator::collect\"\n[windows.OsStringExt]: crate::os::windows::ffi::OsStringExt \"os::windows::ffi::OsStringExt\"\n[`from_wide`]: crate::os::windows::ffi::OsStringExt::from_wide \"os::windows::ffi::OsStringExt::from_wide\"",
- "id": 1934,
+ "id": 1932,
"inner": {
"module": {
"is_crate": false,
"is_stripped": false,
"items": [
- 1926,
- 2347,
+ 1924,
+ 2345,
+ 2346,
2348,
2350,
2352,
@@ -208148,50 +226612,49 @@
2382,
2384,
2386,
+ 2387,
2388,
2389,
2390,
2391,
2392,
2393,
- 2394,
- 2395,
- 2396
+ 2394
]
}
},
"links": {
"Option": 51,
- "OsString": 1709,
+ "OsString": 1708,
"Some": 55,
- "`CStr`": 1921,
- "`CString`": 1917,
- "`OsStr::as_encoded_bytes`": 1935,
- "`OsStr::from_encoded_bytes_unchecked`": 2137,
- "`OsStr::slice_encoded_bytes`": 1951,
- "`OsStr`": 1720,
- "`OsString`": 1709,
+ "`CStr`": 1919,
+ "`CString`": 1915,
+ "`OsStr::as_encoded_bytes`": 1933,
+ "`OsStr::from_encoded_bytes_unchecked`": 2135,
+ "`OsStr::slice_encoded_bytes`": 1949,
+ "`OsStr`": 1719,
+ "`OsString`": 1708,
"`Result`": 57,
- "`String`": 161,
- "`char`": 2397,
- "`str`": 1928,
- "`u16`": 2404,
- "`u8`": 2398,
- "crate::env::set_var": 1753,
- "crate::env::var_os": 1717,
- "crate::iter::Iterator::collect": 1653,
- "crate::os::unix::ffi::OsStrExt": 2247,
- "crate::os::unix::ffi::OsStrExt::as_bytes": 2400,
- "crate::os::unix::ffi::OsStrExt::from_bytes": 2399,
- "crate::os::unix::ffi::OsStringExt": 2089,
- "crate::os::unix::ffi::OsStringExt::from_vec": 2401,
- "crate::os::unix::ffi::OsStringExt::into_vec": 2402,
- "crate::os::windows::ffi::OsStrExt": 2255,
- "crate::os::windows::ffi::OsStrExt::encode_wide": 2403,
- "crate::os::windows::ffi::OsStringExt": 2096,
- "crate::os::windows::ffi::OsStringExt::from_wide": 2405,
- "str": 1928,
- "u8": 2398
+ "`String`": 159,
+ "`char`": 2395,
+ "`str`": 1926,
+ "`u16`": 2402,
+ "`u8`": 2396,
+ "crate::env::set_var": 1751,
+ "crate::env::var_os": 1716,
+ "crate::iter::Iterator::collect": 1652,
+ "crate::os::unix::ffi::OsStrExt": 2245,
+ "crate::os::unix::ffi::OsStrExt::as_bytes": 2398,
+ "crate::os::unix::ffi::OsStrExt::from_bytes": 2397,
+ "crate::os::unix::ffi::OsStringExt": 2087,
+ "crate::os::unix::ffi::OsStringExt::from_vec": 2399,
+ "crate::os::unix::ffi::OsStringExt::into_vec": 2400,
+ "crate::os::windows::ffi::OsStrExt": 2253,
+ "crate::os::windows::ffi::OsStrExt::encode_wide": 2401,
+ "crate::os::windows::ffi::OsStringExt": 2094,
+ "crate::os::windows::ffi::OsStringExt::from_wide": 2403,
+ "str": 1926,
+ "u8": 2396
},
"name": "ffi",
"span": {
@@ -208207,7 +226670,7 @@
},
"visibility": "public"
},
- "1935": {
+ "1933": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 74, patch: 0})}, feature: \"os_str_bytes\"}}]"
@@ -208219,7 +226682,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Converts an OS string slice to a byte slice. To convert the byte slice back into an OS\nstring slice, use the [`OsStr::from_encoded_bytes_unchecked`] function.\n\nThe byte encoding is an unspecified, platform-specific, self-synchronizing superset of UTF-8.\nBy being a self-synchronizing superset of UTF-8, this encoding is also a superset of 7-bit\nASCII.\n\nNote: As the encoding is unspecified, any sub-slice of bytes that is not valid UTF-8 should\nbe treated as opaque and only comparable within the same Rust version built for the same\ntarget platform. For example, sending the slice over the network or storing it in a file\nwill likely result in incompatible byte slices. See [`OsString`] for more encoding details\nand [`std::ffi`] for platform-specific, specified conversions.\n\n[`std::ffi`]: crate::ffi",
- "id": 1935,
+ "id": 1933,
"inner": {
"function": {
"generics": {
@@ -208264,25 +226727,25 @@
}
},
"links": {
- "`OsStr::from_encoded_bytes_unchecked`": 2137,
- "`OsString`": 1709,
- "crate::ffi": 1934
+ "`OsStr::from_encoded_bytes_unchecked`": 2135,
+ "`OsString`": 1708,
+ "crate::ffi": 1932
},
"name": "as_encoded_bytes",
"span": {
"begin": [
- 1065,
+ 1068,
5
],
"end": [
- 1067,
+ 1070,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "public"
},
- "1936": {
+ "1934": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 74, patch: 0})}, feature: \"os_str_bytes\"}}]"
@@ -208294,7 +226757,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Converts bytes to an `OsString` without checking that the bytes contains\nvalid [`OsStr`]-encoded data.\n\nThe byte encoding is an unspecified, platform-specific, self-synchronizing superset of UTF-8.\nBy being a self-synchronizing superset of UTF-8, this encoding is also a superset of 7-bit\nASCII.\n\nSee the [module's toplevel documentation about conversions][conversions] for safe,\ncross-platform [conversions] from/to native representations.\n\n# Safety\n\nAs the encoding is unspecified, callers must pass in bytes that originated as a mixture of\nvalidated UTF-8 and bytes from [`OsStr::as_encoded_bytes`] from within the same Rust version\nbuilt for the same target platform. For example, reconstructing an `OsString` from bytes sent\nover the network or stored in a file will likely violate these safety rules.\n\nDue to the encoding being self-synchronizing, the bytes from [`OsStr::as_encoded_bytes`] can be\nsplit either immediately before or immediately after any valid non-empty UTF-8 substring.\n\n# Example\n\n```\nuse std::ffi::OsStr;\n\nlet os_str = OsStr::new(\"Mary had a little lamb\");\nlet bytes = os_str.as_encoded_bytes();\nlet words = bytes.split(|b| *b == b' ');\nlet words: Vec<&OsStr> = words.map(|word| {\n // SAFETY:\n // - Each `word` only contains content that originated from `OsStr::as_encoded_bytes`\n // - Only split with ASCII whitespace which is a non-empty UTF-8 substring\n unsafe { OsStr::from_encoded_bytes_unchecked(word) }\n}).collect();\n```\n\n[conversions]: super#conversions",
- "id": 1936,
+ "id": 1934,
"inner": {
"function": {
"generics": {
@@ -208326,7 +226789,7 @@
"constraints": []
}
},
- "id": 165,
+ "id": 163,
"path": "Vec"
}
}
@@ -208340,9 +226803,9 @@
}
},
"links": {
- "`OsStr::as_encoded_bytes`": 1935,
- "`OsStr`": 1720,
- "super#conversions": 1934
+ "`OsStr::as_encoded_bytes`": 1933,
+ "`OsStr`": 1719,
+ "super#conversions": 1932
},
"name": "from_encoded_bytes_unchecked",
"span": {
@@ -208358,7 +226821,7 @@
},
"visibility": "public"
},
- "1937": {
+ "1935": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 74, patch: 0})}, feature: \"os_str_bytes\"}}]"
@@ -208370,7 +226833,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Converts the `OsString` into a byte vector. To convert the byte vector back into an\n`OsString`, use the [`OsString::from_encoded_bytes_unchecked`] function.\n\nThe byte encoding is an unspecified, platform-specific, self-synchronizing superset of UTF-8.\nBy being a self-synchronizing superset of UTF-8, this encoding is also a superset of 7-bit\nASCII.\n\nNote: As the encoding is unspecified, any sub-slice of bytes that is not valid UTF-8 should\nbe treated as opaque and only comparable within the same Rust version built for the same\ntarget platform. For example, sending the bytes over the network or storing it in a file\nwill likely result in incompatible data. See [`OsString`] for more encoding details\nand [`std::ffi`] for platform-specific, specified conversions.\n\n[`std::ffi`]: crate::ffi",
- "id": 1937,
+ "id": 1935,
"inner": {
"function": {
"generics": {
@@ -208408,7 +226871,7 @@
"constraints": []
}
},
- "id": 165,
+ "id": 163,
"path": "Vec"
}
}
@@ -208416,9 +226879,9 @@
}
},
"links": {
- "`OsString::from_encoded_bytes_unchecked`": 1936,
- "`OsString`": 1709,
- "crate::ffi": 1934
+ "`OsString::from_encoded_bytes_unchecked`": 1934,
+ "`OsString`": 1708,
+ "crate::ffi": 1932
},
"name": "into_encoded_bytes",
"span": {
@@ -208434,7 +226897,7 @@
},
"visibility": "public"
},
- "1938": {
+ "1936": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -208446,7 +226909,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Converts the `OsString` into a [`String`] if it contains valid Unicode data.\n\nOn failure, ownership of the original `OsString` is returned.\n\n# Examples\n\n```\nuse std::ffi::OsString;\n\nlet os_string = OsString::from(\"foo\");\nlet string = os_string.into_string();\nassert_eq!(string, Ok(String::from(\"foo\")));\n```",
- "id": 1938,
+ "id": 1936,
"inner": {
"function": {
"generics": {
@@ -208479,7 +226942,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 161,
+ "id": 159,
"path": "String"
}
}
@@ -208488,7 +226951,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -208505,7 +226968,7 @@
}
},
"links": {
- "`String`": 161
+ "`String`": 159
},
"name": "into_string",
"span": {
@@ -208521,7 +226984,7 @@
},
"visibility": "public"
},
- "1939": {
+ "1937": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 9, patch: 0})}, feature: \"osstring_simple_functions\"}}]"
@@ -208538,7 +227001,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Creates a new `OsString` with at least the given capacity.\n\nThe string will be able to hold at least `capacity` length units of other\nOS strings without reallocating. This method is allowed to allocate for\nmore units than `capacity`. If `capacity` is 0, the string will not\nallocate.\n\nSee the main `OsString` documentation information about encoding and capacity units.\n\n# Examples\n\n```\nuse std::ffi::OsString;\n\nlet mut os_string = OsString::with_capacity(10);\nlet capacity = os_string.capacity();\n\n// This push is done without reallocating\nos_string.push(\"foo\");\n\nassert_eq!(capacity, os_string.capacity());\n```",
- "id": 1939,
+ "id": 1937,
"inner": {
"function": {
"generics": {
@@ -208565,7 +227028,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -208587,7 +227050,7 @@
},
"visibility": "public"
},
- "1940": {
+ "1938": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 9, patch: 0})}, feature: \"osstring_simple_functions\"}}]"
@@ -208599,7 +227062,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Truncates the `OsString` to zero length.\n\n# Examples\n\n```\nuse std::ffi::OsString;\n\nlet mut os_string = OsString::from(\"foo\");\nassert_eq!(&os_string, \"foo\");\n\nos_string.clear();\nassert_eq!(&os_string, \"\");\n```",
- "id": 1940,
+ "id": 1938,
"inner": {
"function": {
"generics": {
@@ -208648,7 +227111,7 @@
},
"visibility": "public"
},
- "1941": {
+ "1939": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 9, patch: 0})}, feature: \"osstring_simple_functions\"}}]"
@@ -208665,7 +227128,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Returns the capacity this `OsString` can hold without reallocating.\n\nSee the main `OsString` documentation information about encoding and capacity units.\n\n# Examples\n\n```\nuse std::ffi::OsString;\n\nlet os_string = OsString::with_capacity(10);\nassert!(os_string.capacity() >= 10);\n```",
- "id": 1941,
+ "id": 1939,
"inner": {
"function": {
"generics": {
@@ -208716,7 +227179,7 @@
},
"visibility": "public"
},
- "1942": {
+ "1940": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 9, patch: 0})}, feature: \"osstring_simple_functions\"}}]"
@@ -208728,7 +227191,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Reserves capacity for at least `additional` more capacity to be inserted\nin the given `OsString`. Does nothing if the capacity is\nalready sufficient.\n\nThe collection may reserve more space to speculatively avoid frequent reallocations.\n\nSee the main `OsString` documentation information about encoding and capacity units.\n\n# Examples\n\n```\nuse std::ffi::OsString;\n\nlet mut s = OsString::new();\ns.reserve(10);\nassert!(s.capacity() >= 10);\n```",
- "id": 1942,
+ "id": 1940,
"inner": {
"function": {
"generics": {
@@ -208783,7 +227246,7 @@
},
"visibility": "public"
},
- "1943": {
+ "1941": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 63, patch: 0})}, feature: \"try_reserve_2\"}}]"
@@ -208795,7 +227258,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Tries to reserve capacity for at least `additional` more length units\nin the given `OsString`. The string may reserve more space to speculatively avoid\nfrequent reallocations. After calling `try_reserve`, capacity will be\ngreater than or equal to `self.len() + additional` if it returns `Ok(())`.\nDoes nothing if capacity is already sufficient. This method preserves\nthe contents even if an error occurs.\n\nSee the main `OsString` documentation information about encoding and capacity units.\n\n# Errors\n\nIf the capacity overflows, or the allocator reports a failure, then an error\nis returned.\n\n# Examples\n\n```\nuse std::ffi::{OsStr, OsString};\nuse std::collections::TryReserveError;\n\nfn process_data(data: &str) -> Result {\n let mut s = OsString::new();\n\n // Pre-reserve the memory, exiting if we can't\n s.try_reserve(OsStr::new(data).len())?;\n\n // Now we know this can't OOM in the middle of our complex work\n s.push(data);\n\n Ok(s)\n}\n# process_data(\"123\").expect(\"why is the test harness OOMing on 3 bytes?\");\n```",
- "id": 1943,
+ "id": 1941,
"inner": {
"function": {
"generics": {
@@ -208876,7 +227339,7 @@
},
"visibility": "public"
},
- "1944": {
+ "1942": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 9, patch: 0})}, feature: \"osstring_simple_functions\"}}]"
@@ -208888,7 +227351,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Reserves the minimum capacity for at least `additional` more capacity to\nbe inserted in the given `OsString`. Does nothing if the capacity is\nalready sufficient.\n\nNote that the allocator may give the collection more space than it\nrequests. Therefore, capacity can not be relied upon to be precisely\nminimal. Prefer [`reserve`] if future insertions are expected.\n\n[`reserve`]: OsString::reserve\n\nSee the main `OsString` documentation information about encoding and capacity units.\n\n# Examples\n\n```\nuse std::ffi::OsString;\n\nlet mut s = OsString::new();\ns.reserve_exact(10);\nassert!(s.capacity() >= 10);\n```",
- "id": 1944,
+ "id": 1942,
"inner": {
"function": {
"generics": {
@@ -208929,7 +227392,7 @@
}
},
"links": {
- "OsString::reserve": 1942
+ "OsString::reserve": 1940
},
"name": "reserve_exact",
"span": {
@@ -208945,7 +227408,7 @@
},
"visibility": "public"
},
- "1945": {
+ "1943": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 63, patch: 0})}, feature: \"try_reserve_2\"}}]"
@@ -208957,7 +227420,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Tries to reserve the minimum capacity for at least `additional`\nmore length units in the given `OsString`. After calling\n`try_reserve_exact`, capacity will be greater than or equal to\n`self.len() + additional` if it returns `Ok(())`.\nDoes nothing if the capacity is already sufficient.\n\nNote that the allocator may give the `OsString` more space than it\nrequests. Therefore, capacity can not be relied upon to be precisely\nminimal. Prefer [`try_reserve`] if future insertions are expected.\n\n[`try_reserve`]: OsString::try_reserve\n\nSee the main `OsString` documentation information about encoding and capacity units.\n\n# Errors\n\nIf the capacity overflows, or the allocator reports a failure, then an error\nis returned.\n\n# Examples\n\n```\nuse std::ffi::{OsStr, OsString};\nuse std::collections::TryReserveError;\n\nfn process_data(data: &str) -> Result {\n let mut s = OsString::new();\n\n // Pre-reserve the memory, exiting if we can't\n s.try_reserve_exact(OsStr::new(data).len())?;\n\n // Now we know this can't OOM in the middle of our complex work\n s.push(data);\n\n Ok(s)\n}\n# process_data(\"123\").expect(\"why is the test harness OOMing on 3 bytes?\");\n```",
- "id": 1945,
+ "id": 1943,
"inner": {
"function": {
"generics": {
@@ -209024,7 +227487,7 @@
}
},
"links": {
- "OsString::try_reserve": 1943
+ "OsString::try_reserve": 1941
},
"name": "try_reserve_exact",
"span": {
@@ -209040,7 +227503,7 @@
},
"visibility": "public"
},
- "1946": {
+ "1944": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 19, patch: 0})}, feature: \"osstring_shrink_to_fit\"}}]"
@@ -209052,7 +227515,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Shrinks the capacity of the `OsString` to match its length.\n\nSee the main `OsString` documentation information about encoding and capacity units.\n\n# Examples\n\n```\nuse std::ffi::OsString;\n\nlet mut s = OsString::from(\"foo\");\n\ns.reserve(100);\nassert!(s.capacity() >= 100);\n\ns.shrink_to_fit();\nassert_eq!(3, s.capacity());\n```",
- "id": 1946,
+ "id": 1944,
"inner": {
"function": {
"generics": {
@@ -209101,7 +227564,7 @@
},
"visibility": "public"
},
- "1947": {
+ "1945": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 56, patch: 0})}, feature: \"shrink_to\"}}]"
@@ -209113,7 +227576,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Shrinks the capacity of the `OsString` with a lower bound.\n\nThe capacity will remain at least as large as both the length\nand the supplied value.\n\nIf the current capacity is less than the lower limit, this is a no-op.\n\nSee the main `OsString` documentation information about encoding and capacity units.\n\n# Examples\n\n```\nuse std::ffi::OsString;\n\nlet mut s = OsString::from(\"foo\");\n\ns.reserve(100);\nassert!(s.capacity() >= 100);\n\ns.shrink_to(10);\nassert!(s.capacity() >= 10);\ns.shrink_to(0);\nassert!(s.capacity() >= 3);\n```",
- "id": 1947,
+ "id": 1945,
"inner": {
"function": {
"generics": {
@@ -209168,7 +227631,7 @@
},
"visibility": "public"
},
- "1948": {
+ "1946": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 20, patch: 0})}, feature: \"into_boxed_os_str\"}}]"
@@ -209182,7 +227645,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Converts this `OsString` into a boxed [`OsStr`].\n\n# Examples\n\n```\nuse std::ffi::{OsString, OsStr};\n\nlet s = OsString::from(\"hello\");\n\nlet b: Box = s.into_boxed_os_str();\n```",
- "id": 1948,
+ "id": 1946,
"inner": {
"function": {
"generics": {
@@ -209215,7 +227678,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -209224,7 +227687,7 @@
"constraints": []
}
},
- "id": 159,
+ "id": 157,
"path": "Box"
}
}
@@ -209232,7 +227695,7 @@
}
},
"links": {
- "`OsStr`": 1720
+ "`OsStr`": 1719
},
"name": "into_boxed_os_str",
"span": {
@@ -209248,7 +227711,7 @@
},
"visibility": "public"
},
- "1950": {
+ "1948": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 89, patch: 0})}, feature: \"os_string_pathbuf_leak\"}}]"
@@ -209260,7 +227723,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Consumes and leaks the `OsString`, returning a mutable reference to the contents,\n`&'a mut OsStr`.\n\nThe caller has free choice over the returned lifetime, including 'static.\nIndeed, this function is ideally used for data that lives for the remainder of\nthe program’s life, as dropping the returned reference will cause a memory leak.\n\nIt does not reallocate or shrink the `OsString`, so the leaked allocation may include\nunused capacity that is not part of the returned slice. If you want to discard excess\ncapacity, call [`into_boxed_os_str`], and then [`Box::leak`] instead.\nHowever, keep in mind that trimming the capacity may result in a reallocation and copy.\n\n[`into_boxed_os_str`]: Self::into_boxed_os_str",
- "id": 1950,
+ "id": 1948,
"inner": {
"function": {
"generics": {
@@ -209300,7 +227763,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -209310,8 +227773,8 @@
}
},
"links": {
- "Self::into_boxed_os_str": 1948,
- "`Box::leak`": 1949
+ "Self::into_boxed_os_str": 1946,
+ "`Box::leak`": 1947
},
"name": "leak",
"span": {
@@ -209327,7 +227790,7 @@
},
"visibility": "public"
},
- "1951": {
+ "1949": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 118485, is_soft: false}, feature: \"os_str_slice\"}}]"
@@ -209336,7 +227799,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Takes a substring based on a range that corresponds to the return value of\n[`OsStr::as_encoded_bytes`].\n\nThe range's start and end must lie on valid `OsStr` boundaries.\nA valid `OsStr` boundary is one of:\n- The start of the string\n- The end of the string\n- Immediately before a valid non-empty UTF-8 substring\n- Immediately after a valid non-empty UTF-8 substring\n\n# Panics\n\nPanics if `range` does not lie on valid `OsStr` boundaries or if it\nexceeds the end of the string.\n\n# Example\n\n```\n#![feature(os_str_slice)]\n\nuse std::ffi::OsStr;\n\nlet os_str = OsStr::new(\"foo=bar\");\nlet bytes = os_str.as_encoded_bytes();\nif let Some(index) = bytes.iter().position(|b| *b == b'=') {\n let key = os_str.slice_encoded_bytes(..index);\n let value = os_str.slice_encoded_bytes(index + 1..);\n assert_eq!(key, \"foo\");\n assert_eq!(value, \"bar\");\n}\n```",
- "id": 1951,
+ "id": 1949,
"inner": {
"function": {
"generics": {
@@ -209362,7 +227825,7 @@
"constraints": []
}
},
- "id": 2145,
+ "id": 2143,
"path": "ops::RangeBounds"
}
}
@@ -209419,23 +227882,23 @@
}
},
"links": {
- "`OsStr::as_encoded_bytes`": 1935
+ "`OsStr::as_encoded_bytes`": 1933
},
"name": "slice_encoded_bytes",
"span": {
"begin": [
- 1101,
+ 1104,
5
],
"end": [
- 1117,
+ 1120,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "public"
},
- "1952": {
+ "1950": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 133262, is_soft: false}, feature: \"os_string_truncate\"}}]"
@@ -209447,7 +227910,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Truncate the `OsString` to the specified length.\n\n# Panics\nPanics if `len` does not lie on a valid `OsStr` boundary\n(as described in [`OsStr::slice_encoded_bytes`]).",
- "id": 1952,
+ "id": 1950,
"inner": {
"function": {
"generics": {
@@ -209488,7 +227951,7 @@
}
},
"links": {
- "`OsStr::slice_encoded_bytes`": 1951
+ "`OsStr::slice_encoded_bytes`": 1949
},
"name": "truncate",
"span": {
@@ -209504,19 +227967,19 @@
},
"visibility": "public"
},
- "1953": {
+ "1951": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1953,
+ "id": 1951,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -209528,12 +227991,14 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 1929,
+ 1934,
1931,
+ 1935,
1936,
- 1933,
+ 1930,
1937,
1938,
- 1932,
1939,
1940,
1941,
@@ -209542,10 +228007,8 @@
1944,
1945,
1946,
- 1947,
1948,
- 1950,
- 1952
+ 1950
],
"provided_trait_methods": [],
"trait": null
@@ -209566,19 +228029,19 @@
},
"visibility": "default"
},
- "1954": {
+ "1952": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1954,
+ "id": 1952,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -209603,19 +228066,19 @@
"span": null,
"visibility": "default"
},
- "1955": {
+ "1953": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1955,
+ "id": 1953,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -209640,19 +228103,19 @@
"span": null,
"visibility": "default"
},
- "1956": {
+ "1954": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1956,
+ "id": 1954,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -209667,7 +228130,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -209677,19 +228140,19 @@
"span": null,
"visibility": "default"
},
- "1957": {
+ "1955": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1957,
+ "id": 1955,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -209714,19 +228177,19 @@
"span": null,
"visibility": "default"
},
- "1958": {
+ "1956": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1958,
+ "id": 1956,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -209741,7 +228204,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -209751,19 +228214,19 @@
"span": null,
"visibility": "default"
},
- "1959": {
+ "1957": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1959,
+ "id": 1957,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -209778,7 +228241,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -209788,12 +228251,12 @@
"span": null,
"visibility": "default"
},
- "1960": {
+ "1958": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1960,
+ "id": 1958,
"inner": {
"impl": {
"blanket_impl": {
@@ -209802,7 +228265,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -209847,7 +228310,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -209863,7 +228326,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -209872,23 +228335,23 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1961": {
+ "1959": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1961,
+ "id": 1959,
"inner": {
"impl": {
"blanket_impl": {
@@ -209897,7 +228360,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -209942,7 +228405,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -209958,7 +228421,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -209967,23 +228430,23 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "1962": {
+ "1960": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1962,
+ "id": 1960,
"inner": {
"impl": {
"blanket_impl": {
@@ -209992,7 +228455,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -210019,7 +228482,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -210051,23 +228514,23 @@
"name": null,
"span": {
"begin": [
- 516,
+ 515,
1
],
"end": [
- 516,
+ 515,
42
],
"filename": "checkouts/rust/library/core/src/clone.rs"
},
"visibility": "default"
},
- "1963": {
+ "1961": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1963,
+ "id": 1961,
"inner": {
"impl": {
"blanket_impl": {
@@ -210076,7 +228539,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -210142,7 +228605,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -210167,23 +228630,23 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1964": {
+ "1962": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1964,
+ "id": 1962,
"inner": {
"impl": {
"blanket_impl": {
@@ -210192,7 +228655,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -210215,7 +228678,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -210240,23 +228703,23 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1965": {
+ "1963": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1965,
+ "id": 1963,
"inner": {
"impl": {
"blanket_impl": {
@@ -210265,7 +228728,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -210313,7 +228776,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -210331,8 +228794,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -210348,7 +228811,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -210357,23 +228820,23 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1966": {
+ "1964": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1966,
+ "id": 1964,
"inner": {
"impl": {
"blanket_impl": {
@@ -210382,7 +228845,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -210448,8 +228911,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -210465,7 +228928,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -210474,23 +228937,23 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "1967": {
+ "1965": {
"attrs": [],
"crate_id": 1,
"deprecation": null,
"docs": null,
- "id": 1967,
+ "id": 1965,
"inner": {
"assoc_type": {
"bounds": [],
@@ -210507,23 +228970,23 @@
"name": "Target",
"span": {
"begin": [
- 384,
+ 382,
5
],
"end": [
- 384,
+ 382,
16
],
"filename": "checkouts/rust/library/core/src/ops/deref.rs"
},
"visibility": "default"
},
- "1968": {
+ "1966": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1968,
+ "id": 1966,
"inner": {
"impl": {
"blanket_impl": {
@@ -210532,7 +228995,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -210586,7 +229049,7 @@
]
}
},
- "id": 1969,
+ "id": 1967,
"path": "Deref"
}
}
@@ -210636,12 +229099,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1967
+ 1965
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 1970,
+ "id": 1968,
"path": "Receiver"
}
}
@@ -210650,23 +229113,23 @@
"name": null,
"span": {
"begin": [
- 380,
+ 378,
1
],
"end": [
- 382,
+ 380,
26
],
"filename": "checkouts/rust/library/core/src/ops/deref.rs"
},
"visibility": "default"
},
- "1971": {
+ "1969": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1971,
+ "id": 1969,
"inner": {
"impl": {
"blanket_impl": {
@@ -210675,7 +229138,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -210723,12 +229186,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -210748,12 +229211,12 @@
},
"visibility": "default"
},
- "1972": {
+ "1970": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1972,
+ "id": 1970,
"inner": {
"impl": {
"blanket_impl": {
@@ -210762,7 +229225,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -210789,7 +229252,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -210816,7 +229279,7 @@
],
"trait": {
"args": null,
- "id": 157,
+ "id": 155,
"path": "ToOwned"
}
}
@@ -210825,18 +229288,18 @@
"name": null,
"span": {
"begin": [
- 82,
+ 85,
1
],
"end": [
- 84,
+ 87,
14
],
"filename": "checkouts/rust/library/alloc/src/borrow.rs"
},
"visibility": "default"
},
- "1973": {
+ "1971": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -210845,7 +229308,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Converts a [`String`] into an [`OsString`].\n\nThis conversion does not allocate or copy memory.",
- "id": 1973,
+ "id": 1971,
"inner": {
"function": {
"generics": {
@@ -210866,7 +229329,7 @@
{
"resolved_path": {
"args": null,
- "id": 161,
+ "id": 159,
"path": "String"
}
}
@@ -210876,7 +229339,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -210884,8 +229347,8 @@
}
},
"links": {
- "`OsString`": 1709,
- "`String`": 161
+ "`OsString`": 1708,
+ "`String`": 159
},
"name": "from",
"span": {
@@ -210901,7 +229364,7 @@
},
"visibility": "default"
},
- "1974": {
+ "1972": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -210910,14 +229373,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1974,
+ "id": 1972,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -210929,7 +229392,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1973
+ 1971
],
"provided_trait_methods": [],
"trait": {
@@ -210940,7 +229403,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 161,
+ "id": 159,
"path": "String"
}
}
@@ -210969,12 +229432,12 @@
},
"visibility": "default"
},
- "1975": {
+ "1973": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": "Copies any value implementing [AsRef]<[OsStr]>\ninto a newly allocated [`OsString`].",
- "id": 1975,
+ "id": 1973,
"inner": {
"function": {
"generics": {
@@ -211007,7 +229470,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -211016,8 +229479,8 @@
},
"links": {
"AsRef": 35,
- "OsStr": 1720,
- "`OsString`": 1709
+ "OsStr": 1719,
+ "`OsString`": 1708
},
"name": "from",
"span": {
@@ -211033,7 +229496,7 @@
},
"visibility": "default"
},
- "1976": {
+ "1974": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -211042,14 +229505,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1976,
+ "id": 1974,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -211082,7 +229545,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -211110,7 +229573,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1975
+ 1973
],
"provided_trait_methods": [],
"trait": {
@@ -211152,12 +229615,12 @@
},
"visibility": "default"
},
- "1977": {
+ "1975": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1977,
+ "id": 1975,
"inner": {
"assoc_type": {
"bounds": [],
@@ -211168,7 +229631,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -211189,7 +229652,7 @@
},
"visibility": "default"
},
- "1978": {
+ "1976": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -211198,7 +229661,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1978,
+ "id": 1976,
"inner": {
"function": {
"generics": {
@@ -211231,7 +229694,7 @@
{
"resolved_path": {
"args": null,
- "id": 1979,
+ "id": 1977,
"path": "ops::RangeFull"
}
}
@@ -211245,7 +229708,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -211269,7 +229732,7 @@
},
"visibility": "default"
},
- "1980": {
+ "1978": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -211278,14 +229741,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1980,
+ "id": 1978,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -211297,8 +229760,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1977,
- 1978
+ 1975,
+ 1976
],
"provided_trait_methods": [],
"trait": {
@@ -211309,7 +229772,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1979,
+ "id": 1977,
"path": "RangeFull"
}
}
@@ -211338,7 +229801,7 @@
},
"visibility": "default"
},
- "1981": {
+ "1979": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -211347,7 +229810,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1981,
+ "id": 1979,
"inner": {
"function": {
"generics": {
@@ -211380,7 +229843,7 @@
{
"resolved_path": {
"args": null,
- "id": 1979,
+ "id": 1977,
"path": "ops::RangeFull"
}
}
@@ -211394,7 +229857,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -211418,7 +229881,7 @@
},
"visibility": "default"
},
- "1982": {
+ "1980": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"mut_osstr\"}}]"
@@ -211427,14 +229890,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1982,
+ "id": 1980,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -211446,7 +229909,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1981
+ 1979
],
"provided_trait_methods": [],
"trait": {
@@ -211457,7 +229920,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1979,
+ "id": 1977,
"path": "RangeFull"
}
}
@@ -211466,7 +229929,7 @@
"constraints": []
}
},
- "id": 1983,
+ "id": 1981,
"path": "IndexMut"
}
}
@@ -211486,12 +229949,12 @@
},
"visibility": "default"
},
- "1984": {
+ "1982": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1984,
+ "id": 1982,
"inner": {
"assoc_type": {
"bounds": [],
@@ -211502,7 +229965,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -211523,7 +229986,7 @@
},
"visibility": "default"
},
- "1985": {
+ "1983": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -211532,7 +229995,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1985,
+ "id": 1983,
"inner": {
"function": {
"generics": {
@@ -211569,7 +230032,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -211593,7 +230056,7 @@
},
"visibility": "default"
},
- "1986": {
+ "1984": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -211602,14 +230065,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1986,
+ "id": 1984,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -211621,13 +230084,13 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1984,
- 1985
+ 1982,
+ 1983
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 1969,
+ "id": 1967,
"path": "Deref"
}
}
@@ -211647,7 +230110,7 @@
},
"visibility": "default"
},
- "1987": {
+ "1985": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -211656,7 +230119,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1987,
+ "id": 1985,
"inner": {
"function": {
"generics": {
@@ -211693,7 +230156,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -211717,7 +230180,7 @@
},
"visibility": "default"
},
- "1988": {
+ "1986": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 44, patch: 0})}, feature: \"mut_osstr\"}}]"
@@ -211726,14 +230189,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1988,
+ "id": 1986,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -211745,12 +230208,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1987
+ 1985
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 1989,
+ "id": 1987,
"path": "DerefMut"
}
}
@@ -211770,7 +230233,7 @@
},
"visibility": "default"
},
- "1990": {
+ "1988": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -211779,7 +230242,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Constructs an empty `OsString`.",
- "id": 1990,
+ "id": 1988,
"inner": {
"function": {
"generics": {
@@ -211799,7 +230262,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -211821,7 +230284,7 @@
},
"visibility": "default"
},
- "1991": {
+ "1989": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 9, patch: 0})}, feature: \"osstring_default\"}}]"
@@ -211830,14 +230293,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1991,
+ "id": 1989,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -211849,12 +230312,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1990
+ 1988
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 109,
+ "id": 107,
"path": "Default"
}
}
@@ -211874,7 +230337,7 @@
},
"visibility": "default"
},
- "1992": {
+ "1990": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -211883,7 +230346,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1992,
+ "id": 1990,
"inner": {
"function": {
"generics": {
@@ -211934,7 +230397,7 @@
},
"visibility": "default"
},
- "1993": {
+ "1991": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -211943,7 +230406,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Clones the contents of `source` into `self`.\n\nThis method is preferred over simply assigning `source.clone()` to `self`,\nas it avoids reallocation if possible.",
- "id": 1993,
+ "id": 1991,
"inner": {
"function": {
"generics": {
@@ -212004,7 +230467,7 @@
},
"visibility": "default"
},
- "1994": {
+ "1992": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -212013,14 +230476,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1994,
+ "id": 1992,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -212032,15 +230495,15 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1992,
- 1993
+ 1990,
+ 1991
],
"provided_trait_methods": [
"clone_from"
],
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -212060,12 +230523,12 @@
},
"visibility": "default"
},
- "1995": {
+ "1993": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1995,
+ "id": 1993,
"inner": {
"function": {
"generics": {
@@ -212111,7 +230574,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -212123,7 +230586,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -212145,7 +230608,7 @@
},
"visibility": "default"
},
- "1996": {
+ "1994": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -212154,14 +230617,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1996,
+ "id": 1994,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -212173,12 +230636,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1995
+ 1993
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -212198,7 +230661,7 @@
},
"visibility": "default"
},
- "1997": {
+ "1995": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -212207,7 +230670,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1997,
+ "id": 1995,
"inner": {
"function": {
"generics": {
@@ -212244,7 +230707,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -212274,7 +230737,7 @@
},
"visibility": "default"
},
- "1998": {
+ "1996": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -212283,14 +230746,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1998,
+ "id": 1996,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -212302,14 +230765,14 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1997
+ 1995
],
"provided_trait_methods": [
"ne"
],
"trait": {
"args": null,
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -212329,7 +230792,7 @@
},
"visibility": "default"
},
- "1999": {
+ "1997": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -212338,7 +230801,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 1999,
+ "id": 1997,
"inner": {
"function": {
"generics": {
@@ -212401,79 +230864,7 @@
},
"visibility": "default"
},
- "2": {
- "attrs": [
- {
- "other": "#[doc(no_inline)]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 2,
- "inner": {
- "use": {
- "id": 3,
- "is_glob": false,
- "name": "Sized",
- "source": "crate::marker::Sized"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 13,
- 31
- ],
- "end": [
- 13,
- 36
- ],
- "filename": "std/src/prelude/v1.rs"
- },
- "visibility": "public"
- },
- "20": {
- "attrs": [
- {
- "other": "#[doc(no_inline)]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"async_closure\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 20,
- "inner": {
- "use": {
- "id": 21,
- "is_glob": false,
- "name": "AsyncFnOnce",
- "source": "crate::ops::AsyncFnOnce"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 19,
- 43
- ],
- "end": [
- 19,
- 54
- ],
- "filename": "std/src/prelude/v1.rs"
- },
- "visibility": "public"
- },
- "2000": {
+ "1998": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -212482,14 +230873,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2000,
+ "id": 1998,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -212501,7 +230892,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 1999
+ 1997
],
"provided_trait_methods": [
"ne"
@@ -212519,7 +230910,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -212539,7 +230930,7 @@
},
"visibility": "default"
},
- "2001": {
+ "1999": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -212548,7 +230939,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2001,
+ "id": 1999,
"inner": {
"function": {
"generics": {
@@ -212585,7 +230976,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -212615,8 +231006,11 @@
},
"visibility": "default"
},
- "2002": {
+ "2": {
"attrs": [
+ {
+ "other": "#[doc(no_inline)]"
+ },
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
}
@@ -212624,7 +231018,76 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2002,
+ "id": 2,
+ "inner": {
+ "use": {
+ "id": 3,
+ "is_glob": false,
+ "name": "Sized",
+ "source": "crate::marker::Sized"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 13,
+ 31
+ ],
+ "end": [
+ 13,
+ 36
+ ],
+ "filename": "std/src/prelude/v1.rs"
+ },
+ "visibility": "public"
+ },
+ "20": {
+ "attrs": [
+ {
+ "other": "#[doc(no_inline)]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 85, patch: 0})}, feature: \"async_closure\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 20,
+ "inner": {
+ "use": {
+ "id": 21,
+ "is_glob": false,
+ "name": "AsyncFnOnce",
+ "source": "crate::ops::AsyncFnOnce"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 19,
+ 43
+ ],
+ "end": [
+ 19,
+ 54
+ ],
+ "filename": "std/src/prelude/v1.rs"
+ },
+ "visibility": "public"
+ },
+ "2000": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 2000,
"inner": {
"impl": {
"blanket_impl": null,
@@ -212639,7 +231102,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2001
+ 1999
],
"provided_trait_methods": [
"ne"
@@ -212652,7 +231115,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -212661,7 +231124,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -212681,7 +231144,7 @@
},
"visibility": "default"
},
- "2003": {
+ "2001": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -212690,7 +231153,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2003,
+ "id": 2001,
"inner": {
"function": {
"generics": {
@@ -212759,7 +231222,7 @@
},
"visibility": "default"
},
- "2004": {
+ "2002": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 29, patch: 0})}, feature: \"os_str_str_ref_eq\"}}]"
@@ -212768,14 +231231,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2004,
+ "id": 2002,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -212787,7 +231250,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2003
+ 2001
],
"provided_trait_methods": [
"ne"
@@ -212811,7 +231274,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -212831,7 +231294,7 @@
},
"visibility": "default"
},
- "2005": {
+ "2003": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -212840,7 +231303,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2005,
+ "id": 2003,
"inner": {
"function": {
"generics": {
@@ -212877,7 +231340,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -212907,7 +231370,7 @@
},
"visibility": "default"
},
- "2006": {
+ "2004": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 29, patch: 0})}, feature: \"os_str_str_ref_eq\"}}]"
@@ -212916,7 +231379,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2006,
+ "id": 2004,
"inner": {
"impl": {
"blanket_impl": null,
@@ -212946,7 +231409,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2005
+ 2003
],
"provided_trait_methods": [
"ne"
@@ -212959,7 +231422,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -212968,7 +231431,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -212988,7 +231451,7 @@
},
"visibility": "default"
},
- "2007": {
+ "2005": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -212997,14 +231460,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2007,
+ "id": 2005,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -213021,7 +231484,7 @@
],
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -213041,7 +231504,7 @@
},
"visibility": "default"
},
- "2008": {
+ "2006": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -213050,7 +231513,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2008,
+ "id": 2006,
"inner": {
"function": {
"generics": {
@@ -213087,7 +231550,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -213105,7 +231568,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -213136,7 +231599,7 @@
},
"visibility": "default"
},
- "2010": {
+ "2008": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -213145,7 +231608,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2010,
+ "id": 2008,
"inner": {
"function": {
"generics": {
@@ -213182,7 +231645,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -213212,7 +231675,7 @@
},
"visibility": "default"
},
- "2011": {
+ "2009": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -213221,7 +231684,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2011,
+ "id": 2009,
"inner": {
"function": {
"generics": {
@@ -213258,7 +231721,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -213288,7 +231751,7 @@
},
"visibility": "default"
},
- "2012": {
+ "2010": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -213297,7 +231760,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2012,
+ "id": 2010,
"inner": {
"function": {
"generics": {
@@ -213334,7 +231797,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -213364,7 +231827,7 @@
},
"visibility": "default"
},
- "2013": {
+ "2011": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -213373,7 +231836,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2013,
+ "id": 2011,
"inner": {
"function": {
"generics": {
@@ -213410,7 +231873,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -213440,7 +231903,7 @@
},
"visibility": "default"
},
- "2014": {
+ "2012": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -213449,14 +231912,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2014,
+ "id": 2012,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -213468,11 +231931,11 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 2006,
2008,
+ 2009,
2010,
- 2011,
- 2012,
- 2013
+ 2011
],
"provided_trait_methods": [
"lt",
@@ -213486,7 +231949,7 @@
],
"trait": {
"args": null,
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -213506,7 +231969,7 @@
},
"visibility": "default"
},
- "2015": {
+ "2013": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -213515,7 +231978,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2015,
+ "id": 2013,
"inner": {
"function": {
"generics": {
@@ -213566,7 +232029,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -213597,7 +232060,7 @@
},
"visibility": "default"
},
- "2016": {
+ "2014": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -213606,14 +232069,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2016,
+ "id": 2014,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -213625,7 +232088,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2015
+ 2013
],
"provided_trait_methods": [
"lt",
@@ -213650,7 +232113,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -213670,7 +232133,7 @@
},
"visibility": "default"
},
- "2017": {
+ "2015": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -213679,7 +232142,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2017,
+ "id": 2015,
"inner": {
"function": {
"generics": {
@@ -213716,7 +232179,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -213728,7 +232191,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -213750,7 +232213,7 @@
},
"visibility": "default"
},
- "2018": {
+ "2016": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -213759,14 +232222,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2018,
+ "id": 2016,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -213778,7 +232241,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2017
+ 2015
],
"provided_trait_methods": [
"max",
@@ -213787,7 +232250,7 @@
],
"trait": {
"args": null,
- "id": 119,
+ "id": 117,
"path": "Ord"
}
}
@@ -213807,7 +232270,7 @@
},
"visibility": "default"
},
- "2019": {
+ "2017": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -213816,7 +232279,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2019,
+ "id": 2017,
"inner": {
"function": {
"generics": {
@@ -213900,7 +232363,7 @@
},
"visibility": "default"
},
- "2020": {
+ "2018": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -213909,14 +232372,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2020,
+ "id": 2018,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -213928,7 +232391,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2019
+ 2017
],
"provided_trait_methods": [
"hash_slice"
@@ -213955,12 +232418,12 @@
},
"visibility": "default"
},
- "2021": {
+ "2019": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2021,
+ "id": 2019,
"inner": {
"function": {
"generics": {
@@ -214005,7 +232468,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -214027,7 +232490,7 @@
},
"visibility": "default"
},
- "2022": {
+ "2020": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 64, patch: 0})}, feature: \"os_string_fmt_write\"}}]"
@@ -214036,14 +232499,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2022,
+ "id": 2020,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -214055,7 +232518,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2021
+ 2019
],
"provided_trait_methods": [
"write_char",
@@ -214063,7 +232526,7 @@
],
"trait": {
"args": null,
- "id": 2023,
+ "id": 2021,
"path": "Write"
}
}
@@ -214083,7 +232546,7 @@
},
"visibility": "default"
},
- "2024": {
+ "2022": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -214092,7 +232555,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Converts a [Box]<[OsStr]> into an [`OsString`] without copying or\nallocating.",
- "id": 2024,
+ "id": 2022,
"inner": {
"function": {
"generics": {
@@ -214119,7 +232582,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -214128,7 +232591,7 @@
"constraints": []
}
},
- "id": 159,
+ "id": 157,
"path": "Box"
}
}
@@ -214138,7 +232601,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -214146,25 +232609,25 @@
}
},
"links": {
- "Box": 159,
- "OsStr": 1720,
- "`OsString`": 1709
+ "Box": 157,
+ "OsStr": 1719,
+ "`OsString`": 1708
},
"name": "from",
"span": {
"begin": [
- 1315,
+ 1320,
5
],
"end": [
- 1317,
+ 1322,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2025": {
+ "2023": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 18, patch: 0})}, feature: \"os_string_from_box\"}}]"
@@ -214173,14 +232636,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2025,
+ "id": 2023,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -214192,7 +232655,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2024
+ 2022
],
"provided_trait_methods": [],
"trait": {
@@ -214209,7 +232672,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -214218,7 +232681,7 @@
"constraints": []
}
},
- "id": 159,
+ "id": 157,
"path": "Box"
}
}
@@ -214236,18 +232699,18 @@
"name": null,
"span": {
"begin": [
- 1311,
+ 1316,
1
],
"end": [
- 1318,
+ 1323,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2026": {
+ "2024": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -214256,7 +232719,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Converts an [`OsString`] into a [Box]<[OsStr]> without copying or allocating.",
- "id": 2026,
+ "id": 2024,
"inner": {
"function": {
"generics": {
@@ -214277,7 +232740,7 @@
{
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -214293,7 +232756,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -214302,7 +232765,7 @@
"constraints": []
}
},
- "id": 159,
+ "id": 157,
"path": "Box"
}
}
@@ -214310,18 +232773,183 @@
}
},
"links": {
- "Box": 159,
- "OsStr": 1720,
- "`OsString`": 1709
+ "Box": 157,
+ "OsStr": 1719,
+ "`OsString`": 1708
},
"name": "from",
"span": {
"begin": [
- 1324,
+ 1329,
5
],
"end": [
+ 1331,
+ 6
+ ],
+ "filename": "std/src/ffi/os_str.rs"
+ },
+ "visibility": "default"
+ },
+ "2025": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 20, patch: 0})}, feature: \"box_from_os_string\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 2025,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 1719,
+ "path": "OsStr"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 157,
+ "path": "Box"
+ }
+ },
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 2024
+ ],
+ "provided_trait_methods": [],
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 1708,
+ "path": "OsString"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 37,
+ "path": "From"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
1326,
+ 1
+ ],
+ "end": [
+ 1332,
+ 2
+ ],
+ "filename": "std/src/ffi/os_str.rs"
+ },
+ "visibility": "default"
+ },
+ "2026": {
+ "attrs": [
+ {
+ "other": "#[attr = Inline(Hint)]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": "Converts an [`OsString`] into an [Arc]<[OsStr]> by moving the [`OsString`]\ndata into a new [`Arc`] buffer.",
+ "id": 2026,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "s",
+ {
+ "resolved_path": {
+ "args": null,
+ "id": 1708,
+ "path": "OsString"
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 1719,
+ "path": "OsStr"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 606,
+ "path": "Arc"
+ }
+ }
+ }
+ }
+ },
+ "links": {
+ "Arc": 606,
+ "OsStr": 1719,
+ "`Arc`": 606,
+ "`OsString`": 1708
+ },
+ "name": "from",
+ "span": {
+ "begin": [
+ 1357,
+ 5
+ ],
+ "end": [
+ 1360,
6
],
"filename": "std/src/ffi/os_str.rs"
@@ -214331,7 +232959,7 @@
"2027": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 20, patch: 0})}, feature: \"box_from_os_string\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 24, patch: 0})}, feature: \"shared_from_slice2\"}}]"
}
],
"crate_id": 0,
@@ -214350,7 +232978,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -214359,8 +232987,8 @@
"constraints": []
}
},
- "id": 159,
- "path": "Box"
+ "id": 606,
+ "path": "crate::sync::Arc"
}
},
"generics": {
@@ -214382,7 +233010,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -214400,183 +233028,18 @@
"name": null,
"span": {
"begin": [
- 1321,
+ 1353,
1
],
"end": [
- 1327,
+ 1361,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2028": {
- "attrs": [
- {
- "other": "#[attr = Inline(Hint)]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": "Converts an [`OsString`] into an [Arc]<[OsStr]> by moving the [`OsString`]\ndata into a new [`Arc`] buffer.",
- "id": 2028,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "s",
- {
- "resolved_path": {
- "args": null,
- "id": 1709,
- "path": "OsString"
- }
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 1720,
- "path": "OsStr"
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 606,
- "path": "Arc"
- }
- }
- }
- }
- },
- "links": {
- "Arc": 606,
- "OsStr": 1720,
- "`Arc`": 606,
- "`OsString`": 1709
- },
- "name": "from",
- "span": {
- "begin": [
- 1352,
- 5
- ],
- "end": [
- 1355,
- 6
- ],
- "filename": "std/src/ffi/os_str.rs"
- },
- "visibility": "default"
- },
"2029": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 24, patch: 0})}, feature: \"shared_from_slice2\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 2029,
- "inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 1720,
- "path": "OsStr"
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 606,
- "path": "crate::sync::Arc"
- }
- },
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 2028
- ],
- "provided_trait_methods": [],
- "trait": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 1709,
- "path": "OsString"
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 37,
- "path": "From"
- }
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 1348,
- 1
- ],
- "end": [
- 1356,
- 2
- ],
- "filename": "std/src/ffi/os_str.rs"
- },
- "visibility": "default"
- },
- "2031": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -214585,7 +233048,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Converts an [`OsString`] into an [Rc]<[OsStr]> by moving the [`OsString`]\ndata into a new [`Rc`] buffer.",
- "id": 2031,
+ "id": 2029,
"inner": {
"function": {
"generics": {
@@ -214606,7 +233069,7 @@
{
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -214622,7 +233085,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -214631,7 +233094,7 @@
"constraints": []
}
},
- "id": 2030,
+ "id": 2028,
"path": "Rc"
}
}
@@ -214639,26 +233102,26 @@
}
},
"links": {
- "OsStr": 1720,
- "Rc": 2030,
- "`OsString`": 1709,
- "`Rc`": 2030
+ "OsStr": 1719,
+ "Rc": 2028,
+ "`OsString`": 1708,
+ "`Rc`": 2028
},
"name": "from",
"span": {
"begin": [
- 1382,
+ 1387,
5
],
"end": [
- 1385,
+ 1390,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2032": {
+ "2030": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 24, patch: 0})}, feature: \"shared_from_slice2\"}}]"
@@ -214667,7 +233130,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2032,
+ "id": 2030,
"inner": {
"impl": {
"blanket_impl": null,
@@ -214680,7 +233143,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -214689,7 +233152,7 @@
"constraints": []
}
},
- "id": 2030,
+ "id": 2028,
"path": "crate::rc::Rc"
}
},
@@ -214701,7 +233164,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2031
+ 2029
],
"provided_trait_methods": [],
"trait": {
@@ -214712,7 +233175,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -214730,18 +233193,18 @@
"name": null,
"span": {
"begin": [
- 1378,
+ 1383,
1
],
"end": [
- 1386,
+ 1391,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2034": {
+ "2032": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -214750,7 +233213,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Moves the string into a [`Cow::Owned`].",
- "id": 2034,
+ "id": 2032,
"inner": {
"function": {
"generics": {
@@ -214771,7 +233234,7 @@
{
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -214790,7 +233253,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -214799,7 +233262,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -214807,23 +233270,23 @@
}
},
"links": {
- "`Cow::Owned`": 2033
+ "`Cow::Owned`": 2031
},
"name": "from",
"span": {
"begin": [
- 1411,
+ 1416,
5
],
"end": [
- 1413,
+ 1418,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2036": {
+ "2034": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 28, patch: 0})}, feature: \"cow_from_osstr\"}}]"
@@ -214832,7 +233295,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2036,
+ "id": 2034,
"inner": {
"impl": {
"blanket_impl": null,
@@ -214848,7 +233311,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -214857,7 +233320,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "crate::borrow::Cow"
}
},
@@ -214878,7 +233341,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2034
+ 2032
],
"provided_trait_methods": [],
"trait": {
@@ -214889,7 +233352,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -214907,18 +233370,18 @@
"name": null,
"span": {
"begin": [
- 1408,
+ 1413,
1
],
"end": [
- 1414,
+ 1419,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2038": {
+ "2036": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -214927,7 +233390,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Converts the string reference into a [`Cow::Borrowed`].",
- "id": 2038,
+ "id": 2036,
"inner": {
"function": {
"generics": {
@@ -214952,7 +233415,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -214973,7 +233436,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -214982,7 +233445,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -214990,23 +233453,23 @@
}
},
"links": {
- "`Cow::Borrowed`": 2037
+ "`Cow::Borrowed`": 2035
},
"name": "from",
"span": {
"begin": [
- 1429,
+ 1434,
5
],
"end": [
- 1431,
+ 1436,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2039": {
+ "2037": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 28, patch: 0})}, feature: \"cow_from_osstr\"}}]"
@@ -215015,7 +233478,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2039,
+ "id": 2037,
"inner": {
"impl": {
"blanket_impl": null,
@@ -215031,7 +233494,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -215040,7 +233503,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "crate::borrow::Cow"
}
},
@@ -215061,7 +233524,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2038
+ 2036
],
"provided_trait_methods": [],
"trait": {
@@ -215076,7 +233539,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -215096,18 +233559,18 @@
"name": null,
"span": {
"begin": [
- 1426,
+ 1431,
1
],
"end": [
- 1432,
+ 1437,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2040": {
+ "2038": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -215116,7 +233579,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Converts a `Cow<'a, OsStr>` into an [`OsString`],\nby copying the contents if they are borrowed.",
- "id": 2040,
+ "id": 2038,
"inner": {
"function": {
"generics": {
@@ -215146,7 +233609,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -215155,7 +233618,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -215169,23 +233632,23 @@
}
},
"links": {
- "`OsString`": 1709
+ "`OsString`": 1708
},
"name": "from",
"span": {
"begin": [
- 1439,
+ 1444,
5
],
"end": [
- 1441,
+ 1446,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2041": {
+ "2039": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 28, patch: 0})}, feature: \"osstring_from_cow_osstr\"}}]"
@@ -215194,14 +233657,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2041,
+ "id": 2039,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -215222,7 +233685,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2040
+ 2038
],
"provided_trait_methods": [],
"trait": {
@@ -215242,7 +233705,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -215251,7 +233714,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -215269,18 +233732,18 @@
"name": null,
"span": {
"begin": [
- 1435,
+ 1440,
1
],
"end": [
- 1442,
+ 1447,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2042": {
+ "2040": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -215289,7 +233752,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2042,
+ "id": 2040,
"inner": {
"function": {
"generics": {
@@ -215326,7 +233789,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -215345,18 +233808,18 @@
"name": "eq",
"span": {
"begin": [
- 1586,
+ 1591,
1
],
"end": [
- 1586,
+ 1591,
27
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2043": {
+ "2041": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_os_str\"}}]"
@@ -215365,14 +233828,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2043,
+ "id": 2041,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -215401,7 +233864,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2042
+ 2040
],
"provided_trait_methods": [
"ne"
@@ -215414,7 +233877,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -215423,7 +233886,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -215432,18 +233895,18 @@
"name": null,
"span": {
"begin": [
- 1586,
+ 1591,
1
],
"end": [
- 1586,
+ 1591,
27
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2044": {
+ "2042": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -215452,7 +233915,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2044,
+ "id": 2042,
"inner": {
"function": {
"generics": {
@@ -215489,7 +233952,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -215508,18 +233971,18 @@
"name": "eq",
"span": {
"begin": [
- 1586,
+ 1591,
1
],
"end": [
- 1586,
+ 1591,
27
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2045": {
+ "2043": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_os_str\"}}]"
@@ -215528,14 +233991,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2045,
+ "id": 2043,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
},
@@ -215564,7 +234027,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2044
+ 2042
],
"provided_trait_methods": [
"ne"
@@ -215577,7 +234040,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -215586,7 +234049,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -215595,18 +234058,18 @@
"name": null,
"span": {
"begin": [
- 1586,
+ 1591,
1
],
"end": [
- 1586,
+ 1591,
27
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2046": {
+ "2044": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -215615,7 +234078,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2046,
+ "id": 2044,
"inner": {
"function": {
"generics": {
@@ -215652,7 +234115,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -215670,7 +234133,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -215690,18 +234153,18 @@
"name": "partial_cmp",
"span": {
"begin": [
- 1586,
+ 1591,
1
],
"end": [
- 1586,
+ 1591,
27
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2047": {
+ "2045": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_os_str\"}}]"
@@ -215710,14 +234173,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2047,
+ "id": 2045,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -215746,7 +234209,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2046
+ 2044
],
"provided_trait_methods": [
"lt",
@@ -215766,7 +234229,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -215775,7 +234238,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -215784,18 +234247,18 @@
"name": null,
"span": {
"begin": [
- 1586,
+ 1591,
1
],
"end": [
- 1586,
+ 1591,
27
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2048": {
+ "2046": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -215804,7 +234267,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2048,
+ "id": 2046,
"inner": {
"function": {
"generics": {
@@ -215841,7 +234304,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -215859,7 +234322,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -215879,18 +234342,18 @@
"name": "partial_cmp",
"span": {
"begin": [
- 1586,
+ 1591,
1
],
"end": [
- 1586,
+ 1591,
27
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2049": {
+ "2047": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_os_str\"}}]"
@@ -215899,14 +234362,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2049,
+ "id": 2047,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
},
@@ -215935,7 +234398,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2048
+ 2046
],
"provided_trait_methods": [
"lt",
@@ -215955,7 +234418,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -215964,7 +234427,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -215973,18 +234436,18 @@
"name": null,
"span": {
"begin": [
- 1586,
+ 1591,
1
],
"end": [
- 1586,
+ 1591,
27
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2050": {
+ "2048": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -215993,7 +234456,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2050,
+ "id": 2048,
"inner": {
"function": {
"generics": {
@@ -216034,7 +234497,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -216055,18 +234518,18 @@
"name": "eq",
"span": {
"begin": [
- 1587,
+ 1592,
1
],
"end": [
- 1587,
+ 1592,
31
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2051": {
+ "2049": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_os_str\"}}]"
@@ -216075,14 +234538,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2051,
+ "id": 2049,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -216111,7 +234574,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2050
+ 2048
],
"provided_trait_methods": [
"ne"
@@ -216128,7 +234591,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -216139,7 +234602,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -216148,18 +234611,18 @@
"name": null,
"span": {
"begin": [
- 1587,
+ 1592,
1
],
"end": [
- 1587,
+ 1592,
31
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2052": {
+ "2050": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -216168,7 +234631,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2052,
+ "id": 2050,
"inner": {
"function": {
"generics": {
@@ -216205,7 +234668,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -216224,18 +234687,18 @@
"name": "eq",
"span": {
"begin": [
- 1587,
+ 1592,
1
],
"end": [
- 1587,
+ 1592,
31
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2053": {
+ "2051": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_os_str\"}}]"
@@ -216244,7 +234707,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2053,
+ "id": 2051,
"inner": {
"impl": {
"blanket_impl": null,
@@ -216255,7 +234718,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -216286,7 +234749,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2052
+ 2050
],
"provided_trait_methods": [
"ne"
@@ -216299,7 +234762,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -216308,7 +234771,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -216317,18 +234780,18 @@
"name": null,
"span": {
"begin": [
- 1587,
+ 1592,
1
],
"end": [
- 1587,
+ 1592,
31
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2054": {
+ "2052": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -216337,7 +234800,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2054,
+ "id": 2052,
"inner": {
"function": {
"generics": {
@@ -216378,7 +234841,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -216398,7 +234861,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -216418,18 +234881,18 @@
"name": "partial_cmp",
"span": {
"begin": [
- 1587,
+ 1592,
1
],
"end": [
- 1587,
+ 1592,
31
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2055": {
+ "2053": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_os_str\"}}]"
@@ -216438,14 +234901,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2055,
+ "id": 2053,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -216474,7 +234937,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2054
+ 2052
],
"provided_trait_methods": [
"lt",
@@ -216498,7 +234961,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -216509,7 +234972,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -216518,18 +234981,18 @@
"name": null,
"span": {
"begin": [
- 1587,
+ 1592,
1
],
"end": [
- 1587,
+ 1592,
31
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2056": {
+ "2054": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -216538,7 +235001,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2056,
+ "id": 2054,
"inner": {
"function": {
"generics": {
@@ -216575,7 +235038,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -216593,7 +235056,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -216613,18 +235076,18 @@
"name": "partial_cmp",
"span": {
"begin": [
- 1587,
+ 1592,
1
],
"end": [
- 1587,
+ 1592,
31
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2057": {
+ "2055": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_os_str\"}}]"
@@ -216633,7 +235096,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2057,
+ "id": 2055,
"inner": {
"impl": {
"blanket_impl": null,
@@ -216644,7 +235107,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -216675,7 +235138,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2056
+ 2054
],
"provided_trait_methods": [
"lt",
@@ -216695,7 +235158,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -216704,7 +235167,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -216713,18 +235176,18 @@
"name": null,
"span": {
"begin": [
- 1587,
+ 1592,
1
],
"end": [
- 1587,
+ 1592,
31
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2058": {
+ "2056": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -216733,7 +235196,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2058,
+ "id": 2056,
"inner": {
"function": {
"generics": {
@@ -216770,7 +235233,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -216789,18 +235252,18 @@
"name": "eq",
"span": {
"begin": [
- 1590,
+ 1595,
1
],
"end": [
- 1590,
+ 1595,
36
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2059": {
+ "2057": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_os_str\"}}]"
@@ -216809,7 +235272,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2059,
+ "id": 2057,
"inner": {
"impl": {
"blanket_impl": null,
@@ -216825,7 +235288,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -216834,7 +235297,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "crate::borrow::Cow"
}
},
@@ -216863,7 +235326,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2058
+ 2056
],
"provided_trait_methods": [
"ne"
@@ -216876,7 +235339,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -216885,7 +235348,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -216894,18 +235357,18 @@
"name": null,
"span": {
"begin": [
- 1590,
+ 1595,
1
],
"end": [
- 1590,
+ 1595,
36
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2060": {
+ "2058": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -216914,7 +235377,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2060,
+ "id": 2058,
"inner": {
"function": {
"generics": {
@@ -216960,7 +235423,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -216969,7 +235432,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -216988,18 +235451,18 @@
"name": "eq",
"span": {
"begin": [
- 1590,
+ 1595,
1
],
"end": [
- 1590,
+ 1595,
36
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2061": {
+ "2059": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_os_str\"}}]"
@@ -217008,14 +235471,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2061,
+ "id": 2059,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -217044,7 +235507,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2060
+ 2058
],
"provided_trait_methods": [
"ne"
@@ -217066,7 +235529,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -217075,7 +235538,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -217084,7 +235547,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -217093,18 +235556,18 @@
"name": null,
"span": {
"begin": [
- 1590,
+ 1595,
1
],
"end": [
- 1590,
+ 1595,
36
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2062": {
+ "2060": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -217113,7 +235576,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2062,
+ "id": 2060,
"inner": {
"function": {
"generics": {
@@ -217150,7 +235613,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -217168,7 +235631,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -217188,18 +235651,18 @@
"name": "partial_cmp",
"span": {
"begin": [
- 1590,
+ 1595,
1
],
"end": [
- 1590,
+ 1595,
36
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2063": {
+ "2061": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_os_str\"}}]"
@@ -217208,7 +235671,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2063,
+ "id": 2061,
"inner": {
"impl": {
"blanket_impl": null,
@@ -217224,7 +235687,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -217233,7 +235696,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "crate::borrow::Cow"
}
},
@@ -217262,7 +235725,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2062
+ 2060
],
"provided_trait_methods": [
"lt",
@@ -217282,7 +235745,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -217291,7 +235754,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -217300,18 +235763,18 @@
"name": null,
"span": {
"begin": [
- 1590,
+ 1595,
1
],
"end": [
- 1590,
+ 1595,
36
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2064": {
+ "2062": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -217320,7 +235783,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2064,
+ "id": 2062,
"inner": {
"function": {
"generics": {
@@ -217366,7 +235829,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -217375,7 +235838,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -217393,7 +235856,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -217413,18 +235876,18 @@
"name": "partial_cmp",
"span": {
"begin": [
- 1590,
+ 1595,
1
],
"end": [
- 1590,
+ 1595,
36
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2065": {
+ "2063": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_os_str\"}}]"
@@ -217433,14 +235896,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2065,
+ "id": 2063,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -217469,7 +235932,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2064
+ 2062
],
"provided_trait_methods": [
"lt",
@@ -217498,7 +235961,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -217507,7 +235970,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -217516,7 +235979,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -217525,18 +235988,18 @@
"name": null,
"span": {
"begin": [
- 1590,
+ 1595,
1
],
"end": [
- 1590,
+ 1595,
36
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2066": {
+ "2064": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -217545,7 +236008,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2066,
+ "id": 2064,
"inner": {
"function": {
"generics": {
@@ -217582,7 +236045,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -217595,18 +236058,18 @@
"name": "borrow",
"span": {
"begin": [
- 1665,
+ 1670,
5
],
"end": [
- 1667,
+ 1672,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2067": {
+ "2065": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -217615,14 +236078,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2067,
+ "id": 2065,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -217634,7 +236097,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2066
+ 2064
],
"provided_trait_methods": [],
"trait": {
@@ -217645,7 +236108,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -217654,7 +236117,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -217663,18 +236126,18 @@
"name": null,
"span": {
"begin": [
- 1663,
+ 1668,
1
],
"end": [
- 1668,
+ 1673,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2068": {
+ "2066": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -217683,7 +236146,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2068,
+ "id": 2066,
"inner": {
"function": {
"generics": {
@@ -217720,7 +236183,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -217733,18 +236196,18 @@
"name": "as_ref",
"span": {
"begin": [
- 1694,
+ 1700,
5
],
"end": [
- 1696,
+ 1702,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2069": {
+ "2067": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -217753,14 +236216,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2069,
+ "id": 2067,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -217772,7 +236235,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2068
+ 2066
],
"provided_trait_methods": [],
"trait": {
@@ -217783,7 +236246,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -217801,23 +236264,23 @@
"name": null,
"span": {
"begin": [
- 1692,
+ 1698,
1
],
"end": [
- 1697,
+ 1703,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2070": {
+ "2068": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2070,
+ "id": 2068,
"inner": {
"assoc_type": {
"bounds": [],
@@ -217828,7 +236291,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 335,
+ "id": 333,
"path": "Infallible"
}
}
@@ -217838,18 +236301,18 @@
"name": "Err",
"span": {
"begin": [
- 1738,
+ 1744,
5
],
"end": [
- 1738,
+ 1744,
42
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2071": {
+ "2069": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -217858,7 +236321,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2071,
+ "id": 2069,
"inner": {
"function": {
"generics": {
@@ -217908,7 +236371,7 @@
},
"trait": {
"args": null,
- "id": 2072,
+ "id": 2070,
"path": ""
}
}
@@ -217929,18 +236392,18 @@
"name": "from_str",
"span": {
"begin": [
- 1741,
+ 1747,
5
],
"end": [
- 1743,
+ 1749,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2073": {
+ "2071": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 45, patch: 0})}, feature: \"osstring_from_str\"}}]"
@@ -217949,14 +236412,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2073,
+ "id": 2071,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -217968,13 +236431,13 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2070,
- 2071
+ 2068,
+ 2069
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 2072,
+ "id": 2070,
"path": "FromStr"
}
}
@@ -217983,18 +236446,18 @@
"name": null,
"span": {
"begin": [
- 1737,
+ 1743,
1
],
"end": [
- 1744,
+ 1750,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2074": {
+ "2072": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -218003,7 +236466,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2074,
+ "id": 2072,
"inner": {
"function": {
"generics": {
@@ -218028,7 +236491,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -218091,18 +236554,18 @@
"name": "extend",
"span": {
"begin": [
- 1749,
+ 1755,
5
],
"end": [
- 1753,
+ 1759,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2075": {
+ "2073": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"osstring_extend\"}}]"
@@ -218111,14 +236574,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2075,
+ "id": 2073,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -218130,7 +236593,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2074
+ 2072
],
"provided_trait_methods": [
"extend_one",
@@ -218145,7 +236608,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -218163,18 +236626,18 @@
"name": null,
"span": {
"begin": [
- 1747,
+ 1753,
1
],
"end": [
- 1754,
+ 1760,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2076": {
+ "2074": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -218183,7 +236646,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2076,
+ "id": 2074,
"inner": {
"function": {
"generics": {
@@ -218212,7 +236675,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -218277,18 +236740,18 @@
"name": "extend",
"span": {
"begin": [
- 1759,
+ 1765,
5
],
"end": [
- 1763,
+ 1769,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2077": {
+ "2075": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"osstring_extend\"}}]"
@@ -218297,14 +236760,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2077,
+ "id": 2075,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -218325,7 +236788,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2076
+ 2074
],
"provided_trait_methods": [
"extend_one",
@@ -218344,7 +236807,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -218364,18 +236827,18 @@
"name": null,
"span": {
"begin": [
- 1757,
+ 1763,
1
],
"end": [
- 1764,
+ 1770,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2078": {
+ "2076": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -218384,7 +236847,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2078,
+ "id": 2076,
"inner": {
"function": {
"generics": {
@@ -218418,7 +236881,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -218427,7 +236890,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -218490,18 +236953,18 @@
"name": "extend",
"span": {
"begin": [
- 1769,
+ 1775,
5
],
"end": [
- 1773,
+ 1779,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2079": {
+ "2077": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"osstring_extend\"}}]"
@@ -218510,14 +236973,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2079,
+ "id": 2077,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -218538,7 +237001,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2078
+ 2076
],
"provided_trait_methods": [
"extend_one",
@@ -218562,7 +237025,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -218571,7 +237034,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -218589,18 +237052,18 @@
"name": null,
"span": {
"begin": [
- 1767,
+ 1773,
1
],
"end": [
- 1774,
+ 1780,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2080": {
+ "2078": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -218609,7 +237072,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2080,
+ "id": 2078,
"inner": {
"function": {
"generics": {
@@ -218634,7 +237097,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -218687,18 +237150,18 @@
"name": "from_iter",
"span": {
"begin": [
- 1779,
+ 1785,
5
],
"end": [
- 1792,
+ 1798,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2081": {
+ "2079": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"osstring_extend\"}}]"
@@ -218707,14 +237170,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2081,
+ "id": 2079,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -218726,7 +237189,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2080
+ 2078
],
"provided_trait_methods": [],
"trait": {
@@ -218737,7 +237200,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -218746,7 +237209,7 @@
"constraints": []
}
},
- "id": 201,
+ "id": 199,
"path": "FromIterator"
}
}
@@ -218755,18 +237218,18 @@
"name": null,
"span": {
"begin": [
- 1777,
+ 1783,
1
],
"end": [
- 1793,
+ 1799,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2082": {
+ "2080": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -218775,7 +237238,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2082,
+ "id": 2080,
"inner": {
"function": {
"generics": {
@@ -218804,7 +237267,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -218859,18 +237322,18 @@
"name": "from_iter",
"span": {
"begin": [
- 1798,
+ 1804,
5
],
"end": [
- 1804,
+ 1810,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2083": {
+ "2081": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"osstring_extend\"}}]"
@@ -218879,14 +237342,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2083,
+ "id": 2081,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -218907,7 +237370,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2082
+ 2080
],
"provided_trait_methods": [],
"trait": {
@@ -218922,7 +237385,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -218933,7 +237396,7 @@
"constraints": []
}
},
- "id": 201,
+ "id": 199,
"path": "FromIterator"
}
}
@@ -218942,18 +237405,18 @@
"name": null,
"span": {
"begin": [
- 1796,
+ 1802,
1
],
"end": [
- 1805,
+ 1811,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2084": {
+ "2082": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -218962,7 +237425,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2084,
+ "id": 2082,
"inner": {
"function": {
"generics": {
@@ -218996,7 +237459,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -219005,7 +237468,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -219058,18 +237521,18 @@
"name": "from_iter",
"span": {
"begin": [
- 1810,
+ 1816,
5
],
"end": [
- 1828,
+ 1834,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2085": {
+ "2083": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 52, patch: 0})}, feature: \"osstring_extend\"}}]"
@@ -219078,14 +237541,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2085,
+ "id": 2083,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
},
@@ -219106,7 +237569,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2084
+ 2082
],
"provided_trait_methods": [],
"trait": {
@@ -219126,7 +237589,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -219135,7 +237598,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -219144,7 +237607,7 @@
"constraints": []
}
},
- "id": 201,
+ "id": 199,
"path": "FromIterator"
}
}
@@ -219153,18 +237616,18 @@
"name": null,
"span": {
"begin": [
- 1808,
+ 1814,
1
],
"end": [
- 1829,
+ 1835,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2086": {
+ "2084": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -219173,7 +237636,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2086,
+ "id": 2084,
"inner": {
"function": {
"generics": {
@@ -219205,7 +237668,7 @@
"constraints": []
}
},
- "id": 165,
+ "id": 163,
"path": "Vec"
}
}
@@ -219215,7 +237678,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -219237,7 +237700,7 @@
},
"visibility": "default"
},
- "2087": {
+ "2085": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -219246,7 +237709,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2087,
+ "id": 2085,
"inner": {
"function": {
"generics": {
@@ -219284,7 +237747,7 @@
"constraints": []
}
},
- "id": 165,
+ "id": 163,
"path": "Vec"
}
}
@@ -219306,7 +237769,7 @@
},
"visibility": "default"
},
- "2088": {
+ "2086": {
"attrs": [
{
"other": "#[doc(cfg(unix))]"
@@ -219318,14 +237781,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2088,
+ "id": 2086,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "crate::ffi::OsString"
}
},
@@ -219337,13 +237800,13 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2086,
- 2087
+ 2084,
+ 2085
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 2089,
+ "id": 2087,
"path": "OsStringExt"
}
}
@@ -219363,7 +237826,7 @@
},
"visibility": "default"
},
- "2089": {
+ "2087": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -219372,7 +237835,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Platform-specific extensions to [`OsString`].\n\nThis trait is sealed: it cannot be implemented outside the standard library.\nThis is so that future additional methods are not breaking changes.",
- "id": 2089,
+ "id": 2087,
"inner": {
"trait": {
"bounds": [
@@ -219382,7 +237845,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 3814,
+ "id": 3813,
"path": "Sealed"
}
}
@@ -219393,19 +237856,19 @@
"where_predicates": []
},
"implementations": [
- 2088
+ 2086
],
"is_auto": false,
"is_dyn_compatible": false,
"is_unsafe": false,
"items": [
- 2401,
- 2402
+ 2399,
+ 2400
]
}
},
"links": {
- "`OsString`": 1709
+ "`OsString`": 1708
},
"name": "OsStringExt",
"span": {
@@ -219421,7 +237884,7 @@
},
"visibility": "public"
},
- "2090": {
+ "2088": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -219430,7 +237893,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2090,
+ "id": 2088,
"inner": {
"function": {
"generics": {
@@ -219462,7 +237925,7 @@
"constraints": []
}
},
- "id": 165,
+ "id": 163,
"path": "Vec"
}
}
@@ -219472,7 +237935,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -219494,7 +237957,7 @@
},
"visibility": "default"
},
- "2091": {
+ "2089": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -219503,7 +237966,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2091,
+ "id": 2089,
"inner": {
"function": {
"generics": {
@@ -219541,7 +238004,7 @@
"constraints": []
}
},
- "id": 165,
+ "id": 163,
"path": "Vec"
}
}
@@ -219563,7 +238026,7 @@
},
"visibility": "default"
},
- "2092": {
+ "2090": {
"attrs": [
{
"other": "#[doc(cfg(target_os = \"wasi\"))]"
@@ -219575,14 +238038,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2092,
+ "id": 2090,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "crate::ffi::OsString"
}
},
@@ -219594,13 +238057,13 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2090,
- 2091
+ 2088,
+ 2089
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 2093,
+ "id": 2091,
"path": "OsStringExt"
}
}
@@ -219620,7 +238083,7 @@
},
"visibility": "default"
},
- "2093": {
+ "2091": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -219629,7 +238092,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Platform-specific extensions to [`OsString`].\n\nThis trait is sealed: it cannot be implemented outside the standard library.\nThis is so that future additional methods are not breaking changes.",
- "id": 2093,
+ "id": 2091,
"inner": {
"trait": {
"bounds": [
@@ -219639,7 +238102,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 3814,
+ "id": 3813,
"path": "Sealed"
}
}
@@ -219650,19 +238113,19 @@
"where_predicates": []
},
"implementations": [
- 2092
+ 2090
],
"is_auto": false,
"is_dyn_compatible": false,
"is_unsafe": false,
"items": [
- 5553,
- 5554
+ 5558,
+ 5559
]
}
},
"links": {
- "`OsString`": 1709
+ "`OsString`": 1708
},
"name": "OsStringExt",
"span": {
@@ -219678,12 +238141,12 @@
},
"visibility": "public"
},
- "2094": {
+ "2092": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2094,
+ "id": 2092,
"inner": {
"function": {
"generics": {
@@ -219718,7 +238181,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -219729,18 +238192,18 @@
"name": "from_wide",
"span": {
"begin": [
- 93,
+ 94,
5
],
"end": [
- 95,
+ 96,
6
],
"filename": "std/src/os/windows/ffi.rs"
},
"visibility": "default"
},
- "2095": {
+ "2093": {
"attrs": [
{
"other": "#[doc(cfg(windows))]"
@@ -219752,14 +238215,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2095,
+ "id": 2093,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "crate::ffi::OsString"
}
},
@@ -219771,12 +238234,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2094
+ 2092
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 2096,
+ "id": 2094,
"path": "OsStringExt"
}
}
@@ -219785,18 +238248,18 @@
"name": null,
"span": {
"begin": [
- 92,
+ 93,
1
],
"end": [
- 96,
+ 97,
2
],
"filename": "std/src/os/windows/ffi.rs"
},
"visibility": "default"
},
- "2096": {
+ "2094": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -219805,7 +238268,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Windows-specific extensions to [`OsString`].\n\nThis trait is sealed: it cannot be implemented outside the standard library.\nThis is so that future additional methods are not breaking changes.",
- "id": 2096,
+ "id": 2094,
"inner": {
"trait": {
"bounds": [
@@ -219815,7 +238278,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 3814,
+ "id": 3813,
"path": "Sealed"
}
}
@@ -219826,34 +238289,34 @@
"where_predicates": []
},
"implementations": [
- 2095
+ 2093
],
"is_auto": false,
"is_dyn_compatible": false,
"is_unsafe": false,
"items": [
- 2405
+ 2403
]
}
},
"links": {
- "`OsString`": 1709
+ "`OsString`": 1708
},
"name": "OsStringExt",
"span": {
"begin": [
- 69,
+ 70,
1
],
"end": [
- 89,
+ 90,
2
],
"filename": "std/src/os/windows/ffi.rs"
},
"visibility": "public"
},
- "2097": {
+ "2095": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -219862,7 +238325,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Converts an [`OsString`] into a [`PathBuf`].\n\nThis conversion does not allocate or copy memory.",
- "id": 2097,
+ "id": 2095,
"inner": {
"function": {
"generics": {
@@ -219883,7 +238346,7 @@
{
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -219893,7 +238356,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "PathBuf"
}
}
@@ -219901,24 +238364,24 @@
}
},
"links": {
- "`OsString`": 1709,
- "`PathBuf`": 1664
+ "`OsString`": 1708,
+ "`PathBuf`": 1663
},
"name": "from",
"span": {
"begin": [
- 1855,
+ 1946,
5
],
"end": [
- 1857,
+ 1948,
6
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2098": {
+ "2096": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -219927,14 +238390,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2098,
+ "id": 2096,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "PathBuf"
}
},
@@ -219946,7 +238409,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2097
+ 2095
],
"provided_trait_methods": [],
"trait": {
@@ -219957,7 +238420,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -219975,18 +238438,18 @@
"name": null,
"span": {
"begin": [
- 1850,
+ 1941,
1
],
"end": [
- 1858,
+ 1949,
2
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2099": {
+ "2097": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -219995,7 +238458,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Converts a [`PathBuf`] into an [`OsString`]\n\nThis conversion does not allocate or copy memory.",
- "id": 2099,
+ "id": 2097,
"inner": {
"function": {
"generics": {
@@ -220016,7 +238479,7 @@
{
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "PathBuf"
}
}
@@ -220026,7 +238489,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -220034,24 +238497,24 @@
}
},
"links": {
- "`OsString`": 1709,
- "`PathBuf`": 1664
+ "`OsString`": 1708,
+ "`PathBuf`": 1663
},
"name": "from",
"span": {
"begin": [
- 1866,
+ 1957,
5
],
"end": [
- 1868,
+ 1959,
6
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2100": {
+ "2098": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 14, patch: 0})}, feature: \"from_path_buf_for_os_string\"}}]"
@@ -220060,14 +238523,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2100,
+ "id": 2098,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "crate::ffi::OsString"
}
},
@@ -220079,7 +238542,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2099
+ 2097
],
"provided_trait_methods": [],
"trait": {
@@ -220090,7 +238553,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "PathBuf"
}
}
@@ -220108,18 +238571,18 @@
"name": null,
"span": {
"begin": [
- 1861,
+ 1952,
1
],
"end": [
- 1869,
+ 1960,
2
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2101": {
+ "2099": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -220128,7 +238591,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2101,
+ "id": 2099,
"inner": {
"function": {
"generics": {
@@ -220165,7 +238628,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -220178,18 +238641,18 @@
"name": "as_ref",
"span": {
"begin": [
- 3536,
+ 3726,
5
],
"end": [
- 3538,
+ 3728,
6
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2102": {
+ "2100": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -220198,14 +238661,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2102,
+ "id": 2100,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "crate::ffi::OsString"
}
},
@@ -220217,7 +238680,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2101
+ 2099
],
"provided_trait_methods": [],
"trait": {
@@ -220228,7 +238691,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -220246,18 +238709,18 @@
"name": null,
"span": {
"begin": [
- 3534,
+ 3724,
1
],
"end": [
- 3539,
+ 3729,
2
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2103": {
+ "2101": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -220266,7 +238729,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2103,
+ "id": 2101,
"inner": {
"function": {
"generics": {
@@ -220303,7 +238766,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -220322,18 +238785,18 @@
"name": "eq",
"span": {
"begin": [
- 3666,
+ 3856,
1
],
"end": [
- 3666,
+ 3856,
39
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2104": {
+ "2102": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -220342,14 +238805,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2104,
+ "id": 2102,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "PathBuf"
}
},
@@ -220361,7 +238824,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2103
+ 2101
],
"provided_trait_methods": [
"ne"
@@ -220374,7 +238837,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -220383,7 +238846,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -220392,18 +238855,18 @@
"name": null,
"span": {
"begin": [
- 3666,
+ 3856,
1
],
"end": [
- 3666,
+ 3856,
39
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2105": {
+ "2103": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -220412,7 +238875,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2105,
+ "id": 2103,
"inner": {
"function": {
"generics": {
@@ -220449,7 +238912,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "PathBuf"
}
}
@@ -220468,18 +238931,18 @@
"name": "eq",
"span": {
"begin": [
- 3666,
+ 3856,
1
],
"end": [
- 3666,
+ 3856,
39
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2106": {
+ "2104": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -220488,14 +238951,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2106,
+ "id": 2104,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "crate::ffi::OsString"
}
},
@@ -220507,7 +238970,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2105
+ 2103
],
"provided_trait_methods": [
"ne"
@@ -220520,7 +238983,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "PathBuf"
}
}
@@ -220529,7 +238992,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -220538,18 +239001,18 @@
"name": null,
"span": {
"begin": [
- 3666,
+ 3856,
1
],
"end": [
- 3666,
+ 3856,
39
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2107": {
+ "2105": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -220558,7 +239021,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2107,
+ "id": 2105,
"inner": {
"function": {
"generics": {
@@ -220595,7 +239058,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -220613,7 +239076,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -220633,18 +239096,18 @@
"name": "partial_cmp",
"span": {
"begin": [
- 3666,
+ 3856,
1
],
"end": [
- 3666,
+ 3856,
39
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2108": {
+ "2106": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -220653,14 +239116,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2108,
+ "id": 2106,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "PathBuf"
}
},
@@ -220672,7 +239135,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2107
+ 2105
],
"provided_trait_methods": [
"lt",
@@ -220692,7 +239155,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -220701,7 +239164,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -220710,18 +239173,18 @@
"name": null,
"span": {
"begin": [
- 3666,
+ 3856,
1
],
"end": [
- 3666,
+ 3856,
39
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2109": {
+ "2107": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -220730,7 +239193,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2109,
+ "id": 2107,
"inner": {
"function": {
"generics": {
@@ -220767,7 +239230,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "PathBuf"
}
}
@@ -220785,7 +239248,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -220805,18 +239268,18 @@
"name": "partial_cmp",
"span": {
"begin": [
- 3666,
+ 3856,
1
],
"end": [
- 3666,
+ 3856,
39
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2110": {
+ "2108": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -220825,14 +239288,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2110,
+ "id": 2108,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "crate::ffi::OsString"
}
},
@@ -220844,7 +239307,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2109
+ 2107
],
"provided_trait_methods": [
"lt",
@@ -220864,7 +239327,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "PathBuf"
}
}
@@ -220873,7 +239336,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -220882,18 +239345,18 @@
"name": null,
"span": {
"begin": [
- 3666,
+ 3856,
1
],
"end": [
- 3666,
+ 3856,
39
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2111": {
+ "2109": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -220902,7 +239365,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2111,
+ "id": 2109,
"inner": {
"function": {
"generics": {
@@ -220939,7 +239402,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -220958,18 +239421,18 @@
"name": "eq",
"span": {
"begin": [
- 3670,
+ 3860,
1
],
"end": [
- 3670,
+ 3860,
36
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2112": {
+ "2110": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -220978,14 +239441,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2112,
+ "id": 2110,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
},
@@ -220997,7 +239460,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2111
+ 2109
],
"provided_trait_methods": [
"ne"
@@ -221010,7 +239473,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -221019,7 +239482,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -221028,18 +239491,18 @@
"name": null,
"span": {
"begin": [
- 3670,
+ 3860,
1
],
"end": [
- 3670,
+ 3860,
36
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2113": {
+ "2111": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -221048,7 +239511,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2113,
+ "id": 2111,
"inner": {
"function": {
"generics": {
@@ -221085,7 +239548,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -221104,18 +239567,18 @@
"name": "eq",
"span": {
"begin": [
- 3670,
+ 3860,
1
],
"end": [
- 3670,
+ 3860,
36
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2114": {
+ "2112": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -221124,14 +239587,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2114,
+ "id": 2112,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "crate::ffi::OsString"
}
},
@@ -221143,7 +239606,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2113
+ 2111
],
"provided_trait_methods": [
"ne"
@@ -221156,7 +239619,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -221165,7 +239628,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -221174,18 +239637,18 @@
"name": null,
"span": {
"begin": [
- 3670,
+ 3860,
1
],
"end": [
- 3670,
+ 3860,
36
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2115": {
+ "2113": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -221194,7 +239657,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2115,
+ "id": 2113,
"inner": {
"function": {
"generics": {
@@ -221231,7 +239694,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -221249,7 +239712,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -221269,18 +239732,18 @@
"name": "partial_cmp",
"span": {
"begin": [
- 3670,
+ 3860,
1
],
"end": [
- 3670,
+ 3860,
36
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2116": {
+ "2114": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -221289,14 +239752,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2116,
+ "id": 2114,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
},
@@ -221308,7 +239771,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2115
+ 2113
],
"provided_trait_methods": [
"lt",
@@ -221328,7 +239791,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -221337,7 +239800,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -221346,18 +239809,18 @@
"name": null,
"span": {
"begin": [
- 3670,
+ 3860,
1
],
"end": [
- 3670,
+ 3860,
36
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2117": {
+ "2115": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -221366,7 +239829,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2117,
+ "id": 2115,
"inner": {
"function": {
"generics": {
@@ -221403,7 +239866,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -221421,7 +239884,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -221441,18 +239904,18 @@
"name": "partial_cmp",
"span": {
"begin": [
- 3670,
+ 3860,
1
],
"end": [
- 3670,
+ 3860,
36
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2118": {
+ "2116": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -221461,14 +239924,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2118,
+ "id": 2116,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "crate::ffi::OsString"
}
},
@@ -221480,7 +239943,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2117
+ 2115
],
"provided_trait_methods": [
"lt",
@@ -221500,7 +239963,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -221509,7 +239972,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -221518,18 +239981,18 @@
"name": null,
"span": {
"begin": [
- 3670,
+ 3860,
1
],
"end": [
- 3670,
+ 3860,
36
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2119": {
+ "2117": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -221538,7 +240001,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2119,
+ "id": 2117,
"inner": {
"function": {
"generics": {
@@ -221575,7 +240038,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -221594,18 +240057,18 @@
"name": "eq",
"span": {
"begin": [
- 3673,
+ 3863,
1
],
"end": [
- 3673,
+ 3863,
42
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2120": {
+ "2118": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -221614,7 +240077,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2120,
+ "id": 2118,
"inner": {
"impl": {
"blanket_impl": null,
@@ -221625,7 +240088,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -221648,7 +240111,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2119
+ 2117
],
"provided_trait_methods": [
"ne"
@@ -221661,7 +240124,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -221670,7 +240133,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -221679,18 +240142,18 @@
"name": null,
"span": {
"begin": [
- 3673,
+ 3863,
1
],
"end": [
- 3673,
+ 3863,
42
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2121": {
+ "2119": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -221699,7 +240162,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2121,
+ "id": 2119,
"inner": {
"function": {
"generics": {
@@ -221740,7 +240203,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -221761,18 +240224,18 @@
"name": "eq",
"span": {
"begin": [
- 3673,
+ 3863,
1
],
"end": [
- 3673,
+ 3863,
42
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2122": {
+ "2120": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -221781,14 +240244,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2122,
+ "id": 2120,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "crate::ffi::OsString"
}
},
@@ -221809,7 +240272,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2121
+ 2119
],
"provided_trait_methods": [
"ne"
@@ -221826,7 +240289,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -221837,7 +240300,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -221846,18 +240309,18 @@
"name": null,
"span": {
"begin": [
- 3673,
+ 3863,
1
],
"end": [
- 3673,
+ 3863,
42
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2123": {
+ "2121": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -221866,7 +240329,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2123,
+ "id": 2121,
"inner": {
"function": {
"generics": {
@@ -221903,7 +240366,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -221921,7 +240384,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -221941,18 +240404,18 @@
"name": "partial_cmp",
"span": {
"begin": [
- 3673,
+ 3863,
1
],
"end": [
- 3673,
+ 3863,
42
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2124": {
+ "2122": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -221961,7 +240424,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2124,
+ "id": 2122,
"inner": {
"impl": {
"blanket_impl": null,
@@ -221972,7 +240435,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -221995,7 +240458,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2123
+ 2121
],
"provided_trait_methods": [
"lt",
@@ -222015,7 +240478,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -222024,7 +240487,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -222033,18 +240496,18 @@
"name": null,
"span": {
"begin": [
- 3673,
+ 3863,
1
],
"end": [
- 3673,
+ 3863,
42
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2125": {
+ "2123": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -222053,7 +240516,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2125,
+ "id": 2123,
"inner": {
"function": {
"generics": {
@@ -222094,7 +240557,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -222114,7 +240577,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -222134,18 +240597,18 @@
"name": "partial_cmp",
"span": {
"begin": [
- 3673,
+ 3863,
1
],
"end": [
- 3673,
+ 3863,
42
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2126": {
+ "2124": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -222154,14 +240617,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2126,
+ "id": 2124,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "crate::ffi::OsString"
}
},
@@ -222182,7 +240645,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2125
+ 2123
],
"provided_trait_methods": [
"lt",
@@ -222206,7 +240669,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -222217,7 +240680,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -222226,18 +240689,18 @@
"name": null,
"span": {
"begin": [
- 3673,
+ 3863,
1
],
"end": [
- 3673,
+ 3863,
42
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2127": {
+ "2125": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -222246,7 +240709,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2127,
+ "id": 2125,
"inner": {
"function": {
"generics": {
@@ -222283,7 +240746,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -222302,18 +240765,18 @@
"name": "eq",
"span": {
"begin": [
- 3676,
+ 3866,
1
],
"end": [
- 3676,
+ 3866,
47
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2128": {
+ "2126": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -222322,7 +240785,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2128,
+ "id": 2126,
"inner": {
"impl": {
"blanket_impl": null,
@@ -222338,7 +240801,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -222347,7 +240810,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "crate::borrow::Cow"
}
},
@@ -222368,7 +240831,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2127
+ 2125
],
"provided_trait_methods": [
"ne"
@@ -222381,7 +240844,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -222390,7 +240853,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -222399,18 +240862,18 @@
"name": null,
"span": {
"begin": [
- 3676,
+ 3866,
1
],
"end": [
- 3676,
+ 3866,
47
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2129": {
+ "2127": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -222419,7 +240882,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2129,
+ "id": 2127,
"inner": {
"function": {
"generics": {
@@ -222465,7 +240928,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -222474,7 +240937,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -222493,18 +240956,18 @@
"name": "eq",
"span": {
"begin": [
- 3676,
+ 3866,
1
],
"end": [
- 3676,
+ 3866,
47
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2130": {
+ "2128": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -222513,14 +240976,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2130,
+ "id": 2128,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "crate::ffi::OsString"
}
},
@@ -222541,7 +241004,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2129
+ 2127
],
"provided_trait_methods": [
"ne"
@@ -222563,7 +241026,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -222572,7 +241035,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -222581,7 +241044,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -222590,18 +241053,18 @@
"name": null,
"span": {
"begin": [
- 3676,
+ 3866,
1
],
"end": [
- 3676,
+ 3866,
47
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2131": {
+ "2129": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -222610,7 +241073,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2131,
+ "id": 2129,
"inner": {
"function": {
"generics": {
@@ -222647,11 +241110,228 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
+ "path": "OsString"
+ }
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 2007,
+ "path": "cmp::Ordering"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 51,
+ "path": "Option"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "partial_cmp",
+ "span": {
+ "begin": [
+ 3866,
+ 1
+ ],
+ "end": [
+ 3866,
+ 47
+ ],
+ "filename": "std/src/path.rs"
+ },
+ "visibility": "default"
+ },
+ "2130": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 2130,
+ "inner": {
+ "impl": {
+ "blanket_impl": null,
+ "for": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 1666,
+ "path": "Path"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 2033,
+ "path": "crate::borrow::Cow"
+ }
+ },
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "lifetime": {
+ "outlives": []
+ }
+ },
+ "name": "'a"
+ }
+ ],
+ "where_predicates": []
+ },
+ "is_negative": false,
+ "is_synthetic": false,
+ "is_unsafe": false,
+ "items": [
+ 2129
+ ],
+ "provided_trait_methods": [
+ "lt",
+ "le",
+ "gt",
+ "ge",
+ "__chaining_lt",
+ "__chaining_le",
+ "__chaining_gt",
+ "__chaining_ge"
+ ],
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 1708,
"path": "OsString"
}
}
}
+ ],
+ "constraints": []
+ }
+ },
+ "id": 125,
+ "path": "PartialOrd"
+ }
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 3866,
+ 1
+ ],
+ "end": [
+ 3866,
+ 47
+ ],
+ "filename": "std/src/path.rs"
+ },
+ "visibility": "default"
+ },
+ "2131": {
+ "attrs": [
+ {
+ "other": "#[attr = Inline(Hint)]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 2131,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
+ }
+ ],
+ [
+ "other",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'a"
+ },
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 1666,
+ "path": "Path"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 2033,
+ "path": "Cow"
+ }
+ }
+ }
}
]
],
@@ -222665,7 +241345,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -222685,11 +241365,11 @@
"name": "partial_cmp",
"span": {
"begin": [
- 3676,
+ 3866,
1
],
"end": [
- 3676,
+ 3866,
47
],
"filename": "std/src/path.rs"
@@ -222706,230 +241386,13 @@
"deprecation": null,
"docs": null,
"id": 2132,
- "inner": {
- "impl": {
- "blanket_impl": null,
- "for": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 1667,
- "path": "Path"
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 2035,
- "path": "crate::borrow::Cow"
- }
- },
- "generics": {
- "params": [
- {
- "kind": {
- "lifetime": {
- "outlives": []
- }
- },
- "name": "'a"
- }
- ],
- "where_predicates": []
- },
- "is_negative": false,
- "is_synthetic": false,
- "is_unsafe": false,
- "items": [
- 2131
- ],
- "provided_trait_methods": [
- "lt",
- "le",
- "gt",
- "ge",
- "__chaining_lt",
- "__chaining_le",
- "__chaining_gt",
- "__chaining_ge"
- ],
- "trait": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 1709,
- "path": "OsString"
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 127,
- "path": "PartialOrd"
- }
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 3676,
- 1
- ],
- "end": [
- 3676,
- 47
- ],
- "filename": "std/src/path.rs"
- },
- "visibility": "default"
- },
- "2133": {
- "attrs": [
- {
- "other": "#[attr = Inline(Hint)]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 2133,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
- }
- ],
- [
- "other",
- {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "lifetime": "'a"
- },
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 1667,
- "path": "Path"
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 2035,
- "path": "Cow"
- }
- }
- }
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "resolved_path": {
- "args": {
- "angle_bracketed": {
- "args": [
- {
- "type": {
- "resolved_path": {
- "args": null,
- "id": 2009,
- "path": "cmp::Ordering"
- }
- }
- }
- ],
- "constraints": []
- }
- },
- "id": 51,
- "path": "Option"
- }
- }
- }
- }
- },
- "links": {},
- "name": "partial_cmp",
- "span": {
- "begin": [
- 3676,
- 1
- ],
- "end": [
- 3676,
- 47
- ],
- "filename": "std/src/path.rs"
- },
- "visibility": "default"
- },
- "2134": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 2134,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "crate::ffi::OsString"
}
},
@@ -222950,7 +241413,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2133
+ 2131
],
"provided_trait_methods": [
"lt",
@@ -222979,7 +241442,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -222988,7 +241451,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -222997,7 +241460,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -223006,19 +241469,22 @@
"name": null,
"span": {
"begin": [
- 3676,
+ 3866,
1
],
"end": [
- 3676,
+ 3866,
47
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2136": {
+ "2134": {
"attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 143773, is_soft: false}, feature: \"const_convert\", promotable: false}}]"
+ },
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
},
@@ -223029,7 +241495,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Coerces into an `OsStr` slice.\n\n# Examples\n\n```\nuse std::ffi::OsStr;\n\nlet os_str = OsStr::new(\"foo\");\n```",
- "id": 2136,
+ "id": 2134,
"inner": {
"function": {
"generics": {
@@ -223041,7 +241507,7 @@
{
"trait_bound": {
"generic_params": [],
- "modifier": "none",
+ "modifier": "maybe_const",
"trait": {
"args": {
"angle_bracketed": {
@@ -223050,7 +241516,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -223089,7 +241555,7 @@
"header": {
"abi": "Rust",
"is_async": false,
- "is_const": false,
+ "is_const": true,
"is_unsafe": false
},
"sig": {
@@ -223115,7 +241581,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -223128,18 +241594,18 @@
"name": "new",
"span": {
"begin": [
- 831,
+ 832,
5
],
"end": [
- 833,
+ 834,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "public"
},
- "2137": {
+ "2135": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 74, patch: 0})}, feature: \"os_str_bytes\"}}]"
@@ -223151,7 +241617,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Converts a slice of bytes to an OS string slice without checking that the string contains\nvalid `OsStr`-encoded data.\n\nThe byte encoding is an unspecified, platform-specific, self-synchronizing superset of UTF-8.\nBy being a self-synchronizing superset of UTF-8, this encoding is also a superset of 7-bit\nASCII.\n\nSee the [module's toplevel documentation about conversions][conversions] for safe,\ncross-platform [conversions] from/to native representations.\n\n# Safety\n\nAs the encoding is unspecified, callers must pass in bytes that originated as a mixture of\nvalidated UTF-8 and bytes from [`OsStr::as_encoded_bytes`] from within the same Rust version\nbuilt for the same target platform. For example, reconstructing an `OsStr` from bytes sent\nover the network or stored in a file will likely violate these safety rules.\n\nDue to the encoding being self-synchronizing, the bytes from [`OsStr::as_encoded_bytes`] can be\nsplit either immediately before or immediately after any valid non-empty UTF-8 substring.\n\n# Example\n\n```\nuse std::ffi::OsStr;\n\nlet os_str = OsStr::new(\"Mary had a little lamb\");\nlet bytes = os_str.as_encoded_bytes();\nlet words = bytes.split(|b| *b == b' ');\nlet words: Vec<&OsStr> = words.map(|word| {\n // SAFETY:\n // - Each `word` only contains content that originated from `OsStr::as_encoded_bytes`\n // - Only split with ASCII whitespace which is a non-empty UTF-8 substring\n unsafe { OsStr::from_encoded_bytes_unchecked(word) }\n}).collect();\n```\n\n[conversions]: super#conversions",
- "id": 2137,
+ "id": 2135,
"inner": {
"function": {
"generics": {
@@ -223196,24 +241662,24 @@
}
},
"links": {
- "`OsStr::as_encoded_bytes`": 1935,
- "super#conversions": 1934
+ "`OsStr::as_encoded_bytes`": 1933,
+ "super#conversions": 1932
},
"name": "from_encoded_bytes_unchecked",
"span": {
"begin": [
- 874,
+ 875,
5
],
"end": [
- 876,
+ 877,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "public"
},
- "2138": {
+ "2136": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -223230,7 +241696,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Yields a &[str] slice if the `OsStr` is valid Unicode.\n\nThis conversion may entail doing a check for UTF-8 validity.\n\n# Examples\n\n```\nuse std::ffi::OsStr;\n\nlet os_str = OsStr::new(\"foo\");\nassert_eq!(os_str.to_str(), Some(\"foo\"));\n```",
- "id": 2138,
+ "id": 2136,
"inner": {
"function": {
"generics": {
@@ -223288,23 +241754,23 @@
}
},
"links": {
- "str": 1928
+ "str": 1926
},
"name": "to_str",
"span": {
"begin": [
- 910,
+ 913,
5
],
"end": [
- 912,
+ 915,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "public"
},
- "2140": {
+ "2138": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -223321,7 +241787,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Converts an `OsStr` to a [Cow]<[str]>.\n\nAny non-UTF-8 sequences are replaced with\n[`U+FFFD REPLACEMENT CHARACTER`][U+FFFD].\n\n[U+FFFD]: crate::char::REPLACEMENT_CHARACTER\n\n# Examples\n\nCalling `to_string_lossy` on an `OsStr` with invalid unicode:\n\n```\n// Note, due to differences in how Unix and Windows represent strings,\n// we are forced to complicate this example, setting up example `OsStr`s\n// with different source data and via different platform extensions.\n// Understand that in reality you could end up with such example invalid\n// sequences simply through collecting user command line arguments, for\n// example.\n\n#[cfg(unix)] {\n use std::ffi::OsStr;\n use std::os::unix::ffi::OsStrExt;\n\n // Here, the values 0x66 and 0x6f correspond to 'f' and 'o'\n // respectively. The value 0x80 is a lone continuation byte, invalid\n // in a UTF-8 sequence.\n let source = [0x66, 0x6f, 0x80, 0x6f];\n let os_str = OsStr::from_bytes(&source[..]);\n\n assert_eq!(os_str.to_string_lossy(), \"fo�o\");\n}\n#[cfg(windows)] {\n use std::ffi::OsString;\n use std::os::windows::prelude::*;\n\n // Here the values 0x0066 and 0x006f correspond to 'f' and 'o'\n // respectively. The value 0xD800 is a lone surrogate half, invalid\n // in a UTF-16 sequence.\n let source = [0x0066, 0x006f, 0xD800, 0x006f];\n let os_string = OsString::from_wide(&source[..]);\n let os_str = os_string.as_os_str();\n\n assert_eq!(os_str.to_string_lossy(), \"fo�o\");\n}\n```",
- "id": 2140,
+ "id": 2138,
"inner": {
"function": {
"generics": {
@@ -223368,7 +241834,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -223376,25 +241842,25 @@
}
},
"links": {
- "Cow": 2035,
- "crate::char::REPLACEMENT_CHARACTER": 2139,
- "str": 1928
+ "Cow": 2033,
+ "crate::char::REPLACEMENT_CHARACTER": 2137,
+ "str": 1926
},
"name": "to_string_lossy",
"span": {
"begin": [
- 963,
+ 966,
5
],
"end": [
- 965,
+ 968,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "public"
},
- "2141": {
+ "2139": {
"attrs": [
{
"other": "#[(not(test), rustc_diagnostic_item = \"os_str_to_os_string\")]"
@@ -223417,7 +241883,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Copies the slice into an owned [`OsString`].\n\n# Examples\n\n```\nuse std::ffi::{OsStr, OsString};\n\nlet os_str = OsStr::new(\"foo\");\nlet os_string = os_str.to_os_string();\nassert_eq!(os_string, OsString::from(\"foo\"));\n```",
- "id": 2141,
+ "id": 2139,
"inner": {
"function": {
"generics": {
@@ -223450,7 +241916,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -223458,23 +241924,23 @@
}
},
"links": {
- "`OsString`": 1709
+ "`OsString`": 1708
},
"name": "to_os_string",
"span": {
"begin": [
- 983,
+ 986,
5
],
"end": [
- 985,
+ 988,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "public"
},
- "2142": {
+ "2140": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 9, patch: 0})}, feature: \"osstring_simple_functions\"}}]"
@@ -223491,7 +241957,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Checks whether the `OsStr` is empty.\n\n# Examples\n\n```\nuse std::ffi::OsStr;\n\nlet os_str = OsStr::new(\"\");\nassert!(os_str.is_empty());\n\nlet os_str = OsStr::new(\"foo\");\nassert!(!os_str.is_empty());\n```",
- "id": 2142,
+ "id": 2140,
"inner": {
"function": {
"generics": {
@@ -223531,18 +241997,18 @@
"name": "is_empty",
"span": {
"begin": [
- 1003,
+ 1006,
5
],
"end": [
- 1005,
+ 1008,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "public"
},
- "2143": {
+ "2141": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 9, patch: 0})}, feature: \"osstring_simple_functions\"}}]"
@@ -223559,7 +242025,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Returns the length of this `OsStr`.\n\nNote that this does **not** return the number of bytes in the string in\nOS string form.\n\nThe length returned is that of the underlying storage used by `OsStr`.\nAs discussed in the [`OsString`] introduction, [`OsString`] and `OsStr`\nstore strings in a form best suited for cheap inter-conversion between\nnative-platform and Rust string forms, which may differ significantly\nfrom both of them, including in storage size and encoding.\n\nThis number is simply useful for passing to other methods, like\n[`OsString::with_capacity`] to avoid reallocations.\n\nSee the main `OsString` documentation information about encoding and capacity units.\n\n# Examples\n\n```\nuse std::ffi::OsStr;\n\nlet os_str = OsStr::new(\"\");\nassert_eq!(os_str.len(), 0);\n\nlet os_str = OsStr::new(\"foo\");\nassert_eq!(os_str.len(), 3);\n```",
- "id": 2143,
+ "id": 2141,
"inner": {
"function": {
"generics": {
@@ -223596,24 +242062,24 @@
}
},
"links": {
- "`OsString::with_capacity`": 1939,
- "`OsString`": 1709
+ "`OsString::with_capacity`": 1937,
+ "`OsString`": 1708
},
"name": "len",
"span": {
"begin": [
- 1037,
+ 1040,
5
],
"end": [
- 1039,
+ 1042,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "public"
},
- "2144": {
+ "2142": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 20, patch: 0})}, feature: \"into_boxed_os_str\"}}]"
@@ -223627,7 +242093,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Converts a [Box]<[OsStr]> into an [`OsString`] without copying or allocating.",
- "id": 2144,
+ "id": 2142,
"inner": {
"function": {
"generics": {
@@ -223659,7 +242125,7 @@
"constraints": []
}
},
- "id": 159,
+ "id": 157,
"path": "Box"
}
}
@@ -223669,7 +242135,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -223677,25 +242143,25 @@
}
},
"links": {
- "Box": 159,
- "OsStr": 1720,
- "`OsString`": 1709
+ "Box": 157,
+ "OsStr": 1719,
+ "`OsString`": 1708
},
"name": "into_os_string",
"span": {
"begin": [
- 1044,
+ 1047,
5
],
"end": [
- 1047,
+ 1050,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "public"
},
- "2146": {
+ "2144": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 53, patch: 0})}, feature: \"osstring_ascii\"}}]"
@@ -223709,7 +242175,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Returns a copy of this string where each character is mapped to its\nASCII lower case equivalent.\n\nASCII letters 'A' to 'Z' are mapped to 'a' to 'z',\nbut non-ASCII letters are unchanged.\n\nTo lowercase the value in-place, use [`OsStr::make_ascii_lowercase`].\n\n# Examples\n\n```\nuse std::ffi::OsString;\nlet s = OsString::from(\"Grüße, Jürgen ❤\");\n\nassert_eq!(\"grüße, jürgen ❤\", s.to_ascii_lowercase());\n```",
- "id": 2146,
+ "id": 2144,
"inner": {
"function": {
"generics": {
@@ -223742,7 +242208,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -223750,23 +242216,23 @@
}
},
"links": {
- "`OsStr::make_ascii_lowercase`": 2147
+ "`OsStr::make_ascii_lowercase`": 2145
},
"name": "to_ascii_lowercase",
"span": {
"begin": [
- 1187,
+ 1190,
5
],
"end": [
- 1189,
+ 1192,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "public"
},
- "2147": {
+ "2145": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 53, patch: 0})}, feature: \"osstring_ascii\"}}]"
@@ -223778,7 +242244,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Converts this string to its ASCII lower case equivalent in-place.\n\nASCII letters 'A' to 'Z' are mapped to 'a' to 'z',\nbut non-ASCII letters are unchanged.\n\nTo return a new lowercased value without modifying the existing one, use\n[`OsStr::to_ascii_lowercase`].\n\n# Examples\n\n```\nuse std::ffi::OsString;\n\nlet mut s = OsString::from(\"GRÜßE, JÜRGEN ❤\");\n\ns.make_ascii_lowercase();\n\nassert_eq!(\"grÜße, jÜrgen ❤\", s);\n```",
- "id": 2147,
+ "id": 2145,
"inner": {
"function": {
"generics": {
@@ -223813,23 +242279,23 @@
}
},
"links": {
- "`OsStr::to_ascii_lowercase`": 2146
+ "`OsStr::to_ascii_lowercase`": 2144
},
"name": "make_ascii_lowercase",
"span": {
"begin": [
- 1140,
+ 1143,
5
],
"end": [
- 1142,
+ 1145,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "public"
},
- "2148": {
+ "2146": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 53, patch: 0})}, feature: \"osstring_ascii\"}}]"
@@ -223843,7 +242309,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Returns a copy of this string where each character is mapped to its\nASCII upper case equivalent.\n\nASCII letters 'a' to 'z' are mapped to 'A' to 'Z',\nbut non-ASCII letters are unchanged.\n\nTo uppercase the value in-place, use [`OsStr::make_ascii_uppercase`].\n\n# Examples\n\n```\nuse std::ffi::OsString;\nlet s = OsString::from(\"Grüße, Jürgen ❤\");\n\nassert_eq!(\"GRüßE, JüRGEN ❤\", s.to_ascii_uppercase());\n```",
- "id": 2148,
+ "id": 2146,
"inner": {
"function": {
"generics": {
@@ -223876,7 +242342,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -223884,23 +242350,23 @@
}
},
"links": {
- "`OsStr::make_ascii_uppercase`": 2149
+ "`OsStr::make_ascii_uppercase`": 2147
},
"name": "to_ascii_uppercase",
"span": {
"begin": [
- 1209,
+ 1212,
5
],
"end": [
- 1211,
+ 1214,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "public"
},
- "2149": {
+ "2147": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 53, patch: 0})}, feature: \"osstring_ascii\"}}]"
@@ -223912,7 +242378,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Converts this string to its ASCII upper case equivalent in-place.\n\nASCII letters 'a' to 'z' are mapped to 'A' to 'Z',\nbut non-ASCII letters are unchanged.\n\nTo return a new uppercased value without modifying the existing one, use\n[`OsStr::to_ascii_uppercase`].\n\n# Examples\n\n```\nuse std::ffi::OsString;\n\nlet mut s = OsString::from(\"Grüße, Jürgen ❤\");\n\ns.make_ascii_uppercase();\n\nassert_eq!(\"GRüßE, JüRGEN ❤\", s);\n```",
- "id": 2149,
+ "id": 2147,
"inner": {
"function": {
"generics": {
@@ -223947,23 +242413,23 @@
}
},
"links": {
- "`OsStr::to_ascii_uppercase`": 2148
+ "`OsStr::to_ascii_uppercase`": 2146
},
"name": "make_ascii_uppercase",
"span": {
"begin": [
- 1165,
+ 1168,
5
],
"end": [
- 1167,
+ 1170,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "public"
},
- "2150": {
+ "2148": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 53, patch: 0})}, feature: \"osstring_ascii\"}}]"
@@ -223979,8 +242445,8 @@
],
"crate_id": 0,
"deprecation": null,
- "docs": "Checks if all characters in this string are within the ASCII range.\n\n# Examples\n\n```\nuse std::ffi::OsString;\n\nlet ascii = OsString::from(\"hello!\\n\");\nlet non_ascii = OsString::from(\"Grüße, Jürgen ❤\");\n\nassert!(ascii.is_ascii());\nassert!(!non_ascii.is_ascii());\n```",
- "id": 2150,
+ "docs": "Checks if all characters in this string are within the ASCII range.\n\nAn empty string returns `true`.\n\n# Examples\n\n```\nuse std::ffi::OsString;\n\nlet ascii = OsString::from(\"hello!\\n\");\nlet non_ascii = OsString::from(\"Grüße, Jürgen ❤\");\n\nassert!(ascii.is_ascii());\nassert!(!non_ascii.is_ascii());\n```",
+ "id": 2148,
"inner": {
"function": {
"generics": {
@@ -224020,18 +242486,18 @@
"name": "is_ascii",
"span": {
"begin": [
- 1229,
+ 1234,
5
],
"end": [
- 1231,
+ 1236,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "public"
},
- "2151": {
+ "2149": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 53, patch: 0})}, feature: \"osstring_ascii\"}}]"
@@ -224040,7 +242506,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Checks that two strings are an ASCII case-insensitive match.\n\nSame as `to_ascii_lowercase(a) == to_ascii_lowercase(b)`,\nbut without allocating and copying temporaries.\n\n# Examples\n\n```\nuse std::ffi::OsString;\n\nassert!(OsString::from(\"Ferris\").eq_ignore_ascii_case(\"FERRIS\"));\nassert!(OsString::from(\"Ferrös\").eq_ignore_ascii_case(\"FERRöS\"));\nassert!(!OsString::from(\"Ferrös\").eq_ignore_ascii_case(\"FERRÖS\"));\n```",
- "id": 2151,
+ "id": 2149,
"inner": {
"function": {
"generics": {
@@ -224061,7 +242527,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -224124,18 +242590,18 @@
"name": "eq_ignore_ascii_case",
"span": {
"begin": [
- 1248,
+ 1253,
5
],
"end": [
- 1250,
+ 1255,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "public"
},
- "2152": {
+ "2150": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"os_str_display\"}}]"
@@ -224152,7 +242618,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Returns an object that implements [`Display`] for safely printing an\n[`OsStr`] that may contain non-Unicode data. This may perform lossy\nconversion, depending on the platform. If you would like an\nimplementation which escapes the [`OsStr`] please use [`Debug`]\ninstead.\n\n[`Display`]: fmt::Display\n[`Debug`]: fmt::Debug\n\n# Examples\n\n```\nuse std::ffi::OsStr;\n\nlet s = OsStr::new(\"Hello, world!\");\nprintln!(\"{}\", s.display());\n```",
- "id": 2152,
+ "id": 2150,
"inner": {
"function": {
"generics": {
@@ -224194,7 +242660,7 @@
"constraints": []
}
},
- "id": 2153,
+ "id": 2151,
"path": "Display"
}
}
@@ -224202,25 +242668,25 @@
}
},
"links": {
- "`OsStr`": 1720,
- "fmt::Debug": 346,
+ "`OsStr`": 1719,
+ "fmt::Debug": 344,
"fmt::Display": 436
},
"name": "display",
"span": {
"begin": [
- 1273,
+ 1278,
5
],
"end": [
- 1275,
+ 1280,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "public"
},
- "2153": {
+ "2151": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"os_str_display\"}}]"
@@ -224229,7 +242695,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Helper struct for safely printing an [`OsStr`] with [`format!`] and `{}`.\n\nAn [`OsStr`] might contain non-Unicode data. This `struct` implements the\n[`Display`] trait in a way that mitigates that. It is created by the\n[`display`](OsStr::display) method on [`OsStr`]. This may perform lossy\nconversion, depending on the platform. If you would like an implementation\nwhich escapes the [`OsStr`] please use [`Debug`] instead.\n\n# Examples\n\n```\nuse std::ffi::OsStr;\n\nlet s = OsStr::new(\"Hello, world!\");\nprintln!(\"{}\", s.display());\n```\n\n[`Display`]: fmt::Display\n[`format!`]: crate::format",
- "id": 2153,
+ "id": 2151,
"inner": {
"struct": {
"generics": {
@@ -224246,6 +242712,8 @@
"where_predicates": []
},
"impls": [
+ 2327,
+ 2328,
2329,
2330,
2331,
@@ -224258,10 +242726,8 @@
2338,
2339,
2340,
- 2341,
2342,
- 2344,
- 2346
+ 2344
],
"kind": {
"plain": {
@@ -224272,39 +242738,39 @@
}
},
"links": {
- "OsStr::display": 2152,
- "`Debug`": 107,
- "`OsStr`": 1720,
- "crate::format": 2328,
+ "OsStr::display": 2150,
+ "`Debug`": 105,
+ "`OsStr`": 1719,
+ "crate::format": 2326,
"fmt::Display": 436
},
"name": "Display",
"span": {
"begin": [
- 1627,
+ 1632,
1
],
"end": [
- 1629,
+ 1634,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "public"
},
- "2154": {
+ "2152": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2154,
+ "id": 2152,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
},
@@ -224316,23 +242782,23 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 2134,
+ 2135,
2136,
- 2137,
2138,
+ 2139,
2140,
2141,
2142,
- 2143,
- 2144,
- 1935,
- 1951,
+ 1933,
+ 1949,
+ 2145,
2147,
- 2149,
+ 2144,
2146,
2148,
- 2150,
- 2151,
- 2152
+ 2149,
+ 2150
],
"provided_trait_methods": [],
"trait": null
@@ -224346,26 +242812,26 @@
1
],
"end": [
- 1276,
+ 1281,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2155": {
+ "2153": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2155,
+ "id": 2153,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
},
@@ -224390,19 +242856,19 @@
"span": null,
"visibility": "default"
},
- "2156": {
+ "2154": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2156,
+ "id": 2154,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
},
@@ -224427,19 +242893,19 @@
"span": null,
"visibility": "default"
},
- "2157": {
+ "2155": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2157,
+ "id": 2155,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
},
@@ -224454,7 +242920,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -224464,19 +242930,19 @@
"span": null,
"visibility": "default"
},
- "2158": {
+ "2156": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2158,
+ "id": 2156,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
},
@@ -224501,19 +242967,19 @@
"span": null,
"visibility": "default"
},
- "2159": {
+ "2157": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2159,
+ "id": 2157,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
},
@@ -224528,7 +242994,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -224538,19 +243004,19 @@
"span": null,
"visibility": "default"
},
- "2160": {
+ "2158": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2160,
+ "id": 2158,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
},
@@ -224565,7 +243031,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -224575,19 +243041,19 @@
"span": null,
"visibility": "default"
},
- "2161": {
+ "2159": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2161,
+ "id": 2159,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
},
@@ -224612,12 +243078,12 @@
"span": null,
"visibility": "default"
},
- "2162": {
+ "2160": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2162,
+ "id": 2160,
"inner": {
"impl": {
"blanket_impl": {
@@ -224626,7 +243092,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
},
@@ -224671,7 +243137,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -224687,7 +243153,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -224696,23 +243162,23 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "2163": {
+ "2161": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2163,
+ "id": 2161,
"inner": {
"impl": {
"blanket_impl": {
@@ -224721,7 +243187,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
},
@@ -224766,7 +243232,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -224782,7 +243248,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -224791,23 +243257,23 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "2164": {
+ "2162": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2164,
+ "id": 2162,
"inner": {
"impl": {
"blanket_impl": {
@@ -224816,7 +243282,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
},
@@ -224864,12 +243330,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -224889,7 +243355,7 @@
},
"visibility": "default"
},
- "2165": {
+ "2163": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -224898,7 +243364,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Copies the string into a newly allocated [Box]<[OsStr]>.",
- "id": 2165,
+ "id": 2163,
"inner": {
"function": {
"generics": {
@@ -224923,7 +243389,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -224941,7 +243407,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -224950,7 +243416,7 @@
"constraints": []
}
},
- "id": 159,
+ "id": 157,
"path": "Box"
}
}
@@ -224958,24 +243424,24 @@
}
},
"links": {
- "Box": 159,
- "OsStr": 1720
+ "Box": 157,
+ "OsStr": 1719
},
"name": "from",
"span": {
"begin": [
- 1282,
+ 1287,
5
],
"end": [
- 1285,
+ 1290,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2166": {
+ "2164": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 17, patch: 0})}, feature: \"box_from_os_str\"}}]"
@@ -224984,7 +243450,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2166,
+ "id": 2164,
"inner": {
"impl": {
"blanket_impl": null,
@@ -224997,7 +243463,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -225006,7 +243472,7 @@
"constraints": []
}
},
- "id": 159,
+ "id": 157,
"path": "Box"
}
},
@@ -225018,7 +243484,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2165
+ 2163
],
"provided_trait_methods": [],
"trait": {
@@ -225033,7 +243499,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -225053,18 +243519,18 @@
"name": null,
"span": {
"begin": [
- 1279,
+ 1284,
1
],
"end": [
- 1286,
+ 1291,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2167": {
+ "2165": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -225073,7 +243539,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Copies the string into a newly allocated [Box]<[OsStr]>.",
- "id": 2167,
+ "id": 2165,
"inner": {
"function": {
"generics": {
@@ -225098,7 +243564,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -225116,7 +243582,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -225125,7 +243591,7 @@
"constraints": []
}
},
- "id": 159,
+ "id": 157,
"path": "Box"
}
}
@@ -225133,24 +243599,24 @@
}
},
"links": {
- "Box": 159,
- "OsStr": 1720
+ "Box": 157,
+ "OsStr": 1719
},
"name": "from",
"span": {
"begin": [
- 1292,
+ 1297,
5
],
"end": [
- 1294,
+ 1299,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2168": {
+ "2166": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"box_from_mut_slice\"}}]"
@@ -225159,7 +243625,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2168,
+ "id": 2166,
"inner": {
"impl": {
"blanket_impl": null,
@@ -225172,7 +243638,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -225181,7 +243647,7 @@
"constraints": []
}
},
- "id": 159,
+ "id": 157,
"path": "Box"
}
},
@@ -225193,7 +243659,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2167
+ 2165
],
"provided_trait_methods": [],
"trait": {
@@ -225208,7 +243674,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -225228,18 +243694,18 @@
"name": null,
"span": {
"begin": [
- 1289,
+ 1294,
1
],
"end": [
- 1295,
+ 1300,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2169": {
+ "2167": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -225248,7 +243714,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Converts a `Cow<'a, OsStr>` into a [Box]<[OsStr]>,\nby copying the contents if they are borrowed.",
- "id": 2169,
+ "id": 2167,
"inner": {
"function": {
"generics": {
@@ -225278,7 +243744,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -225287,7 +243753,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -225303,7 +243769,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -225312,7 +243778,7 @@
"constraints": []
}
},
- "id": 159,
+ "id": 157,
"path": "Box"
}
}
@@ -225320,24 +243786,24 @@
}
},
"links": {
- "Box": 159,
- "OsStr": 1720
+ "Box": 157,
+ "OsStr": 1719
},
"name": "from",
"span": {
"begin": [
- 1302,
+ 1307,
5
],
"end": [
- 1307,
+ 1312,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2170": {
+ "2168": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 45, patch: 0})}, feature: \"box_from_cow\"}}]"
@@ -225346,7 +243812,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2170,
+ "id": 2168,
"inner": {
"impl": {
"blanket_impl": null,
@@ -225359,7 +243825,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -225368,7 +243834,7 @@
"constraints": []
}
},
- "id": 159,
+ "id": 157,
"path": "Box"
}
},
@@ -225380,7 +243846,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2169
+ 2167
],
"provided_trait_methods": [],
"trait": {
@@ -225400,7 +243866,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -225409,7 +243875,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -225427,18 +243893,18 @@
"name": null,
"span": {
"begin": [
- 1298,
+ 1303,
1
],
"end": [
- 1308,
+ 1313,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2171": {
+ "2169": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -225447,7 +243913,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2171,
+ "id": 2169,
"inner": {
"function": {
"generics": {
@@ -225487,18 +243953,18 @@
"name": "clone",
"span": {
"begin": [
- 1332,
+ 1337,
5
],
"end": [
- 1334,
+ 1339,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2172": {
+ "2170": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 29, patch: 0})}, feature: \"more_box_slice_clone\"}}]"
@@ -225507,7 +243973,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2172,
+ "id": 2170,
"inner": {
"impl": {
"blanket_impl": null,
@@ -225520,7 +243986,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -225529,7 +243995,7 @@
"constraints": []
}
},
- "id": 159,
+ "id": 157,
"path": "Box"
}
},
@@ -225541,14 +244007,14 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2171
+ 2169
],
"provided_trait_methods": [
"clone_from"
],
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -225557,18 +244023,18 @@
"name": null,
"span": {
"begin": [
- 1330,
+ 1335,
1
],
"end": [
- 1335,
+ 1340,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2173": {
+ "2171": {
"attrs": [
{
"other": "#[(debug_assertions, track_caller)]"
@@ -225583,7 +244049,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2173,
+ "id": 2171,
"inner": {
"function": {
"generics": {
@@ -225632,18 +244098,18 @@
"name": "clone_to_uninit",
"span": {
"begin": [
- 1341,
+ 1346,
5
],
"end": [
- 1344,
+ 1349,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2174": {
+ "2172": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 126799, is_soft: false}, feature: \"clone_to_uninit\"}}]"
@@ -225652,14 +244118,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2174,
+ "id": 2172,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
},
@@ -225671,7 +244137,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2173
+ 2171
],
"provided_trait_methods": [],
"trait": {
@@ -225685,18 +244151,18 @@
"name": null,
"span": {
"begin": [
- 1338,
+ 1343,
1
],
"end": [
- 1345,
+ 1350,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2175": {
+ "2173": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -225705,7 +244171,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Copies the string into a newly allocated [Arc]<[OsStr]>.",
- "id": 2175,
+ "id": 2173,
"inner": {
"function": {
"generics": {
@@ -225730,7 +244196,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -225748,7 +244214,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -225766,23 +244232,23 @@
},
"links": {
"Arc": 606,
- "OsStr": 1720
+ "OsStr": 1719
},
"name": "from",
"span": {
"begin": [
- 1362,
+ 1367,
5
],
"end": [
- 1365,
+ 1370,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2176": {
+ "2174": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 24, patch: 0})}, feature: \"shared_from_slice2\"}}]"
@@ -225791,7 +244257,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2176,
+ "id": 2174,
"inner": {
"impl": {
"blanket_impl": null,
@@ -225804,7 +244270,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -225825,7 +244291,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2175
+ 2173
],
"provided_trait_methods": [],
"trait": {
@@ -225840,7 +244306,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -225860,18 +244326,18 @@
"name": null,
"span": {
"begin": [
- 1359,
+ 1364,
1
],
"end": [
- 1366,
+ 1371,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2177": {
+ "2175": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -225880,7 +244346,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Copies the string into a newly allocated [Arc]<[OsStr]>.",
- "id": 2177,
+ "id": 2175,
"inner": {
"function": {
"generics": {
@@ -225905,7 +244371,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -225923,7 +244389,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -225941,23 +244407,23 @@
},
"links": {
"Arc": 606,
- "OsStr": 1720
+ "OsStr": 1719
},
"name": "from",
"span": {
"begin": [
- 1372,
+ 1377,
5
],
"end": [
- 1374,
+ 1379,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2178": {
+ "2176": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"shared_from_mut_slice\"}}]"
@@ -225966,7 +244432,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2178,
+ "id": 2176,
"inner": {
"impl": {
"blanket_impl": null,
@@ -225979,7 +244445,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -226000,7 +244466,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2177
+ 2175
],
"provided_trait_methods": [],
"trait": {
@@ -226015,7 +244481,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -226035,18 +244501,18 @@
"name": null,
"span": {
"begin": [
- 1369,
+ 1374,
1
],
"end": [
- 1375,
+ 1380,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2179": {
+ "2177": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -226055,7 +244521,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Copies the string into a newly allocated [Rc]<[OsStr]>.",
- "id": 2179,
+ "id": 2177,
"inner": {
"function": {
"generics": {
@@ -226080,7 +244546,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -226098,7 +244564,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -226107,7 +244573,7 @@
"constraints": []
}
},
- "id": 2030,
+ "id": 2028,
"path": "Rc"
}
}
@@ -226115,24 +244581,24 @@
}
},
"links": {
- "OsStr": 1720,
- "Rc": 2030
+ "OsStr": 1719,
+ "Rc": 2028
},
"name": "from",
"span": {
"begin": [
- 1392,
+ 1397,
5
],
"end": [
- 1395,
+ 1400,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2180": {
+ "2178": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 24, patch: 0})}, feature: \"shared_from_slice2\"}}]"
@@ -226141,7 +244607,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2180,
+ "id": 2178,
"inner": {
"impl": {
"blanket_impl": null,
@@ -226154,7 +244620,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -226163,7 +244629,7 @@
"constraints": []
}
},
- "id": 2030,
+ "id": 2028,
"path": "crate::rc::Rc"
}
},
@@ -226175,7 +244641,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2179
+ 2177
],
"provided_trait_methods": [],
"trait": {
@@ -226190,7 +244656,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -226210,18 +244676,18 @@
"name": null,
"span": {
"begin": [
- 1389,
+ 1394,
1
],
"end": [
- 1396,
+ 1401,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2181": {
+ "2179": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -226230,7 +244696,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Copies the string into a newly allocated [Rc]<[OsStr]>.",
- "id": 2181,
+ "id": 2179,
"inner": {
"function": {
"generics": {
@@ -226255,7 +244721,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -226273,7 +244739,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -226282,7 +244748,7 @@
"constraints": []
}
},
- "id": 2030,
+ "id": 2028,
"path": "Rc"
}
}
@@ -226290,24 +244756,24 @@
}
},
"links": {
- "OsStr": 1720,
- "Rc": 2030
+ "OsStr": 1719,
+ "Rc": 2028
},
"name": "from",
"span": {
"begin": [
- 1402,
+ 1407,
5
],
"end": [
- 1404,
+ 1409,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2182": {
+ "2180": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 84, patch: 0})}, feature: \"shared_from_mut_slice\"}}]"
@@ -226316,7 +244782,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2182,
+ "id": 2180,
"inner": {
"impl": {
"blanket_impl": null,
@@ -226329,7 +244795,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -226338,7 +244804,7 @@
"constraints": []
}
},
- "id": 2030,
+ "id": 2028,
"path": "crate::rc::Rc"
}
},
@@ -226350,7 +244816,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2181
+ 2179
],
"provided_trait_methods": [],
"trait": {
@@ -226365,7 +244831,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -226385,18 +244851,18 @@
"name": null,
"span": {
"begin": [
- 1399,
+ 1404,
1
],
"end": [
- 1405,
+ 1410,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2183": {
+ "2181": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -226405,7 +244871,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Converts the string reference into a [`Cow::Borrowed`].",
- "id": 2183,
+ "id": 2181,
"inner": {
"function": {
"generics": {
@@ -226430,7 +244896,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -226451,7 +244917,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -226460,7 +244926,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -226468,23 +244934,23 @@
}
},
"links": {
- "`Cow::Borrowed`": 2037
+ "`Cow::Borrowed`": 2035
},
"name": "from",
"span": {
"begin": [
- 1420,
+ 1425,
5
],
"end": [
- 1422,
+ 1427,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2184": {
+ "2182": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 28, patch: 0})}, feature: \"cow_from_osstr\"}}]"
@@ -226493,7 +244959,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2184,
+ "id": 2182,
"inner": {
"impl": {
"blanket_impl": null,
@@ -226509,7 +244975,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -226518,7 +244984,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "crate::borrow::Cow"
}
},
@@ -226539,7 +245005,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2183
+ 2181
],
"provided_trait_methods": [],
"trait": {
@@ -226554,7 +245020,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -226574,23 +245040,23 @@
"name": null,
"span": {
"begin": [
- 1417,
+ 1422,
1
],
"end": [
- 1423,
+ 1428,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2185": {
+ "2183": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2185,
+ "id": 2183,
"inner": {
"assoc_type": {
"bounds": [],
@@ -226601,7 +245067,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2186,
+ "id": 2184,
"path": "Utf8Error"
}
}
@@ -226611,23 +245077,23 @@
"name": "Error",
"span": {
"begin": [
- 1446,
+ 1451,
5
],
"end": [
- 1446,
+ 1451,
40
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2187": {
+ "2185": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": "Tries to convert an `&OsStr` to a `&str`.\n\n```\nuse std::ffi::OsStr;\n\nlet os_str = OsStr::new(\"foo\");\nlet as_str = <&str>::try_from(os_str).unwrap();\nassert_eq!(as_str, \"foo\");\n```",
- "id": 2187,
+ "id": 2185,
"inner": {
"function": {
"generics": {
@@ -226652,7 +245118,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -226681,7 +245147,7 @@
},
"trait": {
"args": null,
- "id": 199,
+ "id": 197,
"path": ""
}
}
@@ -226702,18 +245168,18 @@
"name": "try_from",
"span": {
"begin": [
- 1457,
+ 1462,
5
],
"end": [
- 1459,
+ 1464,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2188": {
+ "2186": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 72, patch: 0})}, feature: \"str_tryfrom_osstr_impl\"}}]"
@@ -226722,7 +245188,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2188,
+ "id": 2186,
"inner": {
"impl": {
"blanket_impl": null,
@@ -226752,8 +245218,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2185,
- 2187
+ 2183,
+ 2185
],
"provided_trait_methods": [],
"trait": {
@@ -226768,7 +245234,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -226779,7 +245245,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -226788,18 +245254,18 @@
"name": null,
"span": {
"begin": [
- 1445,
+ 1450,
1
],
"end": [
- 1460,
+ 1465,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2189": {
+ "2187": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -226808,7 +245274,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2189,
+ "id": 2187,
"inner": {
"function": {
"generics": {
@@ -226834,7 +245300,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -226843,7 +245309,7 @@
"constraints": []
}
},
- "id": 159,
+ "id": 157,
"path": "Box"
}
}
@@ -226854,18 +245320,18 @@
"name": "default",
"span": {
"begin": [
- 1465,
+ 1470,
5
],
"end": [
- 1468,
+ 1473,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2190": {
+ "2188": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 17, patch: 0})}, feature: \"box_default_extra\"}}]"
@@ -226874,7 +245340,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2190,
+ "id": 2188,
"inner": {
"impl": {
"blanket_impl": null,
@@ -226887,7 +245353,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -226896,7 +245362,7 @@
"constraints": []
}
},
- "id": 159,
+ "id": 157,
"path": "Box"
}
},
@@ -226908,12 +245374,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2189
+ 2187
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 109,
+ "id": 107,
"path": "Default"
}
}
@@ -226922,18 +245388,18 @@
"name": null,
"span": {
"begin": [
- 1463,
+ 1468,
1
],
"end": [
- 1469,
+ 1474,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2191": {
+ "2189": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -226942,7 +245408,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Creates an empty `OsStr`.",
- "id": 2191,
+ "id": 2189,
"inner": {
"function": {
"generics": {
@@ -226969,18 +245435,18 @@
"name": "default",
"span": {
"begin": [
- 1475,
+ 1480,
5
],
"end": [
- 1477,
+ 1482,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2192": {
+ "2190": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 9, patch: 0})}, feature: \"osstring_default\"}}]"
@@ -226989,7 +245455,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2192,
+ "id": 2190,
"inner": {
"impl": {
"blanket_impl": null,
@@ -227000,7 +245466,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -227014,12 +245480,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2191
+ 2189
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 109,
+ "id": 107,
"path": "Default"
}
}
@@ -227028,18 +245494,18 @@
"name": null,
"span": {
"begin": [
- 1472,
+ 1477,
1
],
"end": [
- 1478,
+ 1483,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2193": {
+ "2191": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -227048,7 +245514,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2193,
+ "id": 2191,
"inner": {
"function": {
"generics": {
@@ -227085,7 +245551,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -227104,18 +245570,18 @@
"name": "eq",
"span": {
"begin": [
- 1483,
+ 1488,
5
],
"end": [
- 1485,
+ 1490,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2194": {
+ "2192": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -227124,14 +245590,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2194,
+ "id": 2192,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
},
@@ -227143,14 +245609,14 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2193
+ 2191
],
"provided_trait_methods": [
"ne"
],
"trait": {
"args": null,
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -227159,18 +245625,18 @@
"name": null,
"span": {
"begin": [
- 1481,
+ 1486,
1
],
"end": [
- 1486,
+ 1491,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2195": {
+ "2193": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -227179,7 +245645,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2195,
+ "id": 2193,
"inner": {
"function": {
"generics": {
@@ -227231,18 +245697,18 @@
"name": "eq",
"span": {
"begin": [
- 1491,
+ 1496,
5
],
"end": [
- 1493,
+ 1498,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2196": {
+ "2194": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -227251,14 +245717,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2196,
+ "id": 2194,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
},
@@ -227270,7 +245736,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2195
+ 2193
],
"provided_trait_methods": [
"ne"
@@ -227288,7 +245754,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -227297,18 +245763,18 @@
"name": null,
"span": {
"begin": [
- 1489,
+ 1494,
1
],
"end": [
- 1494,
+ 1499,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2197": {
+ "2195": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -227317,7 +245783,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2197,
+ "id": 2195,
"inner": {
"function": {
"generics": {
@@ -227354,7 +245820,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -227373,18 +245839,18 @@
"name": "eq",
"span": {
"begin": [
- 1499,
+ 1504,
5
],
"end": [
- 1501,
+ 1506,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2198": {
+ "2196": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -227393,7 +245859,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2198,
+ "id": 2196,
"inner": {
"impl": {
"blanket_impl": null,
@@ -227408,7 +245874,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2197
+ 2195
],
"provided_trait_methods": [
"ne"
@@ -227421,7 +245887,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -227430,7 +245896,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -227439,18 +245905,18 @@
"name": null,
"span": {
"begin": [
- 1497,
+ 1502,
1
],
"end": [
- 1502,
+ 1507,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2199": {
+ "2197": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -227459,14 +245925,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2199,
+ "id": 2197,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
},
@@ -227483,7 +245949,7 @@
],
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -227492,54 +245958,18 @@
"name": null,
"span": {
"begin": [
- 1505,
+ 1510,
1
],
"end": [
- 1505,
+ 1510,
21
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "22": {
- "attrs": [
- {
- "other": "#[doc(no_inline)]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 22,
- "inner": {
- "use": {
- "id": 23,
- "is_glob": false,
- "name": "drop",
- "source": "crate::mem::drop"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 24,
- 1
- ],
- "end": [
- 24,
- 26
- ],
- "filename": "std/src/prelude/v1.rs"
- },
- "visibility": "public"
- },
- "2200": {
+ "2198": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -227548,7 +245978,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2200,
+ "id": 2198,
"inner": {
"function": {
"generics": {
@@ -227585,7 +246015,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -227603,7 +246033,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -227623,18 +246053,18 @@
"name": "partial_cmp",
"span": {
"begin": [
- 1510,
+ 1515,
5
],
"end": [
- 1512,
+ 1517,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2201": {
+ "2199": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -227643,7 +246073,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2201,
+ "id": 2199,
"inner": {
"function": {
"generics": {
@@ -227680,7 +246110,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -227699,18 +246129,54 @@
"name": "lt",
"span": {
"begin": [
- 1514,
+ 1519,
5
],
"end": [
- 1516,
+ 1521,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2202": {
+ "22": {
+ "attrs": [
+ {
+ "other": "#[doc(no_inline)]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 22,
+ "inner": {
+ "use": {
+ "id": 23,
+ "is_glob": false,
+ "name": "drop",
+ "source": "crate::mem::drop"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 24,
+ 1
+ ],
+ "end": [
+ 24,
+ 26
+ ],
+ "filename": "std/src/prelude/v1.rs"
+ },
+ "visibility": "public"
+ },
+ "2200": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -227719,7 +246185,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2202,
+ "id": 2200,
"inner": {
"function": {
"generics": {
@@ -227756,7 +246222,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -227775,18 +246241,18 @@
"name": "le",
"span": {
"begin": [
- 1518,
+ 1523,
5
],
"end": [
- 1520,
+ 1525,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2203": {
+ "2201": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -227795,7 +246261,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2203,
+ "id": 2201,
"inner": {
"function": {
"generics": {
@@ -227832,7 +246298,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -227851,18 +246317,18 @@
"name": "gt",
"span": {
"begin": [
- 1522,
+ 1527,
5
],
"end": [
- 1524,
+ 1529,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2204": {
+ "2202": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -227871,7 +246337,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2204,
+ "id": 2202,
"inner": {
"function": {
"generics": {
@@ -227908,7 +246374,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -227927,18 +246393,18 @@
"name": "ge",
"span": {
"begin": [
- 1526,
+ 1531,
5
],
"end": [
- 1528,
+ 1533,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2205": {
+ "2203": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -227947,14 +246413,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2205,
+ "id": 2203,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
},
@@ -227966,11 +246432,11 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 2198,
+ 2199,
2200,
2201,
- 2202,
- 2203,
- 2204
+ 2202
],
"provided_trait_methods": [
"lt",
@@ -227984,7 +246450,7 @@
],
"trait": {
"args": null,
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -227993,18 +246459,18 @@
"name": null,
"span": {
"begin": [
- 1508,
+ 1513,
1
],
"end": [
- 1529,
+ 1534,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2206": {
+ "2204": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -228013,7 +246479,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2206,
+ "id": 2204,
"inner": {
"function": {
"generics": {
@@ -228064,7 +246530,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -228084,18 +246550,18 @@
"name": "partial_cmp",
"span": {
"begin": [
- 1534,
+ 1539,
5
],
"end": [
- 1536,
+ 1541,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2207": {
+ "2205": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -228104,14 +246570,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2207,
+ "id": 2205,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
},
@@ -228123,7 +246589,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2206
+ 2204
],
"provided_trait_methods": [
"lt",
@@ -228148,7 +246614,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -228157,18 +246623,18 @@
"name": null,
"span": {
"begin": [
- 1532,
+ 1537,
1
],
"end": [
- 1537,
+ 1542,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2208": {
+ "2206": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -228177,7 +246643,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2208,
+ "id": 2206,
"inner": {
"function": {
"generics": {
@@ -228214,7 +246680,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -228226,7 +246692,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -228237,18 +246703,18 @@
"name": "cmp",
"span": {
"begin": [
- 1545,
+ 1550,
5
],
"end": [
- 1547,
+ 1552,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2209": {
+ "2207": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -228257,14 +246723,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2209,
+ "id": 2207,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
},
@@ -228276,7 +246742,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2208
+ 2206
],
"provided_trait_methods": [
"max",
@@ -228285,7 +246751,7 @@
],
"trait": {
"args": null,
- "id": 119,
+ "id": 117,
"path": "Ord"
}
}
@@ -228294,18 +246760,18 @@
"name": null,
"span": {
"begin": [
- 1543,
+ 1548,
1
],
"end": [
- 1548,
+ 1553,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2210": {
+ "2208": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -228314,7 +246780,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2210,
+ "id": 2208,
"inner": {
"function": {
"generics": {
@@ -228351,7 +246817,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -228370,18 +246836,18 @@
"name": "eq",
"span": {
"begin": [
- 1588,
+ 1593,
1
],
"end": [
- 1588,
+ 1593,
33
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2211": {
+ "2209": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_os_str\"}}]"
@@ -228390,7 +246856,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2211,
+ "id": 2209,
"inner": {
"impl": {
"blanket_impl": null,
@@ -228406,7 +246872,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -228415,7 +246881,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "crate::borrow::Cow"
}
},
@@ -228444,7 +246910,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2210
+ 2208
],
"provided_trait_methods": [
"ne"
@@ -228457,7 +246923,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -228466,7 +246932,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -228475,18 +246941,18 @@
"name": null,
"span": {
"begin": [
- 1588,
+ 1593,
1
],
"end": [
- 1588,
+ 1593,
33
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2212": {
+ "2210": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -228495,7 +246961,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2212,
+ "id": 2210,
"inner": {
"function": {
"generics": {
@@ -228541,7 +247007,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -228550,7 +247016,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -228569,18 +247035,18 @@
"name": "eq",
"span": {
"begin": [
- 1588,
+ 1593,
1
],
"end": [
- 1588,
+ 1593,
33
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2213": {
+ "2211": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_os_str\"}}]"
@@ -228589,14 +247055,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2213,
+ "id": 2211,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
},
@@ -228625,7 +247091,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2212
+ 2210
],
"provided_trait_methods": [
"ne"
@@ -228647,7 +247113,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -228656,7 +247122,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -228665,7 +247131,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -228674,18 +247140,18 @@
"name": null,
"span": {
"begin": [
- 1588,
+ 1593,
1
],
"end": [
- 1588,
+ 1593,
33
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2214": {
+ "2212": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -228694,7 +247160,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2214,
+ "id": 2212,
"inner": {
"function": {
"generics": {
@@ -228731,7 +247197,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -228749,7 +247215,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -228769,18 +247235,18 @@
"name": "partial_cmp",
"span": {
"begin": [
- 1588,
+ 1593,
1
],
"end": [
- 1588,
+ 1593,
33
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2215": {
+ "2213": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_os_str\"}}]"
@@ -228789,7 +247255,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2215,
+ "id": 2213,
"inner": {
"impl": {
"blanket_impl": null,
@@ -228805,7 +247271,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -228814,7 +247280,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "crate::borrow::Cow"
}
},
@@ -228843,7 +247309,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2214
+ 2212
],
"provided_trait_methods": [
"lt",
@@ -228863,7 +247329,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -228872,7 +247338,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -228881,18 +247347,18 @@
"name": null,
"span": {
"begin": [
- 1588,
+ 1593,
1
],
"end": [
- 1588,
+ 1593,
33
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2216": {
+ "2214": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -228901,7 +247367,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2216,
+ "id": 2214,
"inner": {
"function": {
"generics": {
@@ -228947,7 +247413,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -228956,7 +247422,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -228974,7 +247440,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -228994,18 +247460,18 @@
"name": "partial_cmp",
"span": {
"begin": [
- 1588,
+ 1593,
1
],
"end": [
- 1588,
+ 1593,
33
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2217": {
+ "2215": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_os_str\"}}]"
@@ -229014,14 +247480,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2217,
+ "id": 2215,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
},
@@ -229050,7 +247516,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2216
+ 2214
],
"provided_trait_methods": [
"lt",
@@ -229079,7 +247545,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -229088,7 +247554,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -229097,7 +247563,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -229106,18 +247572,18 @@
"name": null,
"span": {
"begin": [
- 1588,
+ 1593,
1
],
"end": [
- 1588,
+ 1593,
33
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2218": {
+ "2216": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -229126,7 +247592,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2218,
+ "id": 2216,
"inner": {
"function": {
"generics": {
@@ -229167,7 +247633,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -229188,18 +247654,18 @@
"name": "eq",
"span": {
"begin": [
- 1589,
+ 1594,
1
],
"end": [
- 1589,
+ 1594,
37
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2219": {
+ "2217": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_os_str\"}}]"
@@ -229208,7 +247674,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2219,
+ "id": 2217,
"inner": {
"impl": {
"blanket_impl": null,
@@ -229224,7 +247690,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -229233,7 +247699,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "crate::borrow::Cow"
}
},
@@ -229262,7 +247728,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2218
+ 2216
],
"provided_trait_methods": [
"ne"
@@ -229279,7 +247745,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -229290,7 +247756,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -229299,18 +247765,18 @@
"name": null,
"span": {
"begin": [
- 1589,
+ 1594,
1
],
"end": [
- 1589,
+ 1594,
37
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2220": {
+ "2218": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -229319,7 +247785,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2220,
+ "id": 2218,
"inner": {
"function": {
"generics": {
@@ -229365,7 +247831,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -229374,7 +247840,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -229393,18 +247859,18 @@
"name": "eq",
"span": {
"begin": [
- 1589,
+ 1594,
1
],
"end": [
- 1589,
+ 1594,
37
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2221": {
+ "2219": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_os_str\"}}]"
@@ -229413,7 +247879,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2221,
+ "id": 2219,
"inner": {
"impl": {
"blanket_impl": null,
@@ -229424,7 +247890,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -229455,7 +247921,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2220
+ 2218
],
"provided_trait_methods": [
"ne"
@@ -229477,7 +247943,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -229486,7 +247952,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -229495,7 +247961,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -229504,18 +247970,18 @@
"name": null,
"span": {
"begin": [
- 1589,
+ 1594,
1
],
"end": [
- 1589,
+ 1594,
37
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2222": {
+ "2220": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -229524,7 +247990,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2222,
+ "id": 2220,
"inner": {
"function": {
"generics": {
@@ -229565,7 +248031,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -229585,7 +248051,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -229605,18 +248071,18 @@
"name": "partial_cmp",
"span": {
"begin": [
- 1589,
+ 1594,
1
],
"end": [
- 1589,
+ 1594,
37
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2223": {
+ "2221": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_os_str\"}}]"
@@ -229625,7 +248091,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2223,
+ "id": 2221,
"inner": {
"impl": {
"blanket_impl": null,
@@ -229641,7 +248107,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -229650,7 +248116,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "crate::borrow::Cow"
}
},
@@ -229679,7 +248145,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2222
+ 2220
],
"provided_trait_methods": [
"lt",
@@ -229703,7 +248169,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -229714,7 +248180,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -229723,18 +248189,18 @@
"name": null,
"span": {
"begin": [
- 1589,
+ 1594,
1
],
"end": [
- 1589,
+ 1594,
37
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2224": {
+ "2222": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -229743,7 +248209,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2224,
+ "id": 2222,
"inner": {
"function": {
"generics": {
@@ -229789,7 +248255,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -229798,7 +248264,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -229816,7 +248282,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -229836,18 +248302,18 @@
"name": "partial_cmp",
"span": {
"begin": [
- 1589,
+ 1594,
1
],
"end": [
- 1589,
+ 1594,
37
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2225": {
+ "2223": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_os_str\"}}]"
@@ -229856,7 +248322,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2225,
+ "id": 2223,
"inner": {
"impl": {
"blanket_impl": null,
@@ -229867,7 +248333,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -229898,7 +248364,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2224
+ 2222
],
"provided_trait_methods": [
"lt",
@@ -229927,7 +248393,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -229936,7 +248402,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -229945,7 +248411,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -229954,18 +248420,18 @@
"name": null,
"span": {
"begin": [
- 1589,
+ 1594,
1
],
"end": [
- 1589,
+ 1594,
37
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2226": {
+ "2224": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -229974,7 +248440,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2226,
+ "id": 2224,
"inner": {
"function": {
"generics": {
@@ -230047,18 +248513,18 @@
"name": "hash",
"span": {
"begin": [
- 1595,
+ 1600,
5
],
"end": [
- 1597,
+ 1602,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2227": {
+ "2225": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -230067,14 +248533,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2227,
+ "id": 2225,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
},
@@ -230086,7 +248552,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2226
+ 2224
],
"provided_trait_methods": [
"hash_slice"
@@ -230102,23 +248568,23 @@
"name": null,
"span": {
"begin": [
- 1593,
+ 1598,
1
],
"end": [
- 1598,
+ 1603,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2228": {
+ "2226": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2228,
+ "id": 2226,
"inner": {
"function": {
"generics": {
@@ -230164,7 +248630,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -230176,7 +248642,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -230187,18 +248653,18 @@
"name": "fmt",
"span": {
"begin": [
- 1602,
+ 1607,
5
],
"end": [
- 1604,
+ 1609,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2229": {
+ "2227": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -230207,14 +248673,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2229,
+ "id": 2227,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
},
@@ -230226,12 +248692,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2228
+ 2226
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -230240,23 +248706,23 @@
"name": null,
"span": {
"begin": [
- 1601,
+ 1606,
1
],
"end": [
- 1605,
+ 1610,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2230": {
+ "2228": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2230,
+ "id": 2228,
"inner": {
"assoc_type": {
"bounds": [],
@@ -230267,7 +248733,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -230277,23 +248743,23 @@
"name": "Output",
"span": {
"begin": [
- 1647,
+ 1652,
5
],
"end": [
- 1647,
+ 1652,
28
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2231": {
+ "2229": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2231,
+ "id": 2229,
"inner": {
"function": {
"generics": {
@@ -230330,7 +248796,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -230342,7 +248808,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -230353,18 +248819,18 @@
"name": "join",
"span": {
"begin": [
- 1649,
+ 1654,
5
],
"end": [
- 1659,
+ 1664,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2232": {
+ "2230": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 27747, is_soft: false}, feature: \"slice_concat_ext\"}}]"
@@ -230373,7 +248839,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2232,
+ "id": 2230,
"inner": {
"impl": {
"blanket_impl": null,
@@ -230400,7 +248866,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -230409,7 +248875,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -230428,8 +248894,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2230,
- 2231
+ 2228,
+ 2229
],
"provided_trait_methods": [],
"trait": {
@@ -230444,7 +248910,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -230455,7 +248921,7 @@
"constraints": []
}
},
- "id": 2233,
+ "id": 2231,
"path": "Join"
}
}
@@ -230464,23 +248930,23 @@
"name": null,
"span": {
"begin": [
- 1646,
+ 1651,
1
],
"end": [
- 1660,
+ 1665,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2234": {
+ "2232": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2234,
+ "id": 2232,
"inner": {
"assoc_type": {
"bounds": [],
@@ -230491,7 +248957,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -230501,18 +248967,18 @@
"name": "Owned",
"span": {
"begin": [
- 1672,
+ 1677,
5
],
"end": [
- 1672,
+ 1677,
27
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2235": {
+ "2233": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -230521,7 +248987,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2235,
+ "id": 2233,
"inner": {
"function": {
"generics": {
@@ -230554,7 +249020,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -230565,18 +249031,18 @@
"name": "to_owned",
"span": {
"begin": [
- 1674,
+ 1679,
5
],
"end": [
- 1676,
+ 1681,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2236": {
+ "2234": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -230585,7 +249051,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2236,
+ "id": 2234,
"inner": {
"function": {
"generics": {
@@ -230622,7 +249088,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -230639,18 +249105,18 @@
"name": "clone_into",
"span": {
"begin": [
- 1678,
+ 1683,
5
],
"end": [
- 1680,
+ 1685,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2237": {
+ "2235": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -230659,14 +249125,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2237,
+ "id": 2235,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
},
@@ -230678,16 +249144,16 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2234,
- 2235,
- 2236
+ 2232,
+ 2233,
+ 2234
],
"provided_trait_methods": [
"clone_into"
],
"trait": {
"args": null,
- "id": 157,
+ "id": 155,
"path": "ToOwned"
}
}
@@ -230696,18 +249162,18 @@
"name": null,
"span": {
"begin": [
- 1671,
+ 1676,
1
],
"end": [
- 1681,
+ 1686,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2238": {
+ "2236": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -230716,7 +249182,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2238,
+ "id": 2236,
"inner": {
"function": {
"generics": {
@@ -230753,7 +249219,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -230766,19 +249232,22 @@
"name": "as_ref",
"span": {
"begin": [
- 1686,
+ 1692,
5
],
"end": [
- 1688,
+ 1694,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2239": {
+ "2237": {
"attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 143773, is_soft: false}, feature: \"const_convert\", promotable: false}}]"
+ },
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
}
@@ -230786,14 +249255,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2239,
+ "id": 2237,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
},
@@ -230805,7 +249274,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2238
+ 2236
],
"provided_trait_methods": [],
"trait": {
@@ -230816,7 +249285,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -230834,18 +249303,18 @@
"name": null,
"span": {
"begin": [
- 1684,
+ 1690,
1
],
"end": [
- 1689,
+ 1695,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2240": {
+ "2238": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -230854,7 +249323,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2240,
+ "id": 2238,
"inner": {
"function": {
"generics": {
@@ -230891,7 +249360,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -230904,18 +249373,18 @@
"name": "as_ref",
"span": {
"begin": [
- 1702,
+ 1708,
5
],
"end": [
- 1704,
+ 1710,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2241": {
+ "2239": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -230924,7 +249393,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2241,
+ "id": 2239,
"inner": {
"impl": {
"blanket_impl": null,
@@ -230939,7 +249408,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2240
+ 2238
],
"provided_trait_methods": [],
"trait": {
@@ -230950,7 +249419,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -230968,18 +249437,18 @@
"name": null,
"span": {
"begin": [
- 1700,
+ 1706,
1
],
"end": [
- 1705,
+ 1711,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2242": {
+ "2240": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -230988,7 +249457,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2242,
+ "id": 2240,
"inner": {
"function": {
"generics": {
@@ -231025,7 +249494,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -231038,18 +249507,18 @@
"name": "as_ref",
"span": {
"begin": [
- 1710,
+ 1716,
5
],
"end": [
- 1712,
+ 1718,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2243": {
+ "2241": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -231058,14 +249527,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2243,
+ "id": 2241,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 161,
+ "id": 159,
"path": "String"
}
},
@@ -231077,7 +249546,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2242
+ 2240
],
"provided_trait_methods": [],
"trait": {
@@ -231088,7 +249557,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -231106,18 +249575,18 @@
"name": null,
"span": {
"begin": [
- 1708,
+ 1714,
1
],
"end": [
- 1713,
+ 1719,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2244": {
+ "2242": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -231126,7 +249595,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2244,
+ "id": 2242,
"inner": {
"function": {
"generics": {
@@ -231165,7 +249634,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -231189,7 +249658,7 @@
},
"visibility": "default"
},
- "2245": {
+ "2243": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -231198,7 +249667,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2245,
+ "id": 2243,
"inner": {
"function": {
"generics": {
@@ -231257,7 +249726,7 @@
},
"visibility": "default"
},
- "2246": {
+ "2244": {
"attrs": [
{
"other": "#[doc(cfg(unix))]"
@@ -231269,14 +249738,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2246,
+ "id": 2244,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "crate::ffi::OsStr"
}
},
@@ -231288,13 +249757,13 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2244,
- 2245
+ 2242,
+ 2243
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 2247,
+ "id": 2245,
"path": "OsStrExt"
}
}
@@ -231314,7 +249783,7 @@
},
"visibility": "default"
},
- "2247": {
+ "2245": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -231323,7 +249792,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Platform-specific extensions to [`OsStr`].\n\nThis trait is sealed: it cannot be implemented outside the standard library.\nThis is so that future additional methods are not breaking changes.",
- "id": 2247,
+ "id": 2245,
"inner": {
"trait": {
"bounds": [
@@ -231333,7 +249802,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 3814,
+ "id": 3813,
"path": "Sealed"
}
}
@@ -231344,19 +249813,19 @@
"where_predicates": []
},
"implementations": [
- 2246
+ 2244
],
"is_auto": false,
"is_dyn_compatible": false,
"is_unsafe": false,
"items": [
- 2399,
- 2400
+ 2397,
+ 2398
]
}
},
"links": {
- "`OsStr`": 1720
+ "`OsStr`": 1719
},
"name": "OsStrExt",
"span": {
@@ -231372,7 +249841,7 @@
},
"visibility": "public"
},
- "2248": {
+ "2246": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -231381,7 +249850,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2248,
+ "id": 2246,
"inner": {
"function": {
"generics": {
@@ -231420,7 +249889,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -231444,7 +249913,7 @@
},
"visibility": "default"
},
- "2249": {
+ "2247": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -231453,7 +249922,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2249,
+ "id": 2247,
"inner": {
"function": {
"generics": {
@@ -231512,7 +249981,7 @@
},
"visibility": "default"
},
- "2250": {
+ "2248": {
"attrs": [
{
"other": "#[doc(cfg(target_os = \"wasi\"))]"
@@ -231524,14 +249993,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2250,
+ "id": 2248,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "crate::ffi::OsStr"
}
},
@@ -231543,13 +250012,13 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2248,
- 2249
+ 2246,
+ 2247
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 2251,
+ "id": 2249,
"path": "OsStrExt"
}
}
@@ -231569,7 +250038,7 @@
},
"visibility": "default"
},
- "2251": {
+ "2249": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -231578,7 +250047,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Platform-specific extensions to [`OsStr`].\n\nThis trait is sealed: it cannot be implemented outside the standard library.\nThis is so that future additional methods are not breaking changes.",
- "id": 2251,
+ "id": 2249,
"inner": {
"trait": {
"bounds": [
@@ -231588,7 +250057,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 3814,
+ "id": 3813,
"path": "Sealed"
}
}
@@ -231599,19 +250068,19 @@
"where_predicates": []
},
"implementations": [
- 2250
+ 2248
],
"is_auto": false,
"is_dyn_compatible": false,
"is_unsafe": false,
"items": [
- 5555,
- 5556
+ 5560,
+ 5561
]
}
},
"links": {
- "`OsStr`": 1720
+ "`OsStr`": 1719
},
"name": "OsStrExt",
"span": {
@@ -231627,7 +250096,7 @@
},
"visibility": "public"
},
- "2252": {
+ "2250": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -231636,7 +250105,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2252,
+ "id": 2250,
"inner": {
"function": {
"generics": {
@@ -231678,7 +250147,7 @@
"constraints": []
}
},
- "id": 2253,
+ "id": 2251,
"path": "EncodeWide"
}
}
@@ -231689,18 +250158,18 @@
"name": "encode_wide",
"span": {
"begin": [
- 132,
+ 133,
5
],
"end": [
- 134,
+ 135,
6
],
"filename": "std/src/os/windows/ffi.rs"
},
"visibility": "default"
},
- "2253": {
+ "2251": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -231708,8 +250177,8 @@
],
"crate_id": 0,
"deprecation": null,
- "docs": "Generates a wide character sequence for potentially ill-formed UTF-16.",
- "id": 2253,
+ "docs": "Iterator returned by [`OsStrExt::encode_wide`].",
+ "id": 2251,
"inner": {
"struct": {
"generics": {
@@ -231726,25 +250195,26 @@
"where_predicates": []
},
"impls": [
- 9006,
- 9007,
- 9008,
- 9009,
- 9010,
- 9011,
- 9012,
- 9013,
- 9014,
- 9015,
- 9016,
- 9017,
- 9018,
- 9019,
- 9020,
- 9021,
- 9023,
- 9027,
- 9028
+ 5628,
+ 5629,
+ 5630,
+ 5631,
+ 5632,
+ 5633,
+ 5634,
+ 5635,
+ 5636,
+ 5637,
+ 5638,
+ 5639,
+ 5640,
+ 5641,
+ 5642,
+ 5643,
+ 5645,
+ 5647,
+ 5651,
+ 5652
],
"kind": {
"plain": {
@@ -231754,22 +250224,24 @@
}
}
},
- "links": {},
+ "links": {
+ "`OsStrExt::encode_wide`": 2401
+ },
"name": "EncodeWide",
"span": {
"begin": [
- 1010,
+ 141,
1
],
"end": [
- 1013,
+ 143,
2
],
- "filename": "std/src/sys_common/wtf8.rs"
+ "filename": "std/src/os/windows/ffi.rs"
},
"visibility": "public"
},
- "2254": {
+ "2252": {
"attrs": [
{
"other": "#[doc(cfg(windows))]"
@@ -231781,14 +250253,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2254,
+ "id": 2252,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "crate::ffi::OsStr"
}
},
@@ -231800,12 +250272,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2252
+ 2250
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 2255,
+ "id": 2253,
"path": "OsStrExt"
}
}
@@ -231814,18 +250286,18 @@
"name": null,
"span": {
"begin": [
- 130,
+ 131,
1
],
"end": [
- 135,
+ 136,
2
],
"filename": "std/src/os/windows/ffi.rs"
},
"visibility": "default"
},
- "2255": {
+ "2253": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -231834,7 +250306,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Windows-specific extensions to [`OsStr`].\n\nThis trait is sealed: it cannot be implemented outside the standard library.\nThis is so that future additional methods are not breaking changes.",
- "id": 2255,
+ "id": 2253,
"inner": {
"trait": {
"bounds": [
@@ -231844,7 +250316,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 3814,
+ "id": 3813,
"path": "Sealed"
}
}
@@ -231855,34 +250327,34 @@
"where_predicates": []
},
"implementations": [
- 2254
+ 2252
],
"is_auto": false,
"is_dyn_compatible": true,
"is_unsafe": false,
"items": [
- 2403
+ 2401
]
}
},
"links": {
- "`OsStr`": 1720
+ "`OsStr`": 1719
},
"name": "OsStrExt",
"span": {
"begin": [
- 103,
+ 104,
1
],
"end": [
- 127,
+ 128,
2
],
"filename": "std/src/os/windows/ffi.rs"
},
"visibility": "public"
},
- "2256": {
+ "2254": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -231891,7 +250363,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2256,
+ "id": 2254,
"inner": {
"function": {
"generics": {
@@ -231928,7 +250400,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -231952,7 +250424,7 @@
},
"visibility": "default"
},
- "2257": {
+ "2255": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -231961,7 +250433,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2257,
+ "id": 2255,
"inner": {
"impl": {
"blanket_impl": null,
@@ -231977,7 +250449,7 @@
"constraints": []
}
},
- "id": 2258,
+ "id": 2256,
"path": "Component"
}
},
@@ -231989,7 +250461,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2256
+ 2254
],
"provided_trait_methods": [],
"trait": {
@@ -232000,7 +250472,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -232029,7 +250501,7 @@
},
"visibility": "default"
},
- "2258": {
+ "2256": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -232038,7 +250510,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "A single component of a path.\n\nA `Component` roughly corresponds to a substring between path separators\n(`/` or `\\`).\n\nThis `enum` is created by iterating over [`Components`], which in turn is\ncreated by the [`components`](Path::components) method on [`Path`].\n\n# Examples\n\n```rust\nuse std::path::{Component, Path};\n\nlet path = Path::new(\"/tmp/foo/bar.txt\");\nlet components = path.components().collect::>();\nassert_eq!(&components, &[\n Component::RootDir,\n Component::Normal(\"tmp\".as_ref()),\n Component::Normal(\"foo\".as_ref()),\n Component::Normal(\"bar.txt\".as_ref()),\n]);\n```",
- "id": 2258,
+ "id": 2256,
"inner": {
"enum": {
"generics": {
@@ -232056,47 +250528,47 @@
},
"has_stripped_variants": false,
"impls": [
- 6372,
- 6373,
- 6374,
- 6375,
- 6376,
- 6377,
- 6378,
- 6379,
- 6380,
- 6381,
- 6382,
- 6383,
- 6384,
- 6385,
- 6386,
- 6387,
- 6388,
- 6390,
- 6391,
- 6393,
- 6394,
- 6396,
- 6398,
- 6400,
- 6402,
- 2257,
- 6404
+ 6405,
+ 6406,
+ 6407,
+ 6408,
+ 6409,
+ 6410,
+ 6411,
+ 6412,
+ 6413,
+ 6414,
+ 6415,
+ 6416,
+ 6417,
+ 6418,
+ 6419,
+ 6420,
+ 6421,
+ 6423,
+ 6424,
+ 6426,
+ 6427,
+ 6429,
+ 6431,
+ 6433,
+ 6435,
+ 2255,
+ 6437
],
"variants": [
- 6332,
6365,
- 6366,
- 6367,
- 6369
+ 6398,
+ 6399,
+ 6400,
+ 6402
]
}
},
"links": {
- "Path::components": 6370,
- "`Components`": 2261,
- "`Path`": 1667
+ "Path::components": 6403,
+ "`Components`": 2259,
+ "`Path`": 1666
},
"name": "Component",
"span": {
@@ -232112,7 +250584,7 @@
},
"visibility": "public"
},
- "2259": {
+ "2257": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -232121,7 +250593,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2259,
+ "id": 2257,
"inner": {
"function": {
"generics": {
@@ -232158,7 +250630,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -232182,7 +250654,7 @@
},
"visibility": "default"
},
- "2260": {
+ "2258": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -232191,7 +250663,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2260,
+ "id": 2258,
"inner": {
"impl": {
"blanket_impl": null,
@@ -232207,7 +250679,7 @@
"constraints": []
}
},
- "id": 2261,
+ "id": 2259,
"path": "Components"
}
},
@@ -232219,7 +250691,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2259
+ 2257
],
"provided_trait_methods": [],
"trait": {
@@ -232230,7 +250702,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -232259,7 +250731,7 @@
},
"visibility": "default"
},
- "2261": {
+ "2259": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -232273,7 +250745,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "An iterator over the [`Component`]s of a [`Path`].\n\nThis `struct` is created by the [`components`] method on [`Path`].\nSee its documentation for more.\n\n# Examples\n\n```\nuse std::path::Path;\n\nlet path = Path::new(\"/tmp/foo/bar.txt\");\n\nfor component in path.components() {\n println!(\"{component:?}\");\n}\n```\n\n[`components`]: Path::components",
- "id": 2261,
+ "id": 2259,
"inner": {
"struct": {
"generics": {
@@ -232290,34 +250762,34 @@
"where_predicates": []
},
"impls": [
- 6411,
- 6412,
- 6413,
- 6414,
- 6415,
- 6416,
- 6417,
- 6418,
- 6419,
- 6420,
- 6421,
- 6422,
- 6423,
- 6424,
- 6425,
- 6426,
- 6427,
- 6429,
- 6431,
- 6433,
- 2260,
- 6436,
- 6438,
- 6439,
- 6441,
- 6442,
6444,
- 6446
+ 6445,
+ 6446,
+ 6447,
+ 6448,
+ 6449,
+ 6450,
+ 6451,
+ 6452,
+ 6453,
+ 6454,
+ 6455,
+ 6456,
+ 6457,
+ 6458,
+ 6459,
+ 6460,
+ 6462,
+ 6464,
+ 6466,
+ 2258,
+ 6469,
+ 6471,
+ 6472,
+ 6474,
+ 6475,
+ 6477,
+ 6479
],
"kind": {
"plain": {
@@ -232328,9 +250800,9 @@
}
},
"links": {
- "Path::components": 6370,
- "`Component`": 2258,
- "`Path`": 1667
+ "Path::components": 6403,
+ "`Component`": 2256,
+ "`Path`": 1666
},
"name": "Components",
"span": {
@@ -232346,7 +250818,7 @@
},
"visibility": "public"
},
- "2262": {
+ "2260": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -232355,7 +250827,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2262,
+ "id": 2260,
"inner": {
"function": {
"generics": {
@@ -232392,7 +250864,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -232416,7 +250888,7 @@
},
"visibility": "default"
},
- "2263": {
+ "2261": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -232425,7 +250897,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2263,
+ "id": 2261,
"inner": {
"impl": {
"blanket_impl": null,
@@ -232441,7 +250913,7 @@
"constraints": []
}
},
- "id": 2264,
+ "id": 2262,
"path": "Iter"
}
},
@@ -232453,7 +250925,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2262
+ 2260
],
"provided_trait_methods": [],
"trait": {
@@ -232464,7 +250936,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -232493,7 +250965,7 @@
},
"visibility": "default"
},
- "2264": {
+ "2262": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -232507,7 +250979,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "An iterator over the [`Component`]s of a [`Path`], as [`OsStr`] slices.\n\nThis `struct` is created by the [`iter`] method on [`Path`].\nSee its documentation for more.\n\n[`iter`]: Path::iter",
- "id": 2264,
+ "id": 2262,
"inner": {
"struct": {
"generics": {
@@ -232524,30 +250996,30 @@
"where_predicates": []
},
"impls": [
- 6450,
- 6451,
- 6452,
- 6453,
- 6454,
- 6455,
- 6456,
- 6457,
- 6458,
- 6459,
- 6460,
- 6461,
- 6462,
- 6463,
- 6464,
- 6465,
- 6466,
- 6468,
- 6470,
- 6472,
- 2263,
- 6475,
- 6477,
- 6478
+ 6483,
+ 6484,
+ 6485,
+ 6486,
+ 6487,
+ 6488,
+ 6489,
+ 6490,
+ 6491,
+ 6492,
+ 6493,
+ 6494,
+ 6495,
+ 6496,
+ 6497,
+ 6498,
+ 6499,
+ 6501,
+ 6503,
+ 6505,
+ 2261,
+ 6508,
+ 6510,
+ 6511
],
"kind": {
"plain": {
@@ -232558,10 +251030,10 @@
}
},
"links": {
- "Path::iter": 6448,
- "`Component`": 2258,
- "`OsStr`": 1720,
- "`Path`": 1667
+ "Path::iter": 6481,
+ "`Component`": 2256,
+ "`OsStr`": 1719,
+ "`Path`": 1666
},
"name": "Iter",
"span": {
@@ -232577,7 +251049,7 @@
},
"visibility": "public"
},
- "2265": {
+ "2263": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -232586,7 +251058,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2265,
+ "id": 2263,
"inner": {
"function": {
"generics": {
@@ -232623,7 +251095,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -232636,18 +251108,18 @@
"name": "as_ref",
"span": {
"begin": [
- 2169,
+ 2260,
5
],
"end": [
- 2171,
+ 2262,
6
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2266": {
+ "2264": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -232656,14 +251128,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2266,
+ "id": 2264,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "PathBuf"
}
},
@@ -232675,7 +251147,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2265
+ 2263
],
"provided_trait_methods": [],
"trait": {
@@ -232686,7 +251158,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -232704,18 +251176,18 @@
"name": null,
"span": {
"begin": [
- 2167,
+ 2258,
1
],
"end": [
- 2172,
+ 2263,
2
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2267": {
+ "2265": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -232724,7 +251196,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2267,
+ "id": 2265,
"inner": {
"function": {
"generics": {
@@ -232761,7 +251233,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -232774,19 +251246,22 @@
"name": "as_ref",
"span": {
"begin": [
- 3342,
+ 3530,
5
],
"end": [
- 3344,
+ 3532,
6
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2268": {
+ "2266": {
"attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 143773, is_soft: false}, feature: \"const_convert\", promotable: false}}]"
+ },
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
}
@@ -232794,14 +251269,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2268,
+ "id": 2266,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
},
@@ -232813,7 +251288,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2267
+ 2265
],
"provided_trait_methods": [],
"trait": {
@@ -232824,7 +251299,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -232842,18 +251317,18 @@
"name": null,
"span": {
"begin": [
- 3340,
+ 3528,
1
],
"end": [
- 3345,
+ 3533,
2
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2269": {
+ "2267": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -232862,7 +251337,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2269,
+ "id": 2267,
"inner": {
"function": {
"generics": {
@@ -232899,7 +251374,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -232912,19 +251387,22 @@
"name": "as_ref",
"span": {
"begin": [
- 3520,
+ 3710,
5
],
"end": [
- 3522,
+ 3712,
6
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2270": {
+ "2268": {
"attrs": [
+ {
+ "other": "#[attr = ConstStability {stability: PartialConstStability {level: Unstable {reason: None,\nissue: 143773, is_soft: false}, feature: \"const_convert\", promotable: false}}]"
+ },
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
}
@@ -232932,14 +251410,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2270,
+ "id": 2268,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "crate::ffi::OsStr"
}
},
@@ -232951,7 +251429,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2269
+ 2267
],
"provided_trait_methods": [],
"trait": {
@@ -232962,7 +251440,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -232980,18 +251458,18 @@
"name": null,
"span": {
"begin": [
- 3518,
+ 3708,
1
],
"end": [
- 3523,
+ 3713,
2
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2271": {
+ "2269": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -233000,7 +251478,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2271,
+ "id": 2269,
"inner": {
"function": {
"generics": {
@@ -233037,7 +251515,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -233056,18 +251534,51 @@
"name": "eq",
"span": {
"begin": [
- 3663,
+ 3853,
1
],
"end": [
- 3663,
+ 3853,
36
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2272": {
+ "227": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 227,
+ "inner": {
+ "use": {
+ "id": 228,
+ "is_glob": false,
+ "name": "consts",
+ "source": "core::f128::consts"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 11,
+ 1
+ ],
+ "end": [
+ 11,
+ 28
+ ],
+ "filename": "std/src/num/f128.rs"
+ },
+ "visibility": "public"
+ },
+ "2270": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -233076,14 +251587,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2272,
+ "id": 2270,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "PathBuf"
}
},
@@ -233095,7 +251606,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2271
+ 2269
],
"provided_trait_methods": [
"ne"
@@ -233108,7 +251619,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -233117,7 +251628,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -233126,18 +251637,18 @@
"name": null,
"span": {
"begin": [
- 3663,
+ 3853,
1
],
"end": [
- 3663,
+ 3853,
36
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2273": {
+ "2271": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -233146,7 +251657,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2273,
+ "id": 2271,
"inner": {
"function": {
"generics": {
@@ -233183,7 +251694,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "PathBuf"
}
}
@@ -233202,18 +251713,18 @@
"name": "eq",
"span": {
"begin": [
- 3663,
+ 3853,
1
],
"end": [
- 3663,
+ 3853,
36
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2274": {
+ "2272": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -233222,14 +251733,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2274,
+ "id": 2272,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "crate::ffi::OsStr"
}
},
@@ -233241,7 +251752,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2273
+ 2271
],
"provided_trait_methods": [
"ne"
@@ -233254,7 +251765,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "PathBuf"
}
}
@@ -233263,7 +251774,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -233272,18 +251783,18 @@
"name": null,
"span": {
"begin": [
- 3663,
+ 3853,
1
],
"end": [
- 3663,
+ 3853,
36
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2275": {
+ "2273": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -233292,7 +251803,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2275,
+ "id": 2273,
"inner": {
"function": {
"generics": {
@@ -233329,7 +251840,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -233347,7 +251858,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -233367,18 +251878,18 @@
"name": "partial_cmp",
"span": {
"begin": [
- 3663,
+ 3853,
1
],
"end": [
- 3663,
+ 3853,
36
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2276": {
+ "2274": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -233387,14 +251898,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2276,
+ "id": 2274,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "PathBuf"
}
},
@@ -233406,7 +251917,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2275
+ 2273
],
"provided_trait_methods": [
"lt",
@@ -233426,7 +251937,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -233435,7 +251946,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -233444,18 +251955,18 @@
"name": null,
"span": {
"begin": [
- 3663,
+ 3853,
1
],
"end": [
- 3663,
+ 3853,
36
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2277": {
+ "2275": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -233464,7 +251975,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2277,
+ "id": 2275,
"inner": {
"function": {
"generics": {
@@ -233501,7 +252012,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "PathBuf"
}
}
@@ -233519,7 +252030,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -233539,18 +252050,18 @@
"name": "partial_cmp",
"span": {
"begin": [
- 3663,
+ 3853,
1
],
"end": [
- 3663,
+ 3853,
36
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2278": {
+ "2276": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -233559,14 +252070,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2278,
+ "id": 2276,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "crate::ffi::OsStr"
}
},
@@ -233578,7 +252089,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2277
+ 2275
],
"provided_trait_methods": [
"lt",
@@ -233598,7 +252109,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "PathBuf"
}
}
@@ -233607,7 +252118,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -233616,18 +252127,18 @@
"name": null,
"span": {
"begin": [
- 3663,
+ 3853,
1
],
"end": [
- 3663,
+ 3853,
36
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2279": {
+ "2277": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -233636,7 +252147,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2279,
+ "id": 2277,
"inner": {
"function": {
"generics": {
@@ -233677,7 +252188,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -233698,18 +252209,18 @@
"name": "eq",
"span": {
"begin": [
- 3664,
+ 3854,
1
],
"end": [
- 3664,
+ 3854,
42
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2280": {
+ "2278": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -233718,14 +252229,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2280,
+ "id": 2278,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "PathBuf"
}
},
@@ -233746,7 +252257,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2279
+ 2277
],
"provided_trait_methods": [
"ne"
@@ -233763,7 +252274,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -233774,7 +252285,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -233783,18 +252294,18 @@
"name": null,
"span": {
"begin": [
- 3664,
+ 3854,
1
],
"end": [
- 3664,
+ 3854,
42
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2281": {
+ "2279": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -233803,7 +252314,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2281,
+ "id": 2279,
"inner": {
"function": {
"generics": {
@@ -233840,7 +252351,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "PathBuf"
}
}
@@ -233859,18 +252370,18 @@
"name": "eq",
"span": {
"begin": [
- 3664,
+ 3854,
1
],
"end": [
- 3664,
+ 3854,
42
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2282": {
+ "2280": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -233879,7 +252390,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2282,
+ "id": 2280,
"inner": {
"impl": {
"blanket_impl": null,
@@ -233890,7 +252401,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "crate::ffi::OsStr"
}
}
@@ -233913,7 +252424,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2281
+ 2279
],
"provided_trait_methods": [
"ne"
@@ -233926,7 +252437,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "PathBuf"
}
}
@@ -233935,7 +252446,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -233944,18 +252455,18 @@
"name": null,
"span": {
"begin": [
- 3664,
+ 3854,
1
],
"end": [
- 3664,
+ 3854,
42
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2283": {
+ "2281": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -233964,7 +252475,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2283,
+ "id": 2281,
"inner": {
"function": {
"generics": {
@@ -234005,7 +252516,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -234025,7 +252536,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -234045,18 +252556,18 @@
"name": "partial_cmp",
"span": {
"begin": [
- 3664,
+ 3854,
1
],
"end": [
- 3664,
+ 3854,
42
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2284": {
+ "2282": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -234065,14 +252576,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2284,
+ "id": 2282,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "PathBuf"
}
},
@@ -234093,7 +252604,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2283
+ 2281
],
"provided_trait_methods": [
"lt",
@@ -234117,7 +252628,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -234128,7 +252639,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -234137,18 +252648,18 @@
"name": null,
"span": {
"begin": [
- 3664,
+ 3854,
1
],
"end": [
- 3664,
+ 3854,
42
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2285": {
+ "2283": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -234157,7 +252668,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2285,
+ "id": 2283,
"inner": {
"function": {
"generics": {
@@ -234194,7 +252705,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "PathBuf"
}
}
@@ -234212,7 +252723,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -234232,18 +252743,18 @@
"name": "partial_cmp",
"span": {
"begin": [
- 3664,
+ 3854,
1
],
"end": [
- 3664,
+ 3854,
42
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2286": {
+ "2284": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -234252,7 +252763,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2286,
+ "id": 2284,
"inner": {
"impl": {
"blanket_impl": null,
@@ -234263,7 +252774,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "crate::ffi::OsStr"
}
}
@@ -234286,7 +252797,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2285
+ 2283
],
"provided_trait_methods": [
"lt",
@@ -234306,7 +252817,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "PathBuf"
}
}
@@ -234315,7 +252826,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -234324,18 +252835,18 @@
"name": null,
"span": {
"begin": [
- 3664,
+ 3854,
1
],
"end": [
- 3664,
+ 3854,
42
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2287": {
+ "2285": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -234344,7 +252855,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2287,
+ "id": 2285,
"inner": {
"function": {
"generics": {
@@ -234381,7 +252892,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -234400,18 +252911,18 @@
"name": "eq",
"span": {
"begin": [
- 3667,
+ 3857,
1
],
"end": [
- 3667,
+ 3857,
33
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2288": {
+ "2286": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -234420,14 +252931,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2288,
+ "id": 2286,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
},
@@ -234439,7 +252950,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2287
+ 2285
],
"provided_trait_methods": [
"ne"
@@ -234452,7 +252963,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -234461,7 +252972,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -234470,18 +252981,18 @@
"name": null,
"span": {
"begin": [
- 3667,
+ 3857,
1
],
"end": [
- 3667,
+ 3857,
33
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2289": {
+ "2287": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -234490,7 +253001,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2289,
+ "id": 2287,
"inner": {
"function": {
"generics": {
@@ -234527,7 +253038,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -234546,51 +253057,18 @@
"name": "eq",
"span": {
"begin": [
- 3667,
+ 3857,
1
],
"end": [
- 3667,
+ 3857,
33
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "229": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 229,
- "inner": {
- "use": {
- "id": 230,
- "is_glob": false,
- "name": "consts",
- "source": "core::f128::consts"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 11,
- 1
- ],
- "end": [
- 11,
- 28
- ],
- "filename": "std/src/num/f128.rs"
- },
- "visibility": "public"
- },
- "2290": {
+ "2288": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -234599,14 +253077,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2290,
+ "id": 2288,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "crate::ffi::OsStr"
}
},
@@ -234618,7 +253096,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2289
+ 2287
],
"provided_trait_methods": [
"ne"
@@ -234631,7 +253109,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -234640,7 +253118,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -234649,18 +253127,18 @@
"name": null,
"span": {
"begin": [
- 3667,
+ 3857,
1
],
"end": [
- 3667,
+ 3857,
33
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2291": {
+ "2289": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -234669,7 +253147,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2291,
+ "id": 2289,
"inner": {
"function": {
"generics": {
@@ -234706,7 +253184,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -234724,7 +253202,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -234744,18 +253222,79 @@
"name": "partial_cmp",
"span": {
"begin": [
- 3667,
+ 3857,
1
],
"end": [
- 3667,
+ 3857,
33
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2292": {
+ "229": {
+ "attrs": [
+ {
+ "other": "#[rustc_doc_primitive = \"f128\"]"
+ },
+ {
+ "other": "#[doc(alias = \"quad\")]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": "A 128-bit floating-point type (specifically, the \"binary128\" type defined in IEEE 754-2008).\n\nThis type is very similar to [`prim@f32`] and [`prim@f64`], but has increased precision by using twice\nas many bits as `f64`. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on\nquad-precision values][wikipedia] for more information.\n\nNote that no platforms have hardware support for `f128` without enabling target specific features,\nas for all instruction set architectures `f128` is considered an optional feature. Only Power ISA\n(\"PowerPC\") and RISC-V (via the Q extension) specify it, and only certain microarchitectures\nactually implement it. For x86-64 and AArch64, ISA support is not even specified, so it will always\nbe a software implementation significantly slower than `f64`.\n\n_Note: `f128` support is incomplete. Many platforms will not be able to link math functions. On\nx86 in particular, these functions do link but their results are always incorrect._\n\n*[See also the `std::f128::consts` module](crate::f128::consts).*\n\n[wikipedia]: https://en.wikipedia.org/wiki/Quadruple-precision_floating-point_format",
+ "id": 229,
+ "inner": {
+ "primitive": {
+ "impls": [
+ 10162,
+ 10214,
+ 10226,
+ 10227,
+ 10228,
+ 10229,
+ 10230,
+ 10231,
+ 10232,
+ 10233,
+ 10234,
+ 10235,
+ 10236,
+ 10237,
+ 10238,
+ 10239,
+ 10240,
+ 10241
+ ],
+ "name": "f128"
+ }
+ },
+ "links": {
+ "`prim@f32`": 265,
+ "`prim@f64`": 297,
+ "crate::f128::consts": 228,
+ "prim@f32": 265
+ },
+ "name": "f128",
+ "span": {
+ "begin": [
+ 1404,
+ 1
+ ],
+ "end": [
+ 1404,
+ 17
+ ],
+ "filename": "std/src/../../core/src/primitive_docs.rs"
+ },
+ "visibility": "public"
+ },
+ "2290": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -234764,14 +253303,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2292,
+ "id": 2290,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
},
@@ -234783,7 +253322,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2291
+ 2289
],
"provided_trait_methods": [
"lt",
@@ -234803,7 +253342,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -234812,7 +253351,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -234821,18 +253360,18 @@
"name": null,
"span": {
"begin": [
- 3667,
+ 3857,
1
],
"end": [
- 3667,
+ 3857,
33
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2293": {
+ "2291": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -234841,7 +253380,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2293,
+ "id": 2291,
"inner": {
"function": {
"generics": {
@@ -234878,7 +253417,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -234896,7 +253435,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -234916,18 +253455,18 @@
"name": "partial_cmp",
"span": {
"begin": [
- 3667,
+ 3857,
1
],
"end": [
- 3667,
+ 3857,
33
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2294": {
+ "2292": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -234936,14 +253475,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2294,
+ "id": 2292,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "crate::ffi::OsStr"
}
},
@@ -234955,7 +253494,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2293
+ 2291
],
"provided_trait_methods": [
"lt",
@@ -234975,7 +253514,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -234984,7 +253523,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -234993,18 +253532,18 @@
"name": null,
"span": {
"begin": [
- 3667,
+ 3857,
1
],
"end": [
- 3667,
+ 3857,
33
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2295": {
+ "2293": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -235013,7 +253552,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2295,
+ "id": 2293,
"inner": {
"function": {
"generics": {
@@ -235054,7 +253593,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -235075,18 +253614,18 @@
"name": "eq",
"span": {
"begin": [
- 3668,
+ 3858,
1
],
"end": [
- 3668,
+ 3858,
39
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2296": {
+ "2294": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -235095,14 +253634,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2296,
+ "id": 2294,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
},
@@ -235123,7 +253662,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2295
+ 2293
],
"provided_trait_methods": [
"ne"
@@ -235140,7 +253679,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -235151,7 +253690,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -235160,18 +253699,18 @@
"name": null,
"span": {
"begin": [
- 3668,
+ 3858,
1
],
"end": [
- 3668,
+ 3858,
39
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2297": {
+ "2295": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -235180,7 +253719,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2297,
+ "id": 2295,
"inner": {
"function": {
"generics": {
@@ -235217,7 +253756,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -235236,18 +253775,18 @@
"name": "eq",
"span": {
"begin": [
- 3668,
+ 3858,
1
],
"end": [
- 3668,
+ 3858,
39
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2298": {
+ "2296": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -235256,7 +253795,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2298,
+ "id": 2296,
"inner": {
"impl": {
"blanket_impl": null,
@@ -235267,7 +253806,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "crate::ffi::OsStr"
}
}
@@ -235290,7 +253829,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2297
+ 2295
],
"provided_trait_methods": [
"ne"
@@ -235303,7 +253842,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -235312,7 +253851,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -235321,18 +253860,18 @@
"name": null,
"span": {
"begin": [
- 3668,
+ 3858,
1
],
"end": [
- 3668,
+ 3858,
39
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2299": {
+ "2297": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -235341,7 +253880,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2299,
+ "id": 2297,
"inner": {
"function": {
"generics": {
@@ -235382,7 +253921,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -235402,7 +253941,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -235422,18 +253961,18 @@
"name": "partial_cmp",
"span": {
"begin": [
- 3668,
+ 3858,
1
],
"end": [
- 3668,
+ 3858,
39
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2300": {
+ "2298": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -235442,14 +253981,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2300,
+ "id": 2298,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
},
@@ -235470,7 +254009,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2299
+ 2297
],
"provided_trait_methods": [
"lt",
@@ -235494,7 +254033,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -235505,7 +254044,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -235514,18 +254053,18 @@
"name": null,
"span": {
"begin": [
- 3668,
+ 3858,
1
],
"end": [
- 3668,
+ 3858,
39
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2301": {
+ "2299": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -235534,7 +254073,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2301,
+ "id": 2299,
"inner": {
"function": {
"generics": {
@@ -235571,7 +254110,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -235589,7 +254128,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -235609,18 +254148,60 @@
"name": "partial_cmp",
"span": {
"begin": [
- 3668,
+ 3858,
1
],
"end": [
- 3668,
+ 3858,
39
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2302": {
+ "230": {
+ "attrs": [
+ {
+ "other": "#[doc(test(attr(feature(cfg_target_has_reliable_f16_f128),\nexpect(internal_features))))]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
+ },
+ {
+ "other": "#[attr = Path(\"num/f128.rs\")]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": "Constants for the `f128` quadruple-precision floating point type.\n\n*[See also the `f128` primitive type](primitive@f128).*\n\nMathematically significant numbers are provided in the `consts` sub-module.",
+ "id": 230,
+ "inner": {
+ "module": {
+ "is_crate": false,
+ "is_stripped": false,
+ "items": [
+ 227
+ ]
+ }
+ },
+ "links": {
+ "primitive@f128": 229
+ },
+ "name": "f128",
+ "span": {
+ "begin": [
+ 1,
+ 1
+ ],
+ "end": [
+ 1079,
+ 2
+ ],
+ "filename": "std/src/num/f128.rs"
+ },
+ "visibility": "public"
+ },
+ "2300": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -235629,7 +254210,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2302,
+ "id": 2300,
"inner": {
"impl": {
"blanket_impl": null,
@@ -235640,7 +254221,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "crate::ffi::OsStr"
}
}
@@ -235663,7 +254244,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2301
+ 2299
],
"provided_trait_methods": [
"lt",
@@ -235683,7 +254264,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -235692,7 +254273,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -235701,18 +254282,18 @@
"name": null,
"span": {
"begin": [
- 3668,
+ 3858,
1
],
"end": [
- 3668,
+ 3858,
39
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2303": {
+ "2301": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -235721,7 +254302,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2303,
+ "id": 2301,
"inner": {
"function": {
"generics": {
@@ -235758,7 +254339,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -235777,18 +254358,18 @@
"name": "eq",
"span": {
"begin": [
- 3671,
+ 3861,
1
],
"end": [
- 3671,
+ 3861,
39
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2304": {
+ "2302": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -235797,7 +254378,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2304,
+ "id": 2302,
"inner": {
"impl": {
"blanket_impl": null,
@@ -235808,7 +254389,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -235831,7 +254412,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2303
+ 2301
],
"provided_trait_methods": [
"ne"
@@ -235844,7 +254425,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -235853,7 +254434,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -235862,18 +254443,18 @@
"name": null,
"span": {
"begin": [
- 3671,
+ 3861,
1
],
"end": [
- 3671,
+ 3861,
39
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2305": {
+ "2303": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -235882,7 +254463,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2305,
+ "id": 2303,
"inner": {
"function": {
"generics": {
@@ -235923,7 +254504,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -235944,18 +254525,18 @@
"name": "eq",
"span": {
"begin": [
- 3671,
+ 3861,
1
],
"end": [
- 3671,
+ 3861,
39
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2306": {
+ "2304": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -235964,14 +254545,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2306,
+ "id": 2304,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "crate::ffi::OsStr"
}
},
@@ -235992,7 +254573,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2305
+ 2303
],
"provided_trait_methods": [
"ne"
@@ -236009,7 +254590,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -236020,7 +254601,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -236029,18 +254610,18 @@
"name": null,
"span": {
"begin": [
- 3671,
+ 3861,
1
],
"end": [
- 3671,
+ 3861,
39
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2307": {
+ "2305": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -236049,7 +254630,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2307,
+ "id": 2305,
"inner": {
"function": {
"generics": {
@@ -236086,7 +254667,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -236104,7 +254685,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -236124,18 +254705,18 @@
"name": "partial_cmp",
"span": {
"begin": [
- 3671,
+ 3861,
1
],
"end": [
- 3671,
+ 3861,
39
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2308": {
+ "2306": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -236144,7 +254725,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2308,
+ "id": 2306,
"inner": {
"impl": {
"blanket_impl": null,
@@ -236155,7 +254736,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -236178,7 +254759,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2307
+ 2305
],
"provided_trait_methods": [
"lt",
@@ -236198,7 +254779,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -236207,7 +254788,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -236216,18 +254797,18 @@
"name": null,
"span": {
"begin": [
- 3671,
+ 3861,
1
],
"end": [
- 3671,
+ 3861,
39
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2309": {
+ "2307": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -236236,7 +254817,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2309,
+ "id": 2307,
"inner": {
"function": {
"generics": {
@@ -236277,7 +254858,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -236297,7 +254878,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -236317,79 +254898,18 @@
"name": "partial_cmp",
"span": {
"begin": [
- 3671,
+ 3861,
1
],
"end": [
- 3671,
+ 3861,
39
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "231": {
- "attrs": [
- {
- "other": "#[rustc_doc_primitive = \"f128\"]"
- },
- {
- "other": "#[doc(alias = \"quad\")]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": "A 128-bit floating-point type (specifically, the \"binary128\" type defined in IEEE 754-2008).\n\nThis type is very similar to [`prim@f32`] and [`prim@f64`], but has increased precision by using twice\nas many bits as `f64`. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on\nquad-precision values][wikipedia] for more information.\n\nNote that no platforms have hardware support for `f128` without enabling target specific features,\nas for all instruction set architectures `f128` is considered an optional feature. Only Power ISA\n(\"PowerPC\") and RISC-V (via the Q extension) specify it, and only certain microarchitectures\nactually implement it. For x86-64 and AArch64, ISA support is not even specified, so it will always\nbe a software implementation significantly slower than `f64`.\n\n_Note: `f128` support is incomplete. Many platforms will not be able to link math functions. On\nx86 in particular, these functions do link but their results are always incorrect._\n\n*[See also the `std::f128::consts` module](crate::f128::consts).*\n\n[wikipedia]: https://en.wikipedia.org/wiki/Quadruple-precision_floating-point_format",
- "id": 231,
- "inner": {
- "primitive": {
- "impls": [
- 9941,
- 9993,
- 10005,
- 10006,
- 10007,
- 10008,
- 10009,
- 10010,
- 10011,
- 10012,
- 10013,
- 10014,
- 10015,
- 10016,
- 10017,
- 10018,
- 10019,
- 10020
- ],
- "name": "f128"
- }
- },
- "links": {
- "`prim@f32`": 267,
- "`prim@f64`": 299,
- "crate::f128::consts": 230,
- "prim@f32": 267
- },
- "name": "f128",
- "span": {
- "begin": [
- 1404,
- 1
- ],
- "end": [
- 1404,
- 17
- ],
- "filename": "std/src/../../core/src/primitive_docs.rs"
- },
- "visibility": "public"
- },
- "2310": {
+ "2308": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -236398,14 +254918,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2310,
+ "id": 2308,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "crate::ffi::OsStr"
}
},
@@ -236426,7 +254946,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2309
+ 2307
],
"provided_trait_methods": [
"lt",
@@ -236450,7 +254970,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -236461,7 +254981,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -236470,18 +254990,18 @@
"name": null,
"span": {
"begin": [
- 3671,
+ 3861,
1
],
"end": [
- 3671,
+ 3861,
39
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2311": {
+ "2309": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -236490,7 +255010,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2311,
+ "id": 2309,
"inner": {
"function": {
"generics": {
@@ -236527,7 +255047,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -236546,18 +255066,51 @@
"name": "eq",
"span": {
"begin": [
- 3674,
+ 3864,
1
],
"end": [
- 3674,
+ 3864,
44
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2312": {
+ "231": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f16\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 231,
+ "inner": {
+ "use": {
+ "id": 232,
+ "is_glob": false,
+ "name": "consts",
+ "source": "core::f16::consts"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 11,
+ 1
+ ],
+ "end": [
+ 11,
+ 27
+ ],
+ "filename": "std/src/num/f16.rs"
+ },
+ "visibility": "public"
+ },
+ "2310": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -236566,7 +255119,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2312,
+ "id": 2310,
"inner": {
"impl": {
"blanket_impl": null,
@@ -236582,7 +255135,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -236591,7 +255144,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "crate::borrow::Cow"
}
},
@@ -236612,7 +255165,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2311
+ 2309
],
"provided_trait_methods": [
"ne"
@@ -236625,7 +255178,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -236634,7 +255187,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -236643,18 +255196,18 @@
"name": null,
"span": {
"begin": [
- 3674,
+ 3864,
1
],
"end": [
- 3674,
+ 3864,
44
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2313": {
+ "2311": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -236663,7 +255216,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2313,
+ "id": 2311,
"inner": {
"function": {
"generics": {
@@ -236709,7 +255262,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -236718,7 +255271,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -236737,18 +255290,18 @@
"name": "eq",
"span": {
"begin": [
- 3674,
+ 3864,
1
],
"end": [
- 3674,
+ 3864,
44
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2314": {
+ "2312": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -236757,14 +255310,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2314,
+ "id": 2312,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "crate::ffi::OsStr"
}
},
@@ -236785,7 +255338,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2313
+ 2311
],
"provided_trait_methods": [
"ne"
@@ -236807,7 +255360,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -236816,7 +255369,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -236825,7 +255378,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -236834,18 +255387,18 @@
"name": null,
"span": {
"begin": [
- 3674,
+ 3864,
1
],
"end": [
- 3674,
+ 3864,
44
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2315": {
+ "2313": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -236854,7 +255407,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2315,
+ "id": 2313,
"inner": {
"function": {
"generics": {
@@ -236891,7 +255444,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -236909,7 +255462,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -236929,18 +255482,18 @@
"name": "partial_cmp",
"span": {
"begin": [
- 3674,
+ 3864,
1
],
"end": [
- 3674,
+ 3864,
44
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2316": {
+ "2314": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -236949,7 +255502,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2316,
+ "id": 2314,
"inner": {
"impl": {
"blanket_impl": null,
@@ -236965,7 +255518,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -236974,7 +255527,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "crate::borrow::Cow"
}
},
@@ -236995,7 +255548,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2315
+ 2313
],
"provided_trait_methods": [
"lt",
@@ -237015,7 +255568,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -237024,7 +255577,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -237033,18 +255586,18 @@
"name": null,
"span": {
"begin": [
- 3674,
+ 3864,
1
],
"end": [
- 3674,
+ 3864,
44
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2317": {
+ "2315": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -237053,7 +255606,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2317,
+ "id": 2315,
"inner": {
"function": {
"generics": {
@@ -237099,7 +255652,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -237108,7 +255661,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -237126,7 +255679,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -237146,18 +255699,18 @@
"name": "partial_cmp",
"span": {
"begin": [
- 3674,
+ 3864,
1
],
"end": [
- 3674,
+ 3864,
44
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2318": {
+ "2316": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -237166,14 +255719,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2318,
+ "id": 2316,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "crate::ffi::OsStr"
}
},
@@ -237194,7 +255747,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2317
+ 2315
],
"provided_trait_methods": [
"lt",
@@ -237223,7 +255776,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -237232,7 +255785,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -237241,7 +255794,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -237250,18 +255803,18 @@
"name": null,
"span": {
"begin": [
- 3674,
+ 3864,
1
],
"end": [
- 3674,
+ 3864,
44
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2319": {
+ "2317": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -237270,7 +255823,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2319,
+ "id": 2317,
"inner": {
"function": {
"generics": {
@@ -237311,7 +255864,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -237332,60 +255885,18 @@
"name": "eq",
"span": {
"begin": [
- 3675,
+ 3865,
1
],
"end": [
- 3675,
+ 3865,
52
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "232": {
- "attrs": [
- {
- "other": "#[doc(test(attr(feature(cfg_target_has_reliable_f16_f128),\nexpect(internal_features))))]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f128\"}}]"
- },
- {
- "other": "#[attr = Path(\"num/f128.rs\")]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": "Constants for the `f128` quadruple-precision floating point type.\n\n*[See also the `f128` primitive type](primitive@f128).*\n\nMathematically significant numbers are provided in the `consts` sub-module.",
- "id": 232,
- "inner": {
- "module": {
- "is_crate": false,
- "is_stripped": false,
- "items": [
- 229
- ]
- }
- },
- "links": {
- "primitive@f128": 231
- },
- "name": "f128",
- "span": {
- "begin": [
- 1,
- 1
- ],
- "end": [
- 1077,
- 2
- ],
- "filename": "std/src/num/f128.rs"
- },
- "visibility": "public"
- },
- "2320": {
+ "2318": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -237394,7 +255905,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2320,
+ "id": 2318,
"inner": {
"impl": {
"blanket_impl": null,
@@ -237410,7 +255921,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -237419,7 +255930,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "crate::borrow::Cow"
}
},
@@ -237448,7 +255959,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2319
+ 2317
],
"provided_trait_methods": [
"ne"
@@ -237465,7 +255976,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -237476,7 +255987,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -237485,18 +255996,18 @@
"name": null,
"span": {
"begin": [
- 3675,
+ 3865,
1
],
"end": [
- 3675,
+ 3865,
52
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2321": {
+ "2319": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -237505,7 +256016,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2321,
+ "id": 2319,
"inner": {
"function": {
"generics": {
@@ -237551,7 +256062,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -237560,7 +256071,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -237579,18 +256090,18 @@
"name": "eq",
"span": {
"begin": [
- 3675,
+ 3865,
1
],
"end": [
- 3675,
+ 3865,
52
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2322": {
+ "2320": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -237599,7 +256110,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2322,
+ "id": 2320,
"inner": {
"impl": {
"blanket_impl": null,
@@ -237610,7 +256121,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "crate::ffi::OsStr"
}
}
@@ -237641,7 +256152,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2321
+ 2319
],
"provided_trait_methods": [
"ne"
@@ -237663,7 +256174,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -237672,7 +256183,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -237681,7 +256192,7 @@
"constraints": []
}
},
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -237690,18 +256201,18 @@
"name": null,
"span": {
"begin": [
- 3675,
+ 3865,
1
],
"end": [
- 3675,
+ 3865,
52
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2323": {
+ "2321": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -237710,7 +256221,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2323,
+ "id": 2321,
"inner": {
"function": {
"generics": {
@@ -237751,7 +256262,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -237771,7 +256282,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -237791,18 +256302,18 @@
"name": "partial_cmp",
"span": {
"begin": [
- 3675,
+ 3865,
1
],
"end": [
- 3675,
+ 3865,
52
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2324": {
+ "2322": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -237811,7 +256322,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2324,
+ "id": 2322,
"inner": {
"impl": {
"blanket_impl": null,
@@ -237827,7 +256338,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -237836,7 +256347,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "crate::borrow::Cow"
}
},
@@ -237865,7 +256376,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2323
+ 2321
],
"provided_trait_methods": [
"lt",
@@ -237889,7 +256400,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -237900,7 +256411,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -237909,18 +256420,18 @@
"name": null,
"span": {
"begin": [
- 3675,
+ 3865,
1
],
"end": [
- 3675,
+ 3865,
52
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2325": {
+ "2323": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -237929,7 +256440,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2325,
+ "id": 2323,
"inner": {
"function": {
"generics": {
@@ -237975,7 +256486,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -237984,7 +256495,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -238002,7 +256513,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2009,
+ "id": 2007,
"path": "cmp::Ordering"
}
}
@@ -238022,18 +256533,18 @@
"name": "partial_cmp",
"span": {
"begin": [
- 3675,
+ 3865,
1
],
"end": [
- 3675,
+ 3865,
52
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2326": {
+ "2324": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"cmp_path\"}}]"
@@ -238042,7 +256553,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2326,
+ "id": 2324,
"inner": {
"impl": {
"blanket_impl": null,
@@ -238053,7 +256564,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "crate::ffi::OsStr"
}
}
@@ -238084,7 +256595,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2325
+ 2323
],
"provided_trait_methods": [
"lt",
@@ -238113,7 +256624,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -238122,7 +256633,7 @@
"constraints": []
}
},
- "id": 2035,
+ "id": 2033,
"path": "Cow"
}
}
@@ -238131,7 +256642,7 @@
"constraints": []
}
},
- "id": 127,
+ "id": 125,
"path": "PartialOrd"
}
}
@@ -238140,23 +256651,23 @@
"name": null,
"span": {
"begin": [
- 3675,
+ 3865,
1
],
"end": [
- 3675,
+ 3865,
52
],
"filename": "std/src/path.rs"
},
"visibility": "default"
},
- "2329": {
+ "2327": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2329,
+ "id": 2327,
"inner": {
"impl": {
"blanket_impl": null,
@@ -238172,7 +256683,7 @@
"constraints": []
}
},
- "id": 2153,
+ "id": 2151,
"path": "Display"
}
},
@@ -238206,45 +256717,12 @@
"span": null,
"visibility": "default"
},
- "233": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f16\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 233,
- "inner": {
- "use": {
- "id": 234,
- "is_glob": false,
- "name": "consts",
- "source": "core::f16::consts"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 11,
- 1
- ],
- "end": [
- 11,
- 27
- ],
- "filename": "std/src/num/f16.rs"
- },
- "visibility": "public"
- },
- "2330": {
+ "2328": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2330,
+ "id": 2328,
"inner": {
"impl": {
"blanket_impl": null,
@@ -238260,7 +256738,7 @@
"constraints": []
}
},
- "id": 2153,
+ "id": 2151,
"path": "Display"
}
},
@@ -238294,12 +256772,12 @@
"span": null,
"visibility": "default"
},
- "2331": {
+ "2329": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2331,
+ "id": 2329,
"inner": {
"impl": {
"blanket_impl": null,
@@ -238315,7 +256793,7 @@
"constraints": []
}
},
- "id": 2153,
+ "id": 2151,
"path": "Display"
}
},
@@ -238339,7 +256817,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -238349,12 +256827,73 @@
"span": null,
"visibility": "default"
},
- "2332": {
+ "233": {
+ "attrs": [
+ {
+ "other": "#[rustc_doc_primitive = \"f16\"]"
+ },
+ {
+ "other": "#[doc(alias = \"half\")]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f16\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": "A 16-bit floating-point type (specifically, the \"binary16\" type defined in IEEE 754-2008).\n\nThis type is very similar to [`prim@f32`] but has decreased precision because it uses half as many\nbits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on half-precision\nvalues][wikipedia] for more information.\n\nNote that most common platforms will not support `f16` in hardware without enabling extra target\nfeatures, with the notable exception of Apple Silicon (also known as M1, M2, etc.) processors.\nHardware support on x86/x86-64 requires the avx512fp16 or avx10.1 features, while RISC-V requires\nZfh, and Arm/AArch64 requires FEAT_FP16. Usually the fallback implementation will be to use `f32`\nhardware if it exists, and convert between `f16` and `f32` when performing math.\n\n*[See also the `std::f16::consts` module](crate::f16::consts).*\n\n[wikipedia]: https://en.wikipedia.org/wiki/Half-precision_floating-point_format",
+ "id": 233,
+ "inner": {
+ "primitive": {
+ "impls": [
+ 9832,
+ 9885,
+ 9898,
+ 9899,
+ 9900,
+ 9901,
+ 9902,
+ 9903,
+ 9904,
+ 9905,
+ 9906,
+ 9907,
+ 9908,
+ 9909,
+ 9910,
+ 9911,
+ 9912,
+ 9913,
+ 9914
+ ],
+ "name": "f16"
+ }
+ },
+ "links": {
+ "`prim@f32`": 265,
+ "crate::f16::consts": 232,
+ "prim@f32": 265
+ },
+ "name": "f16",
+ "span": {
+ "begin": [
+ 1170,
+ 1
+ ],
+ "end": [
+ 1170,
+ 16
+ ],
+ "filename": "std/src/../../core/src/primitive_docs.rs"
+ },
+ "visibility": "public"
+ },
+ "2330": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2332,
+ "id": 2330,
"inner": {
"impl": {
"blanket_impl": null,
@@ -238370,7 +256909,7 @@
"constraints": []
}
},
- "id": 2153,
+ "id": 2151,
"path": "Display"
}
},
@@ -238404,12 +256943,12 @@
"span": null,
"visibility": "default"
},
- "2333": {
+ "2331": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2333,
+ "id": 2331,
"inner": {
"impl": {
"blanket_impl": null,
@@ -238425,7 +256964,7 @@
"constraints": []
}
},
- "id": 2153,
+ "id": 2151,
"path": "Display"
}
},
@@ -238449,7 +256988,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -238459,12 +256998,12 @@
"span": null,
"visibility": "default"
},
- "2334": {
+ "2332": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2334,
+ "id": 2332,
"inner": {
"impl": {
"blanket_impl": null,
@@ -238480,7 +257019,7 @@
"constraints": []
}
},
- "id": 2153,
+ "id": 2151,
"path": "Display"
}
},
@@ -238504,7 +257043,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -238514,12 +257053,12 @@
"span": null,
"visibility": "default"
},
- "2335": {
+ "2333": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2335,
+ "id": 2333,
"inner": {
"impl": {
"blanket_impl": {
@@ -238537,7 +257076,7 @@
"constraints": []
}
},
- "id": 2153,
+ "id": 2151,
"path": "Display"
}
},
@@ -238582,7 +257121,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -238598,7 +257137,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -238607,23 +257146,23 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "2336": {
+ "2334": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2336,
+ "id": 2334,
"inner": {
"impl": {
"blanket_impl": {
@@ -238641,7 +257180,7 @@
"constraints": []
}
},
- "id": 2153,
+ "id": 2151,
"path": "Display"
}
},
@@ -238686,7 +257225,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -238702,7 +257241,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -238711,23 +257250,23 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "2337": {
+ "2335": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2337,
+ "id": 2335,
"inner": {
"impl": {
"blanket_impl": {
@@ -238745,7 +257284,7 @@
"constraints": []
}
},
- "id": 2153,
+ "id": 2151,
"path": "Display"
}
},
@@ -238811,7 +257350,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -238836,23 +257375,23 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "2338": {
+ "2336": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2338,
+ "id": 2336,
"inner": {
"impl": {
"blanket_impl": {
@@ -238870,7 +257409,7 @@
"constraints": []
}
},
- "id": 2153,
+ "id": 2151,
"path": "Display"
}
},
@@ -238893,7 +257432,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -238918,23 +257457,23 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "2339": {
+ "2337": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2339,
+ "id": 2337,
"inner": {
"impl": {
"blanket_impl": {
@@ -238952,7 +257491,7 @@
"constraints": []
}
},
- "id": 2153,
+ "id": 2151,
"path": "Display"
}
},
@@ -239000,7 +257539,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -239018,8 +257557,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -239035,7 +257574,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -239044,23 +257583,23 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "2340": {
+ "2338": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2340,
+ "id": 2338,
"inner": {
"impl": {
"blanket_impl": {
@@ -239078,7 +257617,7 @@
"constraints": []
}
},
- "id": 2153,
+ "id": 2151,
"path": "Display"
}
},
@@ -239144,8 +257683,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -239161,7 +257700,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -239170,23 +257709,23 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "2341": {
+ "2339": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2341,
+ "id": 2339,
"inner": {
"impl": {
"blanket_impl": {
@@ -239204,7 +257743,7 @@
"constraints": []
}
},
- "id": 2153,
+ "id": 2151,
"path": "Display"
}
},
@@ -239252,12 +257791,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -239277,12 +257816,54 @@
},
"visibility": "default"
},
- "2342": {
+ "234": {
+ "attrs": [
+ {
+ "other": "#[doc(test(attr(feature(cfg_target_has_reliable_f16_f128),\nexpect(internal_features))))]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f16\"}}]"
+ },
+ {
+ "other": "#[attr = Path(\"num/f16.rs\")]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": "Constants for the `f16` half-precision floating point type.\n\n*[See also the `f16` primitive type](primitive@f16).*\n\nMathematically significant numbers are provided in the `consts` sub-module.",
+ "id": 234,
+ "inner": {
+ "module": {
+ "is_crate": false,
+ "is_stripped": false,
+ "items": [
+ 231
+ ]
+ }
+ },
+ "links": {
+ "primitive@f16": 233
+ },
+ "name": "f16",
+ "span": {
+ "begin": [
+ 1,
+ 1
+ ],
+ "end": [
+ 1044,
+ 2
+ ],
+ "filename": "std/src/num/f16.rs"
+ },
+ "visibility": "public"
+ },
+ "2340": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2342,
+ "id": 2340,
"inner": {
"impl": {
"blanket_impl": {
@@ -239300,7 +257881,7 @@
"constraints": []
}
},
- "id": 2153,
+ "id": 2151,
"path": "Display"
}
},
@@ -239361,7 +257942,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 163,
+ "id": 161,
"path": "ToString"
}
}
@@ -239370,23 +257951,23 @@
"name": null,
"span": {
"begin": [
- 2806,
+ 2866,
1
],
"end": [
- 2806,
+ 2866,
46
],
"filename": "checkouts/rust/library/alloc/src/string.rs"
},
"visibility": "default"
},
- "2343": {
+ "2341": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2343,
+ "id": 2341,
"inner": {
"function": {
"generics": {
@@ -239432,7 +258013,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -239444,7 +258025,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -239455,18 +258036,18 @@
"name": "fmt",
"span": {
"begin": [
- 1633,
+ 1638,
5
],
"end": [
- 1635,
+ 1640,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2344": {
+ "2342": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"os_str_display\"}}]"
@@ -239475,7 +258056,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2344,
+ "id": 2342,
"inner": {
"impl": {
"blanket_impl": null,
@@ -239491,7 +258072,7 @@
"constraints": []
}
},
- "id": 2153,
+ "id": 2151,
"path": "Display"
}
},
@@ -239503,12 +258084,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2343
+ 2341
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -239517,23 +258098,23 @@
"name": null,
"span": {
"begin": [
- 1632,
+ 1637,
1
],
"end": [
- 1636,
+ 1641,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2345": {
+ "2343": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2345,
+ "id": 2343,
"inner": {
"function": {
"generics": {
@@ -239579,7 +258160,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -239591,7 +258172,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -239602,18 +258183,18 @@
"name": "fmt",
"span": {
"begin": [
- 1640,
+ 1645,
5
],
"end": [
- 1642,
+ 1647,
6
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2346": {
+ "2344": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"os_str_display\"}}]"
@@ -239622,7 +258203,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2346,
+ "id": 2344,
"inner": {
"impl": {
"blanket_impl": null,
@@ -239638,7 +258219,7 @@
"constraints": []
}
},
- "id": 2153,
+ "id": 2151,
"path": "Display"
}
},
@@ -239650,7 +258231,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2345
+ 2343
],
"provided_trait_methods": [],
"trait": {
@@ -239664,18 +258245,18 @@
"name": null,
"span": {
"begin": [
- 1639,
+ 1644,
1
],
"end": [
- 1643,
+ 1648,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "default"
},
- "2347": {
+ "2345": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 87, patch: 0})}, feature: \"os_str_display\"}}]"
@@ -239684,21 +258265,21 @@
"crate_id": 0,
"deprecation": null,
"docs": "The [`OsStr`] and [`OsString`] types and associated utilities.",
- "id": 2347,
+ "id": 2345,
"inner": {
"module": {
"is_crate": false,
"is_stripped": false,
"items": [
- 1709,
- 1720,
- 2153
+ 1708,
+ 1719,
+ 2151
]
}
},
"links": {
- "`OsStr`": 1720,
- "`OsString`": 1709
+ "`OsStr`": 1719,
+ "`OsString`": 1708
},
"name": "os_str",
"span": {
@@ -239707,14 +258288,14 @@
1
],
"end": [
- 1829,
+ 1835,
2
],
"filename": "std/src/ffi/os_str.rs"
},
"visibility": "public"
},
- "2348": {
+ "2346": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 30, patch: 0})}, feature: \"core_c_void\"}}]"
@@ -239723,10 +258304,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2348,
+ "id": 2346,
"inner": {
"use": {
- "id": 2349,
+ "id": 2347,
"is_glob": false,
"name": "c_void",
"source": "core::ffi::c_void"
@@ -239747,101 +258328,76 @@
},
"visibility": "public"
},
- "235": {
+ "2348": {
"attrs": [
{
- "other": "#[rustc_doc_primitive = \"f16\"]"
- },
- {
- "other": "#[doc(alias = \"half\")]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f16\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"the `c_variadic` feature has not been properly tested on all supported platforms\"),\nissue: 44930, is_soft: false}, feature: \"c_variadic\"}}]"
}
],
"crate_id": 0,
"deprecation": null,
- "docs": "A 16-bit floating-point type (specifically, the \"binary16\" type defined in IEEE 754-2008).\n\nThis type is very similar to [`prim@f32`] but has decreased precision because it uses half as many\nbits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on half-precision\nvalues][wikipedia] for more information.\n\nNote that most common platforms will not support `f16` in hardware without enabling extra target\nfeatures, with the notable exception of Apple Silicon (also known as M1, M2, etc.) processors.\nHardware support on x86/x86-64 requires the avx512fp16 or avx10.1 features, while RISC-V requires\nZfh, and Arm/AArch64 requires FEAT_FP16. Usually the fallback implementation will be to use `f32`\nhardware if it exists, and convert between `f16` and `f32` when performing math.\n\n*[See also the `std::f16::consts` module](crate::f16::consts).*\n\n[wikipedia]: https://en.wikipedia.org/wiki/Half-precision_floating-point_format",
- "id": 235,
+ "docs": null,
+ "id": 2348,
"inner": {
- "primitive": {
- "impls": [
- 9611,
- 9664,
- 9677,
- 9678,
- 9679,
- 9680,
- 9681,
- 9682,
- 9683,
- 9684,
- 9685,
- 9686,
- 9687,
- 9688,
- 9689,
- 9690,
- 9691,
- 9692,
- 9693
- ],
- "name": "f16"
+ "use": {
+ "id": 2349,
+ "is_glob": false,
+ "name": "VaArgSafe",
+ "source": "core::ffi::VaArgSafe"
}
},
- "links": {
- "`prim@f32`": 267,
- "crate::f16::consts": 234,
- "prim@f32": 267
- },
- "name": "f16",
+ "links": {},
+ "name": null,
"span": {
"begin": [
- 1170,
- 1
+ 175,
+ 21
],
"end": [
- 1170,
- 16
+ 175,
+ 30
],
- "filename": "std/src/../../core/src/primitive_docs.rs"
+ "filename": "std/src/ffi/mod.rs"
},
"visibility": "public"
},
- "2350": {
+ "235": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"the `c_variadic` feature has not been properly tested on all supported platforms\"),\nissue: 44930, is_soft: false}, feature: \"c_variadic\"}}]"
+ "other": "#[allow(deprecated, deprecated_in_future)]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
}
],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2350,
+ "id": 235,
"inner": {
"use": {
- "id": 2351,
+ "id": 236,
"is_glob": false,
- "name": "VaArgSafe",
- "source": "core::ffi::VaArgSafe"
+ "name": "DIGITS",
+ "source": "core::f32::DIGITS"
}
},
"links": {},
"name": null,
"span": {
"begin": [
- 175,
- 21
+ 18,
+ 5
],
"end": [
- 175,
- 30
+ 18,
+ 11
],
- "filename": "std/src/ffi/mod.rs"
+ "filename": "std/src/num/f32.rs"
},
"visibility": "public"
},
- "2352": {
+ "2350": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"the `c_variadic` feature has not been properly tested on all supported platforms\"),\nissue: 44930, is_soft: false}, feature: \"c_variadic\"}}]"
@@ -239850,10 +258406,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2352,
+ "id": 2350,
"inner": {
"use": {
- "id": 2353,
+ "id": 2351,
"is_glob": false,
"name": "VaList",
"source": "core::ffi::VaList"
@@ -239874,7 +258430,7 @@
},
"visibility": "public"
},
- "2354": {
+ "2352": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: Some(\"the `c_variadic` feature has not been properly tested on all supported platforms\"),\nissue: 44930, is_soft: false}, feature: \"c_variadic\"}}]"
@@ -239883,10 +258439,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2354,
+ "id": 2352,
"inner": {
"use": {
- "id": 2355,
+ "id": 2353,
"is_glob": false,
"name": "VaListImpl",
"source": "core::ffi::VaListImpl"
@@ -239907,7 +258463,7 @@
},
"visibility": "public"
},
- "2356": {
+ "2354": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 64, patch: 0})}, feature: \"core_ffi_c\"}}]"
@@ -239916,10 +258472,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2356,
+ "id": 2354,
"inner": {
"use": {
- "id": 2357,
+ "id": 2355,
"is_glob": false,
"name": "c_char",
"source": "core::ffi::c_char"
@@ -239940,7 +258496,7 @@
},
"visibility": "public"
},
- "2358": {
+ "2356": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 64, patch: 0})}, feature: \"core_ffi_c\"}}]"
@@ -239949,10 +258505,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2358,
+ "id": 2356,
"inner": {
"use": {
- "id": 2359,
+ "id": 2357,
"is_glob": false,
"name": "c_double",
"source": "core::ffi::c_double"
@@ -239973,45 +258529,36 @@
},
"visibility": "public"
},
- "236": {
+ "2358": {
"attrs": [
{
- "other": "#[doc(test(attr(feature(cfg_target_has_reliable_f16_f128),\nexpect(internal_features))))]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 116909, is_soft: false}, feature: \"f16\"}}]"
- },
- {
- "other": "#[attr = Path(\"num/f16.rs\")]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 64, patch: 0})}, feature: \"core_ffi_c\"}}]"
}
],
"crate_id": 0,
"deprecation": null,
- "docs": "Constants for the `f16` half-precision floating point type.\n\n*[See also the `f16` primitive type](primitive@f16).*\n\nMathematically significant numbers are provided in the `consts` sub-module.",
- "id": 236,
+ "docs": null,
+ "id": 2358,
"inner": {
- "module": {
- "is_crate": false,
- "is_stripped": false,
- "items": [
- 233
- ]
+ "use": {
+ "id": 2359,
+ "is_glob": false,
+ "name": "c_float",
+ "source": "core::ffi::c_float"
}
},
- "links": {
- "primitive@f16": 235
- },
- "name": "f16",
+ "links": {},
+ "name": null,
"span": {
"begin": [
- 1,
- 1
+ 178,
+ 23
],
"end": [
- 1042,
- 2
+ 178,
+ 30
],
- "filename": "std/src/num/f16.rs"
+ "filename": "std/src/ffi/mod.rs"
},
"visibility": "public"
},
@@ -240029,8 +258576,8 @@
"use": {
"id": 2361,
"is_glob": false,
- "name": "c_float",
- "source": "core::ffi::c_float"
+ "name": "c_int",
+ "source": "core::ffi::c_int"
}
},
"links": {},
@@ -240038,11 +258585,11 @@
"span": {
"begin": [
178,
- 23
+ 32
],
"end": [
178,
- 30
+ 37
],
"filename": "std/src/ffi/mod.rs"
},
@@ -240062,8 +258609,8 @@
"use": {
"id": 2363,
"is_glob": false,
- "name": "c_int",
- "source": "core::ffi::c_int"
+ "name": "c_long",
+ "source": "core::ffi::c_long"
}
},
"links": {},
@@ -240071,11 +258618,11 @@
"span": {
"begin": [
178,
- 32
+ 39
],
"end": [
178,
- 37
+ 45
],
"filename": "std/src/ffi/mod.rs"
},
@@ -240095,8 +258642,8 @@
"use": {
"id": 2365,
"is_glob": false,
- "name": "c_long",
- "source": "core::ffi::c_long"
+ "name": "c_longlong",
+ "source": "core::ffi::c_longlong"
}
},
"links": {},
@@ -240104,11 +258651,11 @@
"span": {
"begin": [
178,
- 39
+ 47
],
"end": [
178,
- 45
+ 57
],
"filename": "std/src/ffi/mod.rs"
},
@@ -240128,8 +258675,8 @@
"use": {
"id": 2367,
"is_glob": false,
- "name": "c_longlong",
- "source": "core::ffi::c_longlong"
+ "name": "c_schar",
+ "source": "core::ffi::c_schar"
}
},
"links": {},
@@ -240137,11 +258684,11 @@
"span": {
"begin": [
178,
- 47
+ 59
],
"end": [
178,
- 57
+ 66
],
"filename": "std/src/ffi/mod.rs"
},
@@ -240161,8 +258708,8 @@
"use": {
"id": 2369,
"is_glob": false,
- "name": "c_schar",
- "source": "core::ffi::c_schar"
+ "name": "c_short",
+ "source": "core::ffi::c_short"
}
},
"links": {},
@@ -240170,11 +258717,11 @@
"span": {
"begin": [
178,
- 59
+ 68
],
"end": [
178,
- 66
+ 75
],
"filename": "std/src/ffi/mod.rs"
},
@@ -240197,8 +258744,8 @@
"use": {
"id": 238,
"is_glob": false,
- "name": "DIGITS",
- "source": "core::f32::DIGITS"
+ "name": "EPSILON",
+ "source": "core::f32::EPSILON"
}
},
"links": {},
@@ -240206,11 +258753,11 @@
"span": {
"begin": [
18,
- 5
+ 13
],
"end": [
18,
- 11
+ 20
],
"filename": "std/src/num/f32.rs"
},
@@ -240230,39 +258777,6 @@
"use": {
"id": 2371,
"is_glob": false,
- "name": "c_short",
- "source": "core::ffi::c_short"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 178,
- 68
- ],
- "end": [
- 178,
- 75
- ],
- "filename": "std/src/ffi/mod.rs"
- },
- "visibility": "public"
- },
- "2372": {
- "attrs": [
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 64, patch: 0})}, feature: \"core_ffi_c\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 2372,
- "inner": {
- "use": {
- "id": 2373,
- "is_glob": false,
"name": "c_uchar",
"source": "core::ffi::c_uchar"
}
@@ -240282,7 +258796,7 @@
},
"visibility": "public"
},
- "2374": {
+ "2372": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 64, patch: 0})}, feature: \"core_ffi_c\"}}]"
@@ -240291,10 +258805,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2374,
+ "id": 2372,
"inner": {
"use": {
- "id": 2375,
+ "id": 2373,
"is_glob": false,
"name": "c_uint",
"source": "core::ffi::c_uint"
@@ -240315,7 +258829,7 @@
},
"visibility": "public"
},
- "2376": {
+ "2374": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 64, patch: 0})}, feature: \"core_ffi_c\"}}]"
@@ -240324,10 +258838,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2376,
+ "id": 2374,
"inner": {
"use": {
- "id": 2377,
+ "id": 2375,
"is_glob": false,
"name": "c_ulong",
"source": "core::ffi::c_ulong"
@@ -240348,7 +258862,7 @@
},
"visibility": "public"
},
- "2378": {
+ "2376": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 64, patch: 0})}, feature: \"core_ffi_c\"}}]"
@@ -240357,10 +258871,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2378,
+ "id": 2376,
"inner": {
"use": {
- "id": 2379,
+ "id": 2377,
"is_glob": false,
"name": "c_ulonglong",
"source": "core::ffi::c_ulonglong"
@@ -240381,7 +258895,7 @@
},
"visibility": "public"
},
- "2380": {
+ "2378": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 64, patch: 0})}, feature: \"core_ffi_c\"}}]"
@@ -240390,10 +258904,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2380,
+ "id": 2378,
"inner": {
"use": {
- "id": 2381,
+ "id": 2379,
"is_glob": false,
"name": "c_ushort",
"source": "core::ffi::c_ushort"
@@ -240414,7 +258928,7 @@
},
"visibility": "public"
},
- "2382": {
+ "2380": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88345, is_soft: false}, feature: \"c_size_t\"}}]"
@@ -240423,10 +258937,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2382,
+ "id": 2380,
"inner": {
"use": {
- "id": 2383,
+ "id": 2381,
"is_glob": false,
"name": "c_ptrdiff_t",
"source": "core::ffi::c_ptrdiff_t"
@@ -240447,7 +258961,7 @@
},
"visibility": "public"
},
- "2384": {
+ "2382": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88345, is_soft: false}, feature: \"c_size_t\"}}]"
@@ -240456,10 +258970,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2384,
+ "id": 2382,
"inner": {
"use": {
- "id": 2385,
+ "id": 2383,
"is_glob": false,
"name": "c_size_t",
"source": "core::ffi::c_size_t"
@@ -240480,7 +258994,7 @@
},
"visibility": "public"
},
- "2386": {
+ "2384": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 88345, is_soft: false}, feature: \"c_size_t\"}}]"
@@ -240489,10 +259003,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2386,
+ "id": 2384,
"inner": {
"use": {
- "id": 2387,
+ "id": 2385,
"is_glob": false,
"name": "c_ssize_t",
"source": "core::ffi::c_ssize_t"
@@ -240513,7 +259027,7 @@
},
"visibility": "public"
},
- "2388": {
+ "2386": {
"attrs": [
{
"other": "#[doc(inline)]"
@@ -240525,10 +259039,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2388,
+ "id": 2386,
"inner": {
"use": {
- "id": 1923,
+ "id": 1921,
"is_glob": false,
"name": "FromBytesUntilNulError",
"source": "self::c_str::FromBytesUntilNulError"
@@ -240549,7 +259063,7 @@
},
"visibility": "public"
},
- "2389": {
+ "2387": {
"attrs": [
{
"other": "#[doc(inline)]"
@@ -240561,10 +259075,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2389,
+ "id": 2387,
"inner": {
"use": {
- "id": 1925,
+ "id": 1923,
"is_glob": false,
"name": "FromBytesWithNulError",
"source": "self::c_str::FromBytesWithNulError"
@@ -240585,115 +259099,115 @@
},
"visibility": "public"
},
- "239": {
+ "2388": {
"attrs": [
{
- "other": "#[allow(deprecated, deprecated_in_future)]"
+ "other": "#[doc(inline)]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"cstring_from_vec_with_nul\"}}]"
}
],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 239,
+ "id": 2388,
"inner": {
"use": {
- "id": 240,
+ "id": 1911,
"is_glob": false,
- "name": "EPSILON",
- "source": "core::f32::EPSILON"
+ "name": "FromVecWithNulError",
+ "source": "self::c_str::FromVecWithNulError"
}
},
"links": {},
"name": null,
"span": {
"begin": [
- 18,
- 13
+ 192,
+ 1
],
"end": [
- 18,
- 20
+ 192,
+ 42
],
- "filename": "std/src/num/f32.rs"
+ "filename": "std/src/ffi/mod.rs"
},
"visibility": "public"
},
- "2390": {
+ "2389": {
"attrs": [
{
"other": "#[doc(inline)]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 58, patch: 0})}, feature: \"cstring_from_vec_with_nul\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"cstring_into\"}}]"
}
],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2390,
+ "id": 2389,
"inner": {
"use": {
"id": 1913,
"is_glob": false,
- "name": "FromVecWithNulError",
- "source": "self::c_str::FromVecWithNulError"
+ "name": "IntoStringError",
+ "source": "self::c_str::IntoStringError"
}
},
"links": {},
"name": null,
"span": {
"begin": [
- 192,
+ 195,
1
],
"end": [
- 192,
- 42
+ 195,
+ 38
],
"filename": "std/src/ffi/mod.rs"
},
"visibility": "public"
},
- "2391": {
+ "239": {
"attrs": [
{
- "other": "#[doc(inline)]"
+ "other": "#[allow(deprecated, deprecated_in_future)]"
},
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 7, patch: 0})}, feature: \"cstring_into\"}}]"
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
}
],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2391,
+ "id": 239,
"inner": {
"use": {
- "id": 1915,
+ "id": 240,
"is_glob": false,
- "name": "IntoStringError",
- "source": "self::c_str::IntoStringError"
+ "name": "INFINITY",
+ "source": "core::f32::INFINITY"
}
},
"links": {},
"name": null,
"span": {
"begin": [
- 195,
- 1
+ 18,
+ 22
],
"end": [
- 195,
- 38
+ 18,
+ 30
],
- "filename": "std/src/ffi/mod.rs"
+ "filename": "std/src/num/f32.rs"
},
"visibility": "public"
},
- "2392": {
+ "2390": {
"attrs": [
{
"other": "#[doc(inline)]"
@@ -240705,10 +259219,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2392,
+ "id": 2390,
"inner": {
"use": {
- "id": 1919,
+ "id": 1917,
"is_glob": false,
"name": "NulError",
"source": "self::c_str::NulError"
@@ -240729,7 +259243,7 @@
},
"visibility": "public"
},
- "2393": {
+ "2391": {
"attrs": [
{
"other": "#[doc(inline)]"
@@ -240741,10 +259255,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2393,
+ "id": 2391,
"inner": {
"use": {
- "id": 1921,
+ "id": 1919,
"is_glob": false,
"name": "CStr",
"source": "self::c_str::CStr"
@@ -240765,7 +259279,7 @@
},
"visibility": "public"
},
- "2394": {
+ "2392": {
"attrs": [
{
"other": "#[doc(inline)]"
@@ -240777,10 +259291,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2394,
+ "id": 2392,
"inner": {
"use": {
- "id": 1917,
+ "id": 1915,
"is_glob": false,
"name": "CString",
"source": "self::c_str::CString"
@@ -240801,7 +259315,7 @@
},
"visibility": "public"
},
- "2395": {
+ "2393": {
"attrs": [
{
"other": "#[doc(inline)]"
@@ -240813,10 +259327,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2395,
+ "id": 2393,
"inner": {
"use": {
- "id": 1720,
+ "id": 1719,
"is_glob": false,
"name": "OsStr",
"source": "self::os_str::OsStr"
@@ -240837,7 +259351,7 @@
},
"visibility": "public"
},
- "2396": {
+ "2394": {
"attrs": [
{
"other": "#[doc(inline)]"
@@ -240849,10 +259363,10 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2396,
+ "id": 2394,
"inner": {
"use": {
- "id": 1709,
+ "id": 1708,
"is_glob": false,
"name": "OsString",
"source": "self::os_str::OsString"
@@ -240873,7 +259387,7 @@
},
"visibility": "public"
},
- "2397": {
+ "2395": {
"attrs": [
{
"other": "#[rustc_doc_primitive = \"char\"]"
@@ -240888,11 +259402,11 @@
"crate_id": 0,
"deprecation": null,
"docs": "A character type.\n\nThe `char` type represents a single character. More specifically, since\n'character' isn't a well-defined concept in Unicode, `char` is a '[Unicode\nscalar value]'.\n\nThis documentation describes a number of methods and trait implementations on the\n`char` type. For technical reasons, there is additional, separate\ndocumentation in [the `std::char` module](char/index.html) as well.\n\n# Validity and Layout\n\nA `char` is a '[Unicode scalar value]', which is any '[Unicode code point]'\nother than a [surrogate code point]. This has a fixed numerical definition:\ncode points are in the range 0 to 0x10FFFF, inclusive.\nSurrogate code points, used by UTF-16, are in the range 0xD800 to 0xDFFF.\n\nNo `char` may be constructed, whether as a literal or at runtime, that is not a\nUnicode scalar value. Violating this rule causes undefined behavior.\n\n```compile_fail\n// Each of these is a compiler error\n['\\u{D800}', '\\u{DFFF}', '\\u{110000}'];\n```\n\n```should_panic\n// Panics; from_u32 returns None.\nchar::from_u32(0xDE01).unwrap();\n```\n\n```no_run\n// Undefined behavior\nlet _ = unsafe { char::from_u32_unchecked(0x110000) };\n```\n\nUnicode scalar values are also the exact set of values that may be encoded in UTF-8. Because\n`char` values are Unicode scalar values and functions may assume [incoming `str` values are\nvalid UTF-8](primitive.str.html#invariant), it is safe to store any `char` in a `str` or read\nany character from a `str` as a `char`.\n\nThe gap in valid `char` values is understood by the compiler, so in the\nbelow example the two ranges are understood to cover the whole range of\npossible `char` values and there is no error for a [non-exhaustive match].\n\n```\nlet c: char = 'a';\nmatch c {\n '\\0' ..= '\\u{D7FF}' => false,\n '\\u{E000}' ..= '\\u{10FFFF}' => true,\n};\n```\n\nAll Unicode scalar values are valid `char` values, but not all of them represent a real\ncharacter. Many Unicode scalar values are not currently assigned to a character, but may be in\nthe future (\"reserved\"); some will never be a character (\"noncharacters\"); and some may be given\ndifferent meanings by different users (\"private use\").\n\n`char` is guaranteed to have the same size, alignment, and function call ABI as `u32` on all\nplatforms.\n```\nuse std::alloc::Layout;\nassert_eq!(Layout::new::(), Layout::new::());\n```\n\n[Unicode code point]: https://www.unicode.org/glossary/#code_point\n[Unicode scalar value]: https://www.unicode.org/glossary/#unicode_scalar_value\n[non-exhaustive match]: ../book/ch06-02-match.html#matches-are-exhaustive\n[surrogate code point]: https://www.unicode.org/glossary/#surrogate_code_point\n\n# Representation\n\n`char` is always four bytes in size. This is a different representation than\na given character would have as part of a [`String`]. For example:\n\n```\nlet v = vec!['h', 'e', 'l', 'l', 'o'];\n\n// five elements times four bytes for each element\nassert_eq!(20, v.len() * size_of::());\n\nlet s = String::from(\"hello\");\n\n// five elements times one byte per element\nassert_eq!(5, s.len() * size_of::());\n```\n\n[`String`]: ../std/string/struct.String.html\n\nAs always, remember that a human intuition for 'character' might not map to\nUnicode's definitions. For example, despite looking similar, the 'é'\ncharacter is one Unicode code point while 'é' is two Unicode code points:\n\n```\nlet mut chars = \"é\".chars();\n// U+00e9: 'latin small letter e with acute'\nassert_eq!(Some('\\u{00e9}'), chars.next());\nassert_eq!(None, chars.next());\n\nlet mut chars = \"é\".chars();\n// U+0065: 'latin small letter e'\nassert_eq!(Some('\\u{0065}'), chars.next());\n// U+0301: 'combining acute accent'\nassert_eq!(Some('\\u{0301}'), chars.next());\nassert_eq!(None, chars.next());\n```\n\nThis means that the contents of the first string above _will_ fit into a\n`char` while the contents of the second string _will not_. Trying to create\na `char` literal with the contents of the second string gives an error:\n\n```text\nerror: character literal may only contain one codepoint: 'é'\nlet c = 'é';\n ^^^\n```\n\nAnother implication of the 4-byte fixed size of a `char` is that\nper-`char` processing can end up using a lot more memory:\n\n```\nlet s = String::from(\"love: ❤️\");\nlet v: Vec = s.chars().collect();\n\nassert_eq!(12, size_of_val(&s[..]));\nassert_eq!(32, size_of_val(&v[..]));\n```",
- "id": 2397,
+ "id": 2395,
"inner": {
"primitive": {
"impls": [
- 9434,
+ 9655,
639
],
"name": "char"
@@ -240913,7 +259427,7 @@
},
"visibility": "public"
},
- "2398": {
+ "2396": {
"attrs": [
{
"other": "#[rustc_doc_primitive = \"u8\"]"
@@ -240925,15 +259439,15 @@
"crate_id": 0,
"deprecation": null,
"docs": "The 8-bit unsigned integer type.",
- "id": 2398,
+ "id": 2396,
"inner": {
"primitive": {
"impls": [
- 10877,
- 10881,
- 10883,
+ 11124,
+ 11128,
+ 11130,
631,
- 7156
+ 7194
],
"name": "u8"
}
@@ -240953,7 +259467,7 @@
},
"visibility": "public"
},
- "2399": {
+ "2397": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -240962,7 +259476,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Creates an [`OsStr`] from a byte slice.\n\nSee the module documentation for an example.",
- "id": 2399,
+ "id": 2397,
"inner": {
"function": {
"generics": {
@@ -241007,7 +259521,7 @@
}
},
"links": {
- "`OsStr`": 1720
+ "`OsStr`": 1719
},
"name": "from_bytes",
"span": {
@@ -241023,43 +259537,7 @@
},
"visibility": "default"
},
- "24": {
- "attrs": [
- {
- "other": "#[doc(no_inline)]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 80, patch: 0})}, feature: \"size_of_prelude\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 24,
- "inner": {
- "use": {
- "id": 25,
- "is_glob": false,
- "name": "align_of",
- "source": "crate::mem::align_of"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 27,
- 22
- ],
- "end": [
- 27,
- 30
- ],
- "filename": "std/src/prelude/v1.rs"
- },
- "visibility": "public"
- },
- "2400": {
+ "2398": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -241068,7 +259546,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Gets the underlying byte view of the [`OsStr`] slice.\n\nSee the module documentation for an example.",
- "id": 2400,
+ "id": 2398,
"inner": {
"function": {
"generics": {
@@ -241113,7 +259591,7 @@
}
},
"links": {
- "`OsStr`": 1720
+ "`OsStr`": 1719
},
"name": "as_bytes",
"span": {
@@ -241129,7 +259607,7 @@
},
"visibility": "default"
},
- "2401": {
+ "2399": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -241138,7 +259616,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Creates an [`OsString`] from a byte vector.\n\nSee the module documentation for an example.",
- "id": 2401,
+ "id": 2399,
"inner": {
"function": {
"generics": {
@@ -241170,7 +259648,7 @@
"constraints": []
}
},
- "id": 165,
+ "id": 163,
"path": "Vec"
}
}
@@ -241184,7 +259662,7 @@
}
},
"links": {
- "`OsString`": 1709
+ "`OsString`": 1708
},
"name": "from_vec",
"span": {
@@ -241200,7 +259678,43 @@
},
"visibility": "default"
},
- "2402": {
+ "24": {
+ "attrs": [
+ {
+ "other": "#[doc(no_inline)]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 80, patch: 0})}, feature: \"size_of_prelude\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 24,
+ "inner": {
+ "use": {
+ "id": 25,
+ "is_glob": false,
+ "name": "align_of",
+ "source": "crate::mem::align_of"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 27,
+ 22
+ ],
+ "end": [
+ 27,
+ 30
+ ],
+ "filename": "std/src/prelude/v1.rs"
+ },
+ "visibility": "public"
+ },
+ "2400": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -241209,7 +259723,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Yields the underlying byte vector of this [`OsString`].\n\nSee the module documentation for an example.",
- "id": 2402,
+ "id": 2400,
"inner": {
"function": {
"generics": {
@@ -241247,7 +259761,7 @@
"constraints": []
}
},
- "id": 165,
+ "id": 163,
"path": "Vec"
}
}
@@ -241255,7 +259769,7 @@
}
},
"links": {
- "`OsString`": 1709
+ "`OsString`": 1708
},
"name": "into_vec",
"span": {
@@ -241271,7 +259785,7 @@
},
"visibility": "default"
},
- "2403": {
+ "2401": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -241280,7 +259794,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Re-encodes an `OsStr` as a wide character sequence, i.e., potentially\nill-formed UTF-16.\n\nThis is lossless: calling [`OsStringExt::from_wide`] and then\n`encode_wide` on the result will yield the original code units.\nNote that the encoding does not add a final null terminator.\n\n# Examples\n\n```\nuse std::ffi::OsString;\nuse std::os::windows::prelude::*;\n\n// UTF-16 encoding for \"Unicode\".\nlet source = [0x0055, 0x006E, 0x0069, 0x0063, 0x006F, 0x0064, 0x0065];\n\nlet string = OsString::from_wide(&source[..]);\n\nlet result: Vec = string.encode_wide().collect();\nassert_eq!(&source[..], &result[..]);\n```",
- "id": 2403,
+ "id": 2401,
"inner": {
"function": {
"generics": {
@@ -241322,7 +259836,7 @@
"constraints": []
}
},
- "id": 2253,
+ "id": 2251,
"path": "EncodeWide"
}
}
@@ -241330,23 +259844,23 @@
}
},
"links": {
- "`OsStringExt::from_wide`": 2405
+ "`OsStringExt::from_wide`": 2403
},
"name": "encode_wide",
"span": {
"begin": [
- 126,
+ 127,
5
],
"end": [
- 126,
+ 127,
45
],
"filename": "std/src/os/windows/ffi.rs"
},
"visibility": "default"
},
- "2404": {
+ "2402": {
"attrs": [
{
"other": "#[rustc_doc_primitive = \"u16\"]"
@@ -241358,13 +259872,13 @@
"crate_id": 0,
"deprecation": null,
"docs": "The 16-bit unsigned integer type.",
- "id": 2404,
+ "id": 2402,
"inner": {
"primitive": {
"impls": [
- 11011,
- 11015,
- 11017
+ 11264,
+ 11268,
+ 11270
],
"name": "u16"
}
@@ -241384,7 +259898,7 @@
},
"visibility": "public"
},
- "2405": {
+ "2403": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -241393,7 +259907,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Creates an `OsString` from a potentially ill-formed UTF-16 slice of\n16-bit code units.\n\nThis is lossless: calling [`OsStrExt::encode_wide`] on the resulting string\nwill always return the original code units.\n\n# Examples\n\n```\nuse std::ffi::OsString;\nuse std::os::windows::prelude::*;\n\n// UTF-16 encoding for \"Unicode\".\nlet source = [0x0055, 0x006E, 0x0069, 0x0063, 0x006F, 0x0064, 0x0065];\n\nlet string = OsString::from_wide(&source[..]);\n```",
- "id": 2405,
+ "id": 2403,
"inner": {
"function": {
"generics": {
@@ -241432,23 +259946,23 @@
}
},
"links": {
- "`OsStrExt::encode_wide`": 2403
+ "`OsStrExt::encode_wide`": 2401
},
"name": "from_wide",
"span": {
"begin": [
- 88,
+ 89,
5
],
"end": [
- 88,
+ 89,
40
],
"filename": "std/src/os/windows/ffi.rs"
},
"visibility": "default"
},
- "2407": {
+ "2405": {
"attrs": [
{
"other": "#[(not(test), rustc_diagnostic_item = \"IoSeek\")]"
@@ -241463,7 +259977,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "The `Seek` trait provides a cursor which can be moved within a stream of\nbytes.\n\nThe stream typically has a fixed size, allowing seeking relative to either\nend or the current offset.\n\n# Examples\n\n[`File`]s implement `Seek`:\n\n[`File`]: crate::fs::File\n\n```no_run\nuse std::io;\nuse std::io::prelude::*;\nuse std::fs::File;\nuse std::io::SeekFrom;\n\nfn main() -> io::Result<()> {\n let mut f = File::open(\"foo.txt\")?;\n\n // move the cursor 42 bytes from the start of the file\n f.seek(SeekFrom::Start(42))?;\n Ok(())\n}\n```",
- "id": 2407,
+ "id": 2405,
"inner": {
"trait": {
"bounds": [],
@@ -241472,31 +259986,31 @@
"where_predicates": []
},
"implementations": [
- 2493,
- 2507,
- 4233,
- 3093,
- 3133,
+ 2491,
+ 2505,
+ 4232,
+ 3095,
+ 3135,
3273,
- 4239,
- 4245,
- 3867,
- 4250
+ 4238,
+ 4244,
+ 3866,
+ 4249
],
"is_auto": false,
"is_dyn_compatible": true,
"is_unsafe": false,
"items": [
- 2487,
- 4228,
- 2490,
+ 2485,
+ 4227,
+ 2488,
2768,
- 4229
+ 4228
]
}
},
"links": {
- "crate::fs::File": 2413
+ "crate::fs::File": 2411
},
"name": "Seek",
"span": {
@@ -241512,7 +260026,7 @@
},
"visibility": "public"
},
- "2408": {
+ "2406": {
"attrs": [
{
"other": "#[doc(alias = \"fsync\")]"
@@ -241524,7 +260038,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Attempts to sync all OS-internal file content and metadata to disk.\n\nThis function will attempt to ensure that all in-memory data reaches the\nfilesystem before returning.\n\nThis can be used to handle errors that would otherwise only be caught\nwhen the `File` is closed, as dropping a `File` will ignore all errors.\nNote, however, that `sync_all` is generally more expensive than closing\na file by dropping it, because the latter is not required to block until\nthe data has been written to the filesystem.\n\nIf synchronizing the metadata is not required, use [`sync_data`] instead.\n\n[`sync_data`]: File::sync_data\n\n# Examples\n\n```no_run\nuse std::fs::File;\nuse std::io::prelude::*;\n\nfn main() -> std::io::Result<()> {\n let mut f = File::create(\"foo.txt\")?;\n f.write_all(b\"Hello, world!\")?;\n\n f.sync_all()?;\n Ok(())\n}\n```",
- "id": 2408,
+ "id": 2406,
"inner": {
"function": {
"generics": {
@@ -241568,7 +260082,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -241576,23 +260090,23 @@
}
},
"links": {
- "File::sync_data": 2429
+ "File::sync_data": 2427
},
"name": "sync_all",
"span": {
"begin": [
- 662,
+ 743,
5
],
"end": [
- 664,
+ 745,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "public"
},
- "2409": {
+ "2407": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -241601,7 +260115,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "The `BufReader` struct adds buffering to any reader.\n\nIt can be excessively inefficient to work directly with a [`Read`] instance.\nFor example, every call to [`read`][`TcpStream::read`] on [`TcpStream`]\nresults in a system call. A `BufReader` performs large, infrequent reads on\nthe underlying [`Read`] and maintains an in-memory buffer of the results.\n\n`BufReader` can improve the speed of programs that make *small* and\n*repeated* read calls to the same file or network socket. It does not\nhelp when reading very large amounts at once, or reading just one or a few\ntimes. It also provides no advantage when reading from a source that is\nalready in memory, like a [Vec]\\.\n\nWhen the `BufReader` is dropped, the contents of its buffer will be\ndiscarded. Creating multiple instances of a `BufReader` on the same\nstream can cause data loss. Reading from the underlying reader after\nunwrapping the `BufReader` with [`BufReader::into_inner`] can also cause\ndata loss.\n\n[`TcpStream::read`]: crate::net::TcpStream::read\n[`TcpStream`]: crate::net::TcpStream\n\n# Examples\n\n```no_run\nuse std::io::prelude::*;\nuse std::io::BufReader;\nuse std::fs::File;\n\nfn main() -> std::io::Result<()> {\n let f = File::open(\"log.txt\")?;\n let mut reader = BufReader::new(f);\n\n let mut line = String::new();\n let len = reader.read_line(&mut line)?;\n println!(\"First line is {len} bytes long\");\n Ok(())\n}\n```",
- "id": 2409,
+ "id": 2407,
"inner": {
"struct": {
"generics": {
@@ -241632,11 +260146,9 @@
"where_predicates": []
},
"impls": [
- 3051,
- 3054,
- 3060,
+ 3053,
+ 3056,
3062,
- 3063,
3064,
3065,
3066,
@@ -241649,10 +260161,12 @@
3073,
3074,
3075,
- 3084,
- 3087,
+ 3076,
+ 3077,
+ 3086,
3089,
- 3093
+ 3091,
+ 3095
],
"kind": {
"plain": {
@@ -241663,11 +260177,11 @@
}
},
"links": {
- "Vec": 165,
- "`BufReader::into_inner`": 3048,
- "`Read`": 2476,
- "crate::net::TcpStream": 3047,
- "crate::net::TcpStream::read": 3046
+ "Vec": 163,
+ "`BufReader::into_inner`": 3050,
+ "`Read`": 2474,
+ "crate::net::TcpStream": 3049,
+ "crate::net::TcpStream::read": 3048
},
"name": "BufReader",
"span": {
@@ -241683,43 +260197,7 @@
},
"visibility": "public"
},
- "241": {
- "attrs": [
- {
- "other": "#[allow(deprecated, deprecated_in_future)]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 241,
- "inner": {
- "use": {
- "id": 242,
- "is_glob": false,
- "name": "INFINITY",
- "source": "core::f32::INFINITY"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 18,
- 22
- ],
- "end": [
- 18,
- 30
- ],
- "filename": "std/src/num/f32.rs"
- },
- "visibility": "public"
- },
- "2410": {
+ "2408": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -241728,7 +260206,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Wraps a writer and buffers its output.\n\nIt can be excessively inefficient to work directly with something that\nimplements [`Write`]. For example, every call to\n[`write`][`TcpStream::write`] on [`TcpStream`] results in a system call. A\n`BufWriter` keeps an in-memory buffer of data and writes it to an underlying\nwriter in large, infrequent batches.\n\n`BufWriter` can improve the speed of programs that make *small* and\n*repeated* write calls to the same file or network socket. It does not\nhelp when writing very large amounts at once, or writing just one or a few\ntimes. It also provides no advantage when writing to a destination that is\nin memory, like a [Vec]\\.\n\nIt is critical to call [`flush`] before `BufWriter` is dropped. Though\ndropping will attempt to flush the contents of the buffer, any errors\nthat happen in the process of dropping will be ignored. Calling [`flush`]\nensures that the buffer is empty and thus dropping will not even attempt\nfile operations.\n\n# Examples\n\nLet's write the numbers one through ten to a [`TcpStream`]:\n\n```no_run\nuse std::io::prelude::*;\nuse std::net::TcpStream;\n\nlet mut stream = TcpStream::connect(\"127.0.0.1:34254\").unwrap();\n\nfor i in 0..10 {\n stream.write(&[i+1]).unwrap();\n}\n```\n\nBecause we're not buffering, we write each one in turn, incurring the\noverhead of a system call per byte written. We can fix this with a\n`BufWriter`:\n\n```no_run\nuse std::io::prelude::*;\nuse std::io::BufWriter;\nuse std::net::TcpStream;\n\nlet mut stream = BufWriter::new(TcpStream::connect(\"127.0.0.1:34254\").unwrap());\n\nfor i in 0..10 {\n stream.write(&[i+1]).unwrap();\n}\nstream.flush().unwrap();\n```\n\nBy wrapping the stream with a `BufWriter`, these ten writes are all grouped\ntogether by the buffer and will all be written out in one system call when\nthe `stream` is flushed.\n\n[`TcpStream::write`]: crate::net::TcpStream::write\n[`TcpStream`]: crate::net::TcpStream\n[`flush`]: BufWriter::flush",
- "id": 2410,
+ "id": 2408,
"inner": {
"struct": {
"generics": {
@@ -241754,7 +260232,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 2486,
+ "id": 2484,
"path": "Write"
}
}
@@ -241770,9 +260248,7 @@
"where_predicates": []
},
"impls": [
- 3106,
- 3111,
- 3112,
+ 3108,
3113,
3114,
3115,
@@ -241785,10 +260261,12 @@
3122,
3123,
3124,
- 3129,
+ 3125,
+ 3126,
3131,
3133,
- 3135
+ 3135,
+ 3137
],
"kind": {
"plain": {
@@ -241799,11 +260277,11 @@
}
},
"links": {
- "BufWriter::flush": 3099,
- "Vec": 165,
- "`Write`": 2486,
- "crate::net::TcpStream": 3047,
- "crate::net::TcpStream::write": 3098
+ "BufWriter::flush": 3101,
+ "Vec": 163,
+ "`Write`": 2484,
+ "crate::net::TcpStream": 3049,
+ "crate::net::TcpStream::write": 3100
},
"name": "BufWriter",
"span": {
@@ -241819,12 +260297,12 @@
},
"visibility": "public"
},
- "2411": {
+ "2409": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2411,
+ "id": 2409,
"inner": {
"function": {
"generics": {
@@ -241882,7 +260360,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -241893,23 +260371,59 @@
"name": "read",
"span": {
"begin": [
- 1375,
+ 1456,
5
],
"end": [
- 1377,
+ 1458,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2412": {
+ "241": {
+ "attrs": [
+ {
+ "other": "#[allow(deprecated, deprecated_in_future)]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 241,
+ "inner": {
+ "use": {
+ "id": 242,
+ "is_glob": false,
+ "name": "MANTISSA_DIGITS",
+ "source": "core::f32::MANTISSA_DIGITS"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 18,
+ 32
+ ],
+ "end": [
+ 18,
+ 47
+ ],
+ "filename": "std/src/num/f32.rs"
+ },
+ "visibility": "public"
+ },
+ "2410": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2412,
+ "id": 2410,
"inner": {
"function": {
"generics": {
@@ -241967,7 +260481,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -241978,18 +260492,18 @@
"name": "write",
"span": {
"begin": [
- 1397,
+ 1478,
5
],
"end": [
- 1399,
+ 1480,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2413": {
+ "2411": {
"attrs": [
{
"other": "#[(not(test), rustc_diagnostic_item = \"File\")]"
@@ -242004,7 +260518,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "An object providing access to an open file on the filesystem.\n\nAn instance of a `File` can be read and/or written depending on what options\nit was opened with. Files also implement [`Seek`] to alter the logical cursor\nthat the file contains internally.\n\nFiles are automatically closed when they go out of scope. Errors detected\non closing are ignored by the implementation of `Drop`. Use the method\n[`sync_all`] if these errors must be manually handled.\n\n`File` does not buffer reads and writes. For efficiency, consider wrapping the\nfile in a [`BufReader`] or [`BufWriter`] when performing many small [`read`]\nor [`write`] calls, unless unbuffered reads and writes are required.\n\n# Examples\n\nCreates a new file and write bytes to it (you can also use [`write`]):\n\n```no_run\nuse std::fs::File;\nuse std::io::prelude::*;\n\nfn main() -> std::io::Result<()> {\n let mut file = File::create(\"foo.txt\")?;\n file.write_all(b\"Hello, world!\")?;\n Ok(())\n}\n```\n\nReads the contents of a file into a [`String`] (you can also use [`read`]):\n\n```no_run\nuse std::fs::File;\nuse std::io::prelude::*;\n\nfn main() -> std::io::Result<()> {\n let mut file = File::open(\"foo.txt\")?;\n let mut contents = String::new();\n file.read_to_string(&mut contents)?;\n assert_eq!(contents, \"Hello, world!\");\n Ok(())\n}\n```\n\nUsing a buffered [`Read`]er:\n\n```no_run\nuse std::fs::File;\nuse std::io::BufReader;\nuse std::io::prelude::*;\n\nfn main() -> std::io::Result<()> {\n let file = File::open(\"foo.txt\")?;\n let mut buf_reader = BufReader::new(file);\n let mut contents = String::new();\n buf_reader.read_to_string(&mut contents)?;\n assert_eq!(contents, \"Hello, world!\");\n Ok(())\n}\n```\n\nNote that, although read and write methods require a `&mut File`, because\nof the interfaces for [`Read`] and [`Write`], the holder of a `&File` can\nstill modify the file, either through methods that take `&File` or by\nretrieving the underlying OS object and modifying the file that way.\nAdditionally, many operating systems allow concurrent modification of files\nby different processes. Avoid assuming that holding a `&File` means that the\nfile will not change.\n\n# Platform-specific behavior\n\nOn Windows, the implementation of [`Read`] and [`Write`] traits for `File`\nperform synchronous I/O operations. Therefore the underlying file must not\nhave been opened for asynchronous I/O (e.g. by using `FILE_FLAG_OVERLAPPED`).\n\n[`BufReader`]: io::BufReader\n[`BufWriter`]: io::BufWriter\n[`sync_all`]: File::sync_all\n[`write`]: File::write\n[`read`]: File::read",
- "id": 2413,
+ "id": 2411,
"inner": {
"struct": {
"generics": {
@@ -242012,6 +260526,8 @@
"where_predicates": []
},
"impls": [
+ 2447,
+ 2448,
2449,
2450,
2451,
@@ -242024,18 +260540,16 @@
2458,
2459,
2460,
- 2461,
2462,
- 2464,
- 2475,
- 2485,
- 2493,
- 2499,
- 2503,
+ 2473,
+ 2483,
+ 2491,
+ 2497,
+ 2501,
+ 2505,
2507,
- 2509,
- 2515,
- 2528,
+ 2514,
+ 2527,
2532,
2535,
2537,
@@ -242060,13 +260574,13 @@
}
},
"links": {
- "File::read": 2411,
- "File::sync_all": 2408,
- "File::write": 2412,
- "`Seek`": 2407,
- "`String`": 161,
- "io::BufReader": 2409,
- "io::BufWriter": 2410
+ "File::read": 2409,
+ "File::sync_all": 2406,
+ "File::write": 2410,
+ "`Seek`": 2405,
+ "`String`": 159,
+ "io::BufReader": 2407,
+ "io::BufWriter": 2408
},
"name": "File",
"span": {
@@ -242082,7 +260596,7 @@
},
"visibility": "public"
},
- "2414": {
+ "2412": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -242090,8 +260604,8 @@
],
"crate_id": 0,
"deprecation": null,
- "docs": "Opens a file at `path` with the options specified by `self`.\n\n# Errors\n\nThis function will return an error under a number of different\ncircumstances. Some of these error conditions are listed here, together\nwith their [`io::ErrorKind`]. The mapping to [`io::ErrorKind`]s is not\npart of the compatibility contract of the function.\n\n* [`NotFound`]: The specified file does not exist and neither `create`\n or `create_new` is set.\n* [`NotFound`]: One of the directory components of the file path does\n not exist.\n* [`PermissionDenied`]: The user lacks permission to get the specified\n access rights for the file.\n* [`PermissionDenied`]: The user lacks permission to open one of the\n directory components of the specified path.\n* [`AlreadyExists`]: `create_new` was specified and the file already\n exists.\n* [`InvalidInput`]: Invalid combinations of open options (truncate\n without write access, no access mode set, etc.).\n\nThe following errors don't match any existing [`io::ErrorKind`] at the moment:\n* One of the directory components of the specified file path\n was not, in fact, a directory.\n* Filesystem-level errors: full disk, write permission\n requested on a read-only file system, exceeded disk quota, too many\n open files, too long filename, too many symbolic links in the\n specified path (Unix-like systems only), etc.\n\n# Examples\n\n```no_run\nuse std::fs::OpenOptions;\n\nlet file = OpenOptions::new().read(true).open(\"foo.txt\");\n```\n\n[`AlreadyExists`]: io::ErrorKind::AlreadyExists\n[`InvalidInput`]: io::ErrorKind::InvalidInput\n[`NotFound`]: io::ErrorKind::NotFound\n[`PermissionDenied`]: io::ErrorKind::PermissionDenied",
- "id": 2414,
+ "docs": "Opens a file at `path` with the options specified by `self`.\n\n# Errors\n\nThis function will return an error under a number of different\ncircumstances. Some of these error conditions are listed here, together\nwith their [`io::ErrorKind`]. The mapping to [`io::ErrorKind`]s is not\npart of the compatibility contract of the function.\n\n* [`NotFound`]: The specified file does not exist and neither `create`\n or `create_new` is set.\n* [`NotFound`]: One of the directory components of the file path does\n not exist.\n* [`PermissionDenied`]: The user lacks permission to get the specified\n access rights for the file.\n* [`PermissionDenied`]: The user lacks permission to open one of the\n directory components of the specified path.\n* [`AlreadyExists`]: `create_new` was specified and the file already\n exists.\n* [`InvalidInput`]: Invalid combinations of open options (truncate\n without write access, create without write or append access,\n no access mode set, etc.).\n\nThe following errors don't match any existing [`io::ErrorKind`] at the moment:\n* One of the directory components of the specified file path\n was not, in fact, a directory.\n* Filesystem-level errors: full disk, write permission\n requested on a read-only file system, exceeded disk quota, too many\n open files, too long filename, too many symbolic links in the\n specified path (Unix-like systems only), etc.\n\n# Examples\n\n```no_run\nuse std::fs::OpenOptions;\n\nlet file = OpenOptions::new().read(true).open(\"foo.txt\");\n```\n\n[`AlreadyExists`]: io::ErrorKind::AlreadyExists\n[`InvalidInput`]: io::ErrorKind::InvalidInput\n[`NotFound`]: io::ErrorKind::NotFound\n[`PermissionDenied`]: io::ErrorKind::PermissionDenied",
+ "id": 2412,
"inner": {
"function": {
"generics": {
@@ -242112,7 +260626,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -242174,7 +260688,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
}
@@ -242183,7 +260697,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -242192,26 +260706,26 @@
},
"links": {
"`io::ErrorKind`": 2774,
- "io::ErrorKind::AlreadyExists": 2423,
- "io::ErrorKind::InvalidInput": 2438,
+ "io::ErrorKind::AlreadyExists": 2421,
+ "io::ErrorKind::InvalidInput": 2436,
"io::ErrorKind::NotFound": 2775,
"io::ErrorKind::PermissionDenied": 2776
},
"name": "open",
"span": {
"begin": [
- 1711,
+ 1797,
5
],
"end": [
- 1713,
+ 1799,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "public"
},
- "2415": {
+ "2413": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 26, patch: 0})}, feature: \"fs_read_write_bytes\"}}]"
@@ -242220,7 +260734,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Reads the entire contents of a file into a bytes vector.\n\nThis is a convenience function for using [`File::open`] and [`read_to_end`]\nwith fewer imports and without an intermediate variable.\n\n[`read_to_end`]: Read::read_to_end\n\n# Errors\n\nThis function will return an error if `path` does not already exist.\nOther errors may also be returned according to [`OpenOptions::open`].\n\nWhile reading from the file, this function handles [`io::ErrorKind::Interrupted`]\nwith automatic retries. See [io::Read] documentation for details.\n\n# Examples\n\n```no_run\nuse std::fs;\n\nfn main() -> Result<(), Box> {\n let data: Vec = fs::read(\"image.jpg\")?;\n assert_eq!(data[0..3], [0xFF, 0xD8, 0xFF]);\n Ok(())\n}\n```",
- "id": 2415,
+ "id": 2413,
"inner": {
"function": {
"generics": {
@@ -242241,7 +260755,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "crate::path::Path"
}
}
@@ -242302,7 +260816,7 @@
"constraints": []
}
},
- "id": 165,
+ "id": 163,
"path": "Vec"
}
}
@@ -242311,7 +260825,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -242320,10 +260834,10 @@
},
"links": {
"Read::read_to_end": 2957,
- "`File::open`": 2417,
- "`OpenOptions::open`": 2414,
+ "`File::open`": 2415,
+ "`OpenOptions::open`": 2412,
"`io::ErrorKind::Interrupted`": 2958,
- "io::Read": 2476
+ "io::Read": 2474
},
"name": "read",
"span": {
@@ -242339,7 +260853,7 @@
},
"visibility": "public"
},
- "2416": {
+ "2414": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 26, patch: 0})}, feature: \"fs_read_write\"}}]"
@@ -242348,7 +260862,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Reads the entire contents of a file into a string.\n\nThis is a convenience function for using [`File::open`] and [`read_to_string`]\nwith fewer imports and without an intermediate variable.\n\n[`read_to_string`]: Read::read_to_string\n\n# Errors\n\nThis function will return an error if `path` does not already exist.\nOther errors may also be returned according to [`OpenOptions::open`].\n\nIf the contents of the file are not valid UTF-8, then an error will also be\nreturned.\n\nWhile reading from the file, this function handles [`io::ErrorKind::Interrupted`]\nwith automatic retries. See [io::Read] documentation for details.\n\n# Examples\n\n```no_run\nuse std::fs;\nuse std::error::Error;\n\nfn main() -> Result<(), Box> {\n let message: String = fs::read_to_string(\"message.txt\")?;\n println!(\"{}\", message);\n Ok(())\n}\n```",
- "id": 2416,
+ "id": 2414,
"inner": {
"function": {
"generics": {
@@ -242369,7 +260883,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "crate::path::Path"
}
}
@@ -242419,7 +260933,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 161,
+ "id": 159,
"path": "String"
}
}
@@ -242428,7 +260942,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -242437,10 +260951,10 @@
},
"links": {
"Read::read_to_string": 2959,
- "`File::open`": 2417,
- "`OpenOptions::open`": 2414,
+ "`File::open`": 2415,
+ "`OpenOptions::open`": 2412,
"`io::ErrorKind::Interrupted`": 2958,
- "io::Read": 2476
+ "io::Read": 2474
},
"name": "read_to_string",
"span": {
@@ -242456,7 +260970,7 @@
},
"visibility": "public"
},
- "2417": {
+ "2415": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -242465,7 +260979,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Attempts to open a file in read-only mode.\n\nSee the [`OpenOptions::open`] method for more details.\n\nIf you only need to read the entire file contents,\nconsider [`std::fs::read()`][self::read] or\n[`std::fs::read_to_string()`][self::read_to_string] instead.\n\n# Errors\n\nThis function will return an error if `path` does not already exist.\nOther errors may also be returned according to [`OpenOptions::open`].\n\n# Examples\n\n```no_run\nuse std::fs::File;\nuse std::io::Read;\n\nfn main() -> std::io::Result<()> {\n let mut f = File::open(\"foo.txt\")?;\n let mut data = vec![];\n f.read_to_end(&mut data)?;\n Ok(())\n}\n```",
- "id": 2417,
+ "id": 2415,
"inner": {
"function": {
"generics": {
@@ -242486,7 +261000,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -242536,7 +261050,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
}
@@ -242545,7 +261059,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -242553,25 +261067,25 @@
}
},
"links": {
- "`OpenOptions::open`": 2414,
- "self::read": 2415,
- "self::read_to_string": 2416
+ "`OpenOptions::open`": 2412,
+ "self::read": 2413,
+ "self::read_to_string": 2414
},
"name": "open",
"span": {
"begin": [
- 452,
+ 533,
5
],
"end": [
- 454,
+ 535,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "public"
},
- "2418": {
+ "2416": {
"attrs": [
{
"other": "#[(not(test), rustc_diagnostic_item = \"IoBufRead\")]"
@@ -242586,7 +261100,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "A `BufRead` is a type of `Read`er which has an internal buffer, allowing it\nto perform extra ways of reading.\n\nFor example, reading line-by-line is inefficient without using a buffer, so\nif you want to read by line, you'll need `BufRead`, which includes a\n[`read_line`] method as well as a [`lines`] iterator.\n\n# Examples\n\nA locked standard input implements `BufRead`:\n\n```no_run\nuse std::io;\nuse std::io::prelude::*;\n\nlet stdin = io::stdin();\nfor line in stdin.lock().lines() {\n println!(\"{}\", line?);\n}\n# std::io::Result::Ok(())\n```\n\nIf you have something that implements [`Read`], you can use the [`BufReader`\ntype][`BufReader`] to turn it into a `BufRead`.\n\nFor example, [`File`] implements [`Read`], but not `BufRead`.\n[`BufReader`] to the rescue!\n\n[`File`]: crate::fs::File\n[`read_line`]: BufRead::read_line\n[`lines`]: BufRead::lines\n\n```no_run\nuse std::io::{self, BufReader};\nuse std::io::prelude::*;\nuse std::fs::File;\n\nfn main() -> io::Result<()> {\n let f = File::open(\"foo.txt\")?;\n let f = BufReader::new(f);\n\n for line in f.lines() {\n let line = line?;\n println!(\"{line}\");\n }\n\n Ok(())\n}\n```",
- "id": 2418,
+ "id": 2416,
"inner": {
"trait": {
"bounds": [
@@ -242596,7 +261110,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 2476,
+ "id": 2474,
"path": "Read"
}
}
@@ -242607,38 +261121,38 @@
"where_predicates": []
},
"implementations": [
- 3087,
+ 3089,
3285,
- 4289,
- 4296,
- 4299,
- 4302,
- 3636,
- 3863,
- 4306,
- 4309
+ 4288,
+ 4295,
+ 4298,
+ 4301,
+ 3635,
+ 3862,
+ 4305,
+ 4308
],
"is_auto": false,
"is_dyn_compatible": true,
"is_unsafe": false,
"items": [
- 3057,
- 3052,
+ 3059,
+ 3054,
+ 4277,
4278,
4279,
+ 3558,
4280,
- 3559,
- 4281,
- 3562
+ 3561
]
}
},
"links": {
- "BufRead::lines": 3562,
- "BufRead::read_line": 3559,
- "`BufReader`": 2409,
- "`Read`": 2476,
- "crate::fs::File": 2413
+ "BufRead::lines": 3561,
+ "BufRead::read_line": 3558,
+ "`BufReader`": 2407,
+ "`Read`": 2474,
+ "crate::fs::File": 2411
},
"name": "BufRead",
"span": {
@@ -242654,7 +261168,7 @@
},
"visibility": "public"
},
- "2419": {
+ "2417": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 130804, is_soft: false}, feature: \"file_buffered\"}}]"
@@ -242663,7 +261177,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Attempts to open a file in read-only mode with buffering.\n\nSee the [`OpenOptions::open`] method, the [`BufReader`][io::BufReader] type,\nand the [`BufRead`][io::BufRead] trait for more details.\n\nIf you only need to read the entire file contents,\nconsider [`std::fs::read()`][self::read] or\n[`std::fs::read_to_string()`][self::read_to_string] instead.\n\n# Errors\n\nThis function will return an error if `path` does not already exist,\nor if memory allocation fails for the new buffer.\nOther errors may also be returned according to [`OpenOptions::open`].\n\n# Examples\n\n```no_run\n#![feature(file_buffered)]\nuse std::fs::File;\nuse std::io::BufRead;\n\nfn main() -> std::io::Result<()> {\n let mut f = File::open_buffered(\"foo.txt\")?;\n assert!(f.capacity() > 0);\n for (line, i) in f.lines().zip(1..) {\n println!(\"{i:6}: {}\", line?);\n }\n Ok(())\n}\n```",
- "id": 2419,
+ "id": 2417,
"inner": {
"function": {
"generics": {
@@ -242684,7 +261198,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -242740,7 +261254,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
}
@@ -242749,7 +261263,7 @@
"constraints": []
}
},
- "id": 2409,
+ "id": 2407,
"path": "io::BufReader"
}
}
@@ -242758,7 +261272,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -242766,27 +261280,27 @@
}
},
"links": {
- "`OpenOptions::open`": 2414,
- "io::BufRead": 2418,
- "io::BufReader": 2409,
- "self::read": 2415,
- "self::read_to_string": 2416
+ "`OpenOptions::open`": 2412,
+ "io::BufRead": 2416,
+ "io::BufReader": 2407,
+ "self::read": 2413,
+ "self::read_to_string": 2414
},
"name": "open_buffered",
"span": {
"begin": [
- 488,
+ 569,
5
],
"end": [
- 493,
+ 574,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "public"
},
- "2420": {
+ "2418": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 26, patch: 0})}, feature: \"fs_read_write_bytes\"}}]"
@@ -242795,7 +261309,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Writes a slice as the entire contents of a file.\n\nThis function will create a file if it does not exist,\nand will entirely replace its contents if it does.\n\nDepending on the platform, this function may fail if the\nfull directory path does not exist.\n\nThis is a convenience function for using [`File::create`] and [`write_all`]\nwith fewer imports.\n\n[`write_all`]: Write::write_all\n\n# Examples\n\n```no_run\nuse std::fs;\n\nfn main() -> std::io::Result<()> {\n fs::write(\"foo.txt\", b\"Lorem ipsum\")?;\n fs::write(\"bar.txt\", \"dolor sit\")?;\n Ok(())\n}\n```",
- "id": 2420,
+ "id": 2418,
"inner": {
"function": {
"generics": {
@@ -242816,7 +261330,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "crate::path::Path"
}
}
@@ -242912,7 +261426,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -242921,7 +261435,7 @@
},
"links": {
"Write::write_all": 2960,
- "`File::create`": 2421
+ "`File::create`": 2419
},
"name": "write",
"span": {
@@ -242937,7 +261451,7 @@
},
"visibility": "public"
},
- "2421": {
+ "2419": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -242946,7 +261460,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Opens a file in write-only mode.\n\nThis function will create a file if it does not exist,\nand will truncate it if it does.\n\nDepending on the platform, this function may fail if the\nfull directory path does not exist.\nSee the [`OpenOptions::open`] function for more details.\n\nSee also [`std::fs::write()`][self::write] for a simple function to\ncreate a file with some given data.\n\n# Examples\n\n```no_run\nuse std::fs::File;\nuse std::io::Write;\n\nfn main() -> std::io::Result<()> {\n let mut f = File::create(\"foo.txt\")?;\n f.write_all(&1234_u32.to_be_bytes())?;\n Ok(())\n}\n```",
- "id": 2421,
+ "id": 2419,
"inner": {
"function": {
"generics": {
@@ -242967,7 +261481,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -243017,7 +261531,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
}
@@ -243026,7 +261540,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -243034,24 +261548,24 @@
}
},
"links": {
- "`OpenOptions::open`": 2414,
- "self::write": 2420
+ "`OpenOptions::open`": 2412,
+ "self::write": 2418
},
"name": "create",
"span": {
"begin": [
- 520,
+ 601,
5
],
"end": [
- 522,
+ 603,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "public"
},
- "2422": {
+ "2420": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 130804, is_soft: false}, feature: \"file_buffered\"}}]"
@@ -243060,7 +261574,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Opens a file in write-only mode with buffering.\n\nThis function will create a file if it does not exist,\nand will truncate it if it does.\n\nDepending on the platform, this function may fail if the\nfull directory path does not exist.\n\nSee the [`OpenOptions::open`] method and the\n[`BufWriter`][io::BufWriter] type for more details.\n\nSee also [`std::fs::write()`][self::write] for a simple function to\ncreate a file with some given data.\n\n# Examples\n\n```no_run\n#![feature(file_buffered)]\nuse std::fs::File;\nuse std::io::Write;\n\nfn main() -> std::io::Result<()> {\n let mut f = File::create_buffered(\"foo.txt\")?;\n assert!(f.capacity() > 0);\n for i in 0..100 {\n writeln!(&mut f, \"{i}\")?;\n }\n f.flush()?;\n Ok(())\n}\n```",
- "id": 2422,
+ "id": 2420,
"inner": {
"function": {
"generics": {
@@ -243081,7 +261595,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -243137,7 +261651,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
}
@@ -243146,7 +261660,7 @@
"constraints": []
}
},
- "id": 2410,
+ "id": 2408,
"path": "io::BufWriter"
}
}
@@ -243155,7 +261669,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -243163,25 +261677,25 @@
}
},
"links": {
- "`OpenOptions::open`": 2414,
- "io::BufWriter": 2410,
- "self::write": 2420
+ "`OpenOptions::open`": 2412,
+ "io::BufWriter": 2408,
+ "self::write": 2418
},
"name": "create_buffered",
"span": {
"begin": [
- 556,
+ 637,
5
],
"end": [
- 561,
+ 642,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "public"
},
- "2423": {
+ "2421": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -243190,7 +261704,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "An entity already exists, often a file.",
- "id": 2423,
+ "id": 2421,
"inner": {
"variant": {
"discriminant": null,
@@ -243201,18 +261715,18 @@
"name": "AlreadyExists",
"span": {
"begin": [
- 266,
+ 269,
5
],
"end": [
- 266,
+ 269,
18
],
"filename": "std/src/io/error.rs"
},
"visibility": "default"
},
- "2424": {
+ "2422": {
"attrs": [
{
"other": "#[deny(unsafe_op_in_unsafe_fn)]"
@@ -243224,49 +261738,51 @@
"crate_id": 0,
"deprecation": null,
"docs": "Filesystem manipulation operations.\n\nThis module contains basic methods to manipulate the contents of the local\nfilesystem. All methods in this module represent cross-platform filesystem\noperations. Extra platform-specific functionality can be found in the\nextension traits of `std::os::$platform`.\n\n# Time of Check to Time of Use (TOCTOU)\n\nMany filesystem operations are subject to a race condition known as \"Time of Check to Time of Use\"\n(TOCTOU). This occurs when a program checks a condition (like file existence or permissions)\nand then uses the result of that check to make a decision, but the condition may have changed\nbetween the check and the use.\n\nFor example, checking if a file exists and then creating it if it doesn't is vulnerable to\nTOCTOU - another process could create the file between your check and creation attempt.\n\nAnother example is with symbolic links: when removing a directory, if another process replaces\nthe directory with a symbolic link between the check and the removal operation, the removal\nmight affect the wrong location. This is why operations like [`remove_dir_all`] need to use\natomic operations to prevent such race conditions.\n\nTo avoid TOCTOU issues:\n- Be aware that metadata operations (like [`metadata`] or [`symlink_metadata`]) may be affected by\nchanges made by other processes.\n- Use atomic operations when possible (like [`File::create_new`] instead of checking existence then creating).\n- Keep file open for the duration of operations.",
- "id": 2424,
+ "id": 2422,
"inner": {
"module": {
"is_crate": false,
"is_stripped": false,
"items": [
- 2413,
- 2437,
- 2441,
+ 2411,
+ 2435,
+ 2439,
2714,
2713,
- 2428,
- 2446,
+ 2426,
2444,
+ 2442,
2599,
2934,
- 2415,
- 2416,
- 2420,
+ 2413,
+ 2414,
+ 2418,
2961,
+ 2962,
+ 2963,
2596,
2597,
- 2962,
2964,
- 2965,
- 2969,
- 2970,
+ 2966,
+ 2967,
2971,
- 2973,
2972,
+ 2973,
2975,
2974,
+ 2977,
+ 2976,
2712,
2855,
- 2978,
- 2980
+ 2980,
+ 2982
]
}
},
"links": {
- "`File::create_new`": 2425,
+ "`File::create_new`": 2423,
"`metadata`": 2596,
- "`remove_dir_all`": 2974,
+ "`remove_dir_all`": 2976,
"`symlink_metadata`": 2597
},
"name": "fs",
@@ -243276,14 +261792,14 @@
1
],
"end": [
- 3306,
+ 3395,
2
],
"filename": "std/src/fs.rs"
},
"visibility": "public"
},
- "2425": {
+ "2423": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 77, patch: 0})}, feature: \"file_create_new\"}}]"
@@ -243292,7 +261808,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Creates a new file in read-write mode; error if the file exists.\n\nThis function will create a file if it does not exist, or return an error if it does. This\nway, if the call succeeds, the file returned is guaranteed to be new.\nIf a file exists at the target location, creating a new file will fail with [`AlreadyExists`]\nor another error based on the situation. See [`OpenOptions::open`] for a\nnon-exhaustive list of likely errors.\n\nThis option is useful because it is atomic. Otherwise between checking whether a file\nexists and creating a new one, the file may have been created by another process (a [TOCTOU]\nrace condition / attack).\n\nThis can also be written using\n`File::options().read(true).write(true).create_new(true).open(...)`.\n\n[`AlreadyExists`]: crate::io::ErrorKind::AlreadyExists\n[TOCTOU]: self#time-of-check-to-time-of-use-toctou\n\n# Examples\n\n```no_run\nuse std::fs::File;\nuse std::io::Write;\n\nfn main() -> std::io::Result<()> {\n let mut f = File::create_new(\"foo.txt\")?;\n f.write_all(\"Hello, world!\".as_bytes())?;\n Ok(())\n}\n```",
- "id": 2425,
+ "id": 2423,
"inner": {
"function": {
"generics": {
@@ -243313,7 +261829,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -243363,7 +261879,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
}
@@ -243372,7 +261888,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -243380,25 +261896,25 @@
}
},
"links": {
- "`OpenOptions::open`": 2414,
- "crate::io::ErrorKind::AlreadyExists": 2423,
- "self#time-of-check-to-time-of-use-toctou": 2424
+ "`OpenOptions::open`": 2412,
+ "crate::io::ErrorKind::AlreadyExists": 2421,
+ "self#time-of-check-to-time-of-use-toctou": 2422
},
"name": "create_new",
"span": {
"begin": [
- 594,
+ 675,
5
],
"end": [
- 596,
+ 677,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "public"
},
- "2426": {
+ "2424": {
"attrs": [
{
"other": "#[(not(test), rustc_diagnostic_item = \"open_options_new\")]"
@@ -243418,7 +261934,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Creates a blank new set of options ready for configuration.\n\nAll options are initially set to `false`.\n\n# Examples\n\n```no_run\nuse std::fs::OpenOptions;\n\nlet mut options = OpenOptions::new();\nlet file = options.read(true).open(\"foo.txt\");\n```",
- "id": 2426,
+ "id": 2424,
"inner": {
"function": {
"generics": {
@@ -243445,18 +261961,18 @@
"name": "new",
"span": {
"begin": [
- 1493,
+ 1574,
5
],
"end": [
- 1495,
+ 1576,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "public"
},
- "2427": {
+ "2425": {
"attrs": [
{
"other": "#[(not(test), rustc_diagnostic_item = \"file_options\")]"
@@ -243476,7 +261992,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Returns a new OpenOptions object.\n\nThis function returns a new OpenOptions object that you can use to\nopen or create a file with specific options if `open()` or `create()`\nare not appropriate.\n\nIt is equivalent to `OpenOptions::new()`, but allows you to write more\nreadable code. Instead of\n`OpenOptions::new().append(true).open(\"example.log\")`,\nyou can write `File::options().append(true).open(\"example.log\")`. This\nalso avoids the need to import `OpenOptions`.\n\nSee the [`OpenOptions::new`] function for more details.\n\n# Examples\n\n```no_run\nuse std::fs::File;\nuse std::io::Write;\n\nfn main() -> std::io::Result<()> {\n let mut f = File::options().append(true).open(\"example.log\")?;\n writeln!(&mut f, \"new line\")?;\n Ok(())\n}\n```",
- "id": 2427,
+ "id": 2425,
"inner": {
"function": {
"generics": {
@@ -243496,7 +262012,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
}
@@ -243504,23 +262020,23 @@
}
},
"links": {
- "`OpenOptions::new`": 2426
+ "`OpenOptions::new`": 2424
},
"name": "options",
"span": {
"begin": [
- 627,
+ 708,
5
],
"end": [
- 629,
+ 710,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "public"
},
- "2428": {
+ "2426": {
"attrs": [
{
"other": "#[(not(test), rustc_diagnostic_item = \"FsOpenOptions\")]"
@@ -243535,7 +262051,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Options and flags which can be used to configure how a file is opened.\n\nThis builder exposes the ability to configure how a [`File`] is opened and\nwhat operations are permitted on the open file. The [`File::open`] and\n[`File::create`] methods are aliases for commonly used options using this\nbuilder.\n\nGenerally speaking, when using `OpenOptions`, you'll first call\n[`OpenOptions::new`], then chain calls to methods to set each option, then\ncall [`OpenOptions::open`], passing the path of the file you're trying to\nopen. This will give you a [`io::Result`] with a [`File`] inside that you\ncan further operate on.\n\n# Examples\n\nOpening a file to read:\n\n```no_run\nuse std::fs::OpenOptions;\n\nlet file = OpenOptions::new().read(true).open(\"foo.txt\");\n```\n\nOpening a file for both reading and writing, as well as creating it if it\ndoesn't exist:\n\n```no_run\nuse std::fs::OpenOptions;\n\nlet file = OpenOptions::new()\n .read(true)\n .write(true)\n .create(true)\n .open(\"foo.txt\");\n```",
- "id": 2428,
+ "id": 2426,
"inner": {
"struct": {
"generics": {
@@ -243573,12 +262089,12 @@
}
},
"links": {
- "`File::create`": 2421,
- "`File::open`": 2417,
- "`File`": 2413,
- "`OpenOptions::new`": 2426,
- "`OpenOptions::open`": 2414,
- "`io::Result`": 468
+ "`File::create`": 2419,
+ "`File::open`": 2415,
+ "`File`": 2411,
+ "`OpenOptions::new`": 2424,
+ "`OpenOptions::open`": 2412,
+ "`io::Result`": 469
},
"name": "OpenOptions",
"span": {
@@ -243594,7 +262110,7 @@
},
"visibility": "public"
},
- "2429": {
+ "2427": {
"attrs": [
{
"other": "#[doc(alias = \"fdatasync\")]"
@@ -243606,7 +262122,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "This function is similar to [`sync_all`], except that it might not\nsynchronize file metadata to the filesystem.\n\nThis is intended for use cases that must synchronize content, but don't\nneed the metadata on disk. The goal of this method is to reduce disk\noperations.\n\nNote that some platforms may simply implement this in terms of\n[`sync_all`].\n\n[`sync_all`]: File::sync_all\n\n# Examples\n\n```no_run\nuse std::fs::File;\nuse std::io::prelude::*;\n\nfn main() -> std::io::Result<()> {\n let mut f = File::create(\"foo.txt\")?;\n f.write_all(b\"Hello, world!\")?;\n\n f.sync_data()?;\n Ok(())\n}\n```",
- "id": 2429,
+ "id": 2427,
"inner": {
"function": {
"generics": {
@@ -243650,7 +262166,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -243658,59 +262174,23 @@
}
},
"links": {
- "File::sync_all": 2408
+ "File::sync_all": 2406
},
"name": "sync_data",
"span": {
"begin": [
- 694,
+ 775,
5
],
"end": [
- 696,
+ 777,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "public"
},
- "243": {
- "attrs": [
- {
- "other": "#[allow(deprecated, deprecated_in_future)]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 243,
- "inner": {
- "use": {
- "id": 244,
- "is_glob": false,
- "name": "MANTISSA_DIGITS",
- "source": "core::f32::MANTISSA_DIGITS"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 18,
- 32
- ],
- "end": [
- 18,
- 47
- ],
- "filename": "std/src/num/f32.rs"
- },
- "visibility": "public"
- },
- "2430": {
+ "2428": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 89, patch: 0})}, feature: \"file_lock\"}}]"
@@ -243719,7 +262199,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Acquire an exclusive lock on the file. Blocks until the lock can be acquired.\n\nThis acquires an exclusive lock; no other file handle to this file may acquire another lock.\n\nThis lock may be advisory or mandatory. This lock is meant to interact with [`lock`],\n[`try_lock`], [`lock_shared`], [`try_lock_shared`], and [`unlock`]. Its interactions with\nother methods, such as [`read`] and [`write`] are platform specific, and it may or may not\ncause non-lockholders to block.\n\nIf this file handle/descriptor, or a clone of it, already holds a lock the exact behavior\nis unspecified and platform dependent, including the possibility that it will deadlock.\nHowever, if this method returns, then an exclusive lock is held.\n\nIf the file is not open for writing, it is unspecified whether this function returns an error.\n\nThe lock will be released when this file (along with any other file descriptors/handles\nduplicated or inherited from it) is closed, or if the [`unlock`] method is called.\n\n# Platform-specific behavior\n\nThis function currently corresponds to the `flock` function on Unix with the `LOCK_EX` flag,\nand the `LockFileEx` function on Windows with the `LOCKFILE_EXCLUSIVE_LOCK` flag. Note that,\nthis [may change in the future][changes].\n\nOn Windows, locking a file will fail if the file is opened only for append. To lock a file,\nopen it with one of `.read(true)`, `.read(true).append(true)`, or `.write(true)`.\n\n[changes]: io#platform-specific-behavior\n\n[`lock`]: File::lock\n[`lock_shared`]: File::lock_shared\n[`try_lock`]: File::try_lock\n[`try_lock_shared`]: File::try_lock_shared\n[`unlock`]: File::unlock\n[`read`]: Read::read\n[`write`]: Write::write\n\n# Examples\n\n```no_run\nuse std::fs::File;\n\nfn main() -> std::io::Result<()> {\n let f = File::create(\"foo.txt\")?;\n f.lock()?;\n Ok(())\n}\n```",
- "id": 2430,
+ "id": 2428,
"inner": {
"function": {
"generics": {
@@ -243763,7 +262243,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -243771,30 +262251,30 @@
}
},
"links": {
- "File::lock": 2430,
- "File::lock_shared": 2432,
- "File::try_lock": 2431,
- "File::try_lock_shared": 2433,
- "File::unlock": 2434,
- "Read::read": 2435,
- "Write::write": 2436,
- "io#platform-specific-behavior": 501
+ "File::lock": 2428,
+ "File::lock_shared": 2430,
+ "File::try_lock": 2429,
+ "File::try_lock_shared": 2431,
+ "File::unlock": 2432,
+ "Read::read": 2433,
+ "Write::write": 2434,
+ "io#platform-specific-behavior": 502
},
"name": "lock",
"span": {
"begin": [
- 747,
+ 828,
5
],
"end": [
- 749,
+ 830,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "public"
},
- "2431": {
+ "2429": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 89, patch: 0})}, feature: \"file_lock\"}}]"
@@ -243803,7 +262283,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Try to acquire an exclusive lock on the file.\n\nReturns `Err(TryLockError::WouldBlock)` if a different lock is already held on this file\n(via another handle/descriptor).\n\nThis acquires an exclusive lock; no other file handle to this file may acquire another lock.\n\nThis lock may be advisory or mandatory. This lock is meant to interact with [`lock`],\n[`try_lock`], [`lock_shared`], [`try_lock_shared`], and [`unlock`]. Its interactions with\nother methods, such as [`read`] and [`write`] are platform specific, and it may or may not\ncause non-lockholders to block.\n\nIf this file handle/descriptor, or a clone of it, already holds a lock, the exact behavior\nis unspecified and platform dependent, including the possibility that it will deadlock.\nHowever, if this method returns `Ok(())`, then it has acquired an exclusive lock.\n\nIf the file is not open for writing, it is unspecified whether this function returns an error.\n\nThe lock will be released when this file (along with any other file descriptors/handles\nduplicated or inherited from it) is closed, or if the [`unlock`] method is called.\n\n# Platform-specific behavior\n\nThis function currently corresponds to the `flock` function on Unix with the `LOCK_EX` and\n`LOCK_NB` flags, and the `LockFileEx` function on Windows with the `LOCKFILE_EXCLUSIVE_LOCK`\nand `LOCKFILE_FAIL_IMMEDIATELY` flags. Note that, this\n[may change in the future][changes].\n\nOn Windows, locking a file will fail if the file is opened only for append. To lock a file,\nopen it with one of `.read(true)`, `.read(true).append(true)`, or `.write(true)`.\n\n[changes]: io#platform-specific-behavior\n\n[`lock`]: File::lock\n[`lock_shared`]: File::lock_shared\n[`try_lock`]: File::try_lock\n[`try_lock_shared`]: File::try_lock_shared\n[`unlock`]: File::unlock\n[`read`]: Read::read\n[`write`]: Write::write\n\n# Examples\n\n```no_run\nuse std::fs::{File, TryLockError};\n\nfn main() -> std::io::Result<()> {\n let f = File::create(\"foo.txt\")?;\n // Explicit handling of the WouldBlock error\n match f.try_lock() {\n Ok(_) => (),\n Err(TryLockError::WouldBlock) => (), // Lock not acquired\n Err(TryLockError::Error(err)) => return Err(err),\n }\n // Alternately, propagate the error as an io::Error\n f.try_lock()?;\n Ok(())\n}\n```",
- "id": 2431,
+ "id": 2429,
"inner": {
"function": {
"generics": {
@@ -243847,7 +262327,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2437,
+ "id": 2435,
"path": "TryLockError"
}
}
@@ -243864,30 +262344,66 @@
}
},
"links": {
- "File::lock": 2430,
- "File::lock_shared": 2432,
- "File::try_lock": 2431,
- "File::try_lock_shared": 2433,
- "File::unlock": 2434,
- "Read::read": 2435,
- "Write::write": 2436,
- "io#platform-specific-behavior": 501
+ "File::lock": 2428,
+ "File::lock_shared": 2430,
+ "File::try_lock": 2429,
+ "File::try_lock_shared": 2431,
+ "File::unlock": 2432,
+ "Read::read": 2433,
+ "Write::write": 2434,
+ "io#platform-specific-behavior": 502
},
"name": "try_lock",
"span": {
"begin": [
- 863,
+ 944,
5
],
"end": [
- 865,
+ 946,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "public"
},
- "2432": {
+ "243": {
+ "attrs": [
+ {
+ "other": "#[allow(deprecated, deprecated_in_future)]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 243,
+ "inner": {
+ "use": {
+ "id": 244,
+ "is_glob": false,
+ "name": "MAX",
+ "source": "core::f32::MAX"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 18,
+ 49
+ ],
+ "end": [
+ 18,
+ 52
+ ],
+ "filename": "std/src/num/f32.rs"
+ },
+ "visibility": "public"
+ },
+ "2430": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 89, patch: 0})}, feature: \"file_lock\"}}]"
@@ -243896,7 +262412,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Acquire a shared (non-exclusive) lock on the file. Blocks until the lock can be acquired.\n\nThis acquires a shared lock; more than one file handle may hold a shared lock, but none may\nhold an exclusive lock at the same time.\n\nThis lock may be advisory or mandatory. This lock is meant to interact with [`lock`],\n[`try_lock`], [`lock_shared`], [`try_lock_shared`], and [`unlock`]. Its interactions with\nother methods, such as [`read`] and [`write`] are platform specific, and it may or may not\ncause non-lockholders to block.\n\nIf this file handle/descriptor, or a clone of it, already holds a lock, the exact behavior\nis unspecified and platform dependent, including the possibility that it will deadlock.\nHowever, if this method returns, then a shared lock is held.\n\nThe lock will be released when this file (along with any other file descriptors/handles\nduplicated or inherited from it) is closed, or if the [`unlock`] method is called.\n\n# Platform-specific behavior\n\nThis function currently corresponds to the `flock` function on Unix with the `LOCK_SH` flag,\nand the `LockFileEx` function on Windows. Note that, this\n[may change in the future][changes].\n\nOn Windows, locking a file will fail if the file is opened only for append. To lock a file,\nopen it with one of `.read(true)`, `.read(true).append(true)`, or `.write(true)`.\n\n[changes]: io#platform-specific-behavior\n\n[`lock`]: File::lock\n[`lock_shared`]: File::lock_shared\n[`try_lock`]: File::try_lock\n[`try_lock_shared`]: File::try_lock_shared\n[`unlock`]: File::unlock\n[`read`]: Read::read\n[`write`]: Write::write\n\n# Examples\n\n```no_run\nuse std::fs::File;\n\nfn main() -> std::io::Result<()> {\n let f = File::open(\"foo.txt\")?;\n f.lock_shared()?;\n Ok(())\n}\n```",
- "id": 2432,
+ "id": 2430,
"inner": {
"function": {
"generics": {
@@ -243940,7 +262456,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -243948,30 +262464,30 @@
}
},
"links": {
- "File::lock": 2430,
- "File::lock_shared": 2432,
- "File::try_lock": 2431,
- "File::try_lock_shared": 2433,
- "File::unlock": 2434,
- "Read::read": 2435,
- "Write::write": 2436,
- "io#platform-specific-behavior": 501
+ "File::lock": 2428,
+ "File::lock_shared": 2430,
+ "File::try_lock": 2429,
+ "File::try_lock_shared": 2431,
+ "File::unlock": 2432,
+ "Read::read": 2433,
+ "Write::write": 2434,
+ "io#platform-specific-behavior": 502
},
"name": "lock_shared",
"span": {
"begin": [
- 799,
+ 880,
5
],
"end": [
- 801,
+ 882,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "public"
},
- "2433": {
+ "2431": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 89, patch: 0})}, feature: \"file_lock\"}}]"
@@ -243980,7 +262496,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Try to acquire a shared (non-exclusive) lock on the file.\n\nReturns `Err(TryLockError::WouldBlock)` if a different lock is already held on this file\n(via another handle/descriptor).\n\nThis acquires a shared lock; more than one file handle may hold a shared lock, but none may\nhold an exclusive lock at the same time.\n\nThis lock may be advisory or mandatory. This lock is meant to interact with [`lock`],\n[`try_lock`], [`lock_shared`], [`try_lock_shared`], and [`unlock`]. Its interactions with\nother methods, such as [`read`] and [`write`] are platform specific, and it may or may not\ncause non-lockholders to block.\n\nIf this file handle, or a clone of it, already holds a lock, the exact behavior is\nunspecified and platform dependent, including the possibility that it will deadlock.\nHowever, if this method returns `Ok(())`, then it has acquired a shared lock.\n\nThe lock will be released when this file (along with any other file descriptors/handles\nduplicated or inherited from it) is closed, or if the [`unlock`] method is called.\n\n# Platform-specific behavior\n\nThis function currently corresponds to the `flock` function on Unix with the `LOCK_SH` and\n`LOCK_NB` flags, and the `LockFileEx` function on Windows with the\n`LOCKFILE_FAIL_IMMEDIATELY` flag. Note that, this\n[may change in the future][changes].\n\nOn Windows, locking a file will fail if the file is opened only for append. To lock a file,\nopen it with one of `.read(true)`, `.read(true).append(true)`, or `.write(true)`.\n\n[changes]: io#platform-specific-behavior\n\n[`lock`]: File::lock\n[`lock_shared`]: File::lock_shared\n[`try_lock`]: File::try_lock\n[`try_lock_shared`]: File::try_lock_shared\n[`unlock`]: File::unlock\n[`read`]: Read::read\n[`write`]: Write::write\n\n# Examples\n\n```no_run\nuse std::fs::{File, TryLockError};\n\nfn main() -> std::io::Result<()> {\n let f = File::open(\"foo.txt\")?;\n // Explicit handling of the WouldBlock error\n match f.try_lock_shared() {\n Ok(_) => (),\n Err(TryLockError::WouldBlock) => (), // Lock not acquired\n Err(TryLockError::Error(err)) => return Err(err),\n }\n // Alternately, propagate the error as an io::Error\n f.try_lock_shared()?;\n\n Ok(())\n}\n```",
- "id": 2433,
+ "id": 2431,
"inner": {
"function": {
"generics": {
@@ -244024,7 +262540,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2437,
+ "id": 2435,
"path": "TryLockError"
}
}
@@ -244041,30 +262557,30 @@
}
},
"links": {
- "File::lock": 2430,
- "File::lock_shared": 2432,
- "File::try_lock": 2431,
- "File::try_lock_shared": 2433,
- "File::unlock": 2434,
- "Read::read": 2435,
- "Write::write": 2436,
- "io#platform-specific-behavior": 501
+ "File::lock": 2428,
+ "File::lock_shared": 2430,
+ "File::try_lock": 2429,
+ "File::try_lock_shared": 2431,
+ "File::unlock": 2432,
+ "Read::read": 2433,
+ "Write::write": 2434,
+ "io#platform-specific-behavior": 502
},
"name": "try_lock_shared",
"span": {
"begin": [
- 927,
+ 1008,
5
],
"end": [
- 929,
+ 1010,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "public"
},
- "2434": {
+ "2432": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 89, patch: 0})}, feature: \"file_lock\"}}]"
@@ -244073,7 +262589,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Release all locks on the file.\n\nAll locks are released when the file (along with any other file descriptors/handles\nduplicated or inherited from it) is closed. This method allows releasing locks without\nclosing the file.\n\nIf no lock is currently held via this file descriptor/handle, this method may return an\nerror, or may return successfully without taking any action.\n\n# Platform-specific behavior\n\nThis function currently corresponds to the `flock` function on Unix with the `LOCK_UN` flag,\nand the `UnlockFile` function on Windows. Note that, this\n[may change in the future][changes].\n\nOn Windows, locking a file will fail if the file is opened only for append. To lock a file,\nopen it with one of `.read(true)`, `.read(true).append(true)`, or `.write(true)`.\n\n[changes]: io#platform-specific-behavior\n\n# Examples\n\n```no_run\nuse std::fs::File;\n\nfn main() -> std::io::Result<()> {\n let f = File::open(\"foo.txt\")?;\n f.lock()?;\n f.unlock()?;\n Ok(())\n}\n```",
- "id": 2434,
+ "id": 2432,
"inner": {
"function": {
"generics": {
@@ -244117,7 +262633,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -244125,23 +262641,23 @@
}
},
"links": {
- "io#platform-specific-behavior": 501
+ "io#platform-specific-behavior": 502
},
"name": "unlock",
"span": {
"begin": [
- 964,
+ 1045,
5
],
"end": [
- 966,
+ 1047,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "public"
},
- "2435": {
+ "2433": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -244150,7 +262666,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Pull some bytes from this source into the specified buffer, returning\nhow many bytes were read.\n\nThis function does not provide any guarantees about whether it blocks\nwaiting for data, but if an object needs to block for a read and cannot,\nit will typically signal this via an [`Err`] return value.\n\nIf the return value of this method is [`Ok(n)`], then implementations must\nguarantee that `0 <= n <= buf.len()`. A nonzero `n` value indicates\nthat the buffer `buf` has been filled in with `n` bytes of data from this\nsource. If `n` is `0`, then it can indicate one of two scenarios:\n\n1. This reader has reached its \"end of file\" and will likely no longer\n be able to produce bytes. Note that this does not mean that the\n reader will *always* no longer be able to produce bytes. As an example,\n on Linux, this method will call the `recv` syscall for a [`TcpStream`],\n where returning zero indicates the connection was shut down correctly. While\n for [`File`], it is possible to reach the end of file and get zero as result,\n but if more data is appended to the file, future calls to `read` will return\n more data.\n2. The buffer specified was 0 bytes in length.\n\nIt is not an error if the returned value `n` is smaller than the buffer size,\neven when the reader is not at the end of the stream yet.\nThis may happen for example because fewer bytes are actually available right now\n(e. g. being close to end-of-file) or because read() was interrupted by a signal.\n\nAs this trait is safe to implement, callers in unsafe code cannot rely on\n`n <= buf.len()` for safety.\nExtra care needs to be taken when `unsafe` functions are used to access the read bytes.\nCallers have to ensure that no unchecked out-of-bounds accesses are possible even if\n`n > buf.len()`.\n\n*Implementations* of this method can make no assumptions about the contents of `buf` when\nthis function is called. It is recommended that implementations only write data to `buf`\ninstead of reading its contents.\n\nCorrespondingly, however, *callers* of this method in unsafe code must not assume\nany guarantees about how the implementation uses `buf`. The trait is safe to implement,\nso it is possible that the code that's supposed to write to the buffer might also read\nfrom it. It is your responsibility to make sure that `buf` is initialized\nbefore calling `read`. Calling `read` with an uninitialized `buf` (of the kind one\nobtains via [`MaybeUninit`]) is not safe, and can lead to undefined behavior.\n\n[`MaybeUninit`]: crate::mem::MaybeUninit\n\n# Errors\n\nIf this function encounters any form of I/O or other error, an error\nvariant will be returned. If an error is returned then it must be\nguaranteed that no bytes were read.\n\nAn error of the [`ErrorKind::Interrupted`] kind is non-fatal and the read\noperation should be retried if there is nothing else to do.\n\n# Examples\n\n[`File`]s implement `Read`:\n\n[`Ok(n)`]: Ok\n[`File`]: crate::fs::File\n[`TcpStream`]: crate::net::TcpStream\n\n```no_run\nuse std::io;\nuse std::io::prelude::*;\nuse std::fs::File;\n\nfn main() -> io::Result<()> {\n let mut f = File::open(\"foo.txt\")?;\n let mut buffer = [0; 10];\n\n // read up to 10 bytes\n let n = f.read(&mut buffer[..])?;\n\n println!(\"The bytes: {:?}\", &buffer[..n]);\n Ok(())\n}\n```",
- "id": 2435,
+ "id": 2433,
"inner": {
"function": {
"generics": {
@@ -244208,7 +262724,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "Result"
}
}
@@ -244219,9 +262735,9 @@
"Ok": 61,
"`Err`": 59,
"`ErrorKind::Interrupted`": 2958,
- "crate::fs::File": 2413,
- "crate::mem::MaybeUninit": 3986,
- "crate::net::TcpStream": 3047
+ "crate::fs::File": 2411,
+ "crate::mem::MaybeUninit": 3985,
+ "crate::net::TcpStream": 3049
},
"name": "read",
"span": {
@@ -244237,7 +262753,7 @@
},
"visibility": "default"
},
- "2436": {
+ "2434": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -244246,7 +262762,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Writes a buffer into this writer, returning how many bytes were written.\n\nThis function will attempt to write the entire contents of `buf`, but\nthe entire write might not succeed, or the write may also generate an\nerror. Typically, a call to `write` represents one attempt to write to\nany wrapped object.\n\nCalls to `write` are not guaranteed to block waiting for data to be\nwritten, and a write which would otherwise block can be indicated through\nan [`Err`] variant.\n\nIf this method consumed `n > 0` bytes of `buf` it must return [`Ok(n)`].\nIf the return value is `Ok(n)` then `n` must satisfy `n <= buf.len()`.\nA return value of `Ok(0)` typically means that the underlying object is\nno longer able to accept bytes and will likely not be able to in the\nfuture as well, or that the buffer provided is empty.\n\n# Errors\n\nEach call to `write` may generate an I/O error indicating that the\noperation could not be completed. If an error is returned then no bytes\nin the buffer were written to this writer.\n\nIt is **not** considered an error if the entire buffer could not be\nwritten to this writer.\n\nAn error of the [`ErrorKind::Interrupted`] kind is non-fatal and the\nwrite operation should be retried if there is nothing else to do.\n\n# Examples\n\n```no_run\nuse std::io::prelude::*;\nuse std::fs::File;\n\nfn main() -> std::io::Result<()> {\n let mut buffer = File::create(\"foo.txt\")?;\n\n // Writes some prefix of the byte string, not necessarily all of it.\n buffer.write(b\"some bytes\")?;\n Ok(())\n}\n```\n\n[`Ok(n)`]: Ok",
- "id": 2436,
+ "id": 2434,
"inner": {
"function": {
"generics": {
@@ -244304,7 +262820,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "Result"
}
}
@@ -244330,7 +262846,7 @@
},
"visibility": "default"
},
- "2437": {
+ "2435": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 89, patch: 0})}, feature: \"file_lock\"}}]"
@@ -244339,7 +262855,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "An enumeration of possible errors which can occur while trying to acquire a lock\nfrom the [`try_lock`] method and [`try_lock_shared`] method on a [`File`].\n\n[`try_lock`]: File::try_lock\n[`try_lock_shared`]: File::try_lock_shared",
- "id": 2437,
+ "id": 2435,
"inner": {
"enum": {
"generics": {
@@ -244374,9 +262890,9 @@
}
},
"links": {
- "File::try_lock": 2431,
- "File::try_lock_shared": 2433,
- "`File`": 2413
+ "File::try_lock": 2429,
+ "File::try_lock_shared": 2431,
+ "`File`": 2411
},
"name": "TryLockError",
"span": {
@@ -244392,7 +262908,7 @@
},
"visibility": "public"
},
- "2438": {
+ "2436": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -244401,7 +262917,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "A parameter was incorrect.",
- "id": 2438,
+ "id": 2436,
"inner": {
"variant": {
"discriminant": null,
@@ -244412,18 +262928,18 @@
"name": "InvalidInput",
"span": {
"begin": [
- 305,
+ 308,
5
],
"end": [
- 305,
+ 308,
17
],
"filename": "std/src/io/error.rs"
},
"visibility": "default"
},
- "2439": {
+ "2437": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -244432,7 +262948,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Truncates or extends the underlying file, updating the size of\nthis file to become `size`.\n\nIf the `size` is less than the current file's size, then the file will\nbe shrunk. If it is greater than the current file's size, then the file\nwill be extended to `size` and have all of the intermediate data filled\nin with 0s.\n\nThe file's cursor isn't changed. In particular, if the cursor was at the\nend and the file is shrunk using this operation, the cursor will now be\npast the end.\n\n# Errors\n\nThis function will return an error if the file is not opened for writing.\nAlso, [`std::io::ErrorKind::InvalidInput`](crate::io::ErrorKind::InvalidInput)\nwill be returned if the desired length would cause an overflow due to\nthe implementation specifics.\n\n# Examples\n\n```no_run\nuse std::fs::File;\n\nfn main() -> std::io::Result<()> {\n let mut f = File::create(\"foo.txt\")?;\n f.set_len(10)?;\n Ok(())\n}\n```\n\nNote that this method alters the content of the underlying file, even\nthough it takes `&self` rather than `&mut self`.",
- "id": 2439,
+ "id": 2437,
"inner": {
"function": {
"generics": {
@@ -244482,7 +262998,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -244490,23 +263006,23 @@
}
},
"links": {
- "crate::io::ErrorKind::InvalidInput": 2438
+ "crate::io::ErrorKind::InvalidInput": 2436
},
"name": "set_len",
"span": {
"begin": [
- 1002,
+ 1083,
5
],
"end": [
- 1004,
+ 1085,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "public"
},
- "2440": {
+ "2438": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -244515,7 +263031,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Queries metadata about the underlying file.\n\n# Examples\n\n```no_run\nuse std::fs::File;\n\nfn main() -> std::io::Result<()> {\n let mut f = File::open(\"foo.txt\")?;\n let metadata = f.metadata()?;\n Ok(())\n}\n```",
- "id": 2440,
+ "id": 2438,
"inner": {
"function": {
"generics": {
@@ -244554,7 +263070,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2441,
+ "id": 2439,
"path": "Metadata"
}
}
@@ -244563,7 +263079,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -244574,18 +263090,18 @@
"name": "metadata",
"span": {
"begin": [
- 1020,
+ 1101,
5
],
"end": [
- 1022,
+ 1103,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "public"
},
- "2441": {
+ "2439": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -244594,7 +263110,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Metadata information about a file.\n\nThis structure is returned from the [`metadata`] or\n[`symlink_metadata`] function or method and represents known\nmetadata about a file such as its permissions, size, modification\ntimes, etc.",
- "id": 2441,
+ "id": 2439,
"inner": {
"struct": {
"generics": {
@@ -244651,7 +263167,7 @@
},
"visibility": "public"
},
- "2442": {
+ "2440": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 9, patch: 0})}, feature: \"file_try_clone\"}}]"
@@ -244660,7 +263176,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Creates a new `File` instance that shares the same underlying file handle\nas the existing `File` instance. Reads, writes, and seeks will affect\nboth `File` instances simultaneously.\n\n# Examples\n\nCreates two handles for a file named `foo.txt`:\n\n```no_run\nuse std::fs::File;\n\nfn main() -> std::io::Result<()> {\n let mut file = File::open(\"foo.txt\")?;\n let file_copy = file.try_clone()?;\n Ok(())\n}\n```\n\nAssuming there’s a file named `foo.txt` with contents `abcdef\\n`, create\ntwo handles, seek one of them, and read the remaining bytes from the\nother handle:\n\n```no_run\nuse std::fs::File;\nuse std::io::SeekFrom;\nuse std::io::prelude::*;\n\nfn main() -> std::io::Result<()> {\n let mut file = File::open(\"foo.txt\")?;\n let mut file_copy = file.try_clone()?;\n\n file.seek(SeekFrom::Start(3))?;\n\n let mut contents = vec![];\n file_copy.read_to_end(&mut contents)?;\n assert_eq!(contents, b\"def\\n\");\n Ok(())\n}\n```",
- "id": 2442,
+ "id": 2440,
"inner": {
"function": {
"generics": {
@@ -244699,7 +263215,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
}
@@ -244708,7 +263224,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -244719,18 +263235,18 @@
"name": "try_clone",
"span": {
"begin": [
- 1064,
+ 1145,
5
],
"end": [
- 1066,
+ 1147,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "public"
},
- "2443": {
+ "2441": {
"attrs": [
{
"other": "#[doc(alias = \"fchmod\", alias = \"SetFileInformationByHandle\")]"
@@ -244742,7 +263258,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Changes the permissions on the underlying file.\n\n# Platform-specific behavior\n\nThis function currently corresponds to the `fchmod` function on Unix and\nthe `SetFileInformationByHandle` function on Windows. Note that, this\n[may change in the future][changes].\n\n[changes]: io#platform-specific-behavior\n\n# Errors\n\nThis function will return an error if the user lacks permission change\nattributes on the underlying file. It may also return an error in other\nos-specific unspecified cases.\n\n# Examples\n\n```no_run\nfn main() -> std::io::Result<()> {\n use std::fs::File;\n\n let file = File::open(\"foo.txt\")?;\n let mut perms = file.metadata()?.permissions();\n perms.set_readonly(true);\n file.set_permissions(perms)?;\n Ok(())\n}\n```\n\nNote that this method alters the permissions of the underlying file,\neven though it takes `&self` rather than `&mut self`.",
- "id": 2443,
+ "id": 2441,
"inner": {
"function": {
"generics": {
@@ -244775,7 +263291,7 @@
{
"resolved_path": {
"args": null,
- "id": 2444,
+ "id": 2442,
"path": "Permissions"
}
}
@@ -244796,7 +263312,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -244804,23 +263320,23 @@
}
},
"links": {
- "io#platform-specific-behavior": 501
+ "io#platform-specific-behavior": 502
},
"name": "set_permissions",
"span": {
"begin": [
- 1102,
+ 1183,
5
],
"end": [
- 1104,
+ 1185,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "public"
},
- "2444": {
+ "2442": {
"attrs": [
{
"other": "#[(not(test), rustc_diagnostic_item = \"FsPermissions\")]"
@@ -244835,7 +263351,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Representation of the various permissions on a file.\n\nThis module only currently provides one bit of information,\n[`Permissions::readonly`], which is exposed on all currently supported\nplatforms. Unix-specific functionality, such as mode bits, is available\nthrough the [`PermissionsExt`] trait.\n\n[`PermissionsExt`]: crate::os::unix::fs::PermissionsExt",
- "id": 2444,
+ "id": 2442,
"inner": {
"struct": {
"generics": {
@@ -244891,7 +263407,7 @@
},
"visibility": "public"
},
- "2445": {
+ "2443": {
"attrs": [
{
"other": "#[doc(alias = \"futimens\")]"
@@ -244909,7 +263425,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Changes the timestamps of the underlying file.\n\n# Platform-specific behavior\n\nThis function currently corresponds to the `futimens` function on Unix (falling back to\n`futimes` on macOS before 10.13) and the `SetFileTime` function on Windows. Note that this\n[may change in the future][changes].\n\nOn most platforms, including UNIX and Windows platforms, this function can also change the\ntimestamps of a directory. To get a `File` representing a directory in order to call\n`set_times`, open the directory with `File::open` without attempting to obtain write\npermission.\n\n[changes]: io#platform-specific-behavior\n\n# Errors\n\nThis function will return an error if the user lacks permission to change timestamps on the\nunderlying file. It may also return an error in other os-specific unspecified cases.\n\nThis function may return an error if the operating system lacks support to change one or\nmore of the timestamps set in the `FileTimes` structure.\n\n# Examples\n\n```no_run\nfn main() -> std::io::Result<()> {\n use std::fs::{self, File, FileTimes};\n\n let src = fs::metadata(\"src\")?;\n let dest = File::open(\"dest\")?;\n let times = FileTimes::new()\n .set_accessed(src.accessed()?)\n .set_modified(src.modified()?);\n dest.set_times(times)?;\n Ok(())\n}\n```",
- "id": 2445,
+ "id": 2443,
"inner": {
"function": {
"generics": {
@@ -244942,7 +263458,7 @@
{
"resolved_path": {
"args": null,
- "id": 2446,
+ "id": 2444,
"path": "FileTimes"
}
}
@@ -244963,7 +263479,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -244971,23 +263487,23 @@
}
},
"links": {
- "io#platform-specific-behavior": 501
+ "io#platform-specific-behavior": 502
},
"name": "set_times",
"span": {
"begin": [
- 1148,
+ 1229,
5
],
"end": [
- 1150,
+ 1231,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "public"
},
- "2446": {
+ "2444": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 75, patch: 0})}, feature: \"file_set_times\"}}]"
@@ -244996,7 +263512,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Representation of the various timestamps on a file.",
- "id": 2446,
+ "id": 2444,
"inner": {
"struct": {
"generics": {
@@ -245049,7 +263565,7 @@
},
"visibility": "public"
},
- "2447": {
+ "2445": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 75, patch: 0})}, feature: \"file_set_times\"}}]"
@@ -245061,7 +263577,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Changes the modification time of the underlying file.\n\nThis is an alias for `set_times(FileTimes::new().set_modified(time))`.",
- "id": 2447,
+ "id": 2445,
"inner": {
"function": {
"generics": {
@@ -245094,7 +263610,7 @@
{
"resolved_path": {
"args": null,
- "id": 2448,
+ "id": 2446,
"path": "SystemTime"
}
}
@@ -245115,7 +263631,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -245126,18 +263642,18 @@
"name": "set_modified",
"span": {
"begin": [
- 1157,
+ 1238,
5
],
"end": [
- 1159,
+ 1240,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "public"
},
- "2448": {
+ "2446": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 8, patch: 0})}, feature: \"time2\"}}]"
@@ -245146,7 +263662,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "A measurement of the system clock, useful for talking to\nexternal entities like the file system or other processes.\n\nDistinct from the [`Instant`] type, this time measurement **is not\nmonotonic**. This means that you can save a file to the file system, then\nsave another file to the file system, **and the second file has a\n`SystemTime` measurement earlier than the first**. In other words, an\noperation that happens after another operation in real time may have an\nearlier `SystemTime`!\n\nConsequently, comparing two `SystemTime` instances to learn about the\nduration between them returns a [`Result`] instead of an infallible [`Duration`]\nto indicate that this sort of time drift may happen and needs to be handled.\n\nAlthough a `SystemTime` cannot be directly inspected, the [`UNIX_EPOCH`]\nconstant is provided in this module as an anchor in time to learn\ninformation about a `SystemTime`. By calculating the duration from this\nfixed point in time, a `SystemTime` can be converted to a human-readable time,\nor perhaps some other string representation.\n\nThe size of a `SystemTime` struct may vary depending on the target operating\nsystem.\n\nA `SystemTime` does not count leap seconds.\n`SystemTime::now()`'s behavior around a leap second\nis the same as the operating system's wall clock.\nThe precise behavior near a leap second\n(e.g. whether the clock appears to run slow or fast, or stop, or jump)\ndepends on platform and configuration,\nso should not be relied on.\n\nExample:\n\n```no_run\nuse std::time::{Duration, SystemTime};\nuse std::thread::sleep;\n\nfn main() {\n let now = SystemTime::now();\n\n // we sleep for 2 seconds\n sleep(Duration::new(2, 0));\n match now.elapsed() {\n Ok(elapsed) => {\n // it prints '2'\n println!(\"{}\", elapsed.as_secs());\n }\n Err(e) => {\n // the system clock went backwards!\n println!(\"Great Scott! {e:?}\");\n }\n }\n}\n```\n\n# Platform-specific behavior\n\nThe precision of `SystemTime` can depend on the underlying OS-specific time format.\nFor example, on Windows the time is represented in 100 nanosecond intervals whereas Linux\ncan represent nanosecond intervals.\n\nThe following system calls are [currently] being used by `now()` to find out\nthe current time:\n\n| Platform | System call |\n|-----------|----------------------------------------------------------------------|\n| SGX | [`insecure_time` usercall]. More information on [timekeeping in SGX] |\n| UNIX | [clock_gettime (Realtime Clock)] |\n| Darwin | [clock_gettime (Realtime Clock)] |\n| VXWorks | [clock_gettime (Realtime Clock)] |\n| SOLID | `SOLID_RTC_ReadTime` |\n| WASI | [__wasi_clock_time_get (Realtime Clock)] |\n| Windows | [GetSystemTimePreciseAsFileTime] / [GetSystemTimeAsFileTime] |\n\n[currently]: crate::io#platform-specific-behavior\n[`insecure_time` usercall]: https://edp.fortanix.com/docs/api/fortanix_sgx_abi/struct.Usercalls.html#method.insecure_time\n[timekeeping in SGX]: https://edp.fortanix.com/docs/concepts/rust-std/#codestdtimecode\n[clock_gettime (Realtime Clock)]: https://linux.die.net/man/3/clock_gettime\n[__wasi_clock_time_get (Realtime Clock)]: https://github.com/WebAssembly/WASI/blob/main/legacy/preview1/docs.md#clock_time_get\n[GetSystemTimePreciseAsFileTime]: https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getsystemtimepreciseasfiletime\n[GetSystemTimeAsFileTime]: https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getsystemtimeasfiletime\n\n**Disclaimer:** These system calls might change over time.\n\n> Note: mathematical operations like [`add`] may panic if the underlying\n> structure cannot represent the new point in time.\n\n[`add`]: SystemTime::add\n[`UNIX_EPOCH`]: SystemTime::UNIX_EPOCH",
- "id": 2448,
+ "id": 2446,
"inner": {
"struct": {
"generics": {
@@ -245154,35 +263670,35 @@
"where_predicates": []
},
"impls": [
- 8558,
- 8559,
- 8560,
- 8561,
- 8562,
- 8563,
- 8564,
- 8565,
- 8566,
- 8567,
- 8568,
- 8569,
- 8570,
- 8571,
- 8572,
- 8573,
- 8574,
- 8576,
- 8577,
- 8579,
- 8580,
- 8582,
- 8584,
- 8586,
- 8588,
- 8590,
- 8593,
- 8595,
- 8597
+ 8783,
+ 8784,
+ 8785,
+ 8786,
+ 8787,
+ 8788,
+ 8789,
+ 8790,
+ 8791,
+ 8792,
+ 8793,
+ 8794,
+ 8795,
+ 8796,
+ 8797,
+ 8798,
+ 8799,
+ 8801,
+ 8802,
+ 8804,
+ 8805,
+ 8807,
+ 8809,
+ 8811,
+ 8813,
+ 8815,
+ 8818,
+ 8820,
+ 8822
],
"kind": {
"tuple": [
@@ -245192,12 +263708,12 @@
}
},
"links": {
- "SystemTime::UNIX_EPOCH": 8550,
- "SystemTime::add": 8551,
- "`Duration`": 500,
- "`Instant`": 503,
+ "SystemTime::UNIX_EPOCH": 8775,
+ "SystemTime::add": 8776,
+ "`Duration`": 501,
+ "`Instant`": 504,
"`Result`": 57,
- "crate::io#platform-specific-behavior": 501
+ "crate::io#platform-specific-behavior": 502
},
"name": "SystemTime",
"span": {
@@ -245213,19 +263729,19 @@
},
"visibility": "public"
},
- "2449": {
+ "2447": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2449,
+ "id": 2447,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
},
@@ -245237,25 +263753,25 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 2415,
2417,
2419,
- 2421,
- 2422,
+ 2420,
+ 2423,
2425,
+ 2406,
2427,
- 2408,
- 2429,
+ 2428,
2430,
- 2432,
+ 2429,
2431,
- 2433,
- 2434,
- 2439,
+ 2432,
+ 2437,
+ 2438,
2440,
- 2442,
+ 2441,
2443,
- 2445,
- 2447
+ 2445
],
"provided_trait_methods": [],
"trait": null
@@ -245265,66 +263781,30 @@
"name": null,
"span": {
"begin": [
- 424,
+ 505,
1
],
"end": [
- 1160,
+ 1241,
2
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "245": {
- "attrs": [
- {
- "other": "#[allow(deprecated, deprecated_in_future)]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 245,
- "inner": {
- "use": {
- "id": 246,
- "is_glob": false,
- "name": "MAX",
- "source": "core::f32::MAX"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 18,
- 49
- ],
- "end": [
- 18,
- 52
- ],
- "filename": "std/src/num/f32.rs"
- },
- "visibility": "public"
- },
- "2450": {
+ "2448": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2450,
+ "id": 2448,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
},
@@ -245349,19 +263829,19 @@
"span": null,
"visibility": "default"
},
- "2451": {
+ "2449": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2451,
+ "id": 2449,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
},
@@ -245386,19 +263866,55 @@
"span": null,
"visibility": "default"
},
- "2452": {
+ "245": {
+ "attrs": [
+ {
+ "other": "#[allow(deprecated, deprecated_in_future)]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 245,
+ "inner": {
+ "use": {
+ "id": 246,
+ "is_glob": false,
+ "name": "MAX_10_EXP",
+ "source": "core::f32::MAX_10_EXP"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 18,
+ 54
+ ],
+ "end": [
+ 18,
+ 64
+ ],
+ "filename": "std/src/num/f32.rs"
+ },
+ "visibility": "public"
+ },
+ "2450": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2452,
+ "id": 2450,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
},
@@ -245413,7 +263929,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -245423,19 +263939,19 @@
"span": null,
"visibility": "default"
},
- "2453": {
+ "2451": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2453,
+ "id": 2451,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
},
@@ -245460,19 +263976,19 @@
"span": null,
"visibility": "default"
},
- "2454": {
+ "2452": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2454,
+ "id": 2452,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
},
@@ -245487,7 +264003,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -245497,19 +264013,19 @@
"span": null,
"visibility": "default"
},
- "2455": {
+ "2453": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2455,
+ "id": 2453,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
},
@@ -245524,7 +264040,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -245534,12 +264050,12 @@
"span": null,
"visibility": "default"
},
- "2456": {
+ "2454": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2456,
+ "id": 2454,
"inner": {
"impl": {
"blanket_impl": {
@@ -245548,7 +264064,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
},
@@ -245593,7 +264109,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -245609,7 +264125,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -245618,23 +264134,23 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "2457": {
+ "2455": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2457,
+ "id": 2455,
"inner": {
"impl": {
"blanket_impl": {
@@ -245643,7 +264159,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
},
@@ -245688,7 +264204,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -245704,7 +264220,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -245713,23 +264229,23 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
"visibility": "default"
},
- "2458": {
+ "2456": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2458,
+ "id": 2456,
"inner": {
"impl": {
"blanket_impl": {
@@ -245738,7 +264254,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
},
@@ -245804,7 +264320,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -245829,23 +264345,23 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "2459": {
+ "2457": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2459,
+ "id": 2457,
"inner": {
"impl": {
"blanket_impl": {
@@ -245854,7 +264370,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
},
@@ -245877,7 +264393,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -245902,23 +264418,23 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "2460": {
+ "2458": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2460,
+ "id": 2458,
"inner": {
"impl": {
"blanket_impl": {
@@ -245927,7 +264443,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
},
@@ -245975,7 +264491,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -245993,8 +264509,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -246010,7 +264526,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -246019,23 +264535,23 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "2461": {
+ "2459": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2461,
+ "id": 2459,
"inner": {
"impl": {
"blanket_impl": {
@@ -246044,7 +264560,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
},
@@ -246110,8 +264626,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -246127,7 +264643,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -246136,23 +264652,23 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
},
"visibility": "default"
},
- "2462": {
+ "2460": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2462,
+ "id": 2460,
"inner": {
"impl": {
"blanket_impl": {
@@ -246161,7 +264677,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
},
@@ -246209,12 +264725,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -246234,12 +264750,12 @@
},
"visibility": "default"
},
- "2463": {
+ "2461": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2463,
+ "id": 2461,
"inner": {
"function": {
"generics": {
@@ -246285,7 +264801,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -246297,7 +264813,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -246308,18 +264824,18 @@
"name": "fmt",
"span": {
"begin": [
- 1187,
+ 1268,
5
],
"end": [
- 1189,
+ 1270,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2464": {
+ "2462": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -246328,14 +264844,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2464,
+ "id": 2462,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
},
@@ -246347,12 +264863,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2463
+ 2461
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -246361,18 +264877,18 @@
"name": null,
"span": {
"begin": [
- 1186,
+ 1267,
1
],
"end": [
- 1190,
+ 1271,
2
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2465": {
+ "2463": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -246381,7 +264897,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Reads some bytes from the file.\n\nSee [`Read::read`] docs for more info.\n\n# Platform-specific behavior\n\nThis function currently corresponds to the `read` function on Unix and\nthe `NtReadFile` function on Windows. Note that this [may change in\nthe future][changes].\n\n[changes]: io#platform-specific-behavior",
- "id": 2465,
+ "id": 2463,
"inner": {
"function": {
"generics": {
@@ -246439,7 +264955,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -246447,24 +264963,24 @@
}
},
"links": {
- "`Read::read`": 2435,
- "io#platform-specific-behavior": 501
+ "`Read::read`": 2433,
+ "io#platform-specific-behavior": 502
},
"name": "read",
"span": {
"begin": [
- 1215,
+ 1296,
5
],
"end": [
- 1217,
+ 1298,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2466": {
+ "2464": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 36, patch: 0})}, feature: \"iovec\"}}]"
@@ -246473,7 +264989,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Like `read`, except that it reads into a slice of buffers.\n\nData is copied to fill each buffer in order, with the final buffer\nwritten to possibly being only partially filled. This method must\nbehave equivalently to a single call to `read` with concatenated\nbuffers.\n\nThe default implementation calls `read` with either the first nonempty\nbuffer provided, or an empty one if none exists.",
- "id": 2466,
+ "id": 2464,
"inner": {
"function": {
"generics": {
@@ -246520,7 +265036,7 @@
"constraints": []
}
},
- "id": 2468,
+ "id": 2466,
"path": "IoSliceMut"
}
}
@@ -246544,7 +265060,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "Result"
}
}
@@ -246566,7 +265082,7 @@
},
"visibility": "default"
},
- "2467": {
+ "2465": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -246575,7 +265091,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Like `read`, except that it reads into a slice of buffers.\n\nSee [`Read::read_vectored`] docs for more info.\n\n# Platform-specific behavior\n\nThis function currently corresponds to the `readv` function on Unix and\nfalls back to the `read` implementation on Windows. Note that this\n[may change in the future][changes].\n\n[changes]: io#platform-specific-behavior",
- "id": 2467,
+ "id": 2465,
"inner": {
"function": {
"generics": {
@@ -246622,7 +265138,7 @@
"constraints": []
}
},
- "id": 2468,
+ "id": 2466,
"path": "IoSliceMut"
}
}
@@ -246646,7 +265162,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -246654,24 +265170,24 @@
}
},
"links": {
- "`Read::read_vectored`": 2466,
- "io#platform-specific-behavior": 501
+ "`Read::read_vectored`": 2464,
+ "io#platform-specific-behavior": 502
},
"name": "read_vectored",
"span": {
"begin": [
- 1231,
+ 1312,
5
],
"end": [
- 1233,
+ 1314,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2468": {
+ "2466": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 36, patch: 0})}, feature: \"iovec\"}}]"
@@ -246688,7 +265204,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "A buffer type used with `Read::read_vectored`.\n\nIt is semantically a wrapper around a `&mut [u8]`, but is guaranteed to be\nABI compatible with the `iovec` type on Unix platforms and `WSABUF` on\nWindows.",
- "id": 2468,
+ "id": 2466,
"inner": {
"struct": {
"generics": {
@@ -246705,6 +265221,7 @@
"where_predicates": []
},
"impls": [
+ 4091,
4092,
4093,
4094,
@@ -246719,10 +265236,9 @@
4103,
4104,
4105,
- 4106,
- 4108,
- 4111,
- 4113
+ 4107,
+ 4110,
+ 4112
],
"kind": {
"tuple": [
@@ -246746,7 +265262,7 @@
},
"visibility": "public"
},
- "2469": {
+ "2467": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -246755,7 +265271,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2469,
+ "id": 2467,
"inner": {
"function": {
"generics": {
@@ -246797,7 +265313,7 @@
"constraints": []
}
},
- "id": 2470,
+ "id": 2468,
"path": "BorrowedCursor"
}
}
@@ -246818,7 +265334,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -246829,54 +265345,18 @@
"name": "read_buf",
"span": {
"begin": [
- 1236,
+ 1317,
5
],
"end": [
- 1238,
+ 1319,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "247": {
- "attrs": [
- {
- "other": "#[allow(deprecated, deprecated_in_future)]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 247,
- "inner": {
- "use": {
- "id": 248,
- "is_glob": false,
- "name": "MAX_10_EXP",
- "source": "core::f32::MAX_10_EXP"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 18,
- 54
- ],
- "end": [
- 18,
- 64
- ],
- "filename": "std/src/num/f32.rs"
- },
- "visibility": "public"
- },
- "2471": {
+ "2469": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 69941, is_soft: false}, feature: \"can_vector\"}}]"
@@ -246885,7 +265365,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Determines if this `Read`er has an efficient `read_vectored`\nimplementation.\n\nIf a `Read`er does not override the default `read_vectored`\nimplementation, code using it may want to avoid the method all together\nand coalesce writes into a single buffer for higher performance.\n\nThe default implementation returns `false`.",
- "id": 2471,
+ "id": 2469,
"inner": {
"function": {
"generics": {
@@ -246936,7 +265416,43 @@
},
"visibility": "default"
},
- "2472": {
+ "247": {
+ "attrs": [
+ {
+ "other": "#[allow(deprecated, deprecated_in_future)]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 247,
+ "inner": {
+ "use": {
+ "id": 248,
+ "is_glob": false,
+ "name": "MAX_EXP",
+ "source": "core::f32::MAX_EXP"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 18,
+ 66
+ ],
+ "end": [
+ 18,
+ 73
+ ],
+ "filename": "std/src/num/f32.rs"
+ },
+ "visibility": "public"
+ },
+ "2470": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -246945,7 +265461,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Determines if `File` has an efficient `read_vectored` implementation.\n\nSee [`Read::is_read_vectored`] docs for more info.\n\n# Platform-specific behavior\n\nThis function currently returns `true` on Unix an `false` on Windows.\nNote that this [may change in the future][changes].\n\n[changes]: io#platform-specific-behavior",
- "id": 2472,
+ "id": 2470,
"inner": {
"function": {
"generics": {
@@ -246982,29 +265498,29 @@
}
},
"links": {
- "`Read::is_read_vectored`": 2471,
- "io#platform-specific-behavior": 501
+ "`Read::is_read_vectored`": 2469,
+ "io#platform-specific-behavior": 502
},
"name": "is_read_vectored",
"span": {
"begin": [
- 1251,
+ 1332,
5
],
"end": [
- 1253,
+ 1334,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2473": {
+ "2471": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2473,
+ "id": 2471,
"inner": {
"function": {
"generics": {
@@ -247052,7 +265568,7 @@
"constraints": []
}
},
- "id": 165,
+ "id": 163,
"path": "Vec"
}
}
@@ -247075,7 +265591,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -247086,23 +265602,23 @@
"name": "read_to_end",
"span": {
"begin": [
- 1256,
+ 1337,
5
],
"end": [
- 1260,
+ 1341,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2474": {
+ "2472": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2474,
+ "id": 2472,
"inner": {
"function": {
"generics": {
@@ -247139,7 +265655,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 161,
+ "id": 159,
"path": "String"
}
}
@@ -247162,7 +265678,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -247173,18 +265689,18 @@
"name": "read_to_string",
"span": {
"begin": [
- 1263,
+ 1344,
5
],
"end": [
- 1267,
+ 1348,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2475": {
+ "2473": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -247193,7 +265709,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2475,
+ "id": 2473,
"inner": {
"impl": {
"blanket_impl": null,
@@ -247204,7 +265720,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
}
@@ -247218,12 +265734,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 2463,
2465,
2467,
- 2469,
- 2472,
- 2473,
- 2474
+ 2470,
+ 2471,
+ 2472
],
"provided_trait_methods": [
"read_vectored",
@@ -247240,7 +265756,7 @@
],
"trait": {
"args": null,
- "id": 2476,
+ "id": 2474,
"path": "Read"
}
}
@@ -247249,18 +265765,18 @@
"name": null,
"span": {
"begin": [
- 1202,
+ 1283,
1
],
"end": [
- 1268,
+ 1349,
2
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2476": {
+ "2474": {
"attrs": [
{
"other": "#[doc(notable_trait)]"
@@ -247278,7 +265794,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "The `Read` trait allows for reading bytes from a source.\n\nImplementors of the `Read` trait are called 'readers'.\n\nReaders are defined by one required method, [`read()`]. Each call to [`read()`]\nwill attempt to pull bytes from this source into a provided buffer. A\nnumber of other methods are implemented in terms of [`read()`], giving\nimplementors a number of ways to read bytes while only needing to implement\na single method.\n\nReaders are intended to be composable with one another. Many implementors\nthroughout [`std::io`] take and provide types which implement the `Read`\ntrait.\n\nPlease note that each call to [`read()`] may involve a system call, and\ntherefore, using something that implements [`BufRead`], such as\n[`BufReader`], will be more efficient.\n\nRepeated calls to the reader use the same cursor, so for example\ncalling `read_to_end` twice on a [`File`] will only return the file's\ncontents once. It's recommended to first call `rewind()` in that case.\n\n# Examples\n\n[`File`]s implement `Read`:\n\n```no_run\nuse std::io;\nuse std::io::prelude::*;\nuse std::fs::File;\n\nfn main() -> io::Result<()> {\n let mut f = File::open(\"foo.txt\")?;\n let mut buffer = [0; 10];\n\n // read up to 10 bytes\n f.read(&mut buffer)?;\n\n let mut buffer = Vec::new();\n // read the whole file\n f.read_to_end(&mut buffer)?;\n\n // read into a String, so that you don't need to do the conversion.\n let mut buffer = String::new();\n f.read_to_string(&mut buffer)?;\n\n // and more! See the other methods for more details.\n Ok(())\n}\n```\n\nRead from [`&str`] because [`&[u8]`][prim@slice] implements `Read`:\n\n```no_run\n# use std::io;\nuse std::io::prelude::*;\n\nfn main() -> io::Result<()> {\n let mut b = \"This string will be read\".as_bytes();\n let mut buffer = [0; 10];\n\n // read up to 10 bytes\n b.read(&mut buffer)?;\n\n // etc... it works exactly as a File does!\n Ok(())\n}\n```\n\n[`read()`]: Read::read\n[`&str`]: prim@str\n[`std::io`]: self\n[`File`]: crate::fs::File",
- "id": 2476,
+ "id": 2474,
"inner": {
"trait": {
"bounds": [],
@@ -247287,58 +265803,58 @@
"where_predicates": []
},
"implementations": [
- 2475,
- 2499,
- 4006,
- 3084,
+ 2473,
+ 2497,
+ 4005,
+ 3086,
3282,
- 4015,
- 4024,
- 4033,
- 4041,
- 3462,
- 3468,
- 3589,
- 3598,
- 3631,
- 3856,
- 3908,
- 4047,
- 4050,
- 4054,
- 4059,
- 4064,
- 4070,
- 4076,
- 4083
+ 4014,
+ 4023,
+ 4032,
+ 4040,
+ 3461,
+ 3467,
+ 3588,
+ 3597,
+ 3630,
+ 3855,
+ 3907,
+ 4046,
+ 4049,
+ 4053,
+ 4058,
+ 4063,
+ 4069,
+ 4075,
+ 4082
],
"is_auto": false,
"is_dyn_compatible": true,
"is_unsafe": false,
"items": [
- 2435,
- 2466,
- 2471,
+ 2433,
+ 2464,
+ 2469,
2957,
2959,
+ 3987,
3988,
3989,
3990,
- 3991,
- 3993,
- 3995,
- 3997
+ 3992,
+ 3994,
+ 3996
]
}
},
"links": {
- "Read::read": 2435,
- "`BufRead`": 2418,
- "`BufReader`": 2409,
- "crate::fs::File": 2413,
- "prim@slice": 3999,
- "prim@str": 1928,
- "self": 501
+ "Read::read": 2433,
+ "`BufRead`": 2416,
+ "`BufReader`": 2407,
+ "crate::fs::File": 2411,
+ "prim@slice": 3998,
+ "prim@str": 1926,
+ "self": 502
},
"name": "Read",
"span": {
@@ -247354,12 +265870,12 @@
},
"visibility": "public"
},
- "2477": {
+ "2475": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": "Writes some bytes to the file.\n\nSee [`Write::write`] docs for more info.\n\n# Platform-specific behavior\n\nThis function currently corresponds to the `write` function on Unix and\nthe `NtWriteFile` function on Windows. Note that this [may change in\nthe future][changes].\n\n[changes]: io#platform-specific-behavior",
- "id": 2477,
+ "id": 2475,
"inner": {
"function": {
"generics": {
@@ -247417,7 +265933,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -247425,24 +265941,24 @@
}
},
"links": {
- "`Write::write`": 2436,
- "io#platform-specific-behavior": 501
+ "`Write::write`": 2434,
+ "io#platform-specific-behavior": 502
},
"name": "write",
"span": {
"begin": [
- 1282,
+ 1363,
5
],
"end": [
- 1284,
+ 1365,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2478": {
+ "2476": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 36, patch: 0})}, feature: \"iovec\"}}]"
@@ -247451,7 +265967,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Like [`write`], except that it writes from a slice of buffers.\n\nData is copied from each buffer in order, with the final buffer\nread from possibly being only partially consumed. This method must\nbehave as a call to [`write`] with the buffers concatenated would.\n\nThe default implementation calls [`write`] with either the first nonempty\nbuffer provided, or an empty one if none exists.\n\n# Examples\n\n```no_run\nuse std::io::IoSlice;\nuse std::io::prelude::*;\nuse std::fs::File;\n\nfn main() -> std::io::Result<()> {\n let data1 = [1; 8];\n let data2 = [15; 8];\n let io_slice1 = IoSlice::new(&data1);\n let io_slice2 = IoSlice::new(&data2);\n\n let mut buffer = File::create(\"foo.txt\")?;\n\n // Writes some prefix of the byte string, not necessarily all of it.\n buffer.write_vectored(&[io_slice1, io_slice2])?;\n Ok(())\n}\n```\n\n[`write`]: Write::write",
- "id": 2478,
+ "id": 2476,
"inner": {
"function": {
"generics": {
@@ -247498,7 +266014,7 @@
"constraints": []
}
},
- "id": 2480,
+ "id": 2478,
"path": "IoSlice"
}
}
@@ -247522,7 +266038,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "Result"
}
}
@@ -247530,7 +266046,7 @@
}
},
"links": {
- "Write::write": 2436
+ "Write::write": 2434
},
"name": "write_vectored",
"span": {
@@ -247546,12 +266062,12 @@
},
"visibility": "default"
},
- "2479": {
+ "2477": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": "Like `write`, except that it writes into a slice of buffers.\n\nSee [`Write::write_vectored`] docs for more info.\n\n# Platform-specific behavior\n\nThis function currently corresponds to the `writev` function on Unix\nand falls back to the `write` implementation on Windows. Note that this\n[may change in the future][changes].\n\n[changes]: io#platform-specific-behavior",
- "id": 2479,
+ "id": 2477,
"inner": {
"function": {
"generics": {
@@ -247598,7 +266114,7 @@
"constraints": []
}
},
- "id": 2480,
+ "id": 2478,
"path": "IoSlice"
}
}
@@ -247622,7 +266138,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -247630,24 +266146,24 @@
}
},
"links": {
- "`Write::write_vectored`": 2478,
- "io#platform-specific-behavior": 501
+ "`Write::write_vectored`": 2476,
+ "io#platform-specific-behavior": 502
},
"name": "write_vectored",
"span": {
"begin": [
- 1297,
+ 1378,
5
],
"end": [
- 1299,
+ 1380,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2480": {
+ "2478": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 36, patch: 0})}, feature: \"iovec\"}}]"
@@ -247664,7 +266180,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "A buffer type used with `Write::write_vectored`.\n\nIt is semantically a wrapper around a `&[u8]`, but is guaranteed to be\nABI compatible with the `iovec` type on Unix platforms and `WSABUF` on\nWindows.",
- "id": 2480,
+ "id": 2478,
"inner": {
"struct": {
"generics": {
@@ -247681,6 +266197,7 @@
"where_predicates": []
},
"impls": [
+ 4118,
4119,
4120,
4121,
@@ -247696,12 +266213,11 @@
4131,
4132,
4133,
- 4134,
+ 4135,
4136,
4137,
- 4138,
- 4140,
- 4143
+ 4139,
+ 4142
],
"kind": {
"tuple": [
@@ -247725,7 +266241,7 @@
},
"visibility": "public"
},
- "2481": {
+ "2479": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 69941, is_soft: false}, feature: \"can_vector\"}}]"
@@ -247734,7 +266250,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Determines if this `Write`r has an efficient [`write_vectored`]\nimplementation.\n\nIf a `Write`r does not override the default [`write_vectored`]\nimplementation, code using it may want to avoid the method all together\nand coalesce writes into a single buffer for higher performance.\n\nThe default implementation returns `false`.\n\n[`write_vectored`]: Write::write_vectored",
- "id": 2481,
+ "id": 2479,
"inner": {
"function": {
"generics": {
@@ -247771,7 +266287,7 @@
}
},
"links": {
- "Write::write_vectored": 2478
+ "Write::write_vectored": 2476
},
"name": "is_write_vectored",
"span": {
@@ -247787,7 +266303,7 @@
},
"visibility": "default"
},
- "2482": {
+ "2480": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -247796,7 +266312,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Determines if `File` has an efficient `write_vectored` implementation.\n\nSee [`Write::is_write_vectored`] docs for more info.\n\n# Platform-specific behavior\n\nThis function currently returns `true` on Unix an `false` on Windows.\nNote that this [may change in the future][changes].\n\n[changes]: io#platform-specific-behavior",
- "id": 2482,
+ "id": 2480,
"inner": {
"function": {
"generics": {
@@ -247833,24 +266349,24 @@
}
},
"links": {
- "`Write::is_write_vectored`": 2481,
- "io#platform-specific-behavior": 501
+ "`Write::is_write_vectored`": 2479,
+ "io#platform-specific-behavior": 502
},
"name": "is_write_vectored",
"span": {
"begin": [
- 1312,
+ 1393,
5
],
"end": [
- 1314,
+ 1395,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2483": {
+ "2481": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -247859,7 +266375,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Flushes this output stream, ensuring that all intermediately buffered\ncontents reach their destination.\n\n# Errors\n\nIt is considered an error if not all bytes could be written due to\nI/O errors or EOF being reached.\n\n# Examples\n\n```no_run\nuse std::io::prelude::*;\nuse std::io::BufWriter;\nuse std::fs::File;\n\nfn main() -> std::io::Result<()> {\n let mut buffer = BufWriter::new(File::create(\"foo.txt\")?);\n\n buffer.write_all(b\"some bytes\")?;\n buffer.flush()?;\n Ok(())\n}\n```",
- "id": 2483,
+ "id": 2481,
"inner": {
"function": {
"generics": {
@@ -247903,7 +266419,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "Result"
}
}
@@ -247925,7 +266441,7 @@
},
"visibility": "default"
},
- "2484": {
+ "2482": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -247934,7 +266450,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Flushes the file, ensuring that all intermediately buffered contents\nreach their destination.\n\nSee [`Write::flush`] docs for more info.\n\n# Platform-specific behavior\n\nSince a `File` structure doesn't contain any buffers, this function is\ncurrently a no-op on Unix and Windows. Note that this [may change in\nthe future][changes].\n\n[changes]: io#platform-specific-behavior",
- "id": 2484,
+ "id": 2482,
"inner": {
"function": {
"generics": {
@@ -247978,7 +266494,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -247986,24 +266502,24 @@
}
},
"links": {
- "`Write::flush`": 2483,
- "io#platform-specific-behavior": 501
+ "`Write::flush`": 2481,
+ "io#platform-specific-behavior": 502
},
"name": "flush",
"span": {
"begin": [
- 1329,
+ 1410,
5
],
"end": [
- 1331,
+ 1412,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2485": {
+ "2483": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -248012,7 +266528,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2485,
+ "id": 2483,
"inner": {
"impl": {
"blanket_impl": null,
@@ -248023,7 +266539,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
}
@@ -248037,10 +266553,10 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 2475,
2477,
- 2479,
- 2482,
- 2484
+ 2480,
+ 2482
],
"provided_trait_methods": [
"write_vectored",
@@ -248052,7 +266568,7 @@
],
"trait": {
"args": null,
- "id": 2486,
+ "id": 2484,
"path": "Write"
}
}
@@ -248061,18 +266577,18 @@
"name": null,
"span": {
"begin": [
- 1270,
+ 1351,
1
],
"end": [
- 1332,
+ 1413,
2
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2486": {
+ "2484": {
"attrs": [
{
"other": "#[doc(notable_trait)]"
@@ -248090,7 +266606,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "A trait for objects which are byte-oriented sinks.\n\nImplementors of the `Write` trait are sometimes called 'writers'.\n\nWriters are defined by two required methods, [`write`] and [`flush`]:\n\n* The [`write`] method will attempt to write some data into the object,\n returning how many bytes were successfully written.\n\n* The [`flush`] method is useful for adapters and explicit buffers\n themselves for ensuring that all buffered data has been pushed out to the\n 'true sink'.\n\nWriters are intended to be composable with one another. Many implementors\nthroughout [`std::io`] take and provide types which implement the `Write`\ntrait.\n\n[`write`]: Write::write\n[`flush`]: Write::flush\n[`std::io`]: self\n\n# Examples\n\n```no_run\nuse std::io::prelude::*;\nuse std::fs::File;\n\nfn main() -> std::io::Result<()> {\n let data = b\"some bytes\";\n\n let mut pos = 0;\n let mut buffer = File::create(\"foo.txt\")?;\n\n while pos < data.len() {\n let bytes_written = buffer.write(&data[pos..])?;\n pos += bytes_written;\n }\n Ok(())\n}\n```\n\nThe trait also provides convenience methods like [`write_all`], which calls\n`write` in a loop until its entire input has been written.\n\n[`write_all`]: Write::write_all",
- "id": 2486,
+ "id": 2484,
"inner": {
"trait": {
"bounds": [],
@@ -248099,61 +266615,61 @@
"where_predicates": []
},
"implementations": [
- 2485,
- 2503,
- 4152,
- 3129,
- 3190,
+ 2483,
+ 2501,
+ 4151,
+ 3131,
+ 3191,
3292,
3299,
3307,
3314,
3321,
- 4160,
- 4168,
- 4175,
- 4182,
- 4189,
- 4196,
- 3517,
- 3522,
- 3677,
- 3685,
- 3718,
- 3759,
- 3767,
- 3800,
- 3875,
- 3883,
- 3942,
- 3950,
- 4200,
- 4205,
- 4210,
- 4215,
- 4220,
- 4226
+ 4159,
+ 4167,
+ 4174,
+ 4181,
+ 4188,
+ 4195,
+ 3516,
+ 3521,
+ 3676,
+ 3684,
+ 3717,
+ 3758,
+ 3766,
+ 3799,
+ 3874,
+ 3882,
+ 3941,
+ 3949,
+ 4199,
+ 4204,
+ 4209,
+ 4214,
+ 4219,
+ 4225
],
"is_auto": false,
"is_dyn_compatible": true,
"is_unsafe": false,
"items": [
- 2436,
- 2478,
+ 2434,
+ 2476,
+ 2479,
2481,
- 2483,
2960,
- 4144,
- 4146,
- 4147
+ 4143,
+ 4145,
+ 4146
]
}
},
"links": {
- "Write::flush": 2483,
- "Write::write": 2436,
+ "Write::flush": 2481,
+ "Write::write": 2434,
"Write::write_all": 2960,
- "self": 501
+ "self": 502
},
"name": "Write",
"span": {
@@ -248169,7 +266685,7 @@
},
"visibility": "public"
},
- "2487": {
+ "2485": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -248178,7 +266694,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Seek to an offset, in bytes, in a stream.\n\nA seek beyond the end of a stream is allowed, but behavior is defined\nby the implementation.\n\nIf the seek operation completed successfully,\nthis method returns the new position from the start of the stream.\nThat position can be used later with [`SeekFrom::Start`].\n\n# Errors\n\nSeeking can fail, for example because it might involve flushing a buffer.\n\nSeeking to a negative offset is considered an error.",
- "id": 2487,
+ "id": 2485,
"inner": {
"function": {
"generics": {
@@ -248211,7 +266727,7 @@
{
"resolved_path": {
"args": null,
- "id": 2489,
+ "id": 2487,
"path": "SeekFrom"
}
}
@@ -248232,7 +266748,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "Result"
}
}
@@ -248240,7 +266756,7 @@
}
},
"links": {
- "`SeekFrom::Start`": 4227
+ "`SeekFrom::Start`": 4226
},
"name": "seek",
"span": {
@@ -248256,12 +266772,12 @@
},
"visibility": "default"
},
- "2488": {
+ "2486": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": "Seek to an offset, in bytes in a file.\n\nSee [`Seek::seek`] docs for more info.\n\n# Platform-specific behavior\n\nThis function currently corresponds to the `lseek64` function on Unix\nand the `SetFilePointerEx` function on Windows. Note that this [may\nchange in the future][changes].\n\n[changes]: io#platform-specific-behavior",
- "id": 2488,
+ "id": 2486,
"inner": {
"function": {
"generics": {
@@ -248294,7 +266810,7 @@
{
"resolved_path": {
"args": null,
- "id": 2489,
+ "id": 2487,
"path": "SeekFrom"
}
}
@@ -248315,7 +266831,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -248323,24 +266839,24 @@
}
},
"links": {
- "`Seek::seek`": 2487,
- "io#platform-specific-behavior": 501
+ "`Seek::seek`": 2485,
+ "io#platform-specific-behavior": 502
},
"name": "seek",
"span": {
"begin": [
- 1346,
+ 1427,
5
],
"end": [
- 1348,
+ 1429,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2489": {
+ "2487": {
"attrs": [
{
"other": "#[(not(test), rustc_diagnostic_item = \"SeekFrom\")]"
@@ -248355,7 +266871,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Enumeration of possible methods to seek within an I/O object.\n\nIt is used by the [`Seek`] trait.",
- "id": 2489,
+ "id": 2487,
"inner": {
"enum": {
"generics": {
@@ -248364,6 +266880,7 @@
},
"has_stripped_variants": false,
"impls": [
+ 4253,
4254,
4255,
4256,
@@ -248380,21 +266897,20 @@
4267,
4268,
4269,
- 4270,
+ 4271,
4272,
- 4273,
- 4275,
- 4277
+ 4274,
+ 4276
],
"variants": [
- 4227,
+ 4226,
2767,
2770
]
}
},
"links": {
- "`Seek`": 2407
+ "`Seek`": 2405
},
"name": "SeekFrom",
"span": {
@@ -248410,43 +266926,7 @@
},
"visibility": "public"
},
- "249": {
- "attrs": [
- {
- "other": "#[allow(deprecated, deprecated_in_future)]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 249,
- "inner": {
- "use": {
- "id": 250,
- "is_glob": false,
- "name": "MAX_EXP",
- "source": "core::f32::MAX_EXP"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 18,
- 66
- ],
- "end": [
- 18,
- 73
- ],
- "filename": "std/src/num/f32.rs"
- },
- "visibility": "public"
- },
- "2490": {
+ "2488": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 59359, is_soft: false}, feature: \"seek_stream_len\"}}]"
@@ -248455,7 +266935,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Returns the length of this stream (in bytes).\n\nThe default implementation uses up to three seek operations. If this\nmethod returns successfully, the seek position is unchanged (i.e. the\nposition before calling this method is the same as afterwards).\nHowever, if this method returns an error, the seek position is\nunspecified.\n\nIf you need to obtain the length of *many* streams and you don't care\nabout the seek position afterwards, you can reduce the number of seek\noperations by simply calling `seek(SeekFrom::End(0))` and using its\nreturn value (it is also the stream length).\n\nNote that length of a stream can change over time (for example, when\ndata is appended to a file). So calling this method multiple times does\nnot necessarily return the same length each time.\n\n# Example\n\n```no_run\n#![feature(seek_stream_len)]\nuse std::{\n io::{self, Seek},\n fs::File,\n};\n\nfn main() -> io::Result<()> {\n let mut f = File::open(\"foo.txt\")?;\n\n let len = f.stream_len()?;\n println!(\"The file is currently {len} bytes long\");\n Ok(())\n}\n```",
- "id": 2490,
+ "id": 2488,
"inner": {
"function": {
"generics": {
@@ -248499,7 +266979,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "Result"
}
}
@@ -248521,12 +267001,12 @@
},
"visibility": "default"
},
- "2491": {
+ "2489": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": "Returns the length of this file (in bytes).\n\nSee [`Seek::stream_len`] docs for more info.\n\n# Platform-specific behavior\n\nThis function currently corresponds to the `statx` function on Linux\n(with fallbacks) and the `GetFileSizeEx` function on Windows. Note that\nthis [may change in the future][changes].\n\n[changes]: io#platform-specific-behavior",
- "id": 2491,
+ "id": 2489,
"inner": {
"function": {
"generics": {
@@ -248570,7 +267050,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -248578,29 +267058,65 @@
}
},
"links": {
- "`Seek::stream_len`": 2490,
- "io#platform-specific-behavior": 501
+ "`Seek::stream_len`": 2488,
+ "io#platform-specific-behavior": 502
},
"name": "stream_len",
"span": {
"begin": [
- 1361,
+ 1442,
5
],
"end": [
- 1366,
+ 1447,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2492": {
+ "249": {
+ "attrs": [
+ {
+ "other": "#[allow(deprecated, deprecated_in_future)]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 249,
+ "inner": {
+ "use": {
+ "id": 250,
+ "is_glob": false,
+ "name": "MIN",
+ "source": "core::f32::MIN"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 18,
+ 75
+ ],
+ "end": [
+ 18,
+ 78
+ ],
+ "filename": "std/src/num/f32.rs"
+ },
+ "visibility": "public"
+ },
+ "2490": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2492,
+ "id": 2490,
"inner": {
"function": {
"generics": {
@@ -248644,7 +267160,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -248655,18 +267171,18 @@
"name": "stream_position",
"span": {
"begin": [
- 1368,
+ 1449,
5
],
"end": [
- 1370,
+ 1451,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2493": {
+ "2491": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -248675,7 +267191,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2493,
+ "id": 2491,
"inner": {
"impl": {
"blanket_impl": null,
@@ -248686,7 +267202,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
}
@@ -248700,9 +267216,9 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2488,
- 2491,
- 2492
+ 2486,
+ 2489,
+ 2490
],
"provided_trait_methods": [
"rewind",
@@ -248712,7 +267228,7 @@
],
"trait": {
"args": null,
- "id": 2407,
+ "id": 2405,
"path": "Seek"
}
}
@@ -248721,23 +267237,23 @@
"name": null,
"span": {
"begin": [
- 1334,
+ 1415,
1
],
"end": [
- 1371,
+ 1452,
2
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2494": {
+ "2492": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2494,
+ "id": 2492,
"inner": {
"function": {
"generics": {
@@ -248784,7 +267300,7 @@
"constraints": []
}
},
- "id": 2468,
+ "id": 2466,
"path": "IoSliceMut"
}
}
@@ -248808,7 +267324,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -248819,23 +267335,23 @@
"name": "read_vectored",
"span": {
"begin": [
- 1378,
+ 1459,
5
],
"end": [
- 1380,
+ 1461,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2495": {
+ "2493": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2495,
+ "id": 2493,
"inner": {
"function": {
"generics": {
@@ -248877,7 +267393,7 @@
"constraints": []
}
},
- "id": 2470,
+ "id": 2468,
"path": "BorrowedCursor"
}
}
@@ -248898,7 +267414,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -248909,18 +267425,18 @@
"name": "read_buf",
"span": {
"begin": [
- 1381,
+ 1462,
5
],
"end": [
- 1383,
+ 1464,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2496": {
+ "2494": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -248929,7 +267445,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2496,
+ "id": 2494,
"inner": {
"function": {
"generics": {
@@ -248969,23 +267485,23 @@
"name": "is_read_vectored",
"span": {
"begin": [
- 1385,
+ 1466,
5
],
"end": [
- 1387,
+ 1468,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2497": {
+ "2495": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2497,
+ "id": 2495,
"inner": {
"function": {
"generics": {
@@ -249033,7 +267549,7 @@
"constraints": []
}
},
- "id": 165,
+ "id": 163,
"path": "Vec"
}
}
@@ -249056,7 +267572,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -249067,23 +267583,23 @@
"name": "read_to_end",
"span": {
"begin": [
- 1388,
+ 1469,
5
],
"end": [
- 1390,
+ 1471,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2498": {
+ "2496": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2498,
+ "id": 2496,
"inner": {
"function": {
"generics": {
@@ -249120,7 +267636,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 161,
+ "id": 159,
"path": "String"
}
}
@@ -249143,7 +267659,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -249154,18 +267670,18 @@
"name": "read_to_string",
"span": {
"begin": [
- 1391,
+ 1472,
5
],
"end": [
- 1393,
+ 1474,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2499": {
+ "2497": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -249174,14 +267690,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2499,
+ "id": 2497,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
},
@@ -249193,12 +267709,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2411,
+ 2409,
+ 2492,
+ 2493,
2494,
2495,
- 2496,
- 2497,
- 2498
+ 2496
],
"provided_trait_methods": [
"read_vectored",
@@ -249215,7 +267731,7 @@
],
"trait": {
"args": null,
- "id": 2476,
+ "id": 2474,
"path": "Read"
}
}
@@ -249224,23 +267740,23 @@
"name": null,
"span": {
"begin": [
- 1374,
+ 1455,
1
],
"end": [
- 1394,
+ 1475,
2
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2500": {
+ "2498": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2500,
+ "id": 2498,
"inner": {
"function": {
"generics": {
@@ -249287,7 +267803,7 @@
"constraints": []
}
},
- "id": 2480,
+ "id": 2478,
"path": "IoSlice"
}
}
@@ -249311,7 +267827,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -249322,18 +267838,18 @@
"name": "write_vectored",
"span": {
"begin": [
- 1400,
+ 1481,
5
],
"end": [
- 1402,
+ 1483,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2501": {
+ "2499": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -249342,7 +267858,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2501,
+ "id": 2499,
"inner": {
"function": {
"generics": {
@@ -249382,18 +267898,18 @@
"name": "is_write_vectored",
"span": {
"begin": [
- 1404,
+ 1485,
5
],
"end": [
- 1406,
+ 1487,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2502": {
+ "2500": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -249402,7 +267918,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2502,
+ "id": 2500,
"inner": {
"function": {
"generics": {
@@ -249446,7 +267962,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -249457,18 +267973,18 @@
"name": "flush",
"span": {
"begin": [
- 1408,
+ 1489,
5
],
"end": [
- 1410,
+ 1491,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2503": {
+ "2501": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -249477,14 +267993,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2503,
+ "id": 2501,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
},
@@ -249496,10 +268012,10 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2412,
- 2500,
- 2501,
- 2502
+ 2410,
+ 2498,
+ 2499,
+ 2500
],
"provided_trait_methods": [
"write_vectored",
@@ -249511,7 +268027,7 @@
],
"trait": {
"args": null,
- "id": 2486,
+ "id": 2484,
"path": "Write"
}
}
@@ -249520,23 +268036,23 @@
"name": null,
"span": {
"begin": [
- 1396,
+ 1477,
1
],
"end": [
- 1411,
+ 1492,
2
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2504": {
+ "2502": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2504,
+ "id": 2502,
"inner": {
"function": {
"generics": {
@@ -249569,7 +268085,7 @@
{
"resolved_path": {
"args": null,
- "id": 2489,
+ "id": 2487,
"path": "SeekFrom"
}
}
@@ -249590,7 +268106,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -249601,23 +268117,23 @@
"name": "seek",
"span": {
"begin": [
- 1414,
+ 1495,
5
],
"end": [
- 1416,
+ 1497,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2505": {
+ "2503": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2505,
+ "id": 2503,
"inner": {
"function": {
"generics": {
@@ -249661,7 +268177,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -249672,23 +268188,23 @@
"name": "stream_len",
"span": {
"begin": [
- 1417,
+ 1498,
5
],
"end": [
- 1419,
+ 1500,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2506": {
+ "2504": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2506,
+ "id": 2504,
"inner": {
"function": {
"generics": {
@@ -249732,7 +268248,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -249743,18 +268259,18 @@
"name": "stream_position",
"span": {
"begin": [
- 1420,
+ 1501,
5
],
"end": [
- 1422,
+ 1503,
6
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2507": {
+ "2505": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -249763,14 +268279,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2507,
+ "id": 2505,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
},
@@ -249782,9 +268298,9 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2504,
- 2505,
- 2506
+ 2502,
+ 2503,
+ 2504
],
"provided_trait_methods": [
"rewind",
@@ -249794,7 +268310,7 @@
],
"trait": {
"args": null,
- "id": 2407,
+ "id": 2405,
"path": "Seek"
}
}
@@ -249803,18 +268319,18 @@
"name": null,
"span": {
"begin": [
- 1413,
+ 1494,
1
],
"end": [
- 1423,
+ 1504,
2
],
"filename": "std/src/fs.rs"
},
"visibility": "default"
},
- "2508": {
+ "2506": {
"attrs": [
{
"other": "#[attr = Inline(Hint)]"
@@ -249823,7 +268339,7 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2508,
+ "id": 2506,
"inner": {
"function": {
"generics": {
@@ -249874,7 +268390,7 @@
},
"visibility": "default"
},
- "2509": {
+ "2507": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 70, patch: 0})}, feature: \"is_terminal\"}}]"
@@ -249883,14 +268399,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2509,
+ "id": 2507,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "crate::fs::File"
}
},
@@ -249902,12 +268418,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2508
+ 2506
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 2510,
+ "id": 2508,
"path": "IsTerminal"
}
}
@@ -249927,43 +268443,7 @@
},
"visibility": "default"
},
- "251": {
- "attrs": [
- {
- "other": "#[allow(deprecated, deprecated_in_future)]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- }
- ],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 251,
- "inner": {
- "use": {
- "id": 252,
- "is_glob": false,
- "name": "MIN",
- "source": "core::f32::MIN"
- }
- },
- "links": {},
- "name": null,
- "span": {
- "begin": [
- 18,
- 75
- ],
- "end": [
- 18,
- 78
- ],
- "filename": "std/src/num/f32.rs"
- },
- "visibility": "public"
- },
- "2510": {
+ "2508": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 70, patch: 0})}, feature: \"is_terminal\"}}]"
@@ -249972,7 +268452,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Trait to determine if a descriptor/handle refers to a terminal/tty.",
- "id": 2510,
+ "id": 2508,
"inner": {
"trait": {
"bounds": [
@@ -249982,7 +268462,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 3814,
+ "id": 3813,
"path": "crate::sealed::Sealed"
}
}
@@ -249993,23 +268473,23 @@
"where_predicates": []
},
"implementations": [
- 2509,
- 3600,
- 3640,
- 3687,
- 3722,
- 3769,
- 3804,
- 3816,
- 3818,
- 3820,
- 3822
+ 2507,
+ 3599,
+ 3639,
+ 3686,
+ 3721,
+ 3768,
+ 3803,
+ 3815,
+ 3817,
+ 3819,
+ 3821
],
"is_auto": false,
"is_dyn_compatible": true,
"is_unsafe": false,
"items": [
- 3813
+ 3812
]
}
},
@@ -250028,12 +268508,12 @@
},
"visibility": "public"
},
- "2511": {
+ "2509": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2511,
+ "id": 2509,
"inner": {
"function": {
"generics": {
@@ -250097,7 +268577,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -250108,23 +268588,155 @@
"name": "read_at",
"span": {
"begin": [
- 264,
+ 350,
5
],
"end": [
- 266,
+ 352,
6
],
"filename": "std/src/os/unix/fs.rs"
},
"visibility": "default"
},
- "2512": {
+ "251": {
+ "attrs": [
+ {
+ "other": "#[allow(deprecated, deprecated_in_future)]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 251,
+ "inner": {
+ "use": {
+ "id": 252,
+ "is_glob": false,
+ "name": "MIN_10_EXP",
+ "source": "core::f32::MIN_10_EXP"
+ }
+ },
+ "links": {},
+ "name": null,
+ "span": {
+ "begin": [
+ 18,
+ 80
+ ],
+ "end": [
+ 18,
+ 90
+ ],
+ "filename": "std/src/num/f32.rs"
+ },
+ "visibility": "public"
+ },
+ "2510": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2512,
+ "id": 2510,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
+ }
+ ],
+ [
+ "buf",
+ {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'_"
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 2468,
+ "path": "BorrowedCursor"
+ }
+ }
+ ],
+ [
+ "offset",
+ {
+ "primitive": "u64"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "tuple": []
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 469,
+ "path": "io::Result"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "read_buf_at",
+ "span": {
+ "begin": [
+ 353,
+ 5
+ ],
+ "end": [
+ 355,
+ 6
+ ],
+ "filename": "std/src/os/unix/fs.rs"
+ },
+ "visibility": "default"
+ },
+ "2511": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 2511,
"inner": {
"function": {
"generics": {
@@ -250171,7 +268783,7 @@
"constraints": []
}
},
- "id": 2468,
+ "id": 2466,
"path": "io::IoSliceMut"
}
}
@@ -250201,7 +268813,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -250212,23 +268824,23 @@
"name": "read_vectored_at",
"span": {
"begin": [
- 267,
+ 356,
5
],
"end": [
- 269,
+ 358,
6
],
"filename": "std/src/os/unix/fs.rs"
},
"visibility": "default"
},
- "2513": {
+ "2512": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2513,
+ "id": 2512,
"inner": {
"function": {
"generics": {
@@ -250292,7 +268904,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -250303,23 +268915,23 @@
"name": "write_at",
"span": {
"begin": [
- 270,
+ 359,
5
],
"end": [
- 272,
+ 361,
6
],
"filename": "std/src/os/unix/fs.rs"
},
"visibility": "default"
},
- "2514": {
+ "2513": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2514,
+ "id": 2513,
"inner": {
"function": {
"generics": {
@@ -250366,7 +268978,7 @@
"constraints": []
}
},
- "id": 2480,
+ "id": 2478,
"path": "io::IoSlice"
}
}
@@ -250396,7 +269008,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -250407,18 +269019,18 @@
"name": "write_vectored_at",
"span": {
"begin": [
- 273,
+ 362,
5
],
"end": [
- 275,
+ 364,
6
],
"filename": "std/src/os/unix/fs.rs"
},
"visibility": "default"
},
- "2515": {
+ "2514": {
"attrs": [
{
"other": "#[doc(cfg(unix))]"
@@ -250430,14 +269042,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2515,
+ "id": 2514,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "fs::File"
}
},
@@ -250449,20 +269061,23 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 2509,
+ 2510,
2511,
2512,
- 2513,
- 2514
+ 2513
],
"provided_trait_methods": [
"read_vectored_at",
"read_exact_at",
+ "read_buf_at",
+ "read_buf_exact_at",
"write_vectored_at",
"write_all_at"
],
"trait": {
"args": null,
- "id": 2516,
+ "id": 2515,
"path": "FileExt"
}
}
@@ -250471,18 +269086,18 @@
"name": null,
"span": {
"begin": [
- 263,
+ 349,
1
],
"end": [
- 276,
+ 365,
2
],
"filename": "std/src/os/unix/fs.rs"
},
"visibility": "default"
},
- "2516": {
+ "2515": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 15, patch: 0})}, feature: \"file_offset\"}}]"
@@ -250491,7 +269106,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Unix-specific extensions to [`fs::File`].",
- "id": 2516,
+ "id": 2515,
"inner": {
"trait": {
"bounds": [],
@@ -250500,44 +269115,46 @@
"where_predicates": []
},
"implementations": [
- 2515
+ 2514
],
"is_auto": false,
"is_dyn_compatible": true,
"is_unsafe": false,
"items": [
- 4888,
- 4889,
- 4890,
4891,
4892,
- 4893
+ 4893,
+ 4894,
+ 4895,
+ 4896,
+ 4897,
+ 4898
]
}
},
"links": {
- "`fs::File`": 2413
+ "`fs::File`": 2411
},
"name": "FileExt",
"span": {
"begin": [
- 26,
+ 27,
1
],
"end": [
- 260,
+ 346,
2
],
"filename": "std/src/os/unix/fs.rs"
},
"visibility": "public"
},
- "2517": {
+ "2516": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2517,
+ "id": 2516,
"inner": {
"function": {
"generics": {
@@ -250584,7 +269201,7 @@
"constraints": []
}
},
- "id": 2468,
+ "id": 2466,
"path": "IoSliceMut"
}
}
@@ -250614,7 +269231,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -250636,12 +269253,12 @@
},
"visibility": "default"
},
- "2518": {
+ "2517": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2518,
+ "id": 2517,
"inner": {
"function": {
"generics": {
@@ -250688,7 +269305,7 @@
"constraints": []
}
},
- "id": 2480,
+ "id": 2478,
"path": "IoSlice"
}
}
@@ -250718,7 +269335,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -250740,12 +269357,12 @@
},
"visibility": "default"
},
- "2519": {
+ "2518": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2519,
+ "id": 2518,
"inner": {
"function": {
"generics": {
@@ -250795,7 +269412,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -250817,12 +269434,12 @@
},
"visibility": "default"
},
- "2520": {
+ "2519": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2520,
+ "id": 2519,
"inner": {
"function": {
"generics": {
@@ -250878,7 +269495,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -250900,12 +269517,12 @@
},
"visibility": "default"
},
- "2521": {
+ "2520": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2521,
+ "id": 2520,
"inner": {
"function": {
"generics": {
@@ -250967,7 +269584,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -250989,12 +269606,12 @@
},
"visibility": "default"
},
- "2522": {
+ "2521": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2522,
+ "id": 2521,
"inner": {
"function": {
"generics": {
@@ -251050,7 +269667,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -251072,12 +269689,12 @@
},
"visibility": "default"
},
- "2523": {
+ "2522": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2523,
+ "id": 2522,
"inner": {
"function": {
"generics": {
@@ -251098,7 +269715,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -251165,7 +269782,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -251187,12 +269804,12 @@
},
"visibility": "default"
},
- "2524": {
+ "2523": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2524,
+ "id": 2523,
"inner": {
"function": {
"generics": {
@@ -251213,7 +269830,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -251275,7 +269892,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "PathBuf"
}
}
@@ -251284,7 +269901,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -251306,12 +269923,12 @@
},
"visibility": "default"
},
- "2525": {
+ "2524": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2525,
+ "id": 2524,
"inner": {
"function": {
"generics": {
@@ -251332,7 +269949,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -251400,7 +270017,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2441,
+ "id": 2439,
"path": "Metadata"
}
}
@@ -251409,7 +270026,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -251431,12 +270048,12 @@
},
"visibility": "default"
},
- "2526": {
+ "2525": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2526,
+ "id": 2525,
"inner": {
"function": {
"generics": {
@@ -251457,7 +270074,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -251524,7 +270141,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -251546,12 +270163,12 @@
},
"visibility": "default"
},
- "2527": {
+ "2526": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2527,
+ "id": 2526,
"inner": {
"function": {
"generics": {
@@ -251572,7 +270189,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -251639,7 +270256,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -251661,7 +270278,7 @@
},
"visibility": "default"
},
- "2528": {
+ "2527": {
"attrs": [
{
"other": "#[doc(cfg(target_os = \"wasi\"))]"
@@ -251670,14 +270287,14 @@
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2528,
+ "id": 2527,
"inner": {
"impl": {
"blanket_impl": null,
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "fs::File"
}
},
@@ -251689,6 +270306,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 2516,
2517,
2518,
2519,
@@ -251698,8 +270316,7 @@
2523,
2524,
2525,
- 2526,
- 2527
+ 2526
],
"provided_trait_methods": [
"read_at",
@@ -251709,7 +270326,7 @@
],
"trait": {
"args": null,
- "id": 2529,
+ "id": 2528,
"path": "FileExt"
}
}
@@ -251729,12 +270346,12 @@
},
"visibility": "default"
},
- "2529": {
+ "2528": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": "WASI-specific extensions to [`File`].",
- "id": 2529,
+ "id": 2528,
"inner": {
"trait": {
"bounds": [],
@@ -251743,17 +270360,12 @@
"where_predicates": []
},
"implementations": [
- 2528
+ 2527
],
"is_auto": false,
"is_dyn_compatible": false,
"is_unsafe": false,
"items": [
- 5561,
- 5562,
- 5563,
- 5564,
- 5565,
5566,
5567,
5568,
@@ -251763,12 +270375,17 @@
5572,
5573,
5574,
- 5575
+ 5575,
+ 5576,
+ 5577,
+ 5578,
+ 5579,
+ 5580
]
}
},
"links": {
- "`File`": 2413
+ "`File`": 2411
},
"name": "FileExt",
"span": {
@@ -251784,6 +270401,97 @@
},
"visibility": "public"
},
+ "2529": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 2529,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
+ }
+ ],
+ [
+ "buf",
+ {
+ "borrowed_ref": {
+ "is_mutable": true,
+ "lifetime": null,
+ "type": {
+ "slice": {
+ "primitive": "u8"
+ }
+ }
+ }
+ }
+ ],
+ [
+ "offset",
+ {
+ "primitive": "u64"
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "usize"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 469,
+ "path": "io::Result"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "seek_read",
+ "span": {
+ "begin": [
+ 127,
+ 5
+ ],
+ "end": [
+ 129,
+ 6
+ ],
+ "filename": "std/src/os/windows/fs.rs"
+ },
+ "visibility": "default"
+ },
"253": {
"attrs": [
{
@@ -251801,8 +270509,8 @@
"use": {
"id": 254,
"is_glob": false,
- "name": "MIN_10_EXP",
- "source": "core::f32::MIN_10_EXP"
+ "name": "MIN_EXP",
+ "source": "core::f32::MIN_EXP"
}
},
"links": {},
@@ -251810,11 +270518,11 @@
"span": {
"begin": [
18,
- 80
+ 92
],
"end": [
18,
- 90
+ 99
],
"filename": "std/src/num/f32.rs"
},
@@ -251856,14 +270564,19 @@
[
"buf",
{
- "borrowed_ref": {
- "is_mutable": true,
- "lifetime": null,
- "type": {
- "slice": {
- "primitive": "u8"
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "lifetime": "'_"
+ }
+ ],
+ "constraints": []
}
- }
+ },
+ "id": 2468,
+ "path": "BorrowedCursor"
}
}
],
@@ -251882,14 +270595,14 @@
"args": [
{
"type": {
- "primitive": "usize"
+ "tuple": []
}
}
],
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -251897,14 +270610,14 @@
}
},
"links": {},
- "name": "seek_read",
+ "name": "seek_read_buf",
"span": {
"begin": [
- 88,
+ 131,
5
],
"end": [
- 90,
+ 133,
6
],
"filename": "std/src/os/windows/fs.rs"
@@ -251980,7 +270693,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -251991,11 +270704,11 @@
"name": "seek_write",
"span": {
"begin": [
- 92,
+ 135,
5
],
"end": [
- 94,
+ 137,
6
],
"filename": "std/src/os/windows/fs.rs"
@@ -252021,7 +270734,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "fs::File"
}
},
@@ -252033,10 +270746,13 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
+ 2529,
2530,
2531
],
- "provided_trait_methods": [],
+ "provided_trait_methods": [
+ "seek_read_buf"
+ ],
"trait": {
"args": null,
"id": 2533,
@@ -252048,11 +270764,11 @@
"name": null,
"span": {
"begin": [
- 87,
+ 126,
1
],
"end": [
- 95,
+ 138,
2
],
"filename": "std/src/os/windows/fs.rs"
@@ -252083,22 +270799,23 @@
"is_dyn_compatible": true,
"is_unsafe": false,
"items": [
- 5624,
- 5625
+ 5654,
+ 5655,
+ 5656
]
}
},
"links": {
- "`fs::File`": 2413
+ "`fs::File`": 2411
},
"name": "FileExt",
"span": {
"begin": [
- 16,
+ 17,
1
],
"end": [
- 84,
+ 123,
2
],
"filename": "std/src/os/windows/fs.rs"
@@ -252197,7 +270914,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "fs::File"
}
},
@@ -252264,7 +270981,7 @@
{
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "fs::File"
}
}
@@ -252282,7 +270999,7 @@
}
},
"links": {
- "fs::File": 2413
+ "fs::File": 2411
},
"name": "from",
"span": {
@@ -252340,7 +271057,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
}
@@ -252413,7 +271130,7 @@
}
},
"links": {
- "fs::File": 2413
+ "fs::File": 2411
},
"name": "from",
"span": {
@@ -252448,7 +271165,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "fs::File"
}
},
@@ -252583,7 +271300,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "fs::File"
}
},
@@ -252660,7 +271377,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "fs::File"
}
}
@@ -252701,7 +271418,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "fs::File"
}
},
@@ -252756,17 +271473,17 @@
"where_predicates": []
},
"implementations": [
- 5706,
+ 5737,
2543,
- 3478,
- 3532,
- 5862
+ 3477,
+ 3531,
+ 5893
],
"is_auto": false,
"is_dyn_compatible": false,
"is_unsafe": false,
"items": [
- 5730
+ 5761
]
}
},
@@ -252862,7 +271579,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "fs::File"
}
},
@@ -252952,11 +271669,11 @@
"name": "as_raw_fd",
"span": {
"begin": [
- 170,
+ 174,
5
],
"end": [
- 172,
+ 176,
6
],
"filename": "std/src/os/fd/raw.rs"
@@ -252966,7 +271683,7 @@
"2548": {
"attrs": [
{
- "other": "#[(not(target_os = \"hermit\"))]"
+ "other": "#[(all(not(target_os = \"hermit\"), not(target_os = \"motor\")))]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -252985,7 +271702,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 4819,
+ "id": 4821,
"path": "raw::c_int"
}
}
@@ -252995,11 +271712,11 @@
"name": "RawFd",
"span": {
"begin": [
- 27,
+ 31,
1
],
"end": [
- 27,
+ 31,
29
],
"filename": "std/src/os/fd/raw.rs"
@@ -253025,7 +271742,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "fs::File"
}
},
@@ -253051,11 +271768,11 @@
"name": null,
"span": {
"begin": [
- 168,
+ 172,
1
],
"end": [
- 173,
+ 177,
2
],
"filename": "std/src/os/fd/raw.rs"
@@ -253079,20 +271796,20 @@
"use": {
"id": 256,
"is_glob": false,
- "name": "MIN_EXP",
- "source": "core::f32::MIN_EXP"
+ "name": "MIN_POSITIVE",
+ "source": "core::f32::MIN_POSITIVE"
}
},
"links": {},
"name": null,
"span": {
"begin": [
- 18,
- 92
+ 19,
+ 5
],
"end": [
- 18,
- 99
+ 19,
+ 17
],
"filename": "std/src/num/f32.rs"
},
@@ -253116,38 +271833,38 @@
"where_predicates": []
},
"implementations": [
- 5165,
- 5209,
- 5283,
- 6061,
- 6063,
- 6065,
- 5488,
- 6067,
+ 5170,
+ 5214,
+ 5288,
+ 6094,
+ 6096,
+ 6098,
+ 5493,
+ 6100,
2549,
- 3606,
- 3693,
- 3775,
- 3646,
- 3728,
- 3810,
- 6069,
- 6071,
- 6073,
- 6075,
- 3482,
- 3536,
- 6077,
- 6079,
- 4544,
- 4604,
- 4721
+ 3605,
+ 3692,
+ 3774,
+ 3645,
+ 3727,
+ 3809,
+ 6102,
+ 6104,
+ 6106,
+ 6108,
+ 3481,
+ 3535,
+ 6110,
+ 6112,
+ 4545,
+ 4605,
+ 4722
],
"is_auto": false,
"is_dyn_compatible": true,
"is_unsafe": false,
"items": [
- 6059
+ 6092
]
}
},
@@ -253155,11 +271872,11 @@
"name": "AsRawFd",
"span": {
"begin": [
- 38,
+ 42,
1
],
"end": [
- 66,
+ 70,
2
],
"filename": "std/src/os/fd/raw.rs"
@@ -253206,7 +271923,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "fs::File"
}
}
@@ -253217,11 +271934,11 @@
"name": "from_raw_fd",
"span": {
"begin": [
- 178,
+ 182,
5
],
"end": [
- 180,
+ 184,
6
],
"filename": "std/src/os/fd/raw.rs"
@@ -253247,7 +271964,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "fs::File"
}
},
@@ -253273,11 +271990,11 @@
"name": null,
"span": {
"begin": [
- 176,
+ 180,
1
],
"end": [
- 181,
+ 185,
2
],
"filename": "std/src/os/fd/raw.rs"
@@ -253302,25 +272019,25 @@
"where_predicates": []
},
"implementations": [
- 5167,
- 5211,
- 5285,
- 6083,
- 5490,
- 6085,
+ 5172,
+ 5216,
+ 5290,
+ 6116,
+ 5495,
+ 6118,
2552,
- 3484,
- 3538,
- 6087,
- 4546,
- 4606,
- 4723
+ 3483,
+ 3537,
+ 6120,
+ 4547,
+ 4607,
+ 4724
],
"is_auto": false,
"is_dyn_compatible": false,
"is_unsafe": false,
"items": [
- 6081
+ 6114
]
}
},
@@ -253328,11 +272045,11 @@
"name": "FromRawFd",
"span": {
"begin": [
- 71,
+ 75,
1
],
"end": [
- 110,
+ 114,
2
],
"filename": "std/src/os/fd/raw.rs"
@@ -253386,11 +272103,11 @@
"name": "into_raw_fd",
"span": {
"begin": [
- 186,
+ 190,
5
],
"end": [
- 188,
+ 192,
6
],
"filename": "std/src/os/fd/raw.rs"
@@ -253416,7 +272133,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "fs::File"
}
},
@@ -253442,11 +272159,11 @@
"name": null,
"span": {
"begin": [
- 184,
+ 188,
1
],
"end": [
- 189,
+ 193,
2
],
"filename": "std/src/os/fd/raw.rs"
@@ -253471,27 +272188,27 @@
"where_predicates": []
},
"implementations": [
- 5169,
- 5213,
- 5287,
- 6090,
- 6092,
- 6094,
- 5492,
- 6096,
+ 5174,
+ 5218,
+ 5292,
+ 6123,
+ 6125,
+ 6127,
+ 5497,
+ 6129,
2555,
- 3486,
- 3540,
- 6098,
- 4548,
- 4608,
- 4725
+ 3485,
+ 3539,
+ 6131,
+ 4549,
+ 4609,
+ 4726
],
"is_auto": false,
"is_dyn_compatible": true,
"is_unsafe": false,
"items": [
- 6088
+ 6121
]
}
},
@@ -253499,11 +272216,11 @@
"name": "IntoRawFd",
"span": {
"begin": [
- 115,
+ 119,
1
],
"end": [
- 142,
+ 146,
2
],
"filename": "std/src/os/fd/raw.rs"
@@ -253572,11 +272289,11 @@
"name": "as_fd",
"span": {
"begin": [
- 294,
+ 312,
5
],
"end": [
- 296,
+ 314,
6
],
"filename": "std/src/os/fd/owned.rs"
@@ -253620,29 +272337,29 @@
"where_predicates": []
},
"impls": [
- 6103,
- 6104,
- 6105,
- 6106,
- 6107,
- 6108,
- 6109,
+ 6136,
+ 6137,
+ 6138,
+ 6139,
+ 6140,
+ 6141,
+ 6142,
+ 6143,
+ 6144,
+ 6145,
+ 6146,
+ 6147,
+ 6148,
+ 6149,
+ 6150,
+ 6151,
+ 6152,
+ 6153,
+ 6155,
6110,
- 6111,
- 6112,
- 6113,
- 6114,
- 6115,
- 6116,
- 6117,
- 6118,
- 6119,
- 6120,
- 6122,
- 6077,
- 6124,
- 3820,
- 6126
+ 6157,
+ 3819,
+ 6159
],
"kind": {
"plain": {
@@ -253653,18 +272370,18 @@
}
},
"links": {
- "`BorrowedFd::try_clone_to_owned`": 5499,
+ "`BorrowedFd::try_clone_to_owned`": 5504,
"`OwnedFd`": 2562,
- "crate::borrow::ToOwned": 157
+ "crate::borrow::ToOwned": 155
},
"name": "BorrowedFd",
"span": {
"begin": [
- 47,
+ 51,
1
],
"end": [
- 50,
+ 54,
2
],
"filename": "std/src/os/fd/owned.rs"
@@ -253690,7 +272407,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "fs::File"
}
},
@@ -253716,11 +272433,11 @@
"name": null,
"span": {
"begin": [
- 292,
+ 310,
1
],
"end": [
- 297,
+ 315,
2
],
"filename": "std/src/os/fd/owned.rs"
@@ -253745,39 +272462,39 @@
"where_predicates": []
},
"implementations": [
- 5171,
- 5215,
- 5289,
- 6164,
- 6166,
- 6168,
- 5494,
- 6170,
- 6172,
- 6126,
- 6162,
+ 5176,
+ 5220,
+ 5294,
+ 6197,
+ 6199,
+ 6201,
+ 5499,
+ 6203,
+ 6205,
+ 6159,
+ 6195,
2559,
- 4538,
- 4598,
- 4715,
- 6174,
- 6176,
- 6178,
- 6180,
- 3608,
- 3648,
- 3695,
- 3730,
- 3777,
- 3812,
- 3488,
- 3542
+ 4539,
+ 4599,
+ 4716,
+ 6207,
+ 6209,
+ 6211,
+ 6213,
+ 3607,
+ 3647,
+ 3694,
+ 3729,
+ 3776,
+ 3811,
+ 3487,
+ 3541
],
"is_auto": false,
"is_dyn_compatible": true,
"is_unsafe": false,
"items": [
- 6058
+ 6091
]
}
},
@@ -253785,11 +272502,11 @@
"name": "AsFd",
"span": {
"begin": [
- 235,
+ 253,
1
],
"end": [
- 253,
+ 271,
2
],
"filename": "std/src/os/fd/owned.rs"
@@ -253826,7 +272543,7 @@
{
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "fs::File"
}
}
@@ -253844,16 +272561,16 @@
}
},
"links": {
- "fs::File": 2413
+ "fs::File": 2411
},
"name": "from",
"span": {
"begin": [
- 304,
+ 322,
5
],
"end": [
- 306,
+ 324,
6
],
"filename": "std/src/os/fd/owned.rs"
@@ -253888,54 +272605,54 @@
"where_predicates": []
},
"impls": [
- 6129,
- 6130,
- 6131,
- 6132,
- 6133,
- 6134,
- 6135,
- 6136,
- 6137,
- 6138,
- 6139,
- 6140,
- 6141,
- 6142,
- 5173,
- 5175,
- 5217,
- 5219,
- 5291,
- 5293,
- 6144,
- 6146,
- 6148,
- 6150,
- 6152,
- 6154,
- 6156,
- 5496,
- 5498,
- 6079,
- 6098,
- 6087,
- 6158,
- 6160,
- 3822,
6162,
+ 6163,
+ 6164,
+ 6165,
+ 6166,
+ 6167,
+ 6168,
+ 6169,
+ 6170,
+ 6171,
+ 6172,
+ 6173,
+ 6174,
+ 6175,
+ 5178,
+ 5180,
+ 5222,
+ 5224,
+ 5296,
+ 5298,
+ 6177,
+ 6179,
+ 6181,
+ 6183,
+ 6185,
+ 6187,
+ 6189,
+ 5501,
+ 5503,
+ 6112,
+ 6131,
+ 6120,
+ 6191,
+ 6193,
+ 3821,
+ 6195,
2563,
2565,
- 4540,
- 4542,
- 4600,
- 4602,
- 4717,
- 4719,
- 3490,
- 3544,
- 3492,
- 3546
+ 4541,
+ 4543,
+ 4601,
+ 4603,
+ 4718,
+ 4720,
+ 3489,
+ 3543,
+ 3491,
+ 3545
],
"kind": {
"plain": {
@@ -253946,17 +272663,17 @@
}
},
"links": {
- "`AsFd::as_fd`": 6058,
+ "`AsFd::as_fd`": 6091,
"`BorrowedFd`": 2558
},
"name": "OwnedFd",
"span": {
"begin": [
- 66,
+ 70,
1
],
"end": [
- 68,
+ 72,
2
],
"filename": "std/src/os/fd/owned.rs"
@@ -254005,7 +272722,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
}
@@ -254023,11 +272740,11 @@
"name": null,
"span": {
"begin": [
- 301,
+ 319,
1
],
"end": [
- 307,
+ 325,
2
],
"filename": "std/src/os/fd/owned.rs"
@@ -254078,16 +272795,16 @@
}
},
"links": {
- "fs::File": 2413
+ "fs::File": 2411
},
"name": "from",
"span": {
"begin": [
- 315,
+ 333,
5
],
"end": [
- 317,
+ 335,
6
],
"filename": "std/src/os/fd/owned.rs"
@@ -254113,7 +272830,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "fs::File"
}
},
@@ -254154,11 +272871,11 @@
"name": null,
"span": {
"begin": [
- 311,
+ 329,
1
],
"end": [
- 318,
+ 336,
2
],
"filename": "std/src/os/fd/owned.rs"
@@ -254182,33 +272899,33 @@
"where_predicates": []
},
"impls": [
- 7040,
- 7041,
- 7042,
- 7043,
- 7044,
- 7045,
- 7046,
- 7047,
- 7048,
- 7049,
- 7050,
- 7051,
- 7052,
- 7053,
- 6083,
- 6144,
- 5862,
- 5720,
- 7055,
- 6887,
- 6905,
- 6923,
+ 7078,
+ 7079,
+ 7080,
+ 7081,
+ 7082,
+ 7083,
+ 7084,
+ 7085,
+ 7086,
+ 7087,
+ 7088,
+ 7089,
+ 7090,
+ 7091,
+ 6116,
+ 6177,
+ 5893,
+ 5751,
+ 7093,
+ 6925,
+ 6943,
+ 6961,
2568,
- 3697,
- 3779,
- 3548,
- 3494
+ 3696,
+ 3778,
+ 3547,
+ 3493
],
"kind": {
"tuple": [
@@ -254218,19 +272935,19 @@
}
},
"links": {
- "Command::stderr": 6937,
- "Command::stdin": 6935,
- "Command::stdout": 6936,
- "`Command`": 5336
+ "Command::stderr": 6975,
+ "Command::stdin": 6973,
+ "Command::stdout": 6974,
+ "`Command`": 5341
},
"name": "Stdio",
"span": {
"begin": [
- 1395,
+ 1406,
1
],
"end": [
- 1395,
+ 1406,
30
],
"filename": "std/src/process.rs"
@@ -254263,7 +272980,7 @@
{
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "fs::File"
}
}
@@ -254282,16 +272999,16 @@
},
"links": {
"`Stdio`": 2566,
- "fs::File": 2413
+ "fs::File": 2411
},
"name": "from",
"span": {
"begin": [
- 1671,
+ 1682,
5
],
"end": [
- 1673,
+ 1684,
6
],
"filename": "std/src/process.rs"
@@ -254337,7 +273054,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
}
@@ -254355,11 +273072,11 @@
"name": null,
"span": {
"begin": [
- 1650,
+ 1661,
1
],
"end": [
- 1674,
+ 1685,
2
],
"filename": "std/src/process.rs"
@@ -254413,8 +273130,8 @@
"use": {
"id": 258,
"is_glob": false,
- "name": "MIN_POSITIVE",
- "source": "core::f32::MIN_POSITIVE"
+ "name": "NAN",
+ "source": "core::f32::NAN"
}
},
"links": {},
@@ -254422,11 +273139,11 @@
"span": {
"begin": [
19,
- 5
+ 19
],
"end": [
19,
- 17
+ 22
],
"filename": "std/src/num/f32.rs"
},
@@ -254465,13 +273182,13 @@
3350,
3351,
2594,
- 3223,
+ 3224,
3353,
3355,
3358,
3360,
3362,
- 3366
+ 3365
],
"kind": {
"plain": {
@@ -254483,9 +273200,9 @@
},
"links": {
"`ErrorKind`": 2774,
- "crate::io::Read": 2476,
- "crate::io::Seek": 2407,
- "crate::io::Write": 2486
+ "crate::io::Read": 2474,
+ "crate::io::Seek": 2405,
+ "crate::io::Write": 2484
},
"name": "Error",
"span": {
@@ -254521,11 +273238,11 @@
"name": "WouldBlock",
"span": {
"begin": [
- 270,
+ 273,
5
],
"end": [
- 270,
+ 273,
15
],
"filename": "std/src/io/error.rs"
@@ -254605,7 +273322,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2437,
+ "id": 2435,
"path": "TryLockError"
}
},
@@ -254642,7 +273359,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2437,
+ "id": 2435,
"path": "TryLockError"
}
},
@@ -254679,7 +273396,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2437,
+ "id": 2435,
"path": "TryLockError"
}
},
@@ -254694,7 +273411,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -254716,7 +273433,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2437,
+ "id": 2435,
"path": "TryLockError"
}
},
@@ -254753,7 +273470,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2437,
+ "id": 2435,
"path": "TryLockError"
}
},
@@ -254768,7 +273485,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -254790,7 +273507,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2437,
+ "id": 2435,
"path": "TryLockError"
}
},
@@ -254805,7 +273522,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -254829,7 +273546,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2437,
+ "id": 2435,
"path": "TryLockError"
}
},
@@ -254874,7 +273591,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -254890,7 +273607,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -254899,12 +273616,12 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -254924,7 +273641,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2437,
+ "id": 2435,
"path": "TryLockError"
}
},
@@ -254969,7 +273686,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -254985,7 +273702,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -254994,12 +273711,12 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -255019,7 +273736,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2437,
+ "id": 2435,
"path": "TryLockError"
}
},
@@ -255085,7 +273802,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -255110,11 +273827,11 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -255135,7 +273852,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2437,
+ "id": 2435,
"path": "TryLockError"
}
},
@@ -255158,7 +273875,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -255183,11 +273900,11 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -255208,7 +273925,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2437,
+ "id": 2435,
"path": "TryLockError"
}
},
@@ -255256,7 +273973,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -255274,8 +273991,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -255291,7 +274008,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -255300,11 +274017,11 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -255325,7 +274042,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2437,
+ "id": 2435,
"path": "TryLockError"
}
},
@@ -255391,8 +274108,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -255408,7 +274125,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -255417,11 +274134,11 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -255442,7 +274159,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2437,
+ "id": 2435,
"path": "TryLockError"
}
},
@@ -255490,12 +274207,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -255529,7 +274246,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2437,
+ "id": 2435,
"path": "TryLockError"
}
},
@@ -255590,7 +274307,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 163,
+ "id": 161,
"path": "ToString"
}
}
@@ -255599,11 +274316,11 @@
"name": null,
"span": {
"begin": [
- 2806,
+ 2866,
1
],
"end": [
- 2806,
+ 2866,
46
],
"filename": "checkouts/rust/library/alloc/src/string.rs"
@@ -255626,7 +274343,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2437,
+ "id": 2435,
"path": "TryLockError"
}
},
@@ -255656,11 +274373,11 @@
"name": null,
"span": {
"begin": [
- 391,
+ 472,
1
],
"end": [
- 391,
+ 472,
38
],
"filename": "std/src/fs.rs"
@@ -255718,7 +274435,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -255730,7 +274447,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -255741,11 +274458,11 @@
"name": "fmt",
"span": {
"begin": [
- 395,
+ 476,
5
],
"end": [
- 400,
+ 481,
6
],
"filename": "std/src/fs.rs"
@@ -255769,8 +274486,8 @@
"use": {
"id": 260,
"is_glob": false,
- "name": "NAN",
- "source": "core::f32::NAN"
+ "name": "NEG_INFINITY",
+ "source": "core::f32::NEG_INFINITY"
}
},
"links": {},
@@ -255778,11 +274495,11 @@
"span": {
"begin": [
19,
- 19
+ 24
],
"end": [
19,
- 22
+ 36
],
"filename": "std/src/num/f32.rs"
},
@@ -255804,7 +274521,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2437,
+ "id": 2435,
"path": "TryLockError"
}
},
@@ -255821,7 +274538,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -255830,11 +274547,11 @@
"name": null,
"span": {
"begin": [
- 394,
+ 475,
1
],
"end": [
- 401,
+ 482,
2
],
"filename": "std/src/fs.rs"
@@ -255892,7 +274609,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -255904,7 +274621,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -255915,11 +274632,11 @@
"name": "fmt",
"span": {
"begin": [
- 405,
+ 486,
5
],
"end": [
- 411,
+ 492,
6
],
"filename": "std/src/fs.rs"
@@ -255942,7 +274659,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2437,
+ "id": 2435,
"path": "TryLockError"
}
},
@@ -255968,11 +274685,11 @@
"name": null,
"span": {
"begin": [
- 404,
+ 485,
1
],
"end": [
- 412,
+ 493,
2
],
"filename": "std/src/fs.rs"
@@ -256005,7 +274722,7 @@
{
"resolved_path": {
"args": null,
- "id": 2437,
+ "id": 2435,
"path": "TryLockError"
}
}
@@ -256026,11 +274743,11 @@
"name": "from",
"span": {
"begin": [
- 416,
+ 497,
5
],
"end": [
- 421,
+ 502,
6
],
"filename": "std/src/fs.rs"
@@ -256076,7 +274793,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2437,
+ "id": 2435,
"path": "TryLockError"
}
}
@@ -256094,11 +274811,11 @@
"name": null,
"span": {
"begin": [
- 415,
+ 496,
1
],
"end": [
- 422,
+ 503,
2
],
"filename": "std/src/fs.rs"
@@ -256138,7 +274855,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "crate::path::Path"
}
}
@@ -256188,7 +274905,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2441,
+ "id": 2439,
"path": "Metadata"
}
}
@@ -256197,7 +274914,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -256205,16 +274922,16 @@
}
},
"links": {
- "io#platform-specific-behavior": 501
+ "io#platform-specific-behavior": 502
},
"name": "metadata",
"span": {
"begin": [
- 2533,
+ 2619,
1
],
"end": [
- 2535,
+ 2621,
2
],
"filename": "std/src/fs.rs"
@@ -256254,7 +274971,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "crate::path::Path"
}
}
@@ -256304,7 +275021,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2441,
+ "id": 2439,
"path": "Metadata"
}
}
@@ -256313,7 +275030,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -256321,16 +275038,16 @@
}
},
"links": {
- "io#platform-specific-behavior": 501
+ "io#platform-specific-behavior": 502
},
"name": "symlink_metadata",
"span": {
"begin": [
- 2568,
+ 2654,
1
],
"end": [
- 2570,
+ 2656,
2
],
"filename": "std/src/fs.rs"
@@ -256395,11 +275112,11 @@
"name": "file_type",
"span": {
"begin": [
- 1751,
+ 1837,
5
],
"end": [
- 1753,
+ 1839,
6
],
"filename": "std/src/fs.rs"
@@ -256567,19 +275284,19 @@
}
},
"links": {
- "`File::open`": 2417,
+ "`File::open`": 2415,
"`Metadata::is_dir`": 2601,
- "`OpenOptions::open`": 2414,
+ "`OpenOptions::open`": 2412,
"`symlink_metadata`": 2597
},
"name": "is_file",
"span": {
"begin": [
- 1803,
+ 1889,
5
],
"end": [
- 1805,
+ 1891,
6
],
"filename": "std/src/fs.rs"
@@ -256643,11 +275360,11 @@
"name": "is_dir",
"span": {
"begin": [
- 1774,
+ 1860,
5
],
"end": [
- 1776,
+ 1862,
6
],
"filename": "std/src/fs.rs"
@@ -256714,11 +275431,11 @@
"name": "is_symlink",
"span": {
"begin": [
- 1829,
+ 1915,
5
],
"end": [
- 1831,
+ 1917,
6
],
"filename": "std/src/fs.rs"
@@ -256779,11 +275496,11 @@
"name": "len",
"span": {
"begin": [
- 1849,
+ 1935,
5
],
"end": [
- 1851,
+ 1937,
6
],
"filename": "std/src/fs.rs"
@@ -256837,7 +275554,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 2444,
+ "id": 2442,
"path": "Permissions"
}
}
@@ -256848,11 +275565,11 @@
"name": "permissions",
"span": {
"begin": [
- 1869,
+ 1955,
5
],
"end": [
- 1871,
+ 1957,
6
],
"filename": "std/src/fs.rs"
@@ -256910,7 +275627,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2448,
+ "id": 2446,
"path": "SystemTime"
}
}
@@ -256919,7 +275636,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -256930,11 +275647,11 @@
"name": "modified",
"span": {
"begin": [
- 1901,
+ 1987,
5
],
"end": [
- 1903,
+ 1989,
6
],
"filename": "std/src/fs.rs"
@@ -256992,7 +275709,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2448,
+ "id": 2446,
"path": "SystemTime"
}
}
@@ -257001,7 +275718,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -257012,11 +275729,11 @@
"name": "accessed",
"span": {
"begin": [
- 1937,
+ 2023,
5
],
"end": [
- 1939,
+ 2025,
6
],
"filename": "std/src/fs.rs"
@@ -257074,7 +275791,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2448,
+ "id": 2446,
"path": "SystemTime"
}
}
@@ -257083,7 +275800,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -257094,11 +275811,11 @@
"name": "created",
"span": {
"begin": [
- 1970,
+ 2056,
5
],
"end": [
- 1972,
+ 2058,
6
],
"filename": "std/src/fs.rs"
@@ -257117,7 +275834,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2441,
+ "id": 2439,
"path": "Metadata"
}
},
@@ -257147,11 +275864,11 @@
"name": null,
"span": {
"begin": [
- 1734,
+ 1820,
1
],
"end": [
- 1973,
+ 2059,
2
],
"filename": "std/src/fs.rs"
@@ -257170,7 +275887,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2441,
+ "id": 2439,
"path": "Metadata"
}
},
@@ -257212,8 +275929,8 @@
"use": {
"id": 262,
"is_glob": false,
- "name": "NEG_INFINITY",
- "source": "core::f32::NEG_INFINITY"
+ "name": "RADIX",
+ "source": "core::f32::RADIX"
}
},
"links": {},
@@ -257221,11 +275938,11 @@
"span": {
"begin": [
19,
- 24
+ 38
],
"end": [
19,
- 36
+ 43
],
"filename": "std/src/num/f32.rs"
},
@@ -257243,7 +275960,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2441,
+ "id": 2439,
"path": "Metadata"
}
},
@@ -257280,7 +275997,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2441,
+ "id": 2439,
"path": "Metadata"
}
},
@@ -257295,7 +276012,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -257317,7 +276034,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2441,
+ "id": 2439,
"path": "Metadata"
}
},
@@ -257354,7 +276071,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2441,
+ "id": 2439,
"path": "Metadata"
}
},
@@ -257369,7 +276086,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -257391,7 +276108,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2441,
+ "id": 2439,
"path": "Metadata"
}
},
@@ -257406,7 +276123,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -257430,7 +276147,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2441,
+ "id": 2439,
"path": "Metadata"
}
},
@@ -257475,7 +276192,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -257491,7 +276208,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -257500,12 +276217,12 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -257525,7 +276242,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2441,
+ "id": 2439,
"path": "Metadata"
}
},
@@ -257570,7 +276287,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -257586,7 +276303,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -257595,12 +276312,12 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -257620,7 +276337,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2441,
+ "id": 2439,
"path": "Metadata"
}
},
@@ -257647,7 +276364,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -257679,11 +276396,11 @@
"name": null,
"span": {
"begin": [
- 516,
+ 515,
1
],
"end": [
- 516,
+ 515,
42
],
"filename": "checkouts/rust/library/core/src/clone.rs"
@@ -257704,7 +276421,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2441,
+ "id": 2439,
"path": "Metadata"
}
},
@@ -257770,7 +276487,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -257795,11 +276512,11 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -257820,7 +276537,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2441,
+ "id": 2439,
"path": "Metadata"
}
},
@@ -257843,7 +276560,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -257868,11 +276585,11 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -257893,7 +276610,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2441,
+ "id": 2439,
"path": "Metadata"
}
},
@@ -257941,7 +276658,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -257959,8 +276676,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -257976,7 +276693,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -257985,11 +276702,11 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -258010,7 +276727,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2441,
+ "id": 2439,
"path": "Metadata"
}
},
@@ -258076,8 +276793,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -258093,7 +276810,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -258102,11 +276819,11 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -258127,7 +276844,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2441,
+ "id": 2439,
"path": "Metadata"
}
},
@@ -258175,12 +276892,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -258214,7 +276931,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2441,
+ "id": 2439,
"path": "Metadata"
}
},
@@ -258241,7 +276958,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -258268,7 +276985,7 @@
],
"trait": {
"args": null,
- "id": 157,
+ "id": 155,
"path": "ToOwned"
}
}
@@ -258277,11 +276994,11 @@
"name": null,
"span": {
"begin": [
- 82,
+ 85,
1
],
"end": [
- 84,
+ 87,
14
],
"filename": "checkouts/rust/library/alloc/src/borrow.rs"
@@ -258330,7 +277047,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 2441,
+ "id": 2439,
"path": "Metadata"
}
}
@@ -258369,7 +277086,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2441,
+ "id": 2439,
"path": "Metadata"
}
},
@@ -258388,7 +277105,7 @@
],
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -258459,7 +277176,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -258471,7 +277188,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -258482,11 +277199,11 @@
"name": "fmt",
"span": {
"begin": [
- 1977,
+ 2063,
5
],
"end": [
- 1992,
+ 2078,
6
],
"filename": "std/src/fs.rs"
@@ -258509,7 +277226,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2441,
+ "id": 2439,
"path": "Metadata"
}
},
@@ -258526,7 +277243,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -258535,11 +277252,11 @@
"name": null,
"span": {
"begin": [
- 1976,
+ 2062,
1
],
"end": [
- 1993,
+ 2079,
2
],
"filename": "std/src/fs.rs"
@@ -258650,9 +277367,6 @@
"kind": {
"plain": {
"fields": [
- 4860,
- 4861,
- 4862,
4863,
4864,
4865,
@@ -258671,7 +277385,10 @@
4878,
4879,
4880,
- 4881
+ 4881,
+ 4882,
+ 4883,
+ 4884
],
"has_stripped_fields": false
}
@@ -258710,8 +277427,8 @@
"use": {
"id": 264,
"is_glob": false,
- "name": "RADIX",
- "source": "core::f32::RADIX"
+ "name": "consts",
+ "source": "core::f32::consts"
}
},
"links": {},
@@ -258719,11 +277436,11 @@
"span": {
"begin": [
19,
- 38
+ 45
],
"end": [
19,
- 43
+ 51
],
"filename": "std/src/num/f32.rs"
},
@@ -259852,7 +278569,10 @@
"265": {
"attrs": [
{
- "other": "#[allow(deprecated, deprecated_in_future)]"
+ "other": "#[rustc_doc_primitive = \"f32\"]"
+ },
+ {
+ "other": "#[doc(alias = \"single\")]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -259860,28 +278580,47 @@
],
"crate_id": 0,
"deprecation": null,
- "docs": null,
+ "docs": "A 32-bit floating-point type (specifically, the \"binary32\" type defined in IEEE 754-2008).\n\nThis type can represent a wide range of decimal numbers, like `3.5`, `27`,\n`-113.75`, `0.0078125`, `34359738368`, `0`, `-1`. So unlike integer types\n(such as `i32`), floating-point types can represent non-integer numbers,\ntoo.\n\nHowever, being able to represent this wide range of numbers comes at the\ncost of precision: floats can only represent some of the real numbers and\ncalculation with floats round to a nearby representable number. For example,\n`5.0` and `1.0` can be exactly represented as `f32`, but `1.0 / 5.0` results\nin `0.20000000298023223876953125` since `0.2` cannot be exactly represented\nas `f32`. Note, however, that printing floats with `println` and friends will\noften discard insignificant digits: `println!(\"{}\", 1.0f32 / 5.0f32)` will\nprint `0.2`.\n\nAdditionally, `f32` can represent some special values:\n\n- −0.0: IEEE 754 floating-point numbers have a bit that indicates their sign, so −0.0 is a\n possible value. For comparison −0.0 = +0.0, but floating-point operations can carry\n the sign bit through arithmetic operations. This means −0.0 × +0.0 produces −0.0 and\n a negative number rounded to a value smaller than a float can represent also produces −0.0.\n- [∞](#associatedconstant.INFINITY) and\n [−∞](#associatedconstant.NEG_INFINITY): these result from calculations\n like `1.0 / 0.0`.\n- [NaN (not a number)](#associatedconstant.NAN): this value results from\n calculations like `(-1.0).sqrt()`. NaN has some potentially unexpected\n behavior:\n - It is not equal to any float, including itself! This is the reason `f32`\n doesn't implement the `Eq` trait.\n - It is also neither smaller nor greater than any float, making it\n impossible to sort by the default comparison operation, which is the\n reason `f32` doesn't implement the `Ord` trait.\n - It is also considered *infectious* as almost all calculations where one\n of the operands is NaN will also result in NaN. The explanations on this\n page only explicitly document behavior on NaN operands if this default\n is deviated from.\n - Lastly, there are multiple bit patterns that are considered NaN.\n Rust does not currently guarantee that the bit patterns of NaN are\n preserved over arithmetic operations, and they are not guaranteed to be\n portable or even fully deterministic! This means that there may be some\n surprising results upon inspecting the bit patterns,\n as the same calculations might produce NaNs with different bit patterns.\n This also affects the sign of the NaN: checking `is_sign_positive` or `is_sign_negative` on\n a NaN is the most common way to run into these surprising results.\n (Checking `x >= 0.0` or `x <= 0.0` avoids those surprises, but also how negative/positive\n zero are treated.)\n See the section below for what exactly is guaranteed about the bit pattern of a NaN.\n\nWhen a primitive operation (addition, subtraction, multiplication, or\ndivision) is performed on this type, the result is rounded according to the\nroundTiesToEven direction defined in IEEE 754-2008. That means:\n\n- The result is the representable value closest to the true value, if there\n is a unique closest representable value.\n- If the true value is exactly half-way between two representable values,\n the result is the one with an even least-significant binary digit.\n- If the true value's magnitude is ≥ `f32::MAX` + 2(`f32::MAX_EXP` −\n `f32::MANTISSA_DIGITS` − 1), the result is ∞ or −∞ (preserving the\n true value's sign).\n- If the result of a sum exactly equals zero, the outcome is +0.0 unless\n both arguments were negative, then it is -0.0. Subtraction `a - b` is\n regarded as a sum `a + (-b)`.\n\nFor more information on floating-point numbers, see [Wikipedia][wikipedia].\n\n*[See also the `std::f32::consts` module](crate::f32::consts).*\n\n[wikipedia]: https://en.wikipedia.org/wiki/Single-precision_floating-point_format\n\n# NaN bit patterns\n\nThis section defines the possible NaN bit patterns returned by floating-point operations.\n\nThe bit pattern of a floating-point NaN value is defined by:\n- a sign bit.\n- a quiet/signaling bit. Rust assumes that the quiet/signaling bit being set to `1` indicates a\n quiet NaN (QNaN), and a value of `0` indicates a signaling NaN (SNaN). In the following we\n will hence just call it the \"quiet bit\".\n- a payload, which makes up the rest of the significand (i.e., the mantissa) except for the\n quiet bit.\n\nThe rules for NaN values differ between *arithmetic* and *non-arithmetic* (or \"bitwise\")\noperations. The non-arithmetic operations are unary `-`, `abs`, `copysign`, `signum`,\n`{to,from}_bits`, `{to,from}_{be,le,ne}_bytes` and `is_sign_{positive,negative}`. These\noperations are guaranteed to exactly preserve the bit pattern of their input except for possibly\nchanging the sign bit.\n\nThe following rules apply when a NaN value is returned from an arithmetic operation:\n- The result has a non-deterministic sign.\n- The quiet bit and payload are non-deterministically chosen from\n the following set of options:\n\n - **Preferred NaN**: The quiet bit is set and the payload is all-zero.\n - **Quieting NaN propagation**: The quiet bit is set and the payload is copied from any input\n operand that is a NaN. If the inputs and outputs do not have the same payload size (i.e., for\n `as` casts), then\n - If the output is smaller than the input, low-order bits of the payload get dropped.\n - If the output is larger than the input, the payload gets filled up with 0s in the low-order\n bits.\n - **Unchanged NaN propagation**: The quiet bit and payload are copied from any input operand\n that is a NaN. If the inputs and outputs do not have the same size (i.e., for `as` casts), the\n same rules as for \"quieting NaN propagation\" apply, with one caveat: if the output is smaller\n than the input, dropping the low-order bits may result in a payload of 0; a payload of 0 is not\n possible with a signaling NaN (the all-0 significand encodes an infinity) so unchanged NaN\n propagation cannot occur with some inputs.\n - **Target-specific NaN**: The quiet bit is set and the payload is picked from a target-specific\n set of \"extra\" possible NaN payloads. The set can depend on the input operand values.\n See the table below for the concrete NaNs this set contains on various targets.\n\nIn particular, if all input NaNs are quiet (or if there are no input NaNs), then the output NaN\nis definitely quiet. Signaling NaN outputs can only occur if they are provided as an input\nvalue. Similarly, if all input NaNs are preferred (or if there are no input NaNs) and the target\ndoes not have any \"extra\" NaN payloads, then the output NaN is guaranteed to be preferred.\n\nThe non-deterministic choice happens when the operation is executed; i.e., the result of a\nNaN-producing floating-point operation is a stable bit pattern (looking at these bits multiple\ntimes will yield consistent results), but running the same operation twice with the same inputs\ncan produce different results.\n\nThese guarantees are neither stronger nor weaker than those of IEEE 754: IEEE 754 guarantees\nthat an operation never returns a signaling NaN, whereas it is possible for operations like\n`SNAN * 1.0` to return a signaling NaN in Rust. Conversely, IEEE 754 makes no statement at all\nabout which quiet NaN is returned, whereas Rust restricts the set of possible results to the\nones listed above.\n\nUnless noted otherwise, the same rules also apply to NaNs returned by other library functions\n(e.g. `min`, `minimum`, `max`, `maximum`); other aspects of their semantics and which IEEE 754\noperation they correspond to are documented with the respective functions.\n\nWhen an arithmetic floating-point operation is executed in `const` context, the same rules\napply: no guarantee is made about which of the NaN bit patterns described above will be\nreturned. The result does not have to match what happens when executing the same code at\nruntime, and the result can vary depending on factors such as compiler version and flags.\n\n### Target-specific \"extra\" NaN values\n\n| `target_arch` | Extra payloads possible on this platform |\n|---------------|------------------------------------------|\n| `aarch64`, `arm`, `arm64ec`, `loongarch64`, `powerpc` (except when `target_abi = \"spe\"`), `powerpc64`, `riscv32`, `riscv64`, `s390x`, `x86`, `x86_64` | None |\n| `nvptx64` | All payloads |\n| `sparc`, `sparc64` | The all-one payload |\n| `wasm32`, `wasm64` | If all input NaNs are quiet with all-zero payload: None.
Otherwise: all payloads. |\n\nFor targets not in this table, all payloads are possible.\n\n# Algebraic operators\n\nAlgebraic operators of the form `a.algebraic_*(b)` allow the compiler to optimize\nfloating point operations using all the usual algebraic properties of real numbers --\ndespite the fact that those properties do *not* hold on floating point numbers.\nThis can give a great performance boost since it may unlock vectorization.\n\nThe exact set of optimizations is unspecified but typically allows combining operations,\nrearranging series of operations based on mathematical properties, converting between division\nand reciprocal multiplication, and disregarding the sign of zero. This means that the results of\nelementary operations may have undefined precision, and \"non-mathematical\" values\nsuch as NaN, +/-Inf, or -0.0 may behave in unexpected ways, but these operations\nwill never cause undefined behavior.\n\nBecause of the unpredictable nature of compiler optimizations, the same inputs may produce\ndifferent results even within a single program run. **Unsafe code must not rely on any property\nof the return value for soundness.** However, implementations will generally do their best to\npick a reasonable tradeoff between performance and accuracy of the result.\n\nFor example:\n\n```\n# #![feature(float_algebraic)]\n# #![allow(unused_assignments)]\n# let mut x: f32 = 0.0;\n# let a: f32 = 1.0;\n# let b: f32 = 2.0;\n# let c: f32 = 3.0;\n# let d: f32 = 4.0;\nx = a.algebraic_add(b).algebraic_add(c).algebraic_add(d);\n```\n\nMay be rewritten as:\n\n```\n# #![allow(unused_assignments)]\n# let mut x: f32 = 0.0;\n# let a: f32 = 1.0;\n# let b: f32 = 2.0;\n# let c: f32 = 3.0;\n# let d: f32 = 4.0;\nx = a + b + c + d; // As written\nx = (a + c) + (b + d); // Reordered to shorten critical path and enable vectorization\n```",
"id": 265,
"inner": {
- "use": {
- "id": 266,
- "is_glob": false,
- "name": "consts",
- "source": "core::f32::consts"
+ "primitive": {
+ "impls": [
+ 9956,
+ 10006,
+ 10007,
+ 10008,
+ 10009,
+ 10010,
+ 10011,
+ 10012,
+ 10013,
+ 10014,
+ 10015,
+ 10016,
+ 10017,
+ 10018,
+ 10019,
+ 10020,
+ 10021,
+ 10022
+ ],
+ "name": "f32"
}
},
- "links": {},
- "name": null,
+ "links": {
+ "crate::f32::consts": 264
+ },
+ "name": "f32",
"span": {
"begin": [
- 19,
- 45
+ 1367,
+ 1
],
"end": [
- 19,
- 51
+ 1367,
+ 16
],
- "filename": "std/src/num/f32.rs"
+ "filename": "std/src/../../core/src/primitive_docs.rs"
},
"visibility": "public"
},
@@ -259960,7 +278699,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2441,
+ "id": 2439,
"path": "crate::fs::Metadata"
}
},
@@ -260042,8 +278781,6 @@
"is_dyn_compatible": true,
"is_unsafe": false,
"items": [
- 4836,
- 4837,
4838,
4839,
4840,
@@ -260063,12 +278800,14 @@
4854,
4855,
4856,
- 4857
+ 4857,
+ 4858,
+ 4859
]
}
},
"links": {
- "crate::fs::Metadata": 2441
+ "crate::fs::Metadata": 2439
},
"name": "MetadataExt",
"span": {
@@ -260129,11 +278868,11 @@
"name": "dev",
"span": {
"begin": [
- 741,
+ 830,
5
],
"end": [
- 743,
+ 832,
6
],
"filename": "std/src/os/unix/fs.rs"
@@ -260185,11 +278924,11 @@
"name": "ino",
"span": {
"begin": [
- 744,
+ 833,
5
],
"end": [
- 746,
+ 835,
6
],
"filename": "std/src/os/unix/fs.rs"
@@ -260241,11 +278980,11 @@
"name": "mode",
"span": {
"begin": [
- 747,
+ 836,
5
],
"end": [
- 749,
+ 838,
6
],
"filename": "std/src/os/unix/fs.rs"
@@ -260297,11 +279036,11 @@
"name": "nlink",
"span": {
"begin": [
- 750,
+ 839,
5
],
"end": [
- 752,
+ 841,
6
],
"filename": "std/src/os/unix/fs.rs"
@@ -260350,26 +279089,82 @@
}
},
"links": {},
- "name": "uid",
+ "name": "uid",
+ "span": {
+ "begin": [
+ 842,
+ 5
+ ],
+ "end": [
+ 844,
+ 6
+ ],
+ "filename": "std/src/os/unix/fs.rs"
+ },
+ "visibility": "default"
+ },
+ "2658": {
+ "attrs": [],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": null,
+ "id": 2658,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u32"
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "gid",
"span": {
"begin": [
- 753,
+ 845,
5
],
"end": [
- 755,
+ 847,
6
],
"filename": "std/src/os/unix/fs.rs"
},
"visibility": "default"
},
- "2658": {
+ "2659": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2658,
+ "id": 2659,
"inner": {
"function": {
"generics": {
@@ -260400,81 +279195,81 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u32"
+ "primitive": "u64"
}
}
}
},
"links": {},
- "name": "gid",
+ "name": "rdev",
"span": {
"begin": [
- 756,
+ 848,
5
],
"end": [
- 758,
+ 850,
6
],
"filename": "std/src/os/unix/fs.rs"
},
"visibility": "default"
},
- "2659": {
- "attrs": [],
+ "266": {
+ "attrs": [
+ {
+ "other": "#[allow(missing_docs)]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ },
+ {
+ "other": "#[attr = Path(\"num/f32.rs\")]"
+ }
+ ],
"crate_id": 0,
"deprecation": null,
- "docs": null,
- "id": 2659,
+ "docs": "Constants for the `f32` single-precision floating point type.\n\n*[See also the `f32` primitive type](primitive@f32).*\n\nMathematically significant numbers are provided in the `consts` sub-module.\n\nFor the constants defined directly in this module\n(as distinct from those defined in the `consts` sub-module),\nnew code should instead use the associated constants\ndefined directly on the `f32` type.",
+ "id": 266,
"inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "u64"
- }
- }
+ "module": {
+ "is_crate": false,
+ "is_stripped": false,
+ "items": [
+ 235,
+ 237,
+ 239,
+ 241,
+ 243,
+ 245,
+ 247,
+ 249,
+ 251,
+ 253,
+ 255,
+ 257,
+ 259,
+ 261,
+ 263
+ ]
}
},
- "links": {},
- "name": "rdev",
+ "links": {
+ "primitive@f32": 265
+ },
+ "name": "f32",
"span": {
"begin": [
- 759,
- 5
+ 1,
+ 1
],
"end": [
- 761,
- 6
+ 1263,
+ 2
],
- "filename": "std/src/os/unix/fs.rs"
+ "filename": "std/src/num/f32.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
"2660": {
"attrs": [],
@@ -260521,11 +279316,11 @@
"name": "size",
"span": {
"begin": [
- 762,
+ 851,
5
],
"end": [
- 764,
+ 853,
6
],
"filename": "std/src/os/unix/fs.rs"
@@ -260577,11 +279372,11 @@
"name": "atime",
"span": {
"begin": [
- 765,
+ 854,
5
],
"end": [
- 767,
+ 856,
6
],
"filename": "std/src/os/unix/fs.rs"
@@ -260633,11 +279428,11 @@
"name": "atime_nsec",
"span": {
"begin": [
- 768,
+ 857,
5
],
"end": [
- 770,
+ 859,
6
],
"filename": "std/src/os/unix/fs.rs"
@@ -260689,11 +279484,11 @@
"name": "mtime",
"span": {
"begin": [
- 771,
+ 860,
5
],
"end": [
- 773,
+ 862,
6
],
"filename": "std/src/os/unix/fs.rs"
@@ -260745,11 +279540,11 @@
"name": "mtime_nsec",
"span": {
"begin": [
- 774,
+ 863,
5
],
"end": [
- 776,
+ 865,
6
],
"filename": "std/src/os/unix/fs.rs"
@@ -260801,11 +279596,11 @@
"name": "ctime",
"span": {
"begin": [
- 777,
+ 866,
5
],
"end": [
- 779,
+ 868,
6
],
"filename": "std/src/os/unix/fs.rs"
@@ -260857,11 +279652,11 @@
"name": "ctime_nsec",
"span": {
"begin": [
- 780,
+ 869,
5
],
"end": [
- 782,
+ 871,
6
],
"filename": "std/src/os/unix/fs.rs"
@@ -260913,11 +279708,11 @@
"name": "blksize",
"span": {
"begin": [
- 783,
+ 872,
5
],
"end": [
- 785,
+ 874,
6
],
"filename": "std/src/os/unix/fs.rs"
@@ -260969,11 +279764,11 @@
"name": "blocks",
"span": {
"begin": [
- 786,
+ 875,
5
],
"end": [
- 788,
+ 877,
6
],
"filename": "std/src/os/unix/fs.rs"
@@ -260999,7 +279794,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2441,
+ "id": 2439,
"path": "fs::Metadata"
}
},
@@ -261040,11 +279835,11 @@
"name": null,
"span": {
"begin": [
- 740,
+ 829,
1
],
"end": [
- 793,
+ 882,
2
],
"filename": "std/src/os/unix/fs.rs"
@@ -261054,10 +279849,7 @@
"267": {
"attrs": [
{
- "other": "#[rustc_doc_primitive = \"f32\"]"
- },
- {
- "other": "#[doc(alias = \"single\")]"
+ "other": "#[allow(deprecated, deprecated_in_future)]"
},
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -261065,47 +279857,28 @@
],
"crate_id": 0,
"deprecation": null,
- "docs": "A 32-bit floating-point type (specifically, the \"binary32\" type defined in IEEE 754-2008).\n\nThis type can represent a wide range of decimal numbers, like `3.5`, `27`,\n`-113.75`, `0.0078125`, `34359738368`, `0`, `-1`. So unlike integer types\n(such as `i32`), floating-point types can represent non-integer numbers,\ntoo.\n\nHowever, being able to represent this wide range of numbers comes at the\ncost of precision: floats can only represent some of the real numbers and\ncalculation with floats round to a nearby representable number. For example,\n`5.0` and `1.0` can be exactly represented as `f32`, but `1.0 / 5.0` results\nin `0.20000000298023223876953125` since `0.2` cannot be exactly represented\nas `f32`. Note, however, that printing floats with `println` and friends will\noften discard insignificant digits: `println!(\"{}\", 1.0f32 / 5.0f32)` will\nprint `0.2`.\n\nAdditionally, `f32` can represent some special values:\n\n- −0.0: IEEE 754 floating-point numbers have a bit that indicates their sign, so −0.0 is a\n possible value. For comparison −0.0 = +0.0, but floating-point operations can carry\n the sign bit through arithmetic operations. This means −0.0 × +0.0 produces −0.0 and\n a negative number rounded to a value smaller than a float can represent also produces −0.0.\n- [∞](#associatedconstant.INFINITY) and\n [−∞](#associatedconstant.NEG_INFINITY): these result from calculations\n like `1.0 / 0.0`.\n- [NaN (not a number)](#associatedconstant.NAN): this value results from\n calculations like `(-1.0).sqrt()`. NaN has some potentially unexpected\n behavior:\n - It is not equal to any float, including itself! This is the reason `f32`\n doesn't implement the `Eq` trait.\n - It is also neither smaller nor greater than any float, making it\n impossible to sort by the default comparison operation, which is the\n reason `f32` doesn't implement the `Ord` trait.\n - It is also considered *infectious* as almost all calculations where one\n of the operands is NaN will also result in NaN. The explanations on this\n page only explicitly document behavior on NaN operands if this default\n is deviated from.\n - Lastly, there are multiple bit patterns that are considered NaN.\n Rust does not currently guarantee that the bit patterns of NaN are\n preserved over arithmetic operations, and they are not guaranteed to be\n portable or even fully deterministic! This means that there may be some\n surprising results upon inspecting the bit patterns,\n as the same calculations might produce NaNs with different bit patterns.\n This also affects the sign of the NaN: checking `is_sign_positive` or `is_sign_negative` on\n a NaN is the most common way to run into these surprising results.\n (Checking `x >= 0.0` or `x <= 0.0` avoids those surprises, but also how negative/positive\n zero are treated.)\n See the section below for what exactly is guaranteed about the bit pattern of a NaN.\n\nWhen a primitive operation (addition, subtraction, multiplication, or\ndivision) is performed on this type, the result is rounded according to the\nroundTiesToEven direction defined in IEEE 754-2008. That means:\n\n- The result is the representable value closest to the true value, if there\n is a unique closest representable value.\n- If the true value is exactly half-way between two representable values,\n the result is the one with an even least-significant binary digit.\n- If the true value's magnitude is ≥ `f32::MAX` + 2(`f32::MAX_EXP` −\n `f32::MANTISSA_DIGITS` − 1), the result is ∞ or −∞ (preserving the\n true value's sign).\n- If the result of a sum exactly equals zero, the outcome is +0.0 unless\n both arguments were negative, then it is -0.0. Subtraction `a - b` is\n regarded as a sum `a + (-b)`.\n\nFor more information on floating-point numbers, see [Wikipedia][wikipedia].\n\n*[See also the `std::f32::consts` module](crate::f32::consts).*\n\n[wikipedia]: https://en.wikipedia.org/wiki/Single-precision_floating-point_format\n\n# NaN bit patterns\n\nThis section defines the possible NaN bit patterns returned by floating-point operations.\n\nThe bit pattern of a floating-point NaN value is defined by:\n- a sign bit.\n- a quiet/signaling bit. Rust assumes that the quiet/signaling bit being set to `1` indicates a\n quiet NaN (QNaN), and a value of `0` indicates a signaling NaN (SNaN). In the following we\n will hence just call it the \"quiet bit\".\n- a payload, which makes up the rest of the significand (i.e., the mantissa) except for the\n quiet bit.\n\nThe rules for NaN values differ between *arithmetic* and *non-arithmetic* (or \"bitwise\")\noperations. The non-arithmetic operations are unary `-`, `abs`, `copysign`, `signum`,\n`{to,from}_bits`, `{to,from}_{be,le,ne}_bytes` and `is_sign_{positive,negative}`. These\noperations are guaranteed to exactly preserve the bit pattern of their input except for possibly\nchanging the sign bit.\n\nThe following rules apply when a NaN value is returned from an arithmetic operation:\n- The result has a non-deterministic sign.\n- The quiet bit and payload are non-deterministically chosen from\n the following set of options:\n\n - **Preferred NaN**: The quiet bit is set and the payload is all-zero.\n - **Quieting NaN propagation**: The quiet bit is set and the payload is copied from any input\n operand that is a NaN. If the inputs and outputs do not have the same payload size (i.e., for\n `as` casts), then\n - If the output is smaller than the input, low-order bits of the payload get dropped.\n - If the output is larger than the input, the payload gets filled up with 0s in the low-order\n bits.\n - **Unchanged NaN propagation**: The quiet bit and payload are copied from any input operand\n that is a NaN. If the inputs and outputs do not have the same size (i.e., for `as` casts), the\n same rules as for \"quieting NaN propagation\" apply, with one caveat: if the output is smaller\n than the input, dropping the low-order bits may result in a payload of 0; a payload of 0 is not\n possible with a signaling NaN (the all-0 significand encodes an infinity) so unchanged NaN\n propagation cannot occur with some inputs.\n - **Target-specific NaN**: The quiet bit is set and the payload is picked from a target-specific\n set of \"extra\" possible NaN payloads. The set can depend on the input operand values.\n See the table below for the concrete NaNs this set contains on various targets.\n\nIn particular, if all input NaNs are quiet (or if there are no input NaNs), then the output NaN\nis definitely quiet. Signaling NaN outputs can only occur if they are provided as an input\nvalue. Similarly, if all input NaNs are preferred (or if there are no input NaNs) and the target\ndoes not have any \"extra\" NaN payloads, then the output NaN is guaranteed to be preferred.\n\nThe non-deterministic choice happens when the operation is executed; i.e., the result of a\nNaN-producing floating-point operation is a stable bit pattern (looking at these bits multiple\ntimes will yield consistent results), but running the same operation twice with the same inputs\ncan produce different results.\n\nThese guarantees are neither stronger nor weaker than those of IEEE 754: IEEE 754 guarantees\nthat an operation never returns a signaling NaN, whereas it is possible for operations like\n`SNAN * 1.0` to return a signaling NaN in Rust. Conversely, IEEE 754 makes no statement at all\nabout which quiet NaN is returned, whereas Rust restricts the set of possible results to the\nones listed above.\n\nUnless noted otherwise, the same rules also apply to NaNs returned by other library functions\n(e.g. `min`, `minimum`, `max`, `maximum`); other aspects of their semantics and which IEEE 754\noperation they correspond to are documented with the respective functions.\n\nWhen an arithmetic floating-point operation is executed in `const` context, the same rules\napply: no guarantee is made about which of the NaN bit patterns described above will be\nreturned. The result does not have to match what happens when executing the same code at\nruntime, and the result can vary depending on factors such as compiler version and flags.\n\n### Target-specific \"extra\" NaN values\n\n| `target_arch` | Extra payloads possible on this platform |\n|---------------|------------------------------------------|\n| `aarch64`, `arm`, `arm64ec`, `loongarch64`, `powerpc` (except when `target_abi = \"spe\"`), `powerpc64`, `riscv32`, `riscv64`, `s390x`, `x86`, `x86_64` | None |\n| `nvptx64` | All payloads |\n| `sparc`, `sparc64` | The all-one payload |\n| `wasm32`, `wasm64` | If all input NaNs are quiet with all-zero payload: None.
Otherwise: all payloads. |\n\nFor targets not in this table, all payloads are possible.\n\n# Algebraic operators\n\nAlgebraic operators of the form `a.algebraic_*(b)` allow the compiler to optimize\nfloating point operations using all the usual algebraic properties of real numbers --\ndespite the fact that those properties do *not* hold on floating point numbers.\nThis can give a great performance boost since it may unlock vectorization.\n\nThe exact set of optimizations is unspecified but typically allows combining operations,\nrearranging series of operations based on mathematical properties, converting between division\nand reciprocal multiplication, and disregarding the sign of zero. This means that the results of\nelementary operations may have undefined precision, and \"non-mathematical\" values\nsuch as NaN, +/-Inf, or -0.0 may behave in unexpected ways, but these operations\nwill never cause undefined behavior.\n\nBecause of the unpredictable nature of compiler optimizations, the same inputs may produce\ndifferent results even within a single program run. **Unsafe code must not rely on any property\nof the return value for soundness.** However, implementations will generally do their best to\npick a reasonable tradeoff between performance and accuracy of the result.\n\nFor example:\n\n```\n# #![feature(float_algebraic)]\n# #![allow(unused_assignments)]\n# let mut x: f32 = 0.0;\n# let a: f32 = 1.0;\n# let b: f32 = 2.0;\n# let c: f32 = 3.0;\n# let d: f32 = 4.0;\nx = a.algebraic_add(b).algebraic_add(c).algebraic_add(d);\n```\n\nMay be rewritten as:\n\n```\n# #![allow(unused_assignments)]\n# let mut x: f32 = 0.0;\n# let a: f32 = 1.0;\n# let b: f32 = 2.0;\n# let c: f32 = 3.0;\n# let d: f32 = 4.0;\nx = a + b + c + d; // As written\nx = (a + c) + (b + d); // Reordered to shorten critical path and enable vectorization\n```",
+ "docs": null,
"id": 267,
"inner": {
- "primitive": {
- "impls": [
- 9735,
- 9785,
- 9786,
- 9787,
- 9788,
- 9789,
- 9790,
- 9791,
- 9792,
- 9793,
- 9794,
- 9795,
- 9796,
- 9797,
- 9798,
- 9799,
- 9800,
- 9801
- ],
- "name": "f32"
+ "use": {
+ "id": 268,
+ "is_glob": false,
+ "name": "DIGITS",
+ "source": "core::f64::DIGITS"
}
},
- "links": {
- "crate::f32::consts": 266
- },
- "name": "f32",
+ "links": {},
+ "name": null,
"span": {
"begin": [
- 1367,
- 1
+ 18,
+ 5
],
"end": [
- 1367,
- 16
+ 18,
+ 11
],
- "filename": "std/src/../../core/src/primitive_docs.rs"
+ "filename": "std/src/num/f64.rs"
},
"visibility": "public"
},
@@ -261133,11 +279906,6 @@
"is_dyn_compatible": true,
"is_unsafe": false,
"items": [
- 4899,
- 4900,
- 4901,
- 4902,
- 4903,
4904,
4905,
4906,
@@ -261148,21 +279916,26 @@
4911,
4912,
4913,
- 4914
+ 4914,
+ 4915,
+ 4916,
+ 4917,
+ 4918,
+ 4919
]
}
},
"links": {
- "`fs::Metadata`": 2441
+ "`fs::Metadata`": 2439
},
"name": "MetadataExt",
"span": {
"begin": [
- 449,
+ 538,
1
],
"end": [
- 737,
+ 826,
2
],
"filename": "std/src/os/unix/fs.rs"
@@ -261267,11 +280040,6 @@
"where_predicates": []
},
"impls": [
- 5526,
- 5527,
- 5528,
- 5529,
- 5530,
5531,
5532,
5533,
@@ -261282,16 +280050,16 @@
5538,
5539,
5540,
- 5542
+ 5541,
+ 5542,
+ 5543,
+ 5544,
+ 5545,
+ 5547
],
"kind": {
"plain": {
"fields": [
- 5508,
- 5509,
- 5510,
- 5511,
- 5512,
5513,
5514,
5515,
@@ -261304,7 +280072,12 @@
5522,
5523,
5524,
- 5525
+ 5525,
+ 5526,
+ 5527,
+ 5528,
+ 5529,
+ 5530
],
"has_stripped_fields": false
}
@@ -261592,82 +280365,26 @@
}
},
"links": {},
- "name": "st_uid",
- "span": {
- "begin": [
- 352,
- 5
- ],
- "end": [
- 354,
- 6
- ],
- "filename": "std/src/os/linux/fs.rs"
- },
- "visibility": "default"
- },
- "2678": {
- "attrs": [],
- "crate_id": 0,
- "deprecation": null,
- "docs": null,
- "id": 2678,
- "inner": {
- "function": {
- "generics": {
- "params": [],
- "where_predicates": []
- },
- "has_body": true,
- "header": {
- "abi": "Rust",
- "is_async": false,
- "is_const": false,
- "is_unsafe": false
- },
- "sig": {
- "inputs": [
- [
- "self",
- {
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
- }
- ]
- ],
- "is_c_variadic": false,
- "output": {
- "primitive": "u32"
- }
- }
- }
- },
- "links": {},
- "name": "st_gid",
+ "name": "st_uid",
"span": {
"begin": [
- 355,
+ 352,
5
],
"end": [
- 357,
+ 354,
6
],
"filename": "std/src/os/linux/fs.rs"
},
"visibility": "default"
},
- "2679": {
+ "2678": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
- "id": 2679,
+ "id": 2678,
"inner": {
"function": {
"generics": {
@@ -261698,81 +280415,81 @@
],
"is_c_variadic": false,
"output": {
- "primitive": "u64"
+ "primitive": "u32"
}
}
}
},
"links": {},
- "name": "st_rdev",
+ "name": "st_gid",
"span": {
"begin": [
- 358,
+ 355,
5
],
"end": [
- 360,
+ 357,
6
],
"filename": "std/src/os/linux/fs.rs"
},
"visibility": "default"
},
- "268": {
- "attrs": [
- {
- "other": "#[allow(missing_docs)]"
- },
- {
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
- },
- {
- "other": "#[attr = Path(\"num/f32.rs\")]"
- }
- ],
+ "2679": {
+ "attrs": [],
"crate_id": 0,
"deprecation": null,
- "docs": "Constants for the `f32` single-precision floating point type.\n\n*[See also the `f32` primitive type](primitive@f32).*\n\nMathematically significant numbers are provided in the `consts` sub-module.\n\nFor the constants defined directly in this module\n(as distinct from those defined in the `consts` sub-module),\nnew code should instead use the associated constants\ndefined directly on the `f32` type.",
- "id": 268,
+ "docs": null,
+ "id": 2679,
"inner": {
- "module": {
- "is_crate": false,
- "is_stripped": false,
- "items": [
- 237,
- 239,
- 241,
- 243,
- 245,
- 247,
- 249,
- 251,
- 253,
- 255,
- 257,
- 259,
- 261,
- 263,
- 265
- ]
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "primitive": "u64"
+ }
+ }
}
},
- "links": {
- "primitive@f32": 267
- },
- "name": "f32",
+ "links": {},
+ "name": "st_rdev",
"span": {
"begin": [
- 1,
- 1
+ 358,
+ 5
],
"end": [
- 1260,
- 2
+ 360,
+ 6
],
- "filename": "std/src/num/f32.rs"
+ "filename": "std/src/os/linux/fs.rs"
},
- "visibility": "public"
+ "visibility": "default"
},
"2680": {
"attrs": [],
@@ -262297,7 +281014,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2441,
+ "id": 2439,
"path": "crate::fs::Metadata"
}
},
@@ -262367,8 +281084,8 @@
"use": {
"id": 270,
"is_glob": false,
- "name": "DIGITS",
- "source": "core::f64::DIGITS"
+ "name": "EPSILON",
+ "source": "core::f64::EPSILON"
}
},
"links": {},
@@ -262376,11 +281093,11 @@
"span": {
"begin": [
18,
- 5
+ 13
],
"end": [
18,
- 11
+ 20
],
"filename": "std/src/num/f64.rs"
},
@@ -262410,11 +281127,6 @@
"is_dyn_compatible": true,
"is_unsafe": false,
"items": [
- 5438,
- 5439,
- 5440,
- 5441,
- 5442,
5443,
5444,
5445,
@@ -262426,12 +281138,17 @@
5451,
5452,
5453,
- 5454
+ 5454,
+ 5455,
+ 5456,
+ 5457,
+ 5458,
+ 5459
]
}
},
"links": {
- "crate::fs::Metadata": 2441
+ "crate::fs::Metadata": 2439
},
"name": "MetadataExt",
"span": {
@@ -262855,7 +281572,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2441,
+ "id": 2439,
"path": "fs::Metadata"
}
},
@@ -262918,18 +281635,18 @@
"is_dyn_compatible": true,
"is_unsafe": false,
"items": [
- 5585,
- 5586,
- 5587,
- 5588,
- 5589,
5590,
- 5591
+ 5591,
+ 5592,
+ 5593,
+ 5594,
+ 5595,
+ 5596
]
}
},
"links": {
- "`fs::Metadata`": 2441
+ "`fs::Metadata`": 2439
},
"name": "MetadataExt",
"span": {
@@ -262990,11 +281707,11 @@
"name": "file_attributes",
"span": {
"begin": [
- 488,
+ 531,
5
],
"end": [
- 490,
+ 533,
6
],
"filename": "std/src/os/windows/fs.rs"
@@ -263046,11 +281763,11 @@
"name": "creation_time",
"span": {
"begin": [
- 491,
+ 534,
5
],
"end": [
- 493,
+ 536,
6
],
"filename": "std/src/os/windows/fs.rs"
@@ -263102,11 +281819,11 @@
"name": "last_access_time",
"span": {
"begin": [
- 494,
+ 537,
5
],
"end": [
- 496,
+ 539,
6
],
"filename": "std/src/os/windows/fs.rs"
@@ -263158,11 +281875,11 @@
"name": "last_write_time",
"span": {
"begin": [
- 497,
+ 540,
5
],
"end": [
- 499,
+ 542,
6
],
"filename": "std/src/os/windows/fs.rs"
@@ -263214,11 +281931,11 @@
"name": "file_size",
"span": {
"begin": [
- 500,
+ 543,
5
],
"end": [
- 502,
+ 545,
6
],
"filename": "std/src/os/windows/fs.rs"
@@ -263285,11 +282002,11 @@
"name": "volume_serial_number",
"span": {
"begin": [
- 503,
+ 546,
5
],
"end": [
- 505,
+ 548,
6
],
"filename": "std/src/os/windows/fs.rs"
@@ -263356,11 +282073,11 @@
"name": "number_of_links",
"span": {
"begin": [
- 506,
+ 549,
5
],
"end": [
- 508,
+ 551,
6
],
"filename": "std/src/os/windows/fs.rs"
@@ -263427,11 +282144,11 @@
"name": "file_index",
"span": {
"begin": [
- 509,
+ 552,
5
],
"end": [
- 511,
+ 554,
6
],
"filename": "std/src/os/windows/fs.rs"
@@ -263498,11 +282215,11 @@
"name": "change_time",
"span": {
"begin": [
- 512,
+ 555,
5
],
"end": [
- 514,
+ 557,
6
],
"filename": "std/src/os/windows/fs.rs"
@@ -263528,7 +282245,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2441,
+ "id": 2439,
"path": "crate::fs::Metadata"
}
},
@@ -263562,11 +282279,11 @@
"name": null,
"span": {
"begin": [
- 487,
+ 530,
1
],
"end": [
- 515,
+ 558,
2
],
"filename": "std/src/os/windows/fs.rs"
@@ -263590,8 +282307,8 @@
"use": {
"id": 272,
"is_glob": false,
- "name": "EPSILON",
- "source": "core::f64::EPSILON"
+ "name": "INFINITY",
+ "source": "core::f64::INFINITY"
}
},
"links": {},
@@ -263599,11 +282316,11 @@
"span": {
"begin": [
18,
- 13
+ 22
],
"end": [
18,
- 20
+ 30
],
"filename": "std/src/num/f64.rs"
},
@@ -263633,29 +282350,29 @@
"is_dyn_compatible": true,
"is_unsafe": false,
"items": [
- 5631,
- 5632,
- 5633,
- 5634,
- 5635,
- 5636,
- 5637,
- 5638,
- 5639
+ 5662,
+ 5663,
+ 5664,
+ 5665,
+ 5666,
+ 5667,
+ 5668,
+ 5669,
+ 5670
]
}
},
"links": {
- "`fs::Metadata`": 2441
+ "`fs::Metadata`": 2439
},
"name": "MetadataExt",
"span": {
"begin": [
- 303,
+ 346,
1
],
"end": [
- 484,
+ 527,
2
],
"filename": "std/src/os/windows/fs.rs"
@@ -263673,7 +282390,7 @@
],
"crate_id": 0,
"deprecation": null,
- "docs": "Returns an iterator over the entries within a directory.\n\nThe iterator will yield instances of [io::Result]<[DirEntry]>.\nNew errors may be encountered after an iterator is initially constructed.\nEntries for the current and parent directories (typically `.` and `..`) are\nskipped.\n\n# Platform-specific behavior\n\nThis function currently corresponds to the `opendir` function on Unix\nand the `FindFirstFileEx` function on Windows. Advancing the iterator\ncurrently corresponds to `readdir` on Unix and `FindNextFile` on Windows.\nNote that, this [may change in the future][changes].\n\n[changes]: io#platform-specific-behavior\n\nThe order in which this iterator returns entries is platform and filesystem\ndependent.\n\n# Errors\n\nThis function will return an error in the following situations, but is not\nlimited to just these cases:\n\n* The provided `path` doesn't exist.\n* The process lacks permissions to view the contents.\n* The `path` points at a non-directory file.\n\n# Examples\n\n```\nuse std::io;\nuse std::fs::{self, DirEntry};\nuse std::path::Path;\n\n// one possible implementation of walking a directory only visiting files\nfn visit_dirs(dir: &Path, cb: &dyn Fn(&DirEntry)) -> io::Result<()> {\n if dir.is_dir() {\n for entry in fs::read_dir(dir)? {\n let entry = entry?;\n let path = entry.path();\n if path.is_dir() {\n visit_dirs(&path, cb)?;\n } else {\n cb(&entry);\n }\n }\n }\n Ok(())\n}\n```\n\n```rust,no_run\nuse std::{fs, io};\n\nfn main() -> io::Result<()> {\n let mut entries = fs::read_dir(\".\")?\n .map(|res| res.map(|e| e.path()))\n .collect::, io::Error>>()?;\n\n // The order in which `read_dir` returns entries is not guaranteed. If reproducible\n // ordering is required the entries should be explicitly sorted.\n\n entries.sort();\n\n // The entries have now been sorted by their path.\n\n Ok(())\n}\n```",
+ "docs": "Returns an iterator over the entries within a directory.\n\nThe iterator will yield instances of [io::Result]<[DirEntry]>.\nNew errors may be encountered after an iterator is initially constructed.\nEntries for the current and parent directories (typically `.` and `..`) are\nskipped.\n\nThe order in which `read_dir` returns entries can change between calls. If reproducible\nordering is required, the entries should be explicitly sorted.\n\n# Platform-specific behavior\n\nThis function currently corresponds to the `opendir` function on Unix\nand the `FindFirstFileEx` function on Windows. Advancing the iterator\ncurrently corresponds to `readdir` on Unix and `FindNextFile` on Windows.\nNote that, this [may change in the future][changes].\n\n[changes]: io#platform-specific-behavior\n\nThe order in which this iterator returns entries is platform and filesystem\ndependent.\n\n# Errors\n\nThis function will return an error in the following situations, but is not\nlimited to just these cases:\n\n* The provided `path` doesn't exist.\n* The process lacks permissions to view the contents.\n* The `path` points at a non-directory file.\n\n# Examples\n\n```\nuse std::io;\nuse std::fs::{self, DirEntry};\nuse std::path::Path;\n\n// one possible implementation of walking a directory only visiting files\nfn visit_dirs(dir: &Path, cb: &dyn Fn(&DirEntry)) -> io::Result<()> {\n if dir.is_dir() {\n for entry in fs::read_dir(dir)? {\n let entry = entry?;\n let path = entry.path();\n if path.is_dir() {\n visit_dirs(&path, cb)?;\n } else {\n cb(&entry);\n }\n }\n }\n Ok(())\n}\n```\n\n```rust,no_run\nuse std::{fs, io};\n\nfn main() -> io::Result<()> {\n let mut entries = fs::read_dir(\".\")?\n .map(|res| res.map(|e| e.path()))\n .collect::, io::Error>>()?;\n\n // The order in which `read_dir` returns entries is not guaranteed. If reproducible\n // ordering is required the entries should be explicitly sorted.\n\n entries.sort();\n\n // The entries have now been sorted by their path.\n\n Ok(())\n}\n```",
"id": 2712,
"inner": {
"function": {
@@ -263695,7 +282412,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "crate::path::Path"
}
}
@@ -263754,7 +282471,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -263763,17 +282480,17 @@
},
"links": {
"DirEntry": 2713,
- "io#platform-specific-behavior": 501,
- "io::Result": 468
+ "io#platform-specific-behavior": 502,
+ "io::Result": 469
},
"name": "read_dir",
"span": {
"begin": [
- 3104,
+ 3193,
1
],
"end": [
- 3106,
+ 3195,
2
],
"filename": "std/src/fs.rs"
@@ -263825,7 +282542,7 @@
},
"links": {
"`ReadDir`": 2714,
- "io#platform-specific-behavior": 501
+ "io#platform-specific-behavior": 502
},
"name": "DirEntry",
"span": {
@@ -263886,9 +282603,9 @@
"DirEntry": 2713,
"`DirEntry`": 2713,
"`Err`": 59,
- "`io::Result`": 468,
+ "`io::Result`": 469,
"`read_dir`": 2712,
- "io::Result": 468
+ "io::Result": 469
},
"name": "ReadDir",
"span": {
@@ -264005,7 +282722,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -264079,7 +282796,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -264116,7 +282833,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -264185,7 +282902,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -264201,7 +282918,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -264210,12 +282927,12 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -264280,7 +282997,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -264296,7 +283013,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -264305,12 +283022,12 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -264396,7 +283113,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -264421,11 +283138,11 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -264469,7 +283186,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -264494,11 +283211,11 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -264567,7 +283284,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -264585,8 +283302,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -264602,7 +283319,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -264611,11 +283328,11 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -264702,8 +283419,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -264719,7 +283436,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -264728,11 +283445,11 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -264801,12 +283518,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -264967,7 +283684,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "$crate::fmt::Formatter"
}
}
@@ -264979,7 +283696,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "$crate::fmt::Result"
}
}
@@ -265018,8 +283735,8 @@
"use": {
"id": 274,
"is_glob": false,
- "name": "INFINITY",
- "source": "core::f64::INFINITY"
+ "name": "MANTISSA_DIGITS",
+ "source": "core::f64::MANTISSA_DIGITS"
}
},
"links": {},
@@ -265027,11 +283744,11 @@
"span": {
"begin": [
18,
- 22
+ 32
],
"end": [
18,
- 30
+ 47
],
"filename": "std/src/num/f64.rs"
},
@@ -265071,7 +283788,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -265141,11 +283858,11 @@
"name": "Item",
"span": {
"begin": [
- 2295,
+ 2381,
5
],
"end": [
- 2295,
+ 2381,
38
],
"filename": "std/src/fs.rs"
@@ -265211,7 +283928,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -265231,11 +283948,11 @@
"name": "next",
"span": {
"begin": [
- 2297,
+ 2383,
5
],
"end": [
- 2299,
+ 2385,
6
],
"filename": "std/src/fs.rs"
@@ -265362,11 +284079,11 @@
"name": null,
"span": {
"begin": [
- 2294,
+ 2380,
1
],
"end": [
- 2300,
+ 2386,
2
],
"filename": "std/src/fs.rs"
@@ -265420,7 +284137,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 1664,
+ "id": 1663,
"path": "PathBuf"
}
}
@@ -265431,11 +284148,11 @@
"name": "path",
"span": {
"begin": [
- 2333,
+ 2419,
5
],
"end": [
- 2335,
+ 2421,
6
],
"filename": "std/src/fs.rs"
@@ -265490,7 +284207,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2441,
+ "id": 2439,
"path": "Metadata"
}
}
@@ -265499,7 +284216,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -265507,17 +284224,17 @@
}
},
"links": {
- "File::metadata": 2440,
+ "File::metadata": 2438,
"metadata": 2596
},
"name": "metadata",
"span": {
"begin": [
- 2371,
+ 2457,
5
],
"end": [
- 2373,
+ 2459,
6
],
"filename": "std/src/fs.rs"
@@ -265581,7 +284298,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -265592,11 +284309,11 @@
"name": "file_type",
"span": {
"begin": [
- 2406,
+ 2492,
5
],
"end": [
- 2408,
+ 2494,
6
],
"filename": "std/src/fs.rs"
@@ -265650,7 +284367,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 1709,
+ "id": 1708,
"path": "OsString"
}
}
@@ -265661,11 +284378,11 @@
"name": "file_name",
"span": {
"begin": [
- 2435,
+ 2521,
5
],
"end": [
- 2437,
+ 2523,
6
],
"filename": "std/src/fs.rs"
@@ -265709,11 +284426,11 @@
"name": null,
"span": {
"begin": [
- 2302,
+ 2388,
1
],
"end": [
- 2438,
+ 2524,
2
],
"filename": "std/src/fs.rs"
@@ -265821,7 +284538,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -265895,7 +284612,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -265932,7 +284649,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -266001,7 +284718,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -266017,7 +284734,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -266026,12 +284743,12 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -266096,7 +284813,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -266112,7 +284829,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -266121,12 +284838,12 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -266212,7 +284929,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -266237,11 +284954,11 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -266285,7 +285002,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -266310,11 +285027,11 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -266338,8 +285055,8 @@
"use": {
"id": 276,
"is_glob": false,
- "name": "MANTISSA_DIGITS",
- "source": "core::f64::MANTISSA_DIGITS"
+ "name": "MAX",
+ "source": "core::f64::MAX"
}
},
"links": {},
@@ -266347,11 +285064,11 @@
"span": {
"begin": [
18,
- 32
+ 49
],
"end": [
18,
- 47
+ 52
],
"filename": "std/src/num/f64.rs"
},
@@ -266419,7 +285136,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -266437,8 +285154,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -266454,7 +285171,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -266463,11 +285180,11 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -266554,8 +285271,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -266571,7 +285288,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -266580,11 +285297,11 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -266653,12 +285370,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -266729,7 +285446,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -266741,7 +285458,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -266752,11 +285469,11 @@
"name": "fmt",
"span": {
"begin": [
- 2442,
+ 2528,
5
],
"end": [
- 2444,
+ 2530,
6
],
"filename": "std/src/fs.rs"
@@ -266796,7 +285513,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -266805,11 +285522,11 @@
"name": null,
"span": {
"begin": [
- 2441,
+ 2527,
1
],
"end": [
- 2445,
+ 2531,
2
],
"filename": "std/src/fs.rs"
@@ -266861,11 +285578,11 @@
"name": "ino",
"span": {
"begin": [
- 918,
+ 1007,
5
],
"end": [
- 920,
+ 1009,
6
],
"filename": "std/src/os/unix/fs.rs"
@@ -266917,11 +285634,11 @@
"name": null,
"span": {
"begin": [
- 917,
+ 1006,
1
],
"end": [
- 921,
+ 1010,
2
],
"filename": "std/src/os/unix/fs.rs"
@@ -266952,7 +285669,7 @@
"is_dyn_compatible": true,
"is_unsafe": false,
"items": [
- 4919
+ 4924
]
}
},
@@ -266962,11 +285679,11 @@
"name": "DirEntryExt",
"span": {
"begin": [
- 893,
+ 982,
1
],
"end": [
- 914,
+ 1003,
2
],
"filename": "std/src/os/unix/fs.rs"
@@ -267015,7 +285732,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1720,
+ "id": 1719,
"path": "OsStr"
}
}
@@ -267028,11 +285745,11 @@
"name": "file_name_ref",
"span": {
"begin": [
- 955,
+ 1044,
5
],
"end": [
- 957,
+ 1046,
6
],
"filename": "std/src/os/unix/fs.rs"
@@ -267084,11 +285801,11 @@
"name": null,
"span": {
"begin": [
- 954,
+ 1043,
1
],
"end": [
- 958,
+ 1047,
2
],
"filename": "std/src/os/unix/fs.rs"
@@ -267114,7 +285831,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 3814,
+ "id": 3813,
"path": "Sealed"
}
}
@@ -267131,7 +285848,7 @@
"is_dyn_compatible": true,
"is_unsafe": false,
"items": [
- 4920
+ 4925
]
}
},
@@ -267141,11 +285858,11 @@
"name": "DirEntryExt2",
"span": {
"begin": [
- 925,
+ 1014,
1
],
"end": [
- 947,
+ 1036,
2
],
"filename": "std/src/os/unix/fs.rs"
@@ -267281,7 +285998,7 @@
"is_dyn_compatible": true,
"is_unsafe": false,
"items": [
- 5597
+ 5602
]
}
},
@@ -267363,11 +286080,11 @@
"name": "read",
"span": {
"begin": [
- 1510,
+ 1591,
5
],
"end": [
- 1513,
+ 1594,
6
],
"filename": "std/src/fs.rs"
@@ -267435,11 +286152,11 @@
"name": "write",
"span": {
"begin": [
- 1531,
+ 1612,
5
],
"end": [
- 1534,
+ 1615,
6
],
"filename": "std/src/fs.rs"
@@ -267461,7 +286178,7 @@
"discriminant": null,
"kind": {
"tuple": [
- 4252
+ 4251
]
}
}
@@ -267534,7 +286251,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "Result"
}
}
@@ -267564,7 +286281,7 @@
],
"crate_id": 0,
"deprecation": null,
- "docs": "Sets the option to create a new file, or open it if it already exists.\n\nIn order for the file to be created, [`OpenOptions::write`] or\n[`OpenOptions::append`] access must be used.\n\nSee also [`std::fs::write()`][self::write] for a simple function to\ncreate a file with some given data.\n\n# Examples\n\n```no_run\nuse std::fs::OpenOptions;\n\nlet file = OpenOptions::new().write(true).create(true).open(\"foo.txt\");\n```",
+ "docs": "Sets the option to create a new file, or open it if it already exists.\n\nIn order for the file to be created, [`OpenOptions::write`] or\n[`OpenOptions::append`] access must be used.\n\nSee also [`std::fs::write()`][self::write] for a simple function to\ncreate a file with some given data.\n\n# Errors\n\nIf `.create(true)` is set without `.write(true)` or `.append(true)`,\ncalling [`open`](Self::open) will fail with [`InvalidInput`](io::ErrorKind::InvalidInput) error.\n# Examples\n\n```no_run\nuse std::fs::OpenOptions;\n\nlet file = OpenOptions::new().write(true).create(true).open(\"foo.txt\");\n```",
"id": 2769,
"inner": {
"function": {
@@ -267614,18 +286331,20 @@
}
},
"links": {
+ "Self::open": 2412,
"`OpenOptions::append`": 2771,
"`OpenOptions::write`": 2766,
- "self::write": 2420
+ "io::ErrorKind::InvalidInput": 2436,
+ "self::write": 2418
},
"name": "create",
"span": {
"begin": [
- 1625,
+ 1710,
5
],
"end": [
- 1628,
+ 1713,
6
],
"filename": "std/src/fs.rs"
@@ -267649,8 +286368,8 @@
"use": {
"id": 278,
"is_glob": false,
- "name": "MAX",
- "source": "core::f64::MAX"
+ "name": "MAX_10_EXP",
+ "source": "core::f64::MAX_10_EXP"
}
},
"links": {},
@@ -267658,11 +286377,11 @@
"span": {
"begin": [
18,
- 49
+ 54
],
"end": [
18,
- 52
+ 64
],
"filename": "std/src/num/f64.rs"
},
@@ -267683,7 +286402,7 @@
"discriminant": null,
"kind": {
"tuple": [
- 4253
+ 4252
]
}
}
@@ -267761,23 +286480,23 @@
}
},
"links": {
- "Seek::seek": 2487,
+ "Seek::seek": 2485,
"Seek::stream_position": 2768,
- "SeekFrom": 2489,
+ "SeekFrom": 2487,
"SeekFrom::Current": 2770,
"SeekFrom::End": 2767,
- "Write::flush": 2483,
- "Write::write": 2436,
+ "Write::flush": 2481,
+ "Write::write": 2434,
"`OpenOptions::create`": 2769
},
"name": "append",
"span": {
"begin": [
- 1584,
+ 1665,
5
],
"end": [
- 1587,
+ 1668,
6
],
"filename": "std/src/fs.rs"
@@ -267845,11 +286564,11 @@
"name": "truncate",
"span": {
"begin": [
- 1604,
+ 1685,
5
],
"end": [
- 1607,
+ 1688,
6
],
"filename": "std/src/fs.rs"
@@ -267916,18 +286635,18 @@
"links": {
"OpenOptions::create": 2769,
"OpenOptions::truncate": 2772,
- "`OpenOptions::open`": 2414,
- "io::ErrorKind::AlreadyExists": 2423,
- "self#time-of-check-to-time-of-use-toctou": 2424
+ "`OpenOptions::open`": 2412,
+ "io::ErrorKind::AlreadyExists": 2421,
+ "self#time-of-check-to-time-of-use-toctou": 2422
},
"name": "create_new",
"span": {
"begin": [
- 1663,
+ 1748,
5
],
"end": [
- 1666,
+ 1751,
6
],
"filename": "std/src/fs.rs"
@@ -267962,6 +286681,7 @@
},
"has_stripped_variants": true,
"impls": [
+ 3400,
3401,
3402,
3403,
@@ -267977,22 +286697,22 @@
3413,
3414,
3415,
- 3416,
+ 3417,
3418,
- 3419,
+ 3420,
3421,
- 3422,
- 3424,
+ 3423,
+ 3425,
3426,
- 3427,
- 3429,
- 3431,
- 3433,
+ 3428,
+ 3430,
+ 3432,
3360
],
"variants": [
2775,
2776,
+ 3368,
3369,
3370,
3371,
@@ -268002,16 +286722,16 @@
3375,
3376,
3377,
- 3378,
- 2423,
+ 2421,
2571,
+ 3378,
3379,
+ 2978,
3380,
- 2976,
+ 2979,
3381,
- 2977,
+ 2436,
3382,
- 2438,
3383,
3384,
3385,
@@ -268025,12 +286745,11 @@
3393,
3394,
3395,
- 3396,
2958,
+ 3396,
3397,
- 3398,
3356,
- 3399,
+ 3398,
3326
]
}
@@ -268041,11 +286760,11 @@
"name": "ErrorKind",
"span": {
"begin": [
- 225,
+ 228,
1
],
"end": [
- 446,
+ 449,
2
],
"filename": "std/src/io/error.rs"
@@ -268072,11 +286791,11 @@
"name": "NotFound",
"span": {
"begin": [
- 228,
+ 231,
5
],
"end": [
- 228,
+ 231,
13
],
"filename": "std/src/io/error.rs"
@@ -268103,11 +286822,11 @@
"name": "PermissionDenied",
"span": {
"begin": [
- 231,
+ 234,
5
],
"end": [
- 231,
+ 234,
21
],
"filename": "std/src/io/error.rs"
@@ -268126,7 +286845,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
},
@@ -268138,14 +286857,14 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 2426,
+ 2424,
2765,
2766,
2771,
2772,
2769,
2773,
- 2414
+ 2412
],
"provided_trait_methods": [],
"trait": null
@@ -268155,11 +286874,11 @@
"name": null,
"span": {
"begin": [
- 1477,
+ 1558,
1
],
"end": [
- 1718,
+ 1804,
2
],
"filename": "std/src/fs.rs"
@@ -268178,7 +286897,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
},
@@ -268215,7 +286934,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
},
@@ -268252,7 +286971,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
},
@@ -268267,7 +286986,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -268289,7 +287008,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
},
@@ -268326,7 +287045,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
},
@@ -268341,7 +287060,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -268363,7 +287082,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
},
@@ -268378,7 +287097,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -268402,7 +287121,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
},
@@ -268447,7 +287166,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -268463,7 +287182,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -268472,12 +287191,12 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -268497,7 +287216,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
},
@@ -268542,7 +287261,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -268558,7 +287277,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -268567,12 +287286,12 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -268592,7 +287311,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
},
@@ -268619,7 +287338,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -268651,11 +287370,11 @@
"name": null,
"span": {
"begin": [
- 516,
+ 515,
1
],
"end": [
- 516,
+ 515,
42
],
"filename": "checkouts/rust/library/core/src/clone.rs"
@@ -268676,7 +287395,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
},
@@ -268742,7 +287461,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -268767,11 +287486,11 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -268792,7 +287511,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
},
@@ -268815,7 +287534,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -268840,11 +287559,11 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -268865,7 +287584,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
},
@@ -268913,7 +287632,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -268931,8 +287650,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -268948,7 +287667,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -268957,11 +287676,11 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -268985,8 +287704,8 @@
"use": {
"id": 280,
"is_glob": false,
- "name": "MAX_10_EXP",
- "source": "core::f64::MAX_10_EXP"
+ "name": "MAX_EXP",
+ "source": "core::f64::MAX_EXP"
}
},
"links": {},
@@ -268994,11 +287713,11 @@
"span": {
"begin": [
18,
- 54
+ 66
],
"end": [
18,
- 64
+ 73
],
"filename": "std/src/num/f64.rs"
},
@@ -269018,7 +287737,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
},
@@ -269084,8 +287803,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -269101,7 +287820,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -269110,11 +287829,11 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -269135,7 +287854,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
},
@@ -269183,12 +287902,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -269222,7 +287941,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
},
@@ -269249,7 +287968,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -269276,7 +287995,7 @@
],
"trait": {
"args": null,
- "id": 157,
+ "id": 155,
"path": "ToOwned"
}
}
@@ -269285,11 +288004,11 @@
"name": null,
"span": {
"begin": [
- 82,
+ 85,
1
],
"end": [
- 84,
+ 87,
14
],
"filename": "checkouts/rust/library/alloc/src/borrow.rs"
@@ -269338,7 +288057,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
}
@@ -269377,7 +288096,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
},
@@ -269396,7 +288115,7 @@
],
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -269471,7 +288190,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "$crate::fmt::Formatter"
}
}
@@ -269483,7 +288202,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "$crate::fmt::Result"
}
}
@@ -269522,7 +288241,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
},
@@ -269539,7 +288258,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -269607,7 +288326,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
}
@@ -269620,11 +288339,11 @@
"name": "mode",
"span": {
"begin": [
- 436,
+ 525,
5
],
"end": [
- 439,
+ 528,
6
],
"filename": "std/src/os/unix/fs.rs"
@@ -269679,7 +288398,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
}
@@ -269692,11 +288411,11 @@
"name": "custom_flags",
"span": {
"begin": [
- 441,
+ 530,
5
],
"end": [
- 444,
+ 533,
6
],
"filename": "std/src/os/unix/fs.rs"
@@ -269722,7 +288441,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "crate::fs::OpenOptions"
}
},
@@ -269749,11 +288468,11 @@
"name": null,
"span": {
"begin": [
- 435,
+ 524,
1
],
"end": [
- 445,
+ 534,
2
],
"filename": "std/src/os/unix/fs.rs"
@@ -269820,22 +288539,22 @@
"is_dyn_compatible": false,
"is_unsafe": false,
"items": [
- 4897,
- 4898
+ 4902,
+ 4903
]
}
},
"links": {
- "`fs::OpenOptions`": 2428
+ "`fs::OpenOptions`": 2426
},
"name": "OpenOptionsExt",
"span": {
"begin": [
- 384,
+ 473,
1
],
"end": [
- 432,
+ 521,
2
],
"filename": "std/src/os/unix/fs.rs"
@@ -269890,7 +288609,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
}
@@ -269962,7 +288681,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
}
@@ -270034,7 +288753,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
}
@@ -270106,7 +288825,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
}
@@ -270178,7 +288897,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
}
@@ -270250,7 +288969,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
}
@@ -270322,7 +289041,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
}
@@ -270394,7 +289113,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
}
@@ -270444,7 +289163,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -270498,7 +289217,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
}
@@ -270522,7 +289241,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2413,
+ "id": 2411,
"path": "File"
}
}
@@ -270531,7 +289250,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -270570,8 +289289,8 @@
"use": {
"id": 282,
"is_glob": false,
- "name": "MAX_EXP",
- "source": "core::f64::MAX_EXP"
+ "name": "MIN",
+ "source": "core::f64::MIN"
}
},
"links": {},
@@ -270579,11 +289298,11 @@
"span": {
"begin": [
18,
- 66
+ 75
],
"end": [
18,
- 73
+ 78
],
"filename": "std/src/num/f64.rs"
},
@@ -270605,7 +289324,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "crate::fs::OpenOptions"
}
},
@@ -270670,20 +289389,20 @@
"is_dyn_compatible": false,
"is_unsafe": false,
"items": [
- 5576,
- 5577,
- 5578,
- 5579,
- 5580,
5581,
5582,
5583,
- 5584
+ 5584,
+ 5585,
+ 5586,
+ 5587,
+ 5588,
+ 5589
]
}
},
"links": {
- "`fs::OpenOptions`": 2428
+ "`fs::OpenOptions`": 2426
},
"name": "OpenOptionsExt",
"span": {
@@ -270747,7 +289466,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
}
@@ -270760,11 +289479,11 @@
"name": "access_mode",
"span": {
"begin": [
- 269,
+ 312,
5
],
"end": [
- 272,
+ 315,
6
],
"filename": "std/src/os/windows/fs.rs"
@@ -270819,7 +289538,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
}
@@ -270832,11 +289551,11 @@
"name": "share_mode",
"span": {
"begin": [
- 274,
+ 317,
5
],
"end": [
- 277,
+ 320,
6
],
"filename": "std/src/os/windows/fs.rs"
@@ -270891,7 +289610,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
}
@@ -270904,11 +289623,11 @@
"name": "custom_flags",
"span": {
"begin": [
- 279,
+ 322,
5
],
"end": [
- 282,
+ 325,
6
],
"filename": "std/src/os/windows/fs.rs"
@@ -270963,7 +289682,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
}
@@ -270976,11 +289695,11 @@
"name": "attributes",
"span": {
"begin": [
- 284,
+ 327,
5
],
"end": [
- 287,
+ 330,
6
],
"filename": "std/src/os/windows/fs.rs"
@@ -271035,7 +289754,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "OpenOptions"
}
}
@@ -271048,11 +289767,11 @@
"name": "security_qos_flags",
"span": {
"begin": [
- 289,
+ 332,
5
],
"end": [
- 292,
+ 335,
6
],
"filename": "std/src/os/windows/fs.rs"
@@ -271078,7 +289797,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2428,
+ "id": 2426,
"path": "crate::fs::OpenOptions"
}
},
@@ -271108,11 +289827,11 @@
"name": null,
"span": {
"begin": [
- 268,
+ 311,
1
],
"end": [
- 293,
+ 336,
2
],
"filename": "std/src/os/windows/fs.rs"
@@ -271143,25 +289862,25 @@
"is_dyn_compatible": false,
"is_unsafe": false,
"items": [
- 5626,
- 5627,
- 5628,
- 5629,
- 5630
+ 5657,
+ 5658,
+ 5659,
+ 5660,
+ 5661
]
}
},
"links": {
- "`fs::OpenOptions`": 2428
+ "`fs::OpenOptions`": 2426
},
"name": "OpenOptionsExt",
"span": {
"begin": [
- 99,
+ 142,
1
],
"end": [
- 265,
+ 308,
2
],
"filename": "std/src/os/windows/fs.rs"
@@ -271201,16 +289920,16 @@
}
},
"links": {
- "`File::set_times`": 2445
+ "`File::set_times`": 2443
},
"name": "new",
"span": {
"begin": [
- 2013,
+ 2099,
5
],
"end": [
- 2015,
+ 2101,
6
],
"filename": "std/src/fs.rs"
@@ -271253,7 +289972,7 @@
{
"resolved_path": {
"args": null,
- "id": 2448,
+ "id": 2446,
"path": "SystemTime"
}
}
@@ -271270,11 +289989,11 @@
"name": "set_accessed",
"span": {
"begin": [
- 2019,
+ 2105,
5
],
"end": [
- 2022,
+ 2108,
6
],
"filename": "std/src/fs.rs"
@@ -271317,7 +290036,7 @@
{
"resolved_path": {
"args": null,
- "id": 2448,
+ "id": 2446,
"path": "SystemTime"
}
}
@@ -271334,11 +290053,11 @@
"name": "set_modified",
"span": {
"begin": [
- 2026,
+ 2112,
5
],
"end": [
- 2029,
+ 2115,
6
],
"filename": "std/src/fs.rs"
@@ -271357,7 +290076,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2446,
+ "id": 2444,
"path": "FileTimes"
}
},
@@ -271381,11 +290100,11 @@
"name": null,
"span": {
"begin": [
- 2008,
+ 2094,
1
],
"end": [
- 2030,
+ 2116,
2
],
"filename": "std/src/fs.rs"
@@ -271404,7 +290123,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2446,
+ "id": 2444,
"path": "FileTimes"
}
},
@@ -271441,7 +290160,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2446,
+ "id": 2444,
"path": "FileTimes"
}
},
@@ -271478,7 +290197,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2446,
+ "id": 2444,
"path": "FileTimes"
}
},
@@ -271493,7 +290212,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -271515,7 +290234,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2446,
+ "id": 2444,
"path": "FileTimes"
}
},
@@ -271552,7 +290271,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2446,
+ "id": 2444,
"path": "FileTimes"
}
},
@@ -271567,7 +290286,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -271589,7 +290308,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2446,
+ "id": 2444,
"path": "FileTimes"
}
},
@@ -271604,7 +290323,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -271631,8 +290350,8 @@
"use": {
"id": 284,
"is_glob": false,
- "name": "MIN",
- "source": "core::f64::MIN"
+ "name": "MIN_10_EXP",
+ "source": "core::f64::MIN_10_EXP"
}
},
"links": {},
@@ -271640,11 +290359,11 @@
"span": {
"begin": [
18,
- 75
+ 80
],
"end": [
18,
- 78
+ 90
],
"filename": "std/src/num/f64.rs"
},
@@ -271664,7 +290383,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2446,
+ "id": 2444,
"path": "FileTimes"
}
},
@@ -271709,7 +290428,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -271725,7 +290444,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -271734,12 +290453,12 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -271759,7 +290478,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2446,
+ "id": 2444,
"path": "FileTimes"
}
},
@@ -271804,7 +290523,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -271820,7 +290539,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -271829,12 +290548,12 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -271854,7 +290573,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2446,
+ "id": 2444,
"path": "FileTimes"
}
},
@@ -271881,7 +290600,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -271913,11 +290632,11 @@
"name": null,
"span": {
"begin": [
- 516,
+ 515,
1
],
"end": [
- 516,
+ 515,
42
],
"filename": "checkouts/rust/library/core/src/clone.rs"
@@ -271938,7 +290657,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2446,
+ "id": 2444,
"path": "FileTimes"
}
},
@@ -272004,7 +290723,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -272029,11 +290748,11 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -272054,7 +290773,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2446,
+ "id": 2444,
"path": "FileTimes"
}
},
@@ -272077,7 +290796,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -272102,11 +290821,11 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -272127,7 +290846,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2446,
+ "id": 2444,
"path": "FileTimes"
}
},
@@ -272175,7 +290894,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -272193,8 +290912,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -272210,7 +290929,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -272219,11 +290938,11 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -272244,7 +290963,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2446,
+ "id": 2444,
"path": "FileTimes"
}
},
@@ -272310,8 +291029,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -272327,7 +291046,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -272336,11 +291055,11 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -272361,7 +291080,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2446,
+ "id": 2444,
"path": "FileTimes"
}
},
@@ -272409,12 +291128,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -272448,7 +291167,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2446,
+ "id": 2444,
"path": "FileTimes"
}
},
@@ -272475,7 +291194,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -272502,7 +291221,7 @@
],
"trait": {
"args": null,
- "id": 157,
+ "id": 155,
"path": "ToOwned"
}
}
@@ -272511,11 +291230,11 @@
"name": null,
"span": {
"begin": [
- 82,
+ 85,
1
],
"end": [
- 84,
+ 87,
14
],
"filename": "checkouts/rust/library/alloc/src/borrow.rs"
@@ -272539,7 +291258,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2446,
+ "id": 2444,
"path": "FileTimes"
}
},
@@ -272554,7 +291273,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 103,
+ "id": 101,
"path": "Copy"
}
}
@@ -272616,7 +291335,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 2446,
+ "id": 2444,
"path": "FileTimes"
}
}
@@ -272655,7 +291374,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2446,
+ "id": 2444,
"path": "FileTimes"
}
},
@@ -272674,7 +291393,7 @@
],
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -272749,7 +291468,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "$crate::fmt::Formatter"
}
}
@@ -272761,7 +291480,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "$crate::fmt::Result"
}
}
@@ -272800,7 +291519,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2446,
+ "id": 2444,
"path": "FileTimes"
}
},
@@ -272817,7 +291536,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -272866,7 +291585,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 2446,
+ "id": 2444,
"path": "FileTimes"
}
}
@@ -272905,7 +291624,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2446,
+ "id": 2444,
"path": "FileTimes"
}
},
@@ -272922,7 +291641,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 109,
+ "id": 107,
"path": "Default"
}
}
@@ -272974,7 +291693,7 @@
{
"resolved_path": {
"args": null,
- "id": 2448,
+ "id": 2446,
"path": "SystemTime"
}
}
@@ -273021,7 +291740,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2446,
+ "id": 2444,
"path": "fs::FileTimes"
}
},
@@ -273077,7 +291796,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 3814,
+ "id": 3813,
"path": "Sealed"
}
}
@@ -273094,12 +291813,12 @@
"is_dyn_compatible": false,
"is_unsafe": false,
"items": [
- 4858
+ 4860
]
}
},
"links": {
- "`fs::FileTimes`": 2446
+ "`fs::FileTimes`": 2444
},
"name": "FileTimesExt",
"span": {
@@ -273147,7 +291866,7 @@
{
"resolved_path": {
"args": null,
- "id": 2448,
+ "id": 2446,
"path": "SystemTime"
}
}
@@ -273164,11 +291883,11 @@
"name": "set_created",
"span": {
"begin": [
- 553,
+ 596,
5
],
"end": [
- 556,
+ 599,
6
],
"filename": "std/src/os/windows/fs.rs"
@@ -273192,8 +291911,8 @@
"use": {
"id": 286,
"is_glob": false,
- "name": "MIN_10_EXP",
- "source": "core::f64::MIN_10_EXP"
+ "name": "MIN_EXP",
+ "source": "core::f64::MIN_EXP"
}
},
"links": {},
@@ -273201,11 +291920,11 @@
"span": {
"begin": [
18,
- 80
+ 92
],
"end": [
18,
- 90
+ 99
],
"filename": "std/src/num/f64.rs"
},
@@ -273230,7 +291949,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2446,
+ "id": 2444,
"path": "fs::FileTimes"
}
},
@@ -273256,11 +291975,11 @@
"name": null,
"span": {
"begin": [
- 552,
+ 595,
1
],
"end": [
- 557,
+ 600,
2
],
"filename": "std/src/os/windows/fs.rs"
@@ -273286,7 +292005,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 3814,
+ "id": 3813,
"path": "Sealed"
}
}
@@ -273303,21 +292022,21 @@
"is_dyn_compatible": false,
"is_unsafe": false,
"items": [
- 5642
+ 5673
]
}
},
"links": {
- "`fs::FileTimes`": 2446
+ "`fs::FileTimes`": 2444
},
"name": "FileTimesExt",
"span": {
"begin": [
- 545,
+ 588,
1
],
"end": [
- 549,
+ 592,
2
],
"filename": "std/src/os/windows/fs.rs"
@@ -273380,11 +292099,11 @@
"name": "readonly",
"span": {
"begin": [
- 2092,
+ 2178,
5
],
"end": [
- 2094,
+ 2180,
6
],
"filename": "std/src/fs.rs"
@@ -273415,23 +292134,23 @@
"is_dyn_compatible": false,
"is_unsafe": false,
"items": [
- 4894,
- 4895,
- 4896
+ 4899,
+ 4900,
+ 4901
]
}
},
"links": {
- "`fs::Permissions`": 2444
+ "`fs::Permissions`": 2442
},
"name": "PermissionsExt",
"span": {
"begin": [
- 352,
+ 441,
1
],
"end": [
- 365,
+ 454,
2
],
"filename": "std/src/os/unix/fs.rs"
@@ -273471,7 +292190,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "crate::path::Path"
}
}
@@ -273515,7 +292234,7 @@
{
"resolved_path": {
"args": null,
- "id": 2444,
+ "id": 2442,
"path": "Permissions"
}
}
@@ -273536,7 +292255,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -273544,16 +292263,16 @@
}
},
"links": {
- "io#platform-specific-behavior": 501
+ "io#platform-specific-behavior": 502
},
"name": "set_permissions",
"span": {
"begin": [
- 3155,
+ 3244,
1
],
"end": [
- 3157,
+ 3246,
2
],
"filename": "std/src/fs.rs"
@@ -273616,11 +292335,11 @@
"name": "set_readonly",
"span": {
"begin": [
- 2159,
+ 2245,
5
],
"end": [
- 2161,
+ 2247,
6
],
"filename": "std/src/fs.rs"
@@ -273639,7 +292358,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2444,
+ "id": 2442,
"path": "Permissions"
}
},
@@ -273662,11 +292381,11 @@
"name": null,
"span": {
"begin": [
- 2042,
+ 2128,
1
],
"end": [
- 2162,
+ 2248,
2
],
"filename": "std/src/fs.rs"
@@ -273685,7 +292404,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2444,
+ "id": 2442,
"path": "Permissions"
}
},
@@ -273722,7 +292441,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2444,
+ "id": 2442,
"path": "Permissions"
}
},
@@ -273759,7 +292478,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2444,
+ "id": 2442,
"path": "Permissions"
}
},
@@ -273774,7 +292493,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -273796,7 +292515,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2444,
+ "id": 2442,
"path": "Permissions"
}
},
@@ -273833,7 +292552,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2444,
+ "id": 2442,
"path": "Permissions"
}
},
@@ -273848,7 +292567,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -273870,7 +292589,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2444,
+ "id": 2442,
"path": "Permissions"
}
},
@@ -273885,7 +292604,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -273909,7 +292628,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2444,
+ "id": 2442,
"path": "Permissions"
}
},
@@ -273954,7 +292673,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -273970,7 +292689,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -273979,12 +292698,12 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -274004,7 +292723,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2444,
+ "id": 2442,
"path": "Permissions"
}
},
@@ -274049,7 +292768,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -274065,7 +292784,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -274074,12 +292793,12 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -274099,7 +292818,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2444,
+ "id": 2442,
"path": "Permissions"
}
},
@@ -274126,7 +292845,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -274158,11 +292877,11 @@
"name": null,
"span": {
"begin": [
- 516,
+ 515,
1
],
"end": [
- 516,
+ 515,
42
],
"filename": "checkouts/rust/library/core/src/clone.rs"
@@ -274183,7 +292902,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2444,
+ "id": 2442,
"path": "Permissions"
}
},
@@ -274249,7 +292968,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -274274,11 +292993,11 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -274299,7 +293018,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2444,
+ "id": 2442,
"path": "Permissions"
}
},
@@ -274322,7 +293041,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -274347,11 +293066,11 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -274372,7 +293091,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2444,
+ "id": 2442,
"path": "Permissions"
}
},
@@ -274420,7 +293139,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -274438,8 +293157,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -274455,7 +293174,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -274464,11 +293183,11 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -274492,20 +293211,20 @@
"use": {
"id": 288,
"is_glob": false,
- "name": "MIN_EXP",
- "source": "core::f64::MIN_EXP"
+ "name": "MIN_POSITIVE",
+ "source": "core::f64::MIN_POSITIVE"
}
},
"links": {},
"name": null,
"span": {
"begin": [
- 18,
- 92
+ 19,
+ 5
],
"end": [
- 18,
- 99
+ 19,
+ 17
],
"filename": "std/src/num/f64.rs"
},
@@ -274525,7 +293244,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2444,
+ "id": 2442,
"path": "Permissions"
}
},
@@ -274591,8 +293310,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -274608,7 +293327,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -274617,11 +293336,11 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -274642,7 +293361,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2444,
+ "id": 2442,
"path": "Permissions"
}
},
@@ -274690,12 +293409,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -274729,7 +293448,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2444,
+ "id": 2442,
"path": "Permissions"
}
},
@@ -274756,7 +293475,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -274783,7 +293502,7 @@
],
"trait": {
"args": null,
- "id": 157,
+ "id": 155,
"path": "ToOwned"
}
}
@@ -274792,11 +293511,11 @@
"name": null,
"span": {
"begin": [
- 82,
+ 85,
1
],
"end": [
- 84,
+ 87,
14
],
"filename": "checkouts/rust/library/alloc/src/borrow.rs"
@@ -274845,7 +293564,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 2444,
+ "id": 2442,
"path": "Permissions"
}
}
@@ -274884,7 +293603,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2444,
+ "id": 2442,
"path": "Permissions"
}
},
@@ -274903,7 +293622,7 @@
],
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -274940,7 +293659,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2444,
+ "id": 2442,
"path": "Permissions"
}
},
@@ -275021,7 +293740,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 2444,
+ "id": 2442,
"path": "Permissions"
}
}
@@ -275068,7 +293787,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2444,
+ "id": 2442,
"path": "Permissions"
}
},
@@ -275087,7 +293806,7 @@
],
"trait": {
"args": null,
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -275124,7 +293843,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2444,
+ "id": 2442,
"path": "Permissions"
}
},
@@ -275141,7 +293860,7 @@
],
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -275216,7 +293935,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "$crate::fmt::Formatter"
}
}
@@ -275228,7 +293947,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "$crate::fmt::Result"
}
}
@@ -275267,7 +293986,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2444,
+ "id": 2442,
"path": "Permissions"
}
},
@@ -275284,7 +294003,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -275349,11 +294068,11 @@
"name": "mode",
"span": {
"begin": [
- 369,
+ 458,
5
],
"end": [
- 371,
+ 460,
6
],
"filename": "std/src/os/unix/fs.rs"
@@ -275409,11 +294128,11 @@
"name": "set_mode",
"span": {
"begin": [
- 373,
+ 462,
5
],
"end": [
- 375,
+ 464,
6
],
"filename": "std/src/os/unix/fs.rs"
@@ -275452,7 +294171,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 2444,
+ "id": 2442,
"path": "Permissions"
}
}
@@ -275463,11 +294182,11 @@
"name": "from_mode",
"span": {
"begin": [
- 377,
+ 466,
5
],
"end": [
- 379,
+ 468,
6
],
"filename": "std/src/os/unix/fs.rs"
@@ -275493,7 +294212,7 @@
"for": {
"resolved_path": {
"args": null,
- "id": 2444,
+ "id": 2442,
"path": "crate::fs::Permissions"
}
},
@@ -275521,11 +294240,11 @@
"name": null,
"span": {
"begin": [
- 368,
+ 457,
1
],
"end": [
- 380,
+ 469,
2
],
"filename": "std/src/os/unix/fs.rs"
@@ -275585,17 +294304,17 @@
"links": {
"FileType::is_dir": 2888,
"FileType::is_symlink": 2887,
- "`File::open`": 2417,
- "`OpenOptions::open`": 2414
+ "`File::open`": 2415,
+ "`OpenOptions::open`": 2412
},
"name": "is_file",
"span": {
"begin": [
- 2221,
+ 2307,
5
],
"end": [
- 2223,
+ 2309,
6
],
"filename": "std/src/fs.rs"
@@ -275656,18 +294375,18 @@
"FileType::is_dir": 2888,
"FileType::is_file": 2886,
"FileType::is_symlink": 2887,
- "`Metadata`": 2441,
+ "`Metadata`": 2439,
"metadata": 2596,
"symlink_metadata": 2597
},
"name": "is_symlink",
"span": {
"begin": [
- 2257,
+ 2343,
5
],
"end": [
- 2259,
+ 2345,
6
],
"filename": "std/src/fs.rs"
@@ -275731,11 +294450,11 @@
"name": "is_dir",
"span": {
"begin": [
- 2188,
+ 2274,
5
],
"end": [
- 2190,
+ 2276,
6
],
"filename": "std/src/fs.rs"
@@ -275778,11 +294497,11 @@
"name": null,
"span": {
"begin": [
- 2164,
+ 2250,
1
],
"end": [
- 2260,
+ 2346,
2
],
"filename": "std/src/fs.rs"
@@ -275806,8 +294525,8 @@
"use": {
"id": 290,
"is_glob": false,
- "name": "MIN_POSITIVE",
- "source": "core::f64::MIN_POSITIVE"
+ "name": "NAN",
+ "source": "core::f64::NAN"
}
},
"links": {},
@@ -275815,11 +294534,11 @@
"span": {
"begin": [
19,
- 5
+ 19
],
"end": [
19,
- 17
+ 22
],
"filename": "std/src/num/f64.rs"
},
@@ -275926,7 +294645,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -276000,7 +294719,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -276037,7 +294756,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -276106,7 +294825,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -276122,7 +294841,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -276131,12 +294850,12 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -276201,7 +294920,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -276217,7 +294936,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -276226,12 +294945,12 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -276278,7 +294997,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -276310,11 +295029,11 @@
"name": null,
"span": {
"begin": [
- 516,
+ 515,
1
],
"end": [
- 516,
+ 515,
42
],
"filename": "checkouts/rust/library/core/src/clone.rs"
@@ -276401,7 +295120,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -276426,11 +295145,11 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -276474,7 +295193,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -276499,11 +295218,11 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -276572,7 +295291,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -276590,8 +295309,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -276607,7 +295326,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -276616,11 +295335,11 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -276707,8 +295426,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -276724,7 +295443,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -276733,11 +295452,11 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -276806,12 +295525,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -276872,7 +295591,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -276899,7 +295618,7 @@
],
"trait": {
"args": null,
- "id": 157,
+ "id": 155,
"path": "ToOwned"
}
}
@@ -276908,11 +295627,11 @@
"name": null,
"span": {
"begin": [
- 82,
+ 85,
1
],
"end": [
- 84,
+ 87,
14
],
"filename": "checkouts/rust/library/alloc/src/borrow.rs"
@@ -276951,7 +295670,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 103,
+ "id": 101,
"path": "Copy"
}
}
@@ -277071,7 +295790,7 @@
],
"trait": {
"args": null,
- "id": 99,
+ "id": 97,
"path": "Clone"
}
}
@@ -277236,8 +295955,8 @@
"use": {
"id": 292,
"is_glob": false,
- "name": "NAN",
- "source": "core::f64::NAN"
+ "name": "NEG_INFINITY",
+ "source": "core::f64::NEG_INFINITY"
}
},
"links": {},
@@ -277245,11 +295964,11 @@
"span": {
"begin": [
19,
- 19
+ 24
],
"end": [
19,
- 22
+ 36
],
"filename": "std/src/num/f64.rs"
},
@@ -277291,7 +296010,7 @@
],
"trait": {
"args": null,
- "id": 123,
+ "id": 121,
"path": "PartialEq"
}
}
@@ -277345,7 +296064,7 @@
],
"trait": {
"args": null,
- "id": 113,
+ "id": 111,
"path": "Eq"
}
}
@@ -277565,7 +296284,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "fmt::Formatter"
}
}
@@ -277577,7 +296296,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "fmt::Result"
}
}
@@ -277588,11 +296307,11 @@
"name": "fmt",
"span": {
"begin": [
- 2264,
+ 2350,
5
],
"end": [
- 2270,
+ 2356,
6
],
"filename": "std/src/fs.rs"
@@ -277632,7 +296351,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -277641,11 +296360,11 @@
"name": null,
"span": {
"begin": [
- 2263,
+ 2349,
1
],
"end": [
- 2271,
+ 2357,
2
],
"filename": "std/src/fs.rs"
@@ -277697,11 +296416,11 @@
"name": "is_block_device",
"span": {
"begin": [
- 877,
+ 966,
5
],
"end": [
- 879,
+ 968,
6
],
"filename": "std/src/os/unix/fs.rs"
@@ -277753,11 +296472,11 @@
"name": "is_char_device",
"span": {
"begin": [
- 880,
+ 969,
5
],
"end": [
- 882,
+ 971,
6
],
"filename": "std/src/os/unix/fs.rs"
@@ -277809,11 +296528,11 @@
"name": "is_fifo",
"span": {
"begin": [
- 883,
+ 972,
5
],
"end": [
- 885,
+ 974,
6
],
"filename": "std/src/os/unix/fs.rs"
@@ -277865,11 +296584,11 @@
"name": "is_socket",
"span": {
"begin": [
- 886,
+ 975,
5
],
"end": [
- 888,
+ 977,
6
],
"filename": "std/src/os/unix/fs.rs"
@@ -277924,11 +296643,11 @@
"name": null,
"span": {
"begin": [
- 876,
+ 965,
1
],
"end": [
- 889,
+ 978,
2
],
"filename": "std/src/os/unix/fs.rs"
@@ -277959,10 +296678,10 @@
"is_dyn_compatible": true,
"is_unsafe": false,
"items": [
- 4915,
- 4916,
- 4917,
- 4918
+ 4920,
+ 4921,
+ 4922,
+ 4923
]
}
},
@@ -277972,11 +296691,11 @@
"name": "FileTypeExt",
"span": {
"begin": [
- 800,
+ 889,
1
],
"end": [
- 873,
+ 962,
2
],
"filename": "std/src/os/unix/fs.rs"
@@ -278285,11 +297004,11 @@
"is_dyn_compatible": true,
"is_unsafe": false,
"items": [
- 5592,
- 5593,
- 5594,
- 5595,
- 5596
+ 5597,
+ 5598,
+ 5599,
+ 5600,
+ 5601
]
}
},
@@ -278355,11 +297074,11 @@
"name": "is_symlink_dir",
"span": {
"begin": [
- 535,
+ 578,
5
],
"end": [
- 537,
+ 580,
6
],
"filename": "std/src/os/windows/fs.rs"
@@ -278411,11 +297130,11 @@
"name": "is_symlink_file",
"span": {
"begin": [
- 538,
+ 581,
5
],
"end": [
- 540,
+ 583,
6
],
"filename": "std/src/os/windows/fs.rs"
@@ -278439,8 +297158,8 @@
"use": {
"id": 294,
"is_glob": false,
- "name": "NEG_INFINITY",
- "source": "core::f64::NEG_INFINITY"
+ "name": "RADIX",
+ "source": "core::f64::RADIX"
}
},
"links": {},
@@ -278448,11 +297167,11 @@
"span": {
"begin": [
19,
- 24
+ 38
],
"end": [
19,
- 36
+ 43
],
"filename": "std/src/num/f64.rs"
},
@@ -278504,11 +297223,11 @@
"name": null,
"span": {
"begin": [
- 534,
+ 577,
1
],
"end": [
- 541,
+ 584,
2
],
"filename": "std/src/os/windows/fs.rs"
@@ -278534,7 +297253,7 @@
"modifier": "none",
"trait": {
"args": null,
- "id": 3814,
+ "id": 3813,
"path": "Sealed"
}
}
@@ -278551,8 +297270,8 @@
"is_dyn_compatible": true,
"is_unsafe": false,
"items": [
- 5640,
- 5641
+ 5671,
+ 5672
]
}
},
@@ -278562,11 +297281,11 @@
"name": "FileTypeExt",
"span": {
"begin": [
- 521,
+ 564,
1
],
"end": [
- 528,
+ 571,
2
],
"filename": "std/src/os/windows/fs.rs"
@@ -278681,11 +297400,11 @@
"name": "new",
"span": {
"begin": [
- 3191,
+ 3280,
5
],
"end": [
- 3193,
+ 3282,
6
],
"filename": "std/src/fs.rs"
@@ -278753,11 +297472,11 @@
"name": "recursive",
"span": {
"begin": [
- 3210,
+ 3299,
5
],
"end": [
- 3213,
+ 3302,
6
],
"filename": "std/src/fs.rs"
@@ -278794,7 +297513,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "Path"
}
}
@@ -278861,7 +297580,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -278872,11 +297591,11 @@
"name": "create",
"span": {
"begin": [
- 3234,
+ 3323,
5
],
"end": [
- 3236,
+ 3325,
6
],
"filename": "std/src/fs.rs"
@@ -278919,11 +297638,11 @@
"name": null,
"span": {
"begin": [
- 3178,
+ 3267,
1
],
"end": [
- 3268,
+ 3357,
2
],
"filename": "std/src/fs.rs"
@@ -279031,7 +297750,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 315,
+ "id": 313,
"path": "Freeze"
}
}
@@ -279105,7 +297824,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 318,
+ "id": 316,
"path": "UnwindSafe"
}
}
@@ -279142,7 +297861,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 320,
+ "id": 318,
"path": "RefUnwindSafe"
}
}
@@ -279211,7 +297930,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 321
+ 319
],
"provided_trait_methods": [],
"trait": {
@@ -279227,7 +297946,7 @@
"constraints": []
}
},
- "id": 323,
+ "id": 321,
"path": "Borrow"
}
}
@@ -279236,12 +297955,12 @@
"name": null,
"span": {
"begin": [
- 209,
+ 212,
1
],
"end": [
- 209,
- 32
+ 212,
+ 38
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -279306,7 +298025,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 324
+ 322
],
"provided_trait_methods": [],
"trait": {
@@ -279322,7 +298041,7 @@
"constraints": []
}
},
- "id": 326,
+ "id": 324,
"path": "BorrowMut"
}
}
@@ -279331,12 +298050,12 @@
"name": null,
"span": {
"begin": [
- 217,
+ 221,
1
],
"end": [
- 217,
- 35
+ 221,
+ 41
],
"filename": "checkouts/rust/library/core/src/borrow.rs"
},
@@ -279422,7 +298141,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 327
+ 325
],
"provided_trait_methods": [],
"trait": {
@@ -279447,11 +298166,11 @@
"name": null,
"span": {
"begin": [
- 773,
+ 767,
1
],
"end": [
- 775,
+ 769,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -279495,7 +298214,7 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 329
+ 327
],
"provided_trait_methods": [],
"trait": {
@@ -279520,11 +298239,11 @@
"name": null,
"span": {
"begin": [
- 791,
+ 785,
1
],
"end": [
- 791,
+ 785,
28
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -279593,7 +298312,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -279611,8 +298330,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 331,
- 332
+ 329,
+ 330
],
"provided_trait_methods": [],
"trait": {
@@ -279628,7 +298347,7 @@
"constraints": []
}
},
- "id": 200,
+ "id": 198,
"path": "TryInto"
}
}
@@ -279637,11 +298356,11 @@
"name": null,
"span": {
"begin": [
- 817,
+ 811,
1
],
"end": [
- 819,
+ 813,
27
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -279665,8 +298384,8 @@
"use": {
"id": 296,
"is_glob": false,
- "name": "RADIX",
- "source": "core::f64::RADIX"
+ "name": "consts",
+ "source": "core::f64::consts"
}
},
"links": {},
@@ -279674,11 +298393,11 @@
"span": {
"begin": [
19,
- 38
+ 45
],
"end": [
19,
- 43
+ 51
],
"filename": "std/src/num/f64.rs"
},
@@ -279764,8 +298483,8 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 334,
- 336
+ 332,
+ 334
],
"provided_trait_methods": [],
"trait": {
@@ -279781,7 +298500,7 @@
"constraints": []
}
},
- "id": 199,
+ "id": 197,
"path": "TryFrom"
}
}
@@ -279790,11 +298509,11 @@
"name": null,
"span": {
"begin": [
- 833,
+ 827,
1
],
"end": [
- 835,
+ 829,
24
],
"filename": "checkouts/rust/library/core/src/convert/mod.rs"
@@ -279863,12 +298582,12 @@
"is_synthetic": false,
"is_unsafe": false,
"items": [
- 338
+ 336
],
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 341,
+ "id": 339,
"path": "Any"
}
}
@@ -279943,7 +298662,7 @@
"constraints": []
}
},
- "id": 343,
+ "id": 341,
"path": "$crate::fmt::Formatter"
}
}
@@ -279955,7 +298674,7 @@
"output": {
"resolved_path": {
"args": null,
- "id": 344,
+ "id": 342,
"path": "$crate::fmt::Result"
}
}
@@ -280011,7 +298730,7 @@
"provided_trait_methods": [],
"trait": {
"args": null,
- "id": 346,
+ "id": 344,
"path": "Debug"
}
}
@@ -280092,11 +298811,11 @@
"name": "mode",
"span": {
"begin": [
- 1000,
+ 1089,
5
],
"end": [
- 1003,
+ 1092,
6
],
"filename": "std/src/os/unix/fs.rs"
@@ -280148,11 +298867,11 @@
"name": null,
"span": {
"begin": [
- 999,
+ 1088,
1
],
"end": [
- 1004,
+ 1093,
2
],
"filename": "std/src/os/unix/fs.rs"
@@ -280183,7 +298902,7 @@
"is_dyn_compatible": false,
"is_unsafe": false,
"items": [
- 4921
+ 4926
]
}
},
@@ -280193,11 +298912,11 @@
"name": "DirBuilderExt",
"span": {
"begin": [
- 981,
+ 1070,
1
],
"end": [
- 996,
+ 1085,
2
],
"filename": "std/src/os/unix/fs.rs"
@@ -280261,7 +298980,7 @@
"constraints": []
}
},
- "id": 165,
+ "id": 163,
"path": "Vec"
}
}
@@ -280284,7 +299003,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "Result"
}
}
@@ -280293,12 +299012,12 @@
},
"links": {
"Ok": 61,
- "Read::read": 2435,
- "`BufReader`": 2409,
+ "Read::read": 2433,
+ "`BufReader`": 2407,
"`ErrorKind::Interrupted`": 2958,
- "crate::fs::File": 2413,
- "crate::fs::read": 2415,
- "crate::vec::Vec::try_reserve": 3987
+ "crate::fs::File": 2411,
+ "crate::fs::read": 2413,
+ "crate::vec::Vec::try_reserve": 3986
},
"name": "read_to_end",
"span": {
@@ -280334,11 +299053,11 @@
"name": "Interrupted",
"span": {
"begin": [
- 391,
+ 394,
5
],
"end": [
- 391,
+ 394,
16
],
"filename": "std/src/io/error.rs"
@@ -280386,13 +299105,108 @@
"buf",
{
"borrowed_ref": {
- "is_mutable": true,
+ "is_mutable": true,
+ "lifetime": null,
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 159,
+ "path": "String"
+ }
+ }
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "primitive": "usize"
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 469,
+ "path": "Result"
+ }
+ }
+ }
+ }
+ },
+ "links": {
+ "Read::read": 2433,
+ "Read::read_to_end": 2957,
+ "`BufReader`": 2407,
+ "crate::fs::File": 2411,
+ "crate::fs::read_to_string": 2414
+ },
+ "name": "read_to_string",
+ "span": {
+ "begin": [
+ 991,
+ 5
+ ],
+ "end": [
+ 993,
+ 6
+ ],
+ "filename": "std/src/io/mod.rs"
+ },
+ "visibility": "default"
+ },
+ "2960": {
+ "attrs": [
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": "Attempts to write an entire buffer into this writer.\n\nThis method will continuously call [`write`] until there is no more data\nto be written or an error of non-[`ErrorKind::Interrupted`] kind is\nreturned. This method will not return until the entire buffer has been\nsuccessfully written or such an error occurs. The first error that is\nnot of [`ErrorKind::Interrupted`] kind generated from this method will be\nreturned.\n\nIf the buffer contains no data, this will never call [`write`].\n\n# Errors\n\nThis function will return the first error of\nnon-[`ErrorKind::Interrupted`] kind that [`write`] returns.\n\n[`write`]: Write::write\n\n# Examples\n\n```no_run\nuse std::io::prelude::*;\nuse std::fs::File;\n\nfn main() -> std::io::Result<()> {\n let mut buffer = File::create(\"foo.txt\")?;\n\n buffer.write_all(b\"some bytes\")?;\n Ok(())\n}\n```",
+ "id": 2960,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "self",
+ {
+ "borrowed_ref": {
+ "is_mutable": true,
+ "lifetime": null,
+ "type": {
+ "generic": "Self"
+ }
+ }
+ }
+ ],
+ [
+ "buf",
+ {
+ "borrowed_ref": {
+ "is_mutable": false,
"lifetime": null,
"type": {
- "resolved_path": {
- "args": null,
- "id": 161,
- "path": "String"
+ "slice": {
+ "primitive": "u8"
}
}
}
@@ -280407,14 +299221,14 @@
"args": [
{
"type": {
- "primitive": "usize"
+ "tuple": []
}
}
],
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "Result"
}
}
@@ -280422,40 +299236,84 @@
}
},
"links": {
- "Read::read": 2435,
- "Read::read_to_end": 2957,
- "`BufReader`": 2409,
- "crate::fs::File": 2413,
- "crate::fs::read_to_string": 2416
+ "Write::write": 2434,
+ "`ErrorKind::Interrupted`": 2958
},
- "name": "read_to_string",
+ "name": "write_all",
"span": {
"begin": [
- 991,
+ 1835,
5
],
"end": [
- 993,
+ 1847,
6
],
"filename": "std/src/io/mod.rs"
},
"visibility": "default"
},
- "2960": {
+ "2961": {
"attrs": [
{
- "other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
+ "other": "#[doc(alias = \"utimens\")]"
+ },
+ {
+ "other": "#[doc(alias = \"utimes\")]"
+ },
+ {
+ "other": "#[doc(alias = \"utime\")]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 147455, is_soft: false}, feature: \"fs_set_times\"}}]"
}
],
"crate_id": 0,
"deprecation": null,
- "docs": "Attempts to write an entire buffer into this writer.\n\nThis method will continuously call [`write`] until there is no more data\nto be written or an error of non-[`ErrorKind::Interrupted`] kind is\nreturned. This method will not return until the entire buffer has been\nsuccessfully written or such an error occurs. The first error that is\nnot of [`ErrorKind::Interrupted`] kind generated from this method will be\nreturned.\n\nIf the buffer contains no data, this will never call [`write`].\n\n# Errors\n\nThis function will return the first error of\nnon-[`ErrorKind::Interrupted`] kind that [`write`] returns.\n\n[`write`]: Write::write\n\n# Examples\n\n```no_run\nuse std::io::prelude::*;\nuse std::fs::File;\n\nfn main() -> std::io::Result<()> {\n let mut buffer = File::create(\"foo.txt\")?;\n\n buffer.write_all(b\"some bytes\")?;\n Ok(())\n}\n```",
- "id": 2960,
+ "docs": "Changes the timestamps of the file or directory at the specified path.\n\nThis function will attempt to set the access and modification times\nto the times specified. If the path refers to a symbolic link, this function\nwill follow the link and change the timestamps of the target file.\n\n# Platform-specific behavior\n\nThis function currently corresponds to the `utimensat` function on Unix platforms, the\n`setattrlist` function on Apple platforms, and the `SetFileTime` function on Windows.\n\n# Errors\n\nThis function will return an error if the user lacks permission to change timestamps on the\ntarget file or symlink. It may also return an error if the OS does not support it.\n\n# Examples\n\n```no_run\n#![feature(fs_set_times)]\nuse std::fs::{self, FileTimes};\nuse std::time::SystemTime;\n\nfn main() -> std::io::Result<()> {\n let now = SystemTime::now();\n let times = FileTimes::new()\n .set_accessed(now)\n .set_modified(now);\n fs::set_times(\"foo.txt\", times)?;\n Ok(())\n}\n```",
+ "id": 2961,
"inner": {
"function": {
"generics": {
- "params": [],
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 1666,
+ "path": "crate::path::Path"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 35,
+ "path": "AsRef"
+ }
+ }
+ }
+ ],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "P"
+ }
+ ],
"where_predicates": []
},
"has_body": true,
@@ -280468,28 +299326,18 @@
"sig": {
"inputs": [
[
- "self",
+ "path",
{
- "borrowed_ref": {
- "is_mutable": true,
- "lifetime": null,
- "type": {
- "generic": "Self"
- }
- }
+ "generic": "P"
}
],
[
- "buf",
+ "times",
{
- "borrowed_ref": {
- "is_mutable": false,
- "lifetime": null,
- "type": {
- "slice": {
- "primitive": "u8"
- }
- }
+ "resolved_path": {
+ "args": null,
+ "id": 2444,
+ "path": "FileTimes"
}
}
]
@@ -280509,32 +299357,155 @@
"constraints": []
}
},
- "id": 468,
- "path": "Result"
+ "id": 469,
+ "path": "io::Result"
}
}
}
}
},
- "links": {
- "Write::write": 2436,
- "`ErrorKind::Interrupted`": 2958
+ "links": {},
+ "name": "set_times",
+ "span": {
+ "begin": [
+ 426,
+ 1
+ ],
+ "end": [
+ 428,
+ 2
+ ],
+ "filename": "std/src/fs.rs"
},
- "name": "write_all",
+ "visibility": "public"
+ },
+ "2962": {
+ "attrs": [
+ {
+ "other": "#[doc(alias = \"utimensat\")]"
+ },
+ {
+ "other": "#[doc(alias = \"lutimens\")]"
+ },
+ {
+ "other": "#[doc(alias = \"lutimes\")]"
+ },
+ {
+ "other": "#[attr = Stability {stability: Stability {level: Unstable {reason: None,\nissue: 147455, is_soft: false}, feature: \"fs_set_times\"}}]"
+ }
+ ],
+ "crate_id": 0,
+ "deprecation": null,
+ "docs": "Changes the timestamps of the file or symlink at the specified path.\n\nThis function will attempt to set the access and modification times\nto the times specified. Differ from `set_times`, if the path refers to a symbolic link,\nthis function will change the timestamps of the symlink itself, not the target file.\n\n# Platform-specific behavior\n\nThis function currently corresponds to the `utimensat` function with `AT_SYMLINK_NOFOLLOW` on\nUnix platforms, the `setattrlist` function with `FSOPT_NOFOLLOW` on Apple platforms, and the\n`SetFileTime` function on Windows.\n\n# Errors\n\nThis function will return an error if the user lacks permission to change timestamps on the\ntarget file or symlink. It may also return an error if the OS does not support it.\n\n# Examples\n\n```no_run\n#![feature(fs_set_times)]\nuse std::fs::{self, FileTimes};\nuse std::time::SystemTime;\n\nfn main() -> std::io::Result<()> {\n let now = SystemTime::now();\n let times = FileTimes::new()\n .set_accessed(now)\n .set_modified(now);\n fs::set_times_nofollow(\"symlink.txt\", times)?;\n Ok(())\n}\n```",
+ "id": 2962,
+ "inner": {
+ "function": {
+ "generics": {
+ "params": [
+ {
+ "kind": {
+ "type": {
+ "bounds": [
+ {
+ "trait_bound": {
+ "generic_params": [],
+ "modifier": "none",
+ "trait": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "resolved_path": {
+ "args": null,
+ "id": 1666,
+ "path": "crate::path::Path"
+ }
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 35,
+ "path": "AsRef"
+ }
+ }
+ }
+ ],
+ "default": null,
+ "is_synthetic": false
+ }
+ },
+ "name": "P"
+ }
+ ],
+ "where_predicates": []
+ },
+ "has_body": true,
+ "header": {
+ "abi": "Rust",
+ "is_async": false,
+ "is_const": false,
+ "is_unsafe": false
+ },
+ "sig": {
+ "inputs": [
+ [
+ "path",
+ {
+ "generic": "P"
+ }
+ ],
+ [
+ "times",
+ {
+ "resolved_path": {
+ "args": null,
+ "id": 2444,
+ "path": "FileTimes"
+ }
+ }
+ ]
+ ],
+ "is_c_variadic": false,
+ "output": {
+ "resolved_path": {
+ "args": {
+ "angle_bracketed": {
+ "args": [
+ {
+ "type": {
+ "tuple": []
+ }
+ }
+ ],
+ "constraints": []
+ }
+ },
+ "id": 469,
+ "path": "io::Result"
+ }
+ }
+ }
+ }
+ },
+ "links": {},
+ "name": "set_times_nofollow",
"span": {
"begin": [
- 1835,
- 5
+ 467,
+ 1
],
"end": [
- 1847,
- 6
+ 469,
+ 2
],
- "filename": "std/src/io/mod.rs"
+ "filename": "std/src/fs.rs"
},
- "visibility": "default"
+ "visibility": "public"
},
- "2961": {
+ "2963": {
"attrs": [
{
"other": "#[doc(alias = \"rm\", alias = \"unlink\", alias = \"DeleteFile\")]"
@@ -280546,7 +299517,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Removes a file from the filesystem.\n\nNote that there is no\nguarantee that the file is immediately deleted (e.g., depending on\nplatform, other open file descriptors may prevent immediate removal).\n\n# Platform-specific behavior\n\nThis function currently corresponds to the `unlink` function on Unix.\nOn Windows, `DeleteFile` is used or `CreateFileW` and `SetInformationByHandle` for readonly files.\nNote that, this [may change in the future][changes].\n\n[changes]: io#platform-specific-behavior\n\n# Errors\n\nThis function will return an error in the following situations, but is not\nlimited to just these cases:\n\n* `path` points to a directory.\n* The file doesn't exist.\n* The user lacks permissions to remove the file.\n\nThis function will only ever return an error of kind `NotFound` if the given\npath does not exist. Note that the inverse is not true,\nie. if a path does not exist, its removal may fail for a number of reasons,\nsuch as insufficient permissions.\n\n# Examples\n\n```no_run\nuse std::fs;\n\nfn main() -> std::io::Result<()> {\n fs::remove_file(\"a.txt\")?;\n Ok(())\n}\n```",
- "id": 2961,
+ "id": 2963,
"inner": {
"function": {
"generics": {
@@ -280567,7 +299538,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "crate::path::Path"
}
}
@@ -280622,7 +299593,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -280630,23 +299601,23 @@
}
},
"links": {
- "io#platform-specific-behavior": 501
+ "io#platform-specific-behavior": 502
},
"name": "remove_file",
"span": {
"begin": [
- 2494,
+ 2580,
1
],
"end": [
- 2496,
+ 2582,
2
],
"filename": "std/src/fs.rs"
},
"visibility": "public"
},
- "2962": {
+ "2964": {
"attrs": [
{
"other": "#[doc(alias = \"mv\", alias = \"MoveFile\", alias = \"MoveFileEx\")]"
@@ -280658,7 +299629,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Renames a file or directory to a new name, replacing the original file if\n`to` already exists.\n\nThis will not work if the new name is on a different mount point.\n\n# Platform-specific behavior\n\nThis function currently corresponds to the `rename` function on Unix\nand the `MoveFileExW` or `SetFileInformationByHandle` function on Windows.\n\nBecause of this, the behavior when both `from` and `to` exist differs. On\nUnix, if `from` is a directory, `to` must also be an (empty) directory. If\n`from` is not a directory, `to` must also be not a directory. The behavior\non Windows is the same on Windows 10 1607 and higher if `FileRenameInfoEx`\nis supported by the filesystem; otherwise, `from` can be anything, but\n`to` must *not* be a directory.\n\nNote that, this [may change in the future][changes].\n\n[changes]: io#platform-specific-behavior\n\n# Errors\n\nThis function will return an error in the following situations, but is not\nlimited to just these cases:\n\n* `from` does not exist.\n* The user lacks permissions to view contents.\n* `from` and `to` are on separate filesystems.\n\n# Examples\n\n```no_run\nuse std::fs;\n\nfn main() -> std::io::Result<()> {\n fs::rename(\"a.txt\", \"b.txt\")?; // Rename a.txt to b.txt\n Ok(())\n}\n```",
- "id": 2962,
+ "id": 2964,
"inner": {
"function": {
"generics": {
@@ -280679,7 +299650,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "crate::path::Path"
}
}
@@ -280716,7 +299687,7 @@
"type": {
"resolved_path": {
"args": null,
- "id": 1667,
+ "id": 1666,
"path": "crate::path::Path"
}
}
@@ -280777,7 +299748,7 @@
"constraints": []
}
},
- "id": 468,
+ "id": 469,
"path": "io::Result"
}
}
@@ -280785,23 +299756,23 @@
}
},
"links": {
- "io#platform-specific-behavior": 501
+ "io#platform-specific-behavior": 502
},
"name": "rename",
"span": {
"begin": [
- 2614,
+ 2700,
1
],
"end": [
- 2616,
+ 2702,
2
],
"filename": "std/src/fs.rs"
},
"visibility": "public"
},
- "2963": {
+ "2965": {
"attrs": [
{
"other": "#[attr = Stability {stability: Stability {level: Stable {since: Version(RustcVersion {major: 1,\nminor: 0, patch: 0})}, feature: \"rust1\"}}]"
@@ -280810,7 +299781,7 @@
"crate_id": 0,
"deprecation": null,
"docs": "Copies the entire contents of a reader into a writer.\n\nThis function will continuously read data from `reader` and then\nwrite it into `writer` in a streaming fashion until `reader`\nreturns EOF.\n\nOn success, the total number of bytes that were copied from\n`reader` to `writer` is returned.\n\nIf you want to copy the contents of one file to another and you’re\nworking with filesystem paths, see the [`fs::copy`] function.\n\n[`fs::copy`]: crate::fs::copy\n\n# Errors\n\nThis function will return an error immediately if any call to [`read`] or\n[`write`] returns an error. All instances of [`ErrorKind::Interrupted`] are\nhandled by this function and the underlying operation is retried.\n\n[`read`]: Read::read\n[`write`]: Write::write\n[`ErrorKind::Interrupted`]: crate::io::ErrorKind::Interrupted\n\n# Examples\n\n```\nuse std::io;\n\nfn main() -> io::Result<()> {\n let mut reader: &[u8] = b\"hello\";\n let mut writer: Vec