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

ices/102114-2.rs: fixed with errors #1442

Merged
merged 1 commit into from
Oct 5, 2022
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Oct 5, 2022

Issue: rust-lang/rust#102114

trait A {
    type B<'b>;
    fn a() -> Self::B<'static>;
}

struct C;

struct Wrapper<T>(T);

impl A for C {
    type B<T> = Wrapper<T>;
    fn a() -> Self::B<'static> {}
}
=== stdout ===
=== stderr ===
error[E0601]: `main` function not found in crate `102114_2`
  --> /home/runner/work/glacier/glacier/ices/102114-2.rs:13:2
   |
13 | }
   |  ^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/102114-2.rs`

error[E0049]: type `B` has 1 type parameter but its trait declaration has 0 type parameters
  --> /home/runner/work/glacier/glacier/ices/102114-2.rs:11:12
   |
2  |     type B<'b>;
   |            -- expected 0 type parameters
...
11 |     type B<T> = Wrapper<T>;
   |            ^ found 1 type parameter

error: aborting due to 2 previous errors

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

=== stdout ===
=== stderr ===
error[E0601]: `main` function not found in crate `102114_2`
  --> /home/runner/work/glacier/glacier/ices/102114-2.rs:13:2
   |
13 | }
   |  ^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/102114-2.rs`

error[E0049]: type `B` has 1 type parameter but its trait declaration has 0 type parameters
  --> /home/runner/work/glacier/glacier/ices/102114-2.rs:11:12
   |
2  |     type B<'b>;
   |            -- expected 0 type parameters
...
11 |     type B<T> = Wrapper<T>;
   |            ^ found 1 type parameter

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0049, E0601.
For more information about an error, try `rustc --explain E0049`.
==============
@JohnTitor JohnTitor merged commit 7754a77 into master Oct 5, 2022
@JohnTitor JohnTitor deleted the autofix/ices/102114-2.rs branch October 5, 2022 08:06
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