Commit ffc0b8a
authored
Rollup merge of rust-lang#106633 - c410-f3r:stabilize-nonzero_bits, r=dtolnay
Stabilize `nonzero_min_max`
## Overall
Stabilizes `nonzero_min_max` to allow the "infallible" construction of ordinary minimum and maximum `NonZero*` instances.
The feature is fairly straightforward and already matured for some time in stable toolchains.
```rust
let _ = NonZeroU8::MIN;
let _ = NonZeroI32::MAX;
```
## History
* On 2022-01-25, implementation was [created](rust-lang#93293).
## Considerations
* This report is fruit of the inanition observed after two unsuccessful attempts at getting feedback.
* Other constant variants discussed at rust-lang#89065 (comment) are orthogonal to this feature.
Fixes rust-lang#890651 file changed
+4
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1147 | 1147 | | |
1148 | 1148 | | |
1149 | 1149 | | |
1150 | | - | |
1151 | | - | |
1152 | 1150 | | |
1153 | 1151 | | |
1154 | 1152 | | |
1155 | | - | |
| 1153 | + | |
1156 | 1154 | | |
1157 | 1155 | | |
1158 | 1156 | | |
| |||
1162 | 1160 | | |
1163 | 1161 | | |
1164 | 1162 | | |
1165 | | - | |
1166 | | - | |
1167 | 1163 | | |
1168 | 1164 | | |
1169 | 1165 | | |
1170 | | - | |
| 1166 | + | |
1171 | 1167 | | |
1172 | 1168 | | |
1173 | 1169 | | |
| |||
1189 | 1185 | | |
1190 | 1186 | | |
1191 | 1187 | | |
1192 | | - | |
1193 | | - | |
1194 | 1188 | | |
1195 | 1189 | | |
1196 | 1190 | | |
1197 | | - | |
| 1191 | + | |
1198 | 1192 | | |
1199 | 1193 | | |
1200 | 1194 | | |
| |||
1208 | 1202 | | |
1209 | 1203 | | |
1210 | 1204 | | |
1211 | | - | |
1212 | | - | |
1213 | 1205 | | |
1214 | 1206 | | |
1215 | 1207 | | |
1216 | | - | |
| 1208 | + | |
1217 | 1209 | | |
1218 | 1210 | | |
1219 | 1211 | | |
| |||
0 commit comments