Fix unsafe precondition violation when building with nightly `rustc` (#8691)

Fixes #8658

Release Notes:

- N/A
0903062933Liam Murphy committed on 3/2/2024, 7:01:44 AM· committed by GitHubparente5e6c7f
1 file changedLine totals unavailable