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

ices/95421.rs: fixed with errors #1524

Merged
merged 1 commit into from
Mar 12, 2023
Merged

ices/95421.rs: fixed with errors #1524

merged 1 commit into from
Mar 12, 2023

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#95421

// Compile as binary
fn h5<T>(_: T)
where
    for<'x> fn(&'x u32): Fn(&'x u32),
{
}

fn main(){
    h5(|_|{})
}
=== stdout ===
=== stderr ===
error[E0277]: expected a `Fn<(&'x u32,)>` closure, found `fn(&'x u32)`
 --> /home/runner/work/glacier/glacier/ices/95421.rs:9:5
  |
9 |     h5(|_|{})
  |     ^^ expected an `Fn<(&'x u32,)>` closure, found `fn(&'x u32)`
  |
  = help: the trait `for<'x> Fn<(&'x u32,)>` is not implemented for `fn(&'x u32)`
note: required by a bound in `h5`
 --> /home/runner/work/glacier/glacier/ices/95421.rs:4:26
  |
2 | fn h5<T>(_: T)
  |    -- required by a bound in this function
3 | where
4 |     for<'x> fn(&'x u32): Fn(&'x u32),
  |                          ^^^^^^^^^^^ required by this bound in `h5`

error: aborting due to previous error

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

=== stdout ===
=== stderr ===
error[E0277]: expected a `Fn<(&'x u32,)>` closure, found `fn(&'x u32)`
 --> /home/runner/work/glacier/glacier/ices/95421.rs:9:5
  |
9 |     h5(|_|{})
  |     ^^ expected an `Fn<(&'x u32,)>` closure, found `fn(&'x u32)`
  |
  = help: the trait `for<'x> Fn<(&'x u32,)>` is not implemented for `fn(&'x u32)`
note: required by a bound in `h5`
 --> /home/runner/work/glacier/glacier/ices/95421.rs:4:26
  |
2 | fn h5<T>(_: T)
  |    -- required by a bound in this function
3 | where
4 |     for<'x> fn(&'x u32): Fn(&'x u32),
  |                          ^^^^^^^^^^^ required by this bound in `h5`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
==============
@JohnTitor JohnTitor merged commit dfef762 into master Mar 12, 2023
@JohnTitor JohnTitor deleted the autofix/ices/95421.rs branch March 12, 2023 07: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