From 68ca911d8f6ca9d9be2581e7c117636c14d9cb8e Mon Sep 17 00:00:00 2001 From: Ariel Ben-Yehuda Date: Thu, 13 Oct 2016 19:15:50 +0300 Subject: [PATCH] Revert "normalize tuple pair types" This reverts commit 7badc32005648e7aebe982a076cc677c68937fe4. --- src/librustc_trans/common.rs | 3 +-- src/test/run-pass/issue-37109.rs | 25 ------------------------- 2 files changed, 1 insertion(+), 27 deletions(-) delete mode 100644 src/test/run-pass/issue-37109.rs diff --git a/src/librustc_trans/common.rs b/src/librustc_trans/common.rs index 9b893e19894e..6ae5fc1657aa 100644 --- a/src/librustc_trans/common.rs +++ b/src/librustc_trans/common.rs @@ -114,8 +114,7 @@ pub fn type_pair_fields<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, ty: Ty<'tcx>) if tys.len() != 2 { return None; } - Some([ccx.tcx().normalize_associated_type(&tys[0]), - ccx.tcx().normalize_associated_type(&tys[1])]) + Some([tys[0], tys[1]]) } _ => None } diff --git a/src/test/run-pass/issue-37109.rs b/src/test/run-pass/issue-37109.rs deleted file mode 100644 index 1c893071d558..000000000000 --- a/src/test/run-pass/issue-37109.rs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2016 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -trait ToRef<'a> { - type Ref: 'a; -} - -impl<'a, U: 'a> ToRef<'a> for U { - type Ref = &'a U; -} - -fn example<'a, T>(value: &'a T) -> (>::Ref, u32) { - (value, 0) -} - -fn main() { - example(&0); -}