Rust-GCC/gccrs

Assigning structs to variables

liamnaddell opened this issue · 7 comments

Summary

gccrs lets you assign structs to variables, when rustc emits "expected value, found struct ..."

Reproducer

I tried this code:

struct A {
    a: u32,
}

fn main() {
    let a = A {a: 4};
    let b = A;
    a.a = 2;
}

Does the code make use of any (1.49) nightly feature ?

  • Nightly

Godbolt link

No response

Actual behavior

The current behavior is...

The code compiles.

Expected behavior

I expected to see...

error[E0423]: expected value, found struct `A`
 --> main.rs:7:13
  |
1 | / struct A {
2 | |     a: u32,
3 | | }
  | |_- `A` defined here
...
7 |       let b = A;

GCC Version

commit-hash: c83b22a