about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/scripts/rustdoc-clif.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-06-29 22:10:58 +0200
committerGitHub <noreply@github.com>2024-06-29 22:10:58 +0200
commit9879b4606cab3f93cdae4f0546caca4547f0b093 (patch)
tree4b6a196a617808360f28cacca0cd5458732ac618 /compiler/rustc_codegen_cranelift/scripts/rustdoc-clif.rs
parent80cf576f59db72852b8b6fe25e8d697645dd20c8 (diff)
parent8dc36c16470d60fa1bd7bc370c77ac63ef25bfe4 (diff)
downloadrust-9879b4606cab3f93cdae4f0546caca4547f0b093.tar.gz
rust-9879b4606cab3f93cdae4f0546caca4547f0b093.zip
Rollup merge of #127114 - linyihai:issue-126863, r=Nadrieril
fix: prefer `(*p).clone` to `p.clone` if the `p` is a raw pointer

Fixes https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/issues/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
Diffstat (limited to 'compiler/rustc_codegen_cranelift/scripts/rustdoc-clif.rs')
0 files changed, 0 insertions, 0 deletions