]> git.lizzy.rs Git - rust.git/commitdiff
Revert "normalize tuple pair types"
authorAriel Ben-Yehuda <ariel.byd@gmail.com>
Thu, 13 Oct 2016 16:15:50 +0000 (19:15 +0300)
committerAriel Ben-Yehuda <ariel.byd@gmail.com>
Thu, 13 Oct 2016 16:16:05 +0000 (19:16 +0300)
This reverts commit 7badc32005648e7aebe982a076cc677c68937fe4.

src/librustc_trans/common.rs
src/test/run-pass/issue-37109.rs [deleted file]

index 9b893e19894e858d5ed2d46ee029ce6cd1f5b65f..6ae5fc1657aa728359f7b8f27df4743b537ec15a 100644 (file)
@@ -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 (file)
index 1c89307..0000000
+++ /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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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) -> (<T as ToRef<'a>>::Ref, u32) {
-    (value, 0)
-}
-
-fn main() {
-    example(&0);
-}