mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
25 lines
378 B
Rust
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() {}
|