gccrs
gccrs copied to clipboard
GCC Front-End for Rust
I tried this code: ```rust union B { a: A, b: f32 } struct A { data: i32, len: usize, } ``` I expected to see this happen: compile without...
https://github.com/rust-lang/rust/blob/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/ptr/const_ptr.rs#L888 It works if we write it as: ``` pub const fn len(self) -> usize { // SAFETY: this is safe because `*const [T]` and `FatPtr` have the same layout....
```rust type A = B; struct B; ``` Fails with the following error: ```rust test.rs:1:10: error: failed to lookup HIR 6 for node 'B' 1 | type A = B;...
```rust fn main() { let arr0: [i32; 5] = [1, 2, 3, 4, 5]; let arr1: [i32; 5] = [1, 2, 3, 4, 5]; let arr2: [i32; 5] = [1,...
I tried this code: ```rust fn foo(a: fn(i32)) {} fn bar(a: fn()) {} fn baz(a: fn(i32) -> i32) {} // no issue ``` I expected to see this happen: No...
When trying to add an `impl` on a `dyn Trait` gccrs produces an ICE which appears to come from the parser. ### Code ```rust trait T {} impl dyn T...
- [ ] #1360 - [ ] Type check default expressions - [ ] Report errors when default expressions are used in const functions or other restricted items #1310 -...
I tried this code: ```rust mod intrinsics { extern "rust-intrinsic" { pub fn wrapping_add(a: T, b: T) -> T; pub fn rotate_left(a: T, b: T) -> T; pub fn rotate_right(a:...