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

ices/83017.rs: fixed with errors #724

Merged
merged 1 commit into from
Apr 23, 2021
Merged

ices/83017.rs: fixed with errors #724

merged 1 commit into from
Apr 23, 2021

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#83017

#![feature(associated_type_bounds)]
trait TraitA<'a> { type AsA; }
trait TraitB<'a, 'b> { type AsB; }
trait TraitC<'a, 'b, 'c> {}
struct X;
impl<'a, 'b, 'c> TraitC<'a, 'b, 'c> for X {}
struct Y;
impl<'a, 'b> TraitB<'a, 'b> for Y { type AsB = X; }
struct Z;
impl<'a> TraitA<'a> for Z { type AsA = Y; }
fn foo<T>() where for<'a> T: TraitA<'a, AsA: for<'b> TraitB<'a, 'b, AsB: for<'c> TraitC<'a, 'b, 'c>>> {}
fn main() {
    foo::<Z>();
}
=== stdout ===
=== stderr ===
error[E0277]: the trait bound `for<'a, 'b> <Z as TraitA<'a>>::AsA: TraitB<'a, 'b>` is not satisfied
  --> /home/runner/work/glacier/glacier/ices/83017.rs:13:5
   |
11 | fn foo<T>() where for<'a> T: TraitA<'a, AsA: for<'b> TraitB<'a, 'b, AsB: for<'c> TraitC<'a, 'b, 'c>>> {}
   |                                              ------------------------------------------------------- required by this bound in `foo`
12 | fn main() {
13 |     foo::<Z>();
   |     ^^^^^^^^ the trait `for<'a, 'b> TraitB<'a, 'b>` is not implemented for `<Z as TraitA<'a>>::AsA`

error[E0277]: the trait bound `for<'a, 'b, 'c> <<Z as TraitA<'a>>::AsA as TraitB<'a, 'b>>::AsB: TraitC<'a, 'b, 'c>` is not satisfied
  --> /home/runner/work/glacier/glacier/ices/83017.rs:13:5
   |
11 | fn foo<T>() where for<'a> T: TraitA<'a, AsA: for<'b> TraitB<'a, 'b, AsB: for<'c> TraitC<'a, 'b, 'c>>> {}
   |                                                                          -------------------------- required by this bound in `foo`
12 | fn main() {
13 |     foo::<Z>();
   |     ^^^^^^^^ the trait `for<'a, 'b, 'c> TraitC<'a, 'b, 'c>` is not implemented for `<<Z as TraitA<'a>>::AsA as TraitB<'a, 'b>>::AsB`

error: aborting due to 2 previous errors

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

=== stdout ===
=== stderr ===
error[E0277]: the trait bound `for<'a, 'b> <Z as TraitA<'a>>::AsA: TraitB<'a, 'b>` is not satisfied
  --> /home/runner/work/glacier/glacier/ices/83017.rs:13:5
   |
11 | fn foo<T>() where for<'a> T: TraitA<'a, AsA: for<'b> TraitB<'a, 'b, AsB: for<'c> TraitC<'a, 'b, 'c>>> {}
   |                                              ------------------------------------------------------- required by this bound in `foo`
12 | fn main() {
13 |     foo::<Z>();
   |     ^^^^^^^^ the trait `for<'a, 'b> TraitB<'a, 'b>` is not implemented for `<Z as TraitA<'a>>::AsA`

error[E0277]: the trait bound `for<'a, 'b, 'c> <<Z as TraitA<'a>>::AsA as TraitB<'a, 'b>>::AsB: TraitC<'a, 'b, 'c>` is not satisfied
  --> /home/runner/work/glacier/glacier/ices/83017.rs:13:5
   |
11 | fn foo<T>() where for<'a> T: TraitA<'a, AsA: for<'b> TraitB<'a, 'b, AsB: for<'c> TraitC<'a, 'b, 'c>>> {}
   |                                                                          -------------------------- required by this bound in `foo`
12 | fn main() {
13 |     foo::<Z>();
   |     ^^^^^^^^ the trait `for<'a, 'b, 'c> TraitC<'a, 'b, 'c>` is not implemented for `<<Z as TraitA<'a>>::AsA as TraitB<'a, 'b>>::AsB`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0277`.
==============
@JohnTitor JohnTitor merged commit 22218ed into master Apr 23, 2021
@JohnTitor JohnTitor deleted the autofix/ices/83017.rs branch April 23, 2021 13:17
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