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

Commit

Permalink
ices/74282.rs: fixed with errors
Browse files Browse the repository at this point in the history
=== stdout ===
=== stderr ===
error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/74282.rs:8:5
  |
8 |     Anonymous(|| 3)
  |     ^^^^^^^^^^^^^^^ expected `()`, found struct `Anonymous`
  |
help: consider using a semicolon here
  |
8 |     Anonymous(|| 3);
  |                    +
help: try adding a return type
  |
6 | fn test() -> Anonymous {
  |           ++++++++++++

error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/74282.rs:8:15
  |
3 | type Closure = impl Fn() -> u64;
  |                ---------------- the expected opaque type
...
8 |     Anonymous(|| 3)
  |               ^^^^ expected closure, found a different closure
  |
  = note: expected opaque type `Closure`
                 found closure `[closure@/home/runner/work/glacier/glacier/ices/74282.rs:8:15: 8:19]`
  = note: no two closures, even if identical, have the same type
  = help: consider boxing your closure and/or using it as a trait object

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0308`.
==============
  • Loading branch information
rustbot committed Feb 9, 2022
1 parent c431092 commit f3a431c
Showing 1 changed file with 0 additions and 0 deletions.
File renamed without changes.

0 comments on commit f3a431c

Please sign in to comment.