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

ices/108399.rs: fixed with errors #1604

Merged
merged 1 commit into from
Jun 24, 2023
Merged

ices/108399.rs: fixed with errors #1604

merged 1 commit into from
Jun 24, 2023

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#108399

#![feature(type_alias_impl_trait)]

use std::future::Future;

type FutNothing<'a> = impl 'a + Future<Output = ()>;

async fn operation(x: &mut ()) -> () {
    ()
}

async fn indirect() {
    call(operation).await
}

async fn call<F>(mut f: F)
where
    for<'any> F: FnMut(&'any mut ()) -> FutNothing<'any>,
{
    f(&mut ()).await
}

fn main() {}
=== stdout ===
=== stderr ===
error[E0792]: expected generic lifetime parameter, found `'any`

warning: unused variable: `x`
 --> /home/runner/work/glacier/glacier/ices/108399.rs:7:20
  |
7 | async fn operation(x: &mut ()) -> () {
  |                    ^ help: if this is intentional, prefix it with an underscore: `_x`
  |
  = note: `#[warn(unused_variables)]` on by default

error: aborting due to previous error; 1 warning emitted

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

=== stdout ===
=== stderr ===
error[E0792]: expected generic lifetime parameter, found `'any`

warning: unused variable: `x`
 --> /home/runner/work/glacier/glacier/ices/108399.rs:7:20
  |
7 | async fn operation(x: &mut ()) -> () {
  |                    ^ help: if this is intentional, prefix it with an underscore: `_x`
  |
  = note: `#[warn(unused_variables)]` on by default

error: aborting due to previous error; 1 warning emitted

For more information about this error, try `rustc --explain E0792`.
==============
@JohnTitor JohnTitor merged commit d82ffda into master Jun 24, 2023
@JohnTitor JohnTitor deleted the autofix/ices/108399.rs branch June 24, 2023 05:29
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