gccrs
gccrs copied to clipboard
GCC Front-End for Rust
### Code ```rust #![feature(lang_items)] #[lang = "clone"] trait Clone { fn clone(&self) -> Self; } #[lang = "sized"] trait Sized {} struct Abound { a: u32, b: u32, } #[derive(Clone)]...
Dependent: https://github.com/Rust-GCC/gccrs/pull/3060 Dependent on: https://github.com/Rust-GCC/gccrs/pull/3098
Let's fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116225 and add a CI to make sure this no longer happens. We should make use of every little safety feature the C++ std offers us lol
This patch adds a pattern analysis pass which detects non-exhaustive match patterns and finds witnesses (counterexamples). The algorithm I implemented is based on one described in [rustc documents](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_pattern_analysis/usefulness/index.html). The current...
It's not an issue at the moment, but we do need use trees to handle having outer attributes for things like `#[prelude_import]` to be feature gated properly
``` $ mkdir dir $ ./crab1 -frust-incomplete-and-experimental-compiler-do-not-use dir/ crab1: internal compiler error: in set_crate_name, at rust/rust-session-manager.h:290 0x164c327 Rust::CompileOptions::set_crate_name(std::__cxx11::basic_string) ../../gccrs/gcc/rust/rust-session-manager.h:290 0x1647e8a Rust::Session::handle_input_files(int, char const**) ../../gccrs/gcc/rust/rust-session-manager.cc:409 0x14a795e grs_langhook_parse_file ../../gccrs/gcc/rust/rust-lang.cc:165 Please submit a...
I tried this code (which rustc compiles with no warnings) ```rust struct Foo { my_int: u32, } trait Child { fn child(&self) -> u32; } impl Child for Foo {...
### Code ```rust extern "C" { fn printf(s: *const i8, ...); } #[lang = "sized"] pub trait Sized {} struct Foo { my_int: u32, } trait Parent { fn parent(&self)...