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

ices/69136.rs: fixed with errors #396

Merged
merged 1 commit into from
Jun 17, 2020
Merged

ices/69136.rs: fixed with errors #396

merged 1 commit into from
Jun 17, 2020

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#69136

#![feature(type_alias_impl_trait)]

trait SomeTrait where {}

trait WithAssoc<A> where {
	type AssocType;
}

type Return<A> // 'a is not in scope
    = impl WithAssoc<A, AssocType = impl SomeTrait + 'a>;

fn my_fun() -> Return<()> {}

fn main() {}
=== stdout ===
=== stderr ===
error[E0261]: use of undeclared lifetime name `'a`
  --> /home/runner/work/glacier/glacier/ices/69136.rs:10:54
   |
9  | type Return<A> // 'a is not in scope
   |             - help: consider introducing lifetime `'a` here: `'a,`
10 |     = impl WithAssoc<A, AssocType = impl SomeTrait + 'a>;
   |                                                      ^^ undeclared lifetime

error[E0277]: the trait bound `(): WithAssoc<()>` is not satisfied
  --> /home/runner/work/glacier/glacier/ices/69136.rs:10:7
   |
10 |     = impl WithAssoc<A, AssocType = impl SomeTrait + 'a>;
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `WithAssoc<()>` is not implemented for `()`
   |
   = note: the return type of a function must have a statically known size

error[E0277]: the trait bound `(): WithAssoc<()>` is not satisfied
  --> /home/runner/work/glacier/glacier/ices/69136.rs:10:37
   |
10 |     = impl WithAssoc<A, AssocType = impl SomeTrait + 'a>;
   |                                     ^^^^^^^^^^^^^^^^^^^ the trait `WithAssoc<()>` is not implemented for `()`
   |
   = note: the return type of a function must have a statically known size

error: aborting due to 3 previous errors

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

=== stdout ===
=== stderr ===
error[E0261]: use of undeclared lifetime name `'a`
  --> /home/runner/work/glacier/glacier/ices/69136.rs:10:54
   |
9  | type Return<A> // 'a is not in scope
   |             - help: consider introducing lifetime `'a` here: `'a,`
10 |     = impl WithAssoc<A, AssocType = impl SomeTrait + 'a>;
   |                                                      ^^ undeclared lifetime

error[E0277]: the trait bound `(): WithAssoc<()>` is not satisfied
  --> /home/runner/work/glacier/glacier/ices/69136.rs:10:7
   |
10 |     = impl WithAssoc<A, AssocType = impl SomeTrait + 'a>;
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `WithAssoc<()>` is not implemented for `()`
   |
   = note: the return type of a function must have a statically known size

error[E0277]: the trait bound `(): WithAssoc<()>` is not satisfied
  --> /home/runner/work/glacier/glacier/ices/69136.rs:10:37
   |
10 |     = impl WithAssoc<A, AssocType = impl SomeTrait + 'a>;
   |                                     ^^^^^^^^^^^^^^^^^^^ the trait `WithAssoc<()>` is not implemented for `()`
   |
   = note: the return type of a function must have a statically known size

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0261, E0277.
For more information about an error, try `rustc --explain E0261`.
==============
@Alexendoo Alexendoo merged commit fd5eca2 into master Jun 17, 2020
@Alexendoo Alexendoo deleted the autofix/ices/69136.rs branch June 17, 2020 16:48
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

2 participants