-
-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Implementing Reborrow prevents normally moving a value of that type. #156310
Copy link
Copy link
Open
Labels
A-borrow-checkerArea: The borrow checkerArea: The borrow checkerC-bugCategory: This is a bug.Category: This is a bug.F-reborrow`#![feature(reborrow)]`; see #145612`#![feature(reborrow)]`; see #145612T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Description
Activity
Metadata
Metadata
Assignees
Labels
A-borrow-checkerArea: The borrow checkerArea: The borrow checkerC-bugCategory: This is a bug.Category: This is a bug.F-reborrow`#![feature(reborrow)]`; see #145612`#![feature(reborrow)]`; see #145612T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
I tried this code:
I expected this code to compile, since it's just an identity function. Instead, I got the following error:
cc @aapoalas
Meta
rustc --version --verbose:Compiled from the
mainbranch at commit 63b1dfc.