Auto merge of #111925 - Manishearth:rollup-z6z6l2v, r=Manishearth
Rollup of 5 pull requests Successful merges: - #111741 (Use `ObligationCtxt` in custom type ops) - #111840 (Expose more information in `get_body_with_borrowck_facts`) - #111876 (Roll compiler_builtins to 0.1.92) - #111912 (Use `Option::is_some_and` and `Result::is_ok_and` in the compiler ) - #111915 (libtest: Improve error when missing `-Zunstable-options`) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
7664dfe433
115 changed files with 417 additions and 378 deletions
|
@ -363,7 +363,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
|
|||
let left_size = self.ecx.layout_of(left_ty).ok()?.size;
|
||||
let right_size = r.layout.size;
|
||||
let r_bits = r.to_scalar().to_bits(right_size).ok();
|
||||
if r_bits.map_or(false, |b| b >= left_size.bits() as u128) {
|
||||
if r_bits.is_some_and(|b| b >= left_size.bits() as u128) {
|
||||
debug!("check_binary_op: reporting assert for {:?}", location);
|
||||
let source_info = self.body().source_info(location);
|
||||
let panic = AssertKind::Overflow(
|
||||
|
|
|
@ -108,7 +108,7 @@ fn local_eligible_for_nrvo(body: &mut mir::Body<'_>) -> Option<Local> {
|
|||
|
||||
// If multiple different locals are copied to the return place. We can't pick a
|
||||
// single one to rename.
|
||||
if copied_to_return_place.map_or(false, |old| old != returned_local) {
|
||||
if copied_to_return_place.is_some_and(|old| old != returned_local) {
|
||||
return None;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue