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

ices/104172.rs: fixed with errors #1663

Merged
merged 1 commit into from
Sep 21, 2023
Merged

ices/104172.rs: fixed with errors #1663

merged 1 commit into from
Sep 21, 2023

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#104172

#![allow(dead_code)]

const N: usize = {
    struct U;
    ! let y = 42;
    3
};

struct S {
    x: [(); N]
}

fn main() {}
=== stdout ===
=== stderr ===
error: expected expression, found `let` statement
 --> /home/runner/work/glacier/glacier/ices/104172.rs:5:7
  |
5 |     ! let y = 42;
  |       ^^^
  |
  = note: only supported directly in conditions of `if` and `while` expressions

error: aborting due to previous error

==============

=== stdout ===
=== stderr ===
error: expected expression, found `let` statement
 --> /home/runner/work/glacier/glacier/ices/104172.rs:5:7
  |
5 |     ! let y = 42;
  |       ^^^
  |
  = note: only supported directly in conditions of `if` and `while` expressions

error: aborting due to previous error

==============
@JohnTitor JohnTitor merged commit 20cb5e8 into master Sep 21, 2023
@JohnTitor JohnTitor deleted the autofix/ices/104172.rs branch September 21, 2023 18:32
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