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

ices/79099.sh: fixed with errors #881

Closed
wants to merge 1 commit into from

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#79099

#!/bin/bash

rustc - << 'EOF'
#![feature(impl_trait_in_bindings)]

struct Bug {
    V1: [(); {
        let f: impl core::future::Future<Output = u8> = async { 1 };
        1
    }],
}

fn main() {}
EOF
=== stdout ===
=== stderr ===
error: expected identifier, found `1`
 --> <anon>:5:65
  |
5 |         let f: impl core::future::Future<Output = u8> = async { 1 };
  |                                                         -----   ^ expected identifier
  |                                                         |
  |                                                         `async` blocks are only allowed in Rust 2018 or later
  |
  = help: set `edition = "2018"` in `Cargo.toml`
  = note: for more on editions, read https://doc.rust-lang.org/edition-guide

error[E0557]: feature has been removed
 --> <anon>:1:12
  |
1 | #![feature(impl_trait_in_bindings)]
  |            ^^^^^^^^^^^^^^^^^^^^^^ feature has been removed
  |
  = note: the implementation was not maintainable, the feature may get reintroduced once the current refactorings are done

error[E0562]: `impl Trait` not allowed outside of function and method return types
 --> <anon>:5:16
  |
5 |         let f: impl core::future::Future<Output = u8> = async { 1 };
  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 3 previous errors

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

=== stdout ===
=== stderr ===
error: expected identifier, found `1`
 --> <anon>:5:65
  |
5 |         let f: impl core::future::Future<Output = u8> = async { 1 };
  |                                                         -----   ^ expected identifier
  |                                                         |
  |                                                         `async` blocks are only allowed in Rust 2018 or later
  |
  = help: set `edition = "2018"` in `Cargo.toml`
  = note: for more on editions, read https://doc.rust-lang.org/edition-guide

error[E0557]: feature has been removed
 --> <anon>:1:12
  |
1 | #![feature(impl_trait_in_bindings)]
  |            ^^^^^^^^^^^^^^^^^^^^^^ feature has been removed
  |
  = note: the implementation was not maintainable, the feature may get reintroduced once the current refactorings are done

error[E0562]: `impl Trait` not allowed outside of function and method return types
 --> <anon>:5:16
  |
5 |         let f: impl core::future::Future<Output = u8> = async { 1 };
  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0557, E0562.
For more information about an error, try `rustc --explain E0557`.
==============
@Alexendoo Alexendoo closed this Jul 23, 2021
@Alexendoo Alexendoo deleted the autofix/ices/79099.sh branch July 23, 2021 18:49
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