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

Conversation

@github-actions
Copy link
Contributor

Issue: rust-lang/rust#84149

trait C{async fn b(){fn a()}}
=== stdout ===
=== stderr ===
error: expected one of `->`, `;`, `where`, or `{`, found `}`
 --> /home/runner/work/glacier/glacier/ices/84149.rs:1:28
  |
1 | trait C{async fn b(){fn a()}}
  |                         -  ^ expected one of `->`, `;`, `where`, or `{`
  |                         |
  |                         while parsing this `fn`

error[E0706]: functions in traits cannot be declared `async`
 --> /home/runner/work/glacier/glacier/ices/84149.rs:1:9
  |
1 | trait C{async fn b(){fn a()}}
  |         -----^^^^^^^^^^^^^^^
  |         |
  |         `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

error: free function without a body
 --> /home/runner/work/glacier/glacier/ices/84149.rs:1:22
  |
1 | trait C{async fn b(){fn a()}}
  |                      ^^^^^-
  |                           |
  |                           help: provide a definition for the function: `{ <body> }`

error[E0601]: `main` function not found in crate `84149`
 --> /home/runner/work/glacier/glacier/ices/84149.rs:1:1
  |
1 | trait C{async fn b(){fn a()}}
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/84149.rs`

error: aborting due to 4 previous errors

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

=== stdout ===
=== stderr ===
error: expected one of `->`, `;`, `where`, or `{`, found `}`
 --> /home/runner/work/glacier/glacier/ices/84149.rs:1:28
  |
1 | trait C{async fn b(){fn a()}}
  |                         -  ^ expected one of `->`, `;`, `where`, or `{`
  |                         |
  |                         while parsing this `fn`

error[E0706]: functions in traits cannot be declared `async`
 --> /home/runner/work/glacier/glacier/ices/84149.rs:1:9
  |
1 | trait C{async fn b(){fn a()}}
  |         -----^^^^^^^^^^^^^^^
  |         |
  |         `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

error: free function without a body
 --> /home/runner/work/glacier/glacier/ices/84149.rs:1:22
  |
1 | trait C{async fn b(){fn a()}}
  |                      ^^^^^-
  |                           |
  |                           help: provide a definition for the function: `{ <body> }`

error[E0601]: `main` function not found in crate `84149`
 --> /home/runner/work/glacier/glacier/ices/84149.rs:1:1
  |
1 | trait C{async fn b(){fn a()}}
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/84149.rs`

error: aborting due to 4 previous errors

Some errors have detailed explanations: E0601, E0706.
For more information about an error, try `rustc --explain E0601`.
==============
@JohnTitor JohnTitor merged commit 67445fc into master Apr 20, 2021
@JohnTitor JohnTitor deleted the autofix/ices/84149.rs branch April 20, 2021 12:27
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