mirror of
https://github.com/Noratrieb/dilaria.git
synced 2026-01-15 01:45:02 +01:00
vendor dbg-pls
This commit is contained in:
parent
a633546c8f
commit
57ba4cef3c
23 changed files with 2240 additions and 419 deletions
26
src/lib.rs
26
src/lib.rs
|
|
@ -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<'_>) {}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue