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

ices/82952.rs: fixed with errors #710

Merged
merged 1 commit into from
Apr 8, 2021
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Apr 8, 2021

Issue: rust-lang/rust#82952

trait ExampleTrait<I> {}
type BlahResult<I, E = impl ExampleTrait<I>> = Result<I, E>;

fn example<'a, T>() -> BlahResult<()> {}
=== stdout ===
=== stderr ===
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
 --> /home/runner/work/glacier/glacier/ices/82952.rs:2:24
  |
2 | type BlahResult<I, E = impl ExampleTrait<I>> = Result<I, E>;
  |                        ^^^^^^^^^^^^^^^^^^^^

error[E0601]: `main` function not found in crate `82952`
 --> /home/runner/work/glacier/glacier/ices/82952.rs:1:1
  |
1 | / trait ExampleTrait<I> {}
2 | | type BlahResult<I, E = impl ExampleTrait<I>> = Result<I, E>;
3 | |
4 | | fn example<'a, T>() -> BlahResult<()> {}
  | |________________________________________^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/82952.rs`

error: aborting due to 2 previous errors

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

=== stdout ===
=== stderr ===
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
 --> /home/runner/work/glacier/glacier/ices/82952.rs:2:24
  |
2 | type BlahResult<I, E = impl ExampleTrait<I>> = Result<I, E>;
  |                        ^^^^^^^^^^^^^^^^^^^^

error[E0601]: `main` function not found in crate `82952`
 --> /home/runner/work/glacier/glacier/ices/82952.rs:1:1
  |
1 | / trait ExampleTrait<I> {}
2 | | type BlahResult<I, E = impl ExampleTrait<I>> = Result<I, E>;
3 | |
4 | | fn example<'a, T>() -> BlahResult<()> {}
  | |________________________________________^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/82952.rs`

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0562, E0601.
For more information about an error, try `rustc --explain E0562`.
==============
@Alexendoo Alexendoo merged commit 0bab84b into master Apr 8, 2021
@Alexendoo Alexendoo deleted the autofix/ices/82952.rs branch April 8, 2021 12:20
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