Rollup merge of #100163 - TaKO8Ki:remove-unnecessary-string-search, r=wesleywiser

Refactor: remove an unnecessary string search
This commit is contained in:
Matthias Krüger 2022-08-09 07:05:55 +02:00 committed by GitHub
commit a1829bbed0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 34 deletions

View file

@ -2,9 +2,12 @@ error[E0615]: attempted to take value of method `read` on type `*mut Foo`
--> $DIR/issue-91210-ptr-method.rs:10:7
|
LL | x.read = 4;
| - ^^^^ method, not a field
| |
| help: to access the field, dereference first: `(*x)`
| ^^^^ method, not a field
|
help: to access the field, dereference first
|
LL | (*x).read = 4;
| ++ +
error: aborting due to previous error