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(
10901090 } else if is_pwr2minus1 ( niches) {
10911091 format_to ! ( label, "niches = 2{} - 1, " , pwr2_to_exponent( niches + 1 ) ) ;
10921092 } else {
1093- format_to ! ( label, "niches = really rather quite large , " ) ;
1093+ format_to ! ( label, "niches = a lot , " ) ;
10941094 }
10951095 } else {
10961096 format_to ! ( label, "niches = {niches}, " ) ;
@@ -1224,15 +1224,15 @@ fn render_dyn_compatibility(
12241224}
12251225
12261226fn is_pwr2 ( val : u128 ) -> bool {
1227- val. count_ones ( ) == 1
1227+ val. is_power_of_two ( )
12281228}
12291229
12301230fn is_pwr2minus1 ( val : u128 ) -> bool {
1231- val == u128:: MAX || ( val + 1 ) . count_ones ( ) == 1
1231+ val == u128:: MAX || is_pwr2 ( val + 1 )
12321232}
12331233
12341234fn is_pwr2plus1 ( val : u128 ) -> bool {
1235- val != 0 && ( val - 1 ) . count_ones ( ) == 1
1235+ val != 0 && is_pwr2 ( val - 1 )
12361236}
12371237
12381238fn pwr2_to_exponent ( num : u128 ) -> String {
Original file line number Diff line number Diff line change @@ -1357,7 +1357,7 @@ fn hover_enum_limit() {
13571357
13581358 ---
13591359
1360- size = 12 (0xC), align = 4, niches = really rather quite large
1360+ size = 12 (0xC), align = 4, niches = a lot
13611361 "# ] ] ,
13621362 ) ;
13631363}
You can’t perform that action at this time.
0 commit comments