diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/illegal-sized-bound/regular.stderr | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/ui/illegal-sized-bound/regular.stderr b/tests/ui/illegal-sized-bound/regular.stderr new file mode 100644 index 000000000..7f3744145 --- /dev/null +++ b/tests/ui/illegal-sized-bound/regular.stderr @@ -0,0 +1,20 @@ +error: the `function` method cannot be invoked on a trait object + --> $DIR/regular.rs:28:41 + | +LL | Self: Sized; + | ----- this has a `Sized` requirement +... +LL | (&mut MutType as &mut dyn MutTrait).function(); + | ^^^^^^^^ + +error: the `function` method cannot be invoked on a trait object + --> $DIR/regular.rs:30:27 + | +LL | Self: Sized; + | ----- this has a `Sized` requirement +... +LL | (&Type as &dyn Trait).function(); + | ^^^^^^^^ + +error: aborting due to 2 previous errors + |