rust/tests/ui/issues/issue-23336.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
243 B
Rust
Raw Normal View History

//@ 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); }