about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2016-01-08 13:02:30 -0500
committerSteve Klabnik <steve@steveklabnik.com>2016-01-08 13:02:30 -0500
commit27df1ec0100ee1a76cedbc4be8cf0bfd3b9ec7c9 (patch)
tree026b19fb9cd2e9240973ed880950778a8c79cbce
parentc518664ea50263707d3871b03e400ecb54db2384 (diff)
parent903908582c0930c526340a78617f49066aa3eb8c (diff)
downloadrust-27df1ec0100ee1a76cedbc4be8cf0bfd3b9ec7c9.tar.gz
rust-27df1ec0100ee1a76cedbc4be8cf0bfd3b9ec7c9.zip
Rollup merge of #30747 - nagisa:mir-reenable-test, r=nikomatsakis
Fixes #30674

The test seems to work fine and assertion passes. The test seems to also be generated from MIR (LLVM IR has footprint of MIR translator), thus I’m reenabling it.
-rw-r--r--src/test/run-pass/mir_trans_calls.rs18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/test/run-pass/mir_trans_calls.rs b/src/test/run-pass/mir_trans_calls.rs
index bd236e95d1c..bca72330c85 100644
--- a/src/test/run-pass/mir_trans_calls.rs
+++ b/src/test/run-pass/mir_trans_calls.rs
@@ -58,16 +58,11 @@ fn test5(x: &Bar, a: isize) -> isize {
     x.extension_method(a)
 }
 
-// FIXME #30661: Although this function has the #[rustc_mir] attribute it never
-//               was translated via the MIR implementation because attributes
-//               where not passed along to trans::base::trans_fn() for generic
-//               functions.
-//               Uncomment this test once the thing it tests is fixed.
-// #[rustc_mir]
-// fn test6<T: Bar>(x: &T, a: isize) -> isize {
-//     // Test calling extension method on generic callee
-//     x.extension_method(a)
-// }
+#[rustc_mir]
+fn test6<T: Bar>(x: &T, a: isize) -> isize {
+    // Test calling extension method on generic callee
+    x.extension_method(a)
+}
 
 trait One<T = Self> {
     fn one() -> T;
@@ -119,8 +114,7 @@ fn main() {
     assert_eq!(test3(&Foo, 42), 42);
     assert_eq!(test4(&Foo, 970), 970);
     assert_eq!(test5(&Foo, 8576), 8576);
-    // see definition of test6() above
-    // assert_eq!(test6(&Foo, 12367), 12367);
+    assert_eq!(test6(&Foo, 12367), 12367);
     assert_eq!(test7(), 1);
     assert_eq!(test8(), 2);