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

ices/84768.rs: fixed with errors #888

Merged
merged 1 commit into from
Jul 26, 2021
Merged

ices/84768.rs: fixed with errors #888

merged 1 commit into from
Jul 26, 2021

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#84768

#![feature(fn_traits)]

fn transform_mut<F>(f: F) where F: for<'b> FnOnce(&'b mut u8) {
    <F as FnOnce(&mut u8)>::call_once(f, 1)
}
=== stdout ===
=== stderr ===
error[E0601]: `main` function not found in crate `84768`
 --> /home/runner/work/glacier/glacier/ices/84768.rs:1:1
  |
1 | / #![feature(fn_traits)]
2 | |
3 | | fn transform_mut<F>(f: F) where F: for<'b> FnOnce(&'b mut u8) {
4 | |     <F as FnOnce(&mut u8)>::call_once(f, 1)
5 | | }
  | |_^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/84768.rs`

error[E0229]: associated type bindings are not allowed here
 --> /home/runner/work/glacier/glacier/ices/84768.rs:4:11
  |
4 |     <F as FnOnce(&mut u8)>::call_once(f, 1)
  |           ^^^^^^^^^^^^^^^ associated type not allowed here

error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/84768.rs:4:42
  |
4 |     <F as FnOnce(&mut u8)>::call_once(f, 1)
  |                                          ^ expected tuple, found integer
  |
  = note: expected tuple `(&mut u8,)`
              found type `{integer}`

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0229, E0308, E0601.
For more information about an error, try `rustc --explain E0229`.
==============

=== stdout ===
=== stderr ===
error[E0601]: `main` function not found in crate `84768`
 --> /home/runner/work/glacier/glacier/ices/84768.rs:1:1
  |
1 | / #![feature(fn_traits)]
2 | |
3 | | fn transform_mut<F>(f: F) where F: for<'b> FnOnce(&'b mut u8) {
4 | |     <F as FnOnce(&mut u8)>::call_once(f, 1)
5 | | }
  | |_^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/84768.rs`

error[E0229]: associated type bindings are not allowed here
 --> /home/runner/work/glacier/glacier/ices/84768.rs:4:11
  |
4 |     <F as FnOnce(&mut u8)>::call_once(f, 1)
  |           ^^^^^^^^^^^^^^^ associated type not allowed here

error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/84768.rs:4:42
  |
4 |     <F as FnOnce(&mut u8)>::call_once(f, 1)
  |                                          ^ expected tuple, found integer
  |
  = note: expected tuple `(&mut u8,)`
              found type `{integer}`

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0229, E0308, E0601.
For more information about an error, try `rustc --explain E0229`.
==============
@Alexendoo Alexendoo merged commit 785e67e into master Jul 26, 2021
@Alexendoo Alexendoo deleted the autofix/ices/84768.rs branch July 26, 2021 12:25
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