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