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

ices/87549.sh: fixed with errors #897

Merged
merged 1 commit into from
Aug 12, 2021
Merged

ices/87549.sh: fixed with errors #897

merged 1 commit into from
Aug 12, 2021

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#87549

#!/usr/bin/env bash

rustc - -C incremental=true << 'EOF'
trait XTrait<A> {}

struct X<T: XTrait<A>, A> (T, A);

trait Y<'t> {
    type M;
    type N: 't;
}

impl<'t, T: XTrait<A>, A> Y<'t> for X<T, A> {
    type M = X<T, Self::N>;
    type N = &'t ();
}

fn main() {
    println!("Hello, world!");
}
EOF
=== stdout ===
=== stderr ===
error[E0277]: the trait bound `T: XTrait<&()>` is not satisfied
  --> <anon>:11:5
   |
3  | struct X<T: XTrait<A>, A> (T, A);
   |             --------- required by this bound in `X`
...
11 |     type M = X<T, Self::N>;
   |     ^^^^^^^^^^^^^^^^^^^^^^^ the trait `XTrait<&()>` is not implemented for `T`
   |
help: consider further restricting this bound
   |
10 | impl<'t, T: XTrait<A> + XTrait<&()>, A> Y<'t> for X<T, A> {
   |                       +++++++++++++

error: aborting due to previous error

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

=== stdout ===
=== stderr ===
error[E0277]: the trait bound `T: XTrait<&()>` is not satisfied
  --> <anon>:11:5
   |
3  | struct X<T: XTrait<A>, A> (T, A);
   |             --------- required by this bound in `X`
...
11 |     type M = X<T, Self::N>;
   |     ^^^^^^^^^^^^^^^^^^^^^^^ the trait `XTrait<&()>` is not implemented for `T`
   |
help: consider further restricting this bound
   |
10 | impl<'t, T: XTrait<A> + XTrait<&()>, A> Y<'t> for X<T, A> {
   |                       +++++++++++++

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
==============
@Alexendoo Alexendoo merged commit 6b67e4d into master Aug 12, 2021
@Alexendoo Alexendoo deleted the autofix/ices/87549.sh branch August 12, 2021 15:32
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