]> git.lizzy.rs Git - rust.git/blob - tests/ui/methods/field-method-suggestion-using-return-ty.stderr
Rollup merge of #106766 - GuillaumeGomez:rm-stripper-dead-code, r=notriddle
[rust.git] / tests / ui / methods / field-method-suggestion-using-return-ty.stderr
1 error[E0599]: no method named `as_mut` found for reference `&Wrapper<Option<i32>>` in the current scope
2   --> $DIR/field-method-suggestion-using-return-ty.rs:5:14
3    |
4 LL |         self.as_mut()
5    |              ^^^^^^ method not found in `&Wrapper<Option<i32>>`
6    |
7    = help: items from traits can only be used if the trait is implemented and in scope
8    = note: the following trait defines an item `as_mut`, perhaps you need to implement it:
9            candidate #1: `AsMut`
10 help: one of the expressions' fields has a method of the same name
11    |
12 LL |         self.0.as_mut()
13    |              ++
14
15 error[E0599]: no method named `as_mut` found for reference `&Wrapper<Option<i32>>` in the current scope
16   --> $DIR/field-method-suggestion-using-return-ty.rs:12:14
17    |
18 LL |         self.as_mut()
19    |              ^^^^^^ method not found in `&Wrapper<Option<i32>>`
20    |
21    = help: items from traits can only be used if the trait is implemented and in scope
22    = note: the following trait defines an item `as_mut`, perhaps you need to implement it:
23            candidate #1: `AsMut`
24
25 error: aborting due to 2 previous errors
26
27 For more information about this error, try `rustc --explain E0599`.