|
| 1 | +error[E0038]: the trait `AsyncFn` cannot be made into an object |
| 2 | + --> $DIR/dyn-pos.rs:5:16 |
| 3 | + | |
| 4 | +LL | fn foo(x: &dyn async Fn()) {} |
| 5 | + | ^^^^^^^^^^ `AsyncFn` cannot be made into an object |
| 6 | + | |
| 7 | +note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety> |
| 8 | + --> $SRC_DIR/core/src/ops/async_function.rs:LL:COL |
| 9 | + | |
| 10 | + = note: the trait cannot be made into an object because it contains the generic associated type `CallFuture` |
| 11 | + |
| 12 | +error[E0038]: the trait `AsyncFnMut` cannot be made into an object |
| 13 | + --> $DIR/dyn-pos.rs:5:16 |
| 14 | + | |
| 15 | +LL | fn foo(x: &dyn async Fn()) {} |
| 16 | + | ^^^^^^^^^^ `AsyncFnMut` cannot be made into an object |
| 17 | + | |
| 18 | +note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety> |
| 19 | + --> $SRC_DIR/core/src/ops/async_function.rs:LL:COL |
| 20 | + | |
| 21 | + = note: the trait cannot be made into an object because it contains the generic associated type `CallMutFuture` |
| 22 | + |
| 23 | +error[E0038]: the trait `AsyncFn` cannot be made into an object |
| 24 | + --> $DIR/dyn-pos.rs:5:16 |
| 25 | + | |
| 26 | +LL | fn foo(x: &dyn async Fn()) {} |
| 27 | + | ^^^^^^^^^^ `AsyncFn` cannot be made into an object |
| 28 | + | |
| 29 | +note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety> |
| 30 | + --> $SRC_DIR/core/src/ops/async_function.rs:LL:COL |
| 31 | + | |
| 32 | + = note: the trait cannot be made into an object because it contains the generic associated type `CallFuture` |
| 33 | + = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` |
| 34 | + |
| 35 | +error[E0038]: the trait `AsyncFnMut` cannot be made into an object |
| 36 | + --> $DIR/dyn-pos.rs:5:16 |
| 37 | + | |
| 38 | +LL | fn foo(x: &dyn async Fn()) {} |
| 39 | + | ^^^^^^^^^^ `AsyncFnMut` cannot be made into an object |
| 40 | + | |
| 41 | +note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety> |
| 42 | + --> $SRC_DIR/core/src/ops/async_function.rs:LL:COL |
| 43 | + | |
| 44 | + = note: the trait cannot be made into an object because it contains the generic associated type `CallMutFuture` |
| 45 | + = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` |
| 46 | + |
| 47 | +error[E0038]: the trait `AsyncFn` cannot be made into an object |
| 48 | + --> $DIR/dyn-pos.rs:5:16 |
| 49 | + | |
| 50 | +LL | fn foo(x: &dyn async Fn()) {} |
| 51 | + | ^^^^^^^^^^ `AsyncFn` cannot be made into an object |
| 52 | + | |
| 53 | +note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety> |
| 54 | + --> $SRC_DIR/core/src/ops/async_function.rs:LL:COL |
| 55 | + | |
| 56 | + = note: the trait cannot be made into an object because it contains the generic associated type `CallFuture` |
| 57 | + = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` |
| 58 | + |
| 59 | +error[E0038]: the trait `AsyncFnMut` cannot be made into an object |
| 60 | + --> $DIR/dyn-pos.rs:5:16 |
| 61 | + | |
| 62 | +LL | fn foo(x: &dyn async Fn()) {} |
| 63 | + | ^^^^^^^^^^ `AsyncFnMut` cannot be made into an object |
| 64 | + | |
| 65 | +note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety> |
| 66 | + --> $SRC_DIR/core/src/ops/async_function.rs:LL:COL |
| 67 | + | |
| 68 | + = note: the trait cannot be made into an object because it contains the generic associated type `CallMutFuture` |
| 69 | + = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` |
| 70 | + |
| 71 | +error[E0038]: the trait `AsyncFn` cannot be made into an object |
| 72 | + --> $DIR/dyn-pos.rs:5:12 |
| 73 | + | |
| 74 | +LL | fn foo(x: &dyn async Fn()) {} |
| 75 | + | ^^^^^^^^^^^^^^ `AsyncFn` cannot be made into an object |
| 76 | + | |
| 77 | +note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety> |
| 78 | + --> $SRC_DIR/core/src/ops/async_function.rs:LL:COL |
| 79 | + | |
| 80 | + = note: the trait cannot be made into an object because it contains the generic associated type `CallFuture` |
| 81 | + ::: $SRC_DIR/core/src/ops/async_function.rs:LL:COL |
| 82 | + | |
| 83 | + = note: the trait cannot be made into an object because it contains the generic associated type `CallMutFuture` |
| 84 | + |
| 85 | +error: aborting due to 7 previous errors |
| 86 | + |
| 87 | +For more information about this error, try `rustc --explain E0038`. |
0 commit comments