diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2020-08-18 09:27:47 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-18 09:27:47 +0900 |
| commit | 48da6758e568a68acb1be3a1ce6adef0aeea0665 (patch) | |
| tree | f59e864647dc3e0b4dfb06ef5856978710b932f8 /src/test/rustdoc-ui/coverage/json.rs | |
| parent | 8eb805c55cca030109525ae5daac4d4a646ee0a1 (diff) | |
| parent | ac73474c7db65e49d3fd17906b7d34d984a88172 (diff) | |
| download | rust-48da6758e568a68acb1be3a1ce6adef0aeea0665.tar.gz rust-48da6758e568a68acb1be3a1ce6adef0aeea0665.zip | |
Rollup merge of #75613 - estebank:explain-mut-method, r=petrochenkov
Add explanation for `&mut self` method call when expecting `-> Self` When a user tries to use a method as if it returned a new value of the same type as its receiver, we will emit a type error. Try to detect this and provide extra explanation that the method modifies the receiver in-place. This has confused people in the wild, like in https://users.rust-lang.org/t/newbie-why-the-commented-line-stops-the-snippet-from-compiling/47322
Diffstat (limited to 'src/test/rustdoc-ui/coverage/json.rs')
0 files changed, 0 insertions, 0 deletions
