From 9c600cb3cede8bb439186c879da8ce229efac125 Mon Sep 17 00:00:00 2001 From: Padraic Fanning Date: Fri, 30 Apr 2021 14:45:03 -0400 Subject: [PATCH] Add 84727 Issue: rust-lang/rust#84727 --- ices/84727.rs | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 ices/84727.rs diff --git a/ices/84727.rs b/ices/84727.rs new file mode 100644 index 00000000..865d0b03 --- /dev/null +++ b/ices/84727.rs @@ -0,0 +1,55 @@ +pub struct Color(pub T); + +pub struct Cell { + foreground: Color, + background: Color, +} + +pub trait Over { + fn over(self, bottom: Bottom) -> Output; +} + +// Cell: Over +impl Over, Cell> for Cell +where + Fg: Over, + Bg: Over, +{ + fn over(self, _: Color) -> Cell { + todo!(); + } +} + +// Cell: Over +impl + Over, Cell> for Cell +where + Self: Over, Cell>, +{ + fn over(self, bottom: Cell) -> Cell { + self.over(bottom.background); + todo!(); + } +} + +// Cell: Over<&mut Cell, ()> +impl<'b, TopFg, TopBg, BottomFg, BottomBg> Over<&'b mut Cell, ()> + for Cell +where + Cell: Over, Cell>, +{ + fn over(self, _: &'b mut Cell) { + todo!(); + } +} + +// &Cell: Over<&mut Cell, ()> +impl<'t, 'b, TopFg, TopBg, BottomFg, BottomBg> Over<&'b mut Cell, ()> + for &'t Cell +where + Cell: Over, Cell>, +{ + fn over(self, _: &'b mut Cell) { + todo!(); + } +}