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

ices/109090.rs: fixed with errors #1546

Merged
merged 1 commit into from
Mar 21, 2023
Merged

ices/109090.rs: fixed with errors #1546

merged 1 commit into from
Mar 21, 2023

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#109090

#![feature(non_lifetime_binders)]

pub trait Bt {
    type C;
}

pub struct A;

impl Bt for A {
    type C = A;
}

pub fn oopsie<Bt>()
where
    for<'a, B> <B::C as Bt<'a>>::Bt: Bt, {}


fn main() {}
=== stdout ===
=== stderr ===
error[E0576]: cannot find associated type `Bt` in `Bt`
  --> /home/runner/work/glacier/glacier/ices/109090.rs:15:34
   |
4  |     type C;
   |     ------- associated type `C` defined here
...
15 |     for<'a, B> <B::C as Bt<'a>>::Bt: Bt, {}
   |                                  ^^
   |                                  |
   |                                  not found in `Bt`
   |                                  help: maybe you meant this associated type: `C`

error[E0404]: expected trait, found type parameter `Bt`
  --> /home/runner/work/glacier/glacier/ices/109090.rs:15:38
   |
3  | pub trait Bt {
   |           -- you might have meant to refer to this trait
...
13 | pub fn oopsie<Bt>()
   |               -- found this type parameter
14 | where
15 |     for<'a, B> <B::C as Bt<'a>>::Bt: Bt, {}
   |                                      ^^ not a trait

warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/109090.rs:1:12
  |
1 | #![feature(non_lifetime_binders)]
  |            ^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information
  = note: `#[warn(incomplete_features)]` on by default

error[E0223]: ambiguous associated type
  --> /home/runner/work/glacier/glacier/ices/109090.rs:15:17
   |
15 |     for<'a, B> <B::C as Bt<'a>>::Bt: Bt, {}
   |                 ^^^^
   |
help: if there were a trait named `Example` with associated type `C` implemented for `B`, you could use the fully-qualified path
   |
15 |     for<'a, B> <<B as Example>::C as Bt<'a>>::Bt: Bt, {}
   |                 ~~~~~~~~~~~~~~~~~

error: aborting due to 3 previous errors; 1 warning emitted

Some errors have detailed explanations: E0223, E0404, E0576.
For more information about an error, try `rustc --explain E0223`.
==============

=== stdout ===
=== stderr ===
error[E0576]: cannot find associated type `Bt` in `Bt`
  --> /home/runner/work/glacier/glacier/ices/109090.rs:15:34
   |
4  |     type C;
   |     ------- associated type `C` defined here
...
15 |     for<'a, B> <B::C as Bt<'a>>::Bt: Bt, {}
   |                                  ^^
   |                                  |
   |                                  not found in `Bt`
   |                                  help: maybe you meant this associated type: `C`

error[E0404]: expected trait, found type parameter `Bt`
  --> /home/runner/work/glacier/glacier/ices/109090.rs:15:38
   |
3  | pub trait Bt {
   |           -- you might have meant to refer to this trait
...
13 | pub fn oopsie<Bt>()
   |               -- found this type parameter
14 | where
15 |     for<'a, B> <B::C as Bt<'a>>::Bt: Bt, {}
   |                                      ^^ not a trait

warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/109090.rs:1:12
  |
1 | #![feature(non_lifetime_binders)]
  |            ^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #108185 <rust-lang/rust#108185> for more information
  = note: `#[warn(incomplete_features)]` on by default

error[E0223]: ambiguous associated type
  --> /home/runner/work/glacier/glacier/ices/109090.rs:15:17
   |
15 |     for<'a, B> <B::C as Bt<'a>>::Bt: Bt, {}
   |                 ^^^^
   |
help: if there were a trait named `Example` with associated type `C` implemented for `B`, you could use the fully-qualified path
   |
15 |     for<'a, B> <<B as Example>::C as Bt<'a>>::Bt: Bt, {}
   |                 ~~~~~~~~~~~~~~~~~

error: aborting due to 3 previous errors; 1 warning emitted

Some errors have detailed explanations: E0223, E0404, E0576.
For more information about an error, try `rustc --explain E0223`.
==============
@JohnTitor JohnTitor merged commit d3297aa into master Mar 21, 2023
@JohnTitor JohnTitor deleted the autofix/ices/109090.rs branch March 21, 2023 08:56
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