{"action":"closed","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/21080","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/21080/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/21080/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/21080/events","html_url":"https://github.com/rust-lang/rust/issues/21080","id":54157423,"number":21080,"title":"3-tuple gets inferred to internal test runner types with --test if certain type is marked Send","user":{"login":"huonw","id":1203825,"avatar_url":"https://avatars.githubusercontent.com/u/1203825?v=3","gravatar_id":"","url":"https://api.github.com/users/huonw","html_url":"https://github.com/huonw","followers_url":"https://api.github.com/users/huonw/followers","following_url":"https://api.github.com/users/huonw/following{/other_user}","gists_url":"https://api.github.com/users/huonw/gists{/gist_id}","starred_url":"https://api.github.com/users/huonw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huonw/subscriptions","organizations_url":"https://api.github.com/users/huonw/orgs","repos_url":"https://api.github.com/users/huonw/repos","events_url":"https://api.github.com/users/huonw/events{/privacy}","received_events_url":"https://api.github.com/users/huonw/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rust-lang/rust/labels/A-typesystem","name":"A-typesystem","color":"d7e102"}],"state":"closed","locked":false,"assignee":{"login":"FlaPer87","id":13816,"avatar_url":"https://avatars.githubusercontent.com/u/13816?v=3","gravatar_id":"","url":"https://api.github.com/users/FlaPer87","html_url":"https://github.com/FlaPer87","followers_url":"https://api.github.com/users/FlaPer87/followers","following_url":"https://api.github.com/users/FlaPer87/following{/other_user}","gists_url":"https://api.github.com/users/FlaPer87/gists{/gist_id}","starred_url":"https://api.github.com/users/FlaPer87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlaPer87/subscriptions","organizations_url":"https://api.github.com/users/FlaPer87/orgs","repos_url":"https://api.github.com/users/FlaPer87/repos","events_url":"https://api.github.com/users/FlaPer87/events{/privacy}","received_events_url":"https://api.github.com/users/FlaPer87/received_events","type":"User","site_admin":false},"milestone":null,"comments":12,"created_at":"2015-01-13T07:00:33Z","updated_at":"2015-01-16T06:03:15Z","closed_at":"2015-01-16T06:03:15Z","body":"```rust\r\n// wtf-testrunner.rs\r\n\r\n#![allow(unstable)]\r\n\r\npub fn join<J: ToJoin<T>, T: Send /* WTF */>(_: J) -> Future<T> {\r\n    unimplemented!()\r\n}\r\npub trait ToJoin<T> {}\r\n\r\nimpl<A1, T1, A2, T2> ToJoin<(T1, T2)> for (A1, A2) {}\r\n\r\nimpl<A1, T1, A2, T2, A3, T3> ToJoin<(T1, T2, T3)> for (A1, A2, A3) {}\r\nimpl<A1, T1, A2, T2, A3, T3, A4, T4> ToJoin<(T1, T2, T3, T4)> for (A1, A2, A3, A4) {}\r\n\r\npub struct Future<T>;\r\n\r\npub fn all_ok() {\r\n    let f1 = Future::<i32>;\r\n    let f2 = Future::<i32>;\r\n\r\n    let _: Future<(i32, i32)> = join((f1, f2));\r\n}\r\npub fn also_ok() {\r\n    let f1 = Future::<i32>;\r\n    let f2 = Future::<i32>;\r\n    let f3 = Future::<i32>;\r\n    let f4 = Future::<i32>;\r\n\r\n    let _: Future<(i32, i32, i32, i32)> = join((f1, f2, f3, f4));\r\n}\r\n\r\npub fn wtf() {\r\n    let f1 = Future::<i32>;\r\n    let f2 = Future::<i32>;\r\n    let f3 = Future::<i32>;\r\n\r\n    let _: Future<(i32, i32, i32)> = join((f1, f2, f3));\r\n}\r\n\r\nfn main() {}\r\n```\r\n\r\nCompiling with `rustc wtf-testrunner.rs` works fine, `rustc --test wtf-testrunner.rs` definitely does not, though:\r\n\r\n```rust\r\nwtf-testrunner.rs:35:38: 35:56 error: mismatched types: expected `Future<(i32, i32, i32)>`, found `Future<(test::TestDesc, test::TestResult, collections::vec::Vec<u8>)>` (expected i32, found struct test::TestDesc)\r\nwtf-testrunner.rs:35     let _: Future<(i32, i32, i32)> = join((f1, f2, f3));\r\n                                                          ^~~~~~~~~~~~~~~~~~\r\nerror: aborting due to previous error\r\n```\r\n\r\nAnd, if the `Send` bound in `join` is removed, the code compiles fine with or without `--test`.\r\n\r\nSo... somehow the test runner is causing a tuple of arity 3 specifically to be inferred to something completely ridiculous."}}