]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_typeck/check/coercion.rs
Add some type-alias-impl-trait regression tests
[rust.git] / src / librustc_typeck / check / coercion.rs
index 8c8e0642dffcefebe832494a7901a164d587951a..54b32c3a50fcdc194158af01eec9dffbc47416f1 100644 (file)
@@ -564,7 +564,7 @@ fn coerce_unsized(&self, source: Ty<'tcx>, target: Ty<'tcx>) -> CoerceResult<'tc
             let obligation = queue.remove(0);
             debug!("coerce_unsized resolve step: {:?}", obligation);
             let trait_ref = match obligation.predicate {
-                ty::Predicate::Trait(ref tr) if traits.contains(&tr.def_id()) => {
+                ty::Predicate::Trait(ref tr, _) if traits.contains(&tr.def_id()) => {
                     if unsize_did == tr.def_id() {
                         let sty = &tr.skip_binder().input_types().nth(1).unwrap().kind;
                         if let ty::Tuple(..) = sty {