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

ices/91594.rs: fixed with errors #1064

Merged
merged 1 commit into from
Dec 21, 2021
Merged

ices/91594.rs: fixed with errors #1064

merged 1 commit into from
Dec 21, 2021

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#91594

trait Component<M> {
    type Interface;
}
trait HasComponent<I> {}

struct Foo;

impl HasComponent<<Foo as Component<Foo>>::Interface> for Foo {}

impl<M: HasComponent<()>> Component<M> for Foo {
    type Interface = u8;
}

pub fn main() {}
=== stdout ===
=== stderr ===
error[E0277]: the trait bound `Foo: HasComponent<()>` is not satisfied
  --> /home/runner/work/glacier/glacier/ices/91594.rs:8:6
   |
8  | impl HasComponent<<Foo as Component<Foo>>::Interface> for Foo {}
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `HasComponent<()>` is not implemented for `Foo`
   |
   = help: the following implementations were found:
             <Foo as HasComponent<<Foo as Component<Foo>>::Interface>>
note: required because of the requirements on the impl of `Component<Foo>` for `Foo`
  --> /home/runner/work/glacier/glacier/ices/91594.rs:10:27
   |
10 | impl<M: HasComponent<()>> Component<M> for Foo {
   |                           ^^^^^^^^^^^^     ^^^

error: aborting due to previous error

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

=== stdout ===
=== stderr ===
error[E0277]: the trait bound `Foo: HasComponent<()>` is not satisfied
  --> /home/runner/work/glacier/glacier/ices/91594.rs:8:6
   |
8  | impl HasComponent<<Foo as Component<Foo>>::Interface> for Foo {}
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `HasComponent<()>` is not implemented for `Foo`
   |
   = help: the following implementations were found:
             <Foo as HasComponent<<Foo as Component<Foo>>::Interface>>
note: required because of the requirements on the impl of `Component<Foo>` for `Foo`
  --> /home/runner/work/glacier/glacier/ices/91594.rs:10:27
   |
10 | impl<M: HasComponent<()>> Component<M> for Foo {
   |                           ^^^^^^^^^^^^     ^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
==============
Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JohnTitor JohnTitor merged commit 565cbdf into master Dec 21, 2021
@JohnTitor JohnTitor deleted the autofix/ices/91594.rs branch December 21, 2021 17:58
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.

2 participants