Skip to content

Commit

Permalink
Rollup merge of #126328 - RalfJung:is_none_or, r=workingjubilee
Browse files Browse the repository at this point in the history
Add Option::is_none_or

ACP: rust-lang/libs-team#212
  • Loading branch information
workingjubilee authored Jun 13, 2024
2 parents 7981363 + ae14e96 commit 8539bc3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#![feature(lint_reasons)]
#![feature(trait_upcasting)]
#![feature(strict_overflow_ops)]
#![feature(is_none_or)]
// Configure clippy and other lints
#![allow(
clippy::collapsible_else_if,
Expand Down
4 changes: 2 additions & 2 deletions src/shims/foreign_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,12 +396,12 @@ trait EvalContextExtPriv<'tcx>: crate::MiriInterpCxExt<'tcx> {
// If the newly promised alignment is bigger than the native alignment of this
// allocation, and bigger than the previously promised alignment, then set it.
if align > alloc_align
&& !this
&& this
.machine
.symbolic_alignment
.get_mut()
.get(&alloc_id)
.is_some_and(|&(_, old_align)| align <= old_align)
.is_none_or(|&(_, old_align)| align > old_align)
{
this.machine.symbolic_alignment.get_mut().insert(alloc_id, (offset, align));
}
Expand Down

0 comments on commit 8539bc3

Please sign in to comment.