forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#127114 - linyihai:issue-126863, r=Nadrieril fix: prefer `(*p).clone` to `p.clone` if the `p` is a raw pointer Fixes rust-lang#126863 I wonder if there is a better way to solve the regression problem of this test case: `tests/ui/borrowck/issue-20801.rs`. It's okay to drop the dereference symbol in this scenario. But it's not correct in rust-lang#126863 ``` help: consider removing the dereference here | 5 - let inner: String = *p; 5 + let inner: String = p; ``` I haven't found out how to tell if clone pointer is allowed, i.e. no type mismatch occurs
- Loading branch information
Showing
5 changed files
with
50 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters