-
### Code
```rust
#![feature(lang_items)]
#[lang = "clone"]
trait Clone {
fn clone(&self) -> Self;
}
#[lang = "sized"]
trait Sized {}
struct Abound {
a: u32,
b: u32,
…
-
### Code
```rust
extern "C" {
fn printf(s: *const i8, ...);
}
#[lang = "sized"]
pub trait Sized {}
struct Foo {
my_int: u32,
}
trait Parent {
fn parent(&self) -> T;
…
-
This already was mentioned a while ago in "Re: ☠ Buildbot (Sourceware): gccrust - failed compile (failure) (master)", but as of the 2024-08-01 push of GCC/Rust changes to GCC upstream (#2965 "[upstre…
-
We need to use pigweed's rust toolchain to match, but I've been able to get that working.
In the meantime, we've disabled rust_ targets.
See https://github.com/bsodmike/pigweed-sense-playground/…
-
There appears to be a bug in the handling of overflows for signed integer types and floating-point types. While unsigned integers are unaffected, assigning the minimum value (`TYPE::MIN`) to signed in…
-
In my previous project with rust on a STM32 I managed to place assembly code in ram. The code is compiled with gcc via build.rs and cc. And is more or less this:
```
.section .data
.global mode0
.…
-
**Project description**
gccrs is a full alternative implementation of the Rust language ontop of GCC with the goal to become fully upstream with the GNU toolchain.
**Metadata**
* homepage URL…
-
Just for fun, I tried enabling GCC/Rust in my GCC/nvptx target testing (see ).
As you'd hope, it generally works.
One issue, however, is that in our hacked-up `printf` test cases, we use:
…
-
With the following directory structure
```
test.rs
foo/
mod.rs
bar.rs
```
and the following files:
```rust
// test.rs
pub mod foo;
use foo::bar::f;
fn main() {
f()
…
-
https://godbolt.org/z/3bxKGWver
### Code
```rust
union MyUnion {
f1: u32,
}
fn f(u: MyUnion) -> i32 {
unsafe {
match u {
MyUnion { f1: 10 } => { 0 }
…