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

ices/74018.rs: fixed with errors #475

Merged
merged 1 commit into from
Sep 29, 2020
Merged

ices/74018.rs: fixed with errors #475

merged 1 commit into from
Sep 29, 2020

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#74018

trait Trait {
    type Associated;
    fn into(self) -> Self::Associated;
}

impl<'a, I: Iterator<Item = i32>> Trait for (i32, I) {
    type Associated = (i32, impl Iterator<Item = i32>);
    fn into(self) -> Self::Associated { (0_i32, &[0_i32].iter()) }
}

fn main() {}
=== stdout ===
=== stderr ===
error[E0658]: `impl Trait` in type aliases is unstable
 --> /home/runner/work/glacier/glacier/ices/74018.rs:7:29
  |
7 |     type Associated = (i32, impl Iterator<Item = i32>);
  |                             ^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = 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[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
 --> /home/runner/work/glacier/glacier/ices/74018.rs:6:6
  |
6 | impl<'a, I: Iterator<Item = i32>> Trait for (i32, I) {
  |      ^^ unconstrained lifetime parameter

error: aborting due to 2 previous errors

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

=== stdout ===
=== stderr ===
error[E0658]: `impl Trait` in type aliases is unstable
 --> /home/runner/work/glacier/glacier/ices/74018.rs:7:29
  |
7 |     type Associated = (i32, impl Iterator<Item = i32>);
  |                             ^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = 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[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
 --> /home/runner/work/glacier/glacier/ices/74018.rs:6:6
  |
6 | impl<'a, I: Iterator<Item = i32>> Trait for (i32, I) {
  |      ^^ unconstrained lifetime parameter

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0207, E0658.
For more information about an error, try `rustc --explain E0207`.
==============
@JohnTitor JohnTitor merged commit 51d5252 into master Sep 29, 2020
@JohnTitor JohnTitor deleted the autofix/ices/74018.rs branch September 29, 2020 19:23
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