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

ices/101665.rs: fixed with errors #1440

Merged
merged 1 commit into from
Oct 5, 2022
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Oct 4, 2022

Issue: rust-lang/rust#101665

#![feature(return_position_impl_trait_in_trait)]
#![allow(incomplete_features)]

use core::fmt::Debug;

trait Foo {
    async fn baz()-> impl Debug{}
}

fn main(){}
=== stdout ===
=== stderr ===
error[E0706]: functions in traits cannot be declared `async`
 --> /home/runner/work/glacier/glacier/ices/101665.rs:7:5
  |
7 |     async fn baz()-> impl Debug{}
  |     -----^^^^^^^^^^^^^^^^^^^^^^
  |     |
  |     `async` because of this
  |
  = note: `async` trait functions are not currently supported
  = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
  = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
  = help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable

error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/101665.rs:7:32
  |
7 |     async fn baz()-> impl Debug{}
  |                                ^^ expected associated type, found `()`
  |
  = note: expected associated type `impl Debug`
                   found unit type `()`

error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/101665.rs:7:32
  |
7 |     async fn baz()-> impl Debug{}
  |                                ^^ expected associated type, found opaque type
  |
  = note: expected associated type `impl Future<Output = impl Debug>` (trait associated opaque type at </home/runner/work/glacier/glacier/ices/101665.rs:7:22>)
                 found opaque type `impl Future<Output = impl Debug>` (opaque type at </rustc/f83e0266cf7aaa4b41505c49a5fd9c2363166522/library/core/src/future/mod.rs:72:43>)

error: aborting due to 3 previous errors

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

=== stdout ===
=== stderr ===
error[E0706]: functions in traits cannot be declared `async`
 --> /home/runner/work/glacier/glacier/ices/101665.rs:7:5
  |
7 |     async fn baz()-> impl Debug{}
  |     -----^^^^^^^^^^^^^^^^^^^^^^
  |     |
  |     `async` because of this
  |
  = note: `async` trait functions are not currently supported
  = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
  = note: see issue #91611 <rust-lang/rust#91611> for more information
  = help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable

error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/101665.rs:7:32
  |
7 |     async fn baz()-> impl Debug{}
  |                                ^^ expected associated type, found `()`
  |
  = note: expected associated type `impl Debug`
                   found unit type `()`

error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/101665.rs:7:32
  |
7 |     async fn baz()-> impl Debug{}
  |                                ^^ expected associated type, found opaque type
  |
  = note: expected associated type `impl Future<Output = impl Debug>` (trait associated opaque type at </home/runner/work/glacier/glacier/ices/101665.rs:7:22>)
                 found opaque type `impl Future<Output = impl Debug>` (opaque type at </rustc/f83e0266cf7aaa4b41505c49a5fd9c2363166522/library/core/src/future/mod.rs:72:43>)

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0308, E0706.
For more information about an error, try `rustc --explain E0308`.
==============
@Alexendoo Alexendoo merged commit 512550f into master Oct 5, 2022
@Alexendoo Alexendoo deleted the autofix/ices/101665.rs branch October 5, 2022 11:26
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