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

ices/68648.rs: fixed with errors #634

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#68648

#![feature(generic_associated_types)]

trait Fun {
    type F<'a>;
    
    fn identity<'a>(t: Self::F<'a>) -> Self::F<'a> { t }
}

impl <T> Fun for T {
    type F<'a> = Self;
}

fn bug<'a, T: Fun<F = T>>(t: T) -> T::F<'a> {
    T::identity(t)
}


fn main() {
    let x = 10;
    
    bug(x);
}
=== stdout ===
=== stderr ===
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/68648.rs:1:12
  |
1 | #![feature(generic_associated_types)]
  |            ^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default
  = note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information

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

error: aborting due to previous error; 1 warning emitted

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

=== stdout ===
=== stderr ===
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/68648.rs:1:12
  |
1 | #![feature(generic_associated_types)]
  |            ^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default
  = note: see issue #44265 <rust-lang/rust#44265> for more information

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

error: aborting due to previous error; 1 warning emitted

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