ndarray
ndarray copied to clipboard
Fix unsafe blocks in s![] macro
trafficstars
Before, the user could silently violate safety requirements of SliceInfo::new_unchecked by directly calling s![@parse inconsistent_values], where inconsistent_values represents inconsistent values for the dimensions, etc. Now, the macro calls SliceInfo::new_unchecked only in the ($($t:tt)*) arm, which always constructs the correct values for the call.
CI results:
- The clippy warning is a bug (bad diagnostic) in clippy on the current Rust beta; it's fixed in the latest nightly.
- The
cross_testerror is something wrong with the GitHub action -- it's not an issue withndarray.