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

ices/87258.rs: fixed with errors #998

Merged
merged 1 commit into from
Oct 20, 2021
Merged

ices/87258.rs: fixed with errors #998

merged 1 commit into from
Oct 20, 2021

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#87258

#![feature(min_type_alias_impl_trait)]
#![feature(generic_associated_types)]
use std::future::Future;

pub trait Trait1
{
    type Error: Clone;
    type Assoc2<'a>
    where
        Self: 'a;
}

pub trait Trait2: Trait1 {
    type FooFuture<'a, 'b>: Future<Output = Result<(), Self::Error>>;
    fn foo<'a: 'b, 'b>(assoc2: &'b mut Self::Assoc2<'a>) -> Self::FooFuture<'a, 'b>
    where
        Self: 'a;
}

impl<'c, S : Trait1> Trait1 for &'c mut S {
    type Error = S::Error;

    type Assoc2<'a> where 'c: 'a = S::Assoc2<'a>;
}

impl<'c, S : Trait2> Trait2 for &'c mut S {
    type FooFuture<'a, 'b> = impl Future<Output = Result<(), Self::Error>>;
    fn foo<'a: 'b, 'b>(assoc2: &'b mut Self::Assoc2<'a>) -> Self::FooFuture<'a, 'b>
    where
        Self: 'a
    {
        async move {
            unimplemented!();
        }
    }
}
=== stdout ===
=== stderr ===
error[E0557]: feature has been removed
 --> /home/runner/work/glacier/glacier/ices/87258.rs:1:12
  |
1 | #![feature(min_type_alias_impl_trait)]
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^ feature has been removed
  |
  = note: removed in favor of full type_alias_impl_trait

error[E0658]: `impl Trait` in type aliases is unstable
  --> /home/runner/work/glacier/glacier/ices/87258.rs:27:30
   |
27 |     type FooFuture<'a, 'b> = impl Future<Output = Result<(), Self::Error>>;
   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
   = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable

error[E0601]: `main` function not found in crate `87258`
  --> /home/runner/work/glacier/glacier/ices/87258.rs:1:1
   |
1  | / #![feature(min_type_alias_impl_trait)]
2  | | #![feature(generic_associated_types)]
3  | | use std::future::Future;
4  | |
...  |
35 | |     }
36 | | }
   | |_^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/87258.rs`

error: aborting due to 3 previous errors

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

=== stdout ===
=== stderr ===
error[E0557]: feature has been removed
 --> /home/runner/work/glacier/glacier/ices/87258.rs:1:12
  |
1 | #![feature(min_type_alias_impl_trait)]
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^ feature has been removed
  |
  = note: removed in favor of full type_alias_impl_trait

error[E0658]: `impl Trait` in type aliases is unstable
  --> /home/runner/work/glacier/glacier/ices/87258.rs:27:30
   |
27 |     type FooFuture<'a, 'b> = impl Future<Output = Result<(), Self::Error>>;
   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #63063 <rust-lang/rust#63063> for more information
   = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable

error[E0601]: `main` function not found in crate `87258`
  --> /home/runner/work/glacier/glacier/ices/87258.rs:1:1
   |
1  | / #![feature(min_type_alias_impl_trait)]
2  | | #![feature(generic_associated_types)]
3  | | use std::future::Future;
4  | |
...  |
35 | |     }
36 | | }
   | |_^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/87258.rs`

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0557, E0601, E0658.
For more information about an error, try `rustc --explain E0557`.
==============
@Alexendoo Alexendoo merged commit a9841de into master Oct 20, 2021
@Alexendoo Alexendoo deleted the autofix/ices/87258.rs branch October 20, 2021 18: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