]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/issues/issue-23281.stderr
Require Drop impls to have the same constness on its bounds as the bounds on the...
[rust.git] / src / test / ui / issues / issue-23281.stderr
index a3d2583292551a18d7d0c852ae66500a5f58cc5d..804334c9b0d245785151ac5f541f6f024b483d30 100644 (file)
@@ -3,11 +3,13 @@ error[E0277]: the size for values of type `(dyn Fn() + 'static)` cannot be known
    |
 LL |     pub fn function(funs: Vec<dyn Fn() -> ()>) {}
    |                           ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
-...
-LL | struct Vec<T> {
-   |            - required by this bound in `Vec`
    |
    = help: the trait `Sized` is not implemented for `(dyn Fn() + 'static)`
+note: required by a bound in `Vec`
+  --> $DIR/issue-23281.rs:8:12
+   |
+LL | struct Vec<T> {
+   |            ^ required by this bound in `Vec`
 help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
   --> $DIR/issue-23281.rs:8:12
    |