Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

ices/84727.rs: fixed with errors #1716

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#84727

pub struct Color<T>(pub T);

pub struct Cell<Fg, Bg = Fg> {
    foreground: Color<Fg>,
    background: Color<Bg>,
}

pub trait Over<Bottom, Output> {
    fn over(self, bottom: Bottom) -> Output;
}

// Cell: Over<Color, Cell>
impl<C, Fg, Bg, NewFg, NewBg> Over<Color<C>, Cell<NewFg, NewBg>> for Cell<Fg, Bg>
where
    Fg: Over<C, NewFg>,
    Bg: Over<C, NewBg>,
{
    fn over(self, _: Color<C>) -> Cell<NewFg, NewBg> {
        todo!();
    }
}

// Cell: Over<Cell, Cell>
impl<TopFg, TopBg, BottomFg, BottomBg, NewFg, NewBg>
    Over<Cell<BottomFg, BottomBg>, Cell<NewFg, NewBg>> for Cell<TopFg, TopBg>
where
    Self: Over<Color<BottomBg>, Cell<NewFg, NewBg>>,
{
    fn over(self, bottom: Cell<BottomFg, BottomBg>) -> Cell<NewFg, NewBg> {
        self.over(bottom.background);
        todo!();
    }
}

// Cell: Over<&mut Cell, ()>
impl<'b, TopFg, TopBg, BottomFg, BottomBg> Over<&'b mut Cell<BottomFg, BottomBg>, ()>
    for Cell<TopFg, TopBg>
where
    Cell<TopFg, TopBg>: Over<Cell<BottomFg, BottomBg>, Cell<BottomFg, BottomBg>>,
{
    fn over(self, _: &'b mut Cell<BottomFg, BottomBg>) {
        todo!();
    }
}

// &Cell: Over<&mut Cell, ()>
impl<'t, 'b, TopFg, TopBg, BottomFg, BottomBg> Over<&'b mut Cell<BottomFg, BottomBg>, ()>
    for &'t Cell<TopFg, TopBg>
where
    Cell<TopFg, TopBg>: Over<Cell<BottomFg, BottomBg>, Cell<BottomFg, BottomBg>>,
{
    fn over(self, _: &'b mut Cell<BottomFg, BottomBg>) {
        todo!();
    }
}
=== stdout ===
=== stderr ===
error[E0601]: `main` function not found in crate `84727`
  --> /home/runner/work/glacier/glacier/ices/84727.rs:55:2
   |
55 | }
   |  ^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/84727.rs`

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0601`.
==============

=== stdout ===
=== stderr ===
error[E0601]: `main` function not found in crate `84727`
  --> /home/runner/work/glacier/glacier/ices/84727.rs:55:2
   |
55 | }
   |  ^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/84727.rs`

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0601`.
==============
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant