about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2017-03-21 21:21:24 -0400
committerNiko Matsakis <niko@alum.mit.edu>2017-03-30 07:56:58 -0400
commitd08a6da1f05dc6f8de4201efe949f1c26704ced0 (patch)
tree63f27a2e39630ebdf7b7db941e18825c1af35800 /src
parent127a7d643d70dea605ca479c12a32f450d985b09 (diff)
downloadrust-d08a6da1f05dc6f8de4201efe949f1c26704ced0.tar.gz
rust-d08a6da1f05dc6f8de4201efe949f1c26704ced0.zip
remove `Clone` from `FnCtxt`
Diffstat (limited to 'src')
-rw-r--r--src/librustc_typeck/check/coercion.rs4
-rw-r--r--src/librustc_typeck/check/mod.rs3
2 files changed, 0 insertions, 7 deletions
diff --git a/src/librustc_typeck/check/coercion.rs b/src/librustc_typeck/check/coercion.rs
index 8a9db674c6e..37d442f1d05 100644
--- a/src/librustc_typeck/check/coercion.rs
+++ b/src/librustc_typeck/check/coercion.rs
@@ -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,
 {
diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs
index 0a2cb94c591..9eaa8404bde 100644
--- a/src/librustc_typeck/check/mod.rs
+++ b/src/librustc_typeck/check/mod.rs
@@ -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>>>,