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