0
0
mirror of https://github.com/rust-lang/rust.git synced 2024-11-21 22:01:17 +01:00
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() {}