]> git.lizzy.rs Git - rust.git/blob - tests/ui/illegal-sized-bound/mutability-mismatch.stderr
Rollup merge of #106570 - Xaeroxe:div-duration-tests, r=JohnTitor
[rust.git] / tests / ui / illegal-sized-bound / mutability-mismatch.stderr
1 error: the `function` method cannot be invoked on `&dyn MutTrait`
2   --> $DIR/mutability-mismatch.rs:26:33
3    |
4 LL |     (&MutType as &dyn MutTrait).function();
5    |                                 ^^^^^^^^
6    |
7    = help: you need `&mut dyn MutTrait` instead of `&dyn MutTrait`
8
9 error: the `function` method cannot be invoked on `&mut dyn Trait`
10   --> $DIR/mutability-mismatch.rs:29:35
11    |
12 LL |     (&mut Type as &mut dyn Trait).function();
13    |                                   ^^^^^^^^
14    |
15    = help: you need `&dyn Trait` instead of `&mut dyn Trait`
16
17 error: aborting due to 2 previous errors
18