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

ices/78722.rs: fixed with errors #544

Merged
merged 1 commit into from
Nov 16, 2020
Merged

ices/78722.rs: fixed with errors #544

merged 1 commit into from
Nov 16, 2020

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#78722

#![feature(type_alias_impl_trait)]
#![feature(impl_trait_in_bindings)]

type F = impl core::future::Future<Output = u8>;

struct Bug {
    V1: [(); {
        fn concrete_use() -> F {
            async {}
        }
        let f: F = async { 1 };
        1
    }],
}

fn main() {}
=== stdout ===
=== stderr ===
warning: the feature `impl_trait_in_bindings` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/78722.rs:2:12
  |
2 | #![feature(impl_trait_in_bindings)]
  |            ^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default
  = note: see issue #63065 <https://github.com/rust-lang/rust/issues/63065> for more information

error: `async` blocks are not allowed in constants
  --> /home/runner/work/glacier/glacier/ices/78722.rs:11:20
   |
11 |         let f: F = async { 1 };
   |                    ^^^^^^^^^^^

error[E0493]: destructors cannot be evaluated at compile-time
  --> /home/runner/work/glacier/glacier/ices/78722.rs:11:13
   |
11 |         let f: F = async { 1 };
   |             ^ constants cannot evaluate destructors
12 |         1
13 |     }],
   |     - value is dropped here

error: aborting due to 2 previous errors; 1 warning emitted

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

=== stdout ===
=== stderr ===
warning: the feature `impl_trait_in_bindings` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/78722.rs:2:12
  |
2 | #![feature(impl_trait_in_bindings)]
  |            ^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default
  = note: see issue #63065 <rust-lang/rust#63065> for more information

error: `async` blocks are not allowed in constants
  --> /home/runner/work/glacier/glacier/ices/78722.rs:11:20
   |
11 |         let f: F = async { 1 };
   |                    ^^^^^^^^^^^

error[E0493]: destructors cannot be evaluated at compile-time
  --> /home/runner/work/glacier/glacier/ices/78722.rs:11:13
   |
11 |         let f: F = async { 1 };
   |             ^ constants cannot evaluate destructors
12 |         1
13 |     }],
   |     - value is dropped here

error: aborting due to 2 previous errors; 1 warning emitted

For more information about this error, try `rustc --explain E0493`.
==============
@Alexendoo Alexendoo merged commit 9d39d07 into master Nov 16, 2020
@Alexendoo Alexendoo deleted the autofix/ices/78722.rs branch November 16, 2020 15:40
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