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

ices/54895.rs: fixed with errors #1189

Closed
wants to merge 1 commit into from
Closed

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#54895

trait Trait<'a> {
    type Out;
}
impl<'a> Trait<'a> for () {
    type Out = ();
}
fn main() -> impl for<'a> Trait<'a, Out = impl ?Sized + 'a> {
    ()
}
=== stdout ===
=== stderr ===
error[E0277]: `main` has invalid return type `impl Trait<for<'a> 'a, Out = impl ?Sized>`
 --> /home/runner/work/glacier/glacier/ices/54895.rs:7:14
  |
7 | fn main() -> impl for<'a> Trait<'a, Out = impl ?Sized + 'a> {
  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `main` can only return types that implement `Termination`
  |
  = help: consider using `()`, or a `Result`

error: aborting due to previous error

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

=== stdout ===
=== stderr ===
error[E0277]: `main` has invalid return type `impl Trait<for<'a> 'a, Out = impl ?Sized>`
 --> /home/runner/work/glacier/glacier/ices/54895.rs:7:14
  |
7 | fn main() -> impl for<'a> Trait<'a, Out = impl ?Sized + 'a> {
  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `main` can only return types that implement `Termination`
  |
  = help: consider using `()`, or a `Result`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
==============
@Alexendoo Alexendoo closed this in 1714f42 Mar 31, 2022
@Alexendoo Alexendoo deleted the autofix/ices/54895.rs branch March 31, 2022 21:53
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.

None yet

1 participant