]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/wf/wf-convert-unsafe-trait-obj-box.stderr
Point at `Sized` bound
[rust.git] / src / test / ui / wf / wf-convert-unsafe-trait-obj-box.stderr
index 0b63aef2bce1077110a722478c4f15c60b0124f1..4c033cfcd898bac34a329ad3991d8baf729f2b24 100644 (file)
@@ -1,6 +1,9 @@
 error[E0038]: the trait `Trait` cannot be made into an object
   --> $DIR/wf-convert-unsafe-trait-obj-box.rs:16:33
    |
+LL | trait Trait: Sized {}
+   |              ----- the trait cannot require that `Self : Sized`
+...
 LL |     let t_box: Box<dyn Trait> = Box::new(S);
    |                                 ^^^^^^^^^^^ the trait `Trait` cannot be made into an object
    |
@@ -11,6 +14,9 @@ LL |     let t_box: Box<dyn Trait> = Box::new(S);
 error[E0038]: the trait `Trait` cannot be made into an object
   --> $DIR/wf-convert-unsafe-trait-obj-box.rs:17:15
    |
+LL | trait Trait: Sized {}
+   |              ----- the trait cannot require that `Self : Sized`
+...
 LL |     takes_box(Box::new(S));
    |               ^^^^^^^^^^^ the trait `Trait` cannot be made into an object
    |
@@ -21,6 +27,9 @@ LL |     takes_box(Box::new(S));
 error[E0038]: the trait `Trait` cannot be made into an object
   --> $DIR/wf-convert-unsafe-trait-obj-box.rs:15:5
    |
+LL | trait Trait: Sized {}
+   |              ----- the trait cannot require that `Self : Sized`
+...
 LL |     Box::new(S) as Box<dyn Trait>;
    |     ^^^^^^^^^^^ the trait `Trait` cannot be made into an object
    |