diff options
| author | bors <bors@rust-lang.org> | 2019-01-06 10:30:05 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-01-06 10:30:05 +0000 |
| commit | e628196d41834971e70b3eb7d40a9d962b4d4da6 (patch) | |
| tree | 7e40bc09eed45db3c1accaa9ec3f00c90366a761 /src/test/ui/error-codes | |
| parent | af2c159cc38f251a8e7d43cf1f98806392fbddcf (diff) | |
| parent | e3fe0ee97b95abd13e257fa92c70248c0746165c (diff) | |
| download | rust-e628196d41834971e70b3eb7d40a9d962b4d4da6.tar.gz rust-e628196d41834971e70b3eb7d40a9d962b4d4da6.zip | |
Auto merge of #57291 - euclio:method-call-suggestion, r=estebank
use structured suggestion for method calls Furthermore, don't suggest calling the method if it is part of a place expression, as this is invalid syntax. I'm thinking it might be worth putting a label on the method assignment span like "this is a method" and removing the span from the "methods are immutable" text so it isn't reported twice. The suggestions in `src/test/ui/did_you_mean/issue-40396.stderr` are suboptimal. I could check if the containing expression is `BinOp`, but I'm not sure if that's general enough. Any ideas? r? @estebank
Diffstat (limited to 'src/test/ui/error-codes')
| -rw-r--r-- | src/test/ui/error-codes/E0615.stderr | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/test/ui/error-codes/E0615.stderr b/src/test/ui/error-codes/E0615.stderr index 423948666db..d86ee5b9b4b 100644 --- a/src/test/ui/error-codes/E0615.stderr +++ b/src/test/ui/error-codes/E0615.stderr @@ -2,9 +2,7 @@ error[E0615]: attempted to take value of method `method` on type `Foo` --> $DIR/E0615.rs:11:7 | LL | f.method; //~ ERROR E0615 - | ^^^^^^ - | - = help: maybe a `()` to call it is missing? + | ^^^^^^ help: use parentheses to call the method: `method()` error: aborting due to previous error |
