Skip to content

Commit 1e53624

Browse files
author
Ariel Ben-Yehuda
authored
Rollup merge of rust-lang#40254 - nagisa:compiler-builtin-no-panic, r=alexcrichton
Fix personality_fn within the compiler_builtins compiler_builtins may not have any unwinding within it to link correctly. This is notoriously finicky, and this small piece of change removes yet another case where personality function happens to get introduced. Side note: I do remember solving the exact same thing before. I wonder why it has reappered... @cuviper, could you please try building beta with this patch applied? It should apply cleanly. If it works, I’ll nominate to land this into beta. Fixes(?) rust-lang#40251
2 parents 2c252ff + 8f581cc commit 1e53624

File tree

1 file changed

+5
-4
lines changed
  • src/libcompiler_builtins

1 file changed

+5
-4
lines changed

src/libcompiler_builtins/lib.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -402,15 +402,16 @@ pub mod reimpls {
402402
}
403403

404404
trait AbsExt: Sized {
405-
fn uabs(self) -> u128 {
406-
self.iabs() as u128
407-
}
405+
fn uabs(self) -> u128;
408406
fn iabs(self) -> i128;
409407
}
410408

411409
impl AbsExt for i128 {
410+
fn uabs(self) -> u128 {
411+
self.iabs() as u128
412+
}
412413
fn iabs(self) -> i128 {
413-
let s = self >> 127;
414+
let s = self.wrapping_shr(127);
414415
((self ^ s).wrapping_sub(s))
415416
}
416417
}

0 commit comments

Comments
 (0)