From fbdba7f915cae7689b4afb6ef7580d8274f09d22 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Thu, 3 Sep 2015 02:14:05 +0530 Subject: [PATCH] Fix ICE --- src/methods.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/methods.rs b/src/methods.rs index 4a144734a..c6f0b1c2e 100644 --- a/src/methods.rs +++ b/src/methods.rs @@ -1,6 +1,7 @@ use syntax::ast::*; use rustc::lint::*; use rustc::middle::ty; +use rustc::middle::subst::Subst; use std::iter; use std::borrow::Cow; @@ -225,7 +226,7 @@ fn is_copy(cx: &Context, ast_ty: &Ty, item: &Item) -> bool { None => false, Some(ty) => { let env = ty::ParameterEnvironment::for_item(cx.tcx, item.id); - !ty.moves_by_default(&env, ast_ty.span) + !ty.subst(cx.tcx, &env.free_substs).moves_by_default(&env, ast_ty.span) } } }