Skip to content

Commit 1625296

Browse files
committed
Stop OpaqueTypeDecl from being Copy
1 parent af5f158 commit 1625296

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/rustc_trait_selection/src/opaque_types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub type OpaqueTypeMap<'tcx> = DefIdMap<OpaqueTypeDecl<'tcx>>;
2121
/// Information about the opaque types whose values we
2222
/// are inferring in this function (these are the `impl Trait` that
2323
/// appear in the return type).
24-
#[derive(Copy, Clone, Debug)]
24+
#[derive(Clone, Debug)]
2525
pub struct OpaqueTypeDecl<'tcx> {
2626
/// The opaque type (`ty::Opaque`) for this declaration.
2727
pub opaque_type: Ty<'tcx>,

compiler/rustc_typeck/src/check/fn_ctxt/_impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
399399
}
400400
}
401401
}
402-
let _ = opaque_types.insert(ty, decl);
403402
let _ = opaque_types_vars.insert(decl.concrete_ty, decl.opaque_type);
403+
let _ = opaque_types.insert(ty, decl);
404404
}
405405

406406
value

0 commit comments

Comments
 (0)