Skip to content

Instantly share code, notes, and snippets.

View Limeth's full-sized avatar
🦀

Jakub Hlusička Limeth

🦀
View GitHub Profile
[I] !  I  ~/w/r/bjorn3-mopa   master *  env RUST_BACKTRACE=1 cargo test 585ms  Fr 29 Jul 2016 21:07:25 CEST
Compiling mopa v0.2.2 (file:///home/limeth/workspace/rust/bjorn3-mopa)
mopafy! { Person }
mopafy_only_core! { Person }
parse_generics_shim! { { .. } , then mopafy_only_core_internal ! ( Person ) , }
parse_generics_shim! { @ parse_start { { .. } , ( mopafy_only_core_internal ! ( Person ) ) } , }
parse_generics_shim! { @ emit_output { { .. } , ( mopafy_only_core_internal ! ( Person ) ) } , {
constr : [ ] , ltimes : [ ] , tnames : [ ] , } , }
parse_generics_shim_util! { @ callback ( mopafy_only_core_internal ! ( Person ) ) , {
[I] I  ~/w/r/mopa   master *  env RUST_BACKTRACE=1 cargo test 41.4s  Fr 29 Jul 2016 16:04:40 CEST
Compiling mopa v0.2.2 (file:///home/limeth/workspace/rust/mopa)
mopafy! { Person }
mopafy_only_core! { Person }
parse_generics_shim! { { .. } , then mopafy_only_core_internal ! ( Person ) , }
parse_generics_shim! { @ parse_start { { .. } , ( mopafy_only_core_internal ! ( Person ) ) } , }
parse_generics_shim! { @ emit_output { { .. } , ( mopafy_only_core_internal ! ( Person ) ) } , {
constr : [ ] , ltimes : [ ] , tnames : [ ] , } , }
parse_generics_shim_util! { @ callback ( mopafy_only_core_internal ! ( Person ) ) , {
constr : [ ] , params : [ ] , ltimes : [ ] , tnames : [ ] , .. } , }
#[macro_export]
#[doc(hidden)]
macro_rules! define_msg_internal {
(@as_item $i:item) => ($i);
(@gen_match $f:ident, $l:ident; $($lang:pat => $format:tt),*; $tail:tt) => (
match $l {
$($lang => define_msg_internal!(@gen_arm $f; $format; $tail),)*
}
);
@Limeth
Limeth / playground.rs
Created July 25, 2016 21:40 — forked from anonymous/playground.rs
Shared via Rust Playground
use std::any::Any;
use std::collections::HashMap;
use std::fmt::Debug;
fn main() {
let mut map: HashMap<(), Box<Fn() -> Box<Any>>> = HashMap::new();
map.insert((), Box::new(|| {
let val: Box<Box<Trait>> = Box::new(Box::new(A));
val
}));
$ cargo install clippy
Updating registry `https://github.com/rust-lang/crates.io-index`
Compiling nom v1.2.3
Compiling rustc-serialize v0.3.19
Compiling matches v0.1.2
Compiling quine-mc_cluskey v0.2.2
Compiling regex-syntax v0.3.3
Compiling semver v0.2.3
Compiling unicode-normalization v0.1.2
Compiling toml v0.1.30
use std::fmt::Display;
use std::cell::RefCell;
use std::cell::RefMut;
pub struct ProviderData<T, I> {
items: Vec<Option<T>>,
iterator: I,
}
#![feature(specialization)]
fn main() {
println!("Hello, world!");
}
trait BaseFloat {}
trait NumPoint<F: BaseFloat> {}
trait AbstractSurface<F: BaseFloat, P: NumPoint<F>>: Surface<F, P> {}
trait Surface<F: BaseFloat, P: NumPoint<F>> {
fn main() {
println!("Hello, world!");
}
trait BaseFloat {}
trait NumPoint<F: BaseFloat> {}
trait AbstractSurface<F: BaseFloat, P: NumPoint<F>> {}
trait Surface<F: BaseFloat, P: NumPoint<F>> {}
// I want to make anything that implements an AbstractSurface
Verifying that +limeth is my blockchain ID. https://onename.com/limeth
@Limeth
Limeth / Client POM
Last active August 29, 2015 14:20
Maven, duh.
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cz.projectsurvive</groupId>
<artifactId>minecraftshield</artifactId>
<version>0.1.0</version>
</parent>
<name>MinecraftShield Client</name>
<artifactId>minecraftshield-client</artifactId>
<version>0.1.0</version>