1
Fork 0

remove Clone from FnCtxt

This commit is contained in:
Niko Matsakis 2017-03-21 21:21:24 -04:00
parent 127a7d643d
commit d08a6da1f0
2 changed files with 0 additions and 7 deletions

View file

@ -914,7 +914,6 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
/// }
/// let final_ty = coerce.complete(fcx);
/// ```
#[derive(Clone)] // (*)
pub struct CoerceMany<'gcx, 'tcx, 'exprs, E>
where 'gcx: 'tcx, E: 'exprs + AsCoercionSite,
{
@ -928,7 +927,6 @@ pub struct CoerceMany<'gcx, 'tcx, 'exprs, E>
/// a buffer. We use this in `check/mod.rs` for things like `break`.
pub type DynamicCoerceMany<'gcx, 'tcx> = CoerceMany<'gcx, 'tcx, 'gcx, P<hir::Expr>>;
#[derive(Clone)] // (*)
enum Expressions<'gcx, 'exprs, E>
where E: 'exprs + AsCoercionSite,
{
@ -936,8 +934,6 @@ enum Expressions<'gcx, 'exprs, E>
UpFront(&'exprs [E]),
}
// (*) this is clone because `FnCtxt` is clone, but it seems dubious -- nmatsakis
impl<'gcx, 'tcx, 'exprs, E> CoerceMany<'gcx, 'tcx, 'exprs, E>
where 'gcx: 'tcx, E: 'exprs + AsCoercionSite,
{

View file

@ -415,7 +415,6 @@ impl Diverges {
}
}
#[derive(Clone)]
pub struct BreakableCtxt<'gcx: 'tcx, 'tcx> {
may_break: bool,
@ -424,7 +423,6 @@ pub struct BreakableCtxt<'gcx: 'tcx, 'tcx> {
coerce: Option<DynamicCoerceMany<'gcx, 'tcx>>,
}
#[derive(Clone)]
pub struct EnclosingBreakables<'gcx: 'tcx, 'tcx> {
stack: Vec<BreakableCtxt<'gcx, 'tcx>>,
by_id: NodeMap<usize>,
@ -439,7 +437,6 @@ impl<'gcx, 'tcx> EnclosingBreakables<'gcx, 'tcx> {
}
}
#[derive(Clone)]
pub struct FnCtxt<'a, 'gcx: 'a+'tcx, 'tcx: 'a> {
ast_ty_to_ty_cache: RefCell<NodeMap<Ty<'tcx>>>,