diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2020-01-29 12:59:04 -0800 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2020-02-02 11:52:34 -0800 |
| commit | 4b2f1db6e464b74067557b1748e79cb11a2c5e59 (patch) | |
| tree | d9d34329b189d8e00b5c184df655b8f2806dc023 /src/test/ui/kindck | |
| parent | d137b7ac1173e3bbed6a3d4dfb02c741b64077db (diff) | |
| download | rust-4b2f1db6e464b74067557b1748e79cb11a2c5e59.tar.gz rust-4b2f1db6e464b74067557b1748e79cb11a2c5e59.zip | |
Tweak `Self: Sized` restriction diagnostic output
Diffstat (limited to 'src/test/ui/kindck')
| -rw-r--r-- | src/test/ui/kindck/kindck-inherited-copy-bound.curr.stderr | 9 | ||||
| -rw-r--r-- | src/test/ui/kindck/kindck-inherited-copy-bound.object_safe_for_dispatch.stderr | 4 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/test/ui/kindck/kindck-inherited-copy-bound.curr.stderr b/src/test/ui/kindck/kindck-inherited-copy-bound.curr.stderr index da1a7a7520e..a0ecca3020e 100644 --- a/src/test/ui/kindck/kindck-inherited-copy-bound.curr.stderr +++ b/src/test/ui/kindck/kindck-inherited-copy-bound.curr.stderr @@ -12,18 +12,21 @@ LL | take_param(&x); error[E0038]: the trait `Foo` cannot be made into an object --> $DIR/kindck-inherited-copy-bound.rs:28:19 | +LL | trait Foo : Copy { + | ---- the trait cannot require that `Self : Sized` +... LL | let z = &x as &dyn Foo; | ^^^^^^^^ the trait `Foo` cannot be made into an object - | - = note: the trait cannot require that `Self : Sized` error[E0038]: the trait `Foo` cannot be made into an object --> $DIR/kindck-inherited-copy-bound.rs:28:13 | +LL | trait Foo : Copy { + | ---- the trait cannot require that `Self : Sized` +... LL | let z = &x as &dyn Foo; | ^^ the trait `Foo` cannot be made into an object | - = note: the trait cannot require that `Self : Sized` = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<&dyn Foo>` for `&std::boxed::Box<{integer}>` = note: required by cast to type `&dyn Foo` diff --git a/src/test/ui/kindck/kindck-inherited-copy-bound.object_safe_for_dispatch.stderr b/src/test/ui/kindck/kindck-inherited-copy-bound.object_safe_for_dispatch.stderr index f272f829ba6..5694150ed7c 100644 --- a/src/test/ui/kindck/kindck-inherited-copy-bound.object_safe_for_dispatch.stderr +++ b/src/test/ui/kindck/kindck-inherited-copy-bound.object_safe_for_dispatch.stderr @@ -12,10 +12,12 @@ LL | take_param(&x); error[E0038]: the trait `Foo` cannot be made into an object --> $DIR/kindck-inherited-copy-bound.rs:28:13 | +LL | trait Foo : Copy { + | ---- the trait cannot require that `Self : Sized` +... LL | let z = &x as &dyn Foo; | ^^ the trait `Foo` cannot be made into an object | - = note: the trait cannot require that `Self : Sized` = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<&dyn Foo>` for `&std::boxed::Box<i32>` = note: required by cast to type `&dyn Foo` |
