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

ices/75707.rs: fixed with errors #501

Merged
merged 1 commit into from
Oct 7, 2020
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Oct 7, 2020

Issue: rust-lang/rust#75707

pub trait Callback { fn cb(); }

pub trait Processing {
    type Call:Callback;
}

fn f<P:Processing+?Sized>() {
    P::Call::cb();
}

fn main() {
    struct MyCall;
    f::<dyn Processing<Call=MyCall>>();
}
=== stdout ===
=== stderr ===
error[E0277]: the trait bound `MyCall: Callback` is not satisfied
  --> /home/runner/work/glacier/glacier/ices/75707.rs:13:5
   |
7  | fn f<P:Processing+?Sized>() {
   |        ---------- required by this bound in `f`
...
13 |     f::<dyn Processing<Call=MyCall>>();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Callback` is not implemented for `MyCall`

error: aborting due to previous error

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

=== stdout ===
=== stderr ===
error[E0277]: the trait bound `MyCall: Callback` is not satisfied
  --> /home/runner/work/glacier/glacier/ices/75707.rs:13:5
   |
7  | fn f<P:Processing+?Sized>() {
   |        ---------- required by this bound in `f`
...
13 |     f::<dyn Processing<Call=MyCall>>();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Callback` is not implemented for `MyCall`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
==============
@JohnTitor JohnTitor merged commit d05c0ae into master Oct 7, 2020
@JohnTitor JohnTitor deleted the autofix/ices/75707.rs branch October 7, 2020 13:08
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