vendor dbg-pls

This commit is contained in:
nora 2022-04-23 23:19:49 +02:00
parent a633546c8f
commit 57ba4cef3c
23 changed files with 2240 additions and 419 deletions

View file

@ -3,20 +3,36 @@ pub fn foo(parent: Parent<'_>) {
}
pub fn requires_parent_fulfill_trait(_: impl dbg_pls::DebugPls) {}
#[derive(dbg_pls::DebugPls)]
pub enum Parent<'a> {
A(&'a A<'a>),
B(&'a B<'a>),
}
#[derive(dbg_pls::DebugPls)]
impl<'a> dbg_pls::DebugPls for Parent<'a>
where
&'a A<'a>: dbg_pls::DebugPls,
&'a B<'a>: dbg_pls::DebugPls,
{
fn fmt(&self, f: dbg_pls::Formatter<'_>) {}
}
pub struct A<'a> {
parent: Parent<'a>,
}
#[derive(dbg_pls::DebugPls)]
impl<'a> dbg_pls::DebugPls for A<'a>
where
Parent<'a>: dbg_pls::DebugPls,
{
fn fmt(&self, f: dbg_pls::Formatter<'_>) {}
}
pub struct B<'a> {
parent: Parent<'a>,
}
impl<'a> dbg_pls::DebugPls for B<'a>
where
Parent<'a>: dbg_pls::DebugPls,
{
fn fmt(&self, f: dbg_pls::Formatter<'_>) {}
}