1 error[E0308]: mismatched types
2 --> $DIR/chain-method-call-mutation-in-place.rs:3:5
4 LL | fn foo(mut s: String) -> String {
5 | ------ expected `String` because of return type
6 LL | s.push_str("asdf")
7 | ^^^^^^^^^^^^^^^^^^ expected struct `String`, found `()`
9 note: method `push_str` modifies its receiver in-place
10 --> $DIR/chain-method-call-mutation-in-place.rs:3:7
12 LL | s.push_str("asdf")
13 | - ^^^^^^^^ this call modifies `s` in-place
15 | you probably want to use this value after calling the method...
16 = note: ...instead of the `()` output of method `push_str`
18 error: aborting due to previous error
20 For more information about this error, try `rustc --explain E0308`.