File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
src/tools/rust-analyzer/crates/ide/src/hover Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1090,7 +1090,7 @@ fn render_memory_layout(
1090
1090
} else if is_pwr2minus1 ( niches) {
1091
1091
format_to ! ( label, "niches = 2{} - 1, " , pwr2_to_exponent( niches + 1 ) ) ;
1092
1092
} else {
1093
- format_to ! ( label, "niches = really rather quite large , " ) ;
1093
+ format_to ! ( label, "niches = a lot , " ) ;
1094
1094
}
1095
1095
} else {
1096
1096
format_to ! ( label, "niches = {niches}, " ) ;
@@ -1224,15 +1224,15 @@ fn render_dyn_compatibility(
1224
1224
}
1225
1225
1226
1226
fn is_pwr2 ( val : u128 ) -> bool {
1227
- val. count_ones ( ) == 1
1227
+ val. is_power_of_two ( )
1228
1228
}
1229
1229
1230
1230
fn is_pwr2minus1 ( val : u128 ) -> bool {
1231
- val == u128:: MAX || ( val + 1 ) . count_ones ( ) == 1
1231
+ val == u128:: MAX || is_pwr2 ( val + 1 )
1232
1232
}
1233
1233
1234
1234
fn is_pwr2plus1 ( val : u128 ) -> bool {
1235
- val != 0 && ( val - 1 ) . count_ones ( ) == 1
1235
+ val != 0 && is_pwr2 ( val - 1 )
1236
1236
}
1237
1237
1238
1238
fn pwr2_to_exponent ( num : u128 ) -> String {
Original file line number Diff line number Diff line change @@ -1357,7 +1357,7 @@ fn hover_enum_limit() {
1357
1357
1358
1358
---
1359
1359
1360
- size = 12 (0xC), align = 4, niches = really rather quite large
1360
+ size = 12 (0xC), align = 4, niches = a lot
1361
1361
"# ] ] ,
1362
1362
) ;
1363
1363
}
You can’t perform that action at this time.
0 commit comments