rust/tests/crashes/122710.rs
2024-04-14 11:21:51 +02:00

25 lines
378 B
Rust

//@ known-bug: #122710
use std::marker::PhantomData;
pub trait BarTrait<T> {
fn bar(self, _: T);
}
impl<T, F: Fn(T)> BarTrait<T> for F {
fn bar(self, _: T) { }
}
impl<T: for<'a> MyTrait<'a>> BarTrait<T> for () {
fn bar(self, _: T) { }
}
pub trait MyTrait<'a> { }
impl<'a> MyTrait<'a> for PhantomData<&'a ()> { }
fn foo() {
().bar(PhantomData);
}
pub fn main() {}