-
Probably we want to monomorphise generics.
It would be nice to do this in two passes: before translating functions discover all the instantiations of generic functions, do type substitutions, emit …
-
Some templated implementation are left in [`gcc/rust/ast/rust-ast-collector.cc`](https://github.com/Rust-GCC/gccrs/blob/master/gcc/rust/ast/rust-ast-collector.cc#L53). Those should be moved to their h…
P-E-P updated
11 months ago
-
See e.g.
```Rust
fn main() {
let x = Some("hello".to_owned());
x.map_or(0, |_| 1);
}
```
Which generates this initial IR:
```
; ::map_or
; Function Attrs: inlinehint uwtable
defin…
-
- A package contains source code. (enables monomorphization, compiler optimizations).
- A package cannot execute *any* code upon installation.
- A package must use (restricted) semantic versioning.
…
-
Over in non-binary/http-cache-semantics#2, we're using `request::Parts` and `response::Parts` rather than `Request` or `Response` because we never care about the bodies. But the builders are still the…
-
### Aim
Validating this program
```rust
struct Bar {
valid: bool,
}
struct Point {
x: Field,
y: Field,
bar: Bar,
}
fn main(
points: [Point; 2]
) -> pub bool {
…
-
## Background
### Core vs Haskell
In GHC, there's an internal language called Core, and all programs are translated to it during compilation, reducing the vast complexity of the surface language…
-
Union types express a subtyping relationship, but I am unclear as to whether typeclasses (i.e. Rust's traits) do?
If a `trait B` extends another `trait A` and `B` reuses the implementations of `A`, c…
-
Is less verbosity the only main benefit of typeclasses over just inputting a set of functions?
Typeclasses can do where `bar` is a member of `Function`:
```
foo(x: A) where Function
bar(x)
…
-
One of the major points of discussion during the [log evaluation](https://internals.rust-lang.org/t/crate-evaluation-for-2017-05-16-log/5185/50) was structured logging, specifically the `log` crate's …