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
I expected to see this happen: Fail to compile because an array doesn't allow DST's
Instead, this happened: It just compiled
Meta
rustc --version --verbose:
stable, beta and nightly
Whenever the type is used:
typeA = [dynSend;2];fnusing(a:A){}
rustc complains correctly:
Compiling playground v0.0.1 (/playground)
error[E0277]: the size for values of type `(dyn std::marker::Send + 'static)` cannot be known at compilation time
--> src/lib.rs:3:1
|
3 | fn using(a: A) {}
| ^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `std::marker::Sized` is not implemented for `(dyn std::marker::Send + 'static)`
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
= note: slice and array elements must have `Sized` type
error: aborting due to previous error
For more information about this error, try `rustc --explain E0277`.
error: could not compile `playground`.
To learn more, run the command again with --verbose.
The text was updated successfully, but these errors were encountered:
I tried this code:
I expected to see this happen: Fail to compile because an array doesn't allow DST's
Instead, this happened: It just compiled
Meta
rustc --version --verbose
:Whenever the type is used:
rustc complains correctly:
The text was updated successfully, but these errors were encountered: