Closed
Description
Weird repro but it gets the job done:
struct W<T>(*const T);
impl<T: Send> Clone for W<T> {
fn clone(&self) -> Self { W(self.0) }
}
impl<T: Send> Copy for W<T> {}
fn main() {
let coro = async {};
let x = W(&raw const coro);
let c = || {
let x = x;
};
}
Due to the fact that we strip opaques and generators out of the typing env when checking is_copy_raw
, which is done by the expr use visitor.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
done