Skip to content

Commit

Permalink
Auto merge of #108623 - scottmcm:try-different-as-slice-impl, r=the8472
Browse files Browse the repository at this point in the history
Move `Option::as_slice` to an always-sound implementation

This approach depends on CSE to not have any branches or selects when the guessed offset is correct -- which it always will be right now -- but to also be *sound* (just less efficient) if the layout algorithms change such that the guess is incorrect.

The codegen test confirms that CSE handles this as expected, leaving the optimal codegen.

cc JakobDegen #108545
  • Loading branch information
bors committed Mar 13, 2023
2 parents 259febb + 6d6d1ed commit 9e4358d
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 9e4358d

Please sign in to comment.