You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Without one of those attributes, my understanding is the transmute from &[T] to &RevSlice<T> is undefined behavior. The compiler is free to stick some additional data at the start of RevSlice<T> or give it a stricter alignment than [T]. For example some targets may require all struct types to have some minimum alignment that is not required for slices.
Without one of those attributes, my understanding is the transmute from &[T] to &RevSlice<T> is undefined behavior. The compiler is free to stick some additional data at the start of RevSlice<T> or give it a stricter alignment than [T]. For example some targets may require all struct types to have some minimum alignment that is not required for slices.
From nomicon's Alternative representations:
The text was updated successfully, but these errors were encountered: