diff options
Diffstat (limited to 'tests/ui/issues/issue-23336.rs')
-rw-r--r-- | tests/ui/issues/issue-23336.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-23336.rs b/tests/ui/issues/issue-23336.rs new file mode 100644 index 000000000..cd71d7eed --- /dev/null +++ b/tests/ui/issues/issue-23336.rs @@ -0,0 +1,11 @@ +// run-pass +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); } |