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
fnmain(){let x = Box::new([1,2,3]);let y = x asBox<[i32]>;println!("y: {:?}", y);}
However, this implicit coercion does work:
fnmain(){let x = Box::new([1,2,3]);let y:Box<[i32]> = x;println!("y: {:?}", y);}
It is unfortunate, because I would like the overloaded-box inference to work for expr as Box<[T]> in the same manner that it does for expr as Box<Trait>.
The text was updated successfully, but these errors were encountered:
This explicit cast does not work:
However, this implicit coercion does work:
It is unfortunate, because I would like the overloaded-box inference to work for
expr as Box<[T]>
in the same manner that it does forexpr as Box<Trait>
.The text was updated successfully, but these errors were encountered: