]> git.lizzy.rs Git - rust.git/commit
Fix a bug in the opt-in-copy work: it was failing to liberate the regions bound in...
authorNiko Matsakis <niko@alum.mit.edu>
Thu, 11 Dec 2014 00:11:15 +0000 (19:11 -0500)
committerNiko Matsakis <niko@alum.mit.edu>
Fri, 19 Dec 2014 08:29:30 +0000 (03:29 -0500)
commitb3dcb85404aabd66a5765bb99aa46e24acede4dc
tree9642f8bdb665314856d17042a48249a7cac231ad
parent1b24602ca083cc20169190556a51066af0438049
Fix a bug in the opt-in-copy work: it was failing to liberate the regions bound in the impl before searching for `Copy` implements for all fields, leading to problems in the "copyability check". Basically the copyability check would wind up looking for an impl of `for<'tcx> Foo<&'tcx T>`. The impl that exists however is `impl<T> Copy for Foo<T>` and the current rules do not consider that a match (something I would like to revise in a later PR).
src/librustc_typeck/coherence/mod.rs
src/test/run-pass/hrtb-opt-in-copy.rs [new file with mode: 0644]