Skip to content

Instantly share code, notes, and snippets.

@greglearns
greglearns / inference.rs
Created November 12, 2022 00:56 — forked from sciolizer/inference.rs
Rust inference feeling somewhat arbitrary
trait MyTrait {}
struct MyStruct;
impl MyTrait for MyStruct {}
fn compiles1() -> Box<dyn MyTrait> {
Box::new(MyStruct)
}
fn compiles2() -> Box<dyn MyTrait> {
## Prepare ###################################################################
# Remove RVM
rvm implode
# Ensure your homebrew is working properly and up to date
brew update
brew doctor
brew update