Auto merge of #37489 - nagisa:unnecessary-clone, r=eddyb

Do not clone Mir unnecessarily

r? @eddyb
This commit is contained in:
bors 2016-10-30 20:30:38 -07:00 committed by GitHub
commit 8f1fc86533
2 changed files with 7 additions and 5 deletions

View file

@ -63,7 +63,8 @@ macro_rules! newtype_index {
}
/// Lowered representation of a single function.
#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
// Do not implement clone for Mir, its easy to do so accidently and its kind of expensive.
#[derive(RustcEncodable, RustcDecodable, Debug)]
pub struct Mir<'tcx> {
/// List of basic blocks. References to basic block use a newtyped index type `BasicBlock`
/// that indexes into this vector.