]> git.lizzy.rs Git - rust.git/blob - src/test/ui/illegal-sized-bound/regular.stderr
Rollup merge of #105843 - compiler-errors:sugg-const, r=lcnr
[rust.git] / src / test / ui / illegal-sized-bound / regular.stderr
1 error: the `function` method cannot be invoked on a trait object
2   --> $DIR/regular.rs:28:41
3    |
4 LL |         Self: Sized;
5    |               ----- this has a `Sized` requirement
6 ...
7 LL |     (&mut MutType as &mut dyn MutTrait).function();
8    |                                         ^^^^^^^^
9
10 error: the `function` method cannot be invoked on a trait object
11   --> $DIR/regular.rs:30:27
12    |
13 LL |         Self: Sized;
14    |               ----- this has a `Sized` requirement
15 ...
16 LL |     (&Type as &dyn Trait).function();
17    |                           ^^^^^^^^
18
19 error: aborting due to 2 previous errors
20