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
Most of the time it happens automatically due to DST coercions &[T; N] => &[T], but sometimes additional care is required.
One example, where it currently doesn't work, is comparison operators between slices/arrays/vectors:
fn main() {
let a: &[u8; 3] = &[1, 2, 3];
let b: &[u8] = &[1, 2, 3];
// Both comparisons doesn't compile
a == b;
b == a;
}
When #18465 is implemented, the code comparing byte string literals with slices will break. A lot of such code can be found, for example, in libstd/path.