-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggest .clone()
or ref binding
on E0382
#103908
Conversation
r? @nagisa (rustbot has picked a reviewer for you, use r? to override) |
src/test/ui/borrowck/bindings-after-at-or-patterns-slice-patterns-box-patterns.stderr
Outdated
Show resolved
Hide resolved
This comment was marked as resolved.
This comment was marked as resolved.
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
This comment has been minimized.
This comment has been minimized.
fa68a52
to
d2940e1
Compare
This comment was marked as resolved.
This comment was marked as resolved.
Some changes occurred in src/tools/rustfmt cc @rust-lang/rustfmt |
f345620
to
99faafe
Compare
src/test/ui/unboxed-closures/unboxed-closures-infer-fnonce-move-call-twice.stderr
Outdated
Show resolved
Hide resolved
| | ||
help: consider cloning the value if the performance cost is acceptable | ||
| | ||
LL | let mut t: T = (0, Box::new(0)); drop(t.clone()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I wonder how easy it is easy to suppress this 🤔
Do not suggest `.clone()` as we already suggest borrowing the iterated value.
12e3ce4
to
e37926f
Compare
@bors r=compiler-errors |
📌 Commit e37926f0b62f4174c9aee897d049ff4b30b3941a has been approved by It is now in the queue for this repository. |
e37926f
to
78b8d12
Compare
@bors r=compiler-errors |
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#103908 (Suggest `.clone()` or `ref binding` on E0382) - rust-lang#104517 (Throw error on failure in loading llvm-plugin) - rust-lang#104594 (Properly handle `Pin<&mut dyn* Trait>` receiver in codegen) - rust-lang#104742 (Make `deref_into_dyn_supertrait` lint the impl and not the usage) - rust-lang#104753 (Pass `InferCtxt` to `DropRangeVisitor` so we can resolve vars) - rust-lang#104771 (Add regression test for issue rust-lang#99938) - rust-lang#104772 (Small accessibility improvements) - rust-lang#104775 (Use ObligationCtxt::normalize) - rust-lang#104778 (:arrow_up: rust-analyzer) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
No description provided.