blob: 426e0fe9e0d9201e686b621e9897ca88c9f9dc27 [file] [log] [blame] [edit]
error[E0308]: mismatched types
--> $DIR/fn-ret-trait-object-propagated-to-inputs-issue-149379-1.rs:16:33
|
LL | let _: Box<dyn Send> = foo(((), ()));
| ^^ expected trait object, found `()`
|
= note: expected trait object `dyn Send`
found unit type `()`
error[E0277]: the size for values of type `dyn Send` cannot be known at compilation time
--> $DIR/fn-ret-trait-object-propagated-to-inputs-issue-149379-1.rs:16:32
|
LL | let _: Box<dyn Send> = foo(((), ()));
| --- ^^^^^^^^ doesn't have a size known at compile-time
| |
| required by a bound introduced by this call
|
= help: the trait `Sized` is not implemented for `dyn Send`
note: required by an implicit `Sized` bound in `foo`
--> $DIR/fn-ret-trait-object-propagated-to-inputs-issue-149379-1.rs:10:8
|
LL | fn foo<T>(x: (T, ())) -> Box<T> {
| ^ required by the implicit `Sized` requirement on this type parameter in `foo`
help: consider relaxing the implicit `Sized` restriction
|
LL | fn foo<T: ?Sized>(x: (T, ())) -> Box<T> {
| ++++++++
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.