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

ices/109188.rs: fixed with errors #1555

Merged
merged 1 commit into from
Mar 25, 2023
Merged

ices/109188.rs: fixed with errors #1555

merged 1 commit into from
Mar 25, 2023

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#109188

enum Either {
    One(X),
    Two(X),
}

struct X(Y);

struct Y;

fn move_into_fnmut() {
    let x = move_into_fnmut();

    consume_fnmut(|| {
        X(_t) = x;

        Either::Two(_t) = x;
    });
}

fn main() {}
=== stdout ===
=== stderr ===
error[E0425]: cannot find value `_t` in this scope
  --> /home/runner/work/glacier/glacier/ices/109188.rs:14:11
   |
14 |         X(_t) = x;
   |           ^^ not found in this scope

error[E0425]: cannot find value `_t` in this scope
  --> /home/runner/work/glacier/glacier/ices/109188.rs:16:21
   |
16 |         Either::Two(_t) = x;
   |                     ^^ not found in this scope

error[E0308]: mismatched types
  --> /home/runner/work/glacier/glacier/ices/109188.rs:14:9
   |
14 |         X(_t) = x;
   |         ^^^^^   - this expression has type `()`
   |         |
   |         expected `()`, found `X`

error[E0308]: mismatched types
  --> /home/runner/work/glacier/glacier/ices/109188.rs:16:9
   |
16 |         Either::Two(_t) = x;
   |         ^^^^^^^^^^^^^^^   - this expression has type `()`
   |         |
   |         expected `()`, found `Either`

error[E0425]: cannot find function `consume_fnmut` in this scope
  --> /home/runner/work/glacier/glacier/ices/109188.rs:13:5
   |
13 |     consume_fnmut(|| {
   |     ^^^^^^^^^^^^^ not found in this scope

error: aborting due to 5 previous errors

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

=== stdout ===
=== stderr ===
error[E0425]: cannot find value `_t` in this scope
  --> /home/runner/work/glacier/glacier/ices/109188.rs:14:11
   |
14 |         X(_t) = x;
   |           ^^ not found in this scope

error[E0425]: cannot find value `_t` in this scope
  --> /home/runner/work/glacier/glacier/ices/109188.rs:16:21
   |
16 |         Either::Two(_t) = x;
   |                     ^^ not found in this scope

error[E0308]: mismatched types
  --> /home/runner/work/glacier/glacier/ices/109188.rs:14:9
   |
14 |         X(_t) = x;
   |         ^^^^^   - this expression has type `()`
   |         |
   |         expected `()`, found `X`

error[E0308]: mismatched types
  --> /home/runner/work/glacier/glacier/ices/109188.rs:16:9
   |
16 |         Either::Two(_t) = x;
   |         ^^^^^^^^^^^^^^^   - this expression has type `()`
   |         |
   |         expected `()`, found `Either`

error[E0425]: cannot find function `consume_fnmut` in this scope
  --> /home/runner/work/glacier/glacier/ices/109188.rs:13:5
   |
13 |     consume_fnmut(|| {
   |     ^^^^^^^^^^^^^ not found in this scope

error: aborting due to 5 previous errors

Some errors have detailed explanations: E0308, E0425.
For more information about an error, try `rustc --explain E0308`.
==============
@Alexendoo Alexendoo merged commit 93f7363 into master Mar 25, 2023
@Alexendoo Alexendoo deleted the autofix/ices/109188.rs branch March 25, 2023 21:06
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