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

ices/99073.rs: fixed with errors #1352

Merged
merged 1 commit into from
Jul 21, 2022
Merged

ices/99073.rs: fixed with errors #1352

merged 1 commit into from
Jul 21, 2022

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#99073

fn main() {
  let _ = fix(|_: &dyn Fn()| {});
}

fn fix<F: Fn(G), G: Fn()>(f: F) -> impl Fn() {
  move || f(fix(&f))
}
=== stdout ===
=== stderr ===
error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/99073.rs:6:11
  |
5 | fn fix<F: Fn(G), G: Fn()>(f: F) -> impl Fn() {
  |                                    --------- the expected opaque type
6 |   move || f(fix(&f))
  |           ^^^^^^^^^^ types differ
  |
  = note: expected opaque type `impl Fn()`
          found type parameter `G`

error: aborting due to previous error

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

=== stdout ===
=== stderr ===
error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/99073.rs:6:11
  |
5 | fn fix<F: Fn(G), G: Fn()>(f: F) -> impl Fn() {
  |                                    --------- the expected opaque type
6 |   move || f(fix(&f))
  |           ^^^^^^^^^^ types differ
  |
  = note: expected opaque type `impl Fn()`
          found type parameter `G`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0308`.
==============
@JohnTitor JohnTitor merged commit ffb8b6c into master Jul 21, 2022
@JohnTitor JohnTitor deleted the autofix/ices/99073.rs branch July 21, 2022 07:02
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