about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-05-12 07:02:40 +0000
committerbors <bors@rust-lang.org>2015-05-12 07:02:40 +0000
commitf2e1a1b50eee3dd98bbd760d71ae7b5fce360165 (patch)
treea2b6c1b3ee6bf24b51f44ee64d6b13518c5df4a4 /src/test
parenta90453a178069b890aa3877009fa99968dc85c09 (diff)
parent2a12e51dbd6949ae17925af9f3c4cc7402aa1b9b (diff)
downloadrust-f2e1a1b50eee3dd98bbd760d71ae7b5fce360165.tar.gz
rust-f2e1a1b50eee3dd98bbd760d71ae7b5fce360165.zip
Auto merge of #23424 - arielb1:ambiguous-project, r=nikomatsakis
r? @nikomatsakis 
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-pass/issue-23336.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/run-pass/issue-23336.rs b/src/test/run-pass/issue-23336.rs
new file mode 100644
index 00000000000..21e51298444
--- /dev/null
+++ b/src/test/run-pass/issue-23336.rs
@@ -0,0 +1,20 @@
+// Copyright 2015 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.
+
+pub trait Data { fn doit(&self) {} }
+impl<T> Data for T {}
+pub trait UnaryLogic { type D: Data; }
+impl UnaryLogic for () { type D = i32; }
+
+pub fn crashes<T: UnaryLogic>(t: T::D) {
+    t.doit();
+}
+
+fn main() { crashes::<()>(0); }