Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ices/92148.rs: fixed with errors #1185

Merged
merged 1 commit into from Mar 26, 2022
Merged

ices/92148.rs: fixed with errors #1185

merged 1 commit into from Mar 26, 2022

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#92148

trait Blah<T> {
    type Output;
    fn foo(t: T) -> Self::Output;
}

impl Blah<i32> for i32 {
    type Output = i64;

    fn foo(t: i32) -> Self::Output {
        t as Self::Output
    }
}

impl<B, F> Blah<Vec<F>> for B
where
    B: Blah<F>,
{
    type Output = Vec<T::Output>;

    fn foo(t: T) -> Self::Output {
        t.into_iter(F::foo).collect()
    }
}
pub fn main() {}
=== stdout ===
=== stderr ===
error[E0433]: failed to resolve: use of undeclared type `T`
  --> /home/runner/work/glacier/glacier/ices/92148.rs:18:23
   |
18 |     type Output = Vec<T::Output>;
   |                       ^ use of undeclared type `T`

error[E0412]: cannot find type `T` in this scope
  --> /home/runner/work/glacier/glacier/ices/92148.rs:20:15
   |
14 | impl<B, F> Blah<Vec<F>> for B
   |      - similarly named type parameter `B` defined here
...
20 |     fn foo(t: T) -> Self::Output {
   |               ^ help: a type parameter with a similar name exists: `B`

error: aborting due to 2 previous errors

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

=== stdout ===
=== stderr ===
error[E0433]: failed to resolve: use of undeclared type `T`
  --> /home/runner/work/glacier/glacier/ices/92148.rs:18:23
   |
18 |     type Output = Vec<T::Output>;
   |                       ^ use of undeclared type `T`

error[E0412]: cannot find type `T` in this scope
  --> /home/runner/work/glacier/glacier/ices/92148.rs:20:15
   |
14 | impl<B, F> Blah<Vec<F>> for B
   |      - similarly named type parameter `B` defined here
...
20 |     fn foo(t: T) -> Self::Output {
   |               ^ help: a type parameter with a similar name exists: `B`

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0412, E0433.
For more information about an error, try `rustc --explain E0412`.
==============
@Alexendoo Alexendoo merged commit d45a6b9 into master Mar 26, 2022
@Alexendoo Alexendoo deleted the autofix/ices/92148.rs branch March 26, 2022 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants