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

ices/80433.rs: fixed with errors #646

Merged
merged 1 commit into from
Feb 6, 2021
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Feb 6, 2021

Issue: rust-lang/rust#80433

#![allow(incomplete_features)]
#![feature(generic_associated_types)]

struct E {}

trait TestMut {
    type Output<'a>;
    fn test_mut(&mut self) -> Self::Output<'static>;
}

impl TestMut for E {
    type Output<'a> = usize;
    fn test_mut(&mut self) -> Self::Output<'static> {
        todo!()
    }
}

fn test_simpler(_: impl TestMut<Output = usize>) {}

fn main() {
    test_simpler(E {});
}
=== stdout ===
=== stderr ===
error[E0107]: missing generics for associated type `TestMut::Output`
 --> /home/runner/work/glacier/glacier/ices/80433.rs:7:10
  |
7 |     type Output<'a>;
  |          ^^^^^^ expected 1 lifetime argument
  |
note: associated type defined here, with 1 lifetime parameter: `'a`
 --> /home/runner/work/glacier/glacier/ices/80433.rs:7:10
  |
7 |     type Output<'a>;
  |          ^^^^^^ --
help: use angle brackets to add missing lifetime argument
  |
7 |     type Output<'a><'a>;
  |                ^^^^

error: aborting due to previous error

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

=== stdout ===
=== stderr ===
error[E0107]: missing generics for associated type `TestMut::Output`
 --> /home/runner/work/glacier/glacier/ices/80433.rs:7:10
  |
7 |     type Output<'a>;
  |          ^^^^^^ expected 1 lifetime argument
  |
note: associated type defined here, with 1 lifetime parameter: `'a`
 --> /home/runner/work/glacier/glacier/ices/80433.rs:7:10
  |
7 |     type Output<'a>;
  |          ^^^^^^ --
help: use angle brackets to add missing lifetime argument
  |
7 |     type Output<'a><'a>;
  |                ^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0107`.
==============
@Alexendoo Alexendoo merged commit 1ce3df8 into master Feb 6, 2021
@Alexendoo Alexendoo deleted the autofix/ices/80433.rs branch February 6, 2021 13:41
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